X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fpages%2Fmonitoring%2Fmonitoring.component.ts;fp=webapp%2Fsrc%2Fapp%2Fpages%2Fsupervision%2Fsupervision.component.ts;h=ccbe365a9cc7287529b0e95c1b069d70a2a9e937;hb=refs%2Fheads%2Fsandbox%2FSebD%2Fdev_supervisor_als_2019;hp=3fff2b7bcac2138ccfb08ffbbc462f1a203fb20a;hpb=247bb7c2db5f0d48178398599348249bf886ebbc;p=src%2Fxds%2Fxds-agent.git diff --git a/webapp/src/app/pages/supervision/supervision.component.ts b/webapp/src/app/pages/monitoring/monitoring.component.ts similarity index 86% rename from webapp/src/app/pages/supervision/supervision.component.ts rename to webapp/src/app/pages/monitoring/monitoring.component.ts index 3fff2b7..ccbe365 100644 --- a/webapp/src/app/pages/supervision/supervision.component.ts +++ b/webapp/src/app/pages/monitoring/monitoring.component.ts @@ -1,6 +1,6 @@ /** * @license -* Copyright (C) 2017-2018 "IoT.bzh" +* Copyright (C) 2017-2019 "IoT.bzh" * Author Sebastien Douheret * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,13 +17,11 @@ */ import { Component, OnInit, Input } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; -import { Subject } from 'rxjs/Subject'; import { NbThemeService } from '@nebular/theme'; import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; import { ConfigService, IConfig } from '../../@core-xds/services/config.service'; -import { SupervisionService } from '../../@core-xds/services/supervision.service'; +import { MonitoringService } from '../../@core-xds/services/monitoring.service'; import { AlertService } from '../../@core-xds/services/alert.service'; export interface GrafanaDashboard { @@ -41,12 +39,12 @@ export interface GrafanaPanel { } @Component({ - selector: 'xds-supervision', - styleUrls: ['./supervision.component.scss'], - templateUrl: './supervision.component.html', + selector: 'xds-monitoring', + styleUrls: ['./monitoring.component.scss'], + templateUrl: './monitoring.component.html', }) -export class SupervisionComponent implements OnInit { +export class MonitoringComponent implements OnInit { /* TODO bind tm_* and refresh in UI */ @Input() theme = 'light'; @@ -59,17 +57,17 @@ export class SupervisionComponent implements OnInit { displayMode = 'dashboard'; private dashboards: Map = new Map([ - ['xds_supervisor', { name: 'AGL XDS Supervisor', shortname: 'agl-xds-supervisor' }], + ['xds_monitoring', { name: 'AGL XDS Monitoring', shortname: 'agl-xds-monitoring' }], ]); private panels: Map = new Map([ - ['table', { name: 'Supervisor traces table', index: '2' }], + ['table', { name: 'Monitoring traces table', index: '2' }], ['evt_data_bytes', { name: 'Requests & Events per second', index: '5' }], ['req_evts_per_sec', { name: 'Events Data bytes', index: '12' }], ]); constructor( - private supervisionSvr: SupervisionService, + private monitoringSvr: MonitoringService, private alert: AlertService, private themeService: NbThemeService, private sanitizer: DomSanitizer, @@ -129,7 +127,7 @@ export class SupervisionComponent implements OnInit { } private _initDashboard() { - // http://localhost:3000/d/Lbpwc6Iiz/agl-xds-supervisor?from=now-40s&to=now&refresh=5s + // http://localhost:3000/d/Lbpwc6Iiz/agl-xds-monitoring?from=now-40s&to=now&refresh=5s this.dashboards.forEach(dd => { dd.url = this._buildDashboardUrl(dd.shortname, this.tm_from, this.tm_to, this.refresh, this.theme); dd.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(dd.url); @@ -158,7 +156,7 @@ export class SupervisionComponent implements OnInit { } private _buildPanelUrl(idx, from, to, refresh, theme: string) { - let url = 'http://localhost:3000/d-solo/Lbpwc6Iiz/agl-xds-supervisor'; + let url = 'http://localhost:3000/d-solo/Lbpwc6Iiz/agl-xds-monitoring'; if (this.Config.grafanaDashboardUrl !== '') { url = this.Config.grafanaDashboardUrl; }