Added more links and pointing to getting started page

This commit is contained in:
frikky
2022-02-06 19:56:02 +01:00
parent d3ec5c4ffa
commit 546f0bd841
3 changed files with 69 additions and 19 deletions
+20 -1
View File
@@ -3650,7 +3650,26 @@ const Admin = (props) => {
bgColor = "#1f2023"; bgColor = "#1f2023";
} }
console.log("Auth data: ", data) //console.log("Auth data: ", data)
if (data.type === "oauth2") {
data.fields = [
{
"key": "url",
"value": "Secret. Replaced during app execution!",
},
{
"key": "client_id",
"value": "Secret. Replaced during app execution!",
},
{
"key": "client_secret",
"value": "Secret. Replaced during app execution!",
},
{
"key": "scope",
"value": "Secret. Replaced during app execution!",
}]
}
return ( return (
<ListItem key={index} style={{ backgroundColor: bgColor }}> <ListItem key={index} style={{ backgroundColor: bgColor }}>
+5 -1
View File
@@ -1515,7 +1515,7 @@ const AngularWorkflow = (defaultprops) => {
}) })
.catch((error) => { .catch((error) => {
setAppsLoaded(true) setAppsLoaded(true)
alert.error("App loading error: ", error.toString()); alert.error("App loading error: "+error.toString());
}); });
}; };
@@ -3085,6 +3085,7 @@ const AngularWorkflow = (defaultprops) => {
} }
} }
if ( if (
nodedata.parameters !== undefined && nodedata.parameters !== undefined &&
nodedata.parameters !== null && nodedata.parameters !== null &&
@@ -5134,6 +5135,8 @@ const AngularWorkflow = (defaultprops) => {
// AUTHENTICATION // AUTHENTICATION
if (app.authentication.required) { if (app.authentication.required) {
console.log("App auth is required!")
// Setup auth here :) // Setup auth here :)
const authenticationOptions = []; const authenticationOptions = [];
var findAuthId = ""; var findAuthId = "";
@@ -5145,6 +5148,7 @@ const AngularWorkflow = (defaultprops) => {
findAuthId = newAppData.authentication_id; findAuthId = newAppData.authentication_id;
} }
console.log("Found auth: ", findAuthId)
var tmpAuth = JSON.parse(JSON.stringify(appAuthentication)); var tmpAuth = JSON.parse(JSON.stringify(appAuthentication));
for (var key in tmpAuth) { for (var key in tmpAuth) {
var item = tmpAuth[key]; var item = tmpAuth[key];
+32 -5
View File
@@ -2,6 +2,7 @@ import React, { useEffect, useContext } from "react";
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@material-ui/core/styles";
import { useTheme } from "@material-ui/core/styles"; import { useTheme } from "@material-ui/core/styles";
import ReactGA from 'react-ga';
import SecurityFramework from '../components/SecurityFramework.jsx'; import SecurityFramework from '../components/SecurityFramework.jsx';
import { import {
@@ -67,7 +68,7 @@ import { DataGrid, GridToolbar } from "@material-ui/data-grid";
//import JSONPrettyMon from 'react-json-pretty/dist/monikai' //import JSONPrettyMon from 'react-json-pretty/dist/monikai'
import Dropzone from "../components/Dropzone"; import Dropzone from "../components/Dropzone";
import { Link } from "react-router-dom"; import { useNavigate, Link, useParams } from "react-router-dom";
import { useAlert } from "react-alert"; import { useAlert } from "react-alert";
import ChipInput from "material-ui-chip-input"; import ChipInput from "material-ui-chip-input";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
@@ -440,6 +441,7 @@ const GettingStarted = (props) => {
const theme = useTheme(); const theme = useTheme();
const alert = useAlert(); const alert = useAlert();
const classes = useStyles(theme); const classes = useStyles(theme);
let navigate = useNavigate();
const imgSize = 60; const imgSize = 60;
const referenceUrl = globalUrl + "/api/v1/hooks/"; const referenceUrl = globalUrl + "/api/v1/hooks/";
@@ -2504,12 +2506,19 @@ const GettingStarted = (props) => {
const textSpacingDiff = 8 const textSpacingDiff = 8
const textType = "body2" const textType = "body2"
// Discover <a target="_blank" href="https://shuffler.io/creators" style={{textDecoration: "none", color: "#f86a3e",}}>use-cases made by other creators</a>! // Discover <a target="_blank" href="https://shuffler.io/search?tab=workflows" style={{textDecoration: "none", color: "#f86a3e",}}>use-cases made by us and other creators</a>!
const steps = [ const steps = [
{ {
html: ( html: (
<Typography variant={textType} style={{marginTop: textSpacingDiff}}> <Typography variant={textType} style={{marginTop: textSpacingDiff}} onClick={() => {
<Link to="/detectionframework" style={{textDecoration: "none", color: "#f86a3e",}}>Find your integrations</Link> by following our simple detection framework! if (isCloud) {
ReactGA.event({
category: "getting-started",
action: `integerations_find_click`,
})
}
}}>
<Link to="/detectionframework" style={{textDecoration: "none", color: "#f86a3e",}}>Discover your apps</Link> by following our simple security model!
</Typography> </Typography>
), ),
tutorial: "find_integrations", tutorial: "find_integrations",
@@ -2518,7 +2527,18 @@ const GettingStarted = (props) => {
html: html:
<Typography variant={textType} style={{marginTop: textSpacingDiff}}> <Typography variant={textType} style={{marginTop: textSpacingDiff}}>
Discover <span style={{cursor: "pointer", textDecoration: "none", color: "#f86a3e",}} onClick={() => { Discover <span style={{cursor: "pointer", textDecoration: "none", color: "#f86a3e",}} onClick={() => {
if (isCloud) {
navigate(`/search?tab=workflows`)
ReactGA.event({
category: "getting-started",
action: `workflow_find_click`,
})
return
} else {
alert.success("TBD: Coming in version 1.0.0"); alert.success("TBD: Coming in version 1.0.0");
}
const ele = document.getElementById("shuffle_search_field") const ele = document.getElementById("shuffle_search_field")
if (ele !== undefined && ele !== null) { if (ele !== undefined && ele !== null) {
@@ -2537,7 +2557,14 @@ const GettingStarted = (props) => {
}, },
{ {
html: ( html: (
<Typography variant={textType} style={{marginTop: textSpacingDiff}}> <Typography variant={textType} style={{marginTop: textSpacingDiff}} onClick={() => {
if (isCloud) {
ReactGA.event({
category: "getting-started",
action: `create_workflow_click`,
})
}
}}>
Learn to use Shuffle by&nbsp; Learn to use Shuffle by&nbsp;
<span style={{cursor: "pointer", color: "#f86a3e",}} onClick={() => {setModalOpen(true)}}> <span style={{cursor: "pointer", color: "#f86a3e",}} onClick={() => {setModalOpen(true)}}>
creating your first workflow creating your first workflow