diff --git a/ui/src/Components/Labels/BaseLabel/index.js b/ui/src/Components/Labels/BaseLabel/index.js index d7fdc1aa3..40ecdfc14 100644 --- a/ui/src/Components/Labels/BaseLabel/index.js +++ b/ui/src/Components/Labels/BaseLabel/index.js @@ -24,7 +24,7 @@ class BaseLabel extends Component { isStaticColorLabel(name) { const { alertStore } = this.props; - return alertStore.staticColorLabels.values.includes(name); + return alertStore.settings.values.staticColorLabels.includes(name); } getColorClass(name, value) { diff --git a/ui/src/Stores/AlertStore.js b/ui/src/Stores/AlertStore.js index abceeadfe..32d55788d 100644 --- a/ui/src/Stores/AlertStore.js +++ b/ui/src/Stores/AlertStore.js @@ -117,13 +117,13 @@ class AlertStore { { name: "API response info" } ); - staticColorLabels = observable( + settings = observable( { - values: [] + values: { staticColorLabels: [] } }, {}, { - name: "List of labels with static color" + name: "Global settings" } ); @@ -247,8 +247,9 @@ class AlertStore { } } - if (!equal(this.staticColorLabels, result.staticColorLabels)) { - this.staticColorLabels.values = result.staticColorLabels; + // settings exported via API + if (!equal(this.settings, result.settings)) { + this.settings.values = result.settings; } this.status.setIdle();