X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-FE-common%2Fsrc%2Fapp%2Fpages%2Fdashboard-application-catalog%2Fdashboard-application-catalog.component.ts;h=f8a80bb0e7a8cca8da31f8c6e09b710cf0712a61;hb=30fde7dffdeb16add93ff772c8e2e212cb6850e8;hp=baaa4c492aae9cc5a721b27ab65f1289404940ca;hpb=728c55e4233b5f7e449f67dea4c4ca987da701b7;p=portal.git diff --git a/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts b/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts index baaa4c49..f8a80bb0 100644 --- a/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts +++ b/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts @@ -119,12 +119,16 @@ export class DashboardApplicationCatalogComponent implements OnInit { } else { resJson.index = 3; - } - - this.selectedSortType = this.sortOptions[resJson.index]; + } + this.selectedSortType = this.sortOptions[resJson.index]; //console.log(this.selectedSortType); - this.getAppCatalogService(data); + this.getAppCatalogService(data); } + else { + this.sortTypeChanged('N'); + } + + }, error => { console.log('getUserAppsSortTypePreference Error Object' + error.message); }); @@ -152,6 +156,12 @@ export class DashboardApplicationCatalogComponent implements OnInit { getAppCatalogService(userAppSortTypePref: string) { //console.log("getAppCatalogServices called"); + if(!userAppSortTypePref) + { + userAppSortTypePref = "N"; + this.selectedSortType = this.sortOptions[0]; + //console.log("userAppSortTypePref"+userAppSortTypePref); + } this.applicationCatalogService.getAppsOrderBySortPref(userAppSortTypePref).subscribe(data => { //console.log("Response data" + data); this.appCatalogData = data; @@ -159,6 +169,7 @@ export class DashboardApplicationCatalogComponent implements OnInit { this.applicationCatalogService.layout = []; for (let entry of data) { //console.log("Check the URL" + environment.api.appThumbnail); + if(entry.applicationType != '3'){ var appCatalog = { x: -1, y: -1, @@ -166,7 +177,7 @@ export class DashboardApplicationCatalogComponent implements OnInit { name: entry.name, subHeaderText: entry.notes, imageLink: environment.api.appThumbnail.replace(':appId', entry.id), - restrictedApp: entry.restrictedApp, + applicationType: entry.applicationType, select: entry.select, access: entry.access, pending: entry.pending, @@ -176,6 +187,7 @@ export class DashboardApplicationCatalogComponent implements OnInit { }; this.applicationCatalogService.addItem(appCatalog); } + } } }, error => { console.log('getAppCatalogServices Error Object' + error); @@ -189,7 +201,7 @@ export class DashboardApplicationCatalogComponent implements OnInit { openAddRoleModal(item: any) { //console.log("OpenModal check" + item.id+" "+item.url); - if (item.restrictedApp) { + if (item.applicationType =='2') { // Link-based apps open in their own browser tab window.open(item.url, '_blank'); } else{