Fixed auto redirect for welcome pages
This commit is contained in:
@@ -1050,7 +1050,11 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tutorialsFinished := []string{}
|
tutorialsFinished := userInfo.PersonalInfo.Tutorials
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
|
||||||
returnValue := shuffle.HandleInfo{
|
returnValue := shuffle.HandleInfo{
|
||||||
Success: true,
|
Success: true,
|
||||||
Username: userInfo.Username,
|
Username: userInfo.Username,
|
||||||
@@ -1066,8 +1070,8 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
EthInfo: userInfo.EthInfo,
|
EthInfo: userInfo.EthInfo,
|
||||||
Tutorials: tutorialsFinished,
|
|
||||||
ChatDisabled: chatDisabled,
|
ChatDisabled: chatDisabled,
|
||||||
|
Tutorials: tutorialsFinished,
|
||||||
Priorities: orgPriorities,
|
Priorities: orgPriorities,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1533,6 +1533,7 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
multiline = data.name.startsWith("${") && data.name.endsWith("}") ? true : multiline
|
multiline = data.name.startsWith("${") && data.name.endsWith("}") ? true : multiline
|
||||||
|
|
||||||
|
console.log("Next to datafield")
|
||||||
var datafield = (
|
var datafield = (
|
||||||
<TextField
|
<TextField
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
@@ -1669,8 +1670,9 @@ const ParsedAction = (props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Finds headers from a string to be used for autocompletion
|
// Finds headers from a string to be used for autocompletion
|
||||||
|
console.log("Before header update")
|
||||||
const findHeaders = (inputdata) => {
|
const findHeaders = (inputdata) => {
|
||||||
const splitdata = inputdata.split("\n")
|
var splitdata = inputdata.split("\n")
|
||||||
|
|
||||||
var foundnewline = false
|
var foundnewline = false
|
||||||
var allValues = []
|
var allValues = []
|
||||||
@@ -1681,7 +1683,7 @@ const ParsedAction = (props) => {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitvalue = ""
|
var splitvalue = ""
|
||||||
if (line.includes(":")) {
|
if (line.includes(":")) {
|
||||||
splitvalue = ":"
|
splitvalue = ":"
|
||||||
}
|
}
|
||||||
@@ -1698,7 +1700,7 @@ const ParsedAction = (props) => {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitKeys = line.split(splitvalue)
|
var splitKeys = line.split(splitvalue)
|
||||||
if (splitKeys.length > 1) {
|
if (splitKeys.length > 1) {
|
||||||
allValues.push({
|
allValues.push({
|
||||||
key: splitKeys[0].trim(),
|
key: splitKeys[0].trim(),
|
||||||
@@ -1760,7 +1762,7 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
var newarr = []
|
var newarr = []
|
||||||
for (var key in valsplit) {
|
for (var key in valsplit) {
|
||||||
const line = valsplit[key]
|
var line = valsplit[key]
|
||||||
|
|
||||||
if (key == index) {
|
if (key == index) {
|
||||||
if (oldkey === "") {
|
if (oldkey === "") {
|
||||||
@@ -1778,7 +1780,7 @@ const ParsedAction = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newval = newarr.join("\n")
|
var newval = newarr.join("\n")
|
||||||
console.log("Fixed: ", newval)
|
console.log("Fixed: ", newval)
|
||||||
|
|
||||||
selectedActionParameters[count].value = newval
|
selectedActionParameters[count].value = newval
|
||||||
@@ -1796,7 +1798,7 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
// Find the right line to replace!
|
// Find the right line to replace!
|
||||||
//const newval = selectedActionParameters[count].value.replace(oldval, e.target.value, 1)
|
//const newval = selectedActionParameters[count].value.replace(oldval, e.target.value, 1)
|
||||||
const tmpsplit = selectedActionParameters[count].value.split("\n")
|
var tmpsplit = selectedActionParameters[count].value.split("\n")
|
||||||
var valsplit = []
|
var valsplit = []
|
||||||
var add_empty = false
|
var add_empty = false
|
||||||
for (var key in tmpsplit) {
|
for (var key in tmpsplit) {
|
||||||
@@ -1815,7 +1817,7 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
var newarr = []
|
var newarr = []
|
||||||
for (var key in valsplit) {
|
for (var key in valsplit) {
|
||||||
const line = valsplit[key]
|
var line = valsplit[key]
|
||||||
|
|
||||||
if (key == index) {
|
if (key == index) {
|
||||||
if (oldval === "") {
|
if (oldval === "") {
|
||||||
@@ -1833,7 +1835,7 @@ const ParsedAction = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newval = newarr.join("\n")
|
var newval = newarr.join("\n")
|
||||||
console.log("Fixed: ", newval)
|
console.log("Fixed: ", newval)
|
||||||
|
|
||||||
selectedActionParameters[count].value = newval
|
selectedActionParameters[count].value = newval
|
||||||
@@ -1860,6 +1862,8 @@ const ParsedAction = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("After header update")
|
||||||
|
|
||||||
//console.log("FIELD VALUE: ", data.value)
|
//console.log("FIELD VALUE: ", data.value)
|
||||||
//const regexp = new RegExp("\W+\.", "g")
|
//const regexp = new RegExp("\W+\.", "g")
|
||||||
//let match
|
//let match
|
||||||
@@ -3521,7 +3525,7 @@ const ParsedAction = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log("NO BASEURL TOO!! Why missing last one in certain scenarios (sevco)?", extraUrl, urlsplit, descSplit[line])
|
//console.log("NO BASEURL TOO!! Why missing last one in certain scenarios (sevco)?", extraUrl, urlsplit, descSplit[line])
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const SearchField = props => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form id="search_form" noValidate type="searchbox" action="" role="search" style={{margin: isCloud ? 10 : 0, }} onClick={() => {
|
<form id="search_form" noValidate type="searchbox" action="" role="search" style={{margin: 0, }} onClick={() => {
|
||||||
}}>
|
}}>
|
||||||
<TextField
|
<TextField
|
||||||
fullWidth
|
fullWidth
|
||||||
@@ -93,6 +93,7 @@ const SearchField = props => {
|
|||||||
color: "white",
|
color: "white",
|
||||||
fontSize: "1em",
|
fontSize: "1em",
|
||||||
height: 50,
|
height: 50,
|
||||||
|
margin: 0,
|
||||||
},
|
},
|
||||||
startAdornment: (
|
startAdornment: (
|
||||||
<InputAdornment position="start">
|
<InputAdornment position="start">
|
||||||
|
|||||||
@@ -316,7 +316,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">
|
||||||
We need some more information in order to understand how we best can help you find relevant Usecases in Shuffle. Giving us this info is optional, but encouraged.
|
We need some more information in order to understand how we best can help you find relevant Usecases in Shuffle.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Grid item xs={11} style={{marginTop: 16, padding: 0,}}>
|
<Grid item xs={11} style={{marginTop: 16, padding: 0,}}>
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
@@ -2748,6 +2748,8 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
left: 0,
|
left: 0,
|
||||||
selected: "",
|
selected: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("DOne in the node update")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -184,13 +184,22 @@ const LoginDialog = (props) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsLoggedIn(true);
|
if (responseJson.tutorials === undefined || responseJson.tutorials === null || !responseJson.tutorials.includes("welcome")) {
|
||||||
if (!responseJson.tutorials.includes("welcome")) {
|
|
||||||
console.log("RUN Welcome!!")
|
console.log("RUN Welcome!!")
|
||||||
window.location.pathname = "/welcome"
|
window.location.pathname = "/welcome"
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.href = "/workflows"
|
const tmpView = new URLSearchParams(window.location.search).get("view")
|
||||||
|
if (tmpView !== undefined && tmpView !== null) {
|
||||||
|
//const newUrl = `/${tmpView}${decodeURIComponent(window.location.search)}`
|
||||||
|
const newUrl = `/${tmpView}`
|
||||||
|
window.location.pathname = newUrl
|
||||||
|
} else {
|
||||||
|
window.location.pathname = "/workflows"
|
||||||
|
}
|
||||||
|
|
||||||
|
setIsLoggedIn(true);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user