Skip to content

Conversation

@PhilBastian
Copy link
Contributor

@PhilBastian PhilBastian commented Oct 28, 2025

part of #1905

Comment on lines +272 to +273
isMonitoringDisabled,
isMonitoringEnabled,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need two?

Copy link
Contributor Author

@PhilBastian PhilBastian Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¯_(ツ)_/¯. I guess it makes it more readable in the usage sites if it's a positive or negative based usage

Comment on lines +284 to +286
fetchTypedFromMonitoring,
deleteFromMonitoring,
optionsFromMonitoring,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be typed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you're referring to

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example, instead of await monitoringStore.fetchTypedFromMonitoring<EndpointDetails>(${monitored-endpoints}/${endpointName}?history=${historyPeriod}); we would call monitoringStore.getHistory(endpointName, historyPeriod)
Or instead of monitoringStore.fetchTypedFromMonitoring<number>("monitored-endpoints/disconnected"), we would call monitoringStore.disconnected()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we applied the same logic to the servicecontrolstore, we'd have ~100 different functions exposed from the store.
It's an idea worth exploring, but not as part of this refactor IMO

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really a store, just utilities

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah but couldn't find a good place for it so I just put it coexistent with the stores that use it

Comment on lines +6 to +19
export function getParams() {
const params: Param[] = [];

if (!window.location.search) return params;

const searchParams = window.location.search.split("&");

searchParams.forEach((p) => {
p = p.startsWith("?") ? p.substring(1, p.length) : p;
const singleParam = p.split("=");
params.push({ name: singleParam[0], value: singleParam[1] });
});
return params;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can change in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants