mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
fix(ui): use publicURI for alertmanager requests in the silence form
This commit is contained in:
@@ -12,7 +12,7 @@ import { ValidationError } from "Components/MultiSelect/ValidationError";
|
||||
const AlertmanagerInstancesToOptions = instances =>
|
||||
instances.map(i => ({
|
||||
label: i.name,
|
||||
value: i.uri
|
||||
value: i.publicURI
|
||||
}));
|
||||
|
||||
const AlertManagerInput = observer(
|
||||
|
||||
@@ -19,9 +19,24 @@ const AlertmanagerOption = index => ({
|
||||
beforeEach(() => {
|
||||
alertStore = new AlertStore([]);
|
||||
alertStore.data.upstreams.instances = [
|
||||
{ name: "am1", uri: "http://am1.example.com", error: "" },
|
||||
{ name: "am2", uri: "http://am2.example.com", error: "" },
|
||||
{ name: "am3", uri: "http://am3.example.com", error: "" }
|
||||
{
|
||||
name: "am1",
|
||||
uri: "http://am1.example.com",
|
||||
publicURI: "http://am1.example.com",
|
||||
error: ""
|
||||
},
|
||||
{
|
||||
name: "am2",
|
||||
uri: "http://am2.example.com",
|
||||
publicURI: "http://am2.example.com",
|
||||
error: ""
|
||||
},
|
||||
{
|
||||
name: "am3",
|
||||
uri: "http://am3.example.com",
|
||||
publicURI: "http://am3.example.com",
|
||||
error: ""
|
||||
}
|
||||
];
|
||||
silenceFormStore = new SilenceFormStore();
|
||||
});
|
||||
@@ -123,7 +138,7 @@ describe("<AlertManagerInput />", () => {
|
||||
const tree = ShallowAlertManagerInput();
|
||||
alertStore.data.upstreams.instances[0] = {
|
||||
name: "am1",
|
||||
uri: "http://am1.example.com/new",
|
||||
publicURI: "http://am1.example.com/new",
|
||||
error: ""
|
||||
};
|
||||
// force update since this is where the mismatch check lives
|
||||
|
||||
Reference in New Issue
Block a user