Merge pull request #1741 from Computroniks/feature/#1221-clickable-hostaname-on-status-page

Added #1221 clickable hostname in status page
This commit is contained in:
Louis Lam
2022-07-06 15:09:26 +08:00
committed by GitHub
7 changed files with 79 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ class Group extends BeanModel {
*/
async getMonitorList() {
return R.convertToBeans("monitor", await R.getAll(`
SELECT monitor.* FROM monitor, monitor_group
SELECT monitor.*, monitor_group.send_url FROM monitor, monitor_group
WHERE monitor.id = monitor_group.monitor_id
AND group_id = ?
ORDER BY monitor_group.weight

View File

@@ -34,7 +34,13 @@ class Monitor extends BeanModel {
let obj = {
id: this.id,
name: this.name,
sendUrl: this.sendUrl,
};
if (this.sendUrl) {
obj.url = this.url;
}
if (showTags) {
obj.tags = await this.getTags();
}