{"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/account/sessions/sessions.tsx","dependencies":[{"path":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/sessions/sessions.tsx","mtime":1533613272105},{"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 { Alert, Table, Button } from 'reactstrap';\nimport { getSession } from 'app/shared/reducers/authentication';\nimport { findAll, invalidateSession } from './sessions.reducer';\nvar SessionsPage = /** @class */ (function (_super) {\n tslib_1.__extends(SessionsPage, _super);\n function SessionsPage() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.doSessionInvalidation = function (series) { return function () {\n _this.props.invalidateSession(series);\n _this.props.findAll();\n }; };\n _this.refreshList = function () {\n _this.props.findAll();\n };\n return _this;\n }\n SessionsPage.prototype.componentDidMount = function () {\n this.props.getSession();\n this.props.findAll();\n };\n SessionsPage.prototype.render = function () {\n var _this = this;\n var _a = this.props, account = _a.account, sessions = _a.sessions, updateSuccess = _a.updateSuccess, updateFailure = _a.updateFailure;\n return (React.createElement(\"div\", null,\n React.createElement(\"h2\", null,\n \"Active sessions for [\",\n React.createElement(\"b\", null, account.login),\n \"]\"),\n updateSuccess ? (React.createElement(Alert, { color: \"success\" },\n React.createElement(\"strong\", null, \"Session invalidated!\"))) : null,\n updateFailure ? (React.createElement(Alert, { color: \"danger\" },\n React.createElement(\"span\", null,\n React.createElement(\"strong\", null, \"An error has occured!\"),\n \" The session could not be invalidated.\"))) : null,\n React.createElement(Button, { color: \"primary\", onClick: this.refreshList }, \"Refresh\"),\n React.createElement(\"div\", { className: \"table-responsive\" },\n React.createElement(Table, { className: \"table-striped\" },\n React.createElement(\"thead\", null,\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"IP Address\"),\n React.createElement(\"th\", null, \"User agent\"),\n React.createElement(\"th\", null, \"Date\"),\n React.createElement(\"th\", null))),\n React.createElement(\"tbody\", null, sessions.map(function (s) { return (React.createElement(\"tr\", null,\n React.createElement(\"td\", null, s.ipAddress),\n React.createElement(\"td\", null, s.userAgent),\n React.createElement(\"td\", null, s.tokenDate),\n React.createElement(\"td\", null,\n React.createElement(Button, { color: \"primary\", onClick: _this.doSessionInvalidation(s.series) }, \"Invalidate\")))); }))))));\n };\n return SessionsPage;\n}(React.Component));\nexport { SessionsPage };\nvar mapStateToProps = function (_a) {\n var authentication = _a.authentication, sessions = _a.sessions;\n return ({\n account: authentication.account,\n sessions: sessions.sessions,\n updateSuccess: sessions.updateSuccess,\n updateFailure: sessions.updateFailure\n });\n};\nvar mapDispatchToProps = { getSession: getSession, findAll: findAll, invalidateSession: invalidateSession };\nexport default connect(mapStateToProps, mapDispatchToProps)(SessionsPage);\n",{"version":3,"file":"/var/www/html/payroll_manager/front-end/src/main/webapp/app/modules/account/sessions/sessions.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/account/sessions/sessions.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM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ACE,6CAAmB;4BACnB,6CAAmB;4BACnB,uCAAa;4BACb,+BAAM,CACH,CACC;oBAER,mCACG,QAAQ,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CACjB;wBACE,gCAAK,CAAC,CAAC,SAAS,CAAM;wBACtB,gCAAK,CAAC,CAAC,SAAS,CAAM;wBACtB,gCAAK,CAAC,CAAC,SAAS,CAAM;wBACtB;4BACE,oBAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,KAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,iBAE5D,CACN,CACF,CACN,EAXkB,CAWlB,CAAC,CACI,CACF,CACJ,CACF,CACP,CAAC;IACJ,CAAC;IACH,mBAAC;AAAD,CAAC,AAvED,CAAkC,KAAK,CAAC,SAAS,GAuEhD;;AAED,IAAM,eAAe,GAAG,UAAC,EAAwC;QAAtC,kCAAc,EAAE,sBAAQ;IAAmB,OAAA,CAAC;QACrE,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,aAAa,EAAE,QAAQ,CAAC,aAAa;QACrC,aAAa,EAAE,QAAQ,CAAC,aAAa;KACtC,CAAC;AALoE,CAKpE,CAAC;AAEH,IAAM,kBAAkB,GAAG,EAAE,UAAU,YAAA,EAAE,OAAO,SAAA,EAAE,iBAAiB,mBAAA,EAAE,CAAC;AAKtE,eAAe,OAAO,CACpB,eAAe,EACf,kBAAkB,CACnB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport { Alert, Table, Button } from 'reactstrap';\n\nimport { getSession } from 'app/shared/reducers/authentication';\nimport { IRootState } from 'app/shared/reducers';\nimport { findAll, invalidateSession } from './sessions.reducer';\n\nexport interface ISessionsProps extends StateProps, DispatchProps {}\n\nexport class SessionsPage extends React.Component {\n componentDidMount() {\n this.props.getSession();\n this.props.findAll();\n }\n\n doSessionInvalidation = series => () => {\n this.props.invalidateSession(series);\n this.props.findAll();\n };\n\n refreshList = () => {\n this.props.findAll();\n };\n\n render() {\n const { account, sessions, updateSuccess, updateFailure } = this.props;\n return (\n
\n

\n Active sessions for [{account.login}]\n

\n\n {updateSuccess ? (\n \n Session invalidated!\n \n ) : null}\n\n {updateFailure ? (\n \n \n An error has occured! The session could not be invalidated.\n \n \n ) : null}\n\n \n\n
\n \n \n \n \n \n \n \n \n\n \n {sessions.map(s => (\n \n \n \n \n \n \n ))}\n \n
IP AddressUser agentDate\n
{s.ipAddress}{s.userAgent}{s.tokenDate}\n \n
\n
\n
\n );\n }\n}\n\nconst mapStateToProps = ({ authentication, sessions }: IRootState) => ({\n account: authentication.account,\n sessions: sessions.sessions,\n updateSuccess: sessions.updateSuccess,\n updateFailure: sessions.updateFailure\n});\n\nconst mapDispatchToProps = { getSession, findAll, invalidateSession };\n\ntype StateProps = ReturnType;\ntype DispatchProps = typeof mapDispatchToProps;\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(SessionsPage);\n"]}]}