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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
pkg/api/index.go
+1
-0
public/app/core/components/search/search.html
+1
-1
No files found.
pkg/api/index.go
View file @
9460063a
...
@@ -95,6 +95,7 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
...
@@ -95,6 +95,7 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
if
hasEditPermissionInFoldersQuery
.
Result
{
if
hasEditPermissionInFoldersQuery
.
Result
{
children
:=
[]
*
dtos
.
NavLink
{
children
:=
[]
*
dtos
.
NavLink
{
{
Text
:
"Dashboard"
,
Icon
:
"gicon gicon-dashboard-new"
,
Url
:
setting
.
AppSubUrl
+
"/dashboard/new"
},
{
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
{
if
c
.
OrgRole
==
m
.
ROLE_ADMIN
||
c
.
OrgRole
==
m
.
ROLE_EDITOR
{
...
...
public/app/core/components/search/search.html
View file @
9460063a
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<a
href=
"dashboards/folder/new"
class=
"search-filter-box-link"
ng-if=
"ctrl.isEditor"
>
<a
href=
"dashboards/folder/new"
class=
"search-filter-box-link"
ng-if=
"ctrl.isEditor"
>
<i
class=
"gicon gicon-folder-new"
></i>
New folder
<i
class=
"gicon gicon-folder-new"
></i>
New folder
</a>
</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
<i
class=
"gicon gicon-dashboard-import"
></i>
Import dashboard
</a>
</a>
<a
class=
"search-filter-box-link"
target=
"_blank"
href=
"https://grafana.com/dashboards?utm_source=grafana_search"
>
<a
class=
"search-filter-box-link"
target=
"_blank"
href=
"https://grafana.com/dashboards?utm_source=grafana_search"
>
...
...
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