Add LowCollector & rename Supervisor to Monitoring
[src/xds/xds-agent.git] / webapp / src / app / @core-xds / services / xdsagent.service.ts
index 002c84b..35abe46 100644 (file)
@@ -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 {