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
24acea72
Commit
24acea72
authored
Dec 17, 2015
by
carl bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring(top_nav): move menu condition to controller
parent
08ca7239
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
public/app/features/dashboard/dashboardNavCtrl.js
+4
-0
public/app/features/dashboard/partials/dashboardTopNav.html
+6
-6
No files found.
public/app/features/dashboard/dashboardNavCtrl.js
View file @
24acea72
...
@@ -20,6 +20,10 @@ function (angular, _) {
...
@@ -20,6 +20,10 @@ function (angular, _) {
$location
.
search
(
search
);
$location
.
search
(
search
);
};
};
$scope
.
showSettingsMenu
=
function
()
{
return
$scope
.
dashboardMeta
.
canEdit
||
$scope
.
contextSrv
.
isEditor
;
};
$scope
.
starDashboard
=
function
()
{
$scope
.
starDashboard
=
function
()
{
if
(
$scope
.
dashboardMeta
.
isStarred
)
{
if
(
$scope
.
dashboardMeta
.
isStarred
)
{
backendSrv
.
delete
(
'/api/user/stars/dashboard/'
+
$scope
.
dashboard
.
id
).
then
(
function
()
{
backendSrv
.
delete
(
'/api/user/stars/dashboard/'
+
$scope
.
dashboard
.
id
).
then
(
function
()
{
...
...
public/app/features/dashboard/partials/dashboardTopNav.html
View file @
24acea72
...
@@ -29,14 +29,14 @@
...
@@ -29,14 +29,14 @@
<li
ng-show=
"dashboardMeta.canSave"
>
<li
ng-show=
"dashboardMeta.canSave"
>
<a
ng-click=
"saveDashboard()"
bs-tooltip=
"'Save dashboard'"
data-placement=
"bottom"
><i
class=
"fa fa-save"
></i></a>
<a
ng-click=
"saveDashboard()"
bs-tooltip=
"'Save dashboard'"
data-placement=
"bottom"
><i
class=
"fa fa-save"
></i></a>
</li>
</li>
<li
ng-if=
"
dashboardMeta.canEdit || contextSrv.isEditor
"
class=
"dropdown"
>
<li
ng-if=
"
showSettingsMenu()
"
class=
"dropdown"
>
<a
class=
"pointer"
ng-click=
"hideTooltip($event)"
bs-tooltip=
"'Manage dashboard'"
data-placement=
"bottom"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i></a>
<a
class=
"pointer"
ng-click=
"hideTooltip($event)"
bs-tooltip=
"'Manage dashboard'"
data-placement=
"bottom"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i></a>
<ul
class=
"dropdown-menu"
>
<ul
class=
"dropdown-menu"
>
<li
ng-if=
"dashboardMeta.canEdit
|| contextSrv.isEditor
"
><a
class=
"pointer"
ng-click=
"openEditView('settings');"
>
Settings
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('settings');"
>
Settings
</a></li>
<li
ng-if=
"dashboardMeta.canEdit
|| contextSrv.isEditor
"
><a
class=
"pointer"
ng-click=
"openEditView('annotations');"
>
Annotations
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('annotations');"
>
Annotations
</a></li>
<li
ng-if=
"dashboardMeta.canEdit
|| contextSrv.isEditor
"
><a
class=
"pointer"
ng-click=
"openEditView('templating');"
>
Templating
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('templating');"
>
Templating
</a></li>
<li
ng-if=
"dashboardMeta.canEdit
|| contextSrv.isEditor
"
><a
class=
"pointer"
ng-click=
"exportDashboard();"
>
Export
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"exportDashboard();"
>
Export
</a></li>
<li
ng-if=
"dashboardMeta.canEdit
|| contextSrv.isEditor
"
><a
class=
"pointer"
ng-click=
"editJson();"
>
View JSON
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"editJson();"
>
View JSON
</a></li>
<li
ng-if=
"contextSrv.isEditor && !dashboard.editable"
><a
class=
"pointer"
ng-click=
"makeEditable();"
>
Make Editable
</a></li>
<li
ng-if=
"contextSrv.isEditor && !dashboard.editable"
><a
class=
"pointer"
ng-click=
"makeEditable();"
>
Make Editable
</a></li>
<li
ng-if=
"contextSrv.isEditor"
><a
class=
"pointer"
ng-click=
"saveDashboardAs();"
>
Save As...
</a></li>
<li
ng-if=
"contextSrv.isEditor"
><a
class=
"pointer"
ng-click=
"saveDashboardAs();"
>
Save As...
</a></li>
<li
ng-if=
"dashboardMeta.canSave"
><a
class=
"pointer"
ng-click=
"deleteDashboard();"
>
Delete dashboard
</a></li>
<li
ng-if=
"dashboardMeta.canSave"
><a
class=
"pointer"
ng-click=
"deleteDashboard();"
>
Delete dashboard
</a></li>
...
...
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