Feature/change uptime to last 90 days (#1993)
* Change uptime to last 90 days * Update changelog
This commit is contained in:
parent
86296b3591
commit
655a68a847
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Improved the local number formatting in the value component
|
- Improved the local number formatting in the value component
|
||||||
|
- Changed the uptime to the last 90 days on the _Open Startup_ (`/open`) page
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ import {
|
|||||||
ghostfolioFearAndGreedIndexDataSource
|
ghostfolioFearAndGreedIndexDataSource
|
||||||
} from '@ghostfolio/common/config';
|
} from '@ghostfolio/common/config';
|
||||||
import {
|
import {
|
||||||
|
DATE_FORMAT,
|
||||||
encodeDataSource,
|
encodeDataSource,
|
||||||
extractNumberFromString
|
extractNumberFromString
|
||||||
} from '@ghostfolio/common/helper';
|
} from '@ghostfolio/common/helper';
|
||||||
@ -31,7 +32,7 @@ import { Injectable, Logger } from '@nestjs/common';
|
|||||||
import { JwtService } from '@nestjs/jwt';
|
import { JwtService } from '@nestjs/jwt';
|
||||||
import * as bent from 'bent';
|
import * as bent from 'bent';
|
||||||
import * as cheerio from 'cheerio';
|
import * as cheerio from 'cheerio';
|
||||||
import { subDays } from 'date-fns';
|
import { format, subDays } from 'date-fns';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class InfoService {
|
export class InfoService {
|
||||||
@ -346,7 +347,10 @@ export class InfoService {
|
|||||||
)) as string;
|
)) as string;
|
||||||
|
|
||||||
const get = bent(
|
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',
|
'GET',
|
||||||
'json',
|
'json',
|
||||||
200,
|
200,
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
<a class="d-block" href="https://status.ghostfol.io">
|
<a class="d-block" href="https://status.ghostfol.io">
|
||||||
<gf-value
|
<gf-value
|
||||||
size="large"
|
size="large"
|
||||||
|
subLabel="(Last 90 days)"
|
||||||
[isPercent]="true"
|
[isPercent]="true"
|
||||||
[locale]="user?.settings?.locale"
|
[locale]="user?.settings?.locale"
|
||||||
[precision]="2"
|
[precision]="2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user