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
3fabd2ea
Commit
3fabd2ea
authored
Jan 06, 2016
by
nikita-graf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basic playlist dashboards sort support
parent
5eea02b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
public/app/features/playlist/partials/playlist.html
+8
-2
public/app/features/playlist/playlistEditCtrl.js
+18
-0
No files found.
public/app/features/playlist/partials/playlist.html
View file @
3fabd2ea
...
@@ -86,8 +86,14 @@
...
@@ -86,8 +86,14 @@
<td
style=
"white-space: nowrap;"
>
<td
style=
"white-space: nowrap;"
>
{{dashboard.title}}
{{dashboard.title}}
</td>
</td>
<td
style=
"text-align: center"
>
<td
style=
"text-align: right"
>
<button
class=
"btn btn-inverse btn-mini pull-right"
ng-click=
"removeDashboard(dashboard)"
>
<button
class=
"btn btn-inverse btn-mini"
ng-click=
"moveDashboardUp(dashboard)"
>
<i
class=
"fa fa-arrow-up"
></i>
</button>
<button
class=
"btn btn-inverse btn-mini"
ng-click=
"moveDashboardDown(dashboard)"
>
<i
class=
"fa fa-arrow-down"
></i>
</button>
<button
class=
"btn btn-inverse btn-mini"
ng-click=
"removeDashboard(dashboard)"
>
<i
class=
"fa fa-remove"
></i>
<i
class=
"fa fa-remove"
></i>
</button>
</button>
</td>
</td>
...
...
public/app/features/playlist/playlistEditCtrl.js
View file @
3fabd2ea
...
@@ -107,6 +107,24 @@ function (angular, config, _) {
...
@@ -107,6 +107,24 @@ function (angular, config, _) {
return
$scope
.
loading
;
return
$scope
.
loading
;
};
};
$scope
.
moveDashboard
=
function
(
dashboard
,
offset
)
{
var
currentPosition
=
dashboards
.
indexOf
(
dashboard
);
var
newPosition
=
currentPosition
+
offset
;
if
(
newPosition
>=
0
&&
newPosition
<
dashboards
.
length
)
{
dashboards
.
splice
(
currentPosition
,
1
);
dashboards
.
splice
(
newPosition
,
0
,
dashboard
);
}
};
$scope
.
moveDashboardUp
=
function
(
dashboard
)
{
$scope
.
moveDashboard
(
dashboard
,
-
1
);
};
$scope
.
moveDashboardDown
=
function
(
dashboard
)
{
$scope
.
moveDashboard
(
dashboard
,
1
);
};
$scope
.
playlist
=
playlist
;
$scope
.
playlist
=
playlist
;
$scope
.
dashboards
=
dashboards
;
$scope
.
dashboards
=
dashboards
;
$scope
.
timespan
=
config
.
playlist_timespan
;
$scope
.
timespan
=
config
.
playlist_timespan
;
...
...
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