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
4518604c
Unverified
Commit
4518604c
authored
Mar 08, 2019
by
Torkel Ödegaard
Committed by
GitHub
Mar 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15446 from grafana/preserve-tags-option
Preserve tags switch option in Save As modal
parents
4f48ed33
04c88a22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
public/app/features/dashboard/components/SaveModals/SaveDashboardAsModalCtrl.ts
+11
-3
public/sass/components/_tags.scss
+2
-4
No files found.
public/app/features/dashboard/components/SaveModals/SaveDashboardAsModalCtrl.ts
View file @
4518604c
...
@@ -16,18 +16,20 @@ const template = `
...
@@ -16,18 +16,20 @@ const template = `
<form name="ctrl.saveForm" class="modal-content" novalidate>
<form name="ctrl.saveForm" class="modal-content" novalidate>
<div class="p-t-2">
<div class="p-t-2">
<div class="gf-form">
<div class="gf-form">
<label class="gf-form-label width-
7
">New name</label>
<label class="gf-form-label width-
8
">New name</label>
<input type="text" class="gf-form-input" ng-model="ctrl.clone.title" give-focus="true" required>
<input type="text" class="gf-form-input" ng-model="ctrl.clone.title" give-focus="true" required>
</div>
</div>
<div class="gf-form">
<folder-picker initial-folder-id="ctrl.folderId"
<folder-picker initial-folder-id="ctrl.folderId"
on-change="ctrl.onFolderChange($folder)"
on-change="ctrl.onFolderChange($folder)"
enter-folder-creation="ctrl.onEnterFolderCreation()"
enter-folder-creation="ctrl.onEnterFolderCreation()"
exit-folder-creation="ctrl.onExitFolderCreation()"
exit-folder-creation="ctrl.onExitFolderCreation()"
enable-create-new="true"
enable-create-new="true"
label-class="width-
7
"
label-class="width-
8
"
dashboard-id="ctrl.clone.id">
dashboard-id="ctrl.clone.id">
</folder-picker>
</folder-picker>
<div class="gf-form-inline">
<gf-form-switch class="gf-form" label="Copy tags" label-class="width-8" checked="ctrl.copyTags">
</gf-form-switch>
</div>
</div>
</div>
</div>
...
@@ -44,6 +46,7 @@ export class SaveDashboardAsModalCtrl {
...
@@ -44,6 +46,7 @@ export class SaveDashboardAsModalCtrl {
folderId
:
any
;
folderId
:
any
;
dismiss
:
()
=>
void
;
dismiss
:
()
=>
void
;
isValidFolderSelection
=
true
;
isValidFolderSelection
=
true
;
copyTags
:
boolean
;
/** @ngInject */
/** @ngInject */
constructor
(
private
dashboardSrv
)
{
constructor
(
private
dashboardSrv
)
{
...
@@ -55,6 +58,7 @@ export class SaveDashboardAsModalCtrl {
...
@@ -55,6 +58,7 @@ export class SaveDashboardAsModalCtrl {
this
.
clone
.
editable
=
true
;
this
.
clone
.
editable
=
true
;
this
.
clone
.
hideControls
=
false
;
this
.
clone
.
hideControls
=
false
;
this
.
folderId
=
dashboard
.
meta
.
folderId
;
this
.
folderId
=
dashboard
.
meta
.
folderId
;
this
.
copyTags
=
false
;
// remove alerts if source dashboard is already persisted
// remove alerts if source dashboard is already persisted
// do not want to create alert dupes
// do not want to create alert dupes
...
@@ -71,6 +75,10 @@ export class SaveDashboardAsModalCtrl {
...
@@ -71,6 +75,10 @@ export class SaveDashboardAsModalCtrl {
}
}
save
()
{
save
()
{
if
(
!
this
.
copyTags
)
{
this
.
clone
.
tags
=
[];
}
return
this
.
dashboardSrv
.
save
(
this
.
clone
,
{
folderId
:
this
.
folderId
}).
then
(
this
.
dismiss
);
return
this
.
dashboardSrv
.
save
(
this
.
clone
,
{
folderId
:
this
.
folderId
}).
then
(
this
.
dismiss
);
}
}
...
...
public/sass/components/_tags.scss
View file @
4518604c
...
@@ -21,10 +21,8 @@
...
@@ -21,10 +21,8 @@
border-radius
:
3px
;
border-radius
:
3px
;
text-shadow
:
none
;
text-shadow
:
none
;
font-size
:
13px
;
font-size
:
13px
;
padding
:
3px
6px
1px
6px
;
padding
:
2px
6px
2px
6px
;
border-width
:
1px
;
border
:
1px
solid
lighten
(
$purple
,
10%
);
border-style
:
solid
;
box-shadow
:
0
0
1px
rgba
(
$white
,
0
.2
);
.icon-tag
{
.icon-tag
{
position
:
relative
;
position
:
relative
;
...
...
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