Added features

This commit is contained in:
Nicola Carminati
2019-06-22 17:08:47 +02:00
parent 00cc50d394
commit c91385c65f
17 changed files with 623 additions and 212 deletions
+3 -3
View File
@@ -60,10 +60,10 @@ module.exports = {
}
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: "file-loader",
test: /\.(png|jpg|gif|svg|woff|woff2|eot|ttf)$/,
loader: 'file-loader',
options: {
name: "[name].[ext]"
name: '[name].[ext]'
}
}
]
+156 -133
View File
@@ -13,20 +13,20 @@
}
},
"@babel/core": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.0.0.tgz",
"integrity": "sha512-nrvxS5u6QUN5gLl1GEakIcmOeoUHT1/gQtdMRq18WFURJ5osn4ppJLVSseMQo4zVWKJfBTF4muIYijXUnKlRLQ==",
"version": "7.4.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz",
"integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==",
"requires": {
"@babel/code-frame": "7.0.0",
"@babel/generator": "7.4.0",
"@babel/helpers": "7.4.3",
"@babel/parser": "7.4.3",
"@babel/template": "7.4.0",
"@babel/traverse": "7.4.3",
"@babel/types": "7.4.0",
"@babel/generator": "7.4.4",
"@babel/helpers": "7.4.4",
"@babel/parser": "7.4.5",
"@babel/template": "7.4.4",
"@babel/traverse": "7.4.5",
"@babel/types": "7.4.4",
"convert-source-map": "1.6.0",
"debug": "3.2.6",
"json5": "0.5.1",
"debug": "4.1.1",
"json5": "2.1.0",
"lodash": "4.17.11",
"resolve": "1.10.0",
"semver": "5.7.0",
@@ -34,17 +34,30 @@
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "2.1.1"
"ms": "2.1.2"
}
},
"json5": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz",
"integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==",
"requires": {
"minimist": "1.2.0"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"source-map": {
"version": "0.5.7",
@@ -54,11 +67,11 @@
}
},
"@babel/generator": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz",
"integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz",
"integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==",
"requires": {
"@babel/types": "7.4.0",
"@babel/types": "7.4.4",
"jsesc": "2.5.2",
"lodash": "4.17.11",
"source-map": "0.5.7",
@@ -78,17 +91,17 @@
}
},
"@babel/helper-create-class-features-plugin": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz",
"integrity": "sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.4.tgz",
"integrity": "sha512-UbBHIa2qeAGgyiNR9RszVF7bUHEdgS4JAUNT8SiqrAN6YJVxlOxeLr5pBzb5kan302dejJ9nla4RyKcR1XT6XA==",
"dev": true,
"requires": {
"@babel/helper-function-name": "7.1.0",
"@babel/helper-member-expression-to-functions": "7.0.0",
"@babel/helper-optimise-call-expression": "7.0.0",
"@babel/helper-plugin-utils": "7.0.0",
"@babel/helper-replace-supers": "7.4.0",
"@babel/helper-split-export-declaration": "7.4.0"
"@babel/helper-replace-supers": "7.4.4",
"@babel/helper-split-export-declaration": "7.4.4"
}
},
"@babel/helper-function-name": {
@@ -97,8 +110,8 @@
"integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==",
"requires": {
"@babel/helper-get-function-arity": "7.0.0",
"@babel/template": "7.4.0",
"@babel/types": "7.4.0"
"@babel/template": "7.4.4",
"@babel/types": "7.4.4"
}
},
"@babel/helper-get-function-arity": {
@@ -106,7 +119,7 @@
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz",
"integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==",
"requires": {
"@babel/types": "7.4.0"
"@babel/types": "7.4.4"
}
},
"@babel/helper-member-expression-to-functions": {
@@ -115,7 +128,7 @@
"integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==",
"dev": true,
"requires": {
"@babel/types": "7.4.0"
"@babel/types": "7.4.4"
}
},
"@babel/helper-optimise-call-expression": {
@@ -124,7 +137,7 @@
"integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==",
"dev": true,
"requires": {
"@babel/types": "7.4.0"
"@babel/types": "7.4.4"
}
},
"@babel/helper-plugin-utils": {
@@ -134,33 +147,33 @@
"dev": true
},
"@babel/helper-replace-supers": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz",
"integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz",
"integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==",
"dev": true,
"requires": {
"@babel/helper-member-expression-to-functions": "7.0.0",
"@babel/helper-optimise-call-expression": "7.0.0",
"@babel/traverse": "7.4.3",
"@babel/types": "7.4.0"
"@babel/traverse": "7.4.5",
"@babel/types": "7.4.4"
}
},
"@babel/helper-split-export-declaration": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz",
"integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz",
"integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
"requires": {
"@babel/types": "7.4.0"
"@babel/types": "7.4.4"
}
},
"@babel/helpers": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz",
"integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz",
"integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==",
"requires": {
"@babel/template": "7.4.0",
"@babel/traverse": "7.4.3",
"@babel/types": "7.4.0"
"@babel/template": "7.4.4",
"@babel/traverse": "7.4.5",
"@babel/types": "7.4.4"
}
},
"@babel/highlight": {
@@ -181,17 +194,17 @@
}
},
"@babel/parser": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz",
"integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ=="
"version": "7.4.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz",
"integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew=="
},
"@babel/plugin-proposal-decorators": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz",
"integrity": "sha512-d08TLmXeK/XbgCo7ZeZ+JaeZDtDai/2ctapTRsWWkkmy7G/cqz8DQN/HlWG7RR4YmfXxmExsbU3SuCjlM7AtUg==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.4.tgz",
"integrity": "sha512-z7MpQz3XC/iQJWXH9y+MaWcLPNSMY9RQSthrLzak8R8hCj0fuyNk+Dzi9kfNe/JxxlWQ2g7wkABbgWjW36MTcw==",
"dev": true,
"requires": {
"@babel/helper-create-class-features-plugin": "7.4.3",
"@babel/helper-create-class-features-plugin": "7.4.4",
"@babel/helper-plugin-utils": "7.0.0",
"@babel/plugin-syntax-decorators": "7.2.0"
}
@@ -206,9 +219,9 @@
}
},
"@babel/polyfill": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz",
"integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.4.tgz",
"integrity": "sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg==",
"dev": true,
"requires": {
"core-js": "2.6.5",
@@ -224,28 +237,28 @@
}
},
"@babel/template": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz",
"integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz",
"integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==",
"requires": {
"@babel/code-frame": "7.0.0",
"@babel/parser": "7.4.3",
"@babel/types": "7.4.0"
"@babel/parser": "7.4.5",
"@babel/types": "7.4.4"
}
},
"@babel/traverse": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz",
"integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==",
"version": "7.4.5",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz",
"integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==",
"requires": {
"@babel/code-frame": "7.0.0",
"@babel/generator": "7.4.0",
"@babel/generator": "7.4.4",
"@babel/helper-function-name": "7.1.0",
"@babel/helper-split-export-declaration": "7.4.0",
"@babel/parser": "7.4.3",
"@babel/types": "7.4.0",
"@babel/helper-split-export-declaration": "7.4.4",
"@babel/parser": "7.4.5",
"@babel/types": "7.4.4",
"debug": "4.1.1",
"globals": "11.11.0",
"globals": "11.12.0",
"lodash": "4.17.11"
},
"dependencies": {
@@ -254,25 +267,25 @@
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "2.1.1"
"ms": "2.1.2"
}
},
"globals": {
"version": "11.11.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz",
"integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw=="
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"@babel/types": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz",
"integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz",
"integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==",
"requires": {
"esutils": "2.0.2",
"lodash": "4.17.11",
@@ -286,6 +299,12 @@
}
}
},
"@fortawesome/fontawesome-free": {
"version": "5.9.0",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.9.0.tgz",
"integrity": "sha512-g795BBEzM/Hq2SYNPm/NQTIp3IWd4eXSH0ds87Na2jnrAUFX3wkyZAI4Gwj9DOaWMuz2/01i8oWI7P7T/XLkhg==",
"dev": true
},
"accepts": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
@@ -563,12 +582,35 @@
}
},
"axios": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"version": "0.18.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz",
"integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==",
"requires": {
"follow-redirects": "1.7.0",
"is-buffer": "1.1.6"
"follow-redirects": "1.5.10",
"is-buffer": "2.0.3"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"requires": {
"debug": "3.1.0"
}
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
}
}
},
"babel-code-frame": {
@@ -3507,30 +3549,6 @@
"schema-utils": "0.4.7"
},
"dependencies": {
"ajv": {
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"dev": true,
"requires": {
"fast-deep-equal": "2.0.1",
"fast-json-stable-stringify": "2.0.0",
"json-schema-traverse": "0.4.1",
"uri-js": "4.2.2"
}
},
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
"dev": true
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
@@ -3627,6 +3645,7 @@
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"dev": true,
"requires": {
"debug": "3.2.6"
},
@@ -3635,6 +3654,7 @@
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"dev": true,
"requires": {
"ms": "2.1.1"
}
@@ -3642,7 +3662,8 @@
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
}
}
},
@@ -4842,7 +4863,8 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
},
"is-callable": {
"version": "1.1.4",
@@ -5044,9 +5066,9 @@
"dev": true
},
"jquery": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
"integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg=="
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
"integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw=="
},
"js-base64": {
"version": "2.5.1",
@@ -5102,7 +5124,8 @@
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
},
"killable": {
"version": "1.0.1",
@@ -5657,8 +5680,7 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"multicast-dns": {
"version": "6.2.3",
@@ -9745,9 +9767,9 @@
"dev": true
},
"typescript": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A==",
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz",
"integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==",
"dev": true
},
"uglify-js": {
@@ -10102,9 +10124,9 @@
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
},
"vue-class-component": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-7.0.2.tgz",
"integrity": "sha512-8xw/wkZI2tgHcwvkSRC1ax7GeP1CG27wKhedvOAdjdASm05VU4RijGsCYti6s6CzBioBL5BQUmntQQTCsp1wnQ=="
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-7.1.0.tgz",
"integrity": "sha512-G9152NzUkz0i0xTfhk0Afc8vzdXxDR1pfN4dTwE72cskkgJtdXfrKBkMfGvDuxUh35U500g5Ve4xL8PEGdWeHg=="
},
"vue-hot-reload-api": {
"version": "2.3.3",
@@ -10184,17 +10206,18 @@
}
},
"vue-property-decorator": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-8.1.0.tgz",
"integrity": "sha512-TUWpbadApSW/sx9hlbrUq092ULm4E3RkL5X4fFhkiJ88/Y99lVubjh3bd3VbFQ8JRlKaTeqMOKaFHQRzWBCFPg==",
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-8.2.1.tgz",
"integrity": "sha512-zgtcvzGB2JpDqnIxVhTK+6m+dv3uyhYs+tL8elL+DWiXj9kDonKcPY7f1DHYX1NlnWPCj7ht0nL/i8+S1gg76Q==",
"requires": {
"vue-class-component": "7.0.2"
"vue": "2.6.10",
"vue-class-component": "7.1.0"
}
},
"vue-router": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.2.tgz",
"integrity": "sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg=="
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.6.tgz",
"integrity": "sha512-Ox0ciFLswtSGRTHYhGvx2L44sVbTPNS+uD2kRISuo8B39Y79rOo0Kw0hzupTmiVtftQYCZl87mwldhh2L9Aquw=="
},
"vue-style-loader": {
"version": "3.1.2",
@@ -10223,9 +10246,9 @@
"dev": true
},
"vuex": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.0.tgz",
"integrity": "sha512-mdHeHT/7u4BncpUZMlxNaIdcN/HIt1GsGG5LKByArvYG/v6DvHcOxvDCts+7SRdCoIRGllK8IMZvQtQXLppDYg=="
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.1.tgz",
"integrity": "sha512-ER5moSbLZuNSMBFnEBVGhQ1uCBNJslH9W/Dw2W7GZN23UQA69uapP5GTT9Vm8Trc0PzBSVt6LzF3hGjmv41xcg=="
},
"watchpack": {
"version": "1.6.0",
+12 -11
View File
@@ -10,24 +10,25 @@
"build": "node build/build.js"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/core": "^7.4.5",
"ajv": "^6.10.0",
"axios": "^0.18.0",
"axios": "^0.18.1",
"bootstrap": "^4.3.1",
"jquery": "^3.3.1",
"jquery": "^3.4.1",
"moment": "^2.24.0",
"popper.js": "^1.15.0",
"raphael": "^2.2.8",
"sprintf-js": "^1.1.2",
"vue": "^2.5.2",
"vue-class-component": "^7.0.2",
"vue-property-decorator": "^8.1.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.0"
"vue-class-component": "^7.1.0",
"vue-property-decorator": "^8.2.1",
"vue-router": "^3.0.6",
"vuex": "^3.1.1"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.4.0",
"@babel/polyfill": "^7.4.3",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/polyfill": "^7.4.4",
"@fortawesome/fontawesome-free": "^5.9.0",
"autoprefixer": "^7.1.2",
"babel-core": "^6.26.3",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
@@ -43,7 +44,7 @@
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"file-loader": "^1.1.11",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
@@ -57,7 +58,7 @@
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"ts-loader": "^3.3.1",
"typescript": "^3.4.2",
"typescript": "^3.5.2",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
+39 -10
View File
@@ -2,7 +2,6 @@
import { store,AppModel,appModelActions,machineModel } from "./store/app.store";
var mach1 = {
rowNum: 1,
lastUpdate: new Date("2019-04-03T18:33:14.24"),
@@ -34,6 +33,37 @@ var mach1 = {
} as machineModel
var mach2 = {
rowNum: 1,
lastUpdate: new Date("2019-04-03T18:33:14.24"),
idxMacchina: "SIM_DP_02",
codMacchina: "SIMDP2",
nome: "IOB SimDP2",
url: "Steamware.png",
idxODL: 2208,
codArticolo: "027309",
numPezzi: 500,
tCAssegnato: 1.08300000,
dataInizioODL: new Date("2019-04-03T18:33:14.24"),
semaforo: "sRo",
idxStato: 13,
descrizioneStato: "lavorazione",
durata: 557.0,
pezziProd: 20956,
pezziConf: 0,
tempoOn: 0.00000000,
tempoAuto: 0.00000000,
tempoRun: 0.00000000,
tCMedio: 0.00000000,
tCLav: 0.00000000,
tCEff: 0.00000000,
tCMedioRT: 0.00000000,
tCLavRT: 0.00000000,
tCEffRT: 0.00000000,
disegno: ""
} as machineModel
var mach3 = {
rowNum: 1,
lastUpdate: new Date("2019-04-03T18:33:14.24"),
idxMacchina: "SIM_DP_02",
@@ -63,21 +93,20 @@ var mach2 = {
disegno: ""
} as machineModel
setInterval(test,300);
setInterval(test,5000);
function test(){
mach1.durata = Math.random()*100;
}
var appInfo: AppModel = {name: "",version: "", ipAddress: "", copyright: ""};
appInfo.name = "MP MONITOR"
appInfo.version = "v 6.6.1904.1188"
appInfo.ipAddress = "10.74.82.20"
appInfo.copyright = "2007 - 2019 ©"
var appInfo:any = {};
appInfo.machines = [
mach1,
mach2
mach2,
mach3,
mach3,
mach3,
mach3
]
appModelActions.Setup(store,appInfo);
+10 -1
View File
@@ -8,7 +8,11 @@ import 'jquery';
import 'popper.js';
import 'bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import '@fortawesome/fontawesome-free/css/fontawesome.min.css';
import '@fortawesome/fontawesome-free/css/all.css';
import './assets/style/style.css';
import { Service } from "./service";
import { AppModel,appModelActions } from "./store/app.store";
@Component({
@@ -20,10 +24,15 @@ import { AppModel,appModelActions } from "./store/app.store";
})
export default class app extends Vue {
loadingConfiguration = true;
beforeMount() {
}
mounted() {
async mounted() {
this.loadingConfiguration = true;
await new Service().getSetupConfiguration()
this.loadingConfiguration = false;
}
};
+5
View File
@@ -9,6 +9,11 @@
</div>
<app-footer></app-footer>
<div id="loader" v-if="loadingConfiguration">
<span>
<i class="fas fa-spinner fa-spin"></i>
</span>
</div>
</div>
</template>
<script src="./App.ts" lang="ts"></script>
+37 -18
View File
@@ -85,33 +85,21 @@
}
.card-multi.sGi {
background-color: rgba(230, 210, 0, 0.6);
animation-name: YellowStatus;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes YellowStatus {
from {
.card-multi.sGi_chiaro {
background-color: rgba(230, 210, 0, 0.6);
}
to {
}
.card-multi.sGi_scuro {
background-color: rgba(255, 255, 0, 0.8);
}
}
.card-multi.sRo {
background-color: rgba(200, 0, 5, 0.6);
animation-name: RedStatus;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes RedStatus {
from {
.card-multi.sRo_chiaro {
background-color: rgba(200, 0, 5, 0.6);
}
to {
}
.card-multi.sRo_scuro {
background-color: rgba(255, 60, 80, 0.8);
}
}
.card-multi .name {
width: 100%;
@@ -226,6 +214,32 @@ body ::-webkit-scrollbar-track:active {
body ::-webkit-scrollbar-corner {
background: transparent;
}
body #loader {
position: absolute;
background-color: rgba(0, 0, 0, 0.8);
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: flex;
flex-flow: wrap;
align-items: center;
justify-content: center;
}
body #loader span {
background-color: #cccccc;
width: 20vw;
height: 30vh;
display: flex;
flex-flow: wrap;
align-items: center;
justify-content: center;
border-radius: 5px;
}
body #loader span i {
font-size: 10vw;
}
.container {
max-width: 100%;
padding: 0px 15px;
@@ -245,6 +259,11 @@ body ::-webkit-scrollbar-corner {
display: flex;
flex-flow: row wrap;
}
@media (max-width: 991.98px) {
.container .main-content {
zoom: 1.0 !important;
}
}
.container .main-content .content {
background-color: white;
}
+21 -1
View File
@@ -5,12 +5,32 @@ import { store,AppModel,MachineGetters } from "../../store/app.store";
@Component({ name: "multi-view", components: { cardMulti } })
export default class MultiView extends Vue {
tck = false;
beforeMount() {
}
mounted() {
setInterval(this.tick,this.animTime);
}
private tick(){
this.tck = !this.tck;
}
private get tcc(){
return this.tck;
}
private get zoom(){
var actZoom = (store.state as AppModel).zoom;
if(actZoom < 100)
actZoom = 100;
return actZoom / 100;
}
private get animTime(){
return (store.state as AppModel).animTickTime;
}
private get machines(){
+2 -1
View File
@@ -1,5 +1,5 @@
<template>
<div class="main-content row">
<div class="main-content row" :style="{'zoom':zoom}" >
<cardMulti v-for="(n, key) in machines" :key="'Mach' + key"
:nome="n.nome"
:semaforo="n.semaforo"
@@ -11,6 +11,7 @@
:pezziProd="n.pezziProd"
:lastUpdate="n.lastUpdate"
:pezziConf="n.pezziConf"
:tck="tck"
></cardMulti>
</div>
</template>
@@ -58,13 +58,17 @@ import moment from "moment";
type: Date,
default: new Date()
},
tck:
{
type: Boolean,
default: false
},
}
})
export default class cardMulti extends Vue {
colorClass: string = "sGre";
dataOK: boolean = false;
test: machineModel;
colorClass: string = "sGre"
beforeMount() {
@@ -79,12 +83,30 @@ export default class cardMulti extends Vue {
this.elaborateData();
}
//Animation sync
@Watch("$props.tck")
tckChanged() {
if(this.$props.semaforo == "sGi"){
if(this.$props.tck)
this.colorClass = "sGi_chiaro";
else
this.colorClass = "sGi_scuro";
}
else if(this.$props.semaforo == "sRo"){
if(this.$props.tck)
this.colorClass = "sRo_chiaro";
else
this.colorClass = "sRo_scuro";
}
else
this.colorClass = this.$props.semaforo;
}
elaborateData(){
if(this.$props.nome)
this.dataOK = true;
else
this.dataOK = false;
this.colorClass = this.$props.semaforo;
}
+5 -16
View File
@@ -32,35 +32,24 @@
&.sGi {
background-color: rgba(230, 210, 0, 0.6);
animation-name: YellowStatus;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes YellowStatus {
from {
&.sGi_chiaro {
background-color: rgba(230, 210, 0, 0.6);
}
to {
&.sGi_scuro {
background-color: rgba(255, 255, 0, 0.8);
}
}
&.sRo {
background-color: rgba(200, 0, 5, 0.6);
animation-name: RedStatus;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes RedStatus {
from {
&.sRo_chiaro {
background-color: rgba(200, 0, 5, 0.6);
}
to {
&.sRo_scuro {
background-color: rgba(255, 60, 80, 0.8);
}
}
.name {
width: 100%;
+31
View File
@@ -51,6 +51,34 @@ body{
::-webkit-scrollbar-corner {
background: transparent;
}
#loader{
position: absolute;
background-color: rgba(0,0,0,0.8);
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: flex;
flex-flow: wrap;
align-items: center;
justify-content: center;
span{
background-color: #cccccc;
width: 20vw;
height: 30vh;
display: flex;
flex-flow: wrap;
align-items: center;
justify-content: center;
border-radius: 5px;
i{
font-size: 10vw;
}
}
}
}
.container{
@@ -70,6 +98,9 @@ body{
padding-top: 90px;
display: flex;
flex-flow: row wrap;
@media (max-width: 991.98px) {
zoom: 1.0 !important;
}
.content{
background-color: white;
+206
View File
@@ -0,0 +1,206 @@
import Axios, { AxiosInstance, AxiosPromise, AxiosResponse, AxiosBasicCredentials, AxiosRequestConfig } from "axios";
import Factory from "./factoryService";
interface InterceptorRequestDelegate { (config: AxiosRequestConfig): AxiosRequestConfig; }
interface InterceptorResponseDelegate { (config: AxiosResponse): AxiosResponse; }
interface RequestInterceptorChangedDelegate { (item: InterceptorRequestDelegate): void; }
interface ResponseInterceptorChangedDelegate { (item: InterceptorResponseDelegate): void; }
export class interceptorsConfig {
requestInterceptors: InterceptorRequestDelegate[] = [];
responseInterceptors: InterceptorResponseDelegate[] = [];
}
export class sharedInterceptors extends interceptorsConfig {
addRequestInterceptor(item: InterceptorRequestDelegate) {
this.requestInterceptors.push(item);
if (this.onRequestInterceptorChanged) this.onRequestInterceptorChanged(item);
}
addresponseInterceptor(item: InterceptorResponseDelegate) {
this.responseInterceptors.push(item);
if (this.onResponseInterceptorChanged) this.onResponseInterceptorChanged(item);
}
onRequestInterceptorChanged: RequestInterceptorChangedDelegate;
onResponseInterceptorChanged: ResponseInterceptorChangedDelegate;
}
Factory.Register(sharedInterceptors);
export function to(promise) {
return promise.then(data => data)
.catch(err => err.response);
}
export class baseRestService {
public errorsToShow: number[] = [404, 500];
protected allwaysSendAuthenticationToken: boolean = false;
protected saveToSessionStorage: boolean = false;
private _interceptors: sharedInterceptors;
set interceptors(value: interceptorsConfig) {
for (let i in value.requestInterceptors)
this.http.interceptors.request.use(value.requestInterceptors[i]);
for (let i in value.responseInterceptors)
this.http.interceptors.response.use(value.responseInterceptors[i]);
}
baseUrl: string = "";
OnError: OnErrorDelegate;
OnHeadersPreparing: OnHeadersPreparingDelegate;
protected http: AxiosInstance;
constructor() {
this.http = Axios.create();
this._interceptors = Factory.Get(sharedInterceptors);
// Initialize preregistered interceptors
for (let i in this._interceptors.requestInterceptors)
this.http.interceptors.request.use(this._interceptors.requestInterceptors[i]);
for (let i in this._interceptors.responseInterceptors)
this.http.interceptors.response.use(this._interceptors.responseInterceptors[i]);
this._interceptors.onRequestInterceptorChanged = (i) => this.http.interceptors.request.use(i);
this._interceptors.onResponseInterceptorChanged = (i) => this.http.interceptors.response.use(i);
// toast exception interceptors
this.http.interceptors.response.use(null, r => {
if (!r.status)
r = r.response;
return Promise.reject(r);
})
}
protected async upload(uri: string, filedata: Blob, filename: string, params: object = {}): Promise<AxiosResponse> {
let data = new FormData();
data.append('file', filedata, filename);
let headers = this.prepareHeaders(true, false);
headers["content-type"] = "multipart/form-data";
let response = await this.http.post(uri, data, {
headers: headers,
params :params
} as AxiosRequestConfig);
return response;
}
protected async get(uri: string, sendAuthenticationToken: boolean = false, params: object = {}): Promise<AxiosResponse> {
let response = await this.http.get(this.baseUrl + uri,
{
headers: this.prepareHeaders(this.allwaysSendAuthenticationToken || sendAuthenticationToken, false),
params: params
} as AxiosRequestConfig);
return response;
};
protected async Get<TResult>(uri: string, sendAuthenticationToken: boolean = false, params: object = {}): Promise<TResult> {
let result = await this.get(uri, sendAuthenticationToken, params);
if (result.status == 200)
return result.data as TResult;
return null;
}
protected async post(uri: string, data: any, sendAuthenticationToken: boolean = false): Promise<AxiosResponse> {
let response = await this.http.post(this.baseUrl + uri, data,
{ headers: this.prepareHeaders(this.allwaysSendAuthenticationToken || sendAuthenticationToken, true) });
return response;
};
protected async Post<TResult>(uri: string, data: any, sendAuthenticationToken: boolean = false): Promise<TResult> {
let result = await this.post(uri, data, sendAuthenticationToken);
if (result.status == 200)
return result.data as TResult;
return null;
}
protected async put(uri: string, data: any, sendAuthenticationToken: boolean = false): Promise<AxiosResponse> {
let response = await this.http.put(this.baseUrl + uri, JSON.stringify(data),
{ headers: this.prepareHeaders(this.allwaysSendAuthenticationToken || sendAuthenticationToken, true) });
return response;
}
protected async Put<TResult>(uri: string, data: any, sendAuthenticationToken: boolean = false): Promise<TResult> {
let result = await this.put(uri, data, sendAuthenticationToken);
if (result.status == 200)
return result.data as TResult;
return null;
}
protected async delete(uri: string, sendAuthenticationToken: boolean = false): Promise<AxiosResponse> {
let response = await this.http.delete(this.baseUrl + uri,
{ headers: this.prepareHeaders(this.allwaysSendAuthenticationToken || sendAuthenticationToken, false) });
return response;
}
protected async Delete<TResult>(uri: string, sendAuthenticationToken: boolean = false): Promise<TResult> {
let result = await this.delete(uri, sendAuthenticationToken);
if (result.status == 200)
return result.data as TResult;
return null;
}
private prepareHeaders(auth: boolean = false, json: boolean = false): any {
let headers = {}
if (auth) {
let authData = JSON.parse((this.saveToSessionStorage ? window.sessionStorage.getItem("authorizationData") : window.localStorage.getItem("authorizationData")) || null) as AuthToken;
if (authData) {
headers["Authorization"] = 'Bearer ' + authData.access_token;
// headers.append('Authorization', 'Bearer ' + authData.access_token);
}
}
// if (json) headers.append('Content-Type', 'application/json');
if (json) headers['Content-Type'] = 'application/json';
if (this.OnHeadersPreparing) this.OnHeadersPreparing(headers);
return headers;
}
protected getAuthenticationToken(): AuthToken {
let wstore = window.sessionStorage;
let sstore = window.localStorage;
return JSON.parse(wstore.getItem("authorizationData") || sstore.getItem("authorizationData") || null) as AuthToken
}
protected setAuthenticationToken(data: AuthToken) {
let storage: any = this.saveToSessionStorage ? window.sessionStorage : window.localStorage;
storage.setItem("authorizationData", JSON.stringify(data));
}
protected deleteAuthenticationToken() {
window.sessionStorage.setItem("authorizationData", null);
window.localStorage.setItem("authorizationData", null);
}
}
export interface OnErrorDelegate { (data: DataResponse): void; }
interface OnHeadersPreparingDelegate { (headers: any): void; }
export class AuthToken {
access_token: string;
refresh_token: string;
userName: string;
}
export class DataResponse {
status: number;
statusText: string;
data: any;
}
+39
View File
@@ -0,0 +1,39 @@
export default class FactoryService {
private static _objects: { [key: string]: any } = {};
public static Register<T>(ctor: { new (): T }) {
let name = FactoryService.getTypeName<T>(ctor);
FactoryService._objects[name] = new ctor();
}
public static RegisterExplicit(name: string, ctor: { new (): any }) {
FactoryService._objects[name] = new ctor();
}
public static Get<T>(ctor: { new (): T }): T {
let result;
let name = FactoryService.getTypeName<T>(ctor);
result = FactoryService._objects[name] as T;
if (result == null) {
result = FactoryService._objects[name] = new ctor();
}
return result as T;
}
private static getTypeName<T>(ctor: { new (): T }): string {
return ctor.name;
}
private static createInstance<T>(ctor: { new (): T }): T {
return new ctor();
}
}
export function Service<T>(ctor: { new (): T }): T {
return FactoryService.Get(ctor) as T;
}
export function ServiceDeclare<T extends { new (): {} }>(ctor: T) {
FactoryService.RegisterExplicit(ctor.name, ctor);
}
+13
View File
@@ -0,0 +1,13 @@
import { baseRestService } from "./baseRestService";
import { store,AppModel,appModelActions} from "../store/app.store";
export class Service extends baseRestService {
async getSetupConfiguration() {
let result = await this.Get("https://virtserver.swaggerhub.com/Nicola.Carminati/MP_MON/1.0.0/MSE/Setup") as AppModel;
appModelActions.Setup(store,result);
}
}
+4
View File
@@ -41,6 +41,8 @@ export interface AppModel {
ipAddress: string;
copyright: string;
machines?: Array<machineModel>;
zoom: number;
animTickTime: number;
}
// Avaiable Actions for this Store as Interface
@@ -61,6 +63,8 @@ const _store = {
ipAddress: "",
copyright: "",
machines: [],
zoom: 100,
animTickTime: 1000,
_machines: new Map<string, machineModel>(),
} as AppModel,
+1 -1
View File
@@ -51,7 +51,7 @@ module.exports = {
}
},
{
test: /\.(png|jpg|gif|svg)$/,
test: /\.(png|jpg|gif|svg|woff|woff2|eot|ttf)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]'