angular-develop-client/dist/client/main.js

1374 lines
112 KiB
JavaScript
Raw Permalink Normal View History

2019-01-21 11:10:32 +01:00
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{
/***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$":
/*!**************************************************!*\
!*** ./node_modules/moment/locale sync ^\.\/.*$ ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var map = {
"./af": "./node_modules/moment/locale/af.js",
"./af.js": "./node_modules/moment/locale/af.js",
"./ar": "./node_modules/moment/locale/ar.js",
"./ar-dz": "./node_modules/moment/locale/ar-dz.js",
"./ar-dz.js": "./node_modules/moment/locale/ar-dz.js",
"./ar-kw": "./node_modules/moment/locale/ar-kw.js",
"./ar-kw.js": "./node_modules/moment/locale/ar-kw.js",
"./ar-ly": "./node_modules/moment/locale/ar-ly.js",
"./ar-ly.js": "./node_modules/moment/locale/ar-ly.js",
"./ar-ma": "./node_modules/moment/locale/ar-ma.js",
"./ar-ma.js": "./node_modules/moment/locale/ar-ma.js",
"./ar-sa": "./node_modules/moment/locale/ar-sa.js",
"./ar-sa.js": "./node_modules/moment/locale/ar-sa.js",
"./ar-tn": "./node_modules/moment/locale/ar-tn.js",
"./ar-tn.js": "./node_modules/moment/locale/ar-tn.js",
"./ar.js": "./node_modules/moment/locale/ar.js",
"./az": "./node_modules/moment/locale/az.js",
"./az.js": "./node_modules/moment/locale/az.js",
"./be": "./node_modules/moment/locale/be.js",
"./be.js": "./node_modules/moment/locale/be.js",
"./bg": "./node_modules/moment/locale/bg.js",
"./bg.js": "./node_modules/moment/locale/bg.js",
"./bm": "./node_modules/moment/locale/bm.js",
"./bm.js": "./node_modules/moment/locale/bm.js",
"./bn": "./node_modules/moment/locale/bn.js",
"./bn.js": "./node_modules/moment/locale/bn.js",
"./bo": "./node_modules/moment/locale/bo.js",
"./bo.js": "./node_modules/moment/locale/bo.js",
"./br": "./node_modules/moment/locale/br.js",
"./br.js": "./node_modules/moment/locale/br.js",
"./bs": "./node_modules/moment/locale/bs.js",
"./bs.js": "./node_modules/moment/locale/bs.js",
"./ca": "./node_modules/moment/locale/ca.js",
"./ca.js": "./node_modules/moment/locale/ca.js",
"./cs": "./node_modules/moment/locale/cs.js",
"./cs.js": "./node_modules/moment/locale/cs.js",
"./cv": "./node_modules/moment/locale/cv.js",
"./cv.js": "./node_modules/moment/locale/cv.js",
"./cy": "./node_modules/moment/locale/cy.js",
"./cy.js": "./node_modules/moment/locale/cy.js",
"./da": "./node_modules/moment/locale/da.js",
"./da.js": "./node_modules/moment/locale/da.js",
"./de": "./node_modules/moment/locale/de.js",
"./de-at": "./node_modules/moment/locale/de-at.js",
"./de-at.js": "./node_modules/moment/locale/de-at.js",
"./de-ch": "./node_modules/moment/locale/de-ch.js",
"./de-ch.js": "./node_modules/moment/locale/de-ch.js",
"./de.js": "./node_modules/moment/locale/de.js",
"./dv": "./node_modules/moment/locale/dv.js",
"./dv.js": "./node_modules/moment/locale/dv.js",
"./el": "./node_modules/moment/locale/el.js",
"./el.js": "./node_modules/moment/locale/el.js",
"./en-au": "./node_modules/moment/locale/en-au.js",
"./en-au.js": "./node_modules/moment/locale/en-au.js",
"./en-ca": "./node_modules/moment/locale/en-ca.js",
"./en-ca.js": "./node_modules/moment/locale/en-ca.js",
"./en-gb": "./node_modules/moment/locale/en-gb.js",
"./en-gb.js": "./node_modules/moment/locale/en-gb.js",
"./en-ie": "./node_modules/moment/locale/en-ie.js",
"./en-ie.js": "./node_modules/moment/locale/en-ie.js",
"./en-il": "./node_modules/moment/locale/en-il.js",
"./en-il.js": "./node_modules/moment/locale/en-il.js",
"./en-nz": "./node_modules/moment/locale/en-nz.js",
"./en-nz.js": "./node_modules/moment/locale/en-nz.js",
"./eo": "./node_modules/moment/locale/eo.js",
"./eo.js": "./node_modules/moment/locale/eo.js",
"./es": "./node_modules/moment/locale/es.js",
"./es-do": "./node_modules/moment/locale/es-do.js",
"./es-do.js": "./node_modules/moment/locale/es-do.js",
"./es-us": "./node_modules/moment/locale/es-us.js",
"./es-us.js": "./node_modules/moment/locale/es-us.js",
"./es.js": "./node_modules/moment/locale/es.js",
"./et": "./node_modules/moment/locale/et.js",
"./et.js": "./node_modules/moment/locale/et.js",
"./eu": "./node_modules/moment/locale/eu.js",
"./eu.js": "./node_modules/moment/locale/eu.js",
"./fa": "./node_modules/moment/locale/fa.js",
"./fa.js": "./node_modules/moment/locale/fa.js",
"./fi": "./node_modules/moment/locale/fi.js",
"./fi.js": "./node_modules/moment/locale/fi.js",
"./fo": "./node_modules/moment/locale/fo.js",
"./fo.js": "./node_modules/moment/locale/fo.js",
"./fr": "./node_modules/moment/locale/fr.js",
"./fr-ca": "./node_modules/moment/locale/fr-ca.js",
"./fr-ca.js": "./node_modules/moment/locale/fr-ca.js",
"./fr-ch": "./node_modules/moment/locale/fr-ch.js",
"./fr-ch.js": "./node_modules/moment/locale/fr-ch.js",
"./fr.js": "./node_modules/moment/locale/fr.js",
"./fy": "./node_modules/moment/locale/fy.js",
"./fy.js": "./node_modules/moment/locale/fy.js",
"./gd": "./node_modules/moment/locale/gd.js",
"./gd.js": "./node_modules/moment/locale/gd.js",
"./gl": "./node_modules/moment/locale/gl.js",
"./gl.js": "./node_modules/moment/locale/gl.js",
"./gom-latn": "./node_modules/moment/locale/gom-latn.js",
"./gom-latn.js": "./node_modules/moment/locale/gom-latn.js",
"./gu": "./node_modules/moment/locale/gu.js",
"./gu.js": "./node_modules/moment/locale/gu.js",
"./he": "./node_modules/moment/locale/he.js",
"./he.js": "./node_modules/moment/locale/he.js",
"./hi": "./node_modules/moment/locale/hi.js",
"./hi.js": "./node_modules/moment/locale/hi.js",
"./hr": "./node_modules/moment/locale/hr.js",
"./hr.js": "./node_modules/moment/locale/hr.js",
"./hu": "./node_modules/moment/locale/hu.js",
"./hu.js": "./node_modules/moment/locale/hu.js",
"./hy-am": "./node_modules/moment/locale/hy-am.js",
"./hy-am.js": "./node_modules/moment/locale/hy-am.js",
"./id": "./node_modules/moment/locale/id.js",
"./id.js": "./node_modules/moment/locale/id.js",
"./is": "./node_modules/moment/locale/is.js",
"./is.js": "./node_modules/moment/locale/is.js",
"./it": "./node_modules/moment/locale/it.js",
"./it.js": "./node_modules/moment/locale/it.js",
"./ja": "./node_modules/moment/locale/ja.js",
"./ja.js": "./node_modules/moment/locale/ja.js",
"./jv": "./node_modules/moment/locale/jv.js",
"./jv.js": "./node_modules/moment/locale/jv.js",
"./ka": "./node_modules/moment/locale/ka.js",
"./ka.js": "./node_modules/moment/locale/ka.js",
"./kk": "./node_modules/moment/locale/kk.js",
"./kk.js": "./node_modules/moment/locale/kk.js",
"./km": "./node_modules/moment/locale/km.js",
"./km.js": "./node_modules/moment/locale/km.js",
"./kn": "./node_modules/moment/locale/kn.js",
"./kn.js": "./node_modules/moment/locale/kn.js",
"./ko": "./node_modules/moment/locale/ko.js",
"./ko.js": "./node_modules/moment/locale/ko.js",
"./ku": "./node_modules/moment/locale/ku.js",
"./ku.js": "./node_modules/moment/locale/ku.js",
"./ky": "./node_modules/moment/locale/ky.js",
"./ky.js": "./node_modules/moment/locale/ky.js",
"./lb": "./node_modules/moment/locale/lb.js",
"./lb.js": "./node_modules/moment/locale/lb.js",
"./lo": "./node_modules/moment/locale/lo.js",
"./lo.js": "./node_modules/moment/locale/lo.js",
"./lt": "./node_modules/moment/locale/lt.js",
"./lt.js": "./node_modules/moment/locale/lt.js",
"./lv": "./node_modules/moment/locale/lv.js",
"./lv.js": "./node_modules/moment/locale/lv.js",
"./me": "./node_modules/moment/locale/me.js",
"./me.js": "./node_modules/moment/locale/me.js",
"./mi": "./node_modules/moment/locale/mi.js",
"./mi.js": "./node_modules/moment/locale/mi.js",
"./mk": "./node_modules/moment/locale/mk.js",
"./mk.js": "./node_modules/moment/locale/mk.js",
"./ml": "./node_modules/moment/locale/ml.js",
"./ml.js": "./node_modules/moment/locale/ml.js",
"./mn": "./node_modules/moment/locale/mn.js",
"./mn.js": "./node_modules/moment/locale/mn.js",
"./mr": "./node_modules/moment/locale/mr.js",
"./mr.js": "./node_modules/moment/locale/mr.js",
"./ms": "./node_modules/moment/locale/ms.js",
"./ms-my": "./node_modules/moment/locale/ms-my.js",
"./ms-my.js": "./node_modules/moment/locale/ms-my.js",
"./ms.js": "./node_modules/moment/locale/ms.js",
"./mt": "./node_modules/moment/locale/mt.js",
"./mt.js": "./node_modules/moment/locale/mt.js",
"./my": "./node_modules/moment/locale/my.js",
"./my.js": "./node_modules/moment/locale/my.js",
"./nb": "./node_modules/moment/locale/nb.js",
"./nb.js": "./node_modules/moment/locale/nb.js",
"./ne": "./node_modules/moment/locale/ne.js",
"./ne.js": "./node_modules/moment/locale/ne.js",
"./nl": "./node_modules/moment/locale/nl.js",
"./nl-be": "./node_modules/moment/locale/nl-be.js",
"./nl-be.js": "./node_modules/moment/locale/nl-be.js",
"./nl.js": "./node_modules/moment/locale/nl.js",
"./nn": "./node_modules/moment/locale/nn.js",
"./nn.js": "./node_modules/moment/locale/nn.js",
"./pa-in": "./node_modules/moment/locale/pa-in.js",
"./pa-in.js": "./node_modules/moment/locale/pa-in.js",
"./pl": "./node_modules/moment/locale/pl.js",
"./pl.js": "./node_modules/moment/locale/pl.js",
"./pt": "./node_modules/moment/locale/pt.js",
"./pt-br": "./node_modules/moment/locale/pt-br.js",
"./pt-br.js": "./node_modules/moment/locale/pt-br.js",
"./pt.js": "./node_modules/moment/locale/pt.js",
"./ro": "./node_modules/moment/locale/ro.js",
"./ro.js": "./node_modules/moment/locale/ro.js",
"./ru": "./node_modules/moment/locale/ru.js",
"./ru.js": "./node_modules/moment/locale/ru.js",
"./sd": "./node_modules/moment/locale/sd.js",
"./sd.js": "./node_modules/moment/locale/sd.js",
"./se": "./node_modules/moment/locale/se.js",
"./se.js": "./node_modules/moment/locale/se.js",
"./si": "./node_modules/moment/locale/si.js",
"./si.js": "./node_modules/moment/locale/si.js",
"./sk": "./node_modules/moment/locale/sk.js",
"./sk.js": "./node_modules/moment/locale/sk.js",
"./sl": "./node_modules/moment/locale/sl.js",
"./sl.js": "./node_modules/moment/locale/sl.js",
"./sq": "./node_modules/moment/locale/sq.js",
"./sq.js": "./node_modules/moment/locale/sq.js",
"./sr": "./node_modules/moment/locale/sr.js",
"./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js",
"./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js",
"./sr.js": "./node_modules/moment/locale/sr.js",
"./ss": "./node_modules/moment/locale/ss.js",
"./ss.js": "./node_modules/moment/locale/ss.js",
"./sv": "./node_modules/moment/locale/sv.js",
"./sv.js": "./node_modules/moment/locale/sv.js",
"./sw": "./node_modules/moment/locale/sw.js",
"./sw.js": "./node_modules/moment/locale/sw.js",
"./ta": "./node_modules/moment/locale/ta.js",
"./ta.js": "./node_modules/moment/locale/ta.js",
"./te": "./node_modules/moment/locale/te.js",
"./te.js": "./node_modules/moment/locale/te.js",
"./tet": "./node_modules/moment/locale/tet.js",
"./tet.js": "./node_modules/moment/locale/tet.js",
"./tg": "./node_modules/moment/locale/tg.js",
"./tg.js": "./node_modules/moment/locale/tg.js",
"./th": "./node_modules/moment/locale/th.js",
"./th.js": "./node_modules/moment/locale/th.js",
"./tl-ph": "./node_modules/moment/locale/tl-ph.js",
"./tl-ph.js": "./node_modules/moment/locale/tl-ph.js",
"./tlh": "./node_modules/moment/locale/tlh.js",
"./tlh.js": "./node_modules/moment/locale/tlh.js",
"./tr": "./node_modules/moment/locale/tr.js",
"./tr.js": "./node_modules/moment/locale/tr.js",
"./tzl": "./node_modules/moment/locale/tzl.js",
"./tzl.js": "./node_modules/moment/locale/tzl.js",
"./tzm": "./node_modules/moment/locale/tzm.js",
"./tzm-latn": "./node_modules/moment/locale/tzm-latn.js",
"./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js",
"./tzm.js": "./node_modules/moment/locale/tzm.js",
"./ug-cn": "./node_modules/moment/locale/ug-cn.js",
"./ug-cn.js": "./node_modules/moment/locale/ug-cn.js",
"./uk": "./node_modules/moment/locale/uk.js",
"./uk.js": "./node_modules/moment/locale/uk.js",
"./ur": "./node_modules/moment/locale/ur.js",
"./ur.js": "./node_modules/moment/locale/ur.js",
"./uz": "./node_modules/moment/locale/uz.js",
"./uz-latn": "./node_modules/moment/locale/uz-latn.js",
"./uz-latn.js": "./node_modules/moment/locale/uz-latn.js",
"./uz.js": "./node_modules/moment/locale/uz.js",
"./vi": "./node_modules/moment/locale/vi.js",
"./vi.js": "./node_modules/moment/locale/vi.js",
"./x-pseudo": "./node_modules/moment/locale/x-pseudo.js",
"./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js",
"./yo": "./node_modules/moment/locale/yo.js",
"./yo.js": "./node_modules/moment/locale/yo.js",
"./zh-cn": "./node_modules/moment/locale/zh-cn.js",
"./zh-cn.js": "./node_modules/moment/locale/zh-cn.js",
"./zh-hk": "./node_modules/moment/locale/zh-hk.js",
"./zh-hk.js": "./node_modules/moment/locale/zh-hk.js",
"./zh-tw": "./node_modules/moment/locale/zh-tw.js",
"./zh-tw.js": "./node_modules/moment/locale/zh-tw.js"
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
var id = map[req];
if(!(id + 1)) { // check for number or string
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return id;
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./node_modules/moment/locale sync recursive ^\\.\\/.*$";
/***/ }),
/***/ "./src/$$_lazy_route_resource lazy recursive":
/*!**********************************************************!*\
!*** ./src/$$_lazy_route_resource lazy namespace object ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function webpackEmptyAsyncContext(req) {
// Here Promise.resolve().then() is used instead of new Promise() to prevent
// uncaught exception popping up in devtools
return Promise.resolve().then(function() {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
});
}
webpackEmptyAsyncContext.keys = function() { return []; };
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
module.exports = webpackEmptyAsyncContext;
webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive";
/***/ }),
/***/ "./src/app/admin/admin.component.html":
/*!********************************************!*\
!*** ./src/app/admin/admin.component.html ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <h3>Dodawanie nowych urządzeń</h3>\n <form class=\"admin-form\" (ngSubmit)=\"onAddDevice()\">\n <div class=\"input-wrapper\">\n <mat-form-field class=\"admin-full-width\">\n <input\n matInput\n #nameDevice\n maxlength=\"256\"\n placeholder=\"Nazwa urządzenia\"\n [formControl]=\"name\"\n />\n <mat-hint align=\"start\"\n ><strong\n >Podaj nazwę czujnika (w przypadku ESPEasy name device)</strong\n >\n </mat-hint>\n <mat-hint align=\"end\">{{ nameDevice.value.length }} / 100</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"input-wrapper\">\n <mat-form-field class=\"admin-full-width\">\n <input\n matInput\n #ipDevice\n maxlength=\"256\"\n placeholder=\"Adres IP urządzenia\"\n [formControl]=\"ip\"\n />\n <mat-hint align=\"start\"\n ><strong>Podaj przypisany do urządzenia stały adres IP</strong>\n </mat-hint>\n <mat-hint align=\"end\">{{ ipDevice.value.length }} / 15</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"example-button-row\">\n <button mat-flat-button color=\"primary\">Dodaj urządzenie</button>\n </div>\n </form>\n </div>\n <div class=\"col-md-6\">\n <h3>Usuwanie urządzeń</h3>\n <form class=\"admin-form\" (ngSubmit)=\"onDeviceDelete()\">\n <div class=\"input-wrapper\">\n <mat-form-field class=\"admin-full-width\">\n <input\n matInput\n #ipDeviceDel\n maxlength=\"256\"\n placeholder=\"Adres IP urządzenia\"\n [formControl]=\"ipDelete\"\n />\n <mat-hint align=\"start\"\n ><strong>Podaj przypisany do urządzenia stały adres IP</strong>\n </mat-hint>\n <mat-hint align=\"end\">{{ ipDeviceDel.value.length }} / 15</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"example-button-row\">\n <button mat-flat-button color=\"accent\">Usuń urządzenie</button>\n </div>\n </form>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <app-form\n *ngFor=\"let device of devices\"\n [device]=\"device\"\n (onUpdateDeviceEmit)=\"onUpdateDevice($event)\"\n ></app-form>\n </div>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/admin/admin.component.less":
/*!********************************************!*\
!*** ./src/app/admin/admin.component.less ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".container table {\n width: 100%;\n}\n.container .row {\n margin-top: 40px;\n}\n.container .row .admin-form {\n min-width: 150px;\n max-width: 500px;\n width: 100%;\n margin-top: 50px;\n}\n.container .row .admin-form .input-wrapper {\n margin-bottom: 30px;\n}\n.container .row .admin-form .admin-full-width {\n width: 100%;\n}\n.container .example-button-row button,\n.container .example-button-row a {\n margin-right: 8px;\n}\ntable {\n width: 100%;\n}\n.machine-row {\n margin-top: 60px;\n}\n.machine-row .machine-text {\n color: #000000;\n font-size: 36px;\n font-weight: 300;\n letter-spacing: 2px;\n}\n.machine-row .machine-status {\n color: #000000;\n font-size: 23px;\n font-weight: 300;\n margin-left: 30px;\n margin-top: 50px;\n letter-spacing: 0.5px;\n}\n.machine-row .machine-status img {\n width: 15px;\n margin-top: -3px;\n margin-left: 10px;\n}\n.machine-row .machine-status span {\n font-size: 24px;\n margin-left: 15px;\n top: -10px;\n}\n.machine-row .machine-status2 {\n color: #000000;\n font-size: 23px;\n font-weight: 300;\n margin-left: 30px;\n margin-top: 10px;\n letter-spacing: 0.5px;\n}\n.machine-row .machine-status2 img {\n width: 15px;\n margin-top: -3px;\n margin-left: 10px;\n}\n.machine-row .machine-status2 span {\n font-size: 24px;\n margin-left: 15px;\n top: -10px;\n}\n.machine-row .machine-image {\n width: 230px;\n margin-top: 0px;\n margin-left: 50px;\n}\n.stat-wrapper {\n margin-left: 30px;\n color: #000000;\n font-size: 23px;\n font-weight: 300;\n}\n.stat-wrapper .stat-text {\n color: #000000;\n font-size: 36px;\n font-weight: 300;\n letter-spacing: 2px;\n margin-bottom: 30px;\n}\n.button-use {\n margin-left: 30px;\n margin-top: 20px;\n}\n.boldMe {\n font-weight: 400;\n}\n.lists {\n text-align: center;\n font-size: 20px;\n}\n.machine-list {\n margin-right: 0px;\n margin-top: 60px;\n text-align: center;\n}\n.row-list {\n width: 700px;\n display: inline-block;\n}\n.room-button {\n border-radius: 12px;\n background-color: white;\n border: solid 1px red;\n color: red;\n padding: 10px;\n width: 120px;\n margin-bottom: 20px;\n}\n.room-button:hover {\n box-shadow: inset 0 0 0 2px #24a1fc;\n}\n.room-button:active {\n box-shadow: inset 0 0 0 2px #24a1fc;\n}\n.room-button:focus {\n box-shadow: inset 0 0 0 2px #24a1fc;\n}\n@media only screen and (max-width: 1000px) {\n .machine-image {\n margin-left: 50px;\n display: none;\n }\n}\n@media only screen and (max-width: 800px) {\n .machine-row .machine-text {\n font-size: 30px;\n }\n .stat-wrapper .stat-text {\n font-size: 30px;\n }\n}\n.col-xs-3 {\n margin-left: -5px;\n}\n@media only screen and (max-width: 700px) {\n .row-list {\n width: 100%;\n }\n}\n@media only screen and (max-width: 600px) {\n .room-button {\n width: 100px;\n font-size: 12px;\n padding: 3px;\n }\n .machine-list {\n margin-top: 60px;\n }\n}\n@media only screen and (max-width: 500px) {\n table {\n width: 50%;\n }\n .room-button {\n width: 80px;\n font-size: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n }\n .machine-row .machine-text {\n font-size: 24px;\n }\n .stat-wrapper .stat-text {\n font-size: 20px;\n font-weight: 600;\n }\n .stat-wrapper .list-group span {\n font-size: 18px;\n }\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9kYXdpZGt1Ymlja2kvRG9jdW1lbnRzL3VjemVsbmlhL3ByaS9hbmd1bGFyLWRldmVsb3AtY2xpZW50L3NyYy9hcHAvYWRtaW4vYWRtaW4uY29tcG9uZW50Lmxlc3MiLCJzcmMvYXBwL2FkbWluL2FkbWluLmNvbXBvbmVudC5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBRUksWUFBQTtDQ0FIO0FERkQ7RUFNSSxpQkFBQTtDQ0RIO0FETEQ7RUFRTSxpQkFBQTtFQUNBLGlCQUFBO0VBQ0EsWUFBQTtFQUNBLGlCQUFBO0NDQUw7QURYRDtFQWNRLG9CQUFBO0NDQVA7QURkRDtFQWtCUSxZQUFBO0NDRFA7QURqQkQ7O0VBd0JJLGtCQUFBO0NDSEg7QURPRDtFQUNFLFlBQUE7Q0NMRDtBRFFEO0VBQ0UsaUJBQUE7Q0NORDtBREtEO0VBSUksZUFBQTtFQUNBLGdCQUFBO0VBQ0EsaUJBQUE7RUFDQSxvQkFBQTtDQ05IO0FEREQ7RUFXSSxlQUFBO0VBQ0EsZ0JBQUE7RUFDQSxpQkFBQTtFQUNBLGtCQUFBO0VBQ0EsaUJBQUE7RUFDQSxzQkFBQTtDQ1BIO0FEVEQ7RUFtQk0
/***/ }),
/***/ "./src/app/admin/admin.component.ts":
/*!******************************************!*\
!*** ./src/app/admin/admin.component.ts ***!
\******************************************/
/*! exports provided: AdminComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdminComponent", function() { return AdminComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _shared_status_status_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared/status/status.service */ "./src/app/shared/status/status.service.ts");
/* harmony import */ var _user_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../user.service */ "./src/app/user.service.ts");
/* harmony import */ var rxjs_Rx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/Rx */ "./node_modules/rxjs-compat/_esm5/Rx.js");
var AdminComponent = /** @class */ (function () {
function AdminComponent(http, user, statusService) {
this.http = http;
this.user = user;
this.statusService = statusService;
this.name = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
this.ip = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
this.ipDelete = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
this.devices = [];
this.updateName = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
this.updateID = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
}
AdminComponent.prototype.onAddDevice = function () {
var _this = this;
if (this.name.value.length > 0 && this.ip.value.length > 0) {
this.http
.post("http://192.168.8.101:3000/device", {
name: this.name.value,
ip: this.ip.value
})
.subscribe(function (data) {
_this.name.reset();
_this.ip.reset();
});
}
};
AdminComponent.prototype.onDeviceDelete = function () {
var _this = this;
if (this.ipDelete.value.length > 0) {
this.http
.delete("http://192.168.8.101:3000/device/" + this.ipDelete.value)
.subscribe(function (data) {
_this.ipDelete.reset();
});
}
};
AdminComponent.prototype.onUpdateDevice = function (device) {
var _this = this;
console.log(device);
this.http
.put("http://192.168.8.101:/device/" + device.id, {
name: device.name,
ip: device.ip
})
.subscribe(function (data) {
_this.statusService.getDB().subscribe(function (data) {
console.log(data);
_this.devices = data;
});
});
console.log(device);
};
AdminComponent.prototype.ngOnInit = function () {
var _this = this;
this.statusService.getDB().subscribe(function (data) {
console.log(data);
_this.devices = data;
});
};
AdminComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-admin",
template: __webpack_require__(/*! ./admin.component.html */ "./src/app/admin/admin.component.html"),
styles: [__webpack_require__(/*! ./admin.component.less */ "./src/app/admin/admin.component.less")]
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"],
_user_service__WEBPACK_IMPORTED_MODULE_5__["UserService"],
_shared_status_status_service__WEBPACK_IMPORTED_MODULE_4__["StatusService"]])
], AdminComponent);
return AdminComponent;
}());
/***/ }),
/***/ "./src/app/admin/form/form.component.html":
/*!************************************************!*\
!*** ./src/app/admin/form/form.component.html ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<form *ngIf=\"device\" (ngSubmit)=\"onUpdateDevice(device._id)\">\n <input type=\"text\" [value]=\"device.name\" [formControl]=\"name\" />\n <input type=\"text\" [value]=\"device.ip\" [formControl]=\"ip\" />\n <button>Edycja</button>\n</form>\n"
/***/ }),
/***/ "./src/app/admin/form/form.component.less":
/*!************************************************!*\
!*** ./src/app/admin/form/form.component.less ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FkbWluL2Zvcm0vZm9ybS5jb21wb25lbnQubGVzcyJ9 */"
/***/ }),
/***/ "./src/app/admin/form/form.component.ts":
/*!**********************************************!*\
!*** ./src/app/admin/form/form.component.ts ***!
\**********************************************/
/*! exports provided: FormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormComponent", function() { return FormComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var FormComponent = /** @class */ (function () {
function FormComponent() {
this.onUpdateDeviceEmit = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
this.name = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
this.ip = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]("");
}
Object.defineProperty(FormComponent.prototype, "device", {
get: function () {
return this._device;
},
set: function (device) {
this._device = device;
this.name.setValue(device.name);
this.ip.setValue(device.ip);
},
enumerable: true,
configurable: true
});
FormComponent.prototype.onUpdateDevice = function (id) {
console.log(this.name.value, this.ip.value);
this.onUpdateDeviceEmit.emit({
name: this.name.value,
ip: this.ip.value,
id: id
});
};
FormComponent.prototype.ngOnInit = function () { };
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [Object])
], FormComponent.prototype, "device", null);
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object)
], FormComponent.prototype, "onUpdateDeviceEmit", void 0);
FormComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-form",
template: __webpack_require__(/*! ./form.component.html */ "./src/app/admin/form/form.component.html"),
styles: [__webpack_require__(/*! ./form.component.less */ "./src/app/admin/form/form.component.less")]
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [])
], FormComponent);
return FormComponent;
}());
/***/ }),
/***/ "./src/app/app-routing.module.ts":
/*!***************************************!*\
!*** ./src/app/app-routing.module.ts ***!
\***************************************/
/*! exports provided: AppRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRoutingModule", function() { return AppRoutingModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _login_login_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./login/login.component */ "./src/app/login/login.component.ts");
/* harmony import */ var _status_list_status_list_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./status-list/status-list.component */ "./src/app/status-list/status-list.component.ts");
var routes = [
{ path: "", component: _status_list_status_list_component__WEBPACK_IMPORTED_MODULE_4__["StatusListComponent"] },
{
path: "login",
component: _login_login_component__WEBPACK_IMPORTED_MODULE_3__["LoginComponent"]
}
];
var AppRoutingModule = /** @class */ (function () {
function AppRoutingModule() {
}
AppRoutingModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forRoot(routes)],
exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]]
})
], AppRoutingModule);
return AppRoutingModule;
}());
/***/ }),
/***/ "./src/app/app.component.html":
/*!************************************!*\
!*** ./src/app/app.component.html ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"container\">\n <app-header></app-header>\n <router-outlet></router-outlet>\n</div>\n"
/***/ }),
/***/ "./src/app/app.component.less":
/*!************************************!*\
!*** ./src/app/app.component.less ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FwcC5jb21wb25lbnQubGVzcyJ9 */"
/***/ }),
/***/ "./src/app/app.component.ts":
/*!**********************************!*\
!*** ./src/app/app.component.ts ***!
\**********************************/
/*! exports provided: AppComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var AppComponent = /** @class */ (function () {
function AppComponent() {
this.title = 'client';
}
AppComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: 'app-root',
template: __webpack_require__(/*! ./app.component.html */ "./src/app/app.component.html"),
styles: [__webpack_require__(/*! ./app.component.less */ "./src/app/app.component.less")]
})
], AppComponent);
return AppComponent;
}());
/***/ }),
/***/ "./src/app/app.module.ts":
/*!*******************************!*\
!*** ./src/app/app.module.ts ***!
\*******************************/
/*! exports provided: AppModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./app-routing.module */ "./src/app/app-routing.module.ts");
/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts");
/* harmony import */ var _shared_status_status_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared/status/status.service */ "./src/app/shared/status/status.service.ts");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _status_list_status_list_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./status-list/status-list.component */ "./src/app/status-list/status-list.component.ts");
/* harmony import */ var _header_header_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./header/header.component */ "./src/app/header/header.component.ts");
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
/* harmony import */ var _angular_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
/* harmony import */ var _admin_admin_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./admin/admin.component */ "./src/app/admin/admin.component.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
/* harmony import */ var _admin_form_form_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./admin/form/form.component */ "./src/app/admin/form/form.component.ts");
/* harmony import */ var _login_login_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./login/login.component */ "./src/app/login/login.component.ts");
/* harmony import */ var _user_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./user.service */ "./src/app/user.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _authguard_guard__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./authguard.guard */ "./src/app/authguard.guard.ts");
var appRoutes = [
{
path: "",
component: _login_login_component__WEBPACK_IMPORTED_MODULE_14__["LoginComponent"]
},
{
path: "admin",
component: _admin_admin_component__WEBPACK_IMPORTED_MODULE_11__["AdminComponent"],
canActivate: [_authguard_guard__WEBPACK_IMPORTED_MODULE_17__["AuthguardGuard"]]
}
];
var AppModule = /** @class */ (function () {
function AppModule() {
}
AppModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"])({
exports: [
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatAutocompleteModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatButtonModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatButtonToggleModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatCardModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatCheckboxModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatChipsModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatStepperModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatDialogModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatDividerModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatExpansionModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatGridListModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatIconModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatInputModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatListModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatMenuModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatNativeDateModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatPaginatorModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatProgressBarModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatProgressSpinnerModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatRadioModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatRippleModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSelectModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSidenavModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSliderModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSlideToggleModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSnackBarModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSortModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatTableModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatTabsModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatToolbarModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatTooltipModule"]
],
declarations: [
_app_component__WEBPACK_IMPORTED_MODULE_4__["AppComponent"],
_status_list_status_list_component__WEBPACK_IMPORTED_MODULE_7__["StatusListComponent"],
_header_header_component__WEBPACK_IMPORTED_MODULE_8__["HeaderComponent"],
_admin_admin_component__WEBPACK_IMPORTED_MODULE_11__["AdminComponent"],
_admin_form_form_component__WEBPACK_IMPORTED_MODULE_13__["FormComponent"],
_login_login_component__WEBPACK_IMPORTED_MODULE_14__["LoginComponent"]
],
imports: [
_angular_router__WEBPACK_IMPORTED_MODULE_16__["RouterModule"].forRoot(appRoutes),
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"],
_app_routing_module__WEBPACK_IMPORTED_MODULE_3__["AppRoutingModule"],
_angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClientModule"],
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"],
_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__["BrowserAnimationsModule"],
_angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClientModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatButtonModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatMenuModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatCardModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatToolbarModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatIconModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatSidenavModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatListModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_12__["FormsModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_12__["ReactiveFormsModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatFormFieldModule"],
_angular_material__WEBPACK_IMPORTED_MODULE_10__["MatInputModule"]
],
providers: [_shared_status_status_service__WEBPACK_IMPORTED_MODULE_5__["StatusService"], _user_service__WEBPACK_IMPORTED_MODULE_15__["UserService"], _authguard_guard__WEBPACK_IMPORTED_MODULE_17__["AuthguardGuard"]],
bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_4__["AppComponent"]]
})
], AppModule);
return AppModule;
}());
/***/ }),
/***/ "./src/app/authguard.guard.ts":
/*!************************************!*\
!*** ./src/app/authguard.guard.ts ***!
\************************************/
/*! exports provided: AuthguardGuard */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthguardGuard", function() { return AuthguardGuard; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _user_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./user.service */ "./src/app/user.service.ts");
var AuthguardGuard = /** @class */ (function () {
function AuthguardGuard(user) {
this.user = user;
}
AuthguardGuard.prototype.canActivate = function (next, state) {
return this.user.getUserLoggedIn();
};
AuthguardGuard = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
providedIn: "root"
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_user_service__WEBPACK_IMPORTED_MODULE_2__["UserService"]])
], AuthguardGuard);
return AuthguardGuard;
}());
/***/ }),
/***/ "./src/app/header/header.component.html":
/*!**********************************************!*\
!*** ./src/app/header/header.component.html ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<nav class=\"navbar\">\n <div class=\"row\">\n <div class=\"logo col-md-9 col-xs-9\">\n <a routerLinkActive=\"/\">\n <img\n src=\"/assets/img/logo.png\"\n routerLink=\"/\"\n class=\"logo-img\"\n alt=\"logo\"\n />\n </a>\n </div>\n </div>\n</nav>\n\n<!-- <p><span matBadge=\"4\" matBadgeOverlap=\"false\">Status serwerals</span></p> -->\n"
/***/ }),
/***/ "./src/app/header/header.component.less":
/*!**********************************************!*\
!*** ./src/app/header/header.component.less ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".navbar {\n margin-top: 30px;\n outline: none !important;\n}\n.navbar .row span {\n font-size: 20px;\n font-weight: 200;\n color: #000000;\n}\n.navbar .row .logo-img {\n width: 200px;\n margin-top: -1px;\n cursor: pointer;\n}\n.navbar .row .battery-img {\n width: 13px;\n margin-top: -6px;\n position: relative;\n}\n.navbar .row .battery .battery-percent {\n position: relative;\n display: inline-block;\n margin-left: 10px;\n}\n.navbar .row .flag {\n outline: none !important;\n cursor: pointer;\n text-align: center;\n}\n.navbar .row .flag .flag-img {\n width: 28px;\n}\n.navbar .row .flag .lang-change {\n position: relative;\n display: inline-block;\n outline: none !important;\n}\n.navbar .row .flag .lang-change .active {\n border-bottom: 1px solid black;\n outline: none !important;\n}\n.navbar .row .flag .lang-change span {\n font-weight: 300;\n color: #000000;\n margin-left: 5px;\n margin-right: 5px;\n outline: none !important;\n}\n.navbar .row .flag .lang-change span:hover {\n opacity: 0.5;\n cursor: pointer;\n outline: none !important;\n}\n.navbar .row .menu-img {\n cursor: pointer;\n float: right;\n margin-top: 5px;\n}\n@media only screen and (max-width: 600px) {\n .navbar .row .logo-img {\n width: 140px;\n }\n .navbar .row span {\n font-size: 15px;\n }\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9kYXdpZGt1Ymlja2kvRG9jdW1lbnRzL3VjemVsbmlhL3ByaS9hbmd1bGFyLWRldmVsb3AtY2xpZW50L3NyYy9hcHAvaGVhZGVyL2hlYWRlci5jb21wb25lbnQubGVzcyIsInNyYy9hcHAvaGVhZGVyL2hlYWRlci5jb21wb25lbnQubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGlCQUFBO0VBQ0EseUJBQUE7Q0NDRDtBREhEO0VBS00sZ0JBQUE7RUFDQSxpQkFBQTtFQUNBLGVBQUE7Q0NDTDtBRFJEO0VBV00sYUFBQTtFQUNBLGlCQUFBO0VBQ0EsZ0JBQUE7Q0NBTDtBRGJEO0VBZ0JNLFlBQUE7RUFDQSxpQkFBQTtFQUNBLG1CQUFBO0NDQUw7QURsQkQ7RUFzQlEsbUJBQUE7RUFDQSxzQkFBQTtFQUNBLGtCQUFBO0NDRFA7QUR2QkQ7RUE0Qk0seUJBQUE7RUFDQSxnQkFBQTtFQUNBLG1CQUFBO0NDRkw7QUQ1QkQ7RUFpQ1EsWUFBQTtDQ0ZQO0FEL0JEO0VBb0NRLG1CQUFBO0VBQ0Esc0JBQUE7RUFDQSx5QkFBQTtDQ0ZQO0FEcENEO0VBMkNVLCtCQUFBO0VBQ0EseUJBQUE7Q0NKVDtBRHhDRDtFQWlEVSxpQkFBQTtFQUNBLGVBQUE7RUFDQSxpQkFBQTtFQUNBLGtCQUFBO0VBQ0EseUJBQUE7Q0NOVDtBRC9DRDtFQXlEVSxhQUFBO0VBQ0EsZ0JBQUE7RUFDQSx5QkFBQTtDQ1BUO0FEcEREO0VBZ0VNLGdCQUFBO0VBQ0EsYUFBQTtFQUNBLGdCQUFBO0NDVEw7QURjRDtFQUNFO0lBR0UsYUFBQTtHQ2REO0VEV0Q7SUFNRCxnQkFBQTtHQ2RFO0NBQ0YiLCJmaWxlIjoic3JjL2FwcC9oZWFkZXIvaGVhZGVyLmNvbXBvbmVudC5sZXNzIiwic291cmNlc0NvbnRlbnQiOlsiLm5hdmJhciB7XG4gIG1hcmdpbi10b3A6IDMwcHg7XG4gIG91dGxpbmU6IG5vbmUgIWltcG9ydGFudDtcbiAgLnJvdyB7XG4gICAgc3BhbiB7XG4gICAgICBmb250LXNpemU6IDIwcHg7XG4gICAgICBmb250LXdlaWdodDogMjAwO1xuICAgICAgY29sb3I6ICMwMDAwMDA7XG4gICAgfVxuXG4gICAgLmxvZ28taW1nIHtcbiAgICAgIHdpZHRoOiAyMDBweDtcbiAgICAgIG1hcmdpbi10b3A6IC0xcHg7XG4gICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgfVxuICAgIC5iYXR0ZXJ5LWltZyB7XG4gICAgICB3aWR0aDogMTNweDtcbiAgICAgIG1hcmdpbi10b3A6IC02cHg7XG4gICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgfVxuICAgIC5iYXR0ZXJ5IHtcbiAgICAgIC5iYXR0ZXJ5LXBlcmNlbnQge1xuICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgICAgbWFyZ2luLWxlZnQ6IDEwcHg7XG4gICAgICB9XG4gICAgfVxuICAgIC5mbGFnIHtcbiAgICAgIG91dGxpbmU6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgIHRleHQtYWxpZ246Y2VudGVyO1xuXG4gICAgICAuZmxhZy1pbWcge1xuICAgICAgICB3aWR0aDogMjhweDtcbiAgICAgIH1cbiAgICAgIC5sYW5nLWNoYW5nZSB7XG4gICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgICBvdXRsaW5lOiBub25lICFpbXBvcnRhbnQ7XG4gICAgICAgIFxuXG5cbiAgICAgICAgLmFjdGl2ZSB7XG4gICAgICAgICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIGJsYWNrO1xuICAgICAgICAgIG91dGxpbmU6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgICAgfVxuXG4gICAgICAgIHNwYW4ge1xuICAgICAgICAgXG4gICAgICAgICAgZm9udC13ZWlnaHQ6IDMwMDtcbiAgICAgICAgICBjb2xvcjogIzAwMDAwMDtcbiAgICAgICAgICBtYXJnaW4tbGVmdDogNXB4O1xuICAgICAgICAgIG1hcmdpbi1yaWdodDogNXB4O1xuICAgICAgICAgIG91dGxpbmU6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgICAgfVxuXG4gICAgICAgIHNwYW46aG92ZXIge1xuICAgICAgICAgIG9wYWNpdHk6IDAuNTtcbiAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgICAgb3V0bGluZTogbm9uZSAhaW1wb3J0YW50O1xuICAgICAgICB9XG4gIC
/***/ }),
/***/ "./src/app/header/header.component.ts":
/*!********************************************!*\
!*** ./src/app/header/header.component.ts ***!
\********************************************/
/*! exports provided: HeaderComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var HeaderComponent = /** @class */ (function () {
function HeaderComponent() {
}
HeaderComponent.prototype.ngOnInit = function () { };
HeaderComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-header",
template: __webpack_require__(/*! ./header.component.html */ "./src/app/header/header.component.html"),
styles: [__webpack_require__(/*! ./header.component.less */ "./src/app/header/header.component.less")]
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [])
], HeaderComponent);
return HeaderComponent;
}());
/***/ }),
/***/ "./src/app/login/login.component.html":
/*!********************************************!*\
!*** ./src/app/login/login.component.html ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div style=\"margin-top:30px\">\n <form (submit)=\"loginUser($event)\">\n <div class=\"input\">\n <label> Nazwa użytkownika</label> <input type=\"text\" />\n </div>\n <div class=\"input\"><label>Hasło</label> <input type=\"password\" /></div>\n <span style=\"color: red\">{{\n statusLog == 1\n ? \" \"\n : statusLog == 2\n ? \"Niepoprawny login lub hasło\"\n : \" \"\n }}</span>\n <div class=\"input\"><input type=\"submit\" value=\"Login\" /></div>\n </form>\n</div>\n"
/***/ }),
/***/ "./src/app/login/login.component.less":
/*!********************************************!*\
!*** ./src/app/login/login.component.less ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ":host {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\ndiv.input {\n position: relative;\n}\ndiv.input label {\n position: absolute;\n top: 0;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 10px;\n background: white;\n padding: 5px 2px;\n}\ndiv.input input {\n padding: 10px 10px;\n font-size: 20px;\n outline: 0px;\n}\ndiv {\n margin-bottom: 15px;\n}\ninput[type=\"submit\"] {\n background-color: #0099ff;\n border: none;\n color: white;\n border-radius: 5px;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9kYXdpZGt1Ymlja2kvRG9jdW1lbnRzL3VjemVsbmlhL3ByaS9hbmd1bGFyLWRldmVsb3AtY2xpZW50L3NyYy9hcHAvbG9naW4vbG9naW4uY29tcG9uZW50Lmxlc3MiLCJzcmMvYXBwL2xvZ2luL2xvZ2luLmNvbXBvbmVudC5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBQTtFQUNBLGNBQUE7RUFDQSx3QkFBQTtFQUNBLG9CQUFBO0NDQ0Q7QURFRDtFQUNFLG1CQUFBO0NDQUQ7QURHRDtFQUNFLG1CQUFBO0VBQ0EsT0FBQTtFQUNBLG9DQUFBO1VBQUEsNEJBQUE7RUFDQSxXQUFBO0VBQ0Esa0JBQUE7RUFDQSxpQkFBQTtDQ0REO0FESUQ7RUFDRSxtQkFBQTtFQUNBLGdCQUFBO0VBQ0EsYUFBQTtDQ0ZEO0FES0Q7RUFDRSxvQkFBQTtDQ0hEO0FETUQ7RUFDRSwwQkFBQTtFQUNBLGFBQUE7RUFDQSxhQUFBO0VBQ0EsbUJBQUE7Q0NKRCIsImZpbGUiOiJzcmMvYXBwL2xvZ2luL2xvZ2luLmNvbXBvbmVudC5sZXNzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3Qge1xuICBmbGV4LWdyb3c6IDE7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xufVxuXG5kaXYuaW5wdXQge1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG59XG5cbmRpdi5pbnB1dCBsYWJlbCB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAwO1xuICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoLTUwJSk7XG4gIGxlZnQ6IDEwcHg7XG4gIGJhY2tncm91bmQ6IHdoaXRlO1xuICBwYWRkaW5nOiA1cHggMnB4O1xufVxuXG5kaXYuaW5wdXQgaW5wdXQge1xuICBwYWRkaW5nOiAxMHB4IDEwcHg7XG4gIGZvbnQtc2l6ZTogMjBweDtcbiAgb3V0bGluZTogMHB4O1xufVxuXG5kaXYge1xuICBtYXJnaW4tYm90dG9tOiAxNXB4O1xufVxuXG5pbnB1dFt0eXBlPVwic3VibWl0XCJdIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzAwOTlmZjtcbiAgYm9yZGVyOiBub25lO1xuICBjb2xvcjogd2hpdGU7XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbn1cbiIsIjpob3N0IHtcbiAgZmxleC1ncm93OiAxO1xuICBkaXNwbGF5OiBmbGV4O1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbn1cbmRpdi5pbnB1dCB7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbn1cbmRpdi5pbnB1dCBsYWJlbCB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAwO1xuICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoLTUwJSk7XG4gIGxlZnQ6IDEwcHg7XG4gIGJhY2tncm91bmQ6IHdoaXRlO1xuICBwYWRkaW5nOiA1cHggMnB4O1xufVxuZGl2LmlucHV0IGlucHV0IHtcbiAgcGFkZGluZzogMTBweCAxMHB4O1xuICBmb250LXNpemU6IDIwcHg7XG4gIG91dGxpbmU6IDBweDtcbn1cbmRpdiB7XG4gIG1hcmdpbi1ib3R0b206IDE1cHg7XG59XG5pbnB1dFt0eXBlPVwic3VibWl0XCJdIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzAwOTlmZjtcbiAgYm9yZGVyOiBub25lO1xuICBjb2xvcjogd2hpdGU7XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbn1cbiJdfQ== */"
/***/ }),
/***/ "./src/app/login/login.component.ts":
/*!******************************************!*\
!*** ./src/app/login/login.component.ts ***!
\******************************************/
/*! exports provided: LoginComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginComponent", function() { return LoginComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _user_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../user.service */ "./src/app/user.service.ts");
var LoginComponent = /** @class */ (function () {
function LoginComponent(router, user) {
this.router = router;
this.user = user;
this.statusLog = 0;
}
LoginComponent.prototype.ngOnInit = function () { };
LoginComponent.prototype.loginUser = function (e) {
e.preventDefault();
var username = e.target.elements[0].value;
var password = e.target.elements[1].value;
if (username == "cap_login" && password == "cap_password_123") {
this.user.setUserLoggedIn();
this.router.navigate(["admin"]);
this.statusLog = 1;
}
else {
this.statusLog = 2;
}
};
LoginComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-login",
template: __webpack_require__(/*! ./login.component.html */ "./src/app/login/login.component.html"),
styles: [__webpack_require__(/*! ./login.component.less */ "./src/app/login/login.component.less")]
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"], _user_service__WEBPACK_IMPORTED_MODULE_3__["UserService"]])
], LoginComponent);
return LoginComponent;
}());
/***/ }),
/***/ "./src/app/shared/status/status.service.ts":
/*!*************************************************!*\
!*** ./src/app/shared/status/status.service.ts ***!
\*************************************************/
/*! exports provided: StatusService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatusService", function() { return StatusService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var rxjs_Rx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/Rx */ "./node_modules/rxjs-compat/_esm5/Rx.js");
var StatusService = /** @class */ (function () {
function StatusService(http) {
var _this = this;
this.http = http;
// private url_pilkarzyki1 =
// "http://localhost:3000/chillroom-server?ip=192.168.8.107";
this.url_db = "http://192.168.8.101:3000/all";
this.status_url = "http://192.168.8.101:3000/status/";
this.getStatus = function (ip) {
return _this.http.get(_this.status_url + ip);
};
}
// getPilkarzyki1(): Observable<any> {
// return this.http.get(this.url_pilkarzyki1);
// }
StatusService.prototype.getDB = function () {
return this.http.get(this.url_db);
};
StatusService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
providedIn: "root"
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
], StatusService);
return StatusService;
}());
/***/ }),
/***/ "./src/app/status-list/status-list.component.html":
/*!********************************************************!*\
!*** ./src/app/status-list/status-list.component.html ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"lists\"><span>Wybierz urządzenie:</span></div>\n<div class=\"machine-list\">\n <div class=\"row row-list\">\n <div\n class=\"col-md-3 col-xs-3\"\n *ngFor=\"let device of devices; let i = index\"\n [attr.data-index]=\"i\"\n >\n <button\n class=\"room-button\"\n [ngStyle]=\"{\n color: 'white',\n backgroundColor:\n device.lastStatus == 1\n ? '#D13'\n : device.lastStatus == 0\n ? '#4CC355'\n : '#5A17ED',\n borderColor:\n device.lastStatus == 1\n ? '#D13'\n : device.lastStatus == 0\n ? '#4CC355'\n : '#5A17ED'\n }\"\n (click)=\"onChangeDevice(i)\"\n >\n {{ device.name }}\n </button>\n <b>{{\n device.lastStatus == 1\n ? \"Zajęte\"\n : device.lastStatus == 0\n ? \"Wolne\"\n : \"Rozładowana bateria\"\n }}</b>\n </div>\n </div>\n</div>\n\n<div class=\"row machine-row\">\n <div class=\"col-md-5 col-xs-11\">\n <p class=\"machine-status-title\">{{ activeDevice.name }}</p>\n <p class=\"machine-status\">\n Status:\n <img\n [src]=\"\n activeDevice.lastStatus == 1\n ? '../assets/img/busy.png'\n : activeDevice.lastStatus == 2\n ? '../assets/img/busy.png'\n : '../assets/img/free.png'\n \"\n alt=\"\"\n />\n <span>{{\n activeDevice.lastStatus == 1\n ? \"Zajęte\"\n : activeDevice.lastStatus == 0\n ? \"Wolne\"\n : \"Rozładowana bateria\"\n }}</span>\n </p>\n <p class=\"machine-status2\">\n {{\n activeDevice.lastStatus == 1\n ? \"Zajęte od:\"\n : activeDevice.lastStatus == 0\n ? \"Wolne od:\"\n : \"Rozładowana bateria\"\n }}\n\n <span\n >{{ time > 60 ? this.Math.floor(time / 60) : this.Math.floor(time) }}\n {{ time > 60 ? \"min\" : \"sek\" }}\n </span>\n </p>\n </div>\n <div class=\"col-md-7 col-xs-1\">\n <img\n class=\"machine-image\"\n src=\"../assets/img/football2.jpg\"\n alt=\"{{ status }}\"\n />\n </div>\n</div>\n<div class=\"row statistics-row\">\n <div class=\"col-md-6 stat-wrapper\">\n <p class=\"stat-text\"><span>Statystyki szczegółowe:</span></p>\n <ul class=\"list-group\">\n <p style=\"margin-bottom:15px\">\n <span>Średni czas gry: </span>\n <span class=\"boldMe\"\n >{{\n average > 60\n ? this.Math.floor(average / 60)\n : this.Math.floor(average)\n }}\n {{ average > 60 ? \"min\" : \"sek\" }}</span\n ><br />\n </p>\n\n <div *ngIf=\"this.activeDevice.lastStatus == 1\">\n <span>Przewidywane zakończenie: </span>\n <span class=\"boldMe\">{{\n average - time < 0\n ? \"Zaraz koniec !\"\n : average - time > 60\n ? this.Math.floor((average - time) / 60)\n : this.Math.floor(average - time)\n }}</span>\n </div>\n </ul>\n </div>\n</div>\n<div class=\"row\">\n <div id=\"tabel\" class=\"col-md-6\"><canvas id=\"lineChart\"></canvas></div>\n <div id=\"tabel\" class=\"col-md-6\"><canvas id=\"barChart\"></canvas></div>\n</div>\n<footer>\n <div class=\"row\">\n <div class=\"logo col-md-6\">\n <a routerLinkActive=\"/\">\n <img\n src=\"/assets/img/logo.png\"\n routerLink=\"/\"\n class=\"logo-img\"\n alt=\"logo\"\n />\n </a>\n </div>\n <div class=\"col-md-6\" style=\"text-align: right\">\n <div class=\"example-button-row\">\n <button mat-flat-button color=\"primary\">Instrukcja obsługi</button>\n </div>\n </div>\n </div>\n</footer>\n"
/***/ }),
/***/ "./src/app/status-list/status-list.component.less":
/*!********************************************************!*\
!*** ./src/app/status-list/status-list.component.less ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "table {\n width: 100%;\n}\n.machine-row {\n margin-top: 60px;\n}\n.machine-row .machine-text {\n color: #000000;\n font-size: 36px;\n font-weight: 300;\n letter-spacing: 2px;\n}\n.machine-row .machine-status {\n color: #000000;\n font-size: 23px;\n font-weight: 300;\n margin-left: 30px;\n margin-top: 50px;\n letter-spacing: 0.5px;\n}\n.machine-row .machine-status img {\n width: 15px;\n margin-top: -3px;\n margin-left: 10px;\n}\n.machine-row .machine-status span {\n font-size: 24px;\n margin-left: 15px;\n top: -10px;\n}\n.machine-row .machine-status2 {\n color: #000000;\n font-size: 23px;\n font-weight: 300;\n margin-left: 30px;\n margin-top: 10px;\n letter-spacing: 0.5px;\n}\n.machine-row .machine-status2 img {\n width: 15px;\n margin-top: -3px;\n margin-left: 10px;\n}\n.machine-row .machine-status2 span {\n font-size: 24px;\n margin-left: 15px;\n top: -10px;\n}\n.machine-row .machine-status-title {\n color: #000000;\n font-size: 33px;\n font-weight: 400;\n margin-left: 30px;\n letter-spacing: 0.5px;\n}\n.machine-row .machine-status-title img {\n width: 15px;\n margin-top: -3px;\n margin-left: 10px;\n}\n.machine-row .machine-status-title span {\n font-size: 24px;\n margin-left: 15px;\n top: -10px;\n}\n.machine-row .machine-image {\n width: 230px;\n margin-top: 0px;\n margin-left: 50px;\n}\n.stat-wrapper {\n margin-left: 30px;\n color: #000000;\n font-size: 23px;\n font-weight: 300;\n}\n.stat-wrapper .stat-text {\n color: #000000;\n font-size: 36px;\n font-weight: 300;\n letter-spacing: 2px;\n margin-bottom: 30px;\n}\n.button-use {\n margin-left: 30px;\n margin-top: 20px;\n}\n.boldMe {\n font-weight: 400;\n}\n.lists {\n text-align: center;\n font-size: 20px;\n}\n.machine-list {\n margin-right: 0px;\n margin-top: 60px;\n text-align: center;\n}\n.row-list {\n width: 700px;\n display: inline-block;\n}\n.room-button {\n border-radius: 12px;\n background-color: white;\n border: solid 1px red;\n color: red;\n padding: 10px;\n width: 120px;\n margin-bottom: 20px;\n}\n.room-button:hover {\n box-shadow: inset 0 0 0 2px #24a1fc;\n}\n.room-button:active {\n box-shadow: inset 0 0 0 2px #24a1fc;\n}\n.room-button:focus {\n box-shadow: inset 0 0 0 2px #24a1fc;\n}\n@media only screen and (max-width: 1000px) {\n .machine-image {\n margin-left: 50px;\n display: none;\n }\n}\n@media only screen and (max-width: 800px) {\n .machine-row .machine-text {\n font-size: 30px;\n }\n .stat-wrapper .stat-text {\n font-size: 30px;\n }\n}\n.col-xs-3 {\n margin-left: -5px;\n}\n@media only screen and (max-width: 700px) {\n .row-list {\n width: 100%;\n }\n}\n@media only screen and (max-width: 600px) {\n .room-button {\n width: 100px;\n font-size: 12px;\n padding: 3px;\n }\n .machine-list {\n margin-top: 60px;\n }\n}\n@media only screen and (max-width: 500px) {\n table {\n width: 50%;\n }\n .room-button {\n width: 80px;\n font-size: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n }\n .machine-row .machine-text {\n font-size: 24px;\n }\n .stat-wrapper .stat-text {\n font-size: 20px;\n font-weight: 600;\n }\n .stat-wrapper .list-group span {\n font-size: 18px;\n }\n}\n.example-button-row button,\n.example-button-row a {\n margin-right: 8px;\n}\nfooter {\n margin-bottom: 50px;\n}\nfooter .row {\n margin-top: 100px;\n margin-bottom: 50px;\n}\nfooter .row span {\n font-size: 20px;\n font-weight: 200;\n color: #000000;\n}\nfooter .row .logo-img {\n width: 200px;\n margin-top: -1px;\n cursor: pointer;\n}\nfooter .row .battery-img {\n width: 13px;\n margin-top: -6px;\n position: relative;\n}\nfooter .row .battery .battery-percent {\n position: relative;\n display: inline-block;\n margin-left: 10px;\n}\nfooter .row .flag {\n outline: none !important;\n cursor: pointer;\n text-align: center;\n}\nfooter .row .flag .flag-img {\n width: 28px;\n}\nfooter .row .flag .lang-change {\n position: relative;\n display: inline-block;\n outline: none !important;\n}\nfooter .row .flag .l
/***/ }),
/***/ "./src/app/status-list/status-list.component.ts":
/*!******************************************************!*\
!*** ./src/app/status-list/status-list.component.ts ***!
\******************************************************/
/*! exports provided: StatusListComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatusListComponent", function() { return StatusListComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_status_status_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/status/status.service */ "./src/app/shared/status/status.service.ts");
/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! chart.js */ "./node_modules/chart.js/src/chart.js");
/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_3__);
var StatusListComponent = /** @class */ (function () {
function StatusListComponent(statusService) {
var _this = this;
this.statusService = statusService;
//statuses: {} = {};
//statusesKeys = Object.keys(this.statuses);
this.LineChart = [];
this.BarChart = [];
this.devices = [];
this.activeDevice = { name: "", lastStatus: "", ip: "", _id: "" };
this.activeID = 0;
this.time = 0;
this.days = [0, 0, 0, 0, 0, 0, 0];
this.average = 0;
this.hours = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
];
this.onChangeDevice = function (index) {
_this.activeID = index;
_this.activeDevice = _this.devices[index];
//console.log(this.activeDevice);
_this.statusService.getStatus(_this.activeDevice._id).subscribe(function (status) {
var tempStatus = status.slice();
tempStatus.reverse();
var i = status.findIndex(function (item) {
return item.value != status[0].value;
});
_this.days = [0, 0, 0, 0, 0, 0, 0];
status.forEach(function (s) {
if (s.value === "1") {
var time_1 = new Date(s.time);
//console.log(time);
var index_1 = time_1.getDay();
_this.days[index_1] = _this.days[index_1] + 1;
}
});
var count = 0;
var allTime = 0;
status.reduce(function (prev, curr) {
if (prev.value === "1") {
count++;
allTime +=
new Date(prev.time).valueOf() - new Date(curr.time).valueOf();
}
return curr;
});
_this.average = allTime / count / 1000;
_this.hours = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
];
var now = new Date();
now.setDate(now.getDate());
now.setHours(8);
now.setMinutes(0);
now.setSeconds(0);
//console.log(now);
var index = tempStatus.findIndex(function (s) { return new Date(s.time).valueOf() > now.valueOf(); });
var todayStatus = tempStatus.slice(index);
//console.log(todayStatus);
todayStatus.reduce(function (prev, curr) {
if (prev.value === "1") {
var prevTime = new Date(prev.time);
var currTime = new Date(curr.time);
//console.log(prevTime.getHours());
if (prevTime.getHours() !== currTime.getHours()) {
_this.hours[prevTime.getHours() - 8] +=
(60 - prevTime.getMinutes()) * 60 * 1000;
_this.hours[currTime.getHours() - 8] +=
currTime.getMinutes() * 60 * 1000;
}
else {
_this.hours[prevTime.getHours() - 8] +=
currTime.valueOf() - prevTime.valueOf();
}
}
return curr;
});
_this.hours = _this.hours.map(function (h) { return h / 1000 / 60; });
//console.log(this.hours);
_this.showChart();
var newStatus;
if (i == -1) {
newStatus = status;
}
else {
newStatus = status.splice(0, i);
}
var first = Date.now(); //new Date(newStatus[0].time).getTime();
var last = new Date(newStatus[0].time).getTime(); //new Date(newStatus[newStatus.length - 1].time).getTime();
var time = first - last;
_this.time = time / 1000;
if (_this.activeDevice.lastStatus == "0" &&
_this.time < 10000 &&
newStatus[1].value == "1") {
_this.activeDevice.lastStatus = "1";
}
//console.log(this.time);
});
};
this.readSensors = function (data) {
console.log(data);
//const parsedData = data.split(",");
//this.statuses = { ...this.statuses, [parsedData[0]]: parsedData[1] };
//this.statusesKeys = Object.keys(this.statuses);
//this.statuses = [JSON.parse(data)];
};
this.Math = Math;
}
StatusListComponent.prototype.ngOnInit = function () {
var _this = this;
this.statusService.getDB().subscribe(function (data) {
_this.devices = data;
_this.onChangeDevice(0);
});
setInterval(function () {
_this.statusService.getDB().subscribe(function (data) {
_this.devices = data;
_this.onChangeDevice(_this.activeID);
});
}, 1000);
this.showChart();
};
StatusListComponent.prototype.showChart = function () {
this.LineChart = new chart_js__WEBPACK_IMPORTED_MODULE_3__["Chart"]("lineChart", {
type: "line",
data: {
labels: [
"8:00",
"9:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00"
],
datasets: [
{
label: "Ruch w ciągu dnia",
data: this.hours,
fill: false,
lineTension: 0.2,
borderColor: "rgba(75,192,192,0.6)",
borderWidth: 1
}
]
},
scales: {
yAxes: [
{
ticks: {
beginAtZero: true
}
}
]
},
options: {
animation: false
}
});
this.BarChart = new chart_js__WEBPACK_IMPORTED_MODULE_3__["Chart"]("barChart", {
type: "bar",
data: {
labels: ["Pon", "Wto", "Śro", "Czwa", "Pia", "Sob", "Niedz"],
datasets: [
{
label: "Liczba rozegranych gier",
data: this.days,
fill: true,
lineTension: 0.2,
borderColor: "white",
borderWidth: 1,
backgroundColor: [
"rgba(255,99,132,0.6)",
"rgba(54,162,235,0.6)",
"rgba(255,206,86,0.6)",
"rgba(75,192,192,0.6)",
"rgba(153,102,255,0.6)",
"rgba(255,99,132,0.6)",
"rgba(54,162,235,0.6)"
]
}
]
},
scales: {
yAxes: [
{
ticks: {
beginAtZero: true
}
}
]
},
options: {
animation: false
}
});
};
StatusListComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
selector: "app-status-list",
template: __webpack_require__(/*! ./status-list.component.html */ "./src/app/status-list/status-list.component.html"),
styles: [__webpack_require__(/*! ./status-list.component.less */ "./src/app/status-list/status-list.component.less")]
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_shared_status_status_service__WEBPACK_IMPORTED_MODULE_2__["StatusService"]])
], StatusListComponent);
return StatusListComponent;
}());
/***/ }),
/***/ "./src/app/user.service.ts":
/*!*********************************!*\
!*** ./src/app/user.service.ts ***!
\*********************************/
/*! exports provided: UserService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserService", function() { return UserService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var UserService = /** @class */ (function () {
function UserService() {
this.isUserLoggedIn = false;
}
UserService.prototype.setUserLoggedIn = function () {
this.isUserLoggedIn = true;
};
UserService.prototype.getUserLoggedIn = function () {
return this.isUserLoggedIn;
};
UserService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
providedIn: "root"
}),
tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [])
], UserService);
return UserService;
}());
/***/ }),
/***/ "./src/environments/environment.ts":
/*!*****************************************!*\
!*** ./src/environments/environment.ts ***!
\*****************************************/
/*! exports provided: environment */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
var environment = {
production: false
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
/***/ }),
/***/ "./src/main.ts":
/*!*********************!*\
!*** ./src/main.ts ***!
\*********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
}
Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"])
.catch(function (err) { return console.error(err); });
/***/ }),
/***/ 0:
/*!***************************!*\
!*** multi ./src/main.ts ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! /Users/dawidkubicki/Documents/uczelnia/pri/angular-develop-client/src/main.ts */"./src/main.ts");
/***/ })
},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main.js.map