Compare commits

..

No commits in common. "5c5430314ab08fd33f262fa930ddfd26a0c14963" and "5821dd31f95b8f8e08f53f03c4c6a73caf90b297" have entirely different histories.

3 changed files with 16 additions and 9 deletions

View File

@ -21,14 +21,20 @@ In addition, it sets up the mongo deamon to start up automatically with the syst
#### Setup for Production #### Setup for Production
**NOTE:** It his highly recommended **not** to run the following steps as _root_ user! **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.
For production setup run the script, described in _Setup for development_, adding the parameter `prod` For production setup run the script, described in _Setup for development_, adding the parameter `prod`
./docs/opt-cc-environment/3rd-party-install.sh 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. 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. Run the `sudo` command printed as last output to configure the `pm2` process for automatic start on the system, as the current user.
## Development ## Development

View File

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

View File

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