diff --git a/db/knex_migrations/2024-03-15-0000-hide-uptime-percentage.js b/db/knex_migrations/2024-03-15-0000-hide-uptime-percentage.js deleted file mode 100644 index 7d44fb52..00000000 --- a/db/knex_migrations/2024-03-15-0000-hide-uptime-percentage.js +++ /dev/null @@ -1,16 +0,0 @@ -exports.up = function (knex) { - // Add new column status_page.hide_uptime_percentage - return knex.schema - .alterTable("status_page", function (table) { - table.boolean("hide_uptime_percentage").notNullable().defaultTo(false); - }); - -}; - -exports.down = function (knex) { - // Drop column status_page.hide_uptime_percentage - return knex.schema - .alterTable("status_page", function (table) { - table.dropColumn("hide_uptime_percentage"); - }); -}; diff --git a/db/knex_migrations/2024-03-15-0000-show-last-heartbeat.js b/db/knex_migrations/2024-03-15-0000-show-last-heartbeat.js new file mode 100644 index 00000000..3ad545d2 --- /dev/null +++ b/db/knex_migrations/2024-03-15-0000-show-last-heartbeat.js @@ -0,0 +1,16 @@ +exports.up = function (knex) { + // Add new column status_page.show_last_heartbeat + return knex.schema + .alterTable("status_page", function (table) { + table.boolean("show_last_heartbeat").notNullable().defaultTo(false); + }); + +}; + +exports.down = function (knex) { + // Drop column status_page.show_last_heartbeat + return knex.schema + .alterTable("status_page", function (table) { + table.dropColumn("show_last_heartbeat"); + }); +}; diff --git a/server/model/status_page.js b/server/model/status_page.js index 01e4297d..26380e62 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -246,7 +246,7 @@ class StatusPage extends BeanModel { showPoweredBy: !!this.show_powered_by, googleAnalyticsId: this.google_analytics_tag_id, showCertificateExpiry: !!this.show_certificate_expiry, - hideUptimePercentage: !!this.hide_uptime_percentage + showLastHeartbeat: !!this.show_last_heartbeat }; } @@ -269,7 +269,7 @@ class StatusPage extends BeanModel { showPoweredBy: !!this.show_powered_by, googleAnalyticsId: this.google_analytics_tag_id, showCertificateExpiry: !!this.show_certificate_expiry, - hideUptimePercentage: !!this.hide_uptime_percentage + showLastHeartbeat: !!this.show_last_heartbeat }; } diff --git a/server/socket-handlers/status-page-socket-handler.js b/server/socket-handlers/status-page-socket-handler.js index d44b710a..e641b14d 100644 --- a/server/socket-handlers/status-page-socket-handler.js +++ b/server/socket-handlers/status-page-socket-handler.js @@ -163,7 +163,7 @@ module.exports.statusPageSocketHandler = (socket) => { statusPage.footer_text = config.footerText; statusPage.custom_css = config.customCSS; statusPage.show_powered_by = config.showPoweredBy; - statusPage.hide_uptime_percentage = config.hideUptimePercentage; + statusPage.show_last_heartbeat = config.showLastHeartbeat; statusPage.show_certificate_expiry = config.showCertificateExpiry; statusPage.modified_date = R.isoDateTime(); statusPage.google_analytics_tag_id = config.googleAnalyticsId; diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index aa143c39..a36d81af 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -38,7 +38,7 @@ - + {{ $t("showCertificateExpiry") }} - +
- - + +
@@ -325,7 +325,7 @@ 👀 {{ $t("statusPageNothing") }}
- +