Browse Source
Feature/change uptime to last 90 days (#1993)
* Change uptime to last 90 days
* Update changelog
pull/1994/head
Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/info/info.service.ts
-
apps/client/src/app/pages/open/open-page.html
|
|
@ -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 |
|
|
|
|
|
|
|
|
|
@ -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, |
|
|
|
|
|
@ -109,6 +109,7 @@ |
|
|
|
<a class="d-block" href="https://status.ghostfol.io"> |
|
|
|
<gf-value |
|
|
|
size="large" |
|
|
|
subLabel="(Last 90 days)" |
|
|
|
[isPercent]="true" |
|
|
|
[locale]="user?.settings?.locale" |
|
|
|
[precision]="2" |
|
|
|