mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add readable secondaries and sync secondary to commit to SQL MIAA create (#19740)
* Added syncSecondaryToCommit to SQL update and create, as well as notebook, wizard, and compute+storage interfaces * Added readable secondaries and syncSecondaryToCommit to cost and SQL MI create * Added readable secondaries to notebook * removed resource-deployment changes Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
@@ -19,6 +19,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
private coresRequestBox?: azdata.InputBoxComponent;
|
||||
private memoryLimitBox?: azdata.InputBoxComponent;
|
||||
private memoryRequestBox?: azdata.InputBoxComponent;
|
||||
private syncSecondaryToCommitBox?: azdata.InputBoxComponent;
|
||||
|
||||
private discardButton?: azdata.ButtonComponent;
|
||||
private saveButton?: azdata.ButtonComponent;
|
||||
@@ -27,7 +28,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
coresLimit?: string,
|
||||
coresRequest?: string,
|
||||
memoryLimit?: string,
|
||||
memoryRequest?: string
|
||||
memoryRequest?: string,
|
||||
syncSecondaryToCommit?: string
|
||||
} = {};
|
||||
|
||||
private readonly _azApi: azExt.IExtension;
|
||||
@@ -180,6 +182,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
try {
|
||||
this.editCores();
|
||||
this.editMemory();
|
||||
this.editSyncSecondaryToCommit();
|
||||
} catch (error) {
|
||||
vscode.window.showErrorMessage(loc.pageDiscardFailed(error));
|
||||
} finally {
|
||||
@@ -266,19 +269,39 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
})
|
||||
);
|
||||
|
||||
this.syncSecondaryToCommitBox = this.modelView.modelBuilder.inputBox().withProps({
|
||||
readOnly: false,
|
||||
min: -1,
|
||||
inputType: 'number',
|
||||
placeHolder: loc.loading,
|
||||
ariaLabel: loc.syncSecondaryToCommit
|
||||
}).component();
|
||||
|
||||
this.disposables.push(
|
||||
this.syncSecondaryToCommitBox.onTextChanged(() => {
|
||||
if (!(this.handleOnTextChanged(this.syncSecondaryToCommitBox!))) {
|
||||
this.saveArgs.syncSecondaryToCommit = undefined;
|
||||
} else {
|
||||
this.saveArgs.syncSecondaryToCommit = this.syncSecondaryToCommitBox!.value;
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
private createUserInputSection(): azdata.Component[] {
|
||||
if (this._miaaModel.configLastUpdated) {
|
||||
this.editCores();
|
||||
this.editMemory();
|
||||
this.editSyncSecondaryToCommit();
|
||||
}
|
||||
|
||||
return [
|
||||
this.createConfigurationSectionContainer(loc.coresRequest, this.coresRequestBox!),
|
||||
this.createConfigurationSectionContainer(loc.coresLimit, this.coresLimitBox!),
|
||||
this.createConfigurationSectionContainer(loc.memoryRequest, this.memoryRequestBox!),
|
||||
this.createConfigurationSectionContainer(loc.memoryLimit, this.memoryLimitBox!)
|
||||
this.createConfigurationSectionContainer(loc.memoryLimit, this.memoryLimitBox!),
|
||||
this.createConfigurationSectionContainer(loc.syncSecondaryToCommit, this.syncSecondaryToCommitBox!),
|
||||
|
||||
];
|
||||
}
|
||||
@@ -380,8 +403,18 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
this.saveArgs.memoryLimit = undefined;
|
||||
}
|
||||
|
||||
private editSyncSecondaryToCommit(): void {
|
||||
let currentSyncSecondaryToCommit = this._miaaModel.config?.spec?.syncSecondaryToCommit;
|
||||
|
||||
this.syncSecondaryToCommitBox!.placeHolder = currentSyncSecondaryToCommit!;
|
||||
this.syncSecondaryToCommitBox!.value = '';
|
||||
|
||||
this.saveArgs.syncSecondaryToCommit = undefined;
|
||||
}
|
||||
|
||||
private handleServiceUpdated() {
|
||||
this.editCores();
|
||||
this.editMemory();
|
||||
this.editSyncSecondaryToCommit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user