-
+
|
@@ -250,10 +249,6 @@ async function save() {
.formatThroughputColumn {
padding-right: 20px;
}
-.format-showing-results {
- display: flex;
- align-items: flex-end;
-}
.format-text {
font-weight: unset;
font-size: 14px;
diff --git a/src/Frontend/src/views/throughputreport/serviceControlWithThroughput.ts b/src/Frontend/src/views/throughputreport/serviceControlWithThroughput.ts
index 83d4457b5..b22ea3064 100644
--- a/src/Frontend/src/views/throughputreport/serviceControlWithThroughput.ts
+++ b/src/Frontend/src/views/throughputreport/serviceControlWithThroughput.ts
@@ -10,4 +10,5 @@ export const serviceControlWithThroughput = async ({ driver }: SetupFactoryOptio
await driver.setUp(precondition.hasEventLogItems);
await driver.setUp(precondition.hasNoHeartbeatsEndpoints);
await driver.setUp(precondition.hasServiceControlMainInstance(minimumSCVersionForThroughput));
+ await driver.setUp(precondition.hasEndpointSettings([]));
};
diff --git a/src/Frontend/test/mocks/heartbeat-endpoint-template.ts b/src/Frontend/test/mocks/heartbeat-endpoint-template.ts
deleted file mode 100644
index f7a04e387..000000000
--- a/src/Frontend/test/mocks/heartbeat-endpoint-template.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Endpoint } from "@/resources/Heartbeat";
-import EndpointMonitoringStats from "@/resources/EndpointMonitoringStats";
-
-export const heartbeatEndpointTemplate = {
- id: "a557a124-96da-4b68-fadc-f9fe5d047fed",
- name: "Universe.Solarsystem.Earth-Endpoint5",
- host_display_name: "mobvm2",
- monitored: true,
- monitor_heartbeat: true,
- heartbeat_information: { last_report_at: "0001-01-01T00:00:00", reported_status: "dead" },
- is_sending_heartbeats: false,
- aliveCount: 0,
- downCount: 0,
-};
-
-export const heartbeatsFiveActiveOneFailing = {
- active: 5,
- failing: 1,
-};
-
-export const heartbeatsFourActiveTwoFailing = {
- active: 4,
- failing: 1,
-};
diff --git a/src/Frontend/test/preconditions/hasEndpointSettings.ts b/src/Frontend/test/preconditions/hasEndpointSettings.ts
new file mode 100644
index 000000000..21480e6ca
--- /dev/null
+++ b/src/Frontend/test/preconditions/hasEndpointSettings.ts
@@ -0,0 +1,15 @@
+import { SetupFactoryOptions } from "../driver";
+import { EndpointSettings } from "@/resources/EndpointSettings";
+import endpointSettingsClient from "@/components/heartbeats/endpointSettingsClient";
+
+export const hasEndpointSettings = function (settings: EndpointSettings[]) {
+ if (settings.length === 0) {
+ settings.push(endpointSettingsClient.defaultEndpointSettingsValue());
+ }
+ return ({ driver }: SetupFactoryOptions) => {
+ driver.mockEndpoint(`${window.defaultConfig.service_control_url}endpointssettings`, {
+ body: settings,
+ });
+ return settings;
+ };
+};
diff --git a/src/Frontend/test/preconditions/hasFiveActiveOneFailingHeartbeats.ts b/src/Frontend/test/preconditions/hasFiveActiveOneFailingHeartbeats.ts
deleted file mode 100644
index a31d3fbb2..000000000
--- a/src/Frontend/test/preconditions/hasFiveActiveOneFailingHeartbeats.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { SetupFactoryOptions } from "../driver";
-import { heartbeatsFiveActiveOneFailing } from "../mocks/heartbeat-endpoint-template";
-export const hasFiveActiveOneFailingHeartbeats = ({ driver }: SetupFactoryOptions) => {
- const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
- driver.mockEndpoint(`${serviceControlInstanceUrl}heartbeats/stats`, {
- body: heartbeatsFiveActiveOneFailing,
- });
- return heartbeatsFiveActiveOneFailing;
-};
diff --git a/src/Frontend/test/preconditions/hasFourActiveTwoFailingHeartbeats.ts b/src/Frontend/test/preconditions/hasFourActiveTwoFailingHeartbeats.ts
deleted file mode 100644
index f11c048f2..000000000
--- a/src/Frontend/test/preconditions/hasFourActiveTwoFailingHeartbeats.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { SetupFactoryOptions } from "../driver";
-import { heartbeatsFourActiveTwoFailing } from "../mocks/heartbeat-endpoint-template";
-
-export const hasFourActiveTwoFailingHeartbeats = ({ driver }: SetupFactoryOptions) => {
- const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
- driver.mockEndpoint(`${serviceControlInstanceUrl}heartbeats/stats`, {
- body: heartbeatsFourActiveTwoFailing,
- });
- return heartbeatsFourActiveTwoFailing;
-};
diff --git a/src/Frontend/test/preconditions/hasHeartbeatEndpoints.ts b/src/Frontend/test/preconditions/hasHeartbeatEndpoints.ts
index fcc2e2e51..0bf18f2ff 100644
--- a/src/Frontend/test/preconditions/hasHeartbeatEndpoints.ts
+++ b/src/Frontend/test/preconditions/hasHeartbeatEndpoints.ts
@@ -1,18 +1,13 @@
-import { heartbeatEndpointTemplate } from "../mocks/heartbeat-endpoint-template";
import { SetupFactoryOptions } from "../driver";
+import { EndpointsView } from "@/resources/EndpointView";
-export const heartbeatsEndpointsNamed =
- (endpointNames: string[]) =>
+export const hasHeartbeatsEndpoints =
+ (endpoints: EndpointsView[]) =>
({ driver }: SetupFactoryOptions) => {
- const response = endpointNames.map((name) => {
- return { ...heartbeatEndpointTemplate, name: name };
+ driver.mockEndpoint(`${window.defaultConfig.service_control_url}endpoints`, {
+ body: endpoints,
});
-
- const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
- driver.mockEndpoint(`${serviceControlInstanceUrl}endpoints`, {
- body: response,
- });
- return response;
+ return endpoints;
};
-export const hasNoHeartbeatsEndpoints = heartbeatsEndpointsNamed([]);
+export const hasNoHeartbeatsEndpoints = hasHeartbeatsEndpoints([]);
diff --git a/src/Frontend/test/preconditions/index.ts b/src/Frontend/test/preconditions/index.ts
index 4805a2536..c9d0e9285 100644
--- a/src/Frontend/test/preconditions/index.ts
+++ b/src/Frontend/test/preconditions/index.ts
@@ -6,8 +6,6 @@ export { hasServiceControlMonitoringInstance } from "../preconditions/hasService
export { hasServiceControlMonitoringInstanceUrl } from "../preconditions/hasServiceControlMonitoringInstanceUrl";
export { hasUpToDateServiceControl } from "../preconditions/hasUpToDateServiceControl";
export { hasUpToDateServicePulse } from "../preconditions/hasUpToDateServicePulse";
-export { hasFiveActiveOneFailingHeartbeats } from "../preconditions/hasFiveActiveOneFailingHeartbeats";
-export { hasFourActiveTwoFailingHeartbeats } from "../preconditions/hasFourActiveTwoFailingHeartbeats";
export { errorsDefaultHandler } from "../preconditions/hasNoErrors";
export { hasNoFailingCustomChecks } from "../preconditions/hasNoFailingCustomChecks";
export { hasNoDisconnectedEndpoints } from "../preconditions/hasNoDisconnectedEndpoints";
@@ -16,9 +14,10 @@ export { hasEventLogItems } from "../preconditions/hasEventLogItems";
export { hasRecoverabilityGroups } from "../preconditions/hasEmptyRecoverabilityGroups";
export * from "./hasEndpointsWithHistoryPeriodData";
export * from "./hasMonitoredEndpointDetails";
-export { hasNoHeartbeatsEndpoints } from "../preconditions/hasHeartbeatEndpoints";
+export { hasNoHeartbeatsEndpoints, hasHeartbeatsEndpoints } from "../preconditions/hasHeartbeatEndpoints";
export { serviceControlWithMonitoring } from "./serviceControlWithMonitoring";
export * from "./recoverability";
export { hasLicensingReportAvailable } from "../preconditions/hasLicensingReportAvailable";
export { hasLicensingSettingTest } from "../preconditions/hasLicensingSettingTest";
export { hasLicensingEndpoints } from "../preconditions/hasLicensingEndpoints";
+export { hasEndpointSettings } from "./hasEndpointSettings";
diff --git a/src/Frontend/test/preconditions/serviceControlWithMonitoring.ts b/src/Frontend/test/preconditions/serviceControlWithMonitoring.ts
index 0ba1f966b..64a46e7b0 100644
--- a/src/Frontend/test/preconditions/serviceControlWithMonitoring.ts
+++ b/src/Frontend/test/preconditions/serviceControlWithMonitoring.ts
@@ -1,8 +1,5 @@
import * as precondition from ".";
import { SetupFactoryOptions } from "../driver";
-import EndpointThroughputSummary from "@/resources/EndpointThroughputSummary";
-import ReportGenerationState from "@/resources/ReportGenerationState";
-import ConnectionTestResults, { ConnectionSettingsTestResult } from "@/resources/ConnectionTestResults";
export const serviceControlWithMonitoring = async ({ driver }: SetupFactoryOptions) => {
//Service control requests minimum setup. Todo: encapsulate for reuse.
@@ -34,9 +31,6 @@ export const serviceControlWithMonitoring = async ({ driver }: SetupFactoryOptio
//http://localhost:33333/api/eventlogitems
await driver.setUp(precondition.hasEventLogItems);
- //http://localhost:33333/api/heartbeats/stats
- await driver.setUp(precondition.hasFiveActiveOneFailingHeartbeats);
-
//http://localhost:33333/api/recoverability/groups/Endpoint%20Name
await driver.setUp(precondition.hasRecoverabilityGroups);
@@ -52,7 +46,7 @@ export const serviceControlWithMonitoring = async ({ driver }: SetupFactoryOptio
//http://localhost:33333/recoverability/groups/Endpoint%20Name?classifierFilter=${name} - the classifierFilter is ignored, this is a default handler for the route.
await driver.setUp(precondition.endpointRecoverabilityByNameDefaultHandler);
- //OPTIONS VERB agaisnt monitoring instance http://localhost:33633/ - this is used for enabling deleting an instance from the endpoint details page - instances panel
+ //OPTIONS VERB against monitoring instance http://localhost:33633/ - this is used for enabling deleting an instance from the endpoint details page - instances panel
await driver.setUp(precondition.serviceControlMonitoringOptions);
//http://localhost:33333/api/configuration default handler
@@ -81,4 +75,6 @@ export const serviceControlWithMonitoring = async ({ driver }: SetupFactoryOptio
//Default handler for /api/licensing/settings/test
await driver.setUp(precondition.hasLicensingSettingTest());
+
+ await driver.setUp(precondition.hasEndpointSettings([]));
};
|