mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
alerting: improve annotations for pending state
This commit is contained in:
parent
e7260d77b3
commit
7ba04466a2
@ -7,6 +7,7 @@ export const DEFAULT_ANNOTATION_COLOR = 'rgba(0, 211, 255, 1)';
|
|||||||
export const OK_COLOR = 'rgba(11, 237, 50, 1)';
|
export const OK_COLOR = 'rgba(11, 237, 50, 1)';
|
||||||
export const ALERTING_COLOR = 'rgba(237, 46, 24, 1)';
|
export const ALERTING_COLOR = 'rgba(237, 46, 24, 1)';
|
||||||
export const NO_DATA_COLOR = 'rgba(150, 150, 150, 1)';
|
export const NO_DATA_COLOR = 'rgba(150, 150, 150, 1)';
|
||||||
|
export const PENDING_COLOR = 'rgba(247, 149, 32, 1)';
|
||||||
export const REGION_FILL_ALPHA = 0.09;
|
export const REGION_FILL_ALPHA = 0.09;
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
OK_COLOR,
|
OK_COLOR,
|
||||||
ALERTING_COLOR,
|
ALERTING_COLOR,
|
||||||
NO_DATA_COLOR,
|
NO_DATA_COLOR,
|
||||||
|
PENDING_COLOR,
|
||||||
DEFAULT_ANNOTATION_COLOR,
|
DEFAULT_ANNOTATION_COLOR,
|
||||||
REGION_FILL_ALPHA,
|
REGION_FILL_ALPHA,
|
||||||
} from 'app/core/utils/colors';
|
} from 'app/core/utils/colors';
|
||||||
@ -71,6 +72,11 @@ export class EventManager {
|
|||||||
position: 'BOTTOM',
|
position: 'BOTTOM',
|
||||||
markerSize: 5,
|
markerSize: 5,
|
||||||
},
|
},
|
||||||
|
$__pending: {
|
||||||
|
color: PENDING_COLOR,
|
||||||
|
position: 'BOTTOM',
|
||||||
|
markerSize: 5,
|
||||||
|
},
|
||||||
$__editing: {
|
$__editing: {
|
||||||
color: DEFAULT_ANNOTATION_COLOR,
|
color: DEFAULT_ANNOTATION_COLOR,
|
||||||
position: 'BOTTOM',
|
position: 'BOTTOM',
|
||||||
|
@ -161,7 +161,11 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
|
|||||||
panelContainer.removeClass('panel-alert-state--' + lastAlertState);
|
panelContainer.removeClass('panel-alert-state--' + lastAlertState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctrl.alertState.state === 'ok' || ctrl.alertState.state === 'alerting') {
|
if (
|
||||||
|
ctrl.alertState.state === 'ok' ||
|
||||||
|
ctrl.alertState.state === 'alerting' ||
|
||||||
|
ctrl.alertState.state === 'pending'
|
||||||
|
) {
|
||||||
panelContainer.addClass('panel-alert-state--' + ctrl.alertState.state);
|
panelContainer.addClass('panel-alert-state--' + ctrl.alertState.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,13 @@
|
|||||||
content: '\e611';
|
content: '\e611';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--pending {
|
||||||
|
.panel-alert-icon:before {
|
||||||
|
color: $warn;
|
||||||
|
content: '\e611';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes alerting-panel {
|
@keyframes alerting-panel {
|
||||||
|
Loading…
Reference in New Issue
Block a user