Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit 07d8450

Browse files
committed
fix for grid legend having a clickable failure legend cell, even if no failures
Fixes #844
1 parent cffdda0 commit 07d8450

File tree

1 file changed

+7
-6
lines changed
  • app/plugins/modules/activation-visualizations/lib

1 file changed

+7
-6
lines changed

app/plugins/modules/activation-visualizations/lib/legend.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,12 @@ exports.drawLegend = (viewName, rightHeader, {statData, errorRate, nFailures}, g
167167
//
168168
// render the legend entry for failures
169169
//
170+
const opts = { zoom: -1, useThisLabelInstead: 'fail' }
171+
if (nFailures > 0) {
172+
opts.onclick = toggleFilter(-1)
173+
}
170174
entry('these cells represent activation failures',
171-
nFailures,
172-
true, -1, // true means render as failure
173-
{ zoom: -1, useThisLabelInstead: 'fail', balloonPos: 'left', balloonLength: 'medium',
174-
//onclick: drilldownWith(viewName, () => repl.pexec(`grid ${optionsToString(options)} --failure`))
175-
onclick: toggleFilter(-1)
176-
})
175+
nFailures,
176+
true, -1, // true means render as failure
177+
opts)
177178
}

0 commit comments

Comments
 (0)