Compare commits

..

No commits in common. "c2822893caf2930b2aad518fed4ea3134875e286" and "8b0e2d91d3d4546b662c37cddef7a46e9113037f" have entirely different histories.

5 changed files with 27 additions and 65 deletions

View File

@ -114,7 +114,7 @@ if (process.env.NODE_ENV === config.test.unit.env || process.env.NODE_ENV === co
const mongoServer = new MongodbMemoryServer();
mongoose.Promise = Promise;
mongoServer.getConnectionString().then((mongoUri) => {
mongoose.connect(mongoUri, {useNewUrlParser: true});
mongoose.connect(mongoUri, { useNewUrlParser: true });
mongoose.connection.on('error', (e) => {
if (e.message.code === 'ETIMEDOUT') {
@ -153,7 +153,7 @@ if (process.env.NODE_ENV === config.test.unit.env || process.env.NODE_ENV === co
}
logger(`Master ${process.pid} is running. Forking ${numWorkers} workers`);
// Check if worker id is died
//Check if worker id is died
cluster.on('exit', (worker, code, signal) => {
logger(`worker ${worker.process.pid} died`);
});

View File

@ -108,28 +108,19 @@ const parseWarLog = (lineArray, war) => {
const kill = {
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',
};
if (shooter) {
kill.shooter = shooter.name;
kill.fraction = shooter.fraction;
if (target) {
kill.friendlyFire = (target.fraction === shooter.fraction);
}
if (shooter.magazine) {
kill.magazine = shooter.magazine;
}
if (shooter.vehicle) {
kill.shooterVehicle = shooter.vehicle;
}
} else {
kill.fraction = 'NONE';
if (shooter.magazine) {
kill.magazine = shooter.magazine;
}
if (target) {
kill.target = target.name;
if (target.vehicle) {
kill.targetVehicle = target.vehicle;
}
if (shooter.vehicle) {
kill.shooterVehicle = shooter.vehicle;
}
if (target.vehicle) {
kill.targetVehicle = target.vehicle;
}
stats.kills.push(kill);
}
@ -321,15 +312,12 @@ const getPlayerInfoFromString = (inputString) => {
let name;
if (playerNameRegexMatch && playerNameRegexMatch.length >= 2) {
name = playerNameRegexMatch[2].trim();
// do not return player for 'unbekannt' or 'Error: No unit'
if (!name || name === 'unbekannt' || name === 'Error: No unit' || name === 'Selbstverschulden.') {
// do not return player for 'Error: No unit'
if (!name && name === 'Error: No unit') {
return;
}
resPlayer.name = name;
} else {
return;
}
// ADDITIONAL PLAYER NAMES
let additionalPlayerMatch;
while ((additionalPlayerMatch = playerNameRegex.exec(inputString)) !== null) {
@ -353,7 +341,7 @@ const getPlayerInfoFromString = (inputString) => {
}
if (side && side !== 'ENEMY') {
resPlayer.fraction = (side === 'WEST') ? 'BLUFOR' : 'OPFOR';
resPlayer.fraction = side === 'WEST' ? 'BLUFOR' : 'OPFOR';
}
// MAGAZINE

View File

@ -4219,13 +4219,11 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"optional": true
"bundled": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -4238,18 +4236,15 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"optional": true
"bundled": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"optional": true
"bundled": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"optional": true
"bundled": true
},
"core-util-is": {
"version": "1.0.2",
@ -4352,8 +4347,7 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true,
"optional": true
"bundled": true
},
"ini": {
"version": "1.3.5",
@ -4363,7 +4357,6 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -4376,20 +4369,17 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true,
"optional": true
"bundled": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -4406,7 +4396,6 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -4479,8 +4468,7 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"optional": true
"bundled": true
},
"object-assign": {
"version": "4.1.1",
@ -4490,7 +4478,6 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -4596,7 +4583,6 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",

View File

@ -7,7 +7,7 @@
.scroll-btn-right {
top: 50px;
left: calc(100vw - 50px);
left: calc(100vw - 45px);
}
.scroll-btn mat-icon {

View File

@ -1,14 +1,4 @@
import {
AfterViewInit,
Component,
ElementRef,
EventEmitter,
Input,
OnChanges,
Output,
SimpleChanges,
ViewChild
} from '@angular/core';
import {Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild} from '@angular/core';
import {Campaign} from '../../../models/model-interfaces';
import {LoginService} from '../../../services/app-user-service/login-service';
@ -40,10 +30,8 @@ export class CampaignNavigationComponent implements OnChanges {
constructor(public loginService: LoginService) {
}
ngOnChanges(changes: SimpleChanges) {
if (!changes.selectedCampaignId) {
this.isRightScrollVisible = this.campaigns.length > 4;
}
ngOnChanges() {
this.isRightScrollVisible = this.campaigns.length > 4;
}
select(campaign) {