diff --git a/provisioning/dashboards/panels.json b/provisioning/dashboards/panels.json
index b0e8840..2d3033b 100644
--- a/provisioning/dashboards/panels.json
+++ b/provisioning/dashboards/panels.json
@@ -42,10 +42,6 @@
"color": "red",
"value": null
},
- {
- "color": "red",
- "value": 0
- },
{
"color": "#EAB839",
"value": 33
@@ -105,17 +101,13 @@
"color": "red",
"value": null
},
- {
- "color": "red",
- "value": 0
- },
{
"color": "orange",
- "value": 33
+ "value": 0
},
{
"color": "green",
- "value": 66
+ "value": 33
}
]
}
@@ -168,10 +160,6 @@
"color": "red",
"value": null
},
- {
- "color": "red",
- "value": 0
- },
{
"color": "orange",
"value": 33
@@ -227,13 +215,9 @@
"thresholds": {
"mode": "absolute",
"steps": [
- {
- "color": "green",
- "value": null
- },
{
"color": "red",
- "value": 0
+ "value": null
},
{
"color": "#EAB839",
@@ -297,10 +281,6 @@
"color": "red",
"value": null
},
- {
- "color": "red",
- "value": 0
- },
{
"color": "#EAB839",
"value": 50
@@ -361,10 +341,6 @@
"color": "red",
"value": null
},
- {
- "color": "red",
- "value": 0
- },
{
"color": "#EAB839",
"value": 50
@@ -579,7 +555,8 @@
"mode": "percentage",
"steps": [
{
- "color": "red"
+ "color": "red",
+ "value": null
},
{
"color": "red",
@@ -609,12 +586,9 @@
"value": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "super-light-red",
- "value": 0
+ "value": null
},
{
"color": "red",
@@ -640,12 +614,9 @@
"value": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "super-light-orange",
- "value": 0
+ "value": null
},
{
"color": "orange",
@@ -671,12 +642,9 @@
"value": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "super-light-yellow",
- "value": 0
+ "value": null
},
{
"color": "yellow",
@@ -702,12 +670,9 @@
"value": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "super-light-green",
- "value": 0
+ "value": null
},
{
"color": "green",
@@ -733,12 +698,9 @@
"value": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "super-light-blue",
- "value": 0
+ "value": null
},
{
"color": "blue",
@@ -764,12 +726,9 @@
"value": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "super-light-purple",
- "value": 0
+ "value": null
},
{
"color": "purple",
@@ -841,12 +800,9 @@
"thresholds": {
"mode": "percentage",
"steps": [
- {
- "color": "red"
- },
{
"color": "red",
- "value": 0
+ "value": null
},
{
"color": "#EAB839",
@@ -931,6 +887,6 @@
"timezone": "",
"title": "Traffic Lights Example",
"uid": "O4tc_E6Gz",
- "version": 8,
+ "version": 4,
"weekStart": ""
}
diff --git a/src/components/ThresholdsAssistant.tsx b/src/components/ThresholdsAssistant.tsx
new file mode 100644
index 0000000..7ba13af
--- /dev/null
+++ b/src/components/ThresholdsAssistant.tsx
@@ -0,0 +1,88 @@
+import { css, cx } from '@emotion/css';
+import { GrafanaTheme2, ThresholdsConfig } from '@grafana/data';
+import { Alert, Icon, useStyles2 } from '@grafana/ui';
+import React from 'react';
+
+export function ThresholdsAssistant({ thresholds }: { thresholds?: ThresholdsConfig }) {
+ const validSteps = validateThresholds(thresholds!);
+ const styles = useStyles2(getStyles);
+ return (
+ Please configure thresholds for all three lights: