-
Notifications
You must be signed in to change notification settings - Fork 26
Introduced a monitoringClient and serviceControlClient #2725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
265b96f
0efe289
6717d70
c5fef3d
84be3ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,28 +3,21 @@ import { ref } from "vue"; | |
| import { faCheck, faExclamationTriangle } from "@fortawesome/free-solid-svg-icons"; | ||
| import FAIcon from "@/components/FAIcon.vue"; | ||
| import useConnectionsAndStatsAutoRefresh from "@/composables/useConnectionsAndStatsAutoRefresh"; | ||
| import { useServiceControlStore } from "@/stores/ServiceControlStore"; | ||
| import { storeToRefs } from "pinia"; | ||
| import { useMonitoringStore } from "@/stores/MonitoringStore"; | ||
| import serviceControlClient from "@/components/serviceControlClient"; | ||
| import monitoringClient from "../monitoring/monitoringClient"; | ||
|
|
||
| const { store: connectionStore } = useConnectionsAndStatsAutoRefresh(); | ||
| const connectionState = connectionStore.connectionState; | ||
| const monitoringConnectionState = connectionStore.monitoringConnectionState; | ||
|
|
||
| const serviceControlStore = useServiceControlStore(); | ||
| const monitoringStore = useMonitoringStore(); | ||
| serviceControlStore.refresh(); | ||
| monitoringStore.refresh(); | ||
| const localServiceControlUrl = ref(serviceControlStore.serviceControlUrl); | ||
| const localMonitoringUrl = ref(monitoringStore.monitoringUrl); | ||
| const { isMonitoringDisabled } = storeToRefs(monitoringStore); | ||
|
|
||
| const localServiceControlUrl = ref(serviceControlClient.url); | ||
| const localMonitoringUrl = ref(monitoringClient.url); | ||
| const isMonitoringDisabled = monitoringClient.isMonitoringDisabled; | ||
| const testingServiceControl = ref(false); | ||
| const serviceControlValid = ref<boolean | null>(null); | ||
|
|
||
| const testingMonitoring = ref(false); | ||
| const monitoringValid = ref<boolean | null>(null); | ||
|
|
||
| const connectionSaved = ref<boolean | null>(null); | ||
|
|
||
| async function testServiceControlUrl() { | ||
|
|
@@ -82,13 +75,10 @@ function updateServiceControlUrls() { | |
| localMonitoringUrl.value += "/"; | ||
| } | ||
|
|
||
| //values have changed. They'll be reset after page reloads | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my understanding is that these values are used in determining the url that's actually used in the SC and monitoring clients, so wouldn't this logic still be necessary?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is now handled in the client getUrl? const existingScu = window.localStorage.getItem("scu");
if (scu) {
if (scu !== existingScu) {
window.localStorage.setItem("scu", scu);
}
return scu;
} |
||
| window.localStorage.removeItem("scu"); | ||
| window.localStorage.removeItem("mu"); | ||
|
|
||
| const newSearch = `?scu=${localServiceControlUrl.value}&mu=${localMonitoringUrl.value}`; | ||
| console.debug("updateConnections - new query string: ", newSearch); | ||
| window.location.search = newSearch; | ||
| const params = new URLSearchParams(); | ||
| params.set("scu", localServiceControlUrl.value); | ||
| params.set("mu", localMonitoringUrl.value); | ||
| window.location.search = `?${params.toString()}`; | ||
| } | ||
| </script> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.