22import { computed , watch } from " vue" ;
33import { useRouter } from " vue-router" ;
44import " bootstrap" ;
5- import { monitoringUrl , serviceControlUrl , useIsMonitoringDisabled } from " @/composables/serviceServiceControlUrls" ;
6- import { monitoringConnectionState , connectionState , environment } from " @/composables/serviceServiceControl" ;
5+ import { monitoringUrl , serviceControlUrl , isMonitoringDisabled } from " @/composables/serviceServiceControlUrls" ;
76import routeLinks from " @/router/routeLinks" ;
87import { useShowToast } from " @/composables/toast" ;
98import { TYPE } from " vue-toastification" ;
9+ import useConnectionsAndStatsAutoRefresh from " @/composables/useConnectionsAndStatsAutoRefresh" ;
10+ import useEnvironmentAndVersionsAutoRefresh from " @/composables/useEnvironmentAndVersionsAutoRefresh" ;
1011
1112const router = useRouter ();
1213
14+ const { store : connectionStore } = useConnectionsAndStatsAutoRefresh ();
15+ const connectionState = connectionStore .connectionState ;
16+ const monitoringConnectionState = connectionStore .monitoringConnectionState ;
17+ const { store : environmentStore } = useEnvironmentAndVersionsAutoRefresh ();
18+ const environment = environmentStore .environment ;
19+
1320const primaryConnectionFailure = computed (() => connectionState .unableToConnect );
1421const monitoringConnectionFailure = computed (() => monitoringConnectionState .unableToConnect );
1522
@@ -27,7 +34,7 @@ watch(primaryConnectionFailure, (newValue, oldValue) => {
2734
2835watch (monitoringConnectionFailure , (newValue , oldValue ) => {
2936 // Only watch the state change if monitoring is enabled
30- if (useIsMonitoringDisabled ()) {
37+ if (isMonitoringDisabled ()) {
3138 return ;
3239 }
3340
0 commit comments