X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2F%40core-xds%2Fservices%2Fsdk.service.ts;h=0ad5d0f9a936f61114c8a8d670bc3a1e3adfece5;hb=6d14032f41c785bb397509f17764eb29b087ff0f;hp=f854744525846e90efa92f05928a70b12f32ddce;hpb=facf3f10b243d027cc2a28661fe1cd8d4253dafa;p=src%2Fxds%2Fxds-agent.git diff --git a/webapp/src/app/@core-xds/services/sdk.service.ts b/webapp/src/app/@core-xds/services/sdk.service.ts index f854744..0ad5d0f 100644 --- a/webapp/src/app/@core-xds/services/sdk.service.ts +++ b/webapp/src/app/@core-xds/services/sdk.service.ts @@ -51,6 +51,7 @@ export interface ISdk { arch: string; path: string; url: string; + image_url: string; status: string; date: string; size: string; @@ -103,10 +104,10 @@ export class SdkService { // TODO: get previous val from xds-config service / cookie if (this._sdksList.length > 0) { - this.current = this._sdksList[0]; + const installedSdks = this._sdksList.filter(sd => sd.status === StatusType.INSTALLED); + this.current = installedSdks.length > 0 ? installedSdks[0] : this._sdksList[0]; this.curSdkSubject.next(this.current); } - this.sdksSubject.next(this._sdksList); }); });