From 627c34655980eae65485c8493ea6126ee31b10d0 Mon Sep 17 00:00:00 2001 From: Steve Faulkner <471400+southpolesteve@users.noreply.github.com> Date: Wed, 11 Nov 2020 15:45:32 -0600 Subject: [PATCH] More cleanup --- src/Explorer/Tabs/DatabaseSettingsTab.html | 10 ------- src/Explorer/Tabs/DatabaseSettingsTab.ts | 31 +--------------------- src/Explorer/Tabs/SettingsTab.ts | 5 ---- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/Explorer/Tabs/DatabaseSettingsTab.html b/src/Explorer/Tabs/DatabaseSettingsTab.html index 866f7eaae..0a4a8b7f3 100644 --- a/src/Explorer/Tabs/DatabaseSettingsTab.html +++ b/src/Explorer/Tabs/DatabaseSettingsTab.html @@ -55,16 +55,6 @@ Learn more about minimum throughput here.

-

- - Contact support - for more than RU/s -

-

- Use Data Explorer from Azure Portal to request more than RU/s -

diff --git a/src/Explorer/Tabs/DatabaseSettingsTab.ts b/src/Explorer/Tabs/DatabaseSettingsTab.ts index 16426986c..0eb7d675e 100644 --- a/src/Explorer/Tabs/DatabaseSettingsTab.ts +++ b/src/Explorer/Tabs/DatabaseSettingsTab.ts @@ -63,8 +63,6 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels. public isTemplateReady: ko.Observable; public minRUAnotationVisible: ko.Computed; public minRUs: ko.Computed; - public maxRUs: ko.Computed; - public maxRUsText: ko.PureComputed; public notificationStatusInfo: ko.Observable; public pendingNotification: ko.Observable; public requestUnitsUsageCost: ko.PureComputed; @@ -207,26 +205,6 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels. return PricingUtils.isLargerThanDefaultMinRU(this.minRUs()); }); - this.maxRUs = ko.computed(() => { - const collectionThroughputInfo: DataModels.OfferThroughputInfo = - this.database && - this.database.offer && - this.database.offer() && - this.database.offer().content && - this.database.offer().content.collectionThroughputInfo; - const numPartitions = collectionThroughputInfo && collectionThroughputInfo.numPhysicalPartitions; - if (!!numPartitions) { - return SharedConstants.CollectionCreation.MaxRUPerPartition * numPartitions; - } - - const throughputDefaults = this.container.collectionCreationDefaults.throughput; - return throughputDefaults.unlimitedmax; - }); - - this.maxRUsText = ko.pureComputed(() => { - return SharedConstants.CollectionCreation.DefaultCollectionRUs1Million.toLocaleString(); - }); - this.throughputTitle = ko.pureComputed(() => { if (this.isAutoPilotSelected()) { return AutoPilotUtils.getAutoPilotHeaderText(); @@ -268,17 +246,10 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels. return throughputApplyShortDelayMessage(this.isAutoPilotSelected(), throughput, this.database.id()); } - if ( - this.maxRUs() <= SharedConstants.CollectionCreation.DefaultCollectionRUs1Million && - this.throughput() > SharedConstants.CollectionCreation.DefaultCollectionRUs1Million - ) { + if (this.throughput() > SharedConstants.CollectionCreation.DefaultCollectionRUs1Million) { return updateThroughputBeyondLimitWarningMessage; } - if (this.throughput() > this.maxRUs()) { - return updateThroughputDelayedApplyWarningMessage; - } - if (this.pendingNotification()) { const matches: string[] = this.pendingNotification().description.match("Throughput update for (.*) RU/s"); const throughput: number = matches.length > 1 && Number(matches[1]); diff --git a/src/Explorer/Tabs/SettingsTab.ts b/src/Explorer/Tabs/SettingsTab.ts index d1dc67bd8..844daac15 100644 --- a/src/Explorer/Tabs/SettingsTab.ts +++ b/src/Explorer/Tabs/SettingsTab.ts @@ -170,7 +170,6 @@ export default class SettingsTab extends TabsBase implements ViewModels.WaitsFor public indexingPolicyElementFocused: ko.Observable; public minRUs: ko.Computed; public minRUAnotationVisible: ko.Computed; - public maxRUsText: ko.PureComputed; public notificationStatusInfo: ko.Observable; public partitionKeyName: ko.Computed; public partitionKeyVisible: ko.PureComputed; @@ -485,10 +484,6 @@ export default class SettingsTab extends TabsBase implements ViewModels.WaitsFor return PricingUtils.isLargerThanDefaultMinRU(this.minRUs()); }); - this.maxRUsText = ko.pureComputed(() => { - return SharedConstants.CollectionCreation.DefaultCollectionRUs1Million.toLocaleString(); - }); - this.throughputTitle = ko.pureComputed(() => { if (this.isAutoPilotSelected()) { return AutoPilotUtils.getAutoPilotHeaderText();