From ad26f0e817dc76522b5d53655f05d6186a5f14c0 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Thu, 2 Mar 2023 06:44:16 +0800 Subject: [PATCH] Fix: assign tags when cloning monitor --- src/pages/EditMonitor.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index fa1935b0c..5d71ce1e0 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -936,7 +936,16 @@ message HealthCheckResponse { this.monitor.includeSensitiveData = undefined; this.monitor.maintenance = undefined; this.monitor.name = this.$t("cloneOf", [ this.monitor.name ]); - this.monitor.tags = undefined; // FIXME: Cloning tags does not work yet + this.$refs.tagsManager.newTags = this.monitor.tags.map((monitorTag) => { + return { + id: monitorTag.tag_id, + name: monitorTag.name, + color: monitorTag.color, + value: monitorTag.value, + new: true, + }; + }); + this.monitor.tags = undefined; } // Handling for monitors that are created before 1.7.0