Compare commits

...

2 Commits

Author SHA1 Message Date
Jordi Bunster
3dd25bdb4a Merge branch 'master' into jbunster/ru-gb-waiver 2020-10-21 13:21:13 -07:00
Jordi Bunster
a293a87528 UI for RU/GB waiver preview feature 2020-10-20 01:37:39 -07:00
2 changed files with 16 additions and 0 deletions

View File

@@ -85,6 +85,13 @@
<span>Learn more about minimum throughput </span>
<a href="https://docs.microsoft.com/azure/cosmos-db/set-throughput" target="_blank">here.</a>
</p>
<p data-bind="visible: canRequestBelowMinRU">
Need to scale below <span data-bind="text: minRUsText"></span> RU/s? Reach out by filling
<a
href="https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRzBPrdEMjvxPuDm8fCLUtXpUQ0JLV1Y5VVlDS1RNUE1aRzVHQlVQTVA1SS4u"
>this questionnaire</a
>.
</p>
<p data-bind="visible: canRequestSupport">
<!-- TODO: Replace link with call to the Azure Support blade -->
<a href="https://aka.ms/cosmosdbfeedback?subject=Cosmos%20DB%20More%20Throughput%20Request"

View File

@@ -61,6 +61,7 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
public saveSettingsButton: ViewModels.Button;
public discardSettingsChangesButton: ViewModels.Button;
public canRequestBelowMinRU: ko.PureComputed<boolean>;
public canRequestSupport: ko.PureComputed<boolean>;
public canThroughputExceedMaximumValue: ko.Computed<boolean>;
public costsVisible: ko.Computed<boolean>;
@@ -68,6 +69,7 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
public isTemplateReady: ko.Observable<boolean>;
public minRUAnotationVisible: ko.Computed<boolean>;
public minRUs: ko.Computed<number>;
public minRUsText: ko.PureComputed<string>;
public maxRUs: ko.Computed<number>;
public maxRUsText: ko.PureComputed<string>;
public maxRUThroughputInputLimit: ko.Computed<number>;
@@ -203,6 +205,11 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
this.canThroughputExceedMaximumValue = ko.pureComputed<boolean>(
() => 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();
});