Skip to content

Commit

Permalink
remove config update (#10440) (#10444)
Browse files Browse the repository at this point in the history
(cherry picked from commit ef4ab4a)
  • Loading branch information
Charles-Gagnon authored May 16, 2020
1 parent bb75143 commit 3b06473
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { WorkspaceConfiguration, ConfigurationTarget } from 'vscode';
import { Account } from 'azdata';

import { azureResource } from '../azure-resource';
Expand Down Expand Up @@ -53,25 +52,8 @@ export class AzureResourceSubscriptionFilterService implements IAzureResourceSub
for (const accountId in selectedSubscriptionsCache) {
filters.push(...selectedSubscriptionsCache[accountId].map((subcription) => `${accountId}/${subcription.id}/${subcription.name}`));
}

const resourceFilterConfig = this._config.inspect<string[]>(AzureResourceSubscriptionFilterService.filterConfigName);
let configTarget = ConfigurationTarget.Global;
if (resourceFilterConfig) {
if (resourceFilterConfig.workspaceFolderValue) {
configTarget = ConfigurationTarget.WorkspaceFolder;
} else if (resourceFilterConfig.workspaceValue) {
configTarget = ConfigurationTarget.Workspace;
} else if (resourceFilterConfig.globalValue) {
configTarget = ConfigurationTarget.Global;
}
}

await this._config.update(AzureResourceSubscriptionFilterService.filterConfigName, filters, configTarget);
}

private _config: WorkspaceConfiguration = undefined;
private _cacheService: IAzureResourceCacheService = undefined;
private _cacheKey: string = undefined;

private static readonly filterConfigName = 'azure.resource.config.filter';
}

0 comments on commit 3b06473

Please sign in to comment.