mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-19 18:56:48 +02:00

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
12 lines
370 B
JavaScript
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");
|
|
});
|
|
};
|