From a293a87528e2117e87f22ad73c251145fe87e7db Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Tue, 20 Oct 2020 01:37:39 -0700 Subject: [PATCH] UI for RU/GB waiver preview feature --- src/Explorer/Tabs/DatabaseSettingsTab.html | 7 +++++++ src/Explorer/Tabs/DatabaseSettingsTab.ts | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Explorer/Tabs/DatabaseSettingsTab.html b/src/Explorer/Tabs/DatabaseSettingsTab.html index fb1dfd4c1..5111fd2b6 100644 --- a/src/Explorer/Tabs/DatabaseSettingsTab.html +++ b/src/Explorer/Tabs/DatabaseSettingsTab.html @@ -85,6 +85,13 @@ Learn more about minimum throughput here.

+

+ Need to scale below RU/s? Reach out by filling + this questionnaire. +

; public canRequestSupport: ko.PureComputed; public canThroughputExceedMaximumValue: ko.Computed; public costsVisible: ko.Computed; @@ -68,6 +69,7 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels. public isTemplateReady: ko.Observable; public minRUAnotationVisible: ko.Computed; public minRUs: ko.Computed; + public minRUsText: ko.PureComputed; public maxRUs: ko.Computed; public maxRUsText: ko.PureComputed; public maxRUThroughputInputLimit: ko.Computed; @@ -203,6 +205,11 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels. this.canThroughputExceedMaximumValue = ko.pureComputed( () => configContext.platform === Platform.Portal && !this.container.isRunningOnNationalCloud() ); + + this.canRequestBelowMinRU = ko.pureComputed(() => { + return true; // TODO: Implement and test + }); + this.canRequestSupport = ko.pureComputed(() => { if ( configContext.platform === Platform.Emulator || @@ -277,6 +284,8 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels. return this.maxRUs(); }); + this.minRUsText = ko.pureComputed(() => this.minRUs().toLocaleString()); + this.maxRUsText = ko.pureComputed(() => { return SharedConstants.CollectionCreation.DefaultCollectionRUs1Million.toLocaleString(); });