mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-12 07:27:33 +01:00
Fix emulator upload by passing down config.platform
This commit is contained in:
@@ -32,6 +32,7 @@ import DocumentId from "./DocumentId";
|
|||||||
import StoredProcedure from "./StoredProcedure";
|
import StoredProcedure from "./StoredProcedure";
|
||||||
import Trigger from "./Trigger";
|
import Trigger from "./Trigger";
|
||||||
import UserDefinedFunction from "./UserDefinedFunction";
|
import UserDefinedFunction from "./UserDefinedFunction";
|
||||||
|
import { config } from "../../Config";
|
||||||
|
|
||||||
export default class Collection implements ViewModels.Collection {
|
export default class Collection implements ViewModels.Collection {
|
||||||
public nodeKind: string;
|
public nodeKind: string;
|
||||||
@@ -1416,7 +1417,7 @@ export default class Collection implements ViewModels.Collection {
|
|||||||
masterKey: CosmosClient.masterKey(),
|
masterKey: CosmosClient.masterKey(),
|
||||||
endpoint: CosmosClient.endpoint(),
|
endpoint: CosmosClient.endpoint(),
|
||||||
accessToken: CosmosClient.accessToken(),
|
accessToken: CosmosClient.accessToken(),
|
||||||
platform: window.dataExplorerPlatform,
|
platform: config.platform,
|
||||||
databaseAccount: CosmosClient.databaseAccount()
|
databaseAccount: CosmosClient.databaseAccount()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DatabaseAccount } from "../../Contracts/DataModels";
|
import { DatabaseAccount } from "../../Contracts/DataModels";
|
||||||
import { PlatformType } from "../../PlatformType";
|
import { Platform } from "../../Config";
|
||||||
|
|
||||||
export interface StartUploadMessageParams {
|
export interface StartUploadMessageParams {
|
||||||
files: FileList;
|
files: FileList;
|
||||||
@@ -12,7 +12,7 @@ export interface DocumentClientParams {
|
|||||||
masterKey: string;
|
masterKey: string;
|
||||||
endpoint: string;
|
endpoint: string;
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
platform: PlatformType;
|
platform: Platform;
|
||||||
databaseAccount: DatabaseAccount;
|
databaseAccount: DatabaseAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import "babel-polyfill";
|
import "babel-polyfill";
|
||||||
import { DocumentClientParams, UploadDetailsRecord, UploadDetails } from "./definitions";
|
import { DocumentClientParams, UploadDetailsRecord, UploadDetails } from "./definitions";
|
||||||
import { CosmosClient } from "../../Common/CosmosClient";
|
import { CosmosClient } from "../../Common/CosmosClient";
|
||||||
|
import { config } from "../../Config";
|
||||||
|
|
||||||
let numUploadsSuccessful = 0;
|
let numUploadsSuccessful = 0;
|
||||||
let numUploadsFailed = 0;
|
let numUploadsFailed = 0;
|
||||||
@@ -33,8 +34,7 @@ onmessage = (event: MessageEvent) => {
|
|||||||
CosmosClient.endpoint(clientParams.endpoint);
|
CosmosClient.endpoint(clientParams.endpoint);
|
||||||
CosmosClient.accessToken(clientParams.accessToken);
|
CosmosClient.accessToken(clientParams.accessToken);
|
||||||
CosmosClient.databaseAccount(clientParams.databaseAccount);
|
CosmosClient.databaseAccount(clientParams.databaseAccount);
|
||||||
self.dataExplorerPlatform = clientParams.platform;
|
config.platform = clientParams.platform;
|
||||||
console.log(event);
|
|
||||||
if (!!files && files.length > 0) {
|
if (!!files && files.length > 0) {
|
||||||
numFiles = files.length;
|
numFiles = files.length;
|
||||||
for (let i = 0; i < numFiles; i++) {
|
for (let i = 0; i < numFiles; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user