diff --git a/db/patch-add-clickable-status-page-link.sql b/db/patch-add-clickable-status-page-link.sql
new file mode 100644
index 000000000..bacd669bd
--- /dev/null
+++ b/db/patch-add-clickable-status-page-link.sql
@@ -0,0 +1,5 @@
+-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
+BEGIN TRANSACTION;
+ALTER TABLE monitor_group
+ ADD send_url BOOLEAN DEFAULT 0 NOT NULL;
+COMMIT;
diff --git a/server/database.js b/server/database.js
index 060ac8868..00fd48d9f 100644
--- a/server/database.js
+++ b/server/database.js
@@ -58,6 +58,7 @@ class Database {
"patch-monitor-expiry-notification.sql": true,
"patch-status-page-footer-css.sql": true,
"patch-added-mqtt-monitor.sql": true,
+ "patch-add-clickable-status-page-link.sql": true,
"patch-add-sqlserver-monitor.sql": true,
"patch-add-other-auth.sql": { parents: [ "patch-monitor-basic-auth.sql" ] },
};
diff --git a/server/model/group.js b/server/model/group.js
index 599b758bc..3f3b3b129 100644
--- a/server/model/group.js
+++ b/server/model/group.js
@@ -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
diff --git a/server/model/monitor.js b/server/model/monitor.js
index 5c97785f9..b8733a0b1 100644
--- a/server/model/monitor.js
+++ b/server/model/monitor.js
@@ -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();
}
diff --git a/server/socket-handlers/status-page-socket-handler.js b/server/socket-handlers/status-page-socket-handler.js
index 0a0dc6865..80017e7d2 100644
--- a/server/socket-handlers/status-page-socket-handler.js
+++ b/server/socket-handlers/status-page-socket-handler.js
@@ -202,6 +202,7 @@ module.exports.statusPageSocketHandler = (socket) => {
relationBean.weight = monitorOrder++;
relationBean.group_id = groupBean.id;
relationBean.monitor_id = monitor.id;
+ relationBean.send_url = monitor.sendUrl;
await R.store(relationBean);
}
diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue
index 137f734d1..e8ed57d80 100644
--- a/src/components/PublicGroupList.vue
+++ b/src/components/PublicGroupList.vue
@@ -39,7 +39,27 @@
{{ monitor.element.name }}
+ +