summaryrefslogtreecommitdiffstats
path: root/test/monitoring
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2018-10-20 08:56:31 +0200
committerJose Bollo <jose.bollo@iot.bzh>2018-10-22 12:35:11 +0200
commitc1c4973d1d584b659aae493c9f03232f6ccd5c5a (patch)
tree71feb56c1b40c144fce615b604846298a5cfb54d /test/monitoring
parent07999dabb949585b961ef39a3d6d636149fbebec (diff)
monitoring: Fix naming of apis
The introduction of API v3 changed the API of monitoring/tracing. This introduced a regression of the monitoring: it wass not more possible to filter api by name. This fix that issue. Bug-AGL: SPEC-1828 Change-Id: Ic7f614f6c696119c7fd313e3cd252095f578c64c Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'test/monitoring')
-rw-r--r--test/monitoring/monitor.html6
-rw-r--r--test/monitoring/monitor.js10
2 files changed, 8 insertions, 8 deletions
diff --git a/test/monitoring/monitor.html b/test/monitoring/monitor.html
index 83807bcd..d1256dae 100644
--- a/test/monitoring/monitor.html
+++ b/test/monitoring/monitor.html
@@ -33,7 +33,7 @@
<div id="work" class="-flex-fill -flex-h">
<div id="controls" class="-box-out">
<div class="-box-in">
- <div id="all" class="api opened" data-api="*">
+ <div id="all" class="api opened" data-apiname="*">
<div class="opclo"></div>
<div class="name">{ALL}</div>
<div class="desc">Settings for all</div>
@@ -43,7 +43,7 @@
<div class="closedon">traces...</div>
<div class="trace closedoff"></div>
</div>
- <div id="common" class="api" data-api="">
+ <div id="common" class="api" data-apiname="">
<div class="name">{COMMON}</div>
<div class="desc">Settings without apis</div>
<hr>
@@ -88,7 +88,7 @@
<!-- template for APIS -->
<template id="t-api">
- <div class="api closed" data-api="">
+ <div class="api closed" data-apiname="">
<div class="opclo"></div>
<div class="name"></div>
<div class="desc"></div>
diff --git a/test/monitoring/monitor.js b/test/monitoring/monitor.js
index 1bdfcb43..589541dd 100644
--- a/test/monitoring/monitor.js
+++ b/test/monitoring/monitor.js
@@ -291,7 +291,7 @@ function on_got_apis(obj) {
name: api_name
};
api.node.API = api;
- api.node.dataset.api = api_name;
+ api.node.dataset.apiname = api_name;
api.vnode = get(".verbs", api.node);
get(".name", api.node).textContent = api_name;
var s = get(".verbosity select", api.node);
@@ -355,9 +355,9 @@ function update_trace_box(node) {
function set_trace_box(node, clear) {
var api = node;
- while (api && !api.dataset.api)
+ while (api && !api.dataset.apiname)
api = api.parentElement;
- var tag = api.dataset.api + "/" + node.dataset.trace;
+ var tag = api.dataset.apiname + "/" + node.dataset.trace;
var value = false;
for_all_nodes(node, "input", function(n){ if (n.checked) value = n.value; });
if (clear)
@@ -365,8 +365,8 @@ function set_trace_box(node, clear) {
if (value != "no") {
var spec = {tag: tag, name: "trace"};
spec[node.dataset.trace] = value;
- if (api.dataset.api != "*")
- spec.api = api.dataset.api;
+ if (api.dataset.apiname != "*")
+ spec.apiname = api.dataset.apiname;
do_call("monitor/trace", {add: spec});
}
}