diff --git a/api/routes/players.js b/api/routes/players.js index 243f4fc..f0943b3 100644 --- a/api/routes/players.js +++ b/api/routes/players.js @@ -53,7 +53,7 @@ campaignPlayer.route('/ranking/:campaignId') } res.locals.items = { - kills: getTopFive('kill'), + kill: getTopFive('kill'), death: getTopFive('death'), friendlyFire: getTopFive('friendlyFire'), revive: getTopFive('revive'), diff --git a/static/src/app/statistic/highscore/highscore.component.css b/static/src/app/statistic/highscore/highscore.component.css index 2666e75..f5eba27 100644 --- a/static/src/app/statistic/highscore/highscore.component.css +++ b/static/src/app/statistic/highscore/highscore.component.css @@ -1,31 +1,5 @@ -.slide-chart-container { - width: 90%; - min-width: 880px; - height: 650px; +ngx-datatable { + width: 320px; margin: auto; - padding-left: 5%; -} - -:host /deep/ .carousel-indicators { - display: none; -} - -:host /deep/ .carousel-control { - width: 5%; - cursor: pointer; -} - -:host /deep/ .chart-legend { - position: absolute; - margin-top: -60px; - margin-left: -220px; -} - -:host /deep/ .chart-legend .legend-labels { - width: 200px; -} - -:host /deep/ .chart-legend .legend-label { - float: left; - padding-left: 14px; + height: 240px; } diff --git a/static/src/app/statistic/highscore/highscore.component.html b/static/src/app/statistic/highscore/highscore.component.html index 6bdb3fc..396ae44 100644 --- a/static/src/app/statistic/highscore/highscore.component.html +++ b/static/src/app/statistic/highscore/highscore.component.html @@ -1,5 +1,26 @@ -
+

{{title}}

+ + + + + {{value}} + + + + +
diff --git a/static/src/app/statistic/highscore/highscore.component.ts b/static/src/app/statistic/highscore/highscore.component.ts index 043a598..fd97cf5 100644 --- a/static/src/app/statistic/highscore/highscore.component.ts +++ b/static/src/app/statistic/highscore/highscore.component.ts @@ -2,6 +2,7 @@ import {Component} from "@angular/core"; import {ActivatedRoute} from "@angular/router"; import {PlayerService} from "../../services/logs/player.service"; import {CampaignService} from "../../services/logs/campaign.service"; +import {Fraction} from "../../utils/fraction.enum"; @Component({ @@ -13,8 +14,20 @@ import {CampaignService} from "../../services/logs/campaign.service"; export class StatisticHighScoreComponent { id = ""; + title = ""; + players = {}; + + cellHeight = 40; + + customClasses = { + sortAscending: 'glyphicon glyphicon-triangle-top', + sortDescending: 'glyphicon glyphicon-triangle-bottom', + }; + + readonly fraction = Fraction; + constructor(private route: ActivatedRoute, private playerService: PlayerService, private campaignService: CampaignService) { @@ -40,7 +53,7 @@ export class StatisticHighScoreComponent { .filter(camp => camp._id === this.id).pop().title; this.playerService.getCampaignHighscore(this.id).subscribe(players => { - console.log(players); + this.players = players; }) }