Compare commits
No commits in common. "9070964adb60aa90cf142f034c3df8a6e3441ec8" and "bfa1913231391587f6ef1dcb72f55420a8aad10e" have entirely different histories.
9070964adb
...
bfa1913231
|
@ -8,5 +8,4 @@ for i in "${FILES[@]}"
|
||||||
do
|
do
|
||||||
echo "minify ${i} ..."
|
echo "minify ${i} ..."
|
||||||
$(npm bin)/uglifyjs public/${i}.bundle.js ${OPTIONS} -o public/${i}.bundle.js
|
$(npm bin)/uglifyjs public/${i}.bundle.js ${OPTIONS} -o public/${i}.bundle.js
|
||||||
rm -f public/${i}.bundle.js.map
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -128,8 +128,7 @@
|
||||||
"commander": {
|
"commander": {
|
||||||
"version": "2.6.0",
|
"version": "2.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz",
|
||||||
"integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=",
|
"integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"concurrently": {
|
"concurrently": {
|
||||||
"version": "3.5.0",
|
"version": "3.5.0",
|
||||||
|
@ -632,15 +631,8 @@
|
||||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.26.tgz",
|
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.26.tgz",
|
||||||
"integrity": "sha512-+D/BjzuvT1oRMSkH0fuF3M/BCvDxDywmZasd1UTPPHsdsHZqJEAZSvrojgFlS7lrM3ZZWq5h7Bb5i96X1TbOJw==",
|
"integrity": "sha512-+D/BjzuvT1oRMSkH0fuF3M/BCvDxDywmZasd1UTPPHsdsHZqJEAZSvrojgFlS7lrM3ZZWq5h7Bb5i96X1TbOJw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"commander": "2.11.0",
|
"commander": "2.6.0",
|
||||||
"source-map": "0.5.6"
|
"source-map": "0.5.6"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"commander": {
|
|
||||||
"version": "2.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
|
|
||||||
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uuid": {
|
"uuid": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "opt-cc",
|
"name": "opt-cc",
|
||||||
"version": "1.1.3",
|
"version": "1.1.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
"protractor": "~5.1.1",
|
"protractor": "~5.1.1",
|
||||||
"protractor-jasmine2-screenshot-reporter": "^0.3.2",
|
"protractor-jasmine2-screenshot-reporter": "^0.3.2",
|
||||||
"ts-node": "1.2.1",
|
"ts-node": "1.2.1",
|
||||||
"tslint": "^4.3.0"
|
"tslint": "^4.3.0",
|
||||||
|
"typescript": "^2.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,48 @@
|
||||||
h3 {
|
h1 {
|
||||||
width: 920px;
|
width: 920px;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
margin-left: 25%
|
margin-left: 25%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-table {
|
||||||
|
display: table;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: 1%;
|
||||||
|
width: auto;
|
||||||
|
border-spacing: 5px; /* cellspacing:poor IE support for this */
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-table-row {
|
||||||
|
display: table-row;
|
||||||
|
width: auto;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-table-col {
|
||||||
|
float: left; /* fix for buggy browsers */
|
||||||
|
display: table-column;
|
||||||
|
padding: 5px 15px 5px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.army-head {
|
||||||
|
font-weight: bolder;
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-link {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-opfor {
|
||||||
|
color: firebrick;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-blufor {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
|
@ -13,9 +13,10 @@
|
||||||
[legendTitle]="''"
|
[legendTitle]="''"
|
||||||
[showXAxisLabel]="true"
|
[showXAxisLabel]="true"
|
||||||
[showYAxisLabel]="true"
|
[showYAxisLabel]="true"
|
||||||
[xAxisLabel]="'Schlachtdatum'"
|
[xAxisLabel]="Schlachtdatum"
|
||||||
[yAxisLabel]="'Punkte'"
|
[yAxisLabel]="Punkte"
|
||||||
[autoScale]="false"
|
[autoScale]="false"
|
||||||
|
[timeline]="true"
|
||||||
(select)="onSelect($event)">
|
(select)="onSelect($event)">
|
||||||
</ngx-charts-line-chart>
|
</ngx-charts-line-chart>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {Component} from "@angular/core";
|
import {Component} from "@angular/core";
|
||||||
import {AppComponent} from "../app.component";
|
|
||||||
import {WarService} from "../services/war-service/war.service";
|
import {WarService} from "../services/war-service/war.service";
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,46 +12,26 @@ export class StatisticComponent {
|
||||||
chartData: any[] = [];
|
chartData: any[] = [];
|
||||||
|
|
||||||
colorScheme = {
|
colorScheme = {
|
||||||
domain: ['#0000FF', '#B22222', '#595DC7', '#B25D62']
|
domain: ['#0000FF', '#B22222', '#C7B42C', '#AAAAAA']
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(private appComponent: AppComponent,
|
constructor(private warService: WarService) {
|
||||||
private warService: WarService) {
|
Object.assign(this, this.chartData)
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
let wars = this.appComponent.wars;
|
this.warService.getAllWars()
|
||||||
if (wars.length === 0) {
|
.subscribe((wars) => {
|
||||||
this.warService.getAllWars().subscribe(items => {
|
let updateObj = [{
|
||||||
this.initChart(items);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.initChart(wars);
|
|
||||||
}
|
|
||||||
|
|
||||||
initChart(wars: any[]) {
|
|
||||||
let updateObj = [
|
|
||||||
{
|
|
||||||
"name": "NATO",
|
"name": "NATO",
|
||||||
"series": []
|
"series": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CSAT",
|
"name": "CSAT",
|
||||||
"series": []
|
"series": []
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Anz. Spieler NATO",
|
|
||||||
"series": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Anz. Spieler CSAT",
|
|
||||||
"series": []
|
|
||||||
}];
|
}];
|
||||||
for (let i = wars.length - 1; i >= 0; i--) {
|
for (let i = 0; i < wars.length; i++) {
|
||||||
let isoDate = wars[i].date.slice(0, 10);
|
let warDateString = new Date(wars[i].date);
|
||||||
let dayDate = parseInt(isoDate.slice(8, 10)) + 1;
|
|
||||||
let warDateString = (dayDate < 10 ? "0" + dayDate : dayDate) + '.'
|
|
||||||
+ isoDate.slice(5, 7) + '.' + isoDate.slice(0, 4);
|
|
||||||
let bluforData = {
|
let bluforData = {
|
||||||
name: warDateString,
|
name: warDateString,
|
||||||
value: wars[i].ptBlufor
|
value: wars[i].ptBlufor
|
||||||
|
@ -63,20 +42,10 @@ export class StatisticComponent {
|
||||||
value: wars[i].ptOpfor
|
value: wars[i].ptOpfor
|
||||||
};
|
};
|
||||||
updateObj[1].series.push(opforData);
|
updateObj[1].series.push(opforData);
|
||||||
let bluforPlayers = {
|
|
||||||
name: warDateString,
|
|
||||||
value: 13
|
|
||||||
};
|
|
||||||
updateObj[2].series.push(bluforPlayers);
|
|
||||||
let opforPlayers = {
|
|
||||||
name: warDateString,
|
|
||||||
value: 13
|
|
||||||
};
|
|
||||||
updateObj[3].series.push(opforPlayers);
|
|
||||||
}
|
}
|
||||||
this.chartData = updateObj;
|
this.chartData = updateObj;
|
||||||
Object.assign(this, this.chartData)
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
onSelect(event) {
|
onSelect(event) {
|
||||||
console.log(event);
|
console.log(event);
|
||||||
|
|
Loading…
Reference in New Issue