mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 01:25:38 -05:00
Fixes to SQL MIAA Compute + Storage page (#20272)
* Max for syncsecondary. Fix syncsecondary update. * Update the value not the placeholder for SQL MIAA * Disable save toolbar icon after save/update complete Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
@@ -262,6 +262,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
this.syncSecondaryToCommitBox = this.modelView.modelBuilder.inputBox().withProps({
|
||||
readOnly: false,
|
||||
min: -1,
|
||||
max: 2,
|
||||
inputType: 'number',
|
||||
placeHolder: loc.loading,
|
||||
ariaLabel: loc.syncSecondaryToCommit
|
||||
@@ -323,7 +324,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
}
|
||||
|
||||
private handleOnTextChanged(component: azdata.InputBoxComponent): boolean {
|
||||
if ((!component.value)) {
|
||||
if ((!component.placeHolder)) {
|
||||
// if there is no text found in the inputbox component return false
|
||||
return false;
|
||||
} else if ((!component.valid)) {
|
||||
@@ -349,8 +350,9 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
currentCPUSize = '';
|
||||
}
|
||||
|
||||
this.coresRequestBox!.placeHolder = currentCPUSize;
|
||||
this.coresRequestBox!.value = '';
|
||||
this.coresRequestBox!.value = currentCPUSize;
|
||||
this.coresRequestBox!.placeHolder = '';
|
||||
|
||||
this.saveArgs.coresRequest = undefined;
|
||||
|
||||
currentCPUSize = this._miaaModel.config?.spec?.scheduling?.default?.resources?.limits?.cpu;
|
||||
@@ -359,8 +361,9 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
currentCPUSize = '';
|
||||
}
|
||||
|
||||
this.coresLimitBox!.placeHolder = currentCPUSize;
|
||||
this.coresLimitBox!.value = '';
|
||||
this.coresLimitBox!.value = currentCPUSize;
|
||||
this.coresLimitBox!.placeHolder = '';
|
||||
|
||||
this.saveArgs.coresLimit = undefined;
|
||||
}
|
||||
|
||||
@@ -374,8 +377,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
currentMemSizeConversion = convertToGibibyteString(currentMemorySize);
|
||||
}
|
||||
|
||||
this.memoryRequestBox!.placeHolder = currentMemSizeConversion!;
|
||||
this.memoryRequestBox!.value = '';
|
||||
this.memoryRequestBox!.value = currentMemSizeConversion!;
|
||||
this.memoryRequestBox!.placeHolder = '';
|
||||
|
||||
this.saveArgs.memoryRequest = undefined;
|
||||
|
||||
@@ -387,8 +390,9 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
currentMemSizeConversion = convertToGibibyteString(currentMemorySize);
|
||||
}
|
||||
|
||||
this.memoryLimitBox!.placeHolder = currentMemSizeConversion!;
|
||||
this.memoryLimitBox!.value = '';
|
||||
this.memoryLimitBox!.value = currentMemSizeConversion!;
|
||||
this.memoryLimitBox!.placeHolder = '';
|
||||
|
||||
|
||||
this.saveArgs.memoryLimit = undefined;
|
||||
}
|
||||
@@ -396,8 +400,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
private editSyncSecondaryToCommit(): void {
|
||||
let currentSyncSecondaryToCommit = this._miaaModel.config?.spec?.syncSecondaryToCommit;
|
||||
|
||||
this.syncSecondaryToCommitBox!.placeHolder = currentSyncSecondaryToCommit!;
|
||||
this.syncSecondaryToCommitBox!.value = '';
|
||||
this.syncSecondaryToCommitBox!.value = currentSyncSecondaryToCommit!;
|
||||
this.syncSecondaryToCommitBox!.placeHolder = '';
|
||||
|
||||
this.saveArgs.syncSecondaryToCommit = undefined;
|
||||
}
|
||||
|
||||
@@ -265,6 +265,7 @@ export class AzTool implements azExt.IAzApi {
|
||||
if (args.memoryRequest) { argsArray.push('--memory-request', args.memoryRequest); }
|
||||
if (args.noWait) { argsArray.push('--no-wait'); }
|
||||
if (args.retentionDays) { argsArray.push('--retention-days', args.retentionDays); }
|
||||
if (args.syncSecondaryToCommit) { argsArray.push('--sync-secondary-to-commit', args.syncSecondaryToCommit); }
|
||||
if (resourceGroup) { argsArray.push('--resource-group', resourceGroup); }
|
||||
if (namespace) { argsArray.push('--k8s-namespace', namespace); }
|
||||
if (usek8s) { argsArray.push('--use-k8s'); }
|
||||
|
||||
Reference in New Issue
Block a user