Compare commits

...

6 Commits

3 changed files with 9 additions and 16 deletions

View File

@ -21,20 +21,14 @@ In addition, it sets up the mongo deamon to start up automatically with the syst
#### Setup for Production
**NOTE:** It his highly recommended not to run the following steps as _root_ user!
Before triggering the environment execution run
npm install
inside the main folder, to process all needed npm package installations for the program execution.
**NOTE:** It his highly recommended **not** to run the following steps as _root_ user!
For production setup run the script, described in _Setup for development_, adding the parameter `prod`
./docs/opt-cc-environment/3rd-party-install.sh prod
This adds the [`pm2` process manager](http://pm2.keymetrics.io/) to be installed and start the _opt-cc_ server as `pm2` process.
Run the `sudo` command printed as last output to configure the `pm2` process for automatic start on the system, as the current user.
Run the `sudo` command printed as last output to configure the `pm2` process for automatic start on the system.
## Development

View File

@ -64,13 +64,15 @@ const parseWarLog = (lineArray, war) => {
const budg = line.split(WHITESPACE);
if (line.includes('Startbudget')) {
stats.war['budgetBlufor'] = transformMoneyString(budg[9]);
stats.war['budgetOpfor'] = transformMoneyString(budg[12].slice(0,-1));
stats.war['budgetOpfor'] = transformMoneyString(budg[12].slice(0, -1));
// this date needs to be assigned in first place !important
const dateString = budg[0].slice(0,-1).split('/');
stats.war.date = new Date(dateString[0], dateString[1], dateString[2])
const dateString = budg[0].slice(0, -1).split('/').map(s => parseInt(s));
stats.war.date = new Date(dateString[0], dateString[1] - 1, dateString[2]);
} else if (line.includes('Endbudget')) {
stats.war['endBudgetBlufor'] = transformMoneyString(budg[9].substr(1));
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0,-1));
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -1));
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
} else {
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
@ -117,7 +119,7 @@ const parseWarLog = (lineArray, war) => {
*/
else if (line.includes('(Respawn)')) {
const resp = line.split(WHITESPACE);
const playerName = line.substring(line.lastIndexOf('Spieler:') + 9, line.lastIndexOf('- Kosten') -1);
const playerName = line.substring(line.lastIndexOf('Spieler:') + 9, line.lastIndexOf('- Kosten') - 1);
stats.respawn.push(getRespawnEntry(resp, playerName, war._id, war.date));
}

View File

@ -30,9 +30,6 @@ export class AppComponent {
}
if (event instanceof NavigationEnd) {
this.loading = false;
if (router.url.includes(RouteConfig.overviewPath)) {
window.scrollTo({left: 0, top: 0, behavior: 'smooth'});
}
}
});
}