Browse Source

Change segments icons in tooltip #376 (#378)

* deleted color for pattern

* color for deleted

* icons

* trash to minus

* fix

* change ui

* fix
master
Alexandr Velikiy 5 years ago committed by Alexey Velikiy
parent
commit
b6a614d478
  1. 16
      src/panel/graph_panel/graph_tooltip.ts

16
src/panel/graph_panel/graph_tooltip.ts

@ -206,21 +206,29 @@ export class GraphTooltip {
var to = this.dashboard.formatDate(s.segment.to, 'HH:mm:ss.SSS'); var to = this.dashboard.formatDate(s.segment.to, 'HH:mm:ss.SSS');
let icon; let icon;
let subIcon;
if(s.segment.labeled) { if(s.segment.labeled) {
icon = 'fa-thumb-tack'; icon = 'fa-thumb-tack';
subIcon = 'fa-plus';
} else if (s.segment.deleted) { } else if (s.segment.deleted) {
icon = 'fa-trash'; icon = 'fa-thumb-tack';
subIcon = 'fa-minus';
} else { } else {
icon = 'fa-search-plus'; icon = 'fa-crosshairs';
subIcon = '';
}
let segmentColor = s.analyticUnit.labeledColor;
if(s.segment.deleted === true) {
segmentColor = s.analyticUnit.deletedColor;
} }
result += ` result += `
<div class="graph-tooltip-list-item"> <div class="graph-tooltip-list-item">
<div class="graph-tooltip-series-name"> <div class="graph-tooltip-series-name">
<i class="fa fa-exclamation" style="color:${s.analyticUnit.labeledColor}"></i> <i class="fa ${ icon }" style="color:${segmentColor}"></i>
<i class="fa ${ subIcon }" style="color:${segmentColor}"></i>
${s.analyticUnit.name}: ${s.analyticUnit.name}:
</div> </div>
<div class="graph-tooltip-value"> <div class="graph-tooltip-value">
<i class="fa ${ icon }" aria-hidden="true"></i>
${from} ${to} ${from} ${to}
</div> </div>
</div> </div>

Loading…
Cancel
Save