diff --git a/pkg/webui/webserver.go b/pkg/webui/webserver.go index fb6338a8..204b2c74 100644 --- a/pkg/webui/webserver.go +++ b/pkg/webui/webserver.go @@ -168,7 +168,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Post("/login", bind(UserLogin{}), myLoginHandler) m.Post("/logout", myLogoutHandler) - m.Group("/metric", func() { + m.Group("/api/cfg/metric", func() { m.Get("/", reqSignedIn, GetMetrics) m.Post("/", reqSignedIn, bind(config.SnmpMetricCfg{}), AddMetric) m.Put("/:id", reqSignedIn, bind(config.SnmpMetricCfg{}), UpdateMetric) @@ -177,7 +177,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Get("/checkondel/:id", reqSignedIn, GetMetricsAffectOnDel) }) - m.Group("/measurement", func() { + m.Group("/api/cfg/measurement", func() { m.Get("/", reqSignedIn, GetMeas) m.Get("/type/:type", reqSignedIn, GetMeasByType) m.Post("/", reqSignedIn, bind(config.MeasurementCfg{}), AddMeas) @@ -187,7 +187,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Get("/checkondel/:id", reqSignedIn, GetMeasAffectOnDel) }) - m.Group("/measgroups", func() { + m.Group("/api/cfg/measgroup", func() { m.Get("/", reqSignedIn, GetMeasGroup) m.Post("/", reqSignedIn, bind(config.MGroupsCfg{}), AddMeasGroup) m.Put("/:id", reqSignedIn, bind(config.MGroupsCfg{}), UpdateMeasGroup) @@ -196,7 +196,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Get("/checkondel/:id", reqSignedIn, GetMeasGroupsAffectOnDel) }) - m.Group("/measfilters", func() { + m.Group("/api/cfg/measfilters", func() { m.Get("/", reqSignedIn, GetMeasFilter) m.Post("/", reqSignedIn, bind(config.MeasFilterCfg{}), AddMeasFilter) m.Put("/:id", reqSignedIn, bind(config.MeasFilterCfg{}), UpdateMeasFilter) @@ -205,7 +205,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Get("/checkondel/:id", reqSignedIn, GetMeasFiltersAffectOnDel) }) - m.Group("/influxservers", func() { + m.Group("/api/cfg/influxservers", func() { m.Get("/", reqSignedIn, GetInfluxServer) m.Post("/", reqSignedIn, bind(config.InfluxCfg{}), AddInfluxServer) m.Put("/:id", reqSignedIn, bind(config.InfluxCfg{}), UpdateInfluxServer) @@ -215,7 +215,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin }) // Data sources - m.Group("/snmpdevice", func() { + m.Group("/api/cfg/snmpdevice", func() { m.Get("/", reqSignedIn, GetSNMPDevices) m.Post("/", reqSignedIn, bind(config.SnmpDeviceCfg{}), AddSNMPDevice) m.Put("/:id", reqSignedIn, bind(config.SnmpDeviceCfg{}), UpdateSNMPDevice) @@ -224,7 +224,7 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Get("/checkondel/:id", reqSignedIn, GetSNMPDevicesAffectOnDel) }) - m.Group("/customfilter", func() { + m.Group("/api/cfg/customfilter", func() { m.Get("/", reqSignedIn, GetCustomFilter) m.Post("/", reqSignedIn, bind(config.CustomFilterCfg{}), AddCustomFilter) m.Put("/:id", reqSignedIn, bind(config.CustomFilterCfg{}), UpdateCustomFilter) @@ -233,20 +233,23 @@ func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id strin m.Get("/checkondel/:id", reqSignedIn, GetCustomFiltersAffectOnDel) }) - m.Group("/runtime", func() { - m.Get("/agent/reloadconf/", reqSignedIn, AgentReloadConf) - m.Post("/snmpping/", reqSignedIn, bind(config.SnmpDeviceCfg{}), PingSNMPDevice) - m.Post("/snmpquery/:getmode/:obtype/:data", reqSignedIn, bind(config.SnmpDeviceCfg{}), QuerySNMPDevice) - m.Get("/version/", reqSignedIn, RTGetVersion) + m.Group("/api/rt/agent", func() { + m.Get("/cfg/reload/", reqSignedIn, AgentReloadConf) + m.Post("/snmpconsole/ping/", reqSignedIn, bind(config.SnmpDeviceCfg{}), PingSNMPDevice) + m.Post("/snmpconsole/query/:getmode/:obtype/:data", reqSignedIn, bind(config.SnmpDeviceCfg{}), QuerySNMPDevice) + m.Get("/info/version/", reqSignedIn, RTGetVersion) + }) + + m.Group("/api/rt/device", func() { m.Get("/info/", reqSignedIn, RTGetInfo) m.Get("/info/:id", reqSignedIn, RTGetInfo) - m.Put("/activatedev/:id", reqSignedIn, RTActivateDev) - m.Put("/deactivatedev/:id", reqSignedIn, RTDeactivateDev) - m.Put("/actsnmpdbg/:id", reqSignedIn, RTActSnmpDebugDev) - m.Put("/deactsnmpdbg/:id", reqSignedIn, RTDeactSnmpDebugDev) - m.Put("/setloglevel/:id/:level", reqSignedIn, RTSetLogLevelDev) - m.Get("/getdevicelog/:id", reqSignedIn, RTGetLogFileDev) - m.Get("/forcefltupdate/:id", reqSignedIn, RTForceFltUpdate) + m.Put("/status/activate/:id", reqSignedIn, RTActivateDev) + m.Put("/status/deactivate/:id", reqSignedIn, RTDeactivateDev) + m.Put("/debug/activate/:id", reqSignedIn, RTActSnmpDebugDev) + m.Put("/debug/deactivate/:id", reqSignedIn, RTDeactSnmpDebugDev) + m.Put("/log/setloglevel/:id/:level", reqSignedIn, RTSetLogLevelDev) + m.Get("/log/getdevicelog/:id", reqSignedIn, RTGetLogFileDev) + m.Get("/filter/forcefltupdate/:id", reqSignedIn, RTForceFltUpdate) }) log.Printf("Server is running on localhost:%d...", port) diff --git a/proxy.conf.json b/proxy.conf.json index 37c96f61..eea5104d 100644 --- a/proxy.conf.json +++ b/proxy.conf.json @@ -7,37 +7,8 @@ "target": "http://localhost:8090", "secure": false }, - "/runtime": { - "target": "http://localhost:8090", - "secure": false - }, - "/metric": { - "target": "http://localhost:8090", - "secure": false - }, - "/measurement": { - "target": "http://localhost:8090", - "secure": false - }, - "/measgroups": { - "target": "http://localhost:8090", - "secure": false - }, - "/measfilters": { - "target": "http://localhost:8090", - "secure": false - }, - "/influxservers": { - "target": "http://localhost:8090", - "secure": false - }, - "/snmpdevice": { - "target": "http://localhost:8090", - "secure": false - }, - "/customfilter": { + "/api": { "target": "http://localhost:8090", "secure": false } - } diff --git a/src/home/home.ts b/src/home/home.ts index 4a9cebc9..1cd7d4c8 100644 --- a/src/home/home.ts +++ b/src/home/home.ts @@ -52,7 +52,7 @@ export class Home { } reloadConfig() { - this.httpAPI.get('/runtime/agent/reloadconf') + this.httpAPI.get('/api/rt/agent/cfg/reload') .subscribe( response => { alert(response.json()) @@ -76,7 +76,7 @@ export class Home { getInfo(filter_s: string) { // return an observable - return this.httpAPI.get('/runtime/version') + return this.httpAPI.get('/api/rt/agent/info/version/') .map( (responseData) => { return responseData.json()}); } diff --git a/src/influxmeas/influxmeascfg.service.ts b/src/influxmeas/influxmeascfg.service.ts index 4b297f58..f598ec5c 100644 --- a/src/influxmeas/influxmeascfg.service.ts +++ b/src/influxmeas/influxmeascfg.service.ts @@ -13,7 +13,7 @@ export class InfluxMeasService { } addMeas(dev) { - return this.httpAPI.post('/measurement',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/cfg/measurement',JSON.stringify(dev,function (key,value) { if ( key == 'IndexAsValue' ) return ( value === "true" || value === true); return value; @@ -23,7 +23,7 @@ export class InfluxMeasService { editMeas(dev, id) { console.log("DEV: ",dev); - return this.httpAPI.put('/measurement/'+id,JSON.stringify(dev,function (key,value) { + return this.httpAPI.put('/api/cfg/measurement/'+id,JSON.stringify(dev,function (key,value) { if ( key == 'IndexAsValue' ) return ( value === "true" || value === true); return value; @@ -34,7 +34,7 @@ export class InfluxMeasService { getMeas(filter_s: string) { // return an observable - return this.httpAPI.get('/measurement') + return this.httpAPI.get('/api/cfg/measurement') .map( (responseData) => { return responseData.json(); }) @@ -63,13 +63,13 @@ export class InfluxMeasService { getMeasById(id : string) { // return an observable console.log("ID: ",id); - return this.httpAPI.get('/measurement/'+id) + return this.httpAPI.get('/api/cfg/measurement/'+id) .map( (responseData) => responseData.json() )}; checkOnDeleteInfluxMeas(id : string){ - return this.httpAPI.get('/measurement/checkondel/'+id) + return this.httpAPI.get('/api/cfg/measurement/checkondel/'+id) .map( (responseData) => responseData.json() ).map((deleteobject) => { @@ -90,7 +90,7 @@ export class InfluxMeasService { // return an observable console.log("ID: ",id); console.log("DELETING"); - return this.httpAPI.delete('/measurement/'+id) + return this.httpAPI.delete('/api/cfg/measurement/'+id) .map( (responseData) => responseData.json() ); diff --git a/src/influxserver/influxservercfg.service.ts b/src/influxserver/influxservercfg.service.ts index b9fd8ef7..ed015ab1 100644 --- a/src/influxserver/influxservercfg.service.ts +++ b/src/influxserver/influxservercfg.service.ts @@ -11,7 +11,7 @@ export class InfluxServerService { } addInfluxServer(dev) { - return this.httpAPI.post('/influxservers',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/cfg/influxservers',JSON.stringify(dev,function (key,value) { if ( key == 'Port' ) { return parseInt(value); } @@ -22,7 +22,7 @@ export class InfluxServerService { } editInfluxServer(dev, id) { - return this.httpAPI.put('/influxservers/'+id,JSON.stringify(dev,function (key,value) { + return this.httpAPI.put('/api/cfg/influxservers/'+id,JSON.stringify(dev,function (key,value) { if ( key == 'Port' ) { return parseInt(value); } @@ -34,7 +34,7 @@ export class InfluxServerService { getInfluxServer(filter_s: string) { // return an observable - return this.httpAPI.get('/influxservers') + return this.httpAPI.get('/api/cfg/influxservers') .map( (responseData) => { return responseData.json(); }) @@ -62,13 +62,13 @@ export class InfluxServerService { getInfluxServerById(id : string) { // return an observable console.log("ID: ",id); - return this.httpAPI.get('/influxservers/'+id) + return this.httpAPI.get('/api/cfg/influxservers/'+id) .map( (responseData) => responseData.json() )}; checkOnDeleteInfluxServer(id : string){ - return this.httpAPI.get('/influxservers/checkondel/'+id) + return this.httpAPI.get('/api/cfg/influxservers/checkondel/'+id) .map( (responseData) => responseData.json() ).map((deleteobject) => { @@ -89,7 +89,7 @@ export class InfluxServerService { // return an observable console.log("ID: ",id); console.log("DELETING"); - return this.httpAPI.delete('/influxservers/'+id) + return this.httpAPI.delete('/api/cfg/influxservers/'+id) .map( (responseData) => responseData.json() ); diff --git a/src/measfilter/measfiltercfg.service.ts b/src/measfilter/measfiltercfg.service.ts index 63e1548a..63b95e8c 100644 --- a/src/measfilter/measfiltercfg.service.ts +++ b/src/measfilter/measfiltercfg.service.ts @@ -12,7 +12,7 @@ export class MeasFilterService { } addMeasFilter(dev) { - return this.httpAPI.post('/measfilters',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/cfg/measfilters',JSON.stringify(dev,function (key,value) { if ( key == 'EnableAlias' ) return ( value === "true" || value === true); if ( key == 'IDMeasurementCfg') { if ( value == "" ) return null @@ -24,7 +24,7 @@ export class MeasFilterService { editMeasFilter(dev, id) { console.log("DEV: ",dev); - return this.httpAPI.put('/measfilters/'+id,JSON.stringify(dev,function (key,value) { + return this.httpAPI.put('/api/cfg/measfilters/'+id,JSON.stringify(dev,function (key,value) { if ( key == 'EnableAlias' ) return ( value === "true" || value === true); if ( key == 'IDMeasurementCfg') { if ( value == "" ) return null @@ -37,7 +37,7 @@ export class MeasFilterService { getMeasFilter(filter_s: string) { // return an observable - return this.httpAPI.get('/measfilters') + return this.httpAPI.get('/api/cfg/measfilters') .map( (responseData) => { return responseData.json(); }) @@ -65,13 +65,13 @@ export class MeasFilterService { getMeasFilterById(id : string) { // return an observable console.log("ID: ",id); - return this.httpAPI.get('/measfilters/'+id) + return this.httpAPI.get('/api/cfg/measfilters/'+id) .map( (responseData) => responseData.json() )}; checkOnDeleteMeasFilter(id : string){ - return this.httpAPI.get('/measfilters/checkondel/'+id) + return this.httpAPI.get('/api/cfg/measfilters/checkondel/'+id) .map( (responseData) => responseData.json() ).map((deleteobject) => { @@ -92,7 +92,7 @@ export class MeasFilterService { // return an observable console.log("ID: ",id); console.log("DELETING"); - return this.httpAPI.delete('/measfilters/'+id) + return this.httpAPI.delete('/api/cfg/measfilters/'+id) .map( (responseData) => responseData.json() ); diff --git a/src/measgroup/measgroupcfg.service.ts b/src/measgroup/measgroupcfg.service.ts index 4ba29fba..5dcec3a7 100644 --- a/src/measgroup/measgroupcfg.service.ts +++ b/src/measgroup/measgroupcfg.service.ts @@ -12,7 +12,7 @@ export class MeasGroupService { } addMeasGroup(dev) { - return this.httpAPI.post('/measgroups',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/cfg/measgroup',JSON.stringify(dev,function (key,value) { return value; })) .map( (responseData) => responseData.json()); @@ -21,7 +21,7 @@ export class MeasGroupService { editMeasGroup(dev, id) { console.log("DEV: ",dev); //TODO: Se tiene que coger el oldid para substituir en la configuraciĆ³n lo que toque!!!! - return this.httpAPI.put('/measgroups/'+id,JSON.stringify(dev,function (key,value) { + return this.httpAPI.put('/api/cfg/measgroup/'+id,JSON.stringify(dev,function (key,value) { return value; })) .map( (responseData) => responseData.json()); @@ -29,7 +29,7 @@ export class MeasGroupService { getMeasGroup(filter_s: string) { // return an observable - return this.httpAPI.get('/measgroups') + return this.httpAPI.get('/api/cfg/measgroup') .map( (responseData) => { return responseData.json(); }) @@ -57,13 +57,13 @@ export class MeasGroupService { getMeasGroupById(id : string) { // return an observable console.log("ID: ",id); - return this.httpAPI.get('/measgroups/'+id) + return this.httpAPI.get('/api/cfg/measgroup/'+id) .map( (responseData) => responseData.json() )}; checkOnDeleteMeasGroups(id : string){ - return this.httpAPI.get('/measgroups/checkondel/'+id) + return this.httpAPI.get('/api/cfg/measgroup/checkondel/'+id) .map( (responseData) => responseData.json() ).map((deleteobject) => { @@ -84,7 +84,7 @@ export class MeasGroupService { // return an observable console.log("ID: ",id); console.log("DELETING"); - return this.httpAPI.delete('/measgroups/'+id) + return this.httpAPI.delete('/api/cfg/measgroup/'+id) .map( (responseData) => responseData.json() ); diff --git a/src/runtime/runtime.service.ts b/src/runtime/runtime.service.ts index 9ab406dd..78679f2e 100644 --- a/src/runtime/runtime.service.ts +++ b/src/runtime/runtime.service.ts @@ -13,7 +13,7 @@ export class RuntimeService { getRuntime(filter_s: string) { // return an observable - return this.httpAPI.get('/runtime/info') + return this.httpAPI.get('/api/rt/device/info') .map( (responseData) => { return responseData.json(); }) @@ -42,7 +42,7 @@ export class RuntimeService { getRuntimeById(id : string) { // return an observable - return this.httpAPI.get('/runtime/info/'+id) + return this.httpAPI.get('/api/rt/device/info/'+id) .map( (responseData) => responseData.json() )}; @@ -50,12 +50,12 @@ export class RuntimeService { changeDeviceActive(id : string, event : boolean) { // return an observable if (event) { - return this.httpAPI.put('/runtime/activatedev/'+id,id) + return this.httpAPI.put('/api/rt/device/status/activate/'+id,id) .map( (responseData) => responseData.json() ) } else { - return this.httpAPI.put('/runtime/deactivatedev/'+id,id) + return this.httpAPI.put('/api/rt/device/status/deactivate/'+id,id) .map( (responseData) => responseData.json() ) @@ -65,12 +65,12 @@ export class RuntimeService { changeStateDebug(id : string, event : boolean) { // return an observable if (event) { - return this.httpAPI.put('/runtime/actsnmpdbg/'+id,id) + return this.httpAPI.put('/api/rt/device/debug/activate/'+id,id) .map( (responseData) => responseData.json() ) } else { - return this.httpAPI.put('/runtime/deactsnmpdbg/'+id,id) + return this.httpAPI.put('/api/rt/device/debug/deactivate/'+id,id) .map( (responseData) => responseData.json() ) @@ -80,7 +80,7 @@ export class RuntimeService { changeLogLevel(id : string, level: string) { console.log(level); // return an observable - return this.httpAPI.put('/runtime/setloglevel/'+id+'/'+level,[id,level]) + return this.httpAPI.put('api/rt/device/log/setloglevel/'+id+'/'+level,[id,level]) .map( (responseData) => responseData.json() ) @@ -88,7 +88,7 @@ export class RuntimeService { downloadLogFile(id : string) { // return an observable - return this.httpAPI.get('/runtime/getdevicelog/'+id) + return this.httpAPI.get('/api/rt/device/log/getdevicelog/'+id) .map( (res) => { console.log("service_response",res) //return new Blob([res.arrayBuffer()],{type: "application/octet-stream" }) @@ -98,7 +98,7 @@ export class RuntimeService { forceFltUpdate(id : string) { // return an observable - return this.httpAPI.get('/runtime/forcefltupdate/'+id) + return this.httpAPI.get('/api/rt/device/filter/forcefltupdate/'+id) .map( (responseData) => responseData.json() ) diff --git a/src/snmpdevice/snmpdevicecfg.service.ts b/src/snmpdevice/snmpdevicecfg.service.ts index aefd1b1f..f6d06b34 100644 --- a/src/snmpdevice/snmpdevicecfg.service.ts +++ b/src/snmpdevice/snmpdevicecfg.service.ts @@ -12,7 +12,7 @@ export class SnmpDeviceService { } addDevice(dev) { - return this.httpAPI.post('/snmpdevice',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/cfg/snmpdevice',JSON.stringify(dev,function (key,value) { console.log("KEY: "+key+" Value: "+value); if ( key == 'Port' || key == 'Retries' || @@ -35,7 +35,7 @@ export class SnmpDeviceService { editDevice(dev, id) { console.log("DEV: ",dev); //TODO: Se tiene que coger el oldid para substituir en la configuraciĆ³n lo que toque!!!! - return this.httpAPI.put('/snmpdevice/'+id,JSON.stringify(dev,function (key,value) { + return this.httpAPI.put('/api/cfg/snmpdevice/'+id,JSON.stringify(dev,function (key,value) { if ( key == 'Port' || key == 'Retries' || key == 'Timeout' || @@ -55,7 +55,7 @@ export class SnmpDeviceService { getDevices(filter_s: string) { // return an observable - return this.httpAPI.get('/snmpdevice') + return this.httpAPI.get('/api/cfg/snmpdevice') .map( (responseData) => { return responseData.json(); }) @@ -83,13 +83,13 @@ export class SnmpDeviceService { getDevicesById(id : string) { // return an observable console.log("ID: ",id); - return this.httpAPI.get('/snmpdevice/'+id) + return this.httpAPI.get('/api/cfg/snmpdevice/'+id) .map( (responseData) => responseData.json() )}; checkOnDeleteSNMPDevice(id : string){ - return this.httpAPI.get('/influxservers/checkondel/'+id) + return this.httpAPI.get('/api/cfg/snmpdevice/checkondel/'+id) .map( (responseData) => responseData.json() ).map((deleteobject) => { @@ -110,7 +110,7 @@ export class SnmpDeviceService { // return an observable console.log("ID: ",id); console.log("DELETING"); - return this.httpAPI.delete('/snmpdevice/'+id) + return this.httpAPI.delete('/api/cfg/snmpdevice/'+id) .map( (responseData) => responseData.json() ); @@ -118,7 +118,7 @@ export class SnmpDeviceService { pingDevice(dev) { console.log(dev); - return this.httpAPI.post('/runtime/snmpping/',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/rt/agent/snmpconsole/ping/',JSON.stringify(dev,function (key,value) { if ( key == 'Port' || key == 'Retries' || key == 'Timeout' || @@ -141,7 +141,7 @@ export class SnmpDeviceService { } sendQuery(dev,getMode,oid) { - return this.httpAPI.post('/runtime/snmpquery/'+getMode+'/oid/'+oid,JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/rt/agent/snmpconsole/query/'+getMode+'/oid/'+oid,JSON.stringify(dev,function (key,value) { if ( key == 'Port' || key == 'Retries' || key == 'Timeout' || diff --git a/src/snmpmetric/snmpmetriccfg.service.ts b/src/snmpmetric/snmpmetriccfg.service.ts index ac3bdd80..d469e9bd 100644 --- a/src/snmpmetric/snmpmetriccfg.service.ts +++ b/src/snmpmetric/snmpmetriccfg.service.ts @@ -12,7 +12,7 @@ export class SnmpMetricService { } addMetric(dev) { - return this.httpAPI.post('/metric',JSON.stringify(dev,function (key,value) { + return this.httpAPI.post('/api/cfg/metric',JSON.stringify(dev,function (key,value) { if (key == 'Scale' || key == 'Shift') { return parseFloat(value); @@ -27,7 +27,7 @@ export class SnmpMetricService { editMetric(dev, id) { console.log("DEV: ",dev); - return this.httpAPI.put('/metric/'+id,JSON.stringify(dev,function (key,value) { + return this.httpAPI.put('/api/cfg/metric/'+id,JSON.stringify(dev,function (key,value) { if (key == 'Scale' || key == 'Shift') { return parseFloat(value); @@ -42,7 +42,7 @@ export class SnmpMetricService { getMetrics(filter_s: string) { // return an observable - return this.httpAPI.get('/metric') + return this.httpAPI.get('/api/cfg/metric') .map( (responseData) => { return responseData.json(); }) @@ -70,13 +70,13 @@ export class SnmpMetricService { getMetricsById(id : string) { // return an observable console.log("ID: ",id); - return this.httpAPI.get('/metric/'+id) + return this.httpAPI.get('/api/cfg/metric/'+id) .map( (responseData) => responseData.json() )}; checkOnDeleteMetric(id : string){ - return this.httpAPI.get('/metric/checkondel/'+id) + return this.httpAPI.get('/api/cfg/metric/checkondel/'+id) .map( (responseData) => responseData.json() ).map((deleteobject) => { @@ -97,7 +97,7 @@ export class SnmpMetricService { // return an observable console.log("ID: ",id); console.log("DELETING"); - return this.httpAPI.delete('/metric/'+id) + return this.httpAPI.delete('/api/cfg/metric/'+id) .map( (responseData) => responseData.json() );