mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fixing filters and removing not started migration tile (#14903)
This commit is contained in:
@@ -473,9 +473,6 @@ export class DashboardWidget {
|
|||||||
this._notStartedMigrationCard.container.onDidClick((e) => {
|
this._notStartedMigrationCard.container.onDidClick((e) => {
|
||||||
vscode.window.showInformationMessage('Feature coming soon');
|
vscode.window.showInformationMessage('Feature coming soon');
|
||||||
});
|
});
|
||||||
this._migrationStatusCardsContainer.addItem(
|
|
||||||
this._notStartedMigrationCard.container
|
|
||||||
);
|
|
||||||
|
|
||||||
this._migrationStatusCardLoadingContainer = view.modelBuilder.loadingComponent().withItem(this._migrationStatusCardsContainer).component();
|
this._migrationStatusCardLoadingContainer = view.modelBuilder.loadingComponent().withItem(this._migrationStatusCardsContainer).component();
|
||||||
|
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
|||||||
let managedInstanceValues: azdata.CategoryValue[] = [];
|
let managedInstanceValues: azdata.CategoryValue[] = [];
|
||||||
try {
|
try {
|
||||||
this._targetManagedInstances = (await getAvailableManagedInstanceProducts(this._azureAccount, subscription)).filter((mi) => {
|
this._targetManagedInstances = (await getAvailableManagedInstanceProducts(this._azureAccount, subscription)).filter((mi) => {
|
||||||
if (mi.location === location.name && mi.resourceGroup?.toLocaleLowerCase() === resourceGroup.name.toLowerCase()) {
|
if (mi.location.toLowerCase() === location.name.toLowerCase() && mi.resourceGroup?.toLowerCase() === resourceGroup.name.toLowerCase()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -489,7 +489,10 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
|||||||
public async getStorageAccountValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
|
public async getStorageAccountValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
|
||||||
let storageAccountValues: azdata.CategoryValue[] = [];
|
let storageAccountValues: azdata.CategoryValue[] = [];
|
||||||
try {
|
try {
|
||||||
this._storageAccounts = (await getAvailableStorageAccounts(this._azureAccount, subscription)).filter(sa => sa.location === this._targetServerInstance.location && sa.resourceGroup === this._databaseBackup.resourceGroup.name);
|
const storageAccount = (await getAvailableStorageAccounts(this._azureAccount, subscription));
|
||||||
|
this._storageAccounts = storageAccount.filter(sa => {
|
||||||
|
return sa.location.toLowerCase() === this._targetServerInstance.location.toLowerCase() && sa.resourceGroup?.toLowerCase() === this._databaseBackup.resourceGroup.name.toLowerCase();
|
||||||
|
});
|
||||||
this._storageAccounts.forEach((storageAccount) => {
|
this._storageAccounts.forEach((storageAccount) => {
|
||||||
storageAccountValues.push({
|
storageAccountValues.push({
|
||||||
name: storageAccount.id,
|
name: storageAccount.id,
|
||||||
@@ -595,7 +598,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
|||||||
public async getSqlMigrationServiceValues(subscription: azureResource.AzureResourceSubscription, managedInstance: SqlManagedInstance): Promise<azdata.CategoryValue[]> {
|
public async getSqlMigrationServiceValues(subscription: azureResource.AzureResourceSubscription, managedInstance: SqlManagedInstance): Promise<azdata.CategoryValue[]> {
|
||||||
let sqlMigrationServiceValues: azdata.CategoryValue[] = [];
|
let sqlMigrationServiceValues: azdata.CategoryValue[] = [];
|
||||||
try {
|
try {
|
||||||
this._sqlMigrationServices = (await getSqlMigrationServices(this._azureAccount, subscription, managedInstance.location)).filter(sms => sms.location === this._targetServerInstance.location);
|
this._sqlMigrationServices = (await getSqlMigrationServices(this._azureAccount, subscription, managedInstance.location)).filter(sms => sms.location.toLowerCase() === this._targetServerInstance.location.toLowerCase());
|
||||||
this._sqlMigrationServices.forEach((sqlMigrationService) => {
|
this._sqlMigrationServices.forEach((sqlMigrationService) => {
|
||||||
sqlMigrationServiceValues.push({
|
sqlMigrationServiceValues.push({
|
||||||
name: sqlMigrationService.id,
|
name: sqlMigrationService.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user