mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
just set this.metrics
This commit is contained in:
committed by
Aiden McClelland
parent
25775ab2a1
commit
4d86d13e48
@@ -54,15 +54,7 @@ export class ServerMetricsPage {
|
|||||||
|
|
||||||
private async getMetrics (): Promise<void> {
|
private async getMetrics (): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const metrics = await this.embassyApi.getServerMetrics({ })
|
this.metrics = await this.embassyApi.getServerMetrics({ })
|
||||||
Object.entries(metrics).forEach(([groupKey, groupVal]) => {
|
|
||||||
if (!this.metrics[groupKey]) {
|
|
||||||
this.metrics[groupKey] = groupVal
|
|
||||||
}
|
|
||||||
Object.entries(groupVal).forEach(([key, val]) => {
|
|
||||||
this.metrics[groupKey][key] = val
|
|
||||||
})
|
|
||||||
})
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.errToast.present(e)
|
this.errToast.present(e)
|
||||||
this.stopDaemon()
|
this.stopDaemon()
|
||||||
|
|||||||
Reference in New Issue
Block a user