mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
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:
@@ -10,6 +10,7 @@ import { MigrationContext } from '../../models/migrationLocalStorage';
|
||||
import { MigrationCutoverDialog } from '../migrationCutover/migrationCutoverDialog';
|
||||
import { MigrationCategory, MigrationStatusDialogModel } from './migrationStatusDialogModel';
|
||||
import * as loc from '../../constants/strings';
|
||||
import { getDatabaseMigration } from '../../api/azure';
|
||||
export class MigrationStatusDialog {
|
||||
private _model: MigrationStatusDialogModel;
|
||||
private _dialogObject!: azdata.window.Dialog;
|
||||
@@ -84,6 +85,10 @@ export class MigrationStatusDialog {
|
||||
label: 'Refresh',
|
||||
}).component();
|
||||
|
||||
this._refresh.onDidClick((e) => {
|
||||
this.refreshTable();
|
||||
});
|
||||
|
||||
const flexContainer = this._view.modelBuilder.flexContainer().component();
|
||||
|
||||
flexContainer.addItem(this._searchBox, {
|
||||
@@ -136,7 +141,7 @@ export class MigrationStatusDialog {
|
||||
height: '20px'
|
||||
}).component();
|
||||
const sqlMigrationName = this._view.modelBuilder.hyperlink().withProps({
|
||||
label: migration.migrationContext.name,
|
||||
label: migration.targetManagedInstance.name,
|
||||
url: ''
|
||||
}).component();
|
||||
sqlMigrationName.onDidClick((e) => {
|
||||
@@ -184,6 +189,19 @@ export class MigrationStatusDialog {
|
||||
}
|
||||
}
|
||||
|
||||
private refreshTable(): void {
|
||||
this._model._migrations.forEach(async (migration) => {
|
||||
migration.migrationContext = await getDatabaseMigration(
|
||||
migration.azureAccount,
|
||||
migration.subscription,
|
||||
migration.targetManagedInstance.location,
|
||||
migration.migrationContext.id
|
||||
);
|
||||
});
|
||||
|
||||
this.populateMigrationTable();
|
||||
}
|
||||
|
||||
private createStatusTable(): azdata.DeclarativeTableComponent {
|
||||
this._statusTable = this._view.modelBuilder.declarativeTable().withProps({
|
||||
columns: [
|
||||
|
||||
Reference in New Issue
Block a user