Adding database specific settings, cancel migration and other dark UI fixes (#14626)

* Made dashboard dark ui compat

* foundations for sql vm

* WIP

* Added cancel migration
Added refresh migraiton table
Added multi db config

* disabling cancel migration button if the migration is not in progress.

* Addressing some PR based coments
- Removing (s) from loc strings
- Adding return type to cancel migration
- removing _ from public vars
- localizing strings
- Adding name to dialogs for telemetry

* Adding todo comment for offline mode
This commit is contained in:
Aasim Khan
2021-03-09 23:40:52 -08:00
committed by GitHub
parent c05ba883c4
commit bfa8ec0301
17 changed files with 492 additions and 199 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { getMigrationStatus, DatabaseMigration, startMigrationCutover } from '../../api/azure';
import { getMigrationStatus, DatabaseMigration, startMigrationCutover, stopMigration } from '../../api/azure';
import { MigrationContext } from '../../models/migrationLocalStorage';
@@ -36,4 +36,19 @@ export class MigrationCutoverDialogModel {
}
return undefined!;
}
public async cancelMigration(): Promise<void> {
try {
if (this.migrationStatus) {
await stopMigration(
this._migration.azureAccount,
this._migration.subscription,
this.migrationStatus
);
}
} catch (error) {
console.log(error);
}
return undefined!;
}
}