Compare commits
No commits in common. "7867c1d48098eb044672d7e5ef19ffc8096dbaf3" and "237926fdf671594d11fc979be4c83fcee91f1ac7" have entirely different histories.
7867c1d480
...
237926fdf6
|
@ -1,34 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
const LogVehicleKillSchema = new Schema({
|
||||
war: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
ref: 'War',
|
||||
required: true
|
||||
},
|
||||
time: {
|
||||
type: Date,
|
||||
required: true
|
||||
},
|
||||
shooter: {
|
||||
type: String
|
||||
},
|
||||
target: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
fraction: {
|
||||
type: String,
|
||||
enum: ['BLUFOR', 'OPFOR', 'NONE'],
|
||||
required: true
|
||||
}
|
||||
}, {
|
||||
collection: 'logVehicle'
|
||||
});
|
||||
// optional more indices
|
||||
LogVehicleKillSchema.index({war: 1, shooter: 1, target: 1});
|
||||
|
||||
module.exports = mongoose.model('LogVehicle', LogVehicleKillSchema);
|
|
@ -24,12 +24,6 @@ const PlayerSchema = new Schema({
|
|||
set: v => Math.round(v),
|
||||
required: true
|
||||
},
|
||||
vehicle: {
|
||||
type: Number,
|
||||
get: v => Math.round(v),
|
||||
set: v => Math.round(v),
|
||||
required: true
|
||||
},
|
||||
death: {
|
||||
type: Number,
|
||||
get: v => Math.round(v),
|
||||
|
|
|
@ -13,7 +13,6 @@ const LogBudgetModel = require('../models/logs/budget');
|
|||
const LogRespawnModel = require('../models/logs/respawn');
|
||||
const LogReviveModel = require('../models/logs/revive');
|
||||
const LogKillModel = require('../models/logs/kill');
|
||||
const LogVehicleModel = require('../models/logs/vehicle');
|
||||
const LogTransportModel = require('../models/logs/transport');
|
||||
const LogFlagModel = require('../models/logs/flag');
|
||||
const LogPointsModel = require('../models/logs/points');
|
||||
|
@ -44,7 +43,6 @@ logsRouter.route('/:warId')
|
|||
const respawnObjects = LogRespawnModel.find(filter, {}, sort);
|
||||
const reviveObjects = LogReviveModel.find(filter, {}, sort);
|
||||
const killObjects = LogKillModel.find(filter, {}, sort);
|
||||
const vehicleObjects = LogVehicleModel.find(filter, {}, sort);
|
||||
const transportObjects = LogTransportModel.find(filter, {}, sort);
|
||||
const flagObjects = LogFlagModel.find(filter, {}, sort);
|
||||
const resources = {
|
||||
|
@ -53,7 +51,6 @@ logsRouter.route('/:warId')
|
|||
respawn: respawnObjects.exec.bind(respawnObjects),
|
||||
revive: reviveObjects.exec.bind(reviveObjects),
|
||||
kill: killObjects.exec.bind(killObjects),
|
||||
vehicle: killObjects.exec.bind(vehicleObjects),
|
||||
transport: transportObjects.exec.bind(transportObjects),
|
||||
flag: flagObjects.exec.bind(flagObjects)
|
||||
};
|
||||
|
|
|
@ -38,7 +38,6 @@ campaignPlayer.route('/ranking/:campaignId')
|
|||
const resItem = {
|
||||
name: playerName,
|
||||
kill: 0,
|
||||
vehicle: 0,
|
||||
death: 0,
|
||||
friendlyFire: 0,
|
||||
revive: 0,
|
||||
|
@ -49,7 +48,6 @@ campaignPlayer.route('/ranking/:campaignId')
|
|||
resItem.kill += playerInstances[i].kill;
|
||||
resItem.death += playerInstances[i].death;
|
||||
resItem.friendlyFire += playerInstances[i].friendlyFire;
|
||||
resItem.vehicle += playerInstances[i].vehicle;
|
||||
resItem.revive += playerInstances[i].revive;
|
||||
resItem.respawn += playerInstances[i].respawn;
|
||||
resItem.flagTouch += playerInstances[i].flagTouch;
|
||||
|
@ -72,7 +70,6 @@ campaignPlayer.route('/ranking/:campaignId')
|
|||
kill: getSortedField('kill'),
|
||||
death: getSortedField('death'),
|
||||
friendlyFire: getSortedField('friendlyFire'),
|
||||
vehicle: getSortedField('vehicle'),
|
||||
revive: getSortedField('revive'),
|
||||
respawn: getSortedField('respawn'),
|
||||
flagTouch: getSortedField('flagTouch')
|
||||
|
|
|
@ -27,7 +27,6 @@ const CampaignModel = require('../models/campaign');
|
|||
const WarModel = require('../models/war');
|
||||
const PlayerModel = require('../models/player');
|
||||
const LogKillModel = require('../models/logs/kill');
|
||||
const LogVehicleKillModel = require('../models/logs/vehicle');
|
||||
const LogRespawnModel = require('../models/logs/respawn');
|
||||
const LogReviveModel = require('../models/logs/revive');
|
||||
const LogTransportModel = require('../models/logs/transport');
|
||||
|
@ -93,36 +92,33 @@ wars.route('/')
|
|||
return next(err);
|
||||
}
|
||||
LogKillModel.create(statsResult.kills, function () {
|
||||
LogVehicleKillModel.create(statsResult.vehicles, function () {
|
||||
LogRespawnModel.create(statsResult.respawn, function () {
|
||||
LogReviveModel.create(statsResult.revive, function () {
|
||||
LogFlagModel.create(statsResult.flag, function () {
|
||||
LogBudgetModel.create(statsResult.budget, function () {
|
||||
LogTransportModel.create(statsResult.transport, function () {
|
||||
LogPointsModel.create(statsResult.points, function () {
|
||||
const folderName = __dirname + '/../resource/logs/' + war._id;
|
||||
mkdirp(folderName, function (err) {
|
||||
if (err) return next(err);
|
||||
|
||||
LogRespawnModel.create(statsResult.respawn, function () {
|
||||
LogReviveModel.create(statsResult.revive, function () {
|
||||
LogFlagModel.create(statsResult.flag, function () {
|
||||
LogBudgetModel.create(statsResult.budget, function () {
|
||||
LogTransportModel.create(statsResult.transport, function () {
|
||||
LogPointsModel.create(statsResult.points, function () {
|
||||
const folderName = __dirname + '/../resource/logs/' + war._id;
|
||||
mkdirp(folderName, function (err) {
|
||||
if (err) return next(err);
|
||||
// save clean log file
|
||||
const cleanFile = fs.createWriteStream(folderName + '/clean.log');
|
||||
statsResult.clean.forEach(cleanLine => {
|
||||
cleanFile.write(cleanLine + '\n\n')
|
||||
});
|
||||
cleanFile.end();
|
||||
|
||||
// save clean log file
|
||||
const cleanFile = fs.createWriteStream(folderName + '/clean.log');
|
||||
statsResult.clean.forEach(cleanLine => {
|
||||
cleanFile.write(cleanLine + '\n\n')
|
||||
});
|
||||
cleanFile.end();
|
||||
// save raw log file
|
||||
const rawFile = fs.createWriteStream(folderName + '/war.log');
|
||||
lineArray.forEach(rawLine => {
|
||||
rawFile.write(rawLine + '\n')
|
||||
});
|
||||
rawFile.end();
|
||||
|
||||
// save raw log file
|
||||
const rawFile = fs.createWriteStream(folderName + '/war.log');
|
||||
lineArray.forEach(rawLine => {
|
||||
rawFile.write(rawLine + '\n')
|
||||
});
|
||||
rawFile.end();
|
||||
|
||||
res.status(codes.created);
|
||||
res.locals.items = war;
|
||||
next();
|
||||
})
|
||||
res.status(codes.created);
|
||||
res.locals.items = war;
|
||||
next();
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -5,7 +5,6 @@ const playerArrayContains = require('./util').playerArrayContains;
|
|||
const WHITESPACE = ' ';
|
||||
|
||||
const parseWarLog = (lineArray, war) => {
|
||||
|
||||
const NAME_TOO_LONG_ERROR = 'Error: ENAMETOOLONG: name too long, open \'';
|
||||
|
||||
const stats = {
|
||||
|
@ -14,7 +13,6 @@ const parseWarLog = (lineArray, war) => {
|
|||
budget: [],
|
||||
points: [],
|
||||
kills: [],
|
||||
vehicles: [],
|
||||
respawn: [],
|
||||
revive: [],
|
||||
flag: [],
|
||||
|
@ -22,8 +20,6 @@ const parseWarLog = (lineArray, war) => {
|
|||
players: []
|
||||
};
|
||||
|
||||
const vehicleBlacklist = ['Prowler (Unbewaffnet)', 'Qilin (Unbewaffnet)', 'Quad Bike', 'HuntIR'];
|
||||
|
||||
const addPlayerIfNotExists = (inputPlayer, steamUUID) => {
|
||||
const player = getPlayerAndFractionFromString(inputPlayer);
|
||||
if (player && player.name && player.fraction && !playerArrayContains(stats.players, player)) {
|
||||
|
@ -42,38 +38,23 @@ const parseWarLog = (lineArray, war) => {
|
|||
}
|
||||
|
||||
/**
|
||||
* KILLS & VEHICLE KILLS
|
||||
* KILLS
|
||||
*/
|
||||
if (line.includes('(Abschuss)')) {
|
||||
if (line.includes('(Abschuss)') && !line.includes('Fahrzeug')) {
|
||||
stats.clean.push(line);
|
||||
|
||||
const shooterString = line.substring(line.lastIndexOf(' von: ') + 6, line.lastIndexOf('."'));
|
||||
const shooter = getPlayerAndFractionFromString(shooterString);
|
||||
const targetString = line.substring(line.lastIndexOf(' --- ') + 5, line.lastIndexOf(' von:'));
|
||||
const target = getPlayerAndFractionFromString(targetString);
|
||||
|
||||
if (line.includes('Fahrzeug:')) {
|
||||
const targetString = line.substring(line.lastIndexOf(' --- Fahrzeug: ') + 15, line.lastIndexOf(' von:'));
|
||||
const target = getVehicleAndFractionFromString(targetString);
|
||||
if (target && shooter && target.fraction !== shooter.fraction) {
|
||||
stats.vehicles.push({
|
||||
war: war._id,
|
||||
time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]),
|
||||
shooter: shooter ? shooter.name : null,
|
||||
target: target ? target.name : null,
|
||||
fraction: shooter ? shooter.fraction : 'NONE'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
const targetString = line.substring(line.lastIndexOf(' --- ') + 5, line.lastIndexOf(' von:'));
|
||||
const target = getPlayerAndFractionFromString(targetString);
|
||||
stats.kills.push({
|
||||
war: war._id,
|
||||
time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]),
|
||||
shooter: shooter ? shooter.name : null,
|
||||
target: target ? target.name : null,
|
||||
friendlyFire: shooter ? target.fraction === shooter.fraction : false,
|
||||
fraction: shooter ? shooter.fraction : 'NONE'
|
||||
});
|
||||
}
|
||||
stats.kills.push({
|
||||
war: war._id,
|
||||
time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]),
|
||||
shooter: shooter ? shooter.name : null,
|
||||
target: target ? target.name : null,
|
||||
friendlyFire: shooter ? target.fraction === shooter.fraction : false,
|
||||
fraction: shooter ? shooter.fraction : 'NONE'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,7 +181,6 @@ const parseWarLog = (lineArray, war) => {
|
|||
const playerName = stats.players[i].name;
|
||||
stats.players[i]['respawn'] = stats.respawn.filter(res => res.player === playerName).length;
|
||||
stats.players[i]['kill'] = stats.kills.filter(kill => kill.shooter === playerName && !kill.friendlyFire).length;
|
||||
stats.players[i]['vehicle'] = stats.vehicles.filter(vehicle => vehicle.shooter === playerName && vehicleBlacklist.indexOf(vehicle.target) < 0).length;
|
||||
stats.players[i]['friendlyFire'] = stats.kills.filter(kill => kill.shooter === playerName && kill.friendlyFire).length;
|
||||
stats.players[i]['death'] = stats.kills.filter(kill => kill.target === playerName).length;
|
||||
stats.players[i]['revive'] = stats.revive.filter(rev => rev.medic === playerName && !rev.stabilized).length;
|
||||
|
@ -253,21 +233,6 @@ const getPlayerAndFractionFromString = (nameAndFractionString) => {
|
|||
}
|
||||
};
|
||||
|
||||
const getVehicleAndFractionFromString = (nameAndFractionString) => {
|
||||
const nameArray = nameAndFractionString.trim().split(WHITESPACE);
|
||||
const fractionPart = nameArray[nameArray.length - 1];
|
||||
|
||||
// escape it is some parachute fraction identifier
|
||||
if (fractionPart === 'OPF_F' || fractionPart === 'BLU_F') {
|
||||
return;
|
||||
}
|
||||
|
||||
const fraction = fractionPart === '(OPT_NATO)' || fractionPart === '(OPT_NATO_T)' ? 'BLUFOR' : 'OPFOR';
|
||||
const name = nameAndFractionString.substring(0, nameAndFractionString.indexOf(fractionPart) - 1);
|
||||
|
||||
return {name: name, fraction: fraction};
|
||||
};
|
||||
|
||||
const transformMoneyString = (budgetString) => {
|
||||
if (!budgetString.includes('e+')) {
|
||||
return parseInt(budgetString);
|
||||
|
|
|
@ -24,7 +24,6 @@ export interface Player {
|
|||
name?: string;
|
||||
warId?: War;
|
||||
kill?: number;
|
||||
vehicle?: number;
|
||||
death?: number;
|
||||
friendlyFire?: number;
|
||||
revive?: number;
|
||||
|
|
|
@ -81,26 +81,6 @@
|
|||
</ngx-charts-line-chart>
|
||||
</div>
|
||||
|
||||
<div class="chart-container">
|
||||
<ngx-charts-line-chart
|
||||
[results]="vehicleKillData"
|
||||
[showRefLines]="showRefLines"
|
||||
[showRefLabels]="showRefLabels"
|
||||
[referenceLines]="killRefLines"
|
||||
[scheme]="colorScheme"
|
||||
[gradient]="gradient"
|
||||
[xAxis]="xAxis"
|
||||
[yAxis]="yAxis"
|
||||
[legend]="legend"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[yAxisLabel]="yAxisVehicleKill"
|
||||
[autoScale]="autoscale"
|
||||
[timeline]="timeline"
|
||||
[roundDomains]="roundDomains">
|
||||
</ngx-charts-line-chart>
|
||||
</div>
|
||||
|
||||
<div class="chart-container">
|
||||
<ngx-charts-line-chart
|
||||
[results]="deathData"
|
||||
|
|
|
@ -25,7 +25,6 @@ export class CampaignPlayerDetailComponent {
|
|||
sumData: any[] = [];
|
||||
killData: any[] = [];
|
||||
friendlyFireData: any[] = [];
|
||||
vehicleKillData: any[] = [];
|
||||
deathData: any[] = [];
|
||||
respawnData: any[] = [];
|
||||
reviveData: any[] = [];
|
||||
|
@ -33,7 +32,6 @@ export class CampaignPlayerDetailComponent {
|
|||
|
||||
yAxisKill = 'Kills';
|
||||
yAxisFriendlyFire = 'FriendlyFire';
|
||||
yAxisVehicleKill = 'Farzeug-Kills';
|
||||
yAxisDeath = 'Tode';
|
||||
yAxisRespawn = 'Respawn';
|
||||
yAxisRevive = 'Revive';
|
||||
|
@ -51,7 +49,6 @@ export class CampaignPlayerDetailComponent {
|
|||
showRefLines = true;
|
||||
showRefLabels = true;
|
||||
killRefLines = [];
|
||||
vehicleKillRefLines = [];
|
||||
deathRefLines = [];
|
||||
captureRefLines = [];
|
||||
friendlyFireRefLines = [];
|
||||
|
@ -70,7 +67,6 @@ export class CampaignPlayerDetailComponent {
|
|||
|
||||
totalKills;
|
||||
totalFriendlyFire;
|
||||
totalVehicleKills;
|
||||
totalDeath;
|
||||
totalRespawn;
|
||||
totalRevive;
|
||||
|
@ -91,7 +87,6 @@ export class CampaignPlayerDetailComponent {
|
|||
.subscribe(campaignPlayer => {
|
||||
this.campaignPlayer = campaignPlayer;
|
||||
this.killData = this.assignData(this.yAxisKill, "kill");
|
||||
this.vehicleKillData = this.assignData(this.yAxisVehicleKill, "vehicle");
|
||||
this.friendlyFireData = this.assignData(this.yAxisFriendlyFire, "friendlyFire");
|
||||
this.deathData = this.assignData(this.yAxisDeath, "death");
|
||||
this.respawnData = this.assignData(this.yAxisRespawn, "respawn");
|
||||
|
@ -112,10 +107,6 @@ export class CampaignPlayerDetailComponent {
|
|||
name: this.yAxisFriendlyFire,
|
||||
value: this.totalFriendlyFire
|
||||
},
|
||||
{
|
||||
name: this.yAxisVehicleKill,
|
||||
value: this.totalVehicleKills
|
||||
},
|
||||
{
|
||||
name: this.yAxisDeath,
|
||||
value: this.totalDeath
|
||||
|
@ -134,7 +125,7 @@ export class CampaignPlayerDetailComponent {
|
|||
}
|
||||
];
|
||||
|
||||
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.vehicleKillData, this.deathData, this.respawnData, this.reviveData, this.captureData]);
|
||||
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.deathData, this.respawnData, this.reviveData, this.captureData]);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -147,12 +138,12 @@ export class CampaignPlayerDetailComponent {
|
|||
let total = 0;
|
||||
for (let i = 0; i < playerLength; i++) {
|
||||
const warDateString = ChartUtils.getShortDateString(this.campaignPlayer.players[i].warId.date);
|
||||
const value = this.campaignPlayer.players[i][field];
|
||||
const warKills = this.campaignPlayer.players[i][field];
|
||||
killObj.series.push({
|
||||
name: warDateString,
|
||||
value: value
|
||||
value: warKills
|
||||
});
|
||||
total += value;
|
||||
total += warKills;
|
||||
}
|
||||
switch (field) {
|
||||
case 'kill':
|
||||
|
@ -163,10 +154,6 @@ export class CampaignPlayerDetailComponent {
|
|||
this.friendlyFireRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||
this.totalFriendlyFire = total;
|
||||
break;
|
||||
case 'vehicle':
|
||||
this.vehicleKillRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||
this.totalVehicleKills = total;
|
||||
break;
|
||||
case 'death':
|
||||
this.deathRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||
this.totalDeath = total;
|
||||
|
|
|
@ -18,6 +18,8 @@ ngx-datatable {
|
|||
float: left;
|
||||
border: solid #dfdfdf 1px;
|
||||
border-radius: 10px 10px 2px 2px;
|
||||
border-right-style: none;
|
||||
border-top-style: none;
|
||||
}
|
||||
|
||||
:host /deep/ .datatable-header {
|
||||
|
|
|
@ -36,48 +36,6 @@
|
|||
<ngx-datatable-column [width]="valueColWidth" name="Kills" prop="kill"></ngx-datatable-column>
|
||||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
[rows]="players.friendlyFire"
|
||||
[messages]="emptyMessage"
|
||||
[headerHeight]="cellHeight"
|
||||
[rowHeight]="cellHeight"
|
||||
[cssClasses]='customClasses'
|
||||
[columnMode]="'force'"
|
||||
[scrollbarV]="true"
|
||||
[selectionType]="'single'">
|
||||
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
||||
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
||||
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
||||
<span class="player-name"
|
||||
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||
{{value}}
|
||||
</span>
|
||||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="valueColWidth" name="FriendlyFire" prop="friendlyFire"></ngx-datatable-column>
|
||||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
[rows]="players.vehicle"
|
||||
[messages]="emptyMessage"
|
||||
[headerHeight]="cellHeight"
|
||||
[rowHeight]="cellHeight"
|
||||
[cssClasses]='customClasses'
|
||||
[columnMode]="'force'"
|
||||
[scrollbarV]="true"
|
||||
[selectionType]="'single'">
|
||||
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
||||
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
||||
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
||||
<span class="player-name"
|
||||
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||
{{value}}
|
||||
</span>
|
||||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="valueColWidth" name="Fahrzeug-Kills" prop="vehicle"></ngx-datatable-column>
|
||||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
[rows]="players.death"
|
||||
[messages]="emptyMessage"
|
||||
|
@ -120,6 +78,27 @@
|
|||
<ngx-datatable-column [width]="valueColWidth" name="Respawn" prop="respawn"></ngx-datatable-column>
|
||||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
[rows]="players.friendlyFire"
|
||||
[messages]="emptyMessage"
|
||||
[headerHeight]="cellHeight"
|
||||
[rowHeight]="cellHeight"
|
||||
[cssClasses]='customClasses'
|
||||
[columnMode]="'force'"
|
||||
[scrollbarV]="true"
|
||||
[selectionType]="'single'">
|
||||
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
||||
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
||||
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
||||
<span class="player-name"
|
||||
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||
{{value}}
|
||||
</span>
|
||||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="valueColWidth" name="FriendlyFire" prop="friendlyFire"></ngx-datatable-column>
|
||||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
[rows]="players.revive"
|
||||
[messages]="emptyMessage"
|
||||
|
|
|
@ -86,7 +86,6 @@ export class StatisticHighScoreComponent {
|
|||
this.players = {
|
||||
kill: this.filterPlayerAttribute('kill'),
|
||||
friendlyFire: this.filterPlayerAttribute('friendlyFire'),
|
||||
vehicle: this.filterPlayerAttribute('vehicle'),
|
||||
death: this.filterPlayerAttribute('death'),
|
||||
respawn: this.filterPlayerAttribute('respawn'),
|
||||
revive: this.filterPlayerAttribute('revive'),
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
btnRadio="{{labelKill}}">{{labelKill}}</label>
|
||||
<label class="btn btn-default btn-dark" [(ngModel)]="chartSelectModel"
|
||||
btnRadio="{{labelFriendlyFire}}">{{labelFriendlyFire}}</label>
|
||||
<label class="btn btn-default btn-dark" [(ngModel)]="chartSelectModel"
|
||||
btnRadio="{{labelVehicle}}">{{labelVehicle}}</label>
|
||||
<label class="btn btn-default btn-dark" [(ngModel)]="chartSelectModel"
|
||||
btnRadio="{{labelRevive}}">{{labelRevive}}</label>
|
||||
<label class="btn btn-default btn-dark" [(ngModel)]="chartSelectModel"
|
||||
|
|
|
@ -34,7 +34,6 @@ export class FractionStatsComponent {
|
|||
tmpBudgetData;
|
||||
tmpKillData;
|
||||
tmpFrienlyFireData;
|
||||
tmpVehicleData;
|
||||
tmpTransportData;
|
||||
tmpReviveData;
|
||||
tmpStabilizeData;
|
||||
|
@ -48,7 +47,6 @@ export class FractionStatsComponent {
|
|||
labelBudget = 'Budget';
|
||||
labelKill = 'Kills';
|
||||
labelFriendlyFire = 'FriendlyFire';
|
||||
labelVehicle = 'Fahrzeug-Kills';
|
||||
labelTransport = 'Lufttransport';
|
||||
labelRevive = 'Revive';
|
||||
labelStabilize = 'Stabilisiert';
|
||||
|
@ -113,10 +111,6 @@ export class FractionStatsComponent {
|
|||
this.initKillData();
|
||||
this.lineChartData = this.tmpFrienlyFireData;
|
||||
break;
|
||||
case this.labelVehicle:
|
||||
this.initVehicleData();
|
||||
this.lineChartData = this.tmpVehicleData;
|
||||
break;
|
||||
case this.labelRevive:
|
||||
this.initRevive();
|
||||
this.lineChartData = this.tmpReviveData;
|
||||
|
@ -256,30 +250,6 @@ export class FractionStatsComponent {
|
|||
this.initialized.revive = true;
|
||||
}
|
||||
|
||||
initVehicleData() {
|
||||
if (this.initialized.vehicle) {
|
||||
return;
|
||||
}
|
||||
let vehicleKillCountBlufor = 0, vehicleKillCountOpfor = 0;
|
||||
for (const {transportEntry: vehicleEntry, index} of this.logData.vehicle.map((transportEntry, index) => ({
|
||||
transportEntry,
|
||||
index
|
||||
}))) {
|
||||
const vehicleEntryDate = new Date(vehicleEntry.time);
|
||||
if (vehicleEntry.fraction === 'BLUFOR') {
|
||||
vehicleKillCountBlufor++;
|
||||
} else {
|
||||
vehicleKillCountOpfor++;
|
||||
}
|
||||
if (this.isTwoMinutesAhead(vehicleEntryDate, this.tmpVehicleData) || index === this.logData.vehicle.length - 1) {
|
||||
this.tmpVehicleData[0].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountBlufor));
|
||||
this.tmpVehicleData[1].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountOpfor));
|
||||
}
|
||||
}
|
||||
this.addFinalTimeData(this.tmpVehicleData);
|
||||
this.initialized.vehicle = true;
|
||||
}
|
||||
|
||||
initTransportData() {
|
||||
if (this.initialized.transport) {
|
||||
return;
|
||||
|
@ -302,6 +272,7 @@ export class FractionStatsComponent {
|
|||
}
|
||||
this.addFinalTimeData(this.tmpTransportData);
|
||||
this.initialized.transport = true;
|
||||
|
||||
}
|
||||
|
||||
initFlagHoldData() {
|
||||
|
@ -337,13 +308,12 @@ export class FractionStatsComponent {
|
|||
this.tmpBudgetData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpKillData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpFrienlyFireData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpVehicleData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpTransportData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpReviveData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpStabilizeData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
this.tmpFlagCaptureData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
||||
|
||||
[this.tmpKillData, this.tmpFrienlyFireData, this.tmpVehicleData, this.tmpReviveData, this.tmpStabilizeData, this.tmpTransportData].forEach(tmp => {
|
||||
[this.tmpKillData, this.tmpFrienlyFireData, this.tmpReviveData, this.tmpStabilizeData, this.tmpTransportData].forEach(tmp => {
|
||||
[0, 1].forEach(index => {
|
||||
tmp[index].series.push(ChartUtils.getSeriesEntry(this.startDateObj, 0));
|
||||
})
|
||||
|
|
|
@ -25,16 +25,15 @@
|
|||
</ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="90" name="Kills" prop="kill"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="104" name="FriendlyFire" prop="friendlyFire"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="90" name="Fahrzeug" prop="vehicle"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="80" name="Revive" prop="revive"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="100" name="Eroberung" prop="flagTouch"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="70" name="Tod" prop="death"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="90" name="Respawn" prop="respawn"></ngx-datatable-column>
|
||||
<!--<ngx-datatable-column [width]="80" name="" prop="name">-->
|
||||
<!--<ng-template ngx-datatable-cell-template let-value="value">-->
|
||||
<!--<span class="btn btn-sm btn-default in-table-btn disabled">Detail</span>-->
|
||||
<!--</ng-template>-->
|
||||
<!--</ngx-datatable-column>-->
|
||||
<ngx-datatable-column [width]="80" name="" prop="name">
|
||||
<ng-template ngx-datatable-cell-template let-value="value">
|
||||
<span class="btn btn-sm btn-default in-table-btn disabled">Detail</span>
|
||||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="80" name="" prop="name">
|
||||
<ng-template ngx-datatable-cell-template let-value="value">
|
||||
<span class="btn btn-sm btn-default in-table-btn" (click)="selectPlayerDetail(1, value)">Gesamt</span>
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
.war-header {
|
||||
position: fixed;
|
||||
left: 35%;
|
||||
border-bottom: thin solid lightgrey;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1950px) {
|
||||
.war-header {
|
||||
left: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1500px) {
|
||||
.war-header {
|
||||
left: 380px;
|
||||
}
|
||||
}
|
||||
|
||||
.war-header-container {
|
||||
width: 920px;
|
||||
min-height: 168px;
|
||||
|
@ -10,10 +28,6 @@
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.war-header {
|
||||
border-bottom: thin solid lightgrey;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active > a {
|
||||
background: #222222;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue