Skip to content

Commit

Permalink
Fix panel alert icon, closes #931
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzobnin committed May 20, 2020
1 parent b769a0a commit dc2d2a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/datasource-zabbix/zabbixAlerting.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ class ZabbixAlertingService {
}

setPanelAlertState(panelId, alertState) {
let panelIndex;
if (!alertState) {
return;
}

let panelIndex;
let panelContainers = _.filter($('.panel-container'), elem => {
return elem.clientHeight && elem.clientWidth;
});
Expand All @@ -30,8 +33,7 @@ class ZabbixAlertingService {
});
}

// Don't apply alert styles to .panel-container--absolute (it rewrites position from absolute to relative)
if (panelIndex >= 0 && !panelContainers[panelIndex].className.includes('panel-container--absolute')) {
if (panelIndex >= 0) {
let alertClass = "panel-has-alert panel-alert-state--ok panel-alert-state--alerting";
$(panelContainers[panelIndex]).removeClass(alertClass);

Expand Down

0 comments on commit dc2d2a4

Please sign in to comment.