ui: Fix derived events counter not shown in global track
This makes sure annotation_counter_track is updated.
Tested by creating a custom derived event and making
sure a counter is rendered in the global track.
Change-Id: I3209dff9efb68789774b61c1ad0805b65cfa53a1
diff --git a/ui/src/controller/trace_controller.ts b/ui/src/controller/trace_controller.ts
index d91a3bb..1b3580e 100644
--- a/ui/src/controller/trace_controller.ts
+++ b/ui/src/controller/trace_controller.ts
@@ -544,11 +544,13 @@
let hasSliceName = false;
let hasDur = false;
let hasUpid = false;
+ let hasValue = false;
for (let i = 0; i < slowlyCountRows(result); i++) {
const name = result.columns[1].stringValues![i];
hasSliceName = hasSliceName || name === 'slice_name';
hasDur = hasDur || name === 'dur';
hasUpid = hasUpid || name === 'upid';
+ hasValue = hasValue || name === 'value';
}
const upidColumnSelect = hasUpid ? 'upid' : '0 AS upid';
@@ -579,7 +581,6 @@
`);
}
- const hasValue = result.columnDescriptors.some(x => x.name === 'value');
if (hasValue) {
const minMax = await engine.query(`
SELECT MIN(value) as min_value, MAX(value) as max_value