mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
refactor: change navigation
Signed-off-by: waterplea <alexander@inkin.ru>
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
switchMap,
|
||||
} from 'rxjs'
|
||||
import { EOSService } from 'src/app/services/eos.service'
|
||||
import { NotificationService } from 'src/app/services/notification.service'
|
||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
||||
import { ConnectionService } from 'src/app/services/connection.service'
|
||||
@@ -24,6 +25,7 @@ import { getManifest } from 'src/app/utils/get-package-data'
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BadgeService {
|
||||
private readonly notifications = inject(NotificationService)
|
||||
private readonly emver = inject(Emver)
|
||||
private readonly patch = inject(PatchDB<DataModel>)
|
||||
private readonly settings$ = combineLatest([
|
||||
@@ -85,6 +87,8 @@ export class BadgeService {
|
||||
return this.updates$
|
||||
case '/portal/system/settings':
|
||||
return this.settings$
|
||||
case '/portal/system/notifications':
|
||||
return this.notifications.unreadCount$
|
||||
default:
|
||||
return EMPTY
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import { inject, Injectable } from '@angular/core'
|
||||
import { Observable, retry, shareReplay } from 'rxjs'
|
||||
import { Metrics } from 'src/app/services/api/api.types'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class MetricsService extends Observable<Metrics> {
|
||||
// @TODO get real url, 'rpc/{guid}' or something like that
|
||||
private readonly metrics$ = inject(ApiService)
|
||||
.openMetricsWebsocket$({
|
||||
url: '',
|
||||
})
|
||||
.pipe(retry(), shareReplay(1))
|
||||
|
||||
constructor() {
|
||||
super(subscriber => this.metrics$.subscribe(subscriber))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user