fix(ui): reformat js code

This commit is contained in:
Łukasz Mierzwa
2019-11-09 14:57:50 +00:00
parent e0092a84dd
commit da66604864
2 changed files with 17 additions and 12 deletions

View File

@@ -80,17 +80,18 @@ const GroupFooter = observer(
))}
{Object.keys(group.shared.silences).length === 0 ? null : (
<div className="components-grid-alertgrid-alertgroup-shared-silence rounded-0 border-0">
{Object.entries(group.shared.silences).map(
([cluster, silences]) =>
silences.map(silenceID =>
RenderSilence(
alertStore,
silenceFormStore,
afterUpdate,
cluster,
silenceID
)
{Object.entries(
group.shared.silences
).map(([cluster, silences]) =>
silences.map(silenceID =>
RenderSilence(
alertStore,
silenceFormStore,
afterUpdate,
cluster,
silenceID
)
)
)}
</div>
)}

View File

@@ -85,7 +85,9 @@ describe("<SilencePreview />", () => {
const tree = MountedSilencePreview();
await expect(tree.instance().matchedAlerts.fetch).resolves.toBeUndefined();
expect(fetch).toHaveBeenCalledWith(
expect(
fetch
).toHaveBeenCalledWith(
"./alerts.json?q=foo%3Dbar&q=%40alertmanager%3D~%5E%28amValue%29%24",
{ credentials: "include" }
);
@@ -99,7 +101,9 @@ describe("<SilencePreview />", () => {
const tree = MountedSilencePreview();
await expect(tree.instance().matchedAlerts.fetch).resolves.toBeUndefined();
expect(fetch).toHaveBeenCalledWith(
expect(
fetch
).toHaveBeenCalledWith(
"./alerts.json?q=foo%3Dbar&q=%40alertmanager%3D~%5E%28am1%7Cam2%29%24",
{ credentials: "include" }
);