{"remainingRequest":"/var/www/html/payroll_manager/front-end/node_modules/thread-loader/dist/cjs.js??ref--4-2!/var/www/html/payroll_manager/front-end/node_modules/ts-loader/index.js??ref--4-3!/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/administration/logs/logs.tsx","dependencies":[{"path":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/administration/logs/logs.tsx","mtime":1533613272437},{"path":"/var/www/html/payroll_manager/front-end/node_modules/react-hot-loader/webpack.js","mtime":1505850161000},{"path":"/var/www/html/payroll_manager/front-end/node_modules/cache-loader/dist/cjs.js","mtime":0},{"path":"/var/www/html/payroll_manager/front-end/node_modules/thread-loader/dist/cjs.js","mtime":0},{"path":"/var/www/html/payroll_manager/front-end/node_modules/ts-loader/index.js","mtime":1530127508000},{"path":"/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js","mtime":1519899048000}],"contextDependencies":[],"result":["import * as tslib_1 from \"tslib\";\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { getLoggers, changeLogLevel } from '../administration.reducer';\nvar LogsPage = /** @class */ (function (_super) {\n tslib_1.__extends(LogsPage, _super);\n function LogsPage() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n filter: ''\n };\n _this.getLogs = function () {\n if (!_this.props.isFetching) {\n _this.props.getLoggers();\n }\n };\n _this.changeLevel = function (loggerName, level) { return function () {\n _this.props.changeLogLevel(loggerName, level);\n }; };\n _this.setFilter = function (evt) {\n _this.setState({\n filter: evt.target.value\n });\n };\n _this.getClassName = function (level, check, className) { return (level === check ? \"btn btn-sm btn-\" + className : 'btn btn-sm btn-light'); };\n _this.filterFn = function (l) { return l.name.toUpperCase().includes(_this.state.filter.toUpperCase()); };\n return _this;\n }\n LogsPage.prototype.componentDidMount = function () {\n this.props.getLoggers();\n };\n LogsPage.prototype.render = function () {\n var _this = this;\n var _a = this.props, logs = _a.logs, isFetching = _a.isFetching;\n var filter = this.state.filter;\n var loggers = logs ? logs.loggers : [];\n return (React.createElement(\"div\", null,\n React.createElement(\"h2\", { className: \"logs-page-heading\" }, \"Logs\"),\n React.createElement(\"p\", null,\n \"There are \",\n loggers.length.toString(),\n \" loggers.\"),\n React.createElement(\"span\", null, \"Filter\"),\n React.createElement(\"input\", { type: \"text\", value: filter, onChange: this.setFilter, className: \"form-control\", disabled: isFetching }),\n React.createElement(\"table\", { className: \"table table-sm table-striped table-bordered\" },\n React.createElement(\"thead\", null,\n React.createElement(\"tr\", { title: \"click to order\" },\n React.createElement(\"th\", null,\n React.createElement(\"span\", null, \"Name\")),\n React.createElement(\"th\", null,\n React.createElement(\"span\", null, \"Level\")))),\n React.createElement(\"tbody\", null, loggers.filter(this.filterFn).map(function (logger, i) { return (React.createElement(\"tr\", { key: \"log-row-\" + i },\n React.createElement(\"td\", null,\n React.createElement(\"small\", null, logger.name)),\n React.createElement(\"td\", null,\n React.createElement(\"button\", { disabled: isFetching, onClick: _this.changeLevel(logger.name, 'TRACE'), className: _this.getClassName(logger.level, 'TRACE', 'primary') }, \"TRACE\"),\n React.createElement(\"button\", { disabled: isFetching, onClick: _this.changeLevel(logger.name, 'DEBUG'), className: _this.getClassName(logger.level, 'DEBUG', 'success') }, \"DEBUG\"),\n React.createElement(\"button\", { disabled: isFetching, onClick: _this.changeLevel(logger.name, 'INFO'), className: _this.getClassName(logger.level, 'INFO', 'info') }, \"INFO\"),\n React.createElement(\"button\", { disabled: isFetching, onClick: _this.changeLevel(logger.name, 'WARN'), className: _this.getClassName(logger.level, 'WARN', 'warning') }, \"WARN\"),\n React.createElement(\"button\", { disabled: isFetching, onClick: _this.changeLevel(logger.name, 'ERROR'), className: _this.getClassName(logger.level, 'ERROR', 'danger') }, \"ERROR\"),\n React.createElement(\"button\", { disabled: isFetching, onClick: _this.changeLevel(logger.name, 'OFF'), className: _this.getClassName(logger.level, 'OFF', 'secondary') }, \"OFF\")))); })))));\n };\n return LogsPage;\n}(React.Component));\nexport { LogsPage };\nvar mapStateToProps = function (_a) {\n var administration = _a.administration;\n return ({\n logs: administration.logs,\n isFetching: administration.loading\n });\n};\nvar mapDispatchToProps = { getLoggers: getLoggers, changeLogLevel: changeLogLevel };\nexport default connect(mapStateToProps, mapDispatchToProps)(LogsPage);\n",{"version":3,"file":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/administration/logs/logs.tsx","sourceRoot":"","sources":["/var/www/html/payroll_manager/front-end/node_modules/tslint-loader/index.js!/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/administration/logs/logs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AASvE;IAA8B,oCAA+C;IAA7E;QAAA,qEA6GC;QA5GC,WAAK,GAAmB;YACtB,MAAM,EAAE,EAAE;SACX,CAAC;QAMF,aAAO,GAAG;YACR,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,UAAU,EAAE;gBAC1B,KAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAEF,iBAAW,GAAG,UAAC,UAAU,EAAE,KAAK,IAAK,OAAA;YACnC,KAAI,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC/C,CAAC,EAFoC,CAEpC,CAAC;QAEF,eAAS,GAAG,UAAA,GAAG;YACb,KAAI,CAAC,QAAQ,CAAC;gBACZ,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK;aACzB,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,kBAAY,GAAG,UAAC,KAAK,EAAE,KAAK,EAAE,SAAS,IAAK,OAAA,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAkB,SAAW,CAAC,CAAC,CAAC,sBAAsB,CAAC,EAA1E,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AAD,CAAC,AA7GD,CAA8B,KAAK,CAAC,SAAS,GA6G5C;;AAED,IAAM,eAAe,GAAG,UAAC,EAA8B;QAA5B,kCAAc;IAAmB,OAAA,CAAC;QAC3D,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,UAAU,EAAE,cAAc,CAAC,OAAO;KACnC,CAAC;AAH0D,CAG1D,CAAC;AAEH,IAAM,kBAAkB,GAAG,EAAE,UAAU,YAAA,EAAE,cAAc,gBAAA,EAAE,CAAC;AAK1D,eAAe,OAAO,CACpB,eAAe,EACf,kBAAkB,CACnB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { getLoggers, changeLogLevel } from '../administration.reducer';\nimport { IRootState } from 'app/shared/reducers';\n\nexport interface ILogsPageProps extends StateProps, DispatchProps {}\n\nexport interface ILogsPageState {\n filter: string;\n}\n\nexport class LogsPage extends React.Component {\n state: ILogsPageState = {\n filter: ''\n };\n\n componentDidMount() {\n this.props.getLoggers();\n }\n\n getLogs = () => {\n if (!this.props.isFetching) {\n this.props.getLoggers();\n }\n };\n\n changeLevel = (loggerName, level) => () => {\n this.props.changeLogLevel(loggerName, level);\n };\n\n setFilter = evt => {\n this.setState({\n filter: evt.target.value\n });\n };\n\n getClassName = (level, check, className) => (level === check ? `btn btn-sm btn-${className}` : 'btn btn-sm btn-light');\n\n filterFn = l => l.name.toUpperCase().includes(this.state.filter.toUpperCase());\n\n render() {\n const { logs, isFetching } = this.props;\n const { filter } = this.state;\n const loggers = logs ? logs.loggers : [];\n return (\n
\n

Logs

\n

There are {loggers.length.toString()} loggers.

\n\n Filter\n \n\n \n \n \n \n \n \n \n \n {loggers.filter(this.filterFn).map((logger, i) => (\n \n \n \n \n ))}\n \n
\n Name\n \n Level\n
\n {logger.name}\n \n \n TRACE\n \n \n DEBUG\n \n \n INFO\n \n \n WARN\n \n \n ERROR\n \n \n OFF\n \n
\n
\n );\n }\n}\n\nconst mapStateToProps = ({ administration }: IRootState) => ({\n logs: administration.logs,\n isFetching: administration.loading\n});\n\nconst mapDispatchToProps = { getLoggers, changeLogLevel };\n\ntype StateProps = ReturnType;\ntype DispatchProps = typeof mapDispatchToProps;\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(LogsPage);\n"]}]}