Reverting compose file
This commit is contained in:
@@ -1270,6 +1270,10 @@ func checkAdminLogin(resp http.ResponseWriter, request *http.Request) {
|
|||||||
redirectUrl = url.QueryEscape(fmt.Sprintf("%s/api/v1/login_openid", os.Getenv("BASE_URL")))
|
redirectUrl = url.QueryEscape(fmt.Sprintf("%s/api/v1/login_openid", os.Getenv("BASE_URL")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(os.Getenv("SSO_REDIRECT_URL")) > 0 {
|
||||||
|
redirectUrl = url.QueryEscape(fmt.Sprintf("%s/api/v1/login_openid", os.Getenv("SSO_REDIRECT_URL")))
|
||||||
|
}
|
||||||
|
|
||||||
state := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("org=%s&challenge=%s&redirect=%s", org.Id, codeChallenge, redirectUrl)))
|
state := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("org=%s&challenge=%s&redirect=%s", org.Id, codeChallenge, redirectUrl)))
|
||||||
|
|
||||||
// has to happen after initial value is stored
|
// has to happen after initial value is stored
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
"@emotion/react": "^11.7.0",
|
"@emotion/react": "^11.7.0",
|
||||||
"@emotion/styled": "^11.6.0",
|
"@emotion/styled": "^11.6.0",
|
||||||
"@material-ui/core": "^4.5.2",
|
"@material-ui/core": "^4.5.2",
|
||||||
"@material-ui/data-grid": "^4.0.0-alpha.22",
|
|
||||||
"@material-ui/icons": "^4.5.1",
|
"@material-ui/icons": "^4.5.1",
|
||||||
"@material-ui/lab": "^4.0.0-alpha.58",
|
"@material-ui/lab": "^4.0.0-alpha.58",
|
||||||
"@material-ui/styles": "^4.5.2",
|
"@material-ui/styles": "^4.5.2",
|
||||||
@@ -17,6 +16,7 @@
|
|||||||
"@metamask/detect-provider": "^1.2.0",
|
"@metamask/detect-provider": "^1.2.0",
|
||||||
"@mui/icons-material": "^5.2.1",
|
"@mui/icons-material": "^5.2.1",
|
||||||
"@mui/material": "^5.2.3",
|
"@mui/material": "^5.2.3",
|
||||||
|
"@mui/x-data-grid": "^5.15.0",
|
||||||
"@uiw/react-codemirror": "^3.2.1",
|
"@uiw/react-codemirror": "^3.2.1",
|
||||||
"@use-it/interval": "^1.0.0",
|
"@use-it/interval": "^1.0.0",
|
||||||
"algoliasearch": "^4.13.1",
|
"algoliasearch": "^4.13.1",
|
||||||
|
|||||||
@@ -3211,7 +3211,6 @@ const ParsedAction = (props) => {
|
|||||||
setSelectedAction(selectedAction);
|
setSelectedAction(selectedAction);
|
||||||
setUpdate(Math.random());
|
setUpdate(Math.random());
|
||||||
} else {
|
} else {
|
||||||
//console.log("CHOSE AN AUTHENTICATION OPTION: ", e.target.value)
|
|
||||||
selectedAction.selectedAuthentication = e.target.value;
|
selectedAction.selectedAuthentication = e.target.value;
|
||||||
selectedAction.authentication_id = e.target.value.id;
|
selectedAction.authentication_id = e.target.value.id;
|
||||||
setSelectedAction(selectedAction);
|
setSelectedAction(selectedAction);
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import Step from "@material-ui/core/Step";
|
|||||||
import StepLabel from "@material-ui/core/StepLabel";
|
import StepLabel from "@material-ui/core/StepLabel";
|
||||||
import Button from "@material-ui/core/Button";
|
import Button from "@material-ui/core/Button";
|
||||||
import Checkbox from '@mui/material/Checkbox';
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
|
|
||||||
import SearchIcon from '@mui/icons-material/Search';
|
import SearchIcon from '@mui/icons-material/Search';
|
||||||
import EmailIcon from '@mui/icons-material/Email';
|
import EmailIcon from '@mui/icons-material/Email';
|
||||||
import NewReleasesIcon from '@mui/icons-material/NewReleases';
|
import NewReleasesIcon from '@mui/icons-material/NewReleases';
|
||||||
|
import ExtensionIcon from '@mui/icons-material/Extension';
|
||||||
|
|
||||||
import theme from '../theme';
|
import theme from '../theme';
|
||||||
import {
|
import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
@@ -422,7 +425,9 @@ const WelcomeForm = (props) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: "flex"}}>
|
<div style={{display: "flex"}}>
|
||||||
<Button disabled={finishedApps.includes("INTEL")} variant={defaultSearch === "INTEL" ? "contained" : "outlined"} style={buttonStyle} startIcon={<NewReleasesIcon />} onClick={(event) => { onNodeSelect("INTEL") }} >
|
<Button disabled={finishedApps.includes("INTEL")} variant={defaultSearch === "INTEL" ? "contained" : "outlined"} style={buttonStyle} startIcon={<ExtensionIcon />} onClick={(event) => { onNodeSelect("INTEL") }} >
|
||||||
|
|
||||||
|
|
||||||
Intel
|
Intel
|
||||||
</Button>
|
</Button>
|
||||||
<Button disabled={finishedApps.includes("COMMS")} variant={defaultSearch === "EMAIL" ? "contained" : "outlined"} style={buttonStyle} startIcon={<EmailIcon />} onClick={(event) => { onNodeSelect("EMAIL") }} >
|
<Button disabled={finishedApps.includes("COMMS")} variant={defaultSearch === "EMAIL" ? "contained" : "outlined"} style={buttonStyle} startIcon={<EmailIcon />} onClick={(event) => { onNodeSelect("EMAIL") }} >
|
||||||
|
|||||||
@@ -2561,7 +2561,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
//var curaction = JSON.parse(JSON.stringify(data))
|
//var curaction = JSON.parse(JSON.stringify(data))
|
||||||
// FIXME: Trust it to just work?
|
// FIXME: Trust it to just work?
|
||||||
//event.target.data()
|
//event.target.data()
|
||||||
var curaction = workflow.actions.find((a) => a.id === data.id);
|
var curaction = workflow.actions.find((a) => a.id === data.id)
|
||||||
if (!curaction || curaction === undefined) {
|
if (!curaction || curaction === undefined) {
|
||||||
console.log("NOT FOUND DATA: ", event.target.data())
|
console.log("NOT FOUND DATA: ", event.target.data())
|
||||||
if (data.id !== undefined && data.app_name !== undefined) {
|
if (data.id !== undefined && data.app_name !== undefined) {
|
||||||
@@ -2584,14 +2584,22 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
newapps = filteredApps
|
newapps = filteredApps
|
||||||
}
|
}
|
||||||
|
|
||||||
const curapp = newapps.find(
|
// Check ID first, then names etc
|
||||||
(a) =>
|
// That way it always selects the right IF it exists
|
||||||
|
var curapp = newapps.find((a) =>
|
||||||
|
a.id === curaction.app_id
|
||||||
|
)
|
||||||
|
|
||||||
|
if (curapp === undefined || curapp === null) {
|
||||||
|
console.log("Couldn't find ID - checking with name & version")
|
||||||
|
|
||||||
|
curapp = newapps.find((a) =>
|
||||||
a.name === curaction.app_name &&
|
a.name === curaction.app_name &&
|
||||||
(a.app_version === curaction.app_version ||
|
(a.app_version === curaction.app_version ||
|
||||||
(a.loop_versions !== null &&
|
(a.loop_versions !== null &&
|
||||||
a.loop_versions.includes(curaction.app_version)))
|
a.loop_versions.includes(curaction.app_version)))
|
||||||
);
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (curaction.template === true) {
|
if (curaction.template === true) {
|
||||||
//newapps.
|
//newapps.
|
||||||
@@ -2619,7 +2627,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!curapp || curapp === undefined) {
|
if (!curapp || curapp === undefined) {
|
||||||
console.log("APPS: ", newapps)
|
console.log("APPS - couldn't find it: ", newapps)
|
||||||
//alert.error(`App ${curaction.app_name}:${curaction.app_version} not found. Is it activated?`);
|
//alert.error(`App ${curaction.app_name}:${curaction.app_version} not found. Is it activated?`);
|
||||||
|
|
||||||
const tmpapp = {
|
const tmpapp = {
|
||||||
@@ -2640,10 +2648,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setAuthenticationType(
|
setAuthenticationType(
|
||||||
curapp.authentication.type === "oauth2" &&
|
curapp.authentication.type === "oauth2" && curapp.authentication.redirect_uri !== undefined && curapp.authentication.redirect_uri !== null ? {
|
||||||
curapp.authentication.redirect_uri !== undefined &&
|
|
||||||
curapp.authentication.redirect_uri !== null
|
|
||||||
? {
|
|
||||||
type: "oauth2",
|
type: "oauth2",
|
||||||
redirect_uri: curapp.authentication.redirect_uri,
|
redirect_uri: curapp.authentication.redirect_uri,
|
||||||
refresh_uri: curapp.authentication.refresh_uri,
|
refresh_uri: curapp.authentication.refresh_uri,
|
||||||
@@ -2651,11 +2656,10 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
scope: curapp.authentication.scope,
|
scope: curapp.authentication.scope,
|
||||||
client_id: curapp.authentication.client_id,
|
client_id: curapp.authentication.client_id,
|
||||||
client_secret: curapp.authentication.client_secret,
|
client_secret: curapp.authentication.client_secret,
|
||||||
}
|
} : {
|
||||||
: {
|
|
||||||
type: "",
|
type: "",
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
const requiresAuth = curapp.authentication.required; //&& ((curapp.authentication.parameters !== undefined && curapp.authentication.parameters !== null) || (curapp.authentication.type === "oauth2" && curapp.authentication.redirect_uri !== undefined && curapp.authentication.redirect_uri !== null))
|
const requiresAuth = curapp.authentication.required; //&& ((curapp.authentication.parameters !== undefined && curapp.authentication.parameters !== null) || (curapp.authentication.type === "oauth2" && curapp.authentication.redirect_uri !== undefined && curapp.authentication.redirect_uri !== null))
|
||||||
setRequiresAuthentication(requiresAuth);
|
setRequiresAuthentication(requiresAuth);
|
||||||
@@ -2672,15 +2676,15 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
findAuthId = curaction.authentication_id;
|
findAuthId = curaction.authentication_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tmpAuth = JSON.parse(JSON.stringify(newAppAuth));
|
const tmpAuth = JSON.parse(JSON.stringify(newAppAuth));
|
||||||
|
//var tmpAuth = newAppAuth
|
||||||
|
|
||||||
for (var key in tmpAuth) {
|
for (var key in tmpAuth) {
|
||||||
var item = tmpAuth[key];
|
var item = tmpAuth[key];
|
||||||
|
|
||||||
const newfields = {};
|
const newfields = {};
|
||||||
for (var filterkey in item.fields) {
|
for (var filterkey in item.fields) {
|
||||||
newfields[item.fields[filterkey].key] =
|
newfields[item.fields[filterkey].key] = item.fields[filterkey].value;
|
||||||
item.fields[filterkey].value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item.fields = newfields;
|
item.fields = newfields;
|
||||||
@@ -5544,22 +5548,28 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
findAuthId = newAppData.authentication_id;
|
findAuthId = newAppData.authentication_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Found auth: ", findAuthId)
|
const tmpAuth = JSON.parse(JSON.stringify(appAuthentication));
|
||||||
var tmpAuth = JSON.parse(JSON.stringify(appAuthentication));
|
|
||||||
for (var key in tmpAuth) {
|
for (var key in tmpAuth) {
|
||||||
var item = tmpAuth[key];
|
var item = tmpAuth[key];
|
||||||
|
|
||||||
const newfields = {};
|
const newfields = {};
|
||||||
for (var filterkey in item.fields) {
|
for (var filterkey in item.fields) {
|
||||||
newfields[item.fields[filterkey].key] =
|
newfields[item.fields[filterkey].key] = item.fields[filterkey].value;
|
||||||
item.fields[filterkey].value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item.fields = newfields;
|
item.fields = newfields;
|
||||||
if (item.app.name === app.name) {
|
if (item.app.id === app.id || item.app.name === app.name) {
|
||||||
authenticationOptions.push(item);
|
authenticationOptions.push(item);
|
||||||
|
|
||||||
if (item.id === findAuthId) {
|
if (item.id === findAuthId) {
|
||||||
newAppData.selectedAuthentication = item;
|
newAppData.selectedAuthentication = item
|
||||||
|
newAppData.authentication_id = item.id
|
||||||
|
|
||||||
|
} else if (findAuthId === "") {
|
||||||
|
// Will always be set to the last one if one isn't found.
|
||||||
|
// Last = timestamp too
|
||||||
|
newAppData.selectedAuthentication = item
|
||||||
|
newAppData.authentication_id = item.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5571,7 +5581,8 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
) {
|
) {
|
||||||
for (var key in authenticationOptions) {
|
for (var key in authenticationOptions) {
|
||||||
const option = authenticationOptions[key];
|
const option = authenticationOptions[key];
|
||||||
if (option.active) {
|
|
||||||
|
if (option.active && newAppData.authentication_id === "") {
|
||||||
newAppData.selectedAuthentication = option;
|
newAppData.selectedAuthentication = option;
|
||||||
newAppData.authentication_id = option.id;
|
newAppData.authentication_id = option.id;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user