Feature player detail - v1.5.0 #10

Merged
hardi merged 1 commits from task/stats-player-detail into master 2017-10-02 20:04:13 +02:00
8 changed files with 20 additions and 23 deletions

View File

@ -62,10 +62,10 @@ export const appRoutes: Routes = [
path: '404',
component: NotFoundComponent
},
// {
// path: '**',
// redirectTo: '/404'
// } // always configure this last - first matching route gets processed
{
path: '**',
redirectTo: '/404'
} // always configure this last - first matching route gets processed
];
export const appRouting = RouterModule.forRoot(appRoutes);

View File

@ -23,7 +23,7 @@
[scheme]="colorScheme"
[value]="respawnDeathRatio"
[previousValue]="0.5"
[max]="1"
[max]="maxRespawnDeathRatio"
[min]="0"
[units]="'Respawn/Death'">
</ngx-charts-linear-gauge>
@ -54,7 +54,6 @@
[xAxis]="xAxis"
[yAxis]="yAxis"
[legend]="legend"
[legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisKill"
@ -75,7 +74,6 @@
[xAxis]="xAxis"
[yAxis]="yAxis"
[legend]="legend"
[legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisFriendlyFire"
@ -96,7 +94,6 @@
[xAxis]="xAxis"
[yAxis]="yAxis"
[legend]="legend"
[legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisDeath"
@ -117,7 +114,6 @@
[xAxis]="xAxis"
[yAxis]="yAxis"
[legend]="legend"
[legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisRespawn"
@ -138,7 +134,6 @@
[xAxis]="xAxis"
[yAxis]="yAxis"
[legend]="legend"
[legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisRevive"
@ -159,7 +154,6 @@
[xAxis]="xAxis"
[yAxis]="yAxis"
[legend]="legend"
[legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisCapture"

View File

@ -52,7 +52,6 @@ export class CampaignPlayerDetailComponent {
xAxis = true;
yAxis = true;
legend = false;
legendTitle = '';
showXAxisLabel = true;
showYAxisLabel = true;
autoscale = false;
@ -68,7 +67,9 @@ export class CampaignPlayerDetailComponent {
kdRatio = 0;
maxKd = 1.7;
respawnDeathRatio = 0;
maxRespawnDeathRatio = 1;
constructor(private route: ActivatedRoute,

View File

@ -10,8 +10,6 @@
(click)="goToSlide(1)">Spielerzahlen
</div>
<carousel class="fade-in" [(activeSlide)]="activeSlideIndex">
<slide *ngIf="id != 'all'">
<div class="slide-chart-container">

View File

@ -3,7 +3,7 @@ import {CommonModule} from "@angular/common";
import {SharedModule} from "../shared.module";
import {statsRouterModule, statsRoutingComponents} from "./stats.routing";
import {WarService} from "../services/war-service/war.service";
import {GaugeModule, LineChartModule, NgxChartsModule, PieChartModule} from "@swimlane/ngx-charts";
import {NgxChartsModule} from "@swimlane/ngx-charts";
import {AccordionModule, CarouselModule} from "ngx-bootstrap";
import {CampaignService} from "../services/campaign-service/campaign.service";
import {NgxDatatableModule} from "@swimlane/ngx-datatable";

View File

@ -13,7 +13,6 @@
.player-name {
font-weight: bold;
cursor: pointer;
}
.text-opfor {
@ -52,6 +51,7 @@
:host /deep/ .datatable-body-row {
color: #222222;
border-bottom: 1px solid grey;
cursor: pointer;
}
:host /deep/ .datatable-body-row:hover {

View File

@ -57,10 +57,12 @@
[messages]="{emptyMessage: 'Loading...'}"
[headerHeight]="cellHeight"
[rowHeight]="cellHeight"
[cssClasses]='customClasses'>
[cssClasses]='customClasses'
[selectionType]="'single'"
(select)="selectPlayerDetail($event)">
<ngx-datatable-column name="Spieler" prop="name" [width]="210" style="padding-left:10px">
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
<span class="player-name" (click)="selectPlayerDetail(value)"
<span class="player-name"
[ngClass]="row['fraction'] === 'BLUFOR' ? 'text-blufor' : 'text-opfor'">
{{value}}
</span>

View File

@ -55,11 +55,6 @@ export class WarDetailComponent {
});
}
selectPlayerDetail(playerName) {
this.router.navigate(['../../campaign-player/' + this.war.campaign + '/' + playerName],
{relativeTo: this.route});
}
filterPlayersByFraction(fraction: string) {
if (fraction) {
this.rows = this.war.players.filter((player) => {
@ -70,4 +65,11 @@ export class WarDetailComponent {
}
}
selectPlayerDetail(player) {
if (player && player.selected && player.selected.length > 0) {
this.router.navigate(['../../campaign-player/' + this.war.campaign + '/' + player.selected[0].name],
{relativeTo: this.route});
}
}
}