diff --git a/ui/src/Components/MainModal/Configuration/GridLabelName.js b/ui/src/Components/MainModal/Configuration/GridLabelName.js index 4183f3de9..683132ad0 100644 --- a/ui/src/Components/MainModal/Configuration/GridLabelName.js +++ b/ui/src/Components/MainModal/Configuration/GridLabelName.js @@ -16,6 +16,7 @@ const valueToOption = (v) => ({ label: v ? v : disabledLabel, value: v }); const staticValues = [ { label: disabledLabel, value: "" }, { label: "@alertmanager", value: "@alertmanager" }, + { label: "@cluster", value: "@cluster" }, { label: "@receiver", value: "@receiver" }, ]; diff --git a/ui/src/Components/MainModal/Configuration/MultiGridConfiguration.test.js b/ui/src/Components/MainModal/Configuration/MultiGridConfiguration.test.js index a1202510a..27814dac6 100644 --- a/ui/src/Components/MainModal/Configuration/MultiGridConfiguration.test.js +++ b/ui/src/Components/MainModal/Configuration/MultiGridConfiguration.test.js @@ -72,16 +72,17 @@ describe("", () => { }); const tree = ExpandSortLabelSuggestions(); const options = tree.find("div.react-select__option"); - expect(options).toHaveLength(3); + expect(options).toHaveLength(4); expect(options.at(0).text()).toBe("Disable multi-grid"); expect(options.at(1).text()).toBe("@alertmanager"); - expect(options.at(2).text()).toBe("@receiver"); + expect(options.at(2).text()).toBe("@cluster"); + expect(options.at(3).text()).toBe("@receiver"); }); it("clicking on a label option updates settingsStore", () => { const tree = ExpandSortLabelSuggestions(); const options = tree.find("div.react-select__option"); - options.at(4).simulate("click"); + options.at(5).simulate("click"); expect(settingsStore.multiGridConfig.config.gridLabel).toBe("job"); });