diff options
Diffstat (limited to 'webapp/src/app')
16 files changed, 339 insertions, 179 deletions
diff --git a/webapp/src/app/@core-xds/services/@core-xds-services.module.ts b/webapp/src/app/@core-xds/services/@core-xds-services.module.ts index 6a4eb3c..b3606ec 100644 --- a/webapp/src/app/@core-xds/services/@core-xds-services.module.ts +++ b/webapp/src/app/@core-xds/services/@core-xds-services.module.ts @@ -23,7 +23,7 @@ import { AlertService } from './alert.service'; import { ConfigService } from './config.service'; import { ProjectService } from './project.service'; import { SdkService } from './sdk.service'; -import { SupervisionService } from './supervision.service'; +import { MonitoringService } from './monitoring.service'; import { TargetService } from './target.service'; import { UserService } from './users.service'; import { XDSConfigService } from './xds-config.service'; @@ -34,7 +34,7 @@ const SERVICES = [ ConfigService, ProjectService, SdkService, - SupervisionService, + MonitoringService, TargetService, UserService, XDSConfigService, diff --git a/webapp/src/app/@core-xds/services/monitoring.service.ts b/webapp/src/app/@core-xds/services/monitoring.service.ts new file mode 100644 index 0000000..a606909 --- /dev/null +++ b/webapp/src/app/@core-xds/services/monitoring.service.ts @@ -0,0 +1,106 @@ +/** +* @license +* Copyright (C) 2018-2019 "IoT.bzh" +* Author Sebastien Douheret <sebastien@iot.bzh> +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs/Observable'; + +import { XDSAgentService } from './xdsagent.service'; +import { map } from 'rxjs/operators'; + +export interface AglTopology { + name: string; + pid: number; + disabled: boolean; + isClient: boolean; + isServer: boolean; + ws_clients: string[]; + ws_servers: string[]; + apis: any; +} + +export interface AglLowCollectorConfig { + time?: number; +} + +@Injectable() +export class MonitoringService { + + constructor(private xdsSvr: XDSAgentService) { + /* + this.xdsSvr.XdsConfig$.subscribe(cfg => { + if (!cfg || cfg.servers.length < 1) { + return; + } + }); + */ + } + + getTopo(): Observable<AglTopology[]> { + return this.xdsSvr.getTopoMonitoring().pipe( + map((tp: AglTopology[]) => { + // FIXME - move filter on backend side + const ignored: string[] = [ + 'agl-low-collector', + 'harvester', + ]; + + tp.forEach(el => { + el.disabled = false; + ignored.forEach(iel => { + if (el.name.indexOf(iel) !== -1) { + el.disabled = true; + } + }); + + // replace unix:/run/xxx/ws by nothing + const wsc: string[] = []; + el.ws_clients.forEach(s => { + s = s.replace('unix:/run/platform/apis/ws/', ''); + s = s.replace('unix:/run/user/1001/apis/ws/', ''); + s = s.replace('unix:/run/user/0/apis/ws/', ''); + wsc.push(s); + }); + el.ws_clients = wsc; + // replace sd: by nothing + const wss: string[] = []; + el.ws_servers.forEach(s => { + wss.push(s.replace('sd:', '')); + }); + el.ws_servers = wss; + }); + return tp; + }) + ); + } + + startTrace(cfg: any): Observable<any> { + return this.xdsSvr.startTraceMonitoring(cfg); + } + + stopTrace(cfg: any): Observable<any> { + return this.xdsSvr.stopTraceMonitoring(cfg); + } + + startLowCollector(cfg: AglLowCollectorConfig): Observable<any> { + return this.xdsSvr.startLowCollector(cfg); + } + + stopLowCollector(): Observable<any> { + return this.xdsSvr.stopLowCollector(); + } +} diff --git a/webapp/src/app/@core-xds/services/supervision.service.ts b/webapp/src/app/@core-xds/services/supervision.service.ts deleted file mode 100644 index 4a9f578..0000000 --- a/webapp/src/app/@core-xds/services/supervision.service.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** -* @license -* Copyright (C) 2018 "IoT.bzh" -* Author Sebastien Douheret <sebastien@iot.bzh> -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import { Injectable, SecurityContext, isDevMode } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; - -import { XDSAgentService } from '../services/xdsagent.service'; - -export interface AglTopology { - name: string; - pid: number; - isClient: boolean; - isServer: boolean; - ws_clients: string[]; - ws_servers: string[]; - apis: any; -} - -@Injectable() -export class SupervisionService { - - private curServerID; - - constructor(private xdsSvr: XDSAgentService) { - /* - this.xdsSvr.XdsConfig$.subscribe(cfg => { - if (!cfg || cfg.servers.length < 1) { - return; - } - }); - */ - } - - getTopo(): Observable<AglTopology[]> { - return this.xdsSvr.getTopoSupervisor(); - } - - startTrace(cfg: any): Observable<any> { - return this.xdsSvr.startTraceSupervisor(cfg); - } - - stopTrace(cfg: any): Observable<any> { - return this.xdsSvr.stopTraceSupervisor(cfg); - } - -} diff --git a/webapp/src/app/@core-xds/services/xdsagent.service.ts b/webapp/src/app/@core-xds/services/xdsagent.service.ts index 002c84b..35abe46 100644 --- a/webapp/src/app/@core-xds/services/xdsagent.service.ts +++ b/webapp/src/app/@core-xds/services/xdsagent.service.ts @@ -1,6 +1,6 @@ /** * @license -* Copyright (C) 2017-2018 "IoT.bzh" +* Copyright (C) 2017-2019 "IoT.bzh" * Author Sebastien Douheret <sebastien@iot.bzh> * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -666,18 +666,33 @@ export class XDSAgentService { } /*** - ** Supervision + ** Monitoring ***/ - getTopoSupervisor(): Observable<any> { - return this._get('/supervisor/topo'); + getTopoMonitoring(): Observable<any> { + return this._get('/monitoring/topo'); } - startTraceSupervisor(cfg: any): Observable<any> { - return this._post('/supervisor/trace/start', cfg); + startTraceMonitoring(cfg: any): Observable<any> { + return this._post('/monitoring/trace/start', cfg); } - stopTraceSupervisor(cfg: any): Observable<any> { - return this._post('/supervisor/trace/stop', cfg); + stopTraceMonitoring(cfg: any): Observable<any> { + return this._post('/monitoring/trace/stop', cfg); + } + + /*** + ** AGL Low Collector + ***/ + startLowCollector(cfg: any): Observable<any> { + return this._post('/monitoring/alc/start', cfg); + } + + stopLowCollector(): Observable<any> { + return this._post('/monitoring/alc/stop', {}); + } + + resetLowCollector(): Observable<any> { + return this._post('/monitoring/alc/reset', {}); } /** @@ -692,7 +707,7 @@ export class XDSAgentService { error => { this.alert.error('ERROR while registering to all events: ' + error); }, - ); + ); } private _getServer(ID: string): IXDServerCfg { diff --git a/webapp/src/app/pages/config/config-global/config-global.component.html b/webapp/src/app/pages/config/config-global/config-global.component.html index c3bc8b4..3ae77d9 100644 --- a/webapp/src/app/pages/config/config-global/config-global.component.html +++ b/webapp/src/app/pages/config/config-global/config-global.component.html @@ -26,7 +26,7 @@ <div class="col-md-12"> <nb-card> - <nb-card-header>Supervision Configuration</nb-card-header> + <nb-card-header>Monitoring Configuration</nb-card-header> <nb-card-body> <form (ngSubmit)="onSubmit()" #ConfigGlobalForm="ngForm"> <div class="form-group row"> diff --git a/webapp/src/app/pages/monitoring/monitoring-config.component.html b/webapp/src/app/pages/monitoring/monitoring-config.component.html new file mode 100644 index 0000000..ed76dd0 --- /dev/null +++ b/webapp/src/app/pages/monitoring/monitoring-config.component.html @@ -0,0 +1,77 @@ +<div class="row col-md-12"> + <div class="col-md-2" style="display: inherit;"> + <h3 style="margin-top: auto; margin-bottom: auto">Configuration</h3> + </div> + <div class="col-md-1"> + <nb-card-body> + <div class="col-md-9"> + <nb-actions size="small"> + <nb-action> + <button id="refresh-topo" (click)="getAGLTopo()"> + <i class="fa fa-refresh"></i> + </button> + </nb-action> + </nb-actions> + </div> + </nb-card-body> + </div> + + <div class="col-md-8" style="text-align: right;"> + <label>Monitoring actions</label> + <button id="start-trace" class="btn btn-primary" (click)="onStartTrace()" [disabled]=" + isStartBtnDisable()">{{ starting ?"Starting... ":"Start" }} + <span *ngIf="starting" class="fa fa-gear faa-spin animated fa-size-x2"></span> + </button> + + <button id="stop-trace" class="btn btn-primary" (click)="onStopTrace()" [disabled]=" + isStopBtnDisable()">{{ stopping ?"Stopping... ":"Stop" }} + <span *ngIf="stopping" class="fa fa-gear faa-spin animated fa-size-x2"></span> + </button> + + <button id="show-graph" class="btn btn-primary" (click)="showGraph()"> + Show Graph + </button> + </div> +</div> +<div class="row col-md-12"> + <table class="table table-striped" style="color:black;"> + <tbody> + <tr> + <th>Name</th> + <th style="width: 6rem;">Pid</th> + <th>WS Clients</th> + <th>WS Servers</th> + <th style="width: 6rem;">Monitor</th> + </tr> + <ng-container *ngIf="aglTopoInit; else loading"> + <ng-container *ngIf="daemonCheckboxes?.length; else noItems"> + <tr *ngFor="let tp of daemonCheckboxes"> + <td *ngFor="let col of ['name', 'pid', 'ws_clients', 'ws_servers']"> + {{tp.topo[col]}} + </td> + <td style="text-align: center;"> + <ng-container *ngIf="!tp.topo.disabled else disableTopo"> + <nb-checkbox indeterminate [(ngModel)]="tp.value"></nb-checkbox> + </ng-container> + <ng-template #disableTopo> + <span style="font-size: smaller; color: grey; font-style: italic;">DISABLED + </span> + </ng-template> + </td> + </tr> + </ng-container> + <ng-template #noItems>No Items!</ng-template> + <ng-template #loading>loading...</ng-template> + </ng-container> + <ng-template #loading>loading...</ng-template> + </tbody> + </table> +</div> + +<div class="row col-md-6" style="display: inherit;"> + <h3 style="margin-top: auto; margin-bottom: auto">AGL Bindings Topology</h3> +</div> +<div class="row col-md-12" style=""> + <svg id="graph" width="100%" height="800"> + </svg> +</div> diff --git a/webapp/src/app/pages/supervision/supervision-config.component.scss b/webapp/src/app/pages/monitoring/monitoring-config.component.scss index 7b8d318..614f79d 100644 --- a/webapp/src/app/pages/supervision/supervision-config.component.scss +++ b/webapp/src/app/pages/monitoring/monitoring-config.component.scss @@ -101,6 +101,14 @@ button#refresh-topo { } } +table { + table-layout: fixed; +} + +td { + word-wrap:break-word; +} + button#start-trace { margin-top: 10px; margin-left: 10px; @@ -111,6 +119,11 @@ button#stop-trace { margin-left: 10px; } +button#show-graph { + margin-top: 10px; + margin-left: 10px; +} + #ws-client { fill: green; } diff --git a/webapp/src/app/pages/supervision/supervision-config.component.ts b/webapp/src/app/pages/monitoring/monitoring-config.component.ts index e96b936..2a5a84b 100644 --- a/webapp/src/app/pages/supervision/supervision-config.component.ts +++ b/webapp/src/app/pages/monitoring/monitoring-config.component.ts @@ -1,6 +1,6 @@ /** * @license -* Copyright (C) 2017-2018 "IoT.bzh" +* Copyright (C) 2017-2019 "IoT.bzh" * Author Sebastien Douheret <sebastien@iot.bzh> * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,30 +16,33 @@ * limitations under the License. */ -import { Component, OnInit, AfterViewInit, ViewEncapsulation } from '@angular/core'; -import { Injectable, Inject } from '@angular/core'; +import { Component, OnInit, AfterViewInit, ViewEncapsulation, Inject } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import * as d3 from 'd3'; +import { Router } from '@angular/router'; -import { SupervisionService, AglTopology } from '../../@core-xds/services/supervision.service'; +import { MonitoringService, AglTopology } from '../../@core-xds/services/monitoring.service'; import { AlertService } from '../../@core-xds/services/alert.service'; +import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { Subscription } from 'rxjs/Subscription'; interface WsCheckbox { - name: string; - pid: number; + topo: AglTopology; value: boolean; - disabled: boolean; tooltip: string; } @Component({ - selector: 'xds-supervision', - styleUrls: ['./supervision-config.component.scss'], - templateUrl: './supervision-config.component.html', + selector: 'xds-monitoring', + styleUrls: ['./monitoring-config.component.scss'], + templateUrl: './monitoring-config.component.html', encapsulation: ViewEncapsulation.None, // workaround about https://github.com/angular/angular/issues/7845 }) -export class SupervisionConfigComponent implements OnInit, AfterViewInit { +export class MonitoringConfigComponent implements OnInit, AfterViewInit { + aglTopoInit = new BehaviorSubject(false); + // FIXME: use Map instead of array and use '| keyvalue' for ngfor loop (but angular > 6.1 requested) + // daemonCheckboxes: Map<string, WsCheckbox> = new Map<string, WsCheckbox>(); daemonCheckboxes: WsCheckbox[] = []; starting = false; stopping = false; @@ -47,26 +50,32 @@ export class SupervisionConfigComponent implements OnInit, AfterViewInit { private graph: any; private svg: any; private links = []; + private _aglTopoSub: Subscription; constructor(@Inject(DOCUMENT) private document: Document, - private supervisorSvr: SupervisionService, + private router: Router, + private monitoringSvr: MonitoringService, private alert: AlertService, ) { } ngOnInit() { - } ngAfterViewInit() { this.getAGLTopo(); + this.aglTopoInit.next(true); } getAGLTopo() { - this.supervisorSvr.getTopo().subscribe(topo => { + if (this._aglTopoSub !== undefined) { + this._aglTopoSub.unsubscribe(); + } + + this._aglTopoSub = this.monitoringSvr.getTopo().subscribe(topo => { this.graphAGLBindings(topo); - this.updateCheckboxes(topo); + this.createCheckboxes(topo); }); } @@ -74,11 +83,21 @@ export class SupervisionConfigComponent implements OnInit, AfterViewInit { this.starting = true; const dmArr = []; - this.daemonCheckboxes.forEach(dm => dm.value && dmArr.push(dm.pid)); + this.daemonCheckboxes.forEach(dm => dm.value && dmArr.push(dm.topo.pid)); + + this.monitoringSvr.startTrace({ pids: dmArr }).subscribe(res => { + // console.log('Trace Started: res', res); + + this.monitoringSvr.startLowCollector(null).subscribe((/*res*/) => { + // console.log('Low Collector Started: res', res); + this.alert.info('Monitoring successfully started'); + this.starting = false; + + }, err => { + this.starting = false; + this.alert.error(err); + }); - this.supervisorSvr.startTrace({ pids: dmArr }).subscribe(res => { - this.starting = false; - this.alert.info('Monitoring successfully started'); }, err => { this.starting = false; this.alert.error(err); @@ -87,15 +106,29 @@ export class SupervisionConfigComponent implements OnInit, AfterViewInit { onStopTrace() { this.stopping = true; - this.supervisorSvr.stopTrace({}).subscribe(res => { - this.stopping = false; - this.alert.info('Monitoring successfully stopped'); + this.monitoringSvr.stopTrace({}).subscribe(res => { + // console.log('Trace Stopped: res', res); + + this.monitoringSvr.stopLowCollector().subscribe((/*res*/) => { + // console.log('Low Collector Stopped: res', res); + this.alert.info('Monitoring successfully started'); + this.stopping = false; + + }, err => { + this.stopping = false; + this.alert.error(err); + }); + }, err => { this.stopping = false; this.alert.error(err); }); } + showGraph() { + this.router.navigate([`/pages/monitoring/graph`]); + } + isStartBtnDisable(): boolean { return this.starting; } @@ -104,18 +137,42 @@ export class SupervisionConfigComponent implements OnInit, AfterViewInit { return this.stopping; } - private updateCheckboxes(topo: AglTopology[]) { - this.daemonCheckboxes = []; + isDaemonDisabled(name: string): boolean { + let sts = false; + // FIXME - better to use map + // with Map + // if (this.daemonCheckboxes.has(name)) { + // sts = this.daemonCheckboxes[name].value; + // } + this.daemonCheckboxes.forEach(e => { + if (e.topo.name === name) { + sts = true; + } + }); + return sts; + } + + private createCheckboxes(topo: AglTopology[]) { + + // let newDaemonChB: Map<string, WsCheckbox> = new Map<string, WsCheckbox>(); + const newDaemonChB: WsCheckbox[] = []; + let prevVal = false; + this.daemonCheckboxes.forEach(e => { + if (e.topo.name === name) { + prevVal = e.value; + } + }); topo.forEach(elem => { - this.daemonCheckboxes.push({ - name: elem.name, - pid: elem.pid, - value: false, - disabled: false, - tooltip: 'Daemon ' + elem.name + ' (pid ' + elem.pid + ')', + // with Map + // newDaemonChB.set(elem.name, { + newDaemonChB.push({ + topo: Object.assign({}, elem), + value: prevVal, + tooltip: 'Daemon binding ' + elem.name + ' (pid ' + elem.pid + ')', }); }); + this.daemonCheckboxes = newDaemonChB; } diff --git a/webapp/src/app/pages/supervision/supervision.component.html b/webapp/src/app/pages/monitoring/monitoring.component.html index 0db8ec8..c46817f 100644 --- a/webapp/src/app/pages/supervision/supervision.component.html +++ b/webapp/src/app/pages/monitoring/monitoring.component.html @@ -64,6 +64,6 @@ <!-- Display mode: using dashboard --> <div class="row" *ngIf="displayMode==='dashboard'"> <div class="col-md-12"> - <iframe [src]="getDashboard('xds_supervisor')" width="100%" height="800px" frameborder="0"></iframe> + <iframe [src]="getDashboard('xds_monitoring')" width="100%" height="800px" frameborder="0"></iframe> </div> </div> diff --git a/webapp/src/app/pages/supervision/supervision.component.scss b/webapp/src/app/pages/monitoring/monitoring.component.scss index a125e8d..a125e8d 100644 --- a/webapp/src/app/pages/supervision/supervision.component.scss +++ b/webapp/src/app/pages/monitoring/monitoring.component.scss diff --git a/webapp/src/app/pages/supervision/supervision.component.ts b/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 <sebastien@iot.bzh> * * 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<string, GrafanaDashboard> = new Map<string, GrafanaDashboard>([ - ['xds_supervisor', { name: 'AGL XDS Supervisor', shortname: 'agl-xds-supervisor' }], + ['xds_monitoring', { name: 'AGL XDS Monitoring', shortname: 'agl-xds-monitoring' }], ]); private panels: Map<string, GrafanaPanel> = new Map<string, GrafanaPanel>([ - ['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; } diff --git a/webapp/src/app/pages/supervision/supervision.module.ts b/webapp/src/app/pages/monitoring/monitoring.module.ts index 4c1cb0b..0f8331f 100644 --- a/webapp/src/app/pages/supervision/supervision.module.ts +++ b/webapp/src/app/pages/monitoring/monitoring.module.ts @@ -19,8 +19,8 @@ import { NgModule } from '@angular/core'; import { ThemeModule } from '../../@theme/theme.module'; -import { SupervisionComponent } from './supervision.component'; -import { SupervisionConfigComponent } from './supervision-config.component'; +import { MonitoringComponent } from './monitoring.component'; +import { MonitoringConfigComponent } from './monitoring-config.component'; @NgModule({ @@ -28,10 +28,10 @@ import { SupervisionConfigComponent } from './supervision-config.component'; ThemeModule, ], declarations: [ - SupervisionComponent, - SupervisionConfigComponent, + MonitoringComponent, + MonitoringConfigComponent, ], entryComponents: [ ], }) -export class SupervisionModule { } +export class MonitoringModule { } diff --git a/webapp/src/app/pages/pages-menu.ts b/webapp/src/app/pages/pages-menu.ts index 230966d..771c798 100644 --- a/webapp/src/app/pages/pages-menu.ts +++ b/webapp/src/app/pages/pages-menu.ts @@ -86,17 +86,17 @@ export const MENU_ITEMS: NbMenuItem[] = [ ], }, { - title: 'Supervision / Monitoring', + title: 'Monitoring', icon: 'fa fa-bar-chart', - link: '/pages/supervision', + link: '/pages/monitoring', children: [ { title: 'Config', - link: '/pages/supervision/config', + link: '/pages/monitoring/config', }, { title: 'Graph', - link: '/pages/supervision/graph', + link: '/pages/monitoring/graph', }, ], }, diff --git a/webapp/src/app/pages/pages-routing.module.ts b/webapp/src/app/pages/pages-routing.module.ts index ae2ef4a..c63d496 100644 --- a/webapp/src/app/pages/pages-routing.module.ts +++ b/webapp/src/app/pages/pages-routing.module.ts @@ -27,8 +27,8 @@ import { SdkManagementComponent } from './sdks/sdk-management/sdk-management.com import { TargetsComponent } from './targets/targets.component'; import { TerminalsComponent } from './targets/terminals/terminals.component'; import { BuildComponent } from './build/build.component'; -import { SupervisionComponent } from './supervision/supervision.component'; -import { SupervisionConfigComponent } from './supervision/supervision-config.component'; +import { MonitoringComponent } from './monitoring/monitoring.component'; +import { MonitoringConfigComponent } from './monitoring/monitoring-config.component'; const routes: Routes = [{ path: '', @@ -55,11 +55,11 @@ const routes: Routes = [{ path: 'targets/term', component: TerminalsComponent, }, { - path: 'supervision/config', - component: SupervisionConfigComponent, + path: 'monitoring/config', + component: MonitoringConfigComponent, }, { - path: 'supervision/graph', - component: SupervisionComponent, + path: 'monitoring/graph', + component: MonitoringComponent, }, { path: 'config', loadChildren: './config/config.module#ConfigModule', diff --git a/webapp/src/app/pages/pages.module.ts b/webapp/src/app/pages/pages.module.ts index 5ffa8d6..3481599 100644 --- a/webapp/src/app/pages/pages.module.ts +++ b/webapp/src/app/pages/pages.module.ts @@ -26,7 +26,7 @@ import { DashboardModule } from './dashboard/dashboard.module'; import { BuildModule } from './build/build.module'; import { ProjectsModule } from './projects/projects.module'; import { SdksModule } from './sdks/sdks.module'; -import { SupervisionModule } from './supervision/supervision.module'; +import { MonitoringModule } from './monitoring/monitoring.module'; import { TargetsModule } from './targets/targets.module'; import { PagesRoutingModule } from './pages-routing.module'; import { NotificationsComponent } from './notifications/notifications.component'; @@ -49,7 +49,7 @@ const PAGES_COMPONENTS = [ SdksModule, ToasterModule, TargetsModule, - SupervisionModule, + MonitoringModule, ], declarations: [ ...PAGES_COMPONENTS, diff --git a/webapp/src/app/pages/supervision/supervision-config.component.html b/webapp/src/app/pages/supervision/supervision-config.component.html deleted file mode 100644 index 1fbcd70..0000000 --- a/webapp/src/app/pages/supervision/supervision-config.component.html +++ /dev/null @@ -1,45 +0,0 @@ -<div class="row"> - <h3 style="margin-top: auto; margin-bottom: auto">Configuration</h3> - - <div class="row"> - <div class="col-md-12"> - <nb-card-body> - <div class="col-md-9"> - <nb-actions size="small"> - <nb-action> - <button id="refresh-topo" (click)="getAGLTopo()"> - <i class="fa fa-refresh"></i> - </button> - </nb-action> - </nb-actions> - </div> - </nb-card-body> - </div> - </div> -</div> -<div class="row"> - <div class="col-md-10"> - <svg id="graph" width="100%" height="500"> - </svg> - </div> - <div class="col-md-2"> - <div> - <label>Daemons to monitor</label> - </div> - <nb-checkbox *ngFor="let wsCkx of daemonCheckboxes" [disabled]="wsCkx.disabled" [(ngModel)]="wsCkx.value">{{wsCkx.name}} - </nb-checkbox> - <div style="margin-top: 20px;"> - <div> - <label>Monitoring actions:</label> - </div> - <button id="start-trace" class="btn btn-primary" (click)="onStartTrace()" [disabled]=" - isStartBtnDisable()">{{ starting ?"Starting... ":"Start" }} - <span *ngIf="starting" class="fa fa-gear faa-spin animated fa-size-x2"></span> - </button> - <button id="stop-trace" class="btn btn-primary" (click)="onStopTrace()" [disabled]=" - isStopBtnDisable()">{{ stopping ?"Stopping... ":"Stop" }} - <span *ngIf="stopping" class="fa fa-gear faa-spin animated fa-size-x2"></span> - </button> - </div> - </div> -</div> |