Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
9460063a
Unverified
Commit
9460063a
authored
Jun 06, 2018
by
Alexander Zobnin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show import menu in sidenav, dashboard search and manage dashboards page
if user has editor permissions for at least one folder
parent
4ff4ac1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
pkg/api/index.go
+1
-0
public/app/core/components/search/search.html
+2
-2
No files found.
pkg/api/index.go
View file @
9460063a
...
...
@@ -95,6 +95,7 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
if
hasEditPermissionInFoldersQuery
.
Result
{
children
:=
[]
*
dtos
.
NavLink
{
{
Text
:
"Dashboard"
,
Icon
:
"gicon gicon-dashboard-new"
,
Url
:
setting
.
AppSubUrl
+
"/dashboard/new"
},
{
Text
:
"Import"
,
SubTitle
:
"Import dashboard from file or Grafana.com"
,
Id
:
"import"
,
Icon
:
"gicon gicon-dashboard-import"
,
Url
:
setting
.
AppSubUrl
+
"/dashboard/import"
},
}
if
c
.
OrgRole
==
m
.
ROLE_ADMIN
||
c
.
OrgRole
==
m
.
ROLE_EDITOR
{
...
...
public/app/core/components/search/search.html
View file @
9460063a
...
...
@@ -52,11 +52,11 @@
<a
href=
"dashboards/folder/new"
class=
"search-filter-box-link"
ng-if=
"ctrl.isEditor"
>
<i
class=
"gicon gicon-folder-new"
></i>
New folder
</a>
<a
href=
"dashboard/import"
class=
"search-filter-box-link"
ng-if=
"ctrl.isEditor"
>
<a
href=
"dashboard/import"
class=
"search-filter-box-link"
ng-if=
"ctrl.isEditor
|| ctrl.hasEditPermissionInFolders
"
>
<i
class=
"gicon gicon-dashboard-import"
></i>
Import dashboard
</a>
<a
class=
"search-filter-box-link"
target=
"_blank"
href=
"https://grafana.com/dashboards?utm_source=grafana_search"
>
<img
src=
"public/img/icn-dashboard-tiny.svg"
width=
"20"
/>
Find
dashboards on Grafana.com
<img
src=
"public/img/icn-dashboard-tiny.svg"
width=
"20"
/>
Find dashboards on Grafana.com
</a>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment