Added doc scrolling
This commit is contained in:
@@ -6,4 +6,4 @@ ENVIRONMENT_NAME=Shuffle
|
|||||||
BACKEND_HOSTNAME=shuffle-backend
|
BACKEND_HOSTNAME=shuffle-backend
|
||||||
BACKEND_PORT=5010
|
BACKEND_PORT=5010
|
||||||
FRONTEND_PORT=3001
|
FRONTEND_PORT=3001
|
||||||
OUTER_HOSTNAME=shuffle-backend
|
OUTER_HOSTNAME=shuffle-backend
|
||||||
|
|||||||
@@ -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())
|
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)
|
err = SetSession(ctx, *Userdata, Userdata.Session)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ services:
|
|||||||
image: frikky/shuffle:database
|
image: frikky/shuffle:database
|
||||||
container_name: shuffle-database
|
container_name: shuffle-database
|
||||||
hostname: shuffle-database
|
hostname: shuffle-database
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
networks:
|
networks:
|
||||||
- shuffle
|
- shuffle
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
+4
-4
@@ -52,10 +52,10 @@ const theme = createMuiTheme({
|
|||||||
palette: {
|
palette: {
|
||||||
primary: {
|
primary: {
|
||||||
main: "#f85a3e"
|
main: "#f85a3e"
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
main: '#e8eaf6',
|
main: '#e8eaf6',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
useNextVariants: true
|
useNextVariants: true
|
||||||
|
|||||||
+109
-4
@@ -41,6 +41,7 @@ const Apps = (props) => {
|
|||||||
const [openApi, setOpenApi] = React.useState("")
|
const [openApi, setOpenApi] = React.useState("")
|
||||||
const [openApiData, setOpenApiData] = React.useState("")
|
const [openApiData, setOpenApiData] = React.useState("")
|
||||||
const [appValidation, setAppValidation] = React.useState("")
|
const [appValidation, setAppValidation] = React.useState("")
|
||||||
|
const [loadAppsModalOpen, setLoadAppsModalOpen] = React.useState(false);
|
||||||
const [openApiModal, setOpenApiModal] = React.useState(false);
|
const [openApiModal, setOpenApiModal] = React.useState(false);
|
||||||
const [openApiModalType, setOpenApiModalType] = React.useState("");
|
const [openApiModalType, setOpenApiModalType] = React.useState("");
|
||||||
const [openApiError, setOpenApiError] = React.useState("")
|
const [openApiError, setOpenApiError] = React.useState("")
|
||||||
@@ -400,16 +401,27 @@ const Apps = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
{isLoading ? <CircularProgress style={{marginTop: 13, marginRight: 15}} /> : null}
|
{isLoading ? <CircularProgress style={{marginTop: 13, marginRight: 15}} /> : null}
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="outlined"
|
||||||
component="label"
|
component="label"
|
||||||
color="primary"
|
color="primary"
|
||||||
style={{maxHeight: 50, marginTop: 10}}
|
style={{margin: 5, maxHeight: 50, marginTop: 10}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
getExistingApps()
|
getExistingApps()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Load existing apps
|
Load existing apps
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="outlined"
|
||||||
|
component="label"
|
||||||
|
color="primary"
|
||||||
|
style={{margin: 5, maxHeight: 50, marginTop: 10}}
|
||||||
|
onClick={() => {
|
||||||
|
setLoadAppsModalOpen(true)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Upload from github
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<TextField
|
<TextField
|
||||||
style={{backgroundColor: inputColor}}
|
style={{backgroundColor: inputColor}}
|
||||||
@@ -621,6 +633,98 @@ const Apps = (props) => {
|
|||||||
window.location.href = "/apps/new?id="+appValidation
|
window.location.href = "/apps/new?id="+appValidation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const handleGithubValidation = () => {
|
||||||
|
console.log("VALIDATE")
|
||||||
|
setValidation(true)
|
||||||
|
//const circularLoader = validation ? <CircularProgress color="primary" /> : null
|
||||||
|
}
|
||||||
|
|
||||||
|
const appsModalLoad = loadAppsModalOpen ?
|
||||||
|
<Dialog modal
|
||||||
|
open={loadAppsModalOpen}
|
||||||
|
onClose={() => {
|
||||||
|
setOpenApi("")
|
||||||
|
setLoadAppsModalOpen(false)
|
||||||
|
}}
|
||||||
|
PaperProps={{
|
||||||
|
style: {
|
||||||
|
backgroundColor: surfaceColor,
|
||||||
|
color: "white",
|
||||||
|
minWidth: "800px",
|
||||||
|
minHeight: "320px",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DialogTitle>
|
||||||
|
<div style={{color: "rgba(255,255,255,0.9)"}}>
|
||||||
|
Load from github repo
|
||||||
|
</div>
|
||||||
|
</DialogTitle>
|
||||||
|
<DialogContent style={{color: "rgba(255,255,255,0.65)"}}>
|
||||||
|
Github repository
|
||||||
|
<TextField
|
||||||
|
style={{backgroundColor: inputColor}}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
InputProps={{
|
||||||
|
style:{
|
||||||
|
color: "white",
|
||||||
|
height: "50px",
|
||||||
|
fontSize: "1em",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onChange={e => setOpenApi(e.target.value)}
|
||||||
|
placeholder="https://github.com/frikky/shuffle-apps"
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
<div style={{display: "flex"}}>
|
||||||
|
<TextField
|
||||||
|
style={{flex: 1, backgroundColor: inputColor}}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
InputProps={{
|
||||||
|
style:{
|
||||||
|
color: "white",
|
||||||
|
height: "50px",
|
||||||
|
fontSize: "1em",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onChange={e => setOpenApi(e.target.value)}
|
||||||
|
placeholder="https://github.com/frikky/shuffle-apps"
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
<TextField
|
||||||
|
style={{flex: 1, backgroundColor: inputColor}}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
InputProps={{
|
||||||
|
style:{
|
||||||
|
color: "white",
|
||||||
|
height: "50px",
|
||||||
|
fontSize: "1em",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onChange={e => setOpenApi(e.target.value)}
|
||||||
|
placeholder="https://github.com/frikky/shuffle-apps"
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
{circularLoader}
|
||||||
|
<Button style={{borderRadius: "0px"}} onClick={() => setLoadAppsModalOpen(false)} color="primary">
|
||||||
|
Cancel
|
||||||
|
</Button>
|
||||||
|
<Button style={{borderRadius: "0px"}} disabled={openApi.length === 0 || !openApi.includes("http")} onClick={() => {
|
||||||
|
}} color="primary">
|
||||||
|
Submit
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
: null
|
||||||
|
|
||||||
const errorText = openApiError.length > 0 ? <div>Error: {openApiError}</div> : null
|
const errorText = openApiError.length > 0 ? <div>Error: {openApiError}</div> : null
|
||||||
const circularLoader = validation ? <CircularProgress color="primary" /> : null
|
const circularLoader = validation ? <CircularProgress color="primary" /> : null
|
||||||
const modalView = openApiModal ?
|
const modalView = openApiModal ?
|
||||||
@@ -693,11 +797,11 @@ const Apps = (props) => {
|
|||||||
<Button style={{borderRadius: "0px"}} onClick={() => setOpenApiModal(false)} color="primary">
|
<Button style={{borderRadius: "0px"}} onClick={() => setOpenApiModal(false)} color="primary">
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<Button style={{borderRadius: "0px"}} disabled={appValidation.length === 0} onClick={() => {
|
<Button style={{borderRadius: "0px"}} disabled={appValidation.length === 0} onClick={() => {
|
||||||
redirectOpenApi()
|
redirectOpenApi()
|
||||||
}} color="primary">
|
}} color="primary">
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -708,6 +812,7 @@ const Apps = (props) => {
|
|||||||
<div>
|
<div>
|
||||||
{appView}
|
{appView}
|
||||||
{modalView}
|
{modalView}
|
||||||
|
{appsModalLoad}
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const Docs = (props) => {
|
|||||||
if (parent !== null) {
|
if (parent !== null) {
|
||||||
var elements = parent.getElementsByTagName('h2')
|
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)
|
console.log(name)
|
||||||
var found = false
|
var found = false
|
||||||
@@ -167,6 +167,9 @@ const Docs = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function OuterLink(props) {
|
function OuterLink(props) {
|
||||||
|
if (props.href.includes("http") || props.href.includes("mailto")) {
|
||||||
|
return <a href={props.href} style={{color: "#f85a3e", textDecoration: "none"}}>{props.children}</a>
|
||||||
|
}
|
||||||
return <Link to={props.href} style={{color: "#f85a3e", textDecoration: "none"}}>{props.children}</Link>
|
return <Link to={props.href} style={{color: "#f85a3e", textDecoration: "none"}}>{props.children}</Link>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import (
|
|||||||
var baseUrl = os.Getenv("BASE_URL")
|
var baseUrl = os.Getenv("BASE_URL")
|
||||||
var baseimagename = "frikky/shuffle"
|
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 environment = os.Getenv("ENVIRONMENT_NAME")
|
||||||
var orgId = os.Getenv("ORG_ID")
|
var orgId = os.Getenv("ORG_ID")
|
||||||
|
|
||||||
@@ -310,7 +310,10 @@ func main() {
|
|||||||
fmt.Sprintf("ENVIRONMENT_NAME=%s", environment),
|
fmt.Sprintf("ENVIRONMENT_NAME=%s", environment),
|
||||||
fmt.Sprintf("BASE_URL=%s", baseUrl),
|
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)
|
err = deployWorker(dockercli, workerImage, containerName, env)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ docker run \
|
|||||||
--env ORG_ID=$ORG_ID \
|
--env ORG_ID=$ORG_ID \
|
||||||
--env ENVIRONMENT_NAME="Shuffle" \
|
--env ENVIRONMENT_NAME="Shuffle" \
|
||||||
--env BASE_URL=http://shuffle-backend:5001 \
|
--env BASE_URL=http://shuffle-backend:5001 \
|
||||||
|
--env DOCKER_API_VERSION=1.42 \
|
||||||
--network "shuffle_shuffle" \
|
--network "shuffle_shuffle" \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
frikky/shuffle:orborus
|
frikky/shuffle:orborus
|
||||||
|
|||||||
Reference in New Issue
Block a user