refactor: use extractAddress() method for monitor address
Address review feedback from CommanderStorm to use the inherited extractAddress() method instead of directly accessing monitorJSON["url"]. This properly handles different monitor types (ping, port, dns, etc.).
This commit is contained in:
parent
13b49bb417
commit
4cad39740e
@ -80,11 +80,12 @@ class GoogleChat extends NotificationProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// add monitor URL if available
|
||||
if (monitorJSON && monitorJSON["url"]) {
|
||||
// add monitor address if available
|
||||
const address = this.extractAddress(monitorJSON);
|
||||
if (address) {
|
||||
sectionWidgets.push({
|
||||
textParagraph: {
|
||||
text: `<b>URL:</b>\n<a href="${monitorJSON["url"]}">${monitorJSON["url"]}</a>`,
|
||||
text: `<b>Address:</b>\n${address}`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user