fixed extension filter and search (#1301)

* fixed extension filter and search
This commit is contained in:
Leila Lali
2018-05-01 08:52:20 -07:00
committed by GitHub
parent 8c2d79e9cf
commit a2e6aa9e64
4 changed files with 111 additions and 2 deletions

View File

@@ -37,6 +37,8 @@ export interface IExtension {
description: string;
url: string;
downloadUrl: string;
// {{SQL CARBON EDIT}}
downloadPage: string;
repository: string;
iconUrl: string;
iconUrlFallback: string;

View File

@@ -127,6 +127,16 @@ class Extension implements IExtension {
//return `${product.extensionsGallery.serviceUrl}/publishers/${this.publisher}/vsextensions/${this.name}/${this.latestVersion}/vspackage`;
}
// {{SQL CARBON EDIT}}
get downloadPage(): string {
if (!product.extensionsGallery) {
return null;
}
// {{SQL CARBON EDIT}}
return this.gallery && this.gallery.assets && this.gallery.assets.downloadPage && this.gallery.assets.downloadPage.uri;
}
get iconUrl(): string {
return this.galleryIconUrl || this.localIconUrl || this.defaultIconUrl;
}
@@ -570,7 +580,8 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
return TPromise.as(null);
}
const toUpdate = this.local.filter(e => e.outdated && (e.state !== ExtensionState.Installing));
// {{SQL CARBON EDIT}}
const toUpdate = this.local.filter(e => e.outdated && (e.state !== ExtensionState.Installing) && !e.downloadPage);
return TPromise.join(toUpdate.map(e => this.install(e)));
}