Merge branch 'milesflo-master' into 1.0.0
This commit is contained in:
Generated
+13
-13
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "shuffler",
|
"name": "shuffler",
|
||||||
"version": "0.3.0",
|
"version": "0.6.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -3733,9 +3733,9 @@
|
|||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.0.13",
|
"version": "14.0.24",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.24.tgz",
|
||||||
"integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA=="
|
"integrity": "sha512-btt/oNOiDWcSuI721MdL8VQGnjsKjlTMdrKyTcLCKeQp/n4AAMFJ961wMbp+09y8WuGPClDEv07RIItdXKIXAA=="
|
||||||
},
|
},
|
||||||
"@types/object-assign": {
|
"@types/object-assign": {
|
||||||
"version": "4.0.30",
|
"version": "4.0.30",
|
||||||
@@ -3748,9 +3748,9 @@
|
|||||||
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
|
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
|
||||||
},
|
},
|
||||||
"@types/prop-types": {
|
"@types/prop-types": {
|
||||||
"version": "15.7.1",
|
"version": "15.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
|
||||||
"integrity": "sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg=="
|
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
|
||||||
},
|
},
|
||||||
"@types/q": {
|
"@types/q": {
|
||||||
"version": "1.5.4",
|
"version": "1.5.4",
|
||||||
@@ -3758,9 +3758,9 @@
|
|||||||
"integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug=="
|
"integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug=="
|
||||||
},
|
},
|
||||||
"@types/react": {
|
"@types/react": {
|
||||||
"version": "16.8.20",
|
"version": "16.9.43",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.8.20.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.43.tgz",
|
||||||
"integrity": "sha512-ZLmI+ubSJpfUIlQuULDDrdyuFQORBuGOvNnMue8HeA0GVrAJbWtZQhcBvnBPNRBI/GrfSfrKPFhthzC2SLEtLQ==",
|
"integrity": "sha512-PxshAFcnJqIWYpJbLPriClH53Z2WlJcVZE+NP2etUtWQs2s7yIMj3/LDKZT/5CHJ/F62iyjVCDu2H3jHEXIxSg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/prop-types": "*",
|
"@types/prop-types": "*",
|
||||||
"csstype": "^2.2.0"
|
"csstype": "^2.2.0"
|
||||||
@@ -11944,9 +11944,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "4.17.15",
|
"version": "4.17.19",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||||
},
|
},
|
||||||
"lodash._reinterpolate": {
|
"lodash._reinterpolate": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
|
|||||||
@@ -1,170 +0,0 @@
|
|||||||
import React, {useState, useEffect} from 'react';
|
|
||||||
|
|
||||||
import {Route} from 'react-router';
|
|
||||||
import {BrowserRouter} from 'react-router-dom';
|
|
||||||
import { CookiesProvider } from 'react-cookie';
|
|
||||||
import { useCookies } from 'react-cookie';
|
|
||||||
|
|
||||||
import EditSchedule from "./EditSchedule";
|
|
||||||
import Schedules from "./Schedules";
|
|
||||||
import Webhooks from "./Webhooks";
|
|
||||||
import Workflows from "./Workflows";
|
|
||||||
import EditWebhook from "./EditWebhook";
|
|
||||||
import AngularWorkflow from "./AngularWorkflow";
|
|
||||||
import ForgotPassword from "./ForgotPassword";
|
|
||||||
import ForgotPasswordLink from "./ForgotPasswordLink";
|
|
||||||
|
|
||||||
import Header from './Header';
|
|
||||||
import Apps from './Apps';
|
|
||||||
import AppCreator from './AppCreator';
|
|
||||||
import Contact from './Contact';
|
|
||||||
import Oauth2 from './Oauth2';
|
|
||||||
import About from "./About";
|
|
||||||
import Post from "./Post";
|
|
||||||
import Dashboard from "./Dashboard";
|
|
||||||
import AdminSetup from "./AdminSetup";
|
|
||||||
import Admin from "./Admin";
|
|
||||||
import Docs from "./Docs";
|
|
||||||
import RegisterLink from "./RegisterLink";
|
|
||||||
import LandingPage from "./Landingpage";
|
|
||||||
import LandingPageNew from "./LandingpageNew";
|
|
||||||
import LoginPage from "./LoginPage";
|
|
||||||
import SettingsPage from "./SettingsPage";
|
|
||||||
|
|
||||||
//import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
|
|
||||||
import { createMuiTheme, ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';
|
|
||||||
|
|
||||||
import AlertTemplate from "react-alert-template-basic";
|
|
||||||
import { positions, Provider } from "react-alert";
|
|
||||||
|
|
||||||
// Production - backend proxy forwarding in nginx
|
|
||||||
var globalUrl = window.location.origin
|
|
||||||
|
|
||||||
// CORS used for testing purposes. Should only happen with specific port and http
|
|
||||||
if (window.location.protocol == "http:" && window.location.port === "3000") {
|
|
||||||
globalUrl = "http://localhost:5001"
|
|
||||||
}
|
|
||||||
|
|
||||||
const surfaceColor = "#27292D"
|
|
||||||
const inputColor = "#383B40"
|
|
||||||
|
|
||||||
const theme = createMuiTheme({
|
|
||||||
palette: {
|
|
||||||
primary: {
|
|
||||||
main: "#f85a3e"
|
|
||||||
},
|
|
||||||
secondary: {
|
|
||||||
main: '#e8eaf6',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
typography: {
|
|
||||||
useNextVariants: true
|
|
||||||
},
|
|
||||||
overrides: {
|
|
||||||
MuiMenu: {
|
|
||||||
list: {
|
|
||||||
backgroundColor: inputColor,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// FIXME - set client side cookies
|
|
||||||
const App = (message, props) => {
|
|
||||||
const [userdata, setUserData] = useState({});
|
|
||||||
//const [homePage, ] = useState(true);
|
|
||||||
const [cookies, setCookie, removeCookie] = useCookies([]);
|
|
||||||
const [isLoggedIn, setIsLoggedIn] = useState(false);
|
|
||||||
const [dataset, setDataset] = useState(false);
|
|
||||||
const [isLoaded, setIsLoaded] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (dataset === false) {
|
|
||||||
checkLogin()
|
|
||||||
setDataset(true)
|
|
||||||
}})
|
|
||||||
|
|
||||||
if (isLoaded && !isLoggedIn && (!window.location.pathname.startsWith("/login") && (!window.location.pathname.startsWith("/docs") && (!window.location.pathname.startsWith("/adminsetup"))))) {
|
|
||||||
window.location = "/login"
|
|
||||||
}
|
|
||||||
|
|
||||||
const checkLogin = () => {
|
|
||||||
var baseurl = globalUrl
|
|
||||||
fetch(baseurl+"/api/v1/users/getinfo", {
|
|
||||||
credentials: "include",
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(responseJson => {
|
|
||||||
if (responseJson.success === true) {
|
|
||||||
console.log(responseJson)
|
|
||||||
setUserData(responseJson)
|
|
||||||
setIsLoggedIn(true)
|
|
||||||
|
|
||||||
// Updating cookie every request
|
|
||||||
for (var key in responseJson["cookies"]) {
|
|
||||||
setCookie(responseJson["cookies"][key].key, responseJson["cookies"][key].value, {path: "/"})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setIsLoaded(true)
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
setIsLoaded(true)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dumb for content load (per now), but good for making the site not suddenly reload parts (ajax thingies)
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
timeout: 5000,
|
|
||||||
position: positions.BOTTOM_CENTER
|
|
||||||
};
|
|
||||||
|
|
||||||
const includedData = window.location.pathname === "/home" || window.location.pathname === "/features" ?
|
|
||||||
<div>
|
|
||||||
<Route exact path="/home" render={props => <LandingPageNew isLoaded={isLoaded} {...props} /> } />
|
|
||||||
</div> :
|
|
||||||
<div style={{backgroundColor: "#1F2023", color: "rgba(255, 255, 255, 0.65)", minHeight: "100vh"}}>
|
|
||||||
<Header removeCookie={removeCookie} surfaceColor={surfaceColor} inputColor={inputColor} userdata={userdata} isLoaded={isLoaded} globalUrl={globalUrl} setIsLoggedIn={setIsLoggedIn} isLoggedIn={isLoggedIn} surfaceColor={surfaceColor} inputColor={inputColor}{...props} />
|
|
||||||
<Route exact path="/oauth2" render={props => <Oauth2 isLoaded={isLoaded} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor}{...props} /> } />
|
|
||||||
<Route exact path="/contact" render={props => <Contact isLoaded={isLoaded} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/login" render={props => <LoginPage isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/admin" render={props => <Admin isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/settings" render={props => <SettingsPage isLoaded={isLoaded} userdata={userdata} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/AdminSetup" render={props => <AdminSetup isLoaded={isLoaded} userdata={userdata} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/webhooks" render={props => <Webhooks isLoaded={isLoaded} globalUrl={globalUrl} {...props} /> } />
|
|
||||||
<Route exact path="/webhooks/:key" render={props => <EditWebhook isLoaded={isLoaded} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/schedules" render={props => <Schedules globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/dashboard" render={props => <Dashboard isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/apps" render={props => <Apps isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/apps/new" render={props => <AppCreator isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/apps/edit/:appid" render={props => <AppCreator isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/schedules/:key" render={props => <EditSchedule globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor} {...props} /> } />
|
|
||||||
<Route exact path="/workflows" render={props => <Workflows isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} cookies={cookies} surfaceColor={surfaceColor} inputColor={inputColor}{...props} /> } />
|
|
||||||
<Route exact path="/workflows/:key" render={props => <AngularWorkflow globalUrl={globalUrl} isLoaded={isLoaded} isLoggedIn={isLoggedIn} surfaceColor={surfaceColor} inputColor={inputColor}{...props} /> } />
|
|
||||||
<Route exact path="/docs/:key" render={props => <Docs isLoaded={isLoaded} globalUrl={globalUrl} surfaceColor={surfaceColor} inputColor={inputColor}{...props} /> } />
|
|
||||||
<Route exact path="/docs" render={props => {window.location.pathname = "/docs/about"}} />
|
|
||||||
<Route exact path="/" render={props => {window.location.pathname = "/login"}} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
// <div style={{backgroundColor: "rgba(21, 32, 43, 1)", color: "#fffff", minHeight: "100vh"}}>
|
|
||||||
// backgroundColor: "#213243",
|
|
||||||
// This is a mess hahahah
|
|
||||||
return (
|
|
||||||
<MuiThemeProvider theme={theme}>
|
|
||||||
<CookiesProvider>
|
|
||||||
<BrowserRouter>
|
|
||||||
<Provider template={AlertTemplate} {...options}>
|
|
||||||
{includedData}
|
|
||||||
</Provider>
|
|
||||||
</BrowserRouter>
|
|
||||||
</CookiesProvider>
|
|
||||||
</MuiThemeProvider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
|
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
|
import { Route } from 'react-router';
|
||||||
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
|
import { CookiesProvider } from 'react-cookie';
|
||||||
|
import { useCookies } from 'react-cookie';
|
||||||
|
|
||||||
|
import EditSchedule from "./views/EditSchedule";
|
||||||
|
import Schedules from "./views/Schedules";
|
||||||
|
import Webhooks from "./views/Webhooks";
|
||||||
|
import Workflows from "./views/Workflows";
|
||||||
|
import EditWebhook from "./views/EditWebhook";
|
||||||
|
import AngularWorkflow from "./views/AngularWorkflow";
|
||||||
|
|
||||||
|
import Header from './components/Header';
|
||||||
|
import Apps from './views/Apps';
|
||||||
|
import AppCreator from './views/AppCreator';
|
||||||
|
import Contact from './views/Contact';
|
||||||
|
import Oauth2 from './views/Oauth2';
|
||||||
|
import Dashboard from "./views/Dashboard";
|
||||||
|
import AdminSetup from "./views/AdminSetup";
|
||||||
|
import Admin from "./views/Admin";
|
||||||
|
import Docs from "./views/Docs";
|
||||||
|
import LandingPageNew from "./views/LandingpageNew";
|
||||||
|
import LoginPage from "./views/LoginPage";
|
||||||
|
import SettingsPage from "./views/SettingsPage";
|
||||||
|
|
||||||
|
import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
|
||||||
|
|
||||||
|
import AlertTemplate from "react-alert-template-basic";
|
||||||
|
import { positions, Provider } from "react-alert";
|
||||||
|
|
||||||
|
// Production - backend proxy forwarding in nginx
|
||||||
|
var globalUrl = window.location.origin
|
||||||
|
|
||||||
|
// CORS used for testing purposes. Should only happen with specific port and http
|
||||||
|
if (window.location.protocol == "http:" && window.location.port === "3000") {
|
||||||
|
globalUrl = "http://localhost:5001"
|
||||||
|
}
|
||||||
|
|
||||||
|
const theme = createMuiTheme({
|
||||||
|
palette: {
|
||||||
|
primary: {
|
||||||
|
main: "#f85a3e"
|
||||||
|
},
|
||||||
|
secondary: {
|
||||||
|
main: '#e8eaf6',
|
||||||
|
},
|
||||||
|
surfaceColor: "#27292d",
|
||||||
|
inputColor: "#383B40"
|
||||||
|
},
|
||||||
|
typography: {
|
||||||
|
useNextVariants: true
|
||||||
|
},
|
||||||
|
overrides: {
|
||||||
|
MuiMenu: {
|
||||||
|
list: {
|
||||||
|
backgroundColor: "#383B40",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// FIXME - set client side cookies
|
||||||
|
const App = (message, props) => {
|
||||||
|
const [userdata, setUserData] = useState({});
|
||||||
|
//const [homePage, ] = useState(true);
|
||||||
|
const [cookies, setCookie, removeCookie] = useCookies([]);
|
||||||
|
const [isLoggedIn, setIsLoggedIn] = useState(false);
|
||||||
|
const [dataset, setDataset] = useState(false);
|
||||||
|
const [isLoaded, setIsLoaded] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (dataset === false) {
|
||||||
|
checkLogin()
|
||||||
|
setDataset(true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (isLoaded && !isLoggedIn && (!window.location.pathname.startsWith("/login") && (!window.location.pathname.startsWith("/docs") && (!window.location.pathname.startsWith("/adminsetup"))))) {
|
||||||
|
window.location = "/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkLogin = () => {
|
||||||
|
var baseurl = globalUrl
|
||||||
|
fetch(baseurl + "/api/v1/users/getinfo", {
|
||||||
|
credentials: "include",
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(responseJson => {
|
||||||
|
if (responseJson.success === true) {
|
||||||
|
setUserData(responseJson)
|
||||||
|
setIsLoggedIn(true)
|
||||||
|
|
||||||
|
// Updating cookie every request
|
||||||
|
for (var key in responseJson["cookies"]) {
|
||||||
|
setCookie(responseJson["cookies"][key].key, responseJson["cookies"][key].value, { path: "/" })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setIsLoaded(true)
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
setIsLoaded(true)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dumb for content load (per now), but good for making the site not suddenly reload parts (ajax thingies)
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
timeout: 5000,
|
||||||
|
position: positions.BOTTOM_CENTER
|
||||||
|
};
|
||||||
|
|
||||||
|
const includedData = window.location.pathname === "/home" || window.location.pathname === "/features" ?
|
||||||
|
<div>
|
||||||
|
<Route exact path="/home" render={props => <LandingPageNew isLoaded={isLoaded} {...props} />} />
|
||||||
|
</div> :
|
||||||
|
<div style={{ backgroundColor: "#1F2023", color: "rgba(255, 255, 255, 0.65)", minHeight: "100vh" }}>
|
||||||
|
<Header removeCookie={removeCookie} isLoaded={isLoaded} globalUrl={globalUrl} setIsLoggedIn={setIsLoggedIn} isLoggedIn={isLoggedIn} {...props} />
|
||||||
|
<Route exact path="/oauth2" render={props => <Oauth2 isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/contact" render={props => <Contact isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/login" render={props => <LoginPage isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} />
|
||||||
|
<Route exact path="/admin" render={props => <Admin isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} />
|
||||||
|
<Route exact path="/settings" render={props => <SettingsPage isLoaded={isLoaded} userdata={userdata} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/AdminSetup" render={props => <AdminSetup isLoaded={isLoaded} userdata={userdata} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/webhooks" render={props => <Webhooks isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/webhooks/:key" render={props => <EditWebhook isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/schedules" render={props => <Schedules globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/dashboard" render={props => <Dashboard isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/apps" render={props => <Apps isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/apps/new" render={props => <AppCreator isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/apps/edit/:appid" render={props => <AppCreator isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/schedules/:key" render={props => <EditSchedule globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/workflows" render={props => <Workflows isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} cookies={cookies} {...props} />} />
|
||||||
|
<Route exact path="/workflows/:key" render={props => <AngularWorkflow globalUrl={globalUrl} isLoaded={isLoaded} isLoggedIn={isLoggedIn} {...props} />} />
|
||||||
|
<Route exact path="/docs/:key" render={props => <Docs isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||||
|
<Route exact path="/docs" render={props => { window.location.pathname = "/docs/about" }} />
|
||||||
|
<Route exact path="/" render={props => { window.location.pathname = "/login" }} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
// <div style={{backgroundColor: "rgba(21, 32, 43, 1)", color: "#fffff", minHeight: "100vh"}}>
|
||||||
|
// backgroundColor: "#213243",
|
||||||
|
// This is a mess hahahah
|
||||||
|
return (
|
||||||
|
<MuiThemeProvider theme={theme}>
|
||||||
|
<CookiesProvider>
|
||||||
|
<BrowserRouter>
|
||||||
|
<Provider template={AlertTemplate} {...options}>
|
||||||
|
{includedData}
|
||||||
|
</Provider>
|
||||||
|
</BrowserRouter>
|
||||||
|
</CookiesProvider>
|
||||||
|
</MuiThemeProvider>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
|
|
||||||
const Flows = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1>Flows</h1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Built to suit any organization
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
WAT
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Flows;
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
|
|
||||||
const Hooks = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1>Hooks</h1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Built to suit any organization
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
WAT
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Hooks;
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
|
|
||||||
const Schedules = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1>Schedules</h1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Built to suit any organization
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
WAT
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Schedules;
|
|
||||||
@@ -194,7 +194,7 @@ const Header = props => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{userdata.orgs.length <= 1 ? null :
|
{userdata === undefined || userdata.orgs.length <= 1 ? null :
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<Select
|
<Select
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const hrefStyle = {
|
const hrefStyle = {
|
||||||
color: "#f85a3e",
|
color: "#f85a3e",
|
||||||
textDecoration: "none"
|
textDecoration: "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,17 +12,17 @@ const About = () => {
|
|||||||
<h1>About</h1>
|
<h1>About</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Endao was started as a project in late 2018 as a free service to analyze APK (and soon IPA) files for vulnerabilities. The project was started after I,
|
Endao was started as a project in late 2018 as a free service to analyze APK (and soon IPA) files for vulnerabilities. The project was started after I,
|
||||||
<a href="https://twitter.com/frikkylikeme" style={hrefStyle}>@frikkylikeme</a>
|
<a href="https://twitter.com/frikkylikeme" style={hrefStyle}>@frikkylikeme</a>
|
||||||
, found multiple vulnerabilities in IoT devices based purely on their apps. As I wanted to learn more about these kind of vulnerabilities, I looked for solutions that work for my purpose, but didn't find any good, free and easy to use service - hence this site was born.
|
, found multiple vulnerabilities in IoT devices based purely on their apps. As I wanted to learn more about these kind of vulnerabilities, I looked for solutions that work for my purpose, but didn't find any good, free and easy to use service - hence this site was born.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
My personal goal has and will always be to make the internet safer. As the IoT sphere grows, I want to be able to add ways of finding possible vulnerabilities fast to this website. This will hopefully include blogposts when I get around to it, as well as actual implementations. The vulnerability discovery field is in no way new, but I'll try my best to add whatever I can to it. As a disclaimer, I'm an "Ops" person, and I had never done frontend before creating this site. This is as much of a learning project within web development as it is in vulnerability discovery.
|
My personal goal has and will always be to make the internet safer. As the IoT sphere grows, I want to be able to add ways of finding possible vulnerabilities fast to this website. This will hopefully include blogposts when I get around to it, as well as actual implementations. The vulnerability discovery field is in no way new, but I'll try my best to add whatever I can to it. As a disclaimer, I'm an "Ops" person, and I had never done frontend before creating this site. This is as much of a learning project within web development as it is in vulnerability discovery.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This site currently uses the following projects
|
This site currently uses the following projects
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a style={hrefStyle} href="https://superanalyzer.rocks">SUPER Android Analyzer</a></li>
|
<li><a style={hrefStyle} href="https://superanalyzer.rocks">SUPER Android Analyzer</a></li>
|
||||||
@@ -34,8 +34,8 @@ const About = () => {
|
|||||||
<p>Hopefully it is of use to some people :)</p>
|
<p>Hopefully it is of use to some people :)</p>
|
||||||
|
|
||||||
<h3>Thanks</h3>
|
<h3>Thanks</h3>
|
||||||
<p>
|
<p>
|
||||||
Thanks to Andy for the initial frontend help :)
|
Thanks to Andy for the initial frontend help :)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>Regards</h3>
|
<h3>Regards</h3>
|
||||||
@@ -68,8 +68,7 @@ import CytoscapeComponent from 'react-cytoscapejs';
|
|||||||
import undoRedo from 'cytoscape-undo-redo';
|
import undoRedo from 'cytoscape-undo-redo';
|
||||||
import Draggable from 'react-draggable';
|
import Draggable from 'react-draggable';
|
||||||
|
|
||||||
import environmentdata from './environmentdata';
|
import cytoscapestyle from '../defaultCytoscapeStyle';
|
||||||
import cytoscapestyle from './defaultCytoscapeStyle';
|
|
||||||
import cxtmenu from 'cytoscape-cxtmenu';
|
import cxtmenu from 'cytoscape-cxtmenu';
|
||||||
|
|
||||||
import { w3cwebsocket as W3CWebSocket } from "websocket";
|
import { w3cwebsocket as W3CWebSocket } from "websocket";
|
||||||
@@ -4779,7 +4778,7 @@ const AngularWorkflow = (props) => {
|
|||||||
<Divider style={{backgroundColor: "white", marginTop: 10, marginBottom: 10,}}/>
|
<Divider style={{backgroundColor: "white", marginTop: 10, marginBottom: 10,}}/>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
style={{marginBottom: 15, color: "white",}}
|
style={{marginBottom: 15, color: "white",}}
|
||||||
label=<div style={{color: "white"}}>Exit on Error</div>
|
label={<div style={{color: "white"}}>Exit on Error</div>}
|
||||||
control={
|
control={
|
||||||
<Switch checked={workflow.configuration.exit_on_error} onChange={() => {
|
<Switch checked={workflow.configuration.exit_on_error} onChange={() => {
|
||||||
workflow.configuration.exit_on_error = !workflow.configuration.exit_on_error
|
workflow.configuration.exit_on_error = !workflow.configuration.exit_on_error
|
||||||
@@ -4791,7 +4790,7 @@ const AngularWorkflow = (props) => {
|
|||||||
/>
|
/>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
style={{marginBottom: 15, color: "white",}}
|
style={{marginBottom: 15, color: "white",}}
|
||||||
label=<div style={{color: "white"}}>Start from top</div>
|
label={<div style={{color: "white"}}>Start from top</div>}
|
||||||
control={
|
control={
|
||||||
<Switch checked={workflow.configuration.start_from_top} onChange={() => {
|
<Switch checked={workflow.configuration.start_from_top} onChange={() => {
|
||||||
workflow.configuration.start_from_top = !workflow.configuration.start_from_top
|
workflow.configuration.start_from_top = !workflow.configuration.start_from_top
|
||||||
@@ -5119,7 +5118,7 @@ const AngularWorkflow = (props) => {
|
|||||||
<h2>Executing Workflow</h2>
|
<h2>Executing Workflow</h2>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
style={{color: "white", marginBottom: "0px", marginTop: "10px"}}
|
style={{color: "white", marginBottom: "0px", marginTop: "10px"}}
|
||||||
label=<div style={{color: "white"}}>Show failed / skipped actions</div>
|
label={<div style={{color: "white"}}>Show failed / skipped actions</div>}
|
||||||
control={
|
control={
|
||||||
<Switch checked={showSkippedActions} onChange={() => {setShowSkippedActions(!showSkippedActions)}} />
|
<Switch checked={showSkippedActions} onChange={() => {setShowSkippedActions(!showSkippedActions)}} />
|
||||||
}
|
}
|
||||||
@@ -654,7 +654,7 @@ const Apps = (props) => {
|
|||||||
{isLoading ? <CircularProgress style={{marginTop: 13, marginRight: 15}} /> : null}
|
{isLoading ? <CircularProgress style={{marginTop: 13, marginRight: 15}} /> : null}
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
style={{color: "white", marginBottom: "0px", marginTop: "10px"}}
|
style={{color: "white", marginBottom: "0px", marginTop: "10px"}}
|
||||||
label=<div style={{color: "white"}}>Search OpenAPI</div>
|
label={<div style={{color: "white"}}>Search OpenAPI</div>}
|
||||||
control={<Switch checked={searchBackend} onChange={() => {
|
control={<Switch checked={searchBackend} onChange={() => {
|
||||||
handleSearchChange("")
|
handleSearchChange("")
|
||||||
setSearchBackend(!searchBackend)}
|
setSearchBackend(!searchBackend)}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
import React, {useState} from 'react';
|
import React, { useState } from 'react';
|
||||||
import {BrowserView, MobileView} from "react-device-detect";
|
import { BrowserView, MobileView } from "react-device-detect";
|
||||||
|
|
||||||
import Paper from '@material-ui/core/Paper';
|
import Paper from '@material-ui/core/Paper';
|
||||||
import Button from '@material-ui/core/Button';
|
import Button from '@material-ui/core/Button';
|
||||||
|
|
||||||
import TextField from '@material-ui/core/TextField';
|
import TextField from '@material-ui/core/TextField';
|
||||||
|
|
||||||
|
import { useTheme } from '@material-ui/core/styles';
|
||||||
|
|
||||||
const bodyDivStyle = {
|
const bodyDivStyle = {
|
||||||
margin: "auto",
|
margin: "auto",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
@@ -13,11 +15,11 @@ const bodyDivStyle = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Should be different if logged in :|
|
// Should be different if logged in :|
|
||||||
const Contact = (props) => {
|
const Contact = (props) => {
|
||||||
const { globalUrl, isLoaded, surfaceColor, inputColor } = props;
|
const { globalUrl, isLoaded } = props;
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const boxStyle = {
|
const boxStyle = {
|
||||||
flex: "1",
|
flex: "1",
|
||||||
@@ -27,24 +29,24 @@ const Contact = (props) => {
|
|||||||
paddingRight: "30px",
|
paddingRight: "30px",
|
||||||
paddingBottom: "30px",
|
paddingBottom: "30px",
|
||||||
paddingTop: "30px",
|
paddingTop: "30px",
|
||||||
backgroundColor: surfaceColor,
|
backgroundColor: theme.palette.surfaceColor,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column"
|
flexDirection: "column"
|
||||||
}
|
}
|
||||||
|
|
||||||
const bodyTextStyle = {
|
const bodyTextStyle = {
|
||||||
color: "#ffffff",
|
color: "#ffffff",
|
||||||
}
|
}
|
||||||
|
|
||||||
const [firstname, setFirstname] = useState("");
|
const [firstname, setFirstname] = useState("");
|
||||||
const [lastname, setLastname] = useState("");
|
const [lastname, setLastname] = useState("");
|
||||||
const [title, setTitle] = useState("");
|
const [title, setTitle] = useState("");
|
||||||
const [companyname, setCompanyname] = useState("");
|
const [companyname, setCompanyname] = useState("");
|
||||||
const [email, setEmail] = useState("");
|
const [email, setEmail] = useState("");
|
||||||
const [phone, setPhone] = useState("");
|
const [phone, setPhone] = useState("");
|
||||||
const [message, setMessage] = useState("");
|
const [message, setMessage] = useState("");
|
||||||
|
|
||||||
const [formMessage, setFormMessage] = useState("");
|
const [formMessage, setFormMessage] = useState("");
|
||||||
|
|
||||||
const submitContact = () => {
|
const submitContact = () => {
|
||||||
const data = {
|
const data = {
|
||||||
@@ -58,43 +60,43 @@ const Contact = (props) => {
|
|||||||
}
|
}
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
|
||||||
fetch(globalUrl+"/api/v1/contact", {
|
fetch(globalUrl + "/api/v1/contact", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.success === true) {
|
if (response.success === true) {
|
||||||
setFormMessage(response.message)
|
setFormMessage(response.message)
|
||||||
} else {
|
} else {
|
||||||
setFormMessage("Something went wrong. Please contact frikky@shuffler.io.")
|
setFormMessage("Something went wrong. Please contact frikky@shuffler.io.")
|
||||||
}
|
}
|
||||||
console.log(response)
|
console.log(response)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Random names for type & autoComplete. Didn't research :^)
|
// Random names for type & autoComplete. Didn't research :^)
|
||||||
const landingpageDataBrowser =
|
const landingpageDataBrowser =
|
||||||
<div>
|
<div>
|
||||||
<div style={bodyTextStyle}>
|
<div style={bodyTextStyle}>
|
||||||
<h3 style={{color: "#f85a3e"}}>Contact us</h3>
|
<h3 style={{ color: "#f85a3e" }}>Contact us</h3>
|
||||||
<h2>Lets talk!</h2>
|
<h2>Lets talk!</h2>
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: "flex"}}>
|
<div style={{ display: "flex" }}>
|
||||||
<Paper style={boxStyle}>
|
<Paper style={boxStyle}>
|
||||||
<h2>Contact Details</h2>
|
<h2>Contact Details</h2>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{ flex: "1", display: "flex", flexDirection: "row" }}>
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
style={{flex: "1", marginRight: "15px", backgroundColor: inputColor}}
|
style={{ flex: "1", marginRight: "15px", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -102,16 +104,16 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="First Name"
|
placeholder="First Name"
|
||||||
type="firstname"
|
type="firstname"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="firstname"
|
autoComplete="firstname"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setFirstname(e.target.value)}
|
onChange={e => setFirstname(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{flex: "1", marginLeft: "15px", backgroundColor: inputColor}}
|
style={{ flex: "1", marginLeft: "15px", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -119,18 +121,18 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="Last Name"
|
placeholder="Last Name"
|
||||||
type="lastname"
|
type="lastname"
|
||||||
id="standard"
|
id="standard"
|
||||||
autoComplete="lastname"
|
autoComplete="lastname"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setLastname(e.target.value)}
|
onChange={e => setLastname(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{ flex: "1", display: "flex", flexDirection: "row" }}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{flex: "1", marginRight: "15px", backgroundColor: inputColor}}
|
style={{ flex: "1", marginRight: "15px", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -138,16 +140,16 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="Job Title"
|
placeholder="Job Title"
|
||||||
type="jobtitle"
|
type="jobtitle"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="jobtitle"
|
autoComplete="jobtitle"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setTitle(e.target.value)}
|
onChange={e => setTitle(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{flex: "1", marginLeft: "15px", backgroundColor: inputColor}}
|
style={{ flex: "1", marginLeft: "15px", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -155,19 +157,19 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
type="companyname"
|
type="companyname"
|
||||||
placeholder="Company Name"
|
placeholder="Company Name"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="companyname"
|
autoComplete="companyname"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setCompanyname(e.target.value)}
|
onChange={e => setCompanyname(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{ flex: "1", display: "flex", flexDirection: "row" }}>
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
style={{flex: "1", marginRight: "15px", backgroundColor: inputColor}}
|
style={{ flex: "1", marginRight: "15px", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -175,16 +177,16 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
type="email"
|
type="email"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="email"
|
autoComplete="email"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setEmail(e.target.value)}
|
onChange={e => setEmail(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{flex: "1", marginLeft: "15px", backgroundColor: inputColor}}
|
style={{ flex: "1", marginLeft: "15px", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -192,64 +194,64 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
type="phone"
|
type="phone"
|
||||||
placeholder="Phone number"
|
placeholder="Phone number"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="phone"
|
autoComplete="phone"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setPhone(e.target.value)}
|
onChange={e => setPhone(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: 1}}>
|
<div style={{ flex: 1 }}>
|
||||||
<h2>Message</h2>
|
<h2>Message</h2>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: 4}}>
|
<div style={{ flex: 4 }}>
|
||||||
<TextField
|
<TextField
|
||||||
multiline
|
multiline
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
color="primary"
|
color="primary"
|
||||||
style={{flex: "1", backgroundColor: inputColor}}
|
style={{ flex: "1", backgroundColor: theme.palette.inputColor }}
|
||||||
rows="6"
|
rows="6"
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="What can we help you with?"
|
placeholder="What can we help you with?"
|
||||||
id="filled-multiline-static"
|
id="filled-multiline-static"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setMessage(e.target.value)}
|
onChange={e => setMessage(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
disabled={email.length <= 0 || message.length <= 0}
|
disabled={email.length <= 0 || message.length <= 0}
|
||||||
style={{width: "100%", height: "60px", marginTop: "10px"}}
|
style={{ width: "100%", height: "60px", marginTop: "10px" }}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={submitContact}
|
onClick={submitContact}
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
<h3>{formMessage}</h3>
|
<h3>{formMessage}</h3>
|
||||||
</Paper>
|
</Paper>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
const landingpageDataMobile =
|
const landingpageDataMobile =
|
||||||
<div style={{paddingBottom: "50px"}}>
|
<div style={{ paddingBottom: "50px" }}>
|
||||||
<div style={{color: "white", textAlign: "center"}}>
|
<div style={{ color: "white", textAlign: "center" }}>
|
||||||
<h3 style={{color: "#f85a3e"}}>Contact us</h3>
|
<h3 style={{ color: "#f85a3e" }}>Contact us</h3>
|
||||||
<h2>Lets talk!</h2>
|
<h2>Lets talk!</h2>
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: "flex"}}>
|
<div style={{ display: "flex" }}>
|
||||||
<Paper style={boxStyle}>
|
<Paper style={boxStyle}>
|
||||||
<h2>Contact Details</h2>
|
<h2>Contact Details</h2>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{ flex: "1", display: "flex", flexDirection: "row" }}>
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
style={{flex: "1", backgroundColor: inputColor}}
|
style={{ flex: "1", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -257,19 +259,19 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="Name"
|
placeholder="Name"
|
||||||
type="firstname"
|
type="firstname"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="firstname"
|
autoComplete="firstname"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setFirstname(e.target.value)}
|
onChange={e => setFirstname(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{ flex: "1", display: "flex", flexDirection: "row" }}>
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
style={{flex: "1", backgroundColor: inputColor}}
|
style={{ flex: "1", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -277,22 +279,22 @@ const Contact = (props) => {
|
|||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
type="email"
|
type="email"
|
||||||
id="standard-required"
|
id="standard-required"
|
||||||
autoComplete="email"
|
autoComplete="email"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setEmail(e.target.value)}
|
onChange={e => setEmail(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: 1}}>
|
<div style={{ flex: 1 }}>
|
||||||
<h2>Message</h2>
|
<h2>Message</h2>
|
||||||
</div>
|
</div>
|
||||||
<div style={{flex: 4}}>
|
<div style={{ flex: 4 }}>
|
||||||
<TextField
|
<TextField
|
||||||
multiline
|
multiline
|
||||||
style={{flex: "1", backgroundColor: inputColor}}
|
style={{ flex: "1", backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style: {
|
||||||
color: "white",
|
color: "white",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -303,17 +305,17 @@ const Contact = (props) => {
|
|||||||
id="filled-multiline-static"
|
id="filled-multiline-static"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={e => setMessage(e.target.value)}
|
onChange={e => setMessage(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
disabled={email.length <= 0 || message.length <= 0}
|
disabled={email.length <= 0 || message.length <= 0}
|
||||||
style={{width: "100%", height: "60px", marginTop: "10px"}}
|
style={{ width: "100%", height: "60px", marginTop: "10px" }}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={submitContact}
|
onClick={submitContact}
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
<h3>{formMessage}</h3>
|
<h3>{formMessage}</h3>
|
||||||
</Paper>
|
</Paper>
|
||||||
@@ -321,7 +323,7 @@ const Contact = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
const loadedCheck = isLoaded ?
|
const loadedCheck = isLoaded ?
|
||||||
<div>
|
<div>
|
||||||
<BrowserView>
|
<BrowserView>
|
||||||
<div style={bodyDivStyle}>{landingpageDataBrowser}</div>
|
<div style={bodyDivStyle}>{landingpageDataBrowser}</div>
|
||||||
@@ -334,7 +336,7 @@ const Contact = (props) => {
|
|||||||
<div>
|
<div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
return(
|
return (
|
||||||
<div>
|
<div>
|
||||||
{loadedCheck}
|
{loadedCheck}
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,7 @@ import {
|
|||||||
chartExample2,
|
chartExample2,
|
||||||
chartExample3,
|
chartExample3,
|
||||||
chartExample4
|
chartExample4
|
||||||
} from "./charts.js";
|
} from "../charts.js";
|
||||||
|
|
||||||
// This is the start of a dashboard that can be used.
|
// This is the start of a dashboard that can be used.
|
||||||
// What data do we fill in here? Idk
|
// What data do we fill in here? Idk
|
||||||
@@ -34,9 +34,6 @@ import DeleteIcon from '@material-ui/icons/Delete';
|
|||||||
import Downshift from 'downshift';
|
import Downshift from 'downshift';
|
||||||
import deburr from 'lodash/deburr';
|
import deburr from 'lodash/deburr';
|
||||||
|
|
||||||
//import appdata from './appdata';
|
|
||||||
|
|
||||||
|
|
||||||
const EditSchedule = (props) => {
|
const EditSchedule = (props) => {
|
||||||
const { globalUrl } = props;
|
const { globalUrl } = props;
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@ import Divider from '@material-ui/core/Divider';
|
|||||||
import Select from '@material-ui/core/Select';
|
import Select from '@material-ui/core/Select';
|
||||||
import MenuItem from '@material-ui/core/MenuItem';
|
import MenuItem from '@material-ui/core/MenuItem';
|
||||||
|
|
||||||
import WebhookImage from './assets/img/webhook.png';
|
import WebhookImage from '../assets/img/webhook.png';
|
||||||
import KafkaImage from './assets/img/kafka.png';
|
import KafkaImage from '../assets/img/kafka.png';
|
||||||
|
|
||||||
import EditWorkflow from "./EditWorkflow";
|
import EditWorkflow from "./EditWorkflow";
|
||||||
|
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
/* eslint-disable react/no-multi-comp */
|
/* eslint-disable react/no-multi-comp */
|
||||||
import React, {useState} from 'react';
|
import React, { useState } from 'react';
|
||||||
import { makeStyles } from '@material-ui/styles';
|
import { makeStyles } from '@material-ui/styles';
|
||||||
|
|
||||||
import TextField from '@material-ui/core/TextField';
|
import TextField from '@material-ui/core/TextField';
|
||||||
import Button from '@material-ui/core/Button';
|
import Button from '@material-ui/core/Button';
|
||||||
import Paper from '@material-ui/core/Paper';
|
import Paper from '@material-ui/core/Paper';
|
||||||
|
import { useTheme } from '@material-ui/core/styles';
|
||||||
|
|
||||||
|
|
||||||
const hrefStyle = {
|
const hrefStyle = {
|
||||||
color: "white",
|
color: "white",
|
||||||
textDecoration: "none"
|
textDecoration: "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,16 +19,6 @@ const bodyDivStyle = {
|
|||||||
width: "500px",
|
width: "500px",
|
||||||
}
|
}
|
||||||
|
|
||||||
const surfaceColor = "#27292D"
|
|
||||||
const inputColor = "#383B40"
|
|
||||||
|
|
||||||
const boxStyle = {
|
|
||||||
paddingLeft: "30px",
|
|
||||||
paddingRight: "30px",
|
|
||||||
paddingBottom: "30px",
|
|
||||||
paddingTop: "30px",
|
|
||||||
backgroundColor: surfaceColor,
|
|
||||||
}
|
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
notchedOutline: {
|
notchedOutline: {
|
||||||
@@ -35,12 +27,14 @@ const useStyles = makeStyles({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const LoginDialog = props => {
|
const LoginDialog = props => {
|
||||||
const { globalUrl, isLoaded, isLoggedIn, setIsLoggedIn, setCookie, register } = props;
|
const theme = useTheme();
|
||||||
|
|
||||||
|
const { globalUrl, isLoaded, isLoggedIn, setIsLoggedIn, setCookie, register } = props;
|
||||||
const [username, setUsername] = useState("");
|
const [username, setUsername] = useState("");
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [firstRequest, setFirstRequest] = useState(true);
|
const [firstRequest, setFirstRequest] = useState(true);
|
||||||
|
|
||||||
// Used to swap from login to register. True = login, false = register
|
// Used to swap from login to register. True = login, false = register
|
||||||
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
// Error messages etc
|
// Error messages etc
|
||||||
@@ -51,32 +45,32 @@ const LoginDialog = props => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isLoggedIn === true) {
|
if (isLoggedIn === true) {
|
||||||
window.location.pathname = "/workflows"
|
window.location.pathname = "/workflows"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const checkAdmin = () => {
|
const checkAdmin = () => {
|
||||||
const url = globalUrl+'/api/v1/checkusers';
|
const url = globalUrl + '/api/v1/checkusers';
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(response =>
|
.then(response =>
|
||||||
response.json().then(responseJson => {
|
response.json().then(responseJson => {
|
||||||
if (responseJson["success"] === false) {
|
if (responseJson["success"] === false) {
|
||||||
setLoginInfo(responseJson["reason"])
|
setLoginInfo(responseJson["reason"])
|
||||||
} else {
|
} else {
|
||||||
if (responseJson.reason === "stay") {
|
if (responseJson.reason === "stay") {
|
||||||
window.location.pathname = "/adminsetup"
|
window.location.pathname = "/adminsetup"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}),
|
||||||
}),
|
)
|
||||||
)
|
.catch(error => {
|
||||||
.catch(error => {
|
setLoginInfo("Error in userdata: ", error)
|
||||||
setLoginInfo("Error in userdata: ", error)
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstRequest) {
|
if (firstRequest) {
|
||||||
@@ -89,41 +83,41 @@ const LoginDialog = props => {
|
|||||||
// FIXME - add some check here ROFL
|
// FIXME - add some check here ROFL
|
||||||
|
|
||||||
// Just use this one?
|
// Just use this one?
|
||||||
var data = {"username": username, "password": password}
|
var data = { "username": username, "password": password }
|
||||||
var baseurl = globalUrl
|
var baseurl = globalUrl
|
||||||
if (register) {
|
if (register) {
|
||||||
var url = baseurl+'/api/v1/users/login';
|
var url = baseurl + '/api/v1/users/login';
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
crossDomain: true,
|
crossDomain: true,
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json; charset=utf-8',
|
'Content-Type': 'application/json; charset=utf-8',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(response =>
|
.then(response =>
|
||||||
response.json().then(responseJson => {
|
response.json().then(responseJson => {
|
||||||
if (responseJson["success"] === false) {
|
if (responseJson["success"] === false) {
|
||||||
setLoginInfo(responseJson["reason"])
|
setLoginInfo(responseJson["reason"])
|
||||||
} else {
|
} else {
|
||||||
setLoginInfo("Successful login, rerouting")
|
setLoginInfo("Successful login, rerouting")
|
||||||
for (var key in responseJson["cookies"]) {
|
for (var key in responseJson["cookies"]) {
|
||||||
setCookie(responseJson["cookies"][key].key, responseJson["cookies"][key].value, {path: "/"})
|
setCookie(responseJson["cookies"][key].key, responseJson["cookies"][key].value, { path: "/" })
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsLoggedIn(true)
|
setIsLoggedIn(true)
|
||||||
window.location.pathname = "/workflows"
|
window.location.pathname = "/workflows"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
setLoginInfo("Error in userdata: " + error)
|
setLoginInfo("Error in userdata: " + error)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
url = baseurl+'/api/v1/users/register';
|
url = baseurl + '/api/v1/users/register';
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
@@ -131,27 +125,27 @@ const LoginDialog = props => {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(response =>
|
.then(response =>
|
||||||
response.json().then(responseJson => {
|
response.json().then(responseJson => {
|
||||||
if (responseJson["success"] === false) {
|
if (responseJson["success"] === false) {
|
||||||
setLoginInfo(responseJson["reason"])
|
setLoginInfo(responseJson["reason"])
|
||||||
} else {
|
} else {
|
||||||
setLoginInfo("Successful register :)")
|
setLoginInfo("Successful register :)")
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
setLoginInfo("Error in userdata: ", error)
|
setLoginInfo("Error in userdata: ", error)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChangeUser = (e) => {
|
const onChangeUser = (e) => {
|
||||||
setUsername(e.target.value)
|
setUsername(e.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChangePass = (e) => {
|
const onChangePass = (e) => {
|
||||||
setPassword(e.target.value)
|
setPassword(e.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
//const onClickRegister = () => {
|
//const onClickRegister = () => {
|
||||||
@@ -167,25 +161,32 @@ const LoginDialog = props => {
|
|||||||
//var loginChange = register ? (<div><p onClick={setLoginCheck(false)}>Want to register? Click here.</p></div>) : (<div><p onClick={setLoginCheck(true)}>Go back to login? Click here.</p></div>);
|
//var loginChange = register ? (<div><p onClick={setLoginCheck(false)}>Want to register? Click here.</p></div>) : (<div><p onClick={setLoginCheck(true)}>Go back to login? Click here.</p></div>);
|
||||||
var formtitle = register ? <div>Login</div> : <div>Register</div>
|
var formtitle = register ? <div>Login</div> : <div>Register</div>
|
||||||
|
|
||||||
// <DialogTitle>{formtitle}</DialogTitle>
|
// <DialogTitle>{formtitle}</DialogTitle>
|
||||||
|
|
||||||
const basedata =
|
console.log("THEME: ", theme.palette.surfaceColor)
|
||||||
|
const basedata =
|
||||||
<div style={bodyDivStyle}>
|
<div style={bodyDivStyle}>
|
||||||
<Paper style={boxStyle}>
|
<Paper style={{
|
||||||
<form onSubmit={onSubmit} style={{margin: "15px 15px 15px 15px", color: "white",}}>
|
paddingLeft: "30px",
|
||||||
|
paddingRight: "30px",
|
||||||
|
paddingBottom: "30px",
|
||||||
|
paddingTop: "30px",
|
||||||
|
backgroundColor: theme.palette.surfaceColor,
|
||||||
|
}}>
|
||||||
|
<form onSubmit={onSubmit} style={{ margin: "15px 15px 15px 15px", color: "white", }}>
|
||||||
<h2>{formtitle}</h2>
|
<h2>{formtitle}</h2>
|
||||||
Username
|
Username
|
||||||
<div>
|
<div>
|
||||||
<TextField
|
<TextField
|
||||||
color="primary"
|
color="primary"
|
||||||
style={{backgroundColor: inputColor}}
|
style={{ backgroundColor: theme.palette.inputColor }}
|
||||||
autoFocus
|
autoFocus
|
||||||
InputProps={{
|
InputProps={{
|
||||||
classes: {
|
classes: {
|
||||||
notchedOutline: classes.notchedOutline,
|
notchedOutline: classes.notchedOutline,
|
||||||
},
|
},
|
||||||
style:{
|
style: {
|
||||||
height: "50px",
|
height: "50px",
|
||||||
color: "white",
|
color: "white",
|
||||||
fontSize: "1em",
|
fontSize: "1em",
|
||||||
},
|
},
|
||||||
@@ -197,20 +198,20 @@ const LoginDialog = props => {
|
|||||||
id="emailfield"
|
id="emailfield"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={onChangeUser}
|
onChange={onChangeUser}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
Password
|
Password
|
||||||
<div>
|
<div>
|
||||||
<TextField
|
<TextField
|
||||||
color="primary"
|
color="primary"
|
||||||
style={{backgroundColor: inputColor,}}
|
style={{ backgroundColor: theme.palette.inputColor }}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
classes: {
|
classes: {
|
||||||
notchedOutline: classes.notchedOutline,
|
notchedOutline: classes.notchedOutline,
|
||||||
},
|
},
|
||||||
style:{
|
style: {
|
||||||
height: "50px",
|
height: "50px",
|
||||||
color: "white",
|
color: "white",
|
||||||
fontSize: "1em",
|
fontSize: "1em",
|
||||||
},
|
},
|
||||||
@@ -223,23 +224,23 @@ const LoginDialog = props => {
|
|||||||
placeholder="**********"
|
placeholder="**********"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={onChangePass}
|
onChange={onChangePass}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: "flex", marginTop: "15px"}}>
|
<div style={{ display: "flex", marginTop: "15px" }}>
|
||||||
<Button color="primary" variant="contained" type="submit" style={{flex: "1", marginRight: "5px"}} disabled={!handleValidateForm()}>SUBMIT</Button>
|
<Button color="primary" variant="contained" type="submit" style={{ flex: "1", marginRight: "5px" }} disabled={!handleValidateForm()}>SUBMIT</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{marginTop: "10px"}}>
|
<div style={{ marginTop: "10px" }}>
|
||||||
{loginInfo}
|
{loginInfo}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</Paper>
|
</Paper>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
const loadedCheck = isLoaded ?
|
const loadedCheck = isLoaded ?
|
||||||
<div>
|
<div>
|
||||||
{basedata}
|
{basedata}
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<div>
|
<div>
|
||||||
@@ -7,23 +7,11 @@ import {Link} from 'react-router-dom';
|
|||||||
|
|
||||||
import TextField from '@material-ui/core/TextField';
|
import TextField from '@material-ui/core/TextField';
|
||||||
import { useAlert } from "react-alert";
|
import { useAlert } from "react-alert";
|
||||||
|
import { useTheme } from '@material-ui/core/styles';
|
||||||
|
|
||||||
|
|
||||||
//const tmpdata = {
|
|
||||||
// "username": "frikky",
|
|
||||||
// "firstname": "fred",
|
|
||||||
// "lastname": "ode",
|
|
||||||
// "title": "topkek",
|
|
||||||
// "companyname": "company here",
|
|
||||||
// "email": "your email pls",
|
|
||||||
// "phone": "PHONE!!",
|
|
||||||
//}
|
|
||||||
|
|
||||||
// FIXME - add fetch for data fields
|
|
||||||
// FIXME - remove tmpdata
|
|
||||||
// FIXME: Use isLoggedIn :)
|
|
||||||
const Settings = (props) => {
|
const Settings = (props) => {
|
||||||
const { globalUrl, isLoaded, userdata, surfaceColor, inputColor } = props;
|
const { globalUrl, isLoaded, userdata, } = props;
|
||||||
|
const theme = useTheme();
|
||||||
const alert = useAlert()
|
const alert = useAlert()
|
||||||
|
|
||||||
const [username, setUsername] = useState("");
|
const [username, setUsername] = useState("");
|
||||||
@@ -61,7 +49,7 @@ const Settings = (props) => {
|
|||||||
paddingRight: "30px",
|
paddingRight: "30px",
|
||||||
paddingBottom: "30px",
|
paddingBottom: "30px",
|
||||||
paddingTop: "30px",
|
paddingTop: "30px",
|
||||||
backgroundColor: surfaceColor,
|
backgroundColor: theme.palette.surfaceColor,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column"
|
flexDirection: "column"
|
||||||
}
|
}
|
||||||
@@ -190,7 +178,7 @@ const Settings = (props) => {
|
|||||||
<h2>APIKEY</h2>
|
<h2>APIKEY</h2>
|
||||||
<Link to="/docs/API#authentication" style={{textDecoration: "none", color: "#f85a3e"}}>What is the API key used for?</Link>
|
<Link to="/docs/API#authentication" style={{textDecoration: "none", color: "#f85a3e"}}>What is the API key used for?</Link>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1"}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1"}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -218,7 +206,7 @@ const Settings = (props) => {
|
|||||||
<h2>Settings</h2>
|
<h2>Settings</h2>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1"}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1"}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -240,7 +228,7 @@ const Settings = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginRight: "15px"}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginRight: "15px"}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -260,7 +248,7 @@ const Settings = (props) => {
|
|||||||
onChange={e => setFirstname(e.target.value)}
|
onChange={e => setFirstname(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginLeft: "15px"}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginLeft: "15px"}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -282,7 +270,7 @@ const Settings = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginRight: "15px",}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginRight: "15px",}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -302,7 +290,7 @@ const Settings = (props) => {
|
|||||||
onChange={e => setTitle(e.target.value)}
|
onChange={e => setTitle(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginLeft: "15px"}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginLeft: "15px"}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -324,7 +312,7 @@ const Settings = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginRight: "15px",}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginRight: "15px",}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -344,7 +332,7 @@ const Settings = (props) => {
|
|||||||
onChange={e => setEmail(e.target.value)}
|
onChange={e => setEmail(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginLeft: "15px",}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginLeft: "15px",}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -379,7 +367,7 @@ const Settings = (props) => {
|
|||||||
<h2>Password</h2>
|
<h2>Password</h2>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1"}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1"}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -400,7 +388,7 @@ const Settings = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
<div style={{flex: "1", display: "flex", flexDirection: "row"}}>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginRight: "15px",}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginRight: "15px",}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -419,7 +407,7 @@ const Settings = (props) => {
|
|||||||
onChange={e => setNewPassword(e.target.value)}
|
onChange={e => setNewPassword(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor, flex: "1", marginLeft: "15px",}}
|
style={{backgroundColor: theme.palette.inputColor, flex: "1", marginLeft: "15px",}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
style:{
|
style:{
|
||||||
height: "50px",
|
height: "50px",
|
||||||
@@ -15,8 +15,8 @@ import DialogTitle from '@material-ui/core/DialogTitle';
|
|||||||
import DialogActions from '@material-ui/core/DialogActions';
|
import DialogActions from '@material-ui/core/DialogActions';
|
||||||
import DialogContent from '@material-ui/core/DialogContent';
|
import DialogContent from '@material-ui/core/DialogContent';
|
||||||
|
|
||||||
import WebhookImage from './assets/img/webhook.png';
|
import WebhookImage from '../assets/img/webhook.png';
|
||||||
import KafkaImage from './assets/img/kafka.png';
|
import KafkaImage from '../assets/img/kafka.png';
|
||||||
|
|
||||||
const Webhooks = (props) => {
|
const Webhooks = (props) => {
|
||||||
const { globalUrl, isLoaded } = props;
|
const { globalUrl, isLoaded } = props;
|
||||||
@@ -988,7 +988,7 @@ const Workflows = (props) => {
|
|||||||
<div style={{flex: "1"}}>
|
<div style={{flex: "1"}}>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
style={{color: "white", marginBottom: "0px", marginTop: "10px"}}
|
style={{color: "white", marginBottom: "0px", marginTop: "10px"}}
|
||||||
label=<div style={{color: "white"}}>Collapse results</div>
|
label={<div style={{color: "white"}}>Collapse results</div>}
|
||||||
control={<Switch checked={collapseJson} onChange={() => {setCollapseJson(!collapseJson)}} />}
|
control={<Switch checked={collapseJson} onChange={() => {setCollapseJson(!collapseJson)}} />}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user