Merge branch 'master' into master

This commit is contained in:
Filippo 2025-04-15 06:54:16 +02:00 committed by GitHub
commit cf70121471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 331 additions and 259 deletions

510
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -72,7 +72,7 @@
"@louislam/sqlite3": "15.1.6", "@louislam/sqlite3": "15.1.6",
"@vvo/tzdb": "^6.125.0", "@vvo/tzdb": "^6.125.0",
"args-parser": "~1.3.0", "args-parser": "~1.3.0",
"axios": "~0.29.0", "axios": "~0.30.0",
"badge-maker": "~3.3.1", "badge-maker": "~3.3.1",
"bcryptjs": "~2.4.3", "bcryptjs": "~2.4.3",
"chardet": "~1.4.0", "chardet": "~1.4.0",

View file

@ -34,12 +34,16 @@ class DnsMonitorType extends MonitorType {
switch (monitor.dns_resolve_type) { switch (monitor.dns_resolve_type) {
case "A": case "A":
case "AAAA": case "AAAA":
case "TXT":
case "PTR": case "PTR":
dnsMessage = `Records: ${dnsRes.join(" | ")}`; dnsMessage = `Records: ${dnsRes.join(" | ")}`;
conditionsResult = dnsRes.some(record => handleConditions({ record })); conditionsResult = dnsRes.some(record => handleConditions({ record }));
break; break;
case "TXT":
dnsMessage = `Records: ${dnsRes.join(" | ")}`;
conditionsResult = dnsRes.flat().some(record => handleConditions({ record }));
break;
case "CNAME": case "CNAME":
dnsMessage = dnsRes[0]; dnsMessage = dnsRes[0];
conditionsResult = handleConditions({ record: dnsRes[0] }); conditionsResult = handleConditions({ record: dnsRes[0] });

View file

@ -79,11 +79,13 @@ class Mattermost extends NotificationProvider {
fallback: fallback:
"Your " + "Your " +
monitorJSON.pathName + monitorJSON.pathName +
monitorJSON.name +
" service went " + " service went " +
statusText, statusText,
color: color, color: color,
title: title:
monitorJSON.pathName + monitorJSON.pathName +
monitorJSON.name +
" service went " + " service went " +
statusText, statusText,
title_link: monitorJSON.url, title_link: monitorJSON.url,

View file

@ -42,6 +42,9 @@ export default {
mounted() { mounted() {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
* Show the confirm dialog * Show the confirm dialog
@ -58,6 +61,19 @@ export default {
this.$emit("added", this.groupName); this.$emit("added", this.groupName);
this.modal.hide(); this.modal.hide();
}, },
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
}
}, },
}; };
</script> </script>

View file

@ -235,6 +235,9 @@ export default {
mounted() { mounted() {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
@ -339,6 +342,20 @@ export default {
}); });
} while (this.$root.notificationList.find(it => it.name === name)); } while (this.$root.notificationList.find(it => it.name === name));
return name; return name;
},
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
} }
}, },
}; };

View file

@ -125,11 +125,12 @@ export default {
} }
}; };
}, },
mounted() { mounted() {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
* Show dialog to confirm deletion * Show dialog to confirm deletion
@ -209,6 +210,20 @@ export default {
} }
}); });
}, },
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
}
}, },
}; };
</script> </script>

View file

@ -248,6 +248,9 @@ export default {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
this.getExistingTags(); this.getExistingTags();
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
* Show the add tag dialog * Show the add tag dialog
@ -459,6 +462,19 @@ export default {
this.newTags = []; this.newTags = [];
this.deleteTags = []; this.deleteTags = [];
this.processing = false; this.processing = false;
},
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
} }
}, },
}; };

View file

@ -18,7 +18,7 @@
{{ $t("matrixDesc1") }} {{ $t("matrixDesc1") }}
</p> </p>
<i18n-t tag="p" keypath="matrixDesc2" style="margin-top: 8px;"> <i18n-t tag="p" keypath="matrixDesc2" style="margin-top: 8px;">
<code>curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "botusername", "type": "m.id.user"}, "password": "passwordforuser"}' "https://home.server/_matrix/client/r0/login"</code>. <code>curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "botusername", "type": "m.id.user"}, "password": "passwordforuser"}' "https://home.server/_matrix/client/v3/login"</code>.
</i18n-t> </i18n-t>
</div> </div>
</template> </template>