Compare commits
No commits in common. "712071865f51e566ee04c9296ebf0f7b4af6c8cf" and "b99825b01a8878a5d8adad0539437789109bcd78" have entirely different histories.
712071865f
...
b99825b01a
|
@ -4,8 +4,8 @@
|
||||||
#group="matButtonToggleGroup"
|
#group="matButtonToggleGroup"
|
||||||
[(ngModel)]="activeChartSelect"
|
[(ngModel)]="activeChartSelect"
|
||||||
(change)="selectChart(group.value)">
|
(change)="selectChart(group.value)">
|
||||||
<mat-button-toggle *ngFor="let labelKey of labelsKeys" value="{{labels[labelKey]}}">
|
<mat-button-toggle *ngFor="let label of labelsAsString" value="{{label}}">
|
||||||
{{labels[labelKey] | translate}}
|
{{label | translate}}
|
||||||
</mat-button-toggle>
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
|
|
|
@ -39,15 +39,24 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
||||||
tmpReviveData;
|
tmpReviveData;
|
||||||
tmpStabilizeData;
|
tmpStabilizeData;
|
||||||
tmpFlagCaptureData;
|
tmpFlagCaptureData;
|
||||||
tmpPlayerCountData;
|
|
||||||
|
|
||||||
colorScheme = {
|
colorScheme = {
|
||||||
domain: [Fraction.COLOR_BLUFOR, Fraction.COLOR_OPFOR, Fraction.COLOR_BLUFOR_LIGHT, Fraction.COLOR_OPFOR_LIGHT,
|
domain: [Fraction.COLOR_BLUFOR, Fraction.COLOR_OPFOR, Fraction.COLOR_BLUFOR_LIGHT, Fraction.COLOR_OPFOR_LIGHT,
|
||||||
Fraction.COLOR_BLUFOR_DARK, Fraction.COLOR_OPFOR_DARK, Fraction.COLOR_BLUFOR_GREY, Fraction.COLOR_OPFOR_GREY]
|
Fraction.COLOR_BLUFOR_DARK, Fraction.COLOR_OPFOR_DARK, Fraction.COLOR_BLUFOR_GREY, Fraction.COLOR_OPFOR_GREY]
|
||||||
};
|
};
|
||||||
|
|
||||||
labels;
|
readonly labels = {
|
||||||
labelsKeys;
|
points: 'stats.fraction.select.points',
|
||||||
|
budget: 'stats.fraction.select.budget',
|
||||||
|
kill: 'stats.fraction.select.kills',
|
||||||
|
friendlyFire: 'stats.fraction.select.friendly.fire',
|
||||||
|
vehicle: 'stats.fraction.select.vehicle.kills',
|
||||||
|
transport: 'stats.fraction.select.air.transport',
|
||||||
|
revive: 'stats.fraction.select.revive',
|
||||||
|
stabilize: 'stats.fraction.select.stabilize',
|
||||||
|
flag: 'stats.fraction.select.flag'
|
||||||
|
};
|
||||||
|
readonly labelsAsString = Object.keys(this.labels).map((key) => this.labels[key]);
|
||||||
|
|
||||||
lineChartLabel: string;
|
lineChartLabel: string;
|
||||||
|
|
||||||
|
@ -78,12 +87,8 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
||||||
kill: false,
|
kill: false,
|
||||||
revive: false,
|
revive: false,
|
||||||
transport: false,
|
transport: false,
|
||||||
flag: false,
|
flag: false
|
||||||
playerCount: false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.initializeToggleButtons();
|
|
||||||
|
|
||||||
Object.assign(this, [this.lineChartData, this.areaChartData]);
|
Object.assign(this, [this.lineChartData, this.areaChartData]);
|
||||||
this.activeChartSelect = this.labels.points;
|
this.activeChartSelect = this.labels.points;
|
||||||
|
|
||||||
|
@ -94,42 +99,6 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* show only labels for for data that is available,
|
|
||||||
* to not end up with empty charts in old battles
|
|
||||||
*/
|
|
||||||
initializeToggleButtons() {
|
|
||||||
const newLabels = {};
|
|
||||||
if (this.logData.points && this.logData.points.length > 0) {
|
|
||||||
newLabels['points'] = 'stats.fraction.select.points';
|
|
||||||
}
|
|
||||||
if (this.logData.budget && this.logData.budget.length > 0) {
|
|
||||||
newLabels['budget'] = 'stats.fraction.select.budget';
|
|
||||||
}
|
|
||||||
if (this.logData.kill && this.logData.kill.length > 0) {
|
|
||||||
newLabels['kill'] = 'stats.fraction.select.kills';
|
|
||||||
newLabels['friendlyFire'] = 'stats.fraction.select.friendly.fire';
|
|
||||||
}
|
|
||||||
if (this.logData.vehicle && this.logData.vehicle.length > 0) {
|
|
||||||
newLabels['vehicle'] = 'stats.fraction.select.vehicle.kills';
|
|
||||||
}
|
|
||||||
if (this.logData.transport && this.logData.transport.length > 0) {
|
|
||||||
newLabels['transport'] = 'stats.fraction.select.air.transport';
|
|
||||||
}
|
|
||||||
if (this.logData.revive && this.logData.revive.length > 0) {
|
|
||||||
newLabels['revive'] = 'stats.fraction.select.revive';
|
|
||||||
newLabels['stabilize'] = 'stats.fraction.select.stabilize';
|
|
||||||
}
|
|
||||||
if (this.logData.flag && this.logData.flag.length > 0) {
|
|
||||||
newLabels['flag'] = 'stats.fraction.select.flag';
|
|
||||||
}
|
|
||||||
if (this.logData.playerCount && this.logData.playerCount.length > 0) {
|
|
||||||
newLabels['playerCount'] = 'stats.fraction.select.player.count';
|
|
||||||
}
|
|
||||||
this.labels = newLabels;
|
|
||||||
this.labelsKeys = Object.keys(this.labels);
|
|
||||||
}
|
|
||||||
|
|
||||||
selectChart(newSelection) {
|
selectChart(newSelection) {
|
||||||
this.activeChartSelect = newSelection;
|
this.activeChartSelect = newSelection;
|
||||||
if (this.activeChartSelect !== this.labels.flag) {
|
if (this.activeChartSelect !== this.labels.flag) {
|
||||||
|
@ -167,10 +136,6 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
||||||
this.initTransportData();
|
this.initTransportData();
|
||||||
this.lineChartData = this.tmpTransportData;
|
this.lineChartData = this.tmpTransportData;
|
||||||
break;
|
break;
|
||||||
case this.labels.playerCount:
|
|
||||||
this.initPlayerCountData();
|
|
||||||
this.lineChartData = this.tmpPlayerCountData;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.initFlagHoldData();
|
this.initFlagHoldData();
|
||||||
|
@ -382,15 +347,6 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
||||||
this.initialized.transport = true;
|
this.initialized.transport = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
initPlayerCountData() {
|
|
||||||
if (this.initialized.playerCount) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.addFinalTimeData(this.tmpPlayerCountData);
|
|
||||||
this.initialized.playerCount = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
initFlagHoldData() {
|
initFlagHoldData() {
|
||||||
if (this.initialized.flag) {
|
if (this.initialized.flag) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -36,11 +36,11 @@ export class ServerStatsComponent implements OnInit, OnChanges {
|
||||||
tmpFlagCaptureData;
|
tmpFlagCaptureData;
|
||||||
|
|
||||||
readonly labels = {
|
readonly labels = {
|
||||||
singleAvg: 'stats.performance.select.single.avg',
|
points: 'stats.fraction.select.points',
|
||||||
singleMin: 'stats.performance.select.single.min',
|
budget: 'stats.fraction.select.budget',
|
||||||
avgTimeline: 'stats.performance.select.timeline.avg',
|
kill: 'stats.fraction.select.kills',
|
||||||
minTimeline: 'stats.performance.select.timeline.min',
|
friendlyFire: 'stats.fraction.select.friendly.fire',
|
||||||
serverFps: 'stats.performance.select.timeline.server',
|
vehicle: 'stats.fraction.select.vehicle.kills',
|
||||||
};
|
};
|
||||||
readonly labelsAsString = Object.keys(this.labels)
|
readonly labelsAsString = Object.keys(this.labels)
|
||||||
.map((key) => this.labels[key]);
|
.map((key) => this.labels[key]);
|
||||||
|
@ -62,7 +62,7 @@ export class ServerStatsComponent implements OnInit, OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.setLineChartLabel(this.labels.singleAvg);
|
this.setLineChartLabel(this.labels.points);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
|
@ -75,7 +75,7 @@ export class ServerStatsComponent implements OnInit, OnChanges {
|
||||||
flag: false
|
flag: false
|
||||||
};
|
};
|
||||||
Object.assign(this, [this.lineChartData]);
|
Object.assign(this, [this.lineChartData]);
|
||||||
this.activeChartSelect = this.labels.singleAvg;
|
this.activeChartSelect = this.labels.points;
|
||||||
|
|
||||||
this.startDateObj = new Date(this.war.date);
|
this.startDateObj = new Date(this.war.date);
|
||||||
this.startDateObj.setHours(0);
|
this.startDateObj.setHours(0);
|
||||||
|
|
|
@ -27,13 +27,6 @@
|
||||||
"stats.fraction.select.revive": "Revive",
|
"stats.fraction.select.revive": "Revive",
|
||||||
"stats.fraction.select.stabilize": "Stabilisiert",
|
"stats.fraction.select.stabilize": "Stabilisiert",
|
||||||
"stats.fraction.select.flag": "Flaggenbesitz",
|
"stats.fraction.select.flag": "Flaggenbesitz",
|
||||||
"stats.fraction.select.player.count": "Spieleranzahl",
|
|
||||||
|
|
||||||
"stats.performance.select.single.avg": "Spieler FPS Durchschnitt",
|
|
||||||
"stats.performance.select.single.min": "Spieler FPS Minimum",
|
|
||||||
"stats.performance.select.timeline.avg": "Verlauf FPS Durchschnitt",
|
|
||||||
"stats.performance.select.timeline.min": "Verlauf FPS Minimum",
|
|
||||||
"stats.performance.select.timeline.server": "Server FPS",
|
|
||||||
|
|
||||||
"stats.player.detail.headline": "Kampagnendetails - {{name}}",
|
"stats.player.detail.headline": "Kampagnendetails - {{name}}",
|
||||||
"stats.player.detail.button.back": "Zurück",
|
"stats.player.detail.button.back": "Zurück",
|
||||||
|
|
|
@ -35,13 +35,6 @@
|
||||||
"stats.fraction.select.revive": "Revive",
|
"stats.fraction.select.revive": "Revive",
|
||||||
"stats.fraction.select.stabilize": "Stabilized",
|
"stats.fraction.select.stabilize": "Stabilized",
|
||||||
"stats.fraction.select.flag": "Flag Possession",
|
"stats.fraction.select.flag": "Flag Possession",
|
||||||
"stats.fraction.select.player.count": "Player Count",
|
|
||||||
|
|
||||||
"stats.performance.select.single.avg": "Player FPS Average",
|
|
||||||
"stats.performance.select.single.min": "Player FPS Minimum",
|
|
||||||
"stats.performance.select.timeline.avg": "Timeline FPS Average",
|
|
||||||
"stats.performance.select.timeline.min": "Timeline FPS Minimum",
|
|
||||||
"stats.performance.select.timeline.server": "Server FPS",
|
|
||||||
|
|
||||||
"stats.player.detail.headline": "Campaign Details - {{name}}",
|
"stats.player.detail.headline": "Campaign Details - {{name}}",
|
||||||
"stats.player.detail.button.back": "Back",
|
"stats.player.detail.button.back": "Back",
|
||||||
|
|
Loading…
Reference in New Issue