mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 01:11:25 +00:00
Allow setting of ARM API version via query param (#241)
This commit is contained in:
@@ -25,6 +25,7 @@ interface ConfigContext {
|
||||
GITHUB_CLIENT_ID: string;
|
||||
GITHUB_CLIENT_SECRET?: string; // No need to inject secret for prod. Juno already knows it.
|
||||
hostedExplorerURL: string;
|
||||
armAPIVersion?: string;
|
||||
}
|
||||
|
||||
// Default configuration
|
||||
@@ -93,6 +94,10 @@ export async function initializeConfiguration(): Promise<ConfigContext> {
|
||||
}
|
||||
// Allow override of platform value with URL query parameter
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
if (params.has("armAPIVersion")) {
|
||||
const armAPIVersion = params.get("armAPIVersion") || "";
|
||||
updateConfigContext({ armAPIVersion });
|
||||
}
|
||||
if (params.has("platform")) {
|
||||
const platform = params.get("platform");
|
||||
switch (platform) {
|
||||
|
||||
Reference in New Issue
Block a user