mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
[SQL Migration] Add state check to target MI resource on target selection page (#18673)
* Add MI ready state check and error message * Fix a typo * Update error message logic * Update '(Unavailable)' prefix to be localized string * Show error messsage when non-Ready MI is initially selected (not just on Next button) * Update error message with appropriate casing and actionable step
This commit is contained in:
@@ -1008,10 +1008,21 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
}
|
||||
|
||||
this._targetManagedInstances.forEach((managedInstance) => {
|
||||
managedInstanceValues.push({
|
||||
name: managedInstance.id,
|
||||
displayName: `${managedInstance.name}`
|
||||
});
|
||||
let managedInstanceValue: azdata.CategoryValue;
|
||||
|
||||
if (managedInstance.properties.state === 'Ready') {
|
||||
managedInstanceValue = {
|
||||
name: managedInstance.id,
|
||||
displayName: `${managedInstance.name}`
|
||||
};
|
||||
} else {
|
||||
managedInstanceValue = {
|
||||
name: managedInstance.id,
|
||||
displayName: constants.UNAVAILABLE_MANAGED_INSTANCE_PREFIX(managedInstance.name)
|
||||
};
|
||||
}
|
||||
|
||||
managedInstanceValues.push(managedInstanceValue);
|
||||
});
|
||||
|
||||
if (managedInstanceValues.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user