Merge pull request #2869 from chakflying/fix/clone-monitor-tags

Fix: assign tags when cloning monitor
This commit is contained in:
Louis Lam 2023-03-04 17:29:57 +08:00 committed by GitHub
commit 44077b38cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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