diff --git a/docker-compose.yml b/docker-compose.yml
index d20a6d8c..9fcdbcf5 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -100,6 +100,7 @@ services:
- 9200:9200
networks:
- shuffle
+ # OLD DATABASE:
#database:
# #build: ./backend/database
# image: frikky/shuffle:database
diff --git a/frontend/src/views/AdminSetup.jsx b/frontend/src/views/AdminSetup.jsx
index 275cd5b3..7f0e3a9a 100644
--- a/frontend/src/views/AdminSetup.jsx
+++ b/frontend/src/views/AdminSetup.jsx
@@ -2,9 +2,7 @@
import React, {useState} from 'react';
import { makeStyles } from '@material-ui/styles';
-import TextField from '@material-ui/core/TextField';
-import Button from '@material-ui/core/Button';
-import Paper from '@material-ui/core/Paper';
+import {CircularProgress, TextField, Button, Paper, Typography} from '@material-ui/core'
const bodyDivStyle = {
margin: "auto",
@@ -35,6 +33,7 @@ const AdminAccount = props => {
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [firstRequest, setFirstRequest] = useState(true);
+ const [loginLoading, setLoginLoading] = useState(false);
// Used to swap from login to register. True = login, false = register
const register = true
@@ -81,6 +80,7 @@ const AdminAccount = props => {
}
const onSubmit = (e) => {
+ setLoginLoading(true)
e.preventDefault()
// FIXME - add some check here ROFL
@@ -97,6 +97,7 @@ const AdminAccount = props => {
})
.then(response =>
response.json().then(responseJson => {
+ setLoginLoading(false)
if (responseJson["success"] === false) {
setLoginInfo(responseJson["reason"])
} else {
@@ -106,6 +107,7 @@ const AdminAccount = props => {
}),
)
.catch(error => {
+ setLoginLoading(false)
setLoginInfo("Error in userdata: ", error)
});
}
@@ -161,7 +163,7 @@ const AdminAccount = props => {
id="emailfield"
margin="normal"
variant="outlined"
- onChange={onChangeUser}
+ onChange={onChangeUser}
/>
Password
@@ -191,7 +193,9 @@ const AdminAccount = props => {
/>
-
+
diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx
index 121ee0f1..f79df0e0 100644
--- a/frontend/src/views/AngularWorkflow.jsx
+++ b/frontend/src/views/AngularWorkflow.jsx
@@ -1721,7 +1721,7 @@ const AngularWorkflow = (props) => {
if (data.type === "ACTION") {
var curaction = workflow.actions.find(a => a.id === data.id)
- console.log("INSIDE CURACTION: ", curaction)
+ //console.log("INSIDE CURACTION: ", curaction)
if (!curaction || curaction === undefined) {
//event.target.unselect()
//alert.error("Action not found. Please remake it.")
@@ -1729,7 +1729,7 @@ const AngularWorkflow = (props) => {
}
const curapp = apps.find(a => a.name === curaction.app_name && ((a.app_version === curaction.app_version || (a.loop_versions !== null && a.loop_versions.includes(curaction.app_version)))))
- console.log("APP: ", curapp)
+ //console.log("APP: ", curapp)
if (!curapp || curapp === undefined) {
alert.error(`App ${curaction.app_name}:${curaction.app_version} not found. Is it activated?`)
@@ -1752,7 +1752,7 @@ const AngularWorkflow = (props) => {
//console.log("AUTHENTICATION: ", curapp.authentication)
setRequiresAuthentication(curapp.authentication.required && curapp.authentication.parameters !== undefined && curapp.authentication.parameters !== null)
if (curapp.authentication.required) {
- console.log("App requires auth.")
+ //console.log("App requires auth.")
// Setup auth here :)
const authenticationOptions = []
var findAuthId = ""
@@ -1761,7 +1761,7 @@ const AngularWorkflow = (props) => {
}
var tmpAuth = JSON.parse(JSON.stringify(newAppAuth))
- console.log("FOUND AUTH: ", tmpAuth)
+ //console.log("FOUND AUTH: ", tmpAuth)
//console.log("Checking authentication: ", tmpAuth)
for (var key in tmpAuth) {
@@ -1781,7 +1781,7 @@ const AngularWorkflow = (props) => {
}
}
- console.log("OPTIONS: ", authenticationOptions)
+ //console.log("OPTIONS: ", authenticationOptions)
curaction.authentication = authenticationOptions
//console.log("Authentication: ", authenticationOptions)
if (curaction.selectedAuthentication === null || curaction.selectedAuthentication === undefined || curaction.selectedAuthentication.length === "") {
@@ -1794,11 +1794,8 @@ const AngularWorkflow = (props) => {
}
//setSelectedAction(JSON.parse(JSON.stringify(curaction)))
- console.log("CURAPP: ", curapp, selectedApp)
- if (curapp.id !== selectedApp.id) {
- setSelectedApp(curapp)
- }
-
+ //console.log("CURAPP: ", curapp, selectedApp)
+ setSelectedApp(curapp)
setSelectedAction(curaction)
cy.removeListener('drag')
diff --git a/frontend/src/views/Apps.jsx b/frontend/src/views/Apps.jsx
index 55bcc297..5df39bbc 100644
--- a/frontend/src/views/Apps.jsx
+++ b/frontend/src/views/Apps.jsx
@@ -243,6 +243,9 @@ const Apps = (props) => {
privateapps.push(...invalid)
setApps(privateapps)
+
+ //handleSearchChange(event.target.value)
+ //setCursearch(event.target.value)
setFilteredApps(privateapps)
if (privateapps.length > 0) {
if (selectedApp.id === undefined || selectedApp.id === null) {
@@ -995,26 +998,29 @@ const Apps = (props) => {
}
- {
- handleSearchChange(event.target.value)
- setCursearch(event.target.value)
- }}
- />
+
+ {
+ handleSearchChange(event.target.value)
+ setCursearch(event.target.value)
+ }}
+ />
+
{apps.length > 0 ?
filteredApps.length > 0 ?
diff --git a/frontend/src/views/LoginPage.jsx b/frontend/src/views/LoginPage.jsx
index af60a11d..9f128551 100644
--- a/frontend/src/views/LoginPage.jsx
+++ b/frontend/src/views/LoginPage.jsx
@@ -2,9 +2,7 @@
import React, { useState } from 'react';
import { makeStyles } from '@material-ui/styles';
-import TextField from '@material-ui/core/TextField';
-import Button from '@material-ui/core/Button';
-import Paper from '@material-ui/core/Paper';
+import {CircularProgress, TextField, Button, Paper, Typography} from '@material-ui/core'
import { useTheme } from '@material-ui/core/styles';
@@ -33,6 +31,7 @@ const LoginDialog = props => {
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [firstRequest, setFirstRequest] = useState(true);
+ const [loginLoading, setLoginLoading] = useState(false);
// Used to swap from login to register. True = login, false = register
@@ -69,7 +68,7 @@ const LoginDialog = props => {
}),
)
.catch(error => {
- setLoginInfo("Error logging in: ", error)
+ setLoginInfo("Error logging in - please refresh in a minute: ", error)
})
}
@@ -79,6 +78,7 @@ const LoginDialog = props => {
}
const onSubmit = (e) => {
+ setLoginLoading(true)
e.preventDefault()
setLoginInfo("")
// FIXME - add some check here ROFL
@@ -101,6 +101,7 @@ const LoginDialog = props => {
})
.then(response =>
response.json().then(responseJson => {
+ setLoginLoading(false)
if (responseJson["success"] === false) {
setLoginInfo(responseJson["reason"])
} else {
@@ -116,6 +117,7 @@ const LoginDialog = props => {
}),
)
.catch(error => {
+ setLoginLoading(false)
setLoginInfo("Error logging in: " + error)
});
} else {
@@ -231,8 +233,9 @@ const LoginDialog = props => {
/>
-
-
+
{loginInfo}