mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-05 18:47:41 +00:00
Prettier 2.0 (#393)
This commit is contained in:
@@ -106,7 +106,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
return `Throughput (${this.minThroughputRU().toLocaleString()} - ${this.maxThroughputRU().toLocaleString()} RU/s)`;
|
||||
});
|
||||
this.userTableQuery = ko.observable<string>("(userid int, name text, email text, PRIMARY KEY (userid))");
|
||||
this.keyspaceId.subscribe(keyspaceId => {
|
||||
this.keyspaceId.subscribe((keyspaceId) => {
|
||||
this.createTableQuery(`CREATE TABLE ${keyspaceId}.`);
|
||||
});
|
||||
|
||||
@@ -297,16 +297,16 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
storage: Constants.BackendDefaults.multiPartitionStorageInGb,
|
||||
offerThroughput: this.throughput(),
|
||||
partitionKey: "",
|
||||
databaseId: this.keyspaceId()
|
||||
databaseId: this.keyspaceId(),
|
||||
}),
|
||||
subscriptionType: SubscriptionType[this.container.subscriptionType()],
|
||||
subscriptionQuotaId: userContext.quotaId,
|
||||
defaultsCheck: {
|
||||
storage: "u",
|
||||
throughput: this.throughput(),
|
||||
flight: this.container.flight()
|
||||
flight: this.container.flight(),
|
||||
},
|
||||
dataExplorerArea: Constants.Areas.ContextualPane
|
||||
dataExplorerArea: Constants.Areas.ContextualPane,
|
||||
};
|
||||
const focusElement = document.getElementById("keyspace-id");
|
||||
focusElement && focusElement.focus();
|
||||
@@ -350,7 +350,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
offerThroughput: this.throughput(),
|
||||
partitionKey: "",
|
||||
databaseId: this.keyspaceId(),
|
||||
hasDedicatedThroughput: this.dedicateTableThroughput()
|
||||
hasDedicatedThroughput: this.dedicateTableThroughput(),
|
||||
}),
|
||||
keyspaceHasSharedOffer: this.keyspaceHasSharedOffer(),
|
||||
subscriptionType: SubscriptionType[this.container.subscriptionType()],
|
||||
@@ -358,12 +358,12 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
defaultsCheck: {
|
||||
storage: "u",
|
||||
throughput: this.throughput(),
|
||||
flight: this.container.flight()
|
||||
flight: this.container.flight(),
|
||||
},
|
||||
dataExplorerArea: Constants.Areas.ContextualPane,
|
||||
toCreateKeyspace: toCreateKeyspace,
|
||||
createKeyspaceQuery: createKeyspaceQuery,
|
||||
createTableQuery: createTableQuery
|
||||
createTableQuery: createTableQuery,
|
||||
};
|
||||
const startKey: number = TelemetryProcessor.traceStart(Action.CreateCollection, addCollectionPaneStartMessage);
|
||||
if (toCreateKeyspace) {
|
||||
@@ -396,7 +396,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
offerThroughput: this.throughput(),
|
||||
partitionKey: "",
|
||||
databaseId: this.keyspaceId(),
|
||||
hasDedicatedThroughput: this.dedicateTableThroughput()
|
||||
hasDedicatedThroughput: this.dedicateTableThroughput(),
|
||||
}),
|
||||
keyspaceHasSharedOffer: this.keyspaceHasSharedOffer(),
|
||||
subscriptionType: SubscriptionType[this.container.subscriptionType()],
|
||||
@@ -404,16 +404,16 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
defaultsCheck: {
|
||||
storage: "u",
|
||||
throughput: this.throughput(),
|
||||
flight: this.container.flight()
|
||||
flight: this.container.flight(),
|
||||
},
|
||||
dataExplorerArea: Constants.Areas.ContextualPane,
|
||||
toCreateKeyspace: toCreateKeyspace,
|
||||
createKeyspaceQuery: createKeyspaceQuery,
|
||||
createTableQuery: createTableQuery
|
||||
createTableQuery: createTableQuery,
|
||||
};
|
||||
TelemetryProcessor.traceSuccess(Action.CreateCollection, addCollectionPaneSuccessMessage, startKey);
|
||||
},
|
||||
error => {
|
||||
(error) => {
|
||||
const errorMessage = getErrorMessage(error);
|
||||
this.formErrors(errorMessage);
|
||||
this.isExecuting(false);
|
||||
@@ -426,7 +426,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
offerThroughput: this.throughput(),
|
||||
partitionKey: "",
|
||||
databaseId: this.keyspaceId(),
|
||||
hasDedicatedThroughput: this.dedicateTableThroughput()
|
||||
hasDedicatedThroughput: this.dedicateTableThroughput(),
|
||||
},
|
||||
keyspaceHasSharedOffer: this.keyspaceHasSharedOffer(),
|
||||
subscriptionType: SubscriptionType[this.container.subscriptionType()],
|
||||
@@ -434,14 +434,14 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
defaultsCheck: {
|
||||
storage: "u",
|
||||
throughput: this.throughput(),
|
||||
flight: this.container.flight()
|
||||
flight: this.container.flight(),
|
||||
},
|
||||
dataExplorerArea: Constants.Areas.ContextualPane,
|
||||
toCreateKeyspace: toCreateKeyspace,
|
||||
createKeyspaceQuery: createKeyspaceQuery,
|
||||
createTableQuery: createTableQuery,
|
||||
error: errorMessage,
|
||||
errorStack: getErrorStack(error)
|
||||
errorStack: getErrorStack(error),
|
||||
};
|
||||
TelemetryProcessor.traceFailure(Action.CreateCollection, addCollectionPaneFailedMessage, startKey);
|
||||
}
|
||||
@@ -536,13 +536,13 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
this.sharedAutoPilotThroughput()
|
||||
) {
|
||||
return {
|
||||
maxThroughput: this.sharedAutoPilotThroughput() * 1
|
||||
maxThroughput: this.sharedAutoPilotThroughput() * 1,
|
||||
};
|
||||
}
|
||||
|
||||
if (this.selectedAutoPilotThroughput()) {
|
||||
return {
|
||||
maxThroughput: this.selectedAutoPilotThroughput() * 1
|
||||
maxThroughput: this.selectedAutoPilotThroughput() * 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user