Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement very crude and bare-bones RSS feed #5047

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: look for DOWN heartbeats instead of falsy
  • Loading branch information
MrYakobo committed Aug 26, 2024
commit 35349aa97c84b8f2c29e0fee0ef031a81261e6d7
6 changes: 3 additions & 3 deletions server/model/status_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { marked } = require("marked");
const { Feed } = require("feed");
const config = require("../config");

const { STATUS_PAGE_ALL_DOWN, STATUS_PAGE_ALL_UP, STATUS_PAGE_MAINTENANCE, STATUS_PAGE_PARTIAL_DOWN, UP, MAINTENANCE } = require("../../src/util");
const { STATUS_PAGE_ALL_DOWN, STATUS_PAGE_ALL_UP, STATUS_PAGE_MAINTENANCE, STATUS_PAGE_PARTIAL_DOWN, UP, MAINTENANCE, DOWN } = require("../../src/util");

class StatusPage extends BeanModel {

Expand Down Expand Up @@ -246,8 +246,8 @@ class StatusPage extends BeanModel {
let status = StatusPage.overallStatus(heartbeats);
let statusDescription = StatusPage.getStatusDescription(status);

// keep only falsy heartbeats in the RSS feed
heartbeats = heartbeats.filter(heartbeat => !heartbeat.status);
// keep only DOWN heartbeats in the RSS feed
heartbeats = heartbeats.filter(heartbeat => heartbeat.status === DOWN);

return {
heartbeats,
Expand Down
Loading