diff --git a/src/app/appmarket/bulkDeployment/appdeployment.service.ts b/src/app/appmarket/bulkDeployment/appdeployment.service.ts index de9bdbfea154e0fdb81236cf766050a105247bfa..b858eb65c02ee55a8cf4f49a629e26ba638c274b 100644 --- a/src/app/appmarket/bulkDeployment/appdeployment.service.ts +++ b/src/app/appmarket/bulkDeployment/appdeployment.service.ts @@ -89,5 +89,9 @@ export class AppdeploymentService { return this.http.get(this.getUrl() + `app/csv/${id}`, {responseType: 'blob'}) } + public refreshStatesInBulkDeployment(id: number) : Observable<BulkDeployment> { + return this.http.get<BulkDeployment>(this.getUrl() + `refresh/${id}`) + } + } diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html index 215014b66c57dfd28af43cf45473c215bd4ceca1..4fff4026057245bc910d12bd4e025985107390ac 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html @@ -197,6 +197,8 @@ </div> <div class="flex justify-content-end"> + <button class="btn btn-primary mr-2" (click)="refreshStates()">{{'BULK.APP.REFRESH' | translate}}</button> + <button class="btn btn-primary" (click)="getAppBulkDetails(this.bulkId)">{{'BULK.APP.DOWNLOAD_CSV' | translate}}</button> </div> </div> @@ -233,9 +235,9 @@ <li *ngIf="response.type === 'APPLICATION' && response?.details['appInstanceId'] !== undefined"> <a [routerLink]="['/instances/', response?.details['appInstanceId']]">{{ 'BULK.LIST.MOVE_APP' | translate }}</a> </li> - <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> + <!-- <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> <a>{{ 'BULK.APP.CHECK_STATE' | translate }}</a> - </li> + </li> --> </ul> </span> </td> diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts index a6775b4210ec0156cb5db31a91cf25f1a1172c21..5895c0b6ba5531de6c627b1026c321333073a0df 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts @@ -115,4 +115,11 @@ export class BulkViewComponent implements OnInit, OnDestroy { }) } + + public refreshStates() { + this.deployService.refreshStatesInBulkDeployment(this.bulkId).subscribe( deply => { + this.bulk = deply; + console.log("Updated states of bulks") + }) + } } diff --git a/src/app/shared/applications/applications.component.ts b/src/app/shared/applications/applications.component.ts index cc78bd5ac340e6aff6e2368fc027f94a5f63b0c9..03a1b40421b93fceead7206aefb4d2e6c9ffcace 100644 --- a/src/app/shared/applications/applications.component.ts +++ b/src/app/shared/applications/applications.component.ts @@ -24,6 +24,9 @@ function compareAppsPopularity(a: ApplicationBase, b: ApplicationBase, stats: an const bPop = stats[b.name] ? stats[b.name] : 0; return (aPop - bPop) * -1; // desc } +function compareAppsId(a: ApplicationBase, b: ApplicationBase): number { + return (a.id - b.id); +} @Component({ selector: 'nmaas-applications-view', @@ -53,8 +56,8 @@ export class ApplicationsViewComponent implements OnInit, OnChanges { public searchedAppName = ''; protected searchedTag = 'all'; - public sortModeList = ['NONE', 'NAME', 'RATING', 'POPULAR']; - public sortMode = 'NONE'; + public sortModeList = [ 'NAME', 'RATING', 'POPULAR', 'DATE']; + public sortMode = 'NAME'; private popStats: any = {}; @@ -73,6 +76,7 @@ export class ApplicationsViewComponent implements OnInit, OnChanges { this.popStats = data; } ) + } ngOnChanges(changes: SimpleChanges) { @@ -106,7 +110,7 @@ export class ApplicationsViewComponent implements OnInit, OnChanges { } this.applications = applications; - + this.doSearch() } protected updateSelected() { @@ -165,6 +169,8 @@ export class ApplicationsViewComponent implements OnInit, OnChanges { return [...apps].sort(compareAppsRating) case 'POPULAR': return [...apps].sort(popComp) + case 'DATE': + return [...apps].sort(compareAppsId) default: return apps } diff --git a/src/app/welcome/policy-subpage/policy-subpage.component.html b/src/app/welcome/policy-subpage/policy-subpage.component.html index 6678f7b23c2ececc3bce05cca3cc5fed9b029e48..85432326d3485692302bfcf2ed785189385cf7c3 100644 --- a/src/app/welcome/policy-subpage/policy-subpage.component.html +++ b/src/app/welcome/policy-subpage/policy-subpage.component.html @@ -1,7 +1,7 @@ <div id="welcome-container" class="container-fluid" style="margin-bottom: 20px;"> <div class="center-block center text-center"><a routerLink="/" data-toggle="tooltip" data-placement="right" - title="Network Management as a Service homepage"><img src="assets/images/logo.png" alt="logo" - style="margin: 5px" /></a> + title="Network Management as a Service homepage"><img src="assets/images/logo-small.png" alt="logo" width="280px" + style="margin-top: 30px" /></a> </div> <div class="card card-body col-lg-offset-2 col-md-offset-2 col-sm-offset-2 col-lg-8 col-md-8 col-sm-8 col-xs-12" style="margin-top: 15px; font-size: 14px;"> diff --git a/src/app/welcome/welcome.component.css b/src/app/welcome/welcome.component.css index ec3a5b4ffd080d0ed247a66375287187b41bac18..90dc85f0572a059f6b0e6d8f9ecb54ad749c4191 100644 --- a/src/app/welcome/welcome.component.css +++ b/src/app/welcome/welcome.component.css @@ -10,6 +10,14 @@ html, body { .flex-column{ flex-direction: column; } +.banner{ + background-color : #424242; + color: #E8E8E8; + padding: 12px; + justify-self: center; + display: grid; + width: 100%; +} .button{ text-decoration: none; font-weight: bold;