Update task labels for Attach, Detach, and Drop Database (#24289)

This commit is contained in:
Cory Rivera
2023-09-05 16:21:09 -07:00
committed by GitHub
parent 62363999eb
commit ec91de78e5
5 changed files with 46 additions and 21 deletions

View File

@@ -62,12 +62,16 @@ export abstract class ObjectManagementDialogBase<ObjectInfoType extends ObjectMa
await this.objectManagementService.save(this._contextId, this.objectInfo);
}
protected get saveChangesTaskLabel(): string {
const typeDisplayName = localizedConstants.getNodeTypeDisplayName(this.options.objectType);
return this.options.isNewObject ? localizedConstants.CreateObjectOperationDisplayName(typeDisplayName)
: localizedConstants.UpdateObjectOperationDisplayName(typeDisplayName, this.options.objectName);
}
protected override async initialize(): Promise<void> {
await super.initialize();
const typeDisplayName = localizedConstants.getNodeTypeDisplayName(this.options.objectType);
this.dialogObject.registerOperation({
displayName: this.options.isNewObject ? localizedConstants.CreateObjectOperationDisplayName(typeDisplayName)
: localizedConstants.UpdateObjectOperationDisplayName(typeDisplayName, this.options.objectName),
displayName: this.saveChangesTaskLabel,
description: '',
isCancelable: false,
operation: async (operation: azdata.BackgroundOperation): Promise<void> => {