diff --git a/.env b/.env index 4928d5d6..c97e13f3 100644 --- a/.env +++ b/.env @@ -6,4 +6,4 @@ ENVIRONMENT_NAME=Shuffle BACKEND_HOSTNAME=shuffle-backend BACKEND_PORT=5010 FRONTEND_PORT=3001 -OUTER_HOSTNAME=shuffle-backend \ No newline at end of file +OUTER_HOSTNAME=shuffle-backend diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 3a20ceef..e2a4e636 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -1980,7 +1980,7 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) { }) loginData = fmt.Sprintf(`{"success": true, "cookies": [{"key": "session_token", "value": "%s", "expiration": %d}]}`, Userdata.Session, expiration.Unix()) - log.Printf("SESSION LENGTH MORE THAN 0 IN LOGIN: %s", Userdata.Session) + //log.Printf("SESSION LENGTH MORE THAN 0 IN LOGIN: %s", Userdata.Session) err = SetSession(ctx, *Userdata, Userdata.Session) if err != nil { diff --git a/docker-compose.yml b/docker-compose.yml index b2c4b28b..17fec1a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,8 @@ services: image: frikky/shuffle:database container_name: shuffle-database hostname: shuffle-database + ports: + - "8000:8000" networks: - shuffle restart: unless-stopped diff --git a/frontend/src/App.js b/frontend/src/App.js index 26586734..48cc6b24 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -52,10 +52,10 @@ const theme = createMuiTheme({ palette: { primary: { main: "#f85a3e" - }, - secondary: { - main: '#e8eaf6', - }, + }, + secondary: { + main: '#e8eaf6', + }, }, typography: { useNextVariants: true diff --git a/frontend/src/Apps.js b/frontend/src/Apps.js index e9a1a256..fc394cd1 100644 --- a/frontend/src/Apps.js +++ b/frontend/src/Apps.js @@ -41,6 +41,7 @@ const Apps = (props) => { const [openApi, setOpenApi] = React.useState("") const [openApiData, setOpenApiData] = React.useState("") const [appValidation, setAppValidation] = React.useState("") + const [loadAppsModalOpen, setLoadAppsModalOpen] = React.useState(false); const [openApiModal, setOpenApiModal] = React.useState(false); const [openApiModalType, setOpenApiModalType] = React.useState(""); const [openApiError, setOpenApiError] = React.useState("") @@ -400,16 +401,27 @@ const Apps = (props) => { {isLoading ? : null} + { window.location.href = "/apps/new?id="+appValidation } + + + const handleGithubValidation = () => { + console.log("VALIDATE") + setValidation(true) + //const circularLoader = validation ? : null + } + + const appsModalLoad = loadAppsModalOpen ? + { + setOpenApi("") + setLoadAppsModalOpen(false) + }} + PaperProps={{ + style: { + backgroundColor: surfaceColor, + color: "white", + minWidth: "800px", + minHeight: "320px", + }, + }} + > + +
+ Load from github repo +
+
+ + Github repository + setOpenApi(e.target.value)} + placeholder="https://github.com/frikky/shuffle-apps" + fullWidth + /> +
+ setOpenApi(e.target.value)} + placeholder="https://github.com/frikky/shuffle-apps" + fullWidth + /> + setOpenApi(e.target.value)} + placeholder="https://github.com/frikky/shuffle-apps" + fullWidth + /> +
+
+ + {circularLoader} + + + +
+ : null + const errorText = openApiError.length > 0 ?
Error: {openApiError}
: null const circularLoader = validation ? : null const modalView = openApiModal ? @@ -693,11 +797,11 @@ const Apps = (props) => { - + @@ -708,6 +812,7 @@ const Apps = (props) => {
{appView} {modalView} + {appsModalLoad}
:
diff --git a/frontend/src/Docs.js b/frontend/src/Docs.js index 8b4acd26..55c7c09c 100644 --- a/frontend/src/Docs.js +++ b/frontend/src/Docs.js @@ -64,7 +64,7 @@ const Docs = (props) => { if (parent !== null) { var elements = parent.getElementsByTagName('h2') - const name = window.location.hash.slice(1, window.location.hash.lenth).toLowerCase().split("%20").join(" ") + const name = window.location.hash.slice(1, window.location.hash.lenth).toLowerCase().split("%20").join(" ").split("_").join(" ") console.log(name) var found = false @@ -167,6 +167,9 @@ const Docs = (props) => { } function OuterLink(props) { + if (props.href.includes("http") || props.href.includes("mailto")) { + return {props.children} + } return {props.children} } diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 5d510f2c..6996fc5a 100644 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -28,7 +28,7 @@ import ( var baseUrl = os.Getenv("BASE_URL") var baseimagename = "frikky/shuffle" -//var dockerApiVersion = os.Getenv("DOCKER_API_VERSION") +var dockerApiVersion = os.Getenv("DOCKER_API_VERSION") var environment = os.Getenv("ENVIRONMENT_NAME") var orgId = os.Getenv("ORG_ID") @@ -310,7 +310,10 @@ func main() { fmt.Sprintf("ENVIRONMENT_NAME=%s", environment), fmt.Sprintf("BASE_URL=%s", baseUrl), } - //fmt.Sprintf("DOCKER_API_VERSION=%s", dockerApiVersion), + + if dockerApiVersion != "" { + env = append(env, fmt.Sprintf("DOCKER_API_VERSION=%s", dockerApiVersion)) + } err = deployWorker(dockercli, workerImage, containerName, env) if err != nil { diff --git a/functions/onprem/orborus/run.sh b/functions/onprem/orborus/run.sh index 37c16f15..9c6d8db5 100644 --- a/functions/onprem/orborus/run.sh +++ b/functions/onprem/orborus/run.sh @@ -2,6 +2,7 @@ docker run \ --env ORG_ID=$ORG_ID \ --env ENVIRONMENT_NAME="Shuffle" \ --env BASE_URL=http://shuffle-backend:5001 \ + --env DOCKER_API_VERSION=1.42 \ --network "shuffle_shuffle" \ -v /var/run/docker.sock:/var/run/docker.sock \ frikky/shuffle:orborus