Added auto-SSO by adding autologin=true query

This commit is contained in:
frikky
2022-02-08 01:48:30 +01:00
parent e950212274
commit 115151280c
3 changed files with 21 additions and 8 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
version: '3' version: '3'
services: services:
frontend: frontend:
#build: ./frontend build: ./frontend
image: ghcr.io/frikky/shuffle-frontend:nightly image: ghcr.io/frikky/shuffle-frontend:nightly
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
@@ -85,6 +85,8 @@ services:
hard: 65536 hard: 65536
volumes: volumes:
- ${DB_LOCATION}:/usr/share/opensearch/data:rw - ${DB_LOCATION}:/usr/share/opensearch/data:rw
ports:
- 9200:9200
networks: networks:
- shuffle - shuffle
restart: unless-stopped restart: unless-stopped
+2 -1
View File
@@ -2335,6 +2335,7 @@ const AngularWorkflow = (defaultprops) => {
} }
if (data.type === "ACTION") { if (data.type === "ACTION") {
setSelectedComment({})
//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()
@@ -2485,6 +2486,7 @@ const AngularWorkflow = (defaultprops) => {
setSelectedActionEnvironment(env); setSelectedActionEnvironment(env);
} }
} else if (data.type === "TRIGGER") { } else if (data.type === "TRIGGER") {
setSelectedComment({})
if (workflow.triggers === null) { if (workflow.triggers === null) {
workflow.triggers = [] workflow.triggers = []
} }
@@ -2535,7 +2537,6 @@ const AngularWorkflow = (defaultprops) => {
} }
setRightSideBarOpen(true); setRightSideBarOpen(true);
setSelectedComment({})
setLastSaved(false); setLastSaved(false);
setScrollConfig({ setScrollConfig({
top: 0, top: 0,
+10
View File
@@ -499,13 +499,23 @@ const LoginDialog = (props) => {
const loadedCheck = isLoaded ? <div>{basedata}</div> : <div></div>; const loadedCheck = isLoaded ? <div>{basedata}</div> : <div></div>;
useEffect(() => { useEffect(() => {
setTimeout(() => {
if (ssoUrl !== undefined && ssoUrl !== null && ssoUrl.length > 0) { if (ssoUrl !== undefined && ssoUrl !== null && ssoUrl.length > 0) {
//id="sso_button" //id="sso_button"
const ssoBtn = document.getElementById("sso_button"); const ssoBtn = document.getElementById("sso_button");
if (ssoBtn !== undefined && ssoBtn !== null) { if (ssoBtn !== undefined && ssoBtn !== null) {
console.log("SSO BTN: ", ssoBtn) console.log("SSO BTN: ", ssoBtn)
const cursearch = typeof window === "undefined" || window.location === undefined ? "" : window.location.search;
var tmpView = new URLSearchParams(cursearch).get("autologin");
if (tmpView !== undefined && tmpView !== null) {
if (tmpView === "true") {
console.log("Tmp: ", tmpView)
ssoBtn.click()
} }
} }
}
}
}, 200);
}, [ssoUrl]) }, [ssoUrl])
return <div>{loadedCheck}</div>; return <div>{loadedCheck}</div>;