Add resource deployment filtering by option values (#14101)

* Add resource deployment filtering by option values

* Fix compile error
This commit is contained in:
Charles Gagnon
2021-01-28 17:19:08 -08:00
committed by GitHub
parent 5bf1f640e8
commit db845754c6
6 changed files with 44 additions and 19 deletions

View File

@@ -21,10 +21,17 @@ import { deepClone } from '../common/utils';
const localize = nls.loadMessageBundle();
/**
* Used to filter the specific optionValues that the deployment wizard shows
*/
export interface OptionValuesFilter {
[key: string]: Record<string, string[]>
}
export interface IResourceTypeService {
getResourceTypes(filterByPlatform?: boolean): ResourceType[];
validateResourceTypes(resourceTypes: ResourceType[]): string[];
startDeployment(resourceType: ResourceType): void;
startDeployment(resourceType: ResourceType, optionValuesFilter?: OptionValuesFilter): void;
}
export class ResourceTypeService implements IResourceTypeService {
@@ -301,8 +308,8 @@ export class ResourceTypeService implements IResourceTypeService {
return undefined;
}
public startDeployment(resourceType: ResourceType): void {
const wizard = new ResourceTypeWizard(resourceType, new KubeService(), new AzdataService(this.platformService), this.notebookService, this.toolsService, this.platformService, this);
public startDeployment(resourceType: ResourceType, optionValuesFilter?: OptionValuesFilter): void {
const wizard = new ResourceTypeWizard(resourceType, new KubeService(), new AzdataService(this.platformService), this.notebookService, this.toolsService, this.platformService, this, optionValuesFilter);
wizard.open();
}