Commit 04c88a22 by Torkel Ödegaard

Minor refactoring of copy tags when saving feature, #15446

parent 60272d8a
...@@ -26,9 +26,11 @@ const template = ` ...@@ -26,9 +26,11 @@ const template = `
enable-create-new="true" enable-create-new="true"
label-class="width-8" label-class="width-8"
dashboard-id="ctrl.clone.id"> dashboard-id="ctrl.clone.id">
</folder-picker> </folder-picker>
<gf-form-switch class="gf-form" label="Preserve tags" label-class="width-8" checked="ctrl.preseveTags"> <div class="gf-form-inline">
</gf-form-switch> <gf-form-switch class="gf-form" label="Copy tags" label-class="width-8" checked="ctrl.copyTags">
</gf-form-switch>
</div>
</div> </div>
<div class="gf-form-button-row text-center"> <div class="gf-form-button-row text-center">
...@@ -44,7 +46,7 @@ export class SaveDashboardAsModalCtrl { ...@@ -44,7 +46,7 @@ export class SaveDashboardAsModalCtrl {
folderId: any; folderId: any;
dismiss: () => void; dismiss: () => void;
isValidFolderSelection = true; isValidFolderSelection = true;
preseveTags: boolean; copyTags: boolean;
/** @ngInject */ /** @ngInject */
constructor(private dashboardSrv) { constructor(private dashboardSrv) {
...@@ -56,7 +58,7 @@ export class SaveDashboardAsModalCtrl { ...@@ -56,7 +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.preseveTags = false; 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
...@@ -73,7 +75,7 @@ export class SaveDashboardAsModalCtrl { ...@@ -73,7 +75,7 @@ export class SaveDashboardAsModalCtrl {
} }
save() { save() {
if (!this.preseveTags) { if (!this.copyTags) {
this.clone.tags = []; this.clone.tags = [];
} }
......
...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment