Kuma/db/knex_migrations/2025-06-14-0000-heartbeat-range-config.js
Doruk ad713eda4b feat: Add configurable heartbeat bar range for status pages
Add a configurable range option (7/30/60/90/180/365 days) for heartbeat bars on status pages.
This allows status page owners to customize how much historical data is shown to visitors.

Changes:
- Add database migration for heartbeat_bar_range_days column
- Update StatusPage model to include heartbeat bar range setting
- Modify heartbeat API endpoint to respect configured range
- Add UI controls in status page editor for range selection
- Update English translations for new settings
- Default to 90 days for backward compatibility

Resolves #1888
2025-06-14 01:06:53 +02:00

12 lines
370 B
JavaScript

exports.up = function (knex) {
return knex.schema
.alterTable("status_page", function (table) {
table.integer("heartbeat_bar_range_days").defaultTo(90).unsigned();
});
};
exports.down = function (knex) {
return knex.schema.alterTable("status_page", function (table) {
table.dropColumn("heartbeat_bar_range_days");
});
};