feat: refactor metrics (#2861)

This commit is contained in:
Alex Inkin
2025-04-01 00:22:54 +04:00
committed by GitHub
parent 1883c9666e
commit f51dcf23d6
12 changed files with 395 additions and 248 deletions

View File

@@ -1,14 +1,6 @@
import { inject, Injectable } from '@angular/core'
import { PatchDB } from 'patch-db-client'
import {
combineLatest,
defer,
map,
shareReplay,
startWith,
switchMap,
timer,
} from 'rxjs'
import { combineLatest, defer, map, shareReplay, switchMap, timer } from 'rxjs'
import { ApiService } from 'src/app/services/api/embassy-api.service'
import { DataModel } from 'src/app/services/patch-db/data-model'
@@ -44,9 +36,7 @@ export class TimeService {
const hoursSec = uptime % (60 * 60)
const minutes = Math.floor(hoursSec / 60)
const seconds = uptime % 60
return `${days}:${hours}:${minutes}:${seconds}`
return { days, hours, minutes, seconds }
}),
startWith('-:-:-:-'),
)
}