Compare commits
No commits in common. "bfa1913231391587f6ef1dcb72f55420a8aad10e" and "62ca204b6c188b60562ebf3915a5176c4e9acb38" have entirely different histories.
bfa1913231
...
62ca204b6c
File diff suppressed because it is too large
Load Diff
11
minify.sh
11
minify.sh
|
@ -1,11 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# array of files to minify
|
|
||||||
FILES=(inline main polyfills scripts styles vendor)
|
|
||||||
OPTIONS="-c toplevel,dead_code=true,unused=true"
|
|
||||||
|
|
||||||
for i in "${FILES[@]}"
|
|
||||||
do
|
|
||||||
echo "minify ${i} ..."
|
|
||||||
$(npm bin)/uglifyjs public/${i}.bundle.js ${OPTIONS} -o public/${i}.bundle.js
|
|
||||||
done
|
|
|
@ -2,17 +2,12 @@
|
||||||
"name": "opt-cc",
|
"name": "opt-cc",
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "4.11.8",
|
"version": "4.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
||||||
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
|
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"co": "4.6.0",
|
|
||||||
"json-stable-stringify": "1.0.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
|
@ -61,19 +56,13 @@
|
||||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
|
||||||
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
|
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true
|
||||||
"requires": {
|
|
||||||
"tweetnacl": "0.14.5"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"boom": {
|
"boom": {
|
||||||
"version": "2.10.1",
|
"version": "2.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
|
||||||
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
|
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"hoek": "2.16.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "2.16.3",
|
"version": "2.16.3",
|
||||||
|
@ -94,13 +83,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
|
||||||
"integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=",
|
"integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"ansi-styles": "1.1.0",
|
|
||||||
"escape-string-regexp": "1.0.5",
|
|
||||||
"has-ansi": "0.1.0",
|
|
||||||
"strip-ansi": "0.3.0",
|
|
||||||
"supports-color": "0.2.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
|
@ -120,31 +102,19 @@
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
|
||||||
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
|
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"delayed-stream": "1.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"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",
|
||||||
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz",
|
||||||
"integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=",
|
"integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"chalk": "0.5.1",
|
|
||||||
"commander": "2.6.0",
|
|
||||||
"date-fns": "1.28.5",
|
|
||||||
"lodash": "4.17.4",
|
|
||||||
"rx": "2.3.24",
|
|
||||||
"spawn-command": "0.0.2-1",
|
|
||||||
"supports-color": "3.2.3",
|
|
||||||
"tree-kill": "1.1.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
|
@ -156,19 +126,13 @@
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
|
||||||
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
|
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"boom": "2.10.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"dashdash": {
|
"dashdash": {
|
||||||
"version": "1.14.1",
|
"version": "1.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
||||||
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
|
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"assert-plus": "1.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"assert-plus": {
|
"assert-plus": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -195,10 +159,7 @@
|
||||||
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
|
||||||
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
|
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true
|
||||||
"requires": {
|
|
||||||
"jsbn": "0.1.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"escape-string-regexp": {
|
"escape-string-regexp": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -228,21 +189,13 @@
|
||||||
"version": "2.1.4",
|
"version": "2.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
|
||||||
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
|
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"asynckit": "0.4.0",
|
|
||||||
"combined-stream": "1.0.5",
|
|
||||||
"mime-types": "2.1.15"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"getpass": {
|
"getpass": {
|
||||||
"version": "0.1.7",
|
"version": "0.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
||||||
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
|
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"assert-plus": "1.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"assert-plus": {
|
"assert-plus": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -262,20 +215,13 @@
|
||||||
"version": "4.2.1",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
|
||||||
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
|
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"ajv": "4.11.8",
|
|
||||||
"har-schema": "1.0.5"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"has-ansi": {
|
"has-ansi": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
|
||||||
"integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=",
|
"integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "0.2.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -288,12 +234,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
|
||||||
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
|
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"boom": "2.10.1",
|
|
||||||
"cryptiles": "2.0.5",
|
|
||||||
"hoek": "2.16.3",
|
|
||||||
"sntp": "1.0.9"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "2.16.3",
|
"version": "2.16.3",
|
||||||
|
@ -313,12 +253,7 @@
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
|
||||||
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
|
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"assert-plus": "0.2.0",
|
|
||||||
"jsprim": "1.4.0",
|
|
||||||
"sshpk": "1.13.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"is-typedarray": {
|
"is-typedarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -348,14 +283,7 @@
|
||||||
"version": "9.2.0",
|
"version": "9.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/joi/-/joi-9.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/joi/-/joi-9.2.0.tgz",
|
||||||
"integrity": "sha1-M4WseQGSEwy+Iw6ALsAskhW7/to=",
|
"integrity": "sha1-M4WseQGSEwy+Iw6ALsAskhW7/to=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"hoek": "4.1.1",
|
|
||||||
"isemail": "2.2.1",
|
|
||||||
"items": "2.1.1",
|
|
||||||
"moment": "2.18.1",
|
|
||||||
"topo": "2.0.2"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"jsbn": {
|
"jsbn": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
|
@ -374,10 +302,7 @@
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
|
||||||
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
|
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"jsonify": "0.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"json-stringify-safe": {
|
"json-stringify-safe": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
|
@ -396,12 +321,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
|
||||||
"integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=",
|
"integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"assert-plus": "1.0.0",
|
|
||||||
"extsprintf": "1.0.2",
|
|
||||||
"json-schema": "0.2.3",
|
|
||||||
"verror": "1.3.6"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"assert-plus": {
|
"assert-plus": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -427,10 +346,7 @@
|
||||||
"version": "2.1.15",
|
"version": "2.1.15",
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz",
|
||||||
"integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=",
|
"integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"mime-db": "1.27.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
|
@ -472,31 +388,7 @@
|
||||||
"version": "2.81.0",
|
"version": "2.81.0",
|
||||||
"resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
|
"resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
|
||||||
"integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
|
"integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"aws-sign2": "0.6.0",
|
|
||||||
"aws4": "1.6.0",
|
|
||||||
"caseless": "0.12.0",
|
|
||||||
"combined-stream": "1.0.5",
|
|
||||||
"extend": "3.0.1",
|
|
||||||
"forever-agent": "0.6.1",
|
|
||||||
"form-data": "2.1.4",
|
|
||||||
"har-validator": "4.2.1",
|
|
||||||
"hawk": "3.1.3",
|
|
||||||
"http-signature": "1.1.1",
|
|
||||||
"is-typedarray": "1.0.0",
|
|
||||||
"isstream": "0.1.2",
|
|
||||||
"json-stringify-safe": "5.0.1",
|
|
||||||
"mime-types": "2.1.15",
|
|
||||||
"oauth-sign": "0.8.2",
|
|
||||||
"performance-now": "0.2.0",
|
|
||||||
"qs": "6.4.0",
|
|
||||||
"safe-buffer": "5.1.1",
|
|
||||||
"stringstream": "0.0.5",
|
|
||||||
"tough-cookie": "2.3.2",
|
|
||||||
"tunnel-agent": "0.6.0",
|
|
||||||
"uuid": "3.1.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"rx": {
|
"rx": {
|
||||||
"version": "2.3.24",
|
"version": "2.3.24",
|
||||||
|
@ -507,7 +399,7 @@
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
||||||
"integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=",
|
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"sntp": {
|
"sntp": {
|
||||||
|
@ -515,9 +407,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
|
||||||
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
|
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"hoek": "2.16.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "2.16.3",
|
"version": "2.16.3",
|
||||||
|
@ -527,11 +416,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"source-map": {
|
|
||||||
"version": "0.5.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
|
|
||||||
"integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI="
|
|
||||||
},
|
|
||||||
"spawn-command": {
|
"spawn-command": {
|
||||||
"version": "0.0.2-1",
|
"version": "0.0.2-1",
|
||||||
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
|
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
|
||||||
|
@ -543,16 +427,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
|
||||||
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
|
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"asn1": "0.2.3",
|
|
||||||
"assert-plus": "1.0.0",
|
|
||||||
"bcrypt-pbkdf": "1.0.1",
|
|
||||||
"dashdash": "1.14.1",
|
|
||||||
"ecc-jsbn": "0.1.1",
|
|
||||||
"getpass": "0.1.7",
|
|
||||||
"jsbn": "0.1.1",
|
|
||||||
"tweetnacl": "0.14.5"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"assert-plus": {
|
"assert-plus": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -572,37 +446,25 @@
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
|
||||||
"integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=",
|
"integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "0.2.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "3.2.3",
|
"version": "3.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
|
||||||
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
|
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"has-flag": "1.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"topo": {
|
"topo": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
|
||||||
"integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=",
|
"integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"hoek": "4.1.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"tough-cookie": {
|
"tough-cookie": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
|
||||||
"integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
|
"integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"punycode": "1.4.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"tree-kill": {
|
"tree-kill": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
|
@ -614,10 +476,7 @@
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
|
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "5.1.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"tweetnacl": {
|
"tweetnacl": {
|
||||||
"version": "0.14.5",
|
"version": "0.14.5",
|
||||||
|
@ -626,42 +485,23 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"uglify-js": {
|
|
||||||
"version": "3.0.26",
|
|
||||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.26.tgz",
|
|
||||||
"integrity": "sha512-+D/BjzuvT1oRMSkH0fuF3M/BCvDxDywmZasd1UTPPHsdsHZqJEAZSvrojgFlS7lrM3ZZWq5h7Bb5i96X1TbOJw==",
|
|
||||||
"requires": {
|
|
||||||
"commander": "2.6.0",
|
|
||||||
"source-map": "0.5.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
||||||
"integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=",
|
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"verror": {
|
"verror": {
|
||||||
"version": "1.3.6",
|
"version": "1.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
|
||||||
"integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=",
|
"integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"extsprintf": "1.0.2"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"wait-on": {
|
"wait-on": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wait-on/-/wait-on-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wait-on/-/wait-on-2.0.2.tgz",
|
||||||
"integrity": "sha1-CoT9BwJMb8Joyw6r5YW+IXqvK6o=",
|
"integrity": "sha1-CoT9BwJMb8Joyw6r5YW+IXqvK6o=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
|
||||||
"core-js": "2.4.1",
|
|
||||||
"joi": "9.2.0",
|
|
||||||
"minimist": "1.2.0",
|
|
||||||
"request": "2.81.0",
|
|
||||||
"rx": "4.1.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rx": {
|
"rx": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
"start": "npm run deploy-static-prod && npm start --prefix ./api",
|
"start": "npm run deploy-static-prod && npm start --prefix ./api",
|
||||||
"dev": "npm run deploy-static && npm run dev --prefix ./api",
|
"dev": "npm run deploy-static && npm run dev --prefix ./api",
|
||||||
"deploy-static": "cd ./static && $(npm bin)/ng build && ln -s ../api/resource/ ../public/resource",
|
"deploy-static": "cd ./static && $(npm bin)/ng build && ln -s ../api/resource/ ../public/resource",
|
||||||
"deploy-static-prod": "cd ./static && $(npm bin)/ng build --env=prod && ln -s ../api/resource/ ../public/resource && cd .. && npm run deploy-minify",
|
"deploy-static-prod": "cd ./static && $(npm bin)/ng build --env=prod && ln -s ../api/resource/ ../public/resource",
|
||||||
"deploy-minify": "./minify.sh",
|
|
||||||
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
||||||
"mongodb": "mkdir -p mongodb-data && mongod --dbpath ./mongodb-data",
|
"mongodb": "mkdir -p mongodb-data && mongod --dbpath ./mongodb-data",
|
||||||
"test": "npm test --prefix ./api",
|
"test": "npm test --prefix ./api",
|
||||||
|
@ -19,8 +18,5 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^3.4.0",
|
"concurrently": "^3.4.0",
|
||||||
"wait-on": "^2.0.2"
|
"wait-on": "^2.0.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"uglify-js": "^3.0.26"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,9 +31,6 @@
|
||||||
<li *ngIf="loginService.hasPermission(3)">
|
<li *ngIf="loginService.hasPermission(3)">
|
||||||
<a routerLink='/cc-wars' class="link">Hinzufügen...</a>
|
<a routerLink='/cc-wars' class="link">Hinzufügen...</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a routerLink='/cc-statistic' class="link">Übersicht</a>
|
|
||||||
</li>
|
|
||||||
<li *ngFor="let war of wars">
|
<li *ngFor="let war of wars">
|
||||||
<a [routerLink]="['/cc-wars/' + war._id]">{{war.title}}
|
<a [routerLink]="['/cc-wars/' + war._id]">{{war.title}}
|
||||||
<small>{{war.date | date: 'dd.MM.yy'}}</small>
|
<small>{{war.date | date: 'dd.MM.yy'}}</small>
|
||||||
|
|
|
@ -14,7 +14,6 @@ import {RequestPromotionComponent} from "./request/promotion/req-promotion.compo
|
||||||
import {ConfirmPromotionComponent} from "./request/confirm-promotion/confirm-promotion.component";
|
import {ConfirmPromotionComponent} from "./request/confirm-promotion/confirm-promotion.component";
|
||||||
import {ConfirmAwardComponent} from "./request/confirm-award/confirm-award.component";
|
import {ConfirmAwardComponent} from "./request/confirm-award/confirm-award.component";
|
||||||
import {warRoutes, warsRoutingComponents} from "./wars/wars.routing";
|
import {warRoutes, warsRoutingComponents} from "./wars/wars.routing";
|
||||||
import {StatisticComponent} from "./statistic/statistic.component";
|
|
||||||
|
|
||||||
|
|
||||||
export const appRoutes: Routes = [
|
export const appRoutes: Routes = [
|
||||||
|
@ -23,7 +22,6 @@ export const appRoutes: Routes = [
|
||||||
{path: '', redirectTo: '/cc-overview', pathMatch: 'full'},
|
{path: '', redirectTo: '/cc-overview', pathMatch: 'full'},
|
||||||
|
|
||||||
{path: 'cc-wars', children: warRoutes},
|
{path: 'cc-wars', children: warRoutes},
|
||||||
{path: 'cc-statistic', component: StatisticComponent},
|
|
||||||
|
|
||||||
{path: 'login', component: LoginComponent},
|
{path: 'login', component: LoginComponent},
|
||||||
{path: 'signup', component: SignupComponent},
|
{path: 'signup', component: SignupComponent},
|
||||||
|
@ -48,7 +46,7 @@ export const appRoutes: Routes = [
|
||||||
export const appRouting = RouterModule.forRoot(appRoutes);
|
export const appRouting = RouterModule.forRoot(appRoutes);
|
||||||
|
|
||||||
export const routingComponents = [LoginComponent, SignupComponent, RequestAwardComponent, RequestPromotionComponent, ConfirmAwardComponent,
|
export const routingComponents = [LoginComponent, SignupComponent, RequestAwardComponent, RequestPromotionComponent, ConfirmAwardComponent,
|
||||||
ConfirmPromotionComponent, StatisticComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent, ...usersRoutingComponents,
|
ConfirmPromotionComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent, ...usersRoutingComponents,
|
||||||
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents, ...warsRoutingComponents];
|
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents, ...warsRoutingComponents];
|
||||||
|
|
||||||
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];
|
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];
|
||||||
|
|
|
@ -2,6 +2,24 @@
|
||||||
|
|
||||||
<div style="width: 1200px; margin-left: 25%">
|
<div style="width: 1200px; margin-left: 25%">
|
||||||
|
|
||||||
|
<ngx-charts-line-chart
|
||||||
|
[view]="view"
|
||||||
|
[scheme]="colorScheme"
|
||||||
|
[results]="chartData"
|
||||||
|
[gradient]="gradient"
|
||||||
|
[xAxis]="showXAxis"
|
||||||
|
[yAxis]="showYAxis"
|
||||||
|
[legend]="showLegend"
|
||||||
|
[legendTitle]="legendTitle"
|
||||||
|
[showXAxisLabel]="showXAxisLabel"
|
||||||
|
[showYAxisLabel]="showYAxisLabel"
|
||||||
|
[xAxisLabel]="xAxisLabel"
|
||||||
|
[yAxisLabel]="yAxisLabel"
|
||||||
|
[autoScale]="autoScale"
|
||||||
|
[timeline]="timeline"
|
||||||
|
(select)="onSelect($event)">
|
||||||
|
</ngx-charts-line-chart>
|
||||||
|
|
||||||
<div class="div-table" style="width: 490px; float:left">
|
<div class="div-table" style="width: 490px; float:left">
|
||||||
<h3 class="text-blufor army-head">NATO</h3>
|
<h3 class="text-blufor army-head">NATO</h3>
|
||||||
<div *ngFor="let squad of army.NATO.squads" style="outline:1px solid #D4D4D4;">
|
<div *ngFor="let squad of army.NATO.squads" style="outline:1px solid #D4D4D4;">
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import {Component} from "@angular/core";
|
import {Component} from "@angular/core";
|
||||||
import {Army} from "../models/model-interfaces";
|
import {Army, War} from "../models/model-interfaces";
|
||||||
import {ArmyService} from "../services/army-service/army.service";
|
import {ArmyService} from "../services/army-service/army.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
import {WarService} from "../services/war-service/war.service";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -13,9 +14,34 @@ export class ArmyComponent {
|
||||||
|
|
||||||
army: Army = {NATO: {squads: [], memberCount: 0}, CSAT: {squads: [], memberCount: 0}};
|
army: Army = {NATO: {squads: [], memberCount: 0}, CSAT: {squads: [], memberCount: 0}};
|
||||||
|
|
||||||
|
chartData: any[] = [];
|
||||||
|
|
||||||
|
view: any[] = [700, 400];
|
||||||
|
|
||||||
|
// options
|
||||||
|
showXAxis = true;
|
||||||
|
showYAxis = true;
|
||||||
|
timeline=true;
|
||||||
|
gradient = false;
|
||||||
|
showLegend = true;
|
||||||
|
legendTitle = "";
|
||||||
|
showXAxisLabel = true;
|
||||||
|
xAxisLabel = 'Schlachtdatum';
|
||||||
|
showYAxisLabel = true;
|
||||||
|
yAxisLabel = 'Punkte';
|
||||||
|
|
||||||
|
colorScheme = {
|
||||||
|
domain: ['#0000FF', '#B22222', '#C7B42C', '#AAAAAA']
|
||||||
|
};
|
||||||
|
|
||||||
|
// line, area
|
||||||
|
autoScale = false;
|
||||||
|
|
||||||
constructor(private router: Router,
|
constructor(private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private armyService: ArmyService) {
|
private armyService: ArmyService,
|
||||||
|
private warService: WarService) {
|
||||||
|
Object.assign(this, this.chartData)
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -23,10 +49,39 @@ export class ArmyComponent {
|
||||||
.subscribe(army => {
|
.subscribe(army => {
|
||||||
this.army = army;
|
this.army = army;
|
||||||
});
|
});
|
||||||
|
this.warService.getAllWars()
|
||||||
|
.subscribe((wars) => {
|
||||||
|
let updateObj = [{
|
||||||
|
"name": "NATO",
|
||||||
|
"series": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CSAT",
|
||||||
|
"series": []
|
||||||
|
}];
|
||||||
|
for (let i = 0; i < wars.length; i++) {
|
||||||
|
let warDateString = wars[i].date;
|
||||||
|
let bluforData = {
|
||||||
|
name: warDateString,
|
||||||
|
value: wars[i].ptBlufor
|
||||||
|
};
|
||||||
|
updateObj[0].series.push(bluforData);
|
||||||
|
let opforData = {
|
||||||
|
name: warDateString,
|
||||||
|
value: wars[i].ptOpfor
|
||||||
|
};
|
||||||
|
updateObj[1].series.push(opforData);
|
||||||
|
}
|
||||||
|
this.chartData = updateObj;
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
select(memberId) {
|
select(memberId) {
|
||||||
this.router.navigate(['member', memberId], {relativeTo: this.route});
|
this.router.navigate(['member', memberId], {relativeTo: this.route});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSelect(event) {
|
||||||
|
console.log(event);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ export interface User {
|
||||||
_id?: string;
|
_id?: string;
|
||||||
boardUserId?: number;
|
boardUserId?: number;
|
||||||
username?: string;
|
username?: string;
|
||||||
squad?: any; //Squad or string
|
squad?: Squad;
|
||||||
rank?: Rank;
|
rank?: Rank;
|
||||||
awards?: Award[];
|
awards?: Award[];
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ export interface Rank {
|
||||||
export interface Award {
|
export interface Award {
|
||||||
_id?: string,
|
_id?: string,
|
||||||
userId: string,
|
userId: string,
|
||||||
decorationId?: any; //Decoration or string
|
decorationId?: Decoration;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
proposer?: AppUser;
|
proposer?: AppUser;
|
||||||
date?: number; // since Date.now() returns a number
|
date?: number; // since Date.now() returns a number
|
||||||
|
|
|
@ -79,7 +79,7 @@ export class RequestAwardComponent {
|
||||||
|
|
||||||
addAwarding(previewImage, descriptionField) {
|
addAwarding(previewImage, descriptionField) {
|
||||||
if (this.decoration._id && this.reason.length > 0) {
|
if (this.decoration._id && this.reason.length > 0) {
|
||||||
const award : Award = {
|
const award = {
|
||||||
"userId": this.user._id,
|
"userId": this.user._id,
|
||||||
"decorationId": this.decoration._id,
|
"decorationId": this.decoration._id,
|
||||||
"reason": this.reason,
|
"reason": this.reason,
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
h1 {
|
|
||||||
width: 920px;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
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;
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
<h3>Statistik</h3>
|
|
||||||
|
|
||||||
<div style="width: 1200px; margin-left: 25%">
|
|
||||||
|
|
||||||
<ngx-charts-line-chart
|
|
||||||
[view]="[1050, 400]"
|
|
||||||
[scheme]="colorScheme"
|
|
||||||
[results]="chartData"
|
|
||||||
[gradient]="false"
|
|
||||||
[xAxis]="true"
|
|
||||||
[yAxis]="true"
|
|
||||||
[legend]="true"
|
|
||||||
[legendTitle]="''"
|
|
||||||
[showXAxisLabel]="true"
|
|
||||||
[showYAxisLabel]="true"
|
|
||||||
[xAxisLabel]="Schlachtdatum"
|
|
||||||
[yAxisLabel]="Punkte"
|
|
||||||
[autoScale]="false"
|
|
||||||
[timeline]="true"
|
|
||||||
(select)="onSelect($event)">
|
|
||||||
</ngx-charts-line-chart>
|
|
||||||
|
|
||||||
</div>
|
|
|
@ -1,54 +0,0 @@
|
||||||
import {Component} from "@angular/core";
|
|
||||||
import {WarService} from "../services/war-service/war.service";
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'statistic',
|
|
||||||
templateUrl: './statistic.component.html',
|
|
||||||
styleUrls: ['./statistic.component.css']
|
|
||||||
})
|
|
||||||
export class StatisticComponent {
|
|
||||||
|
|
||||||
chartData: any[] = [];
|
|
||||||
|
|
||||||
colorScheme = {
|
|
||||||
domain: ['#0000FF', '#B22222', '#C7B42C', '#AAAAAA']
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(private warService: WarService) {
|
|
||||||
Object.assign(this, this.chartData)
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.warService.getAllWars()
|
|
||||||
.subscribe((wars) => {
|
|
||||||
let updateObj = [{
|
|
||||||
"name": "NATO",
|
|
||||||
"series": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "CSAT",
|
|
||||||
"series": []
|
|
||||||
}];
|
|
||||||
for (let i = 0; i < wars.length; i++) {
|
|
||||||
let warDateString = new Date(wars[i].date);
|
|
||||||
let bluforData = {
|
|
||||||
name: warDateString,
|
|
||||||
value: wars[i].ptBlufor
|
|
||||||
};
|
|
||||||
updateObj[0].series.push(bluforData);
|
|
||||||
let opforData = {
|
|
||||||
name: warDateString,
|
|
||||||
value: wars[i].ptOpfor
|
|
||||||
};
|
|
||||||
updateObj[1].series.push(opforData);
|
|
||||||
}
|
|
||||||
this.chartData = updateObj;
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
onSelect(event) {
|
|
||||||
console.log(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="title">Name</label>
|
<label for="title">Name</label>
|
||||||
<input class="form-control"
|
<input type="text" class="form-control"
|
||||||
[(ngModel)]="user.username"
|
[(ngModel)]="user.username"
|
||||||
name="title"
|
name="title"
|
||||||
id="title"
|
id="title"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig.json",
|
"extends": "../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2016",
|
"es2016",
|
||||||
"dom"
|
"dom"
|
||||||
],
|
],
|
||||||
"outDir": "../out-tsc/app",
|
"outDir": "../out-tsc/app",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "es2015",
|
"module": "es2015",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
"sourceMap": false,
|
"sourceMap": true,
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
|
|
Loading…
Reference in New Issue