mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
make it easy to indicate all platforms (#7467)
This commit is contained in:
@@ -74,11 +74,7 @@
|
|||||||
"name": "sql-image",
|
"name": "sql-image",
|
||||||
"displayName": "%resource-type-sql-image-display-name%",
|
"displayName": "%resource-type-sql-image-display-name%",
|
||||||
"description": "%resource-type-sql-image-description%",
|
"description": "%resource-type-sql-image-description%",
|
||||||
"platforms": [
|
"platforms": "*",
|
||||||
"darwin",
|
|
||||||
"win32",
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"icon": {
|
"icon": {
|
||||||
"light": "./images/sql_server_container.svg",
|
"light": "./images/sql_server_container.svg",
|
||||||
"dark": "./images/sql_server_container_inverse.svg"
|
"dark": "./images/sql_server_container_inverse.svg"
|
||||||
@@ -208,11 +204,7 @@
|
|||||||
"name": "sql-bdc",
|
"name": "sql-bdc",
|
||||||
"displayName": "%resource-type-sql-bdc-display-name%",
|
"displayName": "%resource-type-sql-bdc-display-name%",
|
||||||
"description": "%resource-type-sql-bdc-description%",
|
"description": "%resource-type-sql-bdc-description%",
|
||||||
"platforms": [
|
"platforms": "*",
|
||||||
"darwin",
|
|
||||||
"linux",
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"icon": {
|
"icon": {
|
||||||
"light": "./images/sql_bdc.svg",
|
"light": "./images/sql_bdc.svg",
|
||||||
"dark": "./images/sql_bdc_inverse.svg"
|
"dark": "./images/sql_bdc_inverse.svg"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export interface ResourceType {
|
|||||||
name: string;
|
name: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
description: string;
|
description: string;
|
||||||
platforms: string[];
|
platforms: string[] | '*';
|
||||||
icon: { light: string; dark: string };
|
icon: { light: string; dark: string };
|
||||||
options: ResourceTypeOption[];
|
options: ResourceTypeOption[];
|
||||||
providers: DeploymentProvider[];
|
providers: DeploymentProvider[];
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export class ResourceTypeService implements IResourceTypeService {
|
|||||||
|
|
||||||
let resourceTypes = this._resourceTypes;
|
let resourceTypes = this._resourceTypes;
|
||||||
if (filterByPlatform) {
|
if (filterByPlatform) {
|
||||||
resourceTypes = resourceTypes.filter(resourceType => resourceType.platforms.includes(this.platformService.platform()));
|
resourceTypes = resourceTypes.filter(resourceType => (typeof resourceType.platforms === 'string' && resourceType.platforms === '*') || resourceType.platforms.includes(this.platformService.platform()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return resourceTypes;
|
return resourceTypes;
|
||||||
|
|||||||
Reference in New Issue
Block a user