diff --git a/login-view/src/components/ErrorMessage.js b/login-view/src/components/ErrorMessage.js
index 427e69a0..89e5f3c9 100644
--- a/login-view/src/components/ErrorMessage.js
+++ b/login-view/src/components/ErrorMessage.js
@@ -10,10 +10,12 @@ const useStyles = makeStyles(theme => ({
function ErrorMessage(props) {
const classes = useStyles();
return (
-
- {props.error}
-
+
)
}
+function createMarkup(error) {
+ return {__html: error};
+}
+
export default ErrorMessage;
diff --git a/login-view/src/components/Login.js b/login-view/src/components/Login.js
index b4c61dd9..3cf1d461 100644
--- a/login-view/src/components/Login.js
+++ b/login-view/src/components/Login.js
@@ -158,7 +158,20 @@ function Login() {
})
.catch(error => {
console.log("error=", error);
- setError(error.toString());
+ const data = {
+ email: username,
+ password: password
+ };
+ const cmd = {
+ host: 'lightapi.net',
+ service: 'user',
+ action: 'loginUser',
+ version: '0.1.0',
+ data: data
+ };
+ const url = '/portal/query?cmd=' + encodeURIComponent(JSON.stringify(cmd));
+ const message = 'Login Failed! Click here to identify root cause.'
+ setError(message.replace('link', url));
});
};
diff --git a/login-view/src/setupProxy.js b/login-view/src/setupProxy.js
index 1911e10e..7c1226a8 100644
--- a/login-view/src/setupProxy.js
+++ b/login-view/src/setupProxy.js
@@ -3,4 +3,5 @@ const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use('/oauth2/code', createProxyMiddleware({ target: 'https://localhost:6881', secure: false }));
app.use('/portal/command', createProxyMiddleware({ target: 'https://localhost:8441', secure: false }));
+ app.use('/portal/query', createProxyMiddleware({ target: 'https://localhost:8442', secure: false }));
};