From 4fed0c152e901477a42481e5a016c9cae6456c44 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 25 Feb 2023 17:05:03 +0800 Subject: [PATCH] Show `Copy of` in front of the cloned monitor name --- src/lang/en.json | 1 + src/pages/EditMonitor.vue | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index 29bd0bb5..ad55fe6e 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -441,6 +441,7 @@ "notificationRegional": "Regional", "Clone Monitor": "Clone Monitor", "Clone": "Clone", + "cloneOf": "Clone of {0}", "smtp": "Email (SMTP)", "secureOptionNone": "None / STARTTLS (25, 587)", "secureOptionTLS": "TLS (465)", diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index e7ecb58a..4a4ae982 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -922,13 +922,14 @@ message HealthCheckResponse { this.monitor = res.monitor; if (this.isClone) { - /** - * Cloning a monitor will include properties that can not be posted to backend - * as they are not valid columns in the SQLite table. - */ + /* + * Cloning a monitor will include properties that can not be posted to backend + * as they are not valid columns in the SQLite table. + */ this.monitor.id = undefined; // Remove id when cloning as we want a new id 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 }