From 1daf851a5c8ed733296957ce9ab888550e40c3ec Mon Sep 17 00:00:00 2001
From: John Simons
Date: Fri, 12 Dec 2025 17:49:12 +1000
Subject: [PATCH] Hide some aspects when using embedded mode
---
src/Frontend/env.d.ts | 1 +
.../components/BackendChecksNotifications.vue | 22 +++++----
src/Frontend/src/components/PageFooter.vue | 46 +++++++++++--------
.../components/ServiceControlAvailable.vue | 3 +-
.../configuration/PlatformConnections.vue | 21 +++++----
.../src/components/serviceControlClient.ts | 4 ++
6 files changed, 59 insertions(+), 38 deletions(-)
diff --git a/src/Frontend/env.d.ts b/src/Frontend/env.d.ts
index 25bf2dc338..9ccd026045 100644
--- a/src/Frontend/env.d.ts
+++ b/src/Frontend/env.d.ts
@@ -10,6 +10,7 @@ declare global {
service_control_url: string;
monitoring_urls: string[];
showPendingRetry: boolean;
+ embedded?: boolean;
};
}
}
diff --git a/src/Frontend/src/components/BackendChecksNotifications.vue b/src/Frontend/src/components/BackendChecksNotifications.vue
index 2273a3b91a..5f666d9a84 100644
--- a/src/Frontend/src/components/BackendChecksNotifications.vue
+++ b/src/Frontend/src/components/BackendChecksNotifications.vue
@@ -19,17 +19,19 @@ const environment = environmentStore.environment;
const primaryConnectionFailure = computed(() => connectionState.unableToConnect);
const monitoringConnectionFailure = computed(() => monitoringConnectionState.unableToConnect);
-watch(primaryConnectionFailure, (newValue, oldValue) => {
- //NOTE to eliminate success msg showing everytime the screen is refreshed
- if (newValue !== oldValue && !(oldValue === null && newValue === false)) {
- const connectionUrl = router.resolve(routeLinks.configuration.connections.link).href;
- if (newValue) {
- useShowToast(TYPE.ERROR, "Error", `Could not connect to ServiceControl at ${serviceControlClient.url}. View connection settings`);
- } else {
- useShowToast(TYPE.SUCCESS, "Success", `Connection to ServiceControl was successful at ${serviceControlClient.url}.`);
+if (!window.defaultConfig.embedded) {
+ watch(primaryConnectionFailure, (newValue, oldValue) => {
+ //NOTE to eliminate success msg showing everytime the screen is refreshed
+ if (newValue !== oldValue && !(oldValue === null && newValue === false)) {
+ const connectionUrl = router.resolve(routeLinks.configuration.connections.link).href;
+ if (newValue) {
+ useShowToast(TYPE.ERROR, "Error", `Could not connect to ServiceControl at ${serviceControlClient.url}. View connection settings`);
+ } else {
+ useShowToast(TYPE.SUCCESS, "Success", `Connection to ServiceControl was successful at ${serviceControlClient.url}.`);
+ }
}
- }
-});
+ });
+}
watch(monitoringConnectionFailure, (newValue, oldValue) => {
// Only watch the state change if monitoring is enabled
diff --git a/src/Frontend/src/components/PageFooter.vue b/src/Frontend/src/components/PageFooter.vue
index ecb826af4f..b0e6b946ff 100644
--- a/src/Frontend/src/components/PageFooter.vue
+++ b/src/Frontend/src/components/PageFooter.vue
@@ -21,6 +21,7 @@ const environment = environmentAndVersionsStore.environment;
const licenseStore = useLicenseStore();
const { licenseStatus, license } = licenseStore;
const isMonitoringEnabled = monitoringClient.isMonitoringEnabled;
+const isEmbedded = window.defaultConfig.embedded;
const scAddressTooltip = computed(() => {
return `ServiceControl URL ${serviceControlClient.url}`;
@@ -43,26 +44,33 @@ const { configuration } = storeToRefs(configurationStore);
Connect new endpoint
-
- ServicePulse v{{ environment.sp_version }}
-
- ServicePulse v{{ environment.sp_version }} (
- v{{ newVersions.newSPVersion.newspversionnumber }} available)
-
-
- Service Control:
-
-
- Connected
- v{{ environment.sc_version }}
- ( v{{ newVersions.newSCVersion.newscversionnumber }} available)
+
+ ServicePulse v{{ environment.sp_version }}
+
+ ServicePulse v{{ environment.sp_version }} (
+ v{{ newVersions.newSPVersion.newspversionnumber }} available)
- Not connected
- Connecting
-
-
+
+ Service Control:
+
+
+ Connected
+ v{{ environment.sc_version }}
+ ( v{{ newVersions.newSCVersion.newscversionnumber }} available)
+
+ Not connected
+ Connecting
+
+
+
+ ServicePulse v{{ environment.sp_version }}
+
+ ServicePulse v{{ environment.sp_version }} (
+ v{{ newVersions.newSCVersion.newscversionnumber }} available)
+
+
SC Monitoring:
diff --git a/src/Frontend/src/components/ServiceControlAvailable.vue b/src/Frontend/src/components/ServiceControlAvailable.vue
index b40c6dc31f..3558e55085 100644
--- a/src/Frontend/src/components/ServiceControlAvailable.vue
+++ b/src/Frontend/src/components/ServiceControlAvailable.vue
@@ -6,6 +6,7 @@ import serviceControlClient from "@/components/serviceControlClient";
const { store: connectionStore } = useConnectionsAndStatsAutoRefresh();
const connectionState = connectionStore.connectionState;
+const isEmbedded = window.defaultConfig.embedded;
@@ -19,7 +20,7 @@ const connectionState = connectionStore.connectionState;
{{ serviceControlClient.url }}. Please ensure that ServiceControl is running and accessible from your machine.
-