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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
public/app/features/dashboard/components/SaveModals/SaveDashboardAsModalCtrl.ts
+13
-5
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 = `
<form name="ctrl.saveForm" class="modal-content" novalidate>
<div class="p-t-2">
<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>
</div>
<div class="gf-form">
<folder-picker initial-folder-id="ctrl.folderId"
<folder-picker initial-folder-id="ctrl.folderId"
on-change="ctrl.onFolderChange($folder)"
enter-folder-creation="ctrl.onEnterFolderCreation()"
exit-folder-creation="ctrl.onExitFolderCreation()"
enable-create-new="true"
label-class="width-
7
"
label-class="width-
8
"
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>
...
...
@@ -44,6 +46,7 @@ export class SaveDashboardAsModalCtrl {
folderId
:
any
;
dismiss
:
()
=>
void
;
isValidFolderSelection
=
true
;
copyTags
:
boolean
;
/** @ngInject */
constructor
(
private
dashboardSrv
)
{
...
...
@@ -55,6 +58,7 @@ export class SaveDashboardAsModalCtrl {
this
.
clone
.
editable
=
true
;
this
.
clone
.
hideControls
=
false
;
this
.
folderId
=
dashboard
.
meta
.
folderId
;
this
.
copyTags
=
false
;
// remove alerts if source dashboard is already persisted
// do not want to create alert dupes
...
...
@@ -71,6 +75,10 @@ export class SaveDashboardAsModalCtrl {
}
save
()
{
if
(
!
this
.
copyTags
)
{
this
.
clone
.
tags
=
[];
}
return
this
.
dashboardSrv
.
save
(
this
.
clone
,
{
folderId
:
this
.
folderId
}).
then
(
this
.
dismiss
);
}
...
...
public/sass/components/_tags.scss
View file @
4518604c
...
...
@@ -21,10 +21,8 @@
border-radius
:
3px
;
text-shadow
:
none
;
font-size
:
13px
;
padding
:
3px
6px
1px
6px
;
border-width
:
1px
;
border-style
:
solid
;
box-shadow
:
0
0
1px
rgba
(
$white
,
0
.2
);
padding
:
2px
6px
2px
6px
;
border
:
1px
solid
lighten
(
$purple
,
10%
);
.icon-tag
{
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