diff --git a/CHANGELOG.md b/CHANGELOG.md index 87ee49484..695f93110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Improved the local number formatting in the value component +- Changed the uptime to the last 90 days on the _Open Startup_ (`/open`) page ### Fixed diff --git a/apps/api/src/app/info/info.service.ts b/apps/api/src/app/info/info.service.ts index 8af8e6ee2..187135a35 100644 --- a/apps/api/src/app/info/info.service.ts +++ b/apps/api/src/app/info/info.service.ts @@ -17,6 +17,7 @@ import { ghostfolioFearAndGreedIndexDataSource } from '@ghostfolio/common/config'; import { + DATE_FORMAT, encodeDataSource, extractNumberFromString } from '@ghostfolio/common/helper'; @@ -31,7 +32,7 @@ import { Injectable, Logger } from '@nestjs/common'; import { JwtService } from '@nestjs/jwt'; import * as bent from 'bent'; import * as cheerio from 'cheerio'; -import { subDays } from 'date-fns'; +import { format, subDays } from 'date-fns'; @Injectable() export class InfoService { @@ -346,7 +347,10 @@ export class InfoService { )) as string; const get = bent( - `https://betteruptime.com/api/v2/monitors/${monitorId}/sla`, + `https://betteruptime.com/api/v2/monitors/${monitorId}/sla?from=${format( + subDays(new Date(), 90), + DATE_FORMAT + )}&to${format(new Date(), DATE_FORMAT)}`, 'GET', 'json', 200, diff --git a/apps/client/src/app/pages/open/open-page.html b/apps/client/src/app/pages/open/open-page.html index 81b4dcd4e..62503e387 100644 --- a/apps/client/src/app/pages/open/open-page.html +++ b/apps/client/src/app/pages/open/open-page.html @@ -109,6 +109,7 @@