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