Fixed usecase merging to go through cloud

This commit is contained in:
frikky
2022-12-06 11:02:57 +00:00
committed by GitHub
parent 0f28aa9c8e
commit 7f52e8ed6d
8 changed files with 264 additions and 155 deletions
+84 -18
View File
@@ -1,34 +1,100 @@
module main module shuffle
go 1.16 go 1.19
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared //replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
require ( require (
cloud.google.com/go/datastore v1.6.0 cloud.google.com/go/datastore v1.10.0
cloud.google.com/go/iam v0.1.1 // indirect cloud.google.com/go/pubsub v1.27.1
cloud.google.com/go/pubsub v1.17.1 cloud.google.com/go/storage v1.28.1
cloud.google.com/go/storage v1.18.2
github.com/basgys/goxml2json v1.1.0 github.com/basgys/goxml2json v1.1.0
github.com/carlescere/scheduler v0.0.0-20170109141437-ee74d2f83d82 github.com/carlescere/scheduler v0.0.0-20170109141437-ee74d2f83d82
github.com/docker/docker v20.10.12+incompatible github.com/docker/docker v20.10.19+incompatible
github.com/frikky/kin-openapi v0.42.0 github.com/frikky/kin-openapi v0.42.0
github.com/fsouza/go-dockerclient v1.7.7 github.com/fsouza/go-dockerclient v1.9.0
github.com/ghodss/yaml v1.0.0 github.com/ghodss/yaml v1.0.0
github.com/go-git/go-billy/v5 v5.3.1 github.com/go-git/go-billy/v5 v5.3.1
github.com/go-git/go-git/v5 v5.4.2 github.com/go-git/go-git/v5 v5.5.0
github.com/gorilla/mux v1.8.0 github.com/gorilla/mux v1.8.0
github.com/h2non/filetype v1.1.3 github.com/h2non/filetype v1.1.3
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
github.com/satori/go.uuid v1.2.0 github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.3.24 github.com/shuffle/shuffle-shared v0.3.33
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect golang.org/x/crypto v0.3.0
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce google.golang.org/api v0.103.0
google.golang.org/api v0.65.0
google.golang.org/appengine v1.6.7 google.golang.org/appengine v1.6.7
google.golang.org/grpc v1.43.0 google.golang.org/grpc v1.51.0
gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b gopkg.in/yaml.v3 v3.0.1
)
require (
cloud.google.com/go v0.105.0 // indirect
cloud.google.com/go/compute v1.12.1 // indirect
cloud.google.com/go/compute/metadata v0.2.1 // indirect
cloud.google.com/go/iam v0.7.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Microsoft/hcsshim v0.9.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/adrg/strutil v0.3.0 // indirect
github.com/algolia/algoliasearch-client-go/v3 v3.26.1 // indirect
github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 // indirect
github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 // indirect
github.com/cloudflare/circl v1.1.0 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/containerd v1.6.6 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/frikky/go-elasticsearch/v8 v8.13.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-github/v28 v28.1.1 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mailru/easyjson v0.7.0 // indirect
github.com/moby/sys/mount v0.3.3 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/opencontainers/runc v1.1.2 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pjbgf/sha1cd v0.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/skeema/knownhosts v1.1.0 // indirect
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/xanzy/ssh-agent v0.3.2 // indirect
go.opencensus.io v0.24.0 // indirect
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.2.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
) )
+36 -5
View File
@@ -691,13 +691,25 @@ func createNewUser(username, password, role, apikey string, org shuffle.OrgMini)
err = shuffle.SetUser(ctx, newUser, true) err = shuffle.SetUser(ctx, newUser, true)
if err != nil { if err != nil {
log.Printf("Error adding User %s: %s", username, err) log.Printf("[ERROR] Problem adding User %s: %s", username, err)
return err return err
} }
neworg, err := shuffle.GetOrg(ctx, org.Id) neworg, err := shuffle.GetOrg(ctx, org.Id)
if err == nil { if err == nil {
//neworg.Users = append(neworg.Users, *newUser) //neworg.Users = append(neworg.Users, *newUser)
for tutorialIndex, tutorial := range neworg.Tutorials {
if tutorial.Name == "Invite teammates" {
neworg.Tutorials[tutorialIndex].Description = fmt.Sprintf("%d users are in your org. Org name and Image change next.", len(neworg.Users))
if len(neworg.Users) > 0 {
neworg.Tutorials[tutorialIndex].Done = true
neworg.Tutorials[tutorialIndex].Link = "/admin"
}
break
}
}
err = shuffle.SetOrg(ctx, *neworg, neworg.Id) err = shuffle.SetOrg(ctx, *neworg, neworg.Id)
if err != nil { if err != nil {
log.Printf("Failed updating org with user %s", newUser.Username) log.Printf("Failed updating org with user %s", newUser.Username)
@@ -843,6 +855,8 @@ func handleCookie(request *http.Request) bool {
return true return true
} }
// Returns whether the user is logged in or not etc.
// Also has more data about the user and org
func handleInfo(resp http.ResponseWriter, request *http.Request) { func handleInfo(resp http.ResponseWriter, request *http.Request) {
cors := shuffle.HandleCors(resp, request) cors := shuffle.HandleCors(resp, request)
if cors { if cors {
@@ -1050,9 +1064,21 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
} }
} }
tutorialsFinished := userInfo.PersonalInfo.Tutorials tutorialsFinished := []shuffle.Tutorial{}
for _, tutorial := range userInfo.PersonalInfo.Tutorials {
tutorialsFinished = append(tutorialsFinished, shuffle.Tutorial{
Name: tutorial,
})
}
if len(org.SecurityFramework.SIEM.Name) > 0 || len(org.SecurityFramework.Network.Name) > 0 || len(org.SecurityFramework.EDR.Name) > 0 || len(org.SecurityFramework.Cases.Name) > 0 || len(org.SecurityFramework.IAM.Name) > 0 || len(org.SecurityFramework.Assets.Name) > 0 || len(org.SecurityFramework.Intel.Name) > 0 || len(org.SecurityFramework.Communication.Name) > 0 { if len(org.SecurityFramework.SIEM.Name) > 0 || len(org.SecurityFramework.Network.Name) > 0 || len(org.SecurityFramework.EDR.Name) > 0 || len(org.SecurityFramework.Cases.Name) > 0 || len(org.SecurityFramework.IAM.Name) > 0 || len(org.SecurityFramework.Assets.Name) > 0 || len(org.SecurityFramework.Intel.Name) > 0 || len(org.SecurityFramework.Communication.Name) > 0 {
tutorialsFinished = append(tutorialsFinished, "find_integrations") tutorialsFinished = append(tutorialsFinished, shuffle.Tutorial{
Name: "find_integrations",
})
}
for _, tutorial := range org.Tutorials {
tutorialsFinished = append(tutorialsFinished, tutorial)
} }
returnValue := shuffle.HandleInfo{ returnValue := shuffle.HandleInfo{
@@ -1072,6 +1098,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
EthInfo: userInfo.EthInfo, EthInfo: userInfo.EthInfo,
ChatDisabled: chatDisabled, ChatDisabled: chatDisabled,
Tutorials: tutorialsFinished, Tutorials: tutorialsFinished,
Priorities: orgPriorities, Priorities: orgPriorities,
} }
@@ -1369,8 +1396,12 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) {
return return
} }
// FIXME - have timeout here tutorialsFinished := []shuffle.Tutorial{}
tutorialsFinished := Userdata.PersonalInfo.Tutorials for _, tutorial := range Userdata.PersonalInfo.Tutorials {
tutorialsFinished = append(tutorialsFinished, shuffle.Tutorial{
Name: tutorial,
})
}
returnValue := shuffle.HandleInfo{ returnValue := shuffle.HandleInfo{
Success: true, Success: true,
Tutorials: tutorialsFinished, Tutorials: tutorialsFinished,
+60 -60
View File
@@ -1,65 +1,65 @@
version: '3' version: '3'
services: services:
frontend: #frontend:
#build: ./frontend # #build: ./frontend
image: ghcr.io/shuffle/shuffle-frontend:nightly # image: ghcr.io/shuffle/shuffle-frontend:nightly
container_name: shuffle-frontend # container_name: shuffle-frontend
hostname: shuffle-frontend # hostname: shuffle-frontend
ports: # ports:
- "${FRONTEND_PORT}:80" # - "${FRONTEND_PORT}:80"
- "${FRONTEND_PORT_HTTPS}:443" # - "${FRONTEND_PORT_HTTPS}:443"
networks: # networks:
- shuffle # - shuffle
environment: # environment:
- BACKEND_HOSTNAME=${BACKEND_HOSTNAME} # - BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
restart: unless-stopped # restart: unless-stopped
depends_on: # depends_on:
- backend # - backend
backend: #backend:
#build: ./backend # #build: ./backend
image: ghcr.io/shuffle/shuffle-backend:nightly # image: ghcr.io/shuffle/shuffle-backend:nightly
container_name: shuffle-backend # container_name: shuffle-backend
hostname: ${BACKEND_HOSTNAME} # hostname: ${BACKEND_HOSTNAME}
# Here for debugging: # # Here for debugging:
ports: # ports:
- "${BACKEND_PORT}:5001" # - "${BACKEND_PORT}:5001"
networks: # networks:
- shuffle # - shuffle
volumes: # volumes:
- /var/run/docker.sock:/var/run/docker.sock # - /var/run/docker.sock:/var/run/docker.sock
- ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z # - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
- ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z # - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
#- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate # #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
env_file: .env # env_file: .env
environment: # environment:
#- DOCKER_HOST=tcp://docker-socket-proxy:2375 # #- DOCKER_HOST=tcp://docker-socket-proxy:2375
- SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps # - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
- SHUFFLE_FILE_LOCATION=/shuffle-files # - SHUFFLE_FILE_LOCATION=/shuffle-files
restart: unless-stopped # restart: unless-stopped
orborus: #orborus:
image: ghcr.io/shuffle/shuffle-orborus:nightly # image: ghcr.io/shuffle/shuffle-orborus:nightly
container_name: shuffle-orborus # container_name: shuffle-orborus
hostname: shuffle-orborus # hostname: shuffle-orborus
networks: # networks:
- shuffle # - shuffle
volumes: # volumes:
- /var/run/docker.sock:/var/run/docker.sock # - /var/run/docker.sock:/var/run/docker.sock
environment: # environment:
#- DOCKER_HOST=tcp://docker-socket-proxy:2375 # #- DOCKER_HOST=tcp://docker-socket-proxy:2375
- SHUFFLE_WORKER_VERSION=latest # - SHUFFLE_WORKER_VERSION=latest
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME} # - ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
- BASE_URL=http://${OUTER_HOSTNAME}:5001 # - BASE_URL=http://${OUTER_HOSTNAME}:5001
- DOCKER_API_VERSION=1.40 # - DOCKER_API_VERSION=1.40
- SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME} # - SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME}
- SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY} # - SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY}
- SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX} # - SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX}
- HTTP_PROXY=${HTTP_PROXY} # - HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY} # - HTTPS_PROXY=${HTTPS_PROXY}:qa
- SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY} # - SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY}
- SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY} # - SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY}
restart: unless-stopped # restart: unless-stopped
security_opt: # security_opt:
- seccomp:unconfined # - seccomp:unconfined
opensearch: opensearch:
image: opensearchproject/opensearch:2.4.0 image: opensearchproject/opensearch:2.4.0
hostname: shuffle-opensearch hostname: shuffle-opensearch
+3 -2
View File
@@ -54,9 +54,10 @@ if (window.location.port === "3000") {
//globalUrl = "http://localhost:5002" //globalUrl = "http://localhost:5002"
} }
if (globalUrl.includes("githubpreview.dev")) { // Development on Github Codespaces
if (globalUrl.includes("app.github.dev")) {
//globalUrl = globalUrl.replace("3000", "5001") //globalUrl = globalUrl.replace("3000", "5001")
globalUrl = "https://frikky-shuffle-5gvr4xx62w64-5001.githubpreview.dev" globalUrl = "https://frikky-shuffle-5gvr4xx62w64-5001.preview.app.github.dev"
} }
//console.log("global: ", globalUrl) //console.log("global: ", globalUrl)
+12 -1
View File
@@ -786,7 +786,9 @@ const UsecaseSearch = (props) => {
} }
const mergeWorkflowUsecases = (usecasedata) => { const mergeWorkflowUsecases = (usecasedata) => {
const url = `${globalUrl}/api/v1/workflows/merge`; //const url = `${globalUrl}/api/v1/workflows/merge`;
//const url = `https://0360-178-232-150-183.ngrok.io/api/v1/workflows/merge`;
const url = `https://shuffler.io/api/v1/workflows/merge`;
fetch(url, { fetch(url, {
mode: "cors", mode: "cors",
method: "POST", method: "POST",
@@ -802,6 +804,7 @@ const UsecaseSearch = (props) => {
response.json().then((responseJson) => { response.json().then((responseJson) => {
setIsUploading(false) setIsUploading(false)
var changed = false var changed = false
if (responseJson.success === false) { if (responseJson.success === false) {
if (responseJson.reason !== null && responseJson.reason !== undefined) { if (responseJson.reason !== null && responseJson.reason !== undefined) {
//alert.error(responseJson.reason) //alert.error(responseJson.reason)
@@ -842,6 +845,11 @@ const UsecaseSearch = (props) => {
} }
} }
} else { } else {
if (!isCloud) {
console.log("Not cloud!")
setFoundWorkflowId(responseJson.id)
setWorkflow(responseJson)
} else if (isCloud) {
if (responseJson.workflow_id !== null && responseJson.workflow_id !== undefined) { if (responseJson.workflow_id !== null && responseJson.workflow_id !== undefined) {
if (responseJson.added_auth !== undefined && responseJson.added_auth !== null && responseJson.added_auth.length > 0) { if (responseJson.added_auth !== undefined && responseJson.added_auth !== null && responseJson.added_auth.length > 0) {
console.log("SHOULD HANDLE AUTH: ", responseJson.added_auth) console.log("SHOULD HANDLE AUTH: ", responseJson.added_auth)
@@ -867,6 +875,9 @@ const UsecaseSearch = (props) => {
if (responseJson.auth_required === true) { if (responseJson.auth_required === true) {
console.log("SET AUTH AS NEXT STEP!") console.log("SET AUTH AS NEXT STEP!")
} }
}
} }
if (changed === true) { if (changed === true) {
+7 -9
View File
@@ -162,7 +162,6 @@ const WelcomeForm = (props) => {
if (foundTab !== null && foundTab !== undefined && !isNaN(foundTab)) { if (foundTab !== null && foundTab !== undefined && !isNaN(foundTab)) {
if (foundTab === 3 || foundTab === "3") { if (foundTab === 3 || foundTab === "3") {
console.log("SET SEARCH!!") console.log("SET SEARCH!!")
//setclickdiff(240)
} }
} else { } else {
//navigate(`/welcome?tab=1`) //navigate(`/welcome?tab=1`)
@@ -298,7 +297,7 @@ const WelcomeForm = (props) => {
if (activeStep === 0) { if (activeStep === 0) {
console.log("Should send basic information about org (fetch)") console.log("Should send basic information about org (fetch)")
setclickdiff(0) setclickdiff(240)
navigate(`/welcome?tab=2`) navigate(`/welcome?tab=2`)
if (isCloud) { if (isCloud) {
@@ -321,8 +320,6 @@ const WelcomeForm = (props) => {
console.log("Should send secondary info about apps and other things") console.log("Should send secondary info about apps and other things")
setDiscoveryWrapper({}) setDiscoveryWrapper({})
setclickdiff(240)
//setclickdiff(0)
navigate(`/welcome?tab=3`) navigate(`/welcome?tab=3`)
//handleSetSearch("Enrichment", "2. Enrich") //handleSetSearch("Enrichment", "2. Enrich")
handleSetSearch(usecaseButtons[0].name, usecaseButtons[0].usecase) handleSetSearch(usecaseButtons[0].name, usecaseButtons[0].usecase)
@@ -356,10 +353,8 @@ const WelcomeForm = (props) => {
if (getFramework !== undefined) { if (getFramework !== undefined) {
getFramework() getFramework()
} }
setclickdiff(0)
navigate("/welcome?tab=2") navigate("/welcome?tab=2")
} else if (activeStep === 1) { } else if (activeStep === 1) {
//setclickdiff(0)
navigate("/welcome?tab=1") navigate("/welcome?tab=1")
} }
}; };
@@ -376,6 +371,7 @@ const WelcomeForm = (props) => {
return newSkipped; return newSkipped;
}); });
}; };
const handleReset = () => { const handleReset = () => {
setActiveStep(0); setActiveStep(0);
}; };
@@ -384,6 +380,7 @@ const WelcomeForm = (props) => {
console.log("Selected app changed (effect)") console.log("Selected app changed (effect)")
}, [newSelectedApp]) }, [newSelectedApp])
console.log("Clickdiff: ", clickdiff)
//const buttonWidth = 145 //const buttonWidth = 145
const buttonWidth = 450 const buttonWidth = 450
@@ -434,7 +431,7 @@ const WelcomeForm = (props) => {
</Typography> </Typography>
*/} */}
<Typography variant="body1" style={{marginLeft: 8, marginTop: 10, marginRight: 30, }} color="textSecondary"> <Typography variant="body1" style={{marginLeft: 8, marginTop: 10, marginRight: 30, }} color="textSecondary">
First, we need some more information in order to understand how we best can help you find relevant Usecases. This is optional, but highly encouraged. In order to understand how we best can help you find relevant Usecases, please provide the information below. This is optional, but highly encouraged.
</Typography> </Typography>
<Grid item xs={11} style={{marginTop: 16, padding: 0,}}> <Grid item xs={11} style={{marginTop: 16, padding: 0,}}>
<TextField <TextField
@@ -761,7 +758,7 @@ const WelcomeForm = (props) => {
disabled={activeStep === 0} disabled={activeStep === 0}
onClick={handleBack} onClick={handleBack}
variant={"outlined"} variant={"outlined"}
style={{marginLeft: 10, height: 64, width: 100, position: "absolute", top: activeStep === 1 ? -594 : -577, left: activeStep === 1 ? 105+clickdiff : -145+clickdiff, }} style={{marginLeft: 10, height: 64, width: 100, position: "absolute", top: activeStep === 1 ? -600 : -577, left: activeStep === 1 ? 105 : -145+clickdiff, }}
> >
Back Back
</Button> </Button>
@@ -769,7 +766,7 @@ const WelcomeForm = (props) => {
variant={"outlined"} variant={"outlined"}
color="primary" color="primary"
onClick={handleNext} onClick={handleNext}
style={{marginLeft: 10, height: 64, width: 100, position: "absolute", top: activeStep === 1 ? -594 : -577, left: activeStep === 1 ? 758+clickdiff : 510+clickdiff, }} style={{marginLeft: 10, height: 64, width: 100, position: "absolute", top: activeStep === 1 ? -600: -577, left: activeStep === 1 ? 748 : 510+clickdiff, }}
disabled={activeStep === 0 ? orgName.length === 0 || name.length === 0 : false} disabled={activeStep === 0 ? orgName.length === 0 || name.length === 0 : false}
> >
{activeStep === steps.length - 1 ? "Finish" : "Next"} {activeStep === steps.length - 1 ? "Finish" : "Next"}
@@ -805,6 +802,7 @@ const WelcomeForm = (props) => {
onClick={() => { onClick={() => {
console.log("Skip!") console.log("Skip!")
setclickdiff(240)
if (isCloud) { if (isCloud) {
ReactGA.event({ ReactGA.event({
category: "welcome", category: "welcome",
+3 -1
View File
@@ -317,7 +317,7 @@ const Welcome = (props) => {
*/} */}
{showWelcome === true ? {showWelcome === true ?
<div> <div>
<div style={{minWidth: 500, maxWidth: 500, margin: "auto",}}> <div style={{minWidth: 500, maxWidth: 500, margin: "auto", marginTop: isCloud ? "auto" : 20, }}>
<Stepper <Stepper
activeStep={activeStep} activeStep={activeStep}
color="primary" color="primary"
@@ -430,6 +430,8 @@ const Welcome = (props) => {
action: "click_welcome_continue", action: "click_welcome_continue",
label: "", label: "",
}) })
} else {
//setActiveStep(1)
} }
setShowWelcome(true) setShowWelcome(true)
+3 -3
View File
@@ -569,7 +569,6 @@ const Workflows = (props) => {
const sidebarKey = "getting_started_sidebar" const sidebarKey = "getting_started_sidebar"
if (isLoggedIn === true && gettingStartedItems.length === 0 && (userdata.tutorials !== undefined && userdata.tutorials !== null && userdata.tutorials.length > 0) && workflowDone === true) { if (isLoggedIn === true && gettingStartedItems.length === 0 && (userdata.tutorials !== undefined && userdata.tutorials !== null && userdata.tutorials.length > 0) && workflowDone === true) {
const activeFiltered = userdata.tutorials.filter((item) => item.active === true) const activeFiltered = userdata.tutorials.filter((item) => item.active === true)
if (activeFiltered.length > 0) { if (activeFiltered.length > 0) {
var newfiltered = [] var newfiltered = []
@@ -583,6 +582,7 @@ const Workflows = (props) => {
newfiltered.push(activeFiltered[key]) newfiltered.push(activeFiltered[key])
} }
setGettingStartedItems(activeFiltered) setGettingStartedItems(activeFiltered)
const doneFiltered = activeFiltered.filter((item) => item.done === true) const doneFiltered = activeFiltered.filter((item) => item.done === true)
@@ -1583,7 +1583,7 @@ const Workflows = (props) => {
}; };
return ( return (
<Grid item xs={isMobile ? 12 : 4} style={{ padding: "12px 10px 12px 10px" }}> <Grid item xs={isMobile || workflows.length === 0 ? 12 : 4} style={{ padding: "12px 10px 12px 10px" }}>
<Paper <Paper
square square
style={setupPaperStyle} style={setupPaperStyle}
@@ -3710,7 +3710,7 @@ const Workflows = (props) => {
color: "white", color: "white",
fontSize: 18, fontSize: 18,
borderLeft: theme.palette.defaultBorder, borderLeft: theme.palette.defaultBorder,
marginTop: 64, marginTop: 66,
borderRadius: "5px 0px 0px 0px", borderRadius: "5px 0px 0px 0px",
}, },
}} }}