mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(ui): format code
This commit is contained in:
committed by
Łukasz Mierzwa
parent
fff657373b
commit
49be79d675
@@ -100,9 +100,9 @@ const App: FC<AppProps> = observer(({ defaultFilters, uiDefaults }) => {
|
||||
? ReactSelectStyles(ReactSelectColors.Dark)
|
||||
: ReactSelectStyles(ReactSelectColors.Light)
|
||||
: settingsStore.themeConfig.config.theme ===
|
||||
settingsStore.themeConfig.options.dark.value
|
||||
? ReactSelectStyles(ReactSelectColors.Dark)
|
||||
: ReactSelectStyles(ReactSelectColors.Light),
|
||||
settingsStore.themeConfig.options.dark.value
|
||||
? ReactSelectStyles(ReactSelectColors.Dark)
|
||||
: ReactSelectStyles(ReactSelectColors.Light),
|
||||
animations: {
|
||||
duration: settingsStore.themeConfig.config.animations ? 500 : 0,
|
||||
},
|
||||
|
||||
@@ -161,8 +161,8 @@ const AlertAck: FC<{
|
||||
!isAcking && error
|
||||
? "bg-warning"
|
||||
: !isAcking && response
|
||||
? "bg-success"
|
||||
: "bg-secondary"
|
||||
? "bg-success"
|
||||
: "bg-secondary"
|
||||
}`}
|
||||
onClick={() => {
|
||||
if (!isAcking && !(response || error)) {
|
||||
|
||||
@@ -115,14 +115,14 @@ export const AlertHistory: FC<{ group: APIAlertGroupT; grid: APIGridT }> = ({
|
||||
cachedResponse === null
|
||||
? "fetching"
|
||||
: sample.value > 0
|
||||
? `firing firing-${
|
||||
minMaxValue.minValue === minMaxValue.maxValue
|
||||
? Math.min(minMaxValue.maxValue, 5)
|
||||
: Math.round(
|
||||
(sample.value / minMaxValue.maxValue) * 5,
|
||||
)
|
||||
}`
|
||||
: "inactive"
|
||||
? `firing firing-${
|
||||
minMaxValue.minValue === minMaxValue.maxValue
|
||||
? Math.min(minMaxValue.maxValue, 5)
|
||||
: Math.round(
|
||||
(sample.value / minMaxValue.maxValue) * 5,
|
||||
)
|
||||
}`
|
||||
: "inactive"
|
||||
}
|
||||
></rect>
|
||||
</svg>
|
||||
|
||||
@@ -25,8 +25,8 @@ const FaviconBadge: FC<{
|
||||
alertStore.data.upstreamsWithErrors.length > 0
|
||||
? "!"
|
||||
: alertStore.status.error === null
|
||||
? alertStore.info.totalAlerts
|
||||
: "?",
|
||||
? alertStore.info.totalAlerts
|
||||
: "?",
|
||||
);
|
||||
}),
|
||||
[], // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
@@ -106,8 +106,8 @@ const ManagedSilence: FC<{
|
||||
progress > 90
|
||||
? "progress-bar bg-danger"
|
||||
: progress > 75
|
||||
? "progress-bar bg-warning"
|
||||
: "progress-bar bg-success"
|
||||
? "progress-bar bg-warning"
|
||||
: "progress-bar bg-success"
|
||||
}
|
||||
role="progressbar"
|
||||
style={{ width: progress + "%" }}
|
||||
|
||||
@@ -11,8 +11,8 @@ const MatcherToFilter = (matcher: MatcherT): string => {
|
||||
v.wasCreated
|
||||
? v
|
||||
: matcher.isRegex
|
||||
? { ...v, value: EscapeRegex(v.value) }
|
||||
: v,
|
||||
? { ...v, value: EscapeRegex(v.value) }
|
||||
: v,
|
||||
);
|
||||
const value =
|
||||
values.length > 1
|
||||
|
||||
@@ -50,8 +50,8 @@ const SilenceModalContent: FC<{
|
||||
? "New silence"
|
||||
: "Editing silence"
|
||||
: silenceFormStore.data.currentStage === "preview"
|
||||
? "Preview silenced alerts"
|
||||
: "Silence submitted"
|
||||
? "Preview silenced alerts"
|
||||
: "Silence submitted"
|
||||
}
|
||||
active={silenceFormStore.tab.current === "editor"}
|
||||
onClick={() => silenceFormStore.tab.setTab("editor")}
|
||||
|
||||
@@ -232,10 +232,10 @@ const GenerateAlertmanagerSilenceData = (
|
||||
)
|
||||
.join("|")})`
|
||||
: m.values.length === 1
|
||||
? m.values[0].wasCreated || !m.isRegex
|
||||
? m.values[0].value
|
||||
: EscapeRegex(m.values[0].value)
|
||||
: "",
|
||||
? m.values[0].wasCreated || !m.isRegex
|
||||
? m.values[0].value
|
||||
: EscapeRegex(m.values[0].value)
|
||||
: "",
|
||||
isRegex: m.isRegex,
|
||||
isEqual: m.isEqual,
|
||||
})),
|
||||
|
||||
@@ -26,10 +26,10 @@ it("renders without crashing with missing defaults div", () => {
|
||||
return name === "settings"
|
||||
? (settingsElement as any)
|
||||
: name === "defaults"
|
||||
? null
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
? null
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
});
|
||||
const response = EmptyAPIResponse();
|
||||
response.filters = [];
|
||||
@@ -52,12 +52,12 @@ it("renders without crashing with defaults present", () => {
|
||||
return name === "settings"
|
||||
? (settingsElement as any)
|
||||
: name === "defaults"
|
||||
? {
|
||||
innerHTML: DefaultsBase64,
|
||||
}
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
? {
|
||||
innerHTML: DefaultsBase64,
|
||||
}
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
});
|
||||
const response = EmptyAPIResponse();
|
||||
response.filters = [];
|
||||
|
||||
@@ -29,10 +29,10 @@ it("loads ResizeObserver polyfill if needed", () => {
|
||||
return name === "settings"
|
||||
? settingsElement
|
||||
: name === "defaults"
|
||||
? null
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
? null
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
});
|
||||
const response = EmptyAPIResponse();
|
||||
response.filters = [];
|
||||
|
||||
@@ -38,10 +38,10 @@ it("doesn't load ResizeObserver polyfill if not needed", () => {
|
||||
return name === "settings"
|
||||
? settingsElement
|
||||
: name === "defaults"
|
||||
? null
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
? null
|
||||
: name === "root"
|
||||
? root
|
||||
: null;
|
||||
});
|
||||
const response = EmptyAPIResponse();
|
||||
response.filters = [];
|
||||
|
||||
Reference in New Issue
Block a user