mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-22 19:53:49 +01:00
1 line
6.1 KiB
Plaintext
1 line
6.1 KiB
Plaintext
[{"/Users/pveiga/repos/wisemapping-react/src/Footer.js":"1","/Users/pveiga/repos/wisemapping-react/src/Header.js":"2","/Users/pveiga/repos/wisemapping-react/src/index.js":"3","/Users/pveiga/repos/wisemapping-react/src/LoginPage.js":"4"},{"size":1747,"mtime":1606529689598,"results":"5","hashOfConfig":"6"},{"size":1557,"mtime":1606529996629,"results":"7","hashOfConfig":"6"},{"size":702,"mtime":1606578931580,"results":"8","hashOfConfig":"6"},{"size":4158,"mtime":1606534865391,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xegajf",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"16","messages":"17","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"18"},"/Users/pveiga/repos/wisemapping-react/src/Footer.js",[],"/Users/pveiga/repos/wisemapping-react/src/Header.js",[],"/Users/pveiga/repos/wisemapping-react/src/index.js",["19"],"/Users/pveiga/repos/wisemapping-react/src/LoginPage.js",["20","21"],"import React from 'react';\nimport Header from './Header.js';\nimport Footer from './Footer.js';\nimport { createIntl, createIntlCache, FormattedMessage, IntlProvider } from 'react-intl'\n\nclass ConfigStatusMessage extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n enabled: props.enabled\n }\n }\n\n render() {\n return (\n <div class=\"db-warn-msg\">\n <p>\n <FormattedMessage id=\"NO_PRODUCTION_DATABASE_CONFIGURED\" defaultMessage=\"Warning: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL\" description=\"Missing production database configured\" /><a href=\"https://wisemapping.atlassian.net/wiki/display/WS/Database+Configuration\"> here</a>\n </p>\n </div>\n );\n }\n}\n\nclass LoginError extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n errorCode: props.errorCode\n }\n }\n\n render() {\n const errorCode = this.state.errorCode;\n let result;\n if (errorCode) {\n if (errorCode == 3) {\n result = (\n <div class='error'>\n <FormattedMessage id=\"USER_INACTIVE\" defaultMessage=\"Sorry, your account has not been activated yet. You'll receive a notification email when it becomes active. Stay tuned!.\" />\n </div>)\n } else {\n result = (\n <div class='error'>\n <FormattedMessage id=\"LOGIN_ERROR\" defaultMessage=\"The email address or password you entered is incorrect.\" />\n </div>)\n }\n }\n return (<span>{result}</span>);\n }\n}\n\nclass LoginForm extends React.Component {\n constructor(props) {\n super(props);\n\n const errorCode = props.errorCode\n this.state = {\n email: '',\n password: '',\n staySignIn: false,\n errorCode: errorCode\n };\n }\n\n render() {\n return (\n <div class=\"wrapper\">\n <div class=\"content\">\n <h1><FormattedMessage id=\"WELCOME\" defaultMessage=\"Welcome\" /></h1>\n <p><FormattedMessage id=\"LOG_INTO\" defaultMessage=\"Log Into Your Account\" /></p>\n\n <LoginError errorCode={this.state.errorCode} />\n\n <form action=\"/c/perform-login\" method=\"POST\">\n <input type=\"email\" name=\"username\" placeholder={intl.formatMessage({ id: \"EMAIL\", defaultMessage: 'Email' })} value={this.state.value} onChange={this.handleInputChange} required />\n <input type=\"password\" name=\"password\" placeholder={intl.formatMessage({ id: \"PASSWORD\", defaultMessage: 'Password' })} value={this.state.value} onChange={this.handleInputChange} required />\n\n <div>\n <input name=\"_spring_security_remember_me\" id=\"staySignIn\" type=\"checkbox\" />\n <label for=\"staySignIn\"><FormattedMessage id=\"REMEMBER_ME\" defaultMessage=\"Remember me\" /></label>\n </div>\n <input type=\"submit\" value={intl.formatMessage({ id: \"SING_IN\", defaultMessage: 'Sign In' })} />\n </form>\n <a href=\"/c/user/resetPassword\"><FormattedMessage id=\"FORGOT_PASSWORD\" defaultMessage=\"Forgot Password ?\" /></a>\n </div>\n </div>\n );\n }\n}\n\n// Internationalize setup ....\nconst cache = createIntlCache()\n\n// @Todo: Review ...\nvar intl = null;\n\nclass LoginPage extends React.Component {\n constructor(props) {\n super(props);\n\n const messages = props.messages;\n const locale = props.locale;\n const errorCode = props.errorCode\n\n this.state = {\n locale: locale,\n message: messages,\n errorCode: errorCode\n };\n\n intl = createIntl(\n {\n locale: locale,\n defaultLocale: 'en'\n },\n messages,\n cache\n )\n }\n\n render() {\n return (\n <IntlProvider locale={this.state.locale} defaultLocale=\"en\" messages={this.state.messages}>\n <div>\n <Header type='login' />\n <LoginForm errorCode={this.state.errorCode} />\n {/* <ConfigStatusMessage enabled='true' /> */}\n <Footer />\n </div>\n </IntlProvider>\n );\n }\n}\nexport default LoginPage;\n\n",{"ruleId":"22","severity":1,"message":"23","line":22,"column":18,"nodeType":"24","messageId":"25","endLine":22,"endColumn":22},{"ruleId":"26","severity":1,"message":"27","line":6,"column":7,"nodeType":"28","messageId":"29","endLine":6,"endColumn":26},{"ruleId":"30","severity":1,"message":"31","line":37,"column":21,"nodeType":"32","messageId":"25","endLine":37,"endColumn":23},"no-eval","eval can be harmful.","CallExpression","unexpected","no-unused-vars","'ConfigStatusMessage' is defined but never used.","Identifier","unusedVar","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression"] |