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/frikky/kin-openapi => ../../../../git/kin-openapi
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
require (
cloud.google.com/go/datastore v1.6.0
cloud.google.com/go/iam v0.1.1 // indirect
cloud.google.com/go/pubsub v1.17.1
cloud.google.com/go/storage v1.18.2
cloud.google.com/go/datastore v1.10.0
cloud.google.com/go/pubsub v1.27.1
cloud.google.com/go/storage v1.28.1
github.com/basgys/goxml2json v1.1.0
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/fsouza/go-dockerclient v1.7.7
github.com/fsouza/go-dockerclient v1.9.0
github.com/ghodss/yaml v1.0.0
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/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/shuffle/shuffle-shared v0.3.24
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
google.golang.org/api v0.65.0
github.com/shuffle/shuffle-shared v0.3.33
golang.org/x/crypto v0.3.0
google.golang.org/api v0.103.0
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/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
)
+37 -6
View File
@@ -691,13 +691,25 @@ func createNewUser(username, password, role, apikey string, org shuffle.OrgMini)
err = shuffle.SetUser(ctx, newUser, true)
if err != nil {
log.Printf("Error adding User %s: %s", username, err)
log.Printf("[ERROR] Problem adding User %s: %s", username, err)
return err
}
neworg, err := shuffle.GetOrg(ctx, org.Id)
if err == nil {
//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)
if err != nil {
log.Printf("Failed updating org with user %s", newUser.Username)
@@ -843,6 +855,8 @@ func handleCookie(request *http.Request) bool {
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) {
cors := shuffle.HandleCors(resp, request)
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 {
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{
@@ -1072,7 +1098,8 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
EthInfo: userInfo.EthInfo,
ChatDisabled: chatDisabled,
Tutorials: tutorialsFinished,
Priorities: orgPriorities,
Priorities: orgPriorities,
}
returnData, err := json.Marshal(returnValue)
@@ -1369,8 +1396,12 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) {
return
}
// FIXME - have timeout here
tutorialsFinished := Userdata.PersonalInfo.Tutorials
tutorialsFinished := []shuffle.Tutorial{}
for _, tutorial := range Userdata.PersonalInfo.Tutorials {
tutorialsFinished = append(tutorialsFinished, shuffle.Tutorial{
Name: tutorial,
})
}
returnValue := shuffle.HandleInfo{
Success: true,
Tutorials: tutorialsFinished,
+60 -60
View File
@@ -1,65 +1,65 @@
version: '3'
services:
frontend:
#build: ./frontend
image: ghcr.io/shuffle/shuffle-frontend:nightly
container_name: shuffle-frontend
hostname: shuffle-frontend
ports:
- "${FRONTEND_PORT}:80"
- "${FRONTEND_PORT_HTTPS}:443"
networks:
- shuffle
environment:
- BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
restart: unless-stopped
depends_on:
- backend
backend:
#build: ./backend
image: ghcr.io/shuffle/shuffle-backend:nightly
container_name: shuffle-backend
hostname: ${BACKEND_HOSTNAME}
# Here for debugging:
ports:
- "${BACKEND_PORT}:5001"
networks:
- shuffle
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
- ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
#- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
env_file: .env
environment:
#- DOCKER_HOST=tcp://docker-socket-proxy:2375
- SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
- SHUFFLE_FILE_LOCATION=/shuffle-files
restart: unless-stopped
orborus:
image: ghcr.io/shuffle/shuffle-orborus:nightly
container_name: shuffle-orborus
hostname: shuffle-orborus
networks:
- shuffle
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
#- DOCKER_HOST=tcp://docker-socket-proxy:2375
- SHUFFLE_WORKER_VERSION=latest
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
- BASE_URL=http://${OUTER_HOSTNAME}:5001
- DOCKER_API_VERSION=1.40
- SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME}
- SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY}
- SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX}
- HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY}
- SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY}
- SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY}
restart: unless-stopped
security_opt:
- seccomp:unconfined
#frontend:
# #build: ./frontend
# image: ghcr.io/shuffle/shuffle-frontend:nightly
# container_name: shuffle-frontend
# hostname: shuffle-frontend
# ports:
# - "${FRONTEND_PORT}:80"
# - "${FRONTEND_PORT_HTTPS}:443"
# networks:
# - shuffle
# environment:
# - BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
# restart: unless-stopped
# depends_on:
# - backend
#backend:
# #build: ./backend
# image: ghcr.io/shuffle/shuffle-backend:nightly
# container_name: shuffle-backend
# hostname: ${BACKEND_HOSTNAME}
# # Here for debugging:
# ports:
# - "${BACKEND_PORT}:5001"
# networks:
# - shuffle
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
# - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
# #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
# env_file: .env
# environment:
# #- DOCKER_HOST=tcp://docker-socket-proxy:2375
# - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
# - SHUFFLE_FILE_LOCATION=/shuffle-files
# restart: unless-stopped
#orborus:
# image: ghcr.io/shuffle/shuffle-orborus:nightly
# container_name: shuffle-orborus
# hostname: shuffle-orborus
# networks:
# - shuffle
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# environment:
# #- DOCKER_HOST=tcp://docker-socket-proxy:2375
# - SHUFFLE_WORKER_VERSION=latest
# - ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
# - BASE_URL=http://${OUTER_HOSTNAME}:5001
# - DOCKER_API_VERSION=1.40
# - SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME}
# - SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY}
# - SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX}
# - HTTP_PROXY=${HTTP_PROXY}
# - HTTPS_PROXY=${HTTPS_PROXY}:qa
# - SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY}
# - SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY}
# restart: unless-stopped
# security_opt:
# - seccomp:unconfined
opensearch:
image: opensearchproject/opensearch:2.4.0
hostname: shuffle-opensearch
+3 -2
View File
@@ -54,9 +54,10 @@ if (window.location.port === "3000") {
//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 = "https://frikky-shuffle-5gvr4xx62w64-5001.githubpreview.dev"
globalUrl = "https://frikky-shuffle-5gvr4xx62w64-5001.preview.app.github.dev"
}
//console.log("global: ", globalUrl)
+65 -54
View File
@@ -786,7 +786,9 @@ const UsecaseSearch = (props) => {
}
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, {
mode: "cors",
method: "POST",
@@ -802,76 +804,85 @@ const UsecaseSearch = (props) => {
response.json().then((responseJson) => {
setIsUploading(false)
var changed = false
if (responseJson.success === false) {
if (responseJson.reason !== null && responseJson.reason !== undefined) {
//alert.error(responseJson.reason)
}
if (responseJson.source === "") {
const appname =
usecasedata.source.error = usecasedata.source.app_name === undefined ? "Select a Trigger workflow first" : `${usecasedata.source.app_name} has no public trigger workflow yet. Click this to try another app`
changed = true
if (responseJson.success === false) {
if (responseJson.reason !== null && responseJson.reason !== undefined) {
//alert.error(responseJson.reason)
}
if (responseJson.source === "") {
const appname =
usecasedata.source.error = usecasedata.source.app_name === undefined ? "Select a Trigger workflow first" : `${usecasedata.source.app_name} has no public trigger workflow yet. Click this to try another app`
changed = true
} else {
usecasedata.source.error = ""
changed = true
}
if (responseJson.destination === "") {
usecasedata.destination.error = usecasedata.destination.app_name === undefined ? "Select a Subflow first" : `${usecasedata.destination.app_name} has no public subflow yet. Click this to try another app`
changed = true
} else {
usecasedata.source.error = ""
usecasedata.destination.error = ""
changed = true
}
if (responseJson.destination === "") {
usecasedata.destination.error = usecasedata.destination.app_name === undefined ? "Select a Subflow first" : `${usecasedata.destination.app_name} has no public subflow yet. Click this to try another app`
changed = true
} else {
usecasedata.destination.error = ""
changed = true
}
if (responseJson.middle !== undefined) {
for (var key in responseJson.middle) {
for (var subkey in usecasedata.middle) {
if (responseJson.middle[key] === usecasedata.middle[key].text) {
console.log("Found: ")
if (usecasedata.middle[subkey].app_name === undefined || usecasedata.middle[subkey].app_name === "") {
usecasedata.middle[subkey].error = `${usecasedata.middle[subkey].type} app must be selected first. Click this to change`
} else {
usecasedata.middle[subkey].error = `${usecasedata.middle[subkey].app_name} has no public subflow yet. Click this to change`
}
if (responseJson.middle !== undefined) {
for (var key in responseJson.middle) {
for (var subkey in usecasedata.middle) {
if (responseJson.middle[key] === usecasedata.middle[key].text) {
console.log("Found: ")
if (usecasedata.middle[subkey].app_name === undefined || usecasedata.middle[subkey].app_name === "") {
usecasedata.middle[subkey].error = `${usecasedata.middle[subkey].type} app must be selected first. Click this to change`
} else {
usecasedata.middle[subkey].error = `${usecasedata.middle[subkey].app_name} has no public subflow yet. Click this to change`
changed = true
break
}
changed = true
break
}
}
}
}
} else {
if (responseJson.workflow_id !== null && responseJson.workflow_id !== undefined) {
if (responseJson.added_auth !== undefined && responseJson.added_auth !== null && responseJson.added_auth.length > 0) {
console.log("SHOULD HANDLE AUTH: ", responseJson.added_auth)
setConfigureWorkflowAuth(responseJson.added_auth)
if (setFoundWorkflowId !== undefined) {
console.log("Set found workflow id: ", responseJson.workflow_id)
setFoundWorkflowId(responseJson.workflow_id)
} 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.added_auth !== undefined && responseJson.added_auth !== null && responseJson.added_auth.length > 0) {
console.log("SHOULD HANDLE AUTH: ", responseJson.added_auth)
setConfigureWorkflowAuth(responseJson.added_auth)
if (setFoundWorkflowId !== undefined) {
console.log("Set found workflow id: ", responseJson.workflow_id)
setFoundWorkflowId(responseJson.workflow_id)
}
getWorkflow(responseJson.workflow_id)
getAppAuthentication()
} else {
if (setFoundWorkflowId !== undefined) {
console.log("Set found workflow id: ", responseJson.workflow_id)
setFoundWorkflowId(responseJson.workflow_id)
}
setWorkflow({"id": responseJson.workflow_id})
}
}
getWorkflow(responseJson.workflow_id)
getAppAuthentication()
} else {
if (setFoundWorkflowId !== undefined) {
console.log("Set found workflow id: ", responseJson.workflow_id)
setFoundWorkflowId(responseJson.workflow_id)
if (responseJson.auth_required === true) {
console.log("SET AUTH AS NEXT STEP!")
}
setWorkflow({"id": responseJson.workflow_id})
}
}
if (responseJson.auth_required === true) {
console.log("SET AUTH AS NEXT STEP!")
if (changed === true) {
setAllUsecases([usecasedata])
}
}
if (changed === true) {
setAllUsecases([usecasedata])
}
})
)
.catch((error) => {
+8 -10
View File
@@ -162,7 +162,6 @@ const WelcomeForm = (props) => {
if (foundTab !== null && foundTab !== undefined && !isNaN(foundTab)) {
if (foundTab === 3 || foundTab === "3") {
console.log("SET SEARCH!!")
//setclickdiff(240)
}
} else {
//navigate(`/welcome?tab=1`)
@@ -298,7 +297,7 @@ const WelcomeForm = (props) => {
if (activeStep === 0) {
console.log("Should send basic information about org (fetch)")
setclickdiff(0)
setclickdiff(240)
navigate(`/welcome?tab=2`)
if (isCloud) {
@@ -321,8 +320,6 @@ const WelcomeForm = (props) => {
console.log("Should send secondary info about apps and other things")
setDiscoveryWrapper({})
setclickdiff(240)
//setclickdiff(0)
navigate(`/welcome?tab=3`)
//handleSetSearch("Enrichment", "2. Enrich")
handleSetSearch(usecaseButtons[0].name, usecaseButtons[0].usecase)
@@ -356,10 +353,8 @@ const WelcomeForm = (props) => {
if (getFramework !== undefined) {
getFramework()
}
setclickdiff(0)
navigate("/welcome?tab=2")
} else if (activeStep === 1) {
//setclickdiff(0)
navigate("/welcome?tab=1")
}
};
@@ -376,6 +371,7 @@ const WelcomeForm = (props) => {
return newSkipped;
});
};
const handleReset = () => {
setActiveStep(0);
};
@@ -384,6 +380,7 @@ const WelcomeForm = (props) => {
console.log("Selected app changed (effect)")
}, [newSelectedApp])
console.log("Clickdiff: ", clickdiff)
//const buttonWidth = 145
const buttonWidth = 450
@@ -434,7 +431,7 @@ const WelcomeForm = (props) => {
</Typography>
*/}
<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>
<Grid item xs={11} style={{marginTop: 16, padding: 0,}}>
<TextField
@@ -761,7 +758,7 @@ const WelcomeForm = (props) => {
disabled={activeStep === 0}
onClick={handleBack}
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
</Button>
@@ -769,7 +766,7 @@ const WelcomeForm = (props) => {
variant={"outlined"}
color="primary"
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}
>
{activeStep === steps.length - 1 ? "Finish" : "Next"}
@@ -804,7 +801,8 @@ const WelcomeForm = (props) => {
color="secondary"
onClick={() => {
console.log("Skip!")
setclickdiff(240)
if (isCloud) {
ReactGA.event({
category: "welcome",
+4 -2
View File
@@ -309,7 +309,7 @@ const Welcome = (props) => {
}
return (
<div style={{width: 1000, margin: "auto", backgroundColor: theme.palette.platformColor, paddingBottom: 150, minHeight: 1500,}}>
<div style={{width: 1000, margin: "auto", backgroundColor: theme.palette.platformColor, paddingBottom: 150, minHeight: 1500, }}>
{/*
<div style={{position: "fixed", bottom: 110, right: 110, display: "flex", }}>
<img src="/images/Arrow.png" style={{width: 250, height: "100%",}} />
@@ -317,7 +317,7 @@ const Welcome = (props) => {
*/}
{showWelcome === true ?
<div>
<div style={{minWidth: 500, maxWidth: 500, margin: "auto",}}>
<div style={{minWidth: 500, maxWidth: 500, margin: "auto", marginTop: isCloud ? "auto" : 20, }}>
<Stepper
activeStep={activeStep}
color="primary"
@@ -430,6 +430,8 @@ const Welcome = (props) => {
action: "click_welcome_continue",
label: "",
})
} else {
//setActiveStep(1)
}
setShowWelcome(true)
+3 -3
View File
@@ -569,7 +569,6 @@ const Workflows = (props) => {
const sidebarKey = "getting_started_sidebar"
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)
if (activeFiltered.length > 0) {
var newfiltered = []
@@ -583,6 +582,7 @@ const Workflows = (props) => {
newfiltered.push(activeFiltered[key])
}
setGettingStartedItems(activeFiltered)
const doneFiltered = activeFiltered.filter((item) => item.done === true)
@@ -1583,7 +1583,7 @@ const Workflows = (props) => {
};
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
square
style={setupPaperStyle}
@@ -3710,7 +3710,7 @@ const Workflows = (props) => {
color: "white",
fontSize: 18,
borderLeft: theme.palette.defaultBorder,
marginTop: 64,
marginTop: 66,
borderRadius: "5px 0px 0px 0px",
},
}}