mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-28 14:14:08 +00:00
renamed params
This commit is contained in:
@@ -4,11 +4,8 @@ PORTAL_RUNNER_PASSWORD=
|
|||||||
PORTAL_RUNNER_SUBSCRIPTION=
|
PORTAL_RUNNER_SUBSCRIPTION=
|
||||||
PORTAL_RUNNER_RESOURCE_GROUP=
|
PORTAL_RUNNER_RESOURCE_GROUP=
|
||||||
PORTAL_RUNNER_DATABASE_ACCOUNT=
|
PORTAL_RUNNER_DATABASE_ACCOUNT=
|
||||||
|
PORTAL_RUNNER_KEY=
|
||||||
PORTAL_RUNNER_CONNECTION_STRING=
|
PORTAL_RUNNER_CONNECTION_STRING=
|
||||||
NOTEBOOKS_TEST_RUNNER_TENANT_ID=
|
NOTEBOOKS_TEST_RUNNER_TENANT_ID=
|
||||||
NOTEBOOKS_TEST_RUNNER_CLIENT_ID=
|
NOTEBOOKS_TEST_RUNNER_CLIENT_ID=
|
||||||
NOTEBOOKS_TEST_RUNNER_CLIENT_SECRET=
|
NOTEBOOKS_TEST_RUNNER_CLIENT_SECRET=
|
||||||
NOTEBOOKS_ACCOUNT_SUBSCRIPTION_ID=
|
|
||||||
NOTEBOOKS_ACCOUNT_RESOURCE_GROUP=
|
|
||||||
NOTEBOOKS_ACCOUNT_NAME=
|
|
||||||
NOTEBOOKS_ACCOUNT_KEY=
|
|
||||||
@@ -10,18 +10,18 @@ export const getTestExplorerFrame = async (): Promise<Frame> => {
|
|||||||
return testExplorerFrame;
|
return testExplorerFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
const notebooksTestRunnerApplicationId = process.env.NOTEBOOKS_TEST_RUNNER_TENANT_ID;
|
const notebooksTestRunnerTenantId = process.env.NOTEBOOKS_TEST_RUNNER_TENANT_ID;
|
||||||
const notebooksTestRunnerClientId = process.env.NOTEBOOKS_TEST_RUNNER_CLIENT_ID;
|
const notebooksTestRunnerClientId = process.env.NOTEBOOKS_TEST_RUNNER_CLIENT_ID;
|
||||||
const notebooksTestRunnerClientSecret = process.env.NOTEBOOKS_TEST_RUNNER_CLIENT_SECRET;
|
const notebooksTestRunnerClientSecret = process.env.NOTEBOOKS_TEST_RUNNER_CLIENT_SECRET;
|
||||||
const notebooksAccountName = process.env.NOTEBOOKS_ACCOUNT_NAME;
|
const portalRunnerDatabaseAccount = process.env.PORTAL_RUNNER_DATABASE_ACCOUNT;
|
||||||
const notebooksAccountKey = process.env.NOTEBOOKS_ACCOUNT_KEY;
|
const portalRunnerKey = process.env.PORTAL_RUNNER_KEY;
|
||||||
const notebooksAccountSubscriptonId = process.env.NOTEBOOKS_ACCOUNT_SUBSCRIPTION_ID;
|
const portalRunnerSubscripton = process.env.PORTAL_RUNNER_SUBSCRIPTION;
|
||||||
const notebooksAccountResourceGroup = process.env.NOTEBOOKS_ACCOUNT_RESOURCE_GROUP;
|
const portalRunnerResourceGroup = process.env.PORTAL_RUNNER_RESOURCE_GROUP;
|
||||||
|
|
||||||
const testExplorerUrl = new URL("testExplorer.html", "https://localhost:1234");
|
const testExplorerUrl = new URL("testExplorer.html", "https://localhost:1234");
|
||||||
testExplorerUrl.searchParams.append(
|
testExplorerUrl.searchParams.append(
|
||||||
TestExplorerParams.notebooksTestRunnerApplicationId,
|
TestExplorerParams.notebooksTestRunnerTenantId,
|
||||||
encodeURI(notebooksTestRunnerApplicationId)
|
encodeURI(notebooksTestRunnerTenantId)
|
||||||
);
|
);
|
||||||
testExplorerUrl.searchParams.append(
|
testExplorerUrl.searchParams.append(
|
||||||
TestExplorerParams.notebooksTestRunnerClientId,
|
TestExplorerParams.notebooksTestRunnerClientId,
|
||||||
@@ -31,15 +31,15 @@ export const getTestExplorerFrame = async (): Promise<Frame> => {
|
|||||||
TestExplorerParams.notebooksTestRunnerClientSecret,
|
TestExplorerParams.notebooksTestRunnerClientSecret,
|
||||||
encodeURI(notebooksTestRunnerClientSecret)
|
encodeURI(notebooksTestRunnerClientSecret)
|
||||||
);
|
);
|
||||||
testExplorerUrl.searchParams.append(TestExplorerParams.notebooksAccountName, encodeURI(notebooksAccountName));
|
|
||||||
testExplorerUrl.searchParams.append(TestExplorerParams.notebooksAccountKey, encodeURI(notebooksAccountKey));
|
|
||||||
testExplorerUrl.searchParams.append(
|
testExplorerUrl.searchParams.append(
|
||||||
TestExplorerParams.notebooksAccountSubscriptonId,
|
TestExplorerParams.portalRunnerDatabaseAccount,
|
||||||
encodeURI(notebooksAccountSubscriptonId)
|
encodeURI(portalRunnerDatabaseAccount)
|
||||||
);
|
);
|
||||||
|
testExplorerUrl.searchParams.append(TestExplorerParams.portalRunnerKey, encodeURI(portalRunnerKey));
|
||||||
|
testExplorerUrl.searchParams.append(TestExplorerParams.portalRunnerSubscripton, encodeURI(portalRunnerSubscripton));
|
||||||
testExplorerUrl.searchParams.append(
|
testExplorerUrl.searchParams.append(
|
||||||
TestExplorerParams.notebooksAccountResourceGroup,
|
TestExplorerParams.portalRunnerResourceGroup,
|
||||||
encodeURI(notebooksAccountResourceGroup)
|
encodeURI(portalRunnerResourceGroup)
|
||||||
);
|
);
|
||||||
|
|
||||||
await page.goto(testExplorerUrl.toString());
|
await page.goto(testExplorerUrl.toString());
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ const initTestExplorer = async (): Promise<void> => {
|
|||||||
window.addEventListener("message", handleMessage, false);
|
window.addEventListener("message", handleMessage, false);
|
||||||
|
|
||||||
const urlSearchParams = new URLSearchParams(window.location.search);
|
const urlSearchParams = new URLSearchParams(window.location.search);
|
||||||
const notebooksTestRunnerApplicationId = decodeURIComponent(
|
const notebooksTestRunnerTenantId = decodeURIComponent(
|
||||||
urlSearchParams.get(TestExplorerParams.notebooksTestRunnerApplicationId)
|
urlSearchParams.get(TestExplorerParams.notebooksTestRunnerTenantId)
|
||||||
);
|
);
|
||||||
const notebooksTestRunnerClientId = decodeURIComponent(
|
const notebooksTestRunnerClientId = decodeURIComponent(
|
||||||
urlSearchParams.get(TestExplorerParams.notebooksTestRunnerClientId)
|
urlSearchParams.get(TestExplorerParams.notebooksTestRunnerClientId)
|
||||||
@@ -77,33 +77,33 @@ const initTestExplorer = async (): Promise<void> => {
|
|||||||
const notebooksTestRunnerClientSecret = decodeURIComponent(
|
const notebooksTestRunnerClientSecret = decodeURIComponent(
|
||||||
urlSearchParams.get(TestExplorerParams.notebooksTestRunnerClientSecret)
|
urlSearchParams.get(TestExplorerParams.notebooksTestRunnerClientSecret)
|
||||||
);
|
);
|
||||||
const notebooksAccountName = decodeURIComponent(urlSearchParams.get(TestExplorerParams.notebooksAccountName));
|
const portalRunnerDatabaseAccount = decodeURIComponent(
|
||||||
const notebooksAccountKey = decodeURIComponent(urlSearchParams.get(TestExplorerParams.notebooksAccountKey));
|
urlSearchParams.get(TestExplorerParams.portalRunnerDatabaseAccount)
|
||||||
const notebooksAccountSubscriptonId = decodeURIComponent(
|
|
||||||
urlSearchParams.get(TestExplorerParams.notebooksAccountSubscriptonId)
|
|
||||||
);
|
);
|
||||||
const notebooksAccountResourceGroup = decodeURIComponent(
|
const portalRunnerKey = decodeURIComponent(urlSearchParams.get(TestExplorerParams.portalRunnerKey));
|
||||||
urlSearchParams.get(TestExplorerParams.notebooksAccountResourceGroup)
|
const portalRunnerSubscripton = decodeURIComponent(urlSearchParams.get(TestExplorerParams.portalRunnerSubscripton));
|
||||||
|
const portalRunnerResourceGroup = decodeURIComponent(
|
||||||
|
urlSearchParams.get(TestExplorerParams.portalRunnerResourceGroup)
|
||||||
);
|
);
|
||||||
|
|
||||||
const token = await AADLogin(
|
const token = await AADLogin(
|
||||||
notebooksTestRunnerApplicationId,
|
notebooksTestRunnerTenantId,
|
||||||
notebooksTestRunnerClientId,
|
notebooksTestRunnerClientId,
|
||||||
notebooksTestRunnerClientSecret
|
notebooksTestRunnerClientSecret
|
||||||
);
|
);
|
||||||
const databaseAccount = await getDatabaseAccount(
|
const databaseAccount = await getDatabaseAccount(
|
||||||
token,
|
token,
|
||||||
notebooksAccountSubscriptonId,
|
portalRunnerSubscripton,
|
||||||
notebooksAccountResourceGroup,
|
portalRunnerResourceGroup,
|
||||||
notebooksAccountName
|
portalRunnerDatabaseAccount
|
||||||
);
|
);
|
||||||
|
|
||||||
const initTestExplorerContent = {
|
const initTestExplorerContent = {
|
||||||
type: MessageTypes.InitTestExplorer,
|
type: MessageTypes.InitTestExplorer,
|
||||||
inputs: {
|
inputs: {
|
||||||
databaseAccount: databaseAccount,
|
databaseAccount: databaseAccount,
|
||||||
subscriptionId: notebooksAccountSubscriptonId,
|
subscriptionId: portalRunnerSubscripton,
|
||||||
resourceGroup: notebooksAccountResourceGroup,
|
resourceGroup: portalRunnerResourceGroup,
|
||||||
authorizationToken: `Bearer ${token}`,
|
authorizationToken: `Bearer ${token}`,
|
||||||
features: {},
|
features: {},
|
||||||
hasWriteAccess: true,
|
hasWriteAccess: true,
|
||||||
@@ -115,7 +115,7 @@ const initTestExplorer = async (): Promise<void> => {
|
|||||||
quotaId: "Internal_2014-09-01",
|
quotaId: "Internal_2014-09-01",
|
||||||
addCollectionDefaultFlight: "2",
|
addCollectionDefaultFlight: "2",
|
||||||
isTryCosmosDBSubscription: false,
|
isTryCosmosDBSubscription: false,
|
||||||
masterKey: notebooksAccountKey,
|
masterKey: portalRunnerKey,
|
||||||
loadDatabaseAccountTimestamp: 1604663109836,
|
loadDatabaseAccountTimestamp: 1604663109836,
|
||||||
dataExplorerVersion: "1.0.1",
|
dataExplorerVersion: "1.0.1",
|
||||||
sharedThroughputMinimum: 400,
|
sharedThroughputMinimum: 400,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
export enum TestExplorerParams {
|
export enum TestExplorerParams {
|
||||||
notebooksTestRunnerApplicationId = "notebooksTestRunnerApplicationId",
|
notebooksTestRunnerTenantId = "notebooksTestRunnerTenantId",
|
||||||
notebooksTestRunnerClientId = "notebooksTestRunnerClientId",
|
notebooksTestRunnerClientId = "notebooksTestRunnerClientId",
|
||||||
notebooksTestRunnerClientSecret = "notebooksTestRunnerClientSecret",
|
notebooksTestRunnerClientSecret = "notebooksTestRunnerClientSecret",
|
||||||
notebooksAccountName = "notebooksAccountName",
|
portalRunnerDatabaseAccount = "notebooksAccountName",
|
||||||
notebooksAccountKey = "notebooksAccountKey",
|
portalRunnerKey = "notebooksAccountKey",
|
||||||
notebooksAccountSubscriptonId = "notebooksAccountSubscriptonId",
|
portalRunnerSubscripton = "notebooksAccountSubscriptonId",
|
||||||
notebooksAccountResourceGroup = "notebooksAccountResourceGroup"
|
portalRunnerResourceGroup = "notebooksAccountResourceGroup"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user