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
0c7fccdc
Commit
0c7fccdc
authored
Nov 20, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2812 from utkarshcmu/master
Duplicate button for template variables
parents
924ecce2
9cdf0601
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
public/app/features/templating/editorCtrl.js
+7
-0
public/app/features/templating/partials/editor.html
+5
-0
No files found.
public/app/features/templating/editorCtrl.js
View file @
0c7fccdc
...
...
@@ -96,6 +96,13 @@ function (angular, _) {
}
};
$scope
.
duplicate
=
function
(
variable
)
{
$scope
.
current
=
angular
.
copy
(
variable
);
$scope
.
variables
.
push
(
$scope
.
current
);
$scope
.
current
.
name
=
'copy_of_'
+
variable
.
name
;
$scope
.
updateSubmenuVisibility
();
};
$scope
.
update
=
function
()
{
if
(
$scope
.
isValid
())
{
$scope
.
runQuery
().
then
(
function
()
{
...
...
public/app/features/templating/partials/editor.html
View file @
0c7fccdc
...
...
@@ -59,6 +59,11 @@
Edit
</a>
</td>
<td
style=
"width: 1%"
>
<a
ng-click=
"duplicate(variable)"
class=
"btn btn-inverse btn-small"
>
Duplicate
</a>
</td>
<td
style=
"width: 1%"
><i
ng-click=
"_.move(variables,$index,$index-1)"
ng-hide=
"$first"
class=
"pointer fa fa-arrow-up"
></i></td>
<td
style=
"width: 1%"
><i
ng-click=
"_.move(variables,$index,$index+1)"
ng-hide=
"$last"
class=
"pointer fa fa-arrow-down"
></i></td>
<td
style=
"width: 1%"
>
...
...
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