Skip to content

Commit

Permalink
Change segments icons in tooltip #376 (#378)
Browse files Browse the repository at this point in the history
* deleted color for pattern

* color for deleted

* icons

* trash to minus

* fix

* change ui

* fix
  • Loading branch information
VargBurz authored and jonyrock committed Oct 7, 2019
1 parent 6ef2324 commit b6a614d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/panel/graph_panel/graph_tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,29 @@ export class GraphTooltip {
var to = this.dashboard.formatDate(s.segment.to, 'HH:mm:ss.SSS');

let icon;
let subIcon;
if(s.segment.labeled) {
icon = 'fa-thumb-tack';
subIcon = 'fa-plus';
} else if (s.segment.deleted) {
icon = 'fa-trash';
icon = 'fa-thumb-tack';
subIcon = 'fa-minus';
} else {
icon = 'fa-search-plus';
icon = 'fa-crosshairs';
subIcon = '';
}
let segmentColor = s.analyticUnit.labeledColor;
if(s.segment.deleted === true) {
segmentColor = s.analyticUnit.deletedColor;
}
result += `
<div class="graph-tooltip-list-item">
<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}:
</div>
<div class="graph-tooltip-value">
<i class="fa ${ icon }" aria-hidden="true"></i>
${from}${to}
</div>
</div>
Expand Down

0 comments on commit b6a614d

Please sign in to comment.