mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-23 20:48:11 +00:00
UI for RU/GB waiver preview feature
This commit is contained in:
parent
34d8704071
commit
a293a87528
@ -85,6 +85,13 @@
|
|||||||
<span>Learn more about minimum throughput </span>
|
<span>Learn more about minimum throughput </span>
|
||||||
<a href="https://docs.microsoft.com/azure/cosmos-db/set-throughput" target="_blank">here.</a>
|
<a href="https://docs.microsoft.com/azure/cosmos-db/set-throughput" target="_blank">here.</a>
|
||||||
</p>
|
</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">
|
<p data-bind="visible: canRequestSupport">
|
||||||
<!-- TODO: Replace link with call to the Azure Support blade -->
|
<!-- TODO: Replace link with call to the Azure Support blade -->
|
||||||
<a href="https://aka.ms/cosmosdbfeedback?subject=Cosmos%20DB%20More%20Throughput%20Request"
|
<a href="https://aka.ms/cosmosdbfeedback?subject=Cosmos%20DB%20More%20Throughput%20Request"
|
||||||
|
@ -61,6 +61,7 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
|
|||||||
public saveSettingsButton: ViewModels.Button;
|
public saveSettingsButton: ViewModels.Button;
|
||||||
public discardSettingsChangesButton: ViewModels.Button;
|
public discardSettingsChangesButton: ViewModels.Button;
|
||||||
|
|
||||||
|
public canRequestBelowMinRU: ko.PureComputed<boolean>;
|
||||||
public canRequestSupport: ko.PureComputed<boolean>;
|
public canRequestSupport: ko.PureComputed<boolean>;
|
||||||
public canThroughputExceedMaximumValue: ko.Computed<boolean>;
|
public canThroughputExceedMaximumValue: ko.Computed<boolean>;
|
||||||
public costsVisible: 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 isTemplateReady: ko.Observable<boolean>;
|
||||||
public minRUAnotationVisible: ko.Computed<boolean>;
|
public minRUAnotationVisible: ko.Computed<boolean>;
|
||||||
public minRUs: ko.Computed<number>;
|
public minRUs: ko.Computed<number>;
|
||||||
|
public minRUsText: ko.PureComputed<string>;
|
||||||
public maxRUs: ko.Computed<number>;
|
public maxRUs: ko.Computed<number>;
|
||||||
public maxRUsText: ko.PureComputed<string>;
|
public maxRUsText: ko.PureComputed<string>;
|
||||||
public maxRUThroughputInputLimit: ko.Computed<number>;
|
public maxRUThroughputInputLimit: ko.Computed<number>;
|
||||||
@ -203,6 +205,11 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
|
|||||||
this.canThroughputExceedMaximumValue = ko.pureComputed<boolean>(
|
this.canThroughputExceedMaximumValue = ko.pureComputed<boolean>(
|
||||||
() => configContext.platform === Platform.Portal && !this.container.isRunningOnNationalCloud()
|
() => configContext.platform === Platform.Portal && !this.container.isRunningOnNationalCloud()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.canRequestBelowMinRU = ko.pureComputed(() => {
|
||||||
|
return true; // TODO: Implement and test
|
||||||
|
});
|
||||||
|
|
||||||
this.canRequestSupport = ko.pureComputed(() => {
|
this.canRequestSupport = ko.pureComputed(() => {
|
||||||
if (
|
if (
|
||||||
configContext.platform === Platform.Emulator ||
|
configContext.platform === Platform.Emulator ||
|
||||||
@ -277,6 +284,8 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
|
|||||||
return this.maxRUs();
|
return this.maxRUs();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.minRUsText = ko.pureComputed(() => this.minRUs().toLocaleString());
|
||||||
|
|
||||||
this.maxRUsText = ko.pureComputed(() => {
|
this.maxRUsText = ko.pureComputed(() => {
|
||||||
return SharedConstants.CollectionCreation.DefaultCollectionRUs1Million.toLocaleString();
|
return SharedConstants.CollectionCreation.DefaultCollectionRUs1Million.toLocaleString();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user