mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 01:04:05 +00:00
Fix: Remove extra fields on clone
This commit is contained in:
parent
71c34694b7
commit
19fc7d31e6
1 changed files with 8 additions and 4 deletions
|
@ -823,7 +823,6 @@ message HealthCheckResponse {
|
||||||
// Only return groups which arent't itself and one of its decendants
|
// Only return groups which arent't itself and one of its decendants
|
||||||
sortedMonitorList() {
|
sortedMonitorList() {
|
||||||
let result = Object.values(this.$root.monitorList);
|
let result = Object.values(this.$root.monitorList);
|
||||||
console.log(this.monitor.childrenIDs);
|
|
||||||
|
|
||||||
// Only groups, not itself, not a decendant
|
// Only groups, not itself, not a decendant
|
||||||
result = result.filter(
|
result = result.filter(
|
||||||
|
@ -1035,12 +1034,17 @@ message HealthCheckResponse {
|
||||||
|
|
||||||
if (this.isClone) {
|
if (this.isClone) {
|
||||||
/*
|
/*
|
||||||
* Cloning a monitor will include properties that can not be posted to backend
|
* Cloning a monitor will include properties that can not be posted to backend
|
||||||
* as they are not valid columns in the SQLite table.
|
* 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.id = undefined; // Remove id when cloning as we want a new id
|
||||||
this.monitor.includeSensitiveData = undefined;
|
this.monitor.includeSensitiveData = undefined;
|
||||||
this.monitor.maintenance = undefined;
|
this.monitor.maintenance = undefined;
|
||||||
|
// group monitor fields
|
||||||
|
this.monitor.childrenIDs = undefined;
|
||||||
|
this.monitor.forceInactive = undefined;
|
||||||
|
this.monitor.pathName = undefined;
|
||||||
|
|
||||||
this.monitor.name = this.$t("cloneOf", [ this.monitor.name ]);
|
this.monitor.name = this.$t("cloneOf", [ this.monitor.name ]);
|
||||||
this.$refs.tagsManager.newTags = this.monitor.tags.map((monitorTag) => {
|
this.$refs.tagsManager.newTags = this.monitor.tags.map((monitorTag) => {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue