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
9185c94a
Commit
9185c94a
authored
Oct 14, 2015
by
ubhatnagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added insert row option in the row menu.
parent
14f3a682
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
public/app/features/dashboard/rowCtrl.js
+10
-0
public/app/partials/dashboard.html
+7
-0
No files found.
public/app/features/dashboard/rowCtrl.js
View file @
9185c94a
...
...
@@ -82,6 +82,16 @@ function (angular, _, config) {
}
};
$scope
.
insert_row
=
function
(
direction
)
{
var
rowsList
=
$scope
.
dashboard
.
rows
;
var
currentRowIndex
=
_
.
indexOf
(
rowsList
,
$scope
.
row
);
$scope
.
add_row_default
();
var
newIndex
=
currentRowIndex
+
direction
;
if
(
newIndex
>=
0
&&
newIndex
<=
(
rowsList
.
length
-
1
))
{
_
.
move
(
rowsList
,
rowsList
.
length
-
1
,
newIndex
);
}
};
$scope
.
add_panel_default
=
function
(
type
)
{
var
defaultSpan
=
12
;
var
_as
=
12
-
$scope
.
dashboard
.
rowSpan
(
$scope
.
row
);
...
...
public/app/partials/dashboard.html
View file @
9185c94a
...
...
@@ -69,6 +69,13 @@
<li>
<a
dash-editor-link=
"app/partials/roweditor.html"
>
Row editor
</a>
</li>
<li
class=
"dropdown-submenu"
>
<a
href=
"javascript:void(0);"
>
Insert Row
</a>
<ul
class=
"dropdown-menu"
>
<li><a
ng-click=
"insert_row(0)"
>
Above
</a></li>
<li><a
ng-click=
"insert_row(1)"
>
Below
</a></li>
</ul>
</li>
<li>
<a
ng-click=
"delete_row()"
>
Delete row
</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