Skip to content
Snippets Groups Projects
Commit 0c93f099 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Merge branch '1.6.4-merge' into 'release/1.6.4'

Revert "Merge branch '221-improve-sorting-in-the-application-list-view' into 'release/1.6.4'"

See merge request !37
parents 6fc481bd 6855ad3e
No related branches found
No related tags found
3 merge requests!41Revert "Merge branch '221-improve-sorting-in-the-application-list-view' into 'release/1.6.4'",!39release/1.6.4 into develop,!37Revert "Merge branch '221-improve-sorting-in-the-application-list-view' into 'release/1.6.4'"
......@@ -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}`)
}
}
......@@ -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>
......
......@@ -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")
})
}
}
......@@ -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
}
......
<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;">
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment