mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
committed by
Łukasz Mierzwa
parent
d1ef0ac2a4
commit
98d49fe877
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## v0.107
|
||||
|
||||
### Changed
|
||||
|
||||
- Don't show fatal error page if configured health checks are failing but
|
||||
alertmanager is still showing alerts. A popup message with will still
|
||||
be visible.
|
||||
|
||||
## v0.106
|
||||
|
||||
### Added
|
||||
|
||||
@@ -62,6 +62,30 @@ describe("<Grid />", () => {
|
||||
expect(tree.text()).toBe("<FatalError />");
|
||||
});
|
||||
|
||||
it("renders AlertGrid if there's only one upstream and it's unhealthy but there are alerts", () => {
|
||||
alertStore.data.setUpstreams({
|
||||
counters: { total: 1, healthy: 0, failed: 1 },
|
||||
instances: [
|
||||
{
|
||||
name: "am1",
|
||||
cluster: "am",
|
||||
clusterMembers: ["am"],
|
||||
uri: "http://am1",
|
||||
publicURI: "http://am1",
|
||||
error: "error",
|
||||
version: "0.24.0",
|
||||
readonly: false,
|
||||
corsCredentials: "include",
|
||||
headers: {},
|
||||
},
|
||||
],
|
||||
clusters: { am1: ["am1"] },
|
||||
});
|
||||
alertStore.info.setTotalAlerts(1);
|
||||
const tree = ShallowGrid();
|
||||
expect(tree.find("Memo(AlertGrid)")).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("renders FatalError if there's only one upstream and it's unhealthy but without any error", () => {
|
||||
alertStore.data.setUpstreams({
|
||||
counters: { total: 1, healthy: 0, failed: 1 },
|
||||
|
||||
@@ -27,7 +27,8 @@ const Grid: FC<{
|
||||
alertStore.data.upstreams.counters.total === 1 &&
|
||||
alertStore.data.upstreams.counters.healthy === 0 &&
|
||||
alertStore.data.upstreams.instances[0] &&
|
||||
alertStore.data.upstreams.instances[0].error !== "" ? (
|
||||
alertStore.data.upstreams.instances[0].error !== "" &&
|
||||
alertStore.info.totalAlerts === 0 ? (
|
||||
<FatalError message={alertStore.data.upstreams.instances[0].error} />
|
||||
) : alertStore.info.version !== "unknown" &&
|
||||
alertStore.info.totalAlerts === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user