Fixed uuid issues during install
This commit is contained in:
@@ -81,8 +81,12 @@ https://shuffler.io/docs/configuration
|
|||||||
# Local development installation
|
# Local development installation
|
||||||
Local development is pretty straight forward with **ReactJS** and **Golang**. This part is intended to help you run the code for development purposes.
|
Local development is pretty straight forward with **ReactJS** and **Golang**. This part is intended to help you run the code for development purposes.
|
||||||
|
|
||||||
**PS: You have to stop the Backend Docker container to get this one working**
|
1. Fork the project! This allows for pull-requests to Shuffle.
|
||||||
**PPS: Use the "Launch" branch when developing to get it set up easier**
|
2. Find the part below that matches what you want to change (e.g. frontend)
|
||||||
|
3. Run that part locally - NOT in Docker
|
||||||
|
|
||||||
|
**PS: You have to stop the Backend Docker container to get the backend running**
|
||||||
|
**PPS: Use the "launch" branch when developing to get it set up easier**
|
||||||
|
|
||||||
## Frontend - ReactJS /w cytoscape
|
## Frontend - ReactJS /w cytoscape
|
||||||
http://localhost:3000 - Requires [npm](https://nodejs.org/en/download/)/[yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable)/your preferred manager. Runs independently from backend.
|
http://localhost:3000 - Requires [npm](https://nodejs.org/en/download/)/[yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable)/your preferred manager. Runs independently from backend.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module shuffle
|
|||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
|
//replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
|
||||||
|
|
||||||
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
|
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ require (
|
|||||||
github.com/docker/go-units v0.4.0 // indirect
|
github.com/docker/go-units v0.4.0 // indirect
|
||||||
github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect
|
github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect
|
||||||
github.com/frikky/kin-openapi v0.40.0
|
github.com/frikky/kin-openapi v0.40.0
|
||||||
github.com/frikky/shuffle-shared v0.0.82
|
github.com/frikky/shuffle-shared v0.0.83
|
||||||
github.com/fsouza/go-dockerclient v1.7.2
|
github.com/fsouza/go-dockerclient v1.7.2
|
||||||
github.com/ghodss/yaml v1.0.0
|
github.com/ghodss/yaml v1.0.0
|
||||||
github.com/go-git/go-billy/v5 v5.0.0
|
github.com/go-git/go-billy/v5 v5.0.0
|
||||||
|
|||||||
@@ -3361,9 +3361,12 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User) {
|
|||||||
log.Printf("[ERROR] Failed saving app %s to database: %s", newmd5, err)
|
log.Printf("[ERROR] Failed saving app %s to database: %s", newmd5, err)
|
||||||
resp.WriteHeader(500)
|
resp.WriteHeader(500)
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": true, "reason": "%"}`, err)))
|
resp.Write([]byte(fmt.Sprintf(`{"success": true, "reason": "%"}`, err)))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
shuffle.SetOpenApiDatastore(ctx, api.ID, parsed)
|
shuffle.SetOpenApiDatastore(ctx, api.ID, parsed)
|
||||||
|
} else {
|
||||||
|
//log.Printf("
|
||||||
}
|
}
|
||||||
|
|
||||||
// Backup every single one
|
// Backup every single one
|
||||||
@@ -3388,6 +3391,7 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User) {
|
|||||||
shuffle.DeleteCache(ctx, cacheKey)
|
shuffle.DeleteCache(ctx, cacheKey)
|
||||||
shuffle.DeleteCache(ctx, fmt.Sprintf("apps_%s", user.Id))
|
shuffle.DeleteCache(ctx, fmt.Sprintf("apps_%s", user.Id))
|
||||||
|
|
||||||
|
log.Printf("[DEBUG] Successfully built app %s (%s)", api.Name, api.ID)
|
||||||
if len(user.Id) > 0 {
|
if len(user.Id) > 0 {
|
||||||
resp.WriteHeader(200)
|
resp.WriteHeader(200)
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": true, "id": "%s"}`, api.ID)))
|
resp.Write([]byte(fmt.Sprintf(`{"success": true, "id": "%s"}`, api.ID)))
|
||||||
@@ -3871,6 +3875,15 @@ func runInitCloudSetup() {
|
|||||||
func runInitEs(ctx context.Context) {
|
func runInitEs(ctx context.Context) {
|
||||||
log.Printf("[DEBUG] Starting INIT setup (ES)")
|
log.Printf("[DEBUG] Starting INIT setup (ES)")
|
||||||
|
|
||||||
|
httpProxy := os.Getenv("HTTP_PROXY")
|
||||||
|
if len(httpProxy) > 0 {
|
||||||
|
log.Printf("Running with HTTP proxy %s (env: HTTP_PROXY)", httpProxy)
|
||||||
|
}
|
||||||
|
httpsProxy := os.Getenv("HTTPS_PROXY")
|
||||||
|
if len(httpsProxy) > 0 {
|
||||||
|
log.Printf("Running with HTTPS proxy %s (env: HTTPS_PROXY)", httpsProxy)
|
||||||
|
}
|
||||||
|
|
||||||
defaultEnv := os.Getenv("ORG_ID")
|
defaultEnv := os.Getenv("ORG_ID")
|
||||||
if len(defaultEnv) == 0 {
|
if len(defaultEnv) == 0 {
|
||||||
defaultEnv = "Shuffle"
|
defaultEnv = "Shuffle"
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
backend:
|
backend:
|
||||||
#build: ./backend
|
build: ./backend
|
||||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
image: ghcr.io/frikky/shuffle-backend:nightly
|
||||||
container_name: shuffle-backend
|
container_name: shuffle-backend
|
||||||
hostname: ${BACKEND_HOSTNAME}
|
hostname: ${BACKEND_HOSTNAME}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, {useRef, useState, useEffect, useLayoutEffect} from 'react';
|
|||||||
import { useInterval } from 'react-powerhooks';
|
import { useInterval } from 'react-powerhooks';
|
||||||
import { useTheme } from '@material-ui/core/styles';
|
import { useTheme } from '@material-ui/core/styles';
|
||||||
|
|
||||||
import uuid from "uuid";
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import {Link} from 'react-router-dom';
|
import {Link} from 'react-router-dom';
|
||||||
import { Prompt } from 'react-router'
|
import { Prompt } from 'react-router'
|
||||||
import { useBeforeunload } from 'react-beforeunload';
|
import { useBeforeunload } from 'react-beforeunload';
|
||||||
@@ -1336,7 +1336,7 @@ const AngularWorkflow = (props) => {
|
|||||||
cy.add(edges)
|
cy.add(edges)
|
||||||
|
|
||||||
if (nodefound === true) {
|
if (nodefound === true) {
|
||||||
const newId = uuid.v4()
|
const newId = uuidv4()
|
||||||
cy.add({
|
cy.add({
|
||||||
group: "edges",
|
group: "edges",
|
||||||
data: {
|
data: {
|
||||||
@@ -1803,7 +1803,7 @@ const AngularWorkflow = (props) => {
|
|||||||
if (parentNode !== null && parentNode !== undefined) {
|
if (parentNode !== null && parentNode !== undefined) {
|
||||||
//parentNode.data()
|
//parentNode.data()
|
||||||
var newNodeData = JSON.parse(JSON.stringify(parentNode.data()))
|
var newNodeData = JSON.parse(JSON.stringify(parentNode.data()))
|
||||||
newNodeData.id = uuid.v4()
|
newNodeData.id = uuidv4.v4()
|
||||||
if (newNodeData.position !== undefined) {
|
if (newNodeData.position !== undefined) {
|
||||||
newNodeData.position = {
|
newNodeData.position = {
|
||||||
"x": newNodeData.position.x+100,
|
"x": newNodeData.position.x+100,
|
||||||
@@ -1859,7 +1859,7 @@ const AngularWorkflow = (props) => {
|
|||||||
|
|
||||||
//for (var key in sourcebranches) {
|
//for (var key in sourcebranches) {
|
||||||
// var newbranch = JSON.parse(JSON.stringify(sourcebranches[key]))
|
// var newbranch = JSON.parse(JSON.stringify(sourcebranches[key]))
|
||||||
// newbranch.id = uuid.v4()
|
// newbranch.id = uuidv4()
|
||||||
// newbranch.source_id = newNodeData.id
|
// newbranch.source_id = newNodeData.id
|
||||||
// cy.add({
|
// cy.add({
|
||||||
// group: "edges",
|
// group: "edges",
|
||||||
@@ -1869,7 +1869,7 @@ const AngularWorkflow = (props) => {
|
|||||||
|
|
||||||
for (var key in sourcebranches) {
|
for (var key in sourcebranches) {
|
||||||
var newbranch = JSON.parse(JSON.stringify(sourcebranches[key]))
|
var newbranch = JSON.parse(JSON.stringify(sourcebranches[key]))
|
||||||
newbranch.id = uuid.v4()
|
newbranch.id = uuidv4()
|
||||||
newbranch.source_id = newNodeData.id
|
newbranch.source_id = newNodeData.id
|
||||||
|
|
||||||
newbranch._id = newbranch.id
|
newbranch._id = newbranch.id
|
||||||
@@ -1883,7 +1883,7 @@ const AngularWorkflow = (props) => {
|
|||||||
|
|
||||||
for (var key in destinationbranches) {
|
for (var key in destinationbranches) {
|
||||||
var newbranch = JSON.parse(JSON.stringify(destinationbranches[key]))
|
var newbranch = JSON.parse(JSON.stringify(destinationbranches[key]))
|
||||||
newbranch.id = uuid.v4()
|
newbranch.id = uuidv4()
|
||||||
newbranch.destination_id = newNodeData.id
|
newbranch.destination_id = newNodeData.id
|
||||||
|
|
||||||
newbranch._id = newbranch.id
|
newbranch._id = newbranch.id
|
||||||
@@ -2503,7 +2503,7 @@ const AngularWorkflow = (props) => {
|
|||||||
|
|
||||||
if (nodedata.type === "ACTION") {
|
if (nodedata.type === "ACTION") {
|
||||||
if (workflow.actions.length === 1 && workflow.actions[0].id === workflow.start) {
|
if (workflow.actions.length === 1 && workflow.actions[0].id === workflow.start) {
|
||||||
const newEdgeUuid = uuid.v4()
|
const newEdgeUuid = uuidv4()
|
||||||
const newcybranch = {
|
const newcybranch = {
|
||||||
"source": workflow.start,
|
"source": workflow.start,
|
||||||
"target": nodedata.id,
|
"target": nodedata.id,
|
||||||
@@ -2549,7 +2549,7 @@ const AngularWorkflow = (props) => {
|
|||||||
workflow.triggers.push(nodedata)
|
workflow.triggers.push(nodedata)
|
||||||
}
|
}
|
||||||
|
|
||||||
const newEdgeUuid = uuid.v4()
|
const newEdgeUuid = uuidv4()
|
||||||
const newcybranch = {
|
const newcybranch = {
|
||||||
"source": nodedata.id,
|
"source": nodedata.id,
|
||||||
"target": workflow.start,
|
"target": workflow.start,
|
||||||
@@ -3115,7 +3115,7 @@ const AngularWorkflow = (props) => {
|
|||||||
//parentNode.lock()
|
//parentNode.lock()
|
||||||
const px = parentNode.position('x') - 65
|
const px = parentNode.position('x') - 65
|
||||||
const py = parentNode.position('y') - 25
|
const py = parentNode.position('y') - 25
|
||||||
const circleId = newNodeId = uuid.v4()
|
const circleId = newNodeId = uuidv4()
|
||||||
|
|
||||||
parentNode.data('circleId', circleId)
|
parentNode.data('circleId', circleId)
|
||||||
|
|
||||||
@@ -3155,7 +3155,7 @@ const AngularWorkflow = (props) => {
|
|||||||
//parentNode.lock()
|
//parentNode.lock()
|
||||||
const px = parentNode.position('x') - 65
|
const px = parentNode.position('x') - 65
|
||||||
const py = parentNode.position('y') + 25
|
const py = parentNode.position('y') + 25
|
||||||
const circleId = newNodeId = uuid.v4()
|
const circleId = newNodeId = uuidv4()
|
||||||
|
|
||||||
parentNode.data('circleId', circleId)
|
parentNode.data('circleId', circleId)
|
||||||
|
|
||||||
@@ -4030,7 +4030,7 @@ const AngularWorkflow = (props) => {
|
|||||||
|
|
||||||
const triggerLabel = getNextActionName(data.name)
|
const triggerLabel = getNextActionName(data.name)
|
||||||
|
|
||||||
newNodeId = uuid.v4()
|
newNodeId = uuidv4()
|
||||||
const newposition = {
|
const newposition = {
|
||||||
"x": e.pageX-cycontainer.offsetLeft,
|
"x": e.pageX-cycontainer.offsetLeft,
|
||||||
"y": e.pageY-cycontainer.offsetTop,
|
"y": e.pageY-cycontainer.offsetTop,
|
||||||
@@ -4197,7 +4197,7 @@ const AngularWorkflow = (props) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
newNodeId = uuid.v4()
|
newNodeId = uuidv4()
|
||||||
const actionType = "ACTION"
|
const actionType = "ACTION"
|
||||||
const actionLabel = getNextActionName(app.name)
|
const actionLabel = getNextActionName(app.name)
|
||||||
var parameters = null
|
var parameters = null
|
||||||
@@ -5234,7 +5234,7 @@ const AngularWorkflow = (props) => {
|
|||||||
const duplicateCondition = (conditionIndex) => {
|
const duplicateCondition = (conditionIndex) => {
|
||||||
|
|
||||||
var newEdge = JSON.parse(JSON.stringify(selectedEdge.conditions[conditionIndex]))
|
var newEdge = JSON.parse(JSON.stringify(selectedEdge.conditions[conditionIndex]))
|
||||||
const newUuid = uuid.v4()
|
const newUuid = uuidv4()
|
||||||
newEdge.condition.id = newUuid
|
newEdge.condition.id = newUuid
|
||||||
newEdge.source.id = newUuid
|
newEdge.source.id = newUuid
|
||||||
newEdge.destination.id = newUuid
|
newEdge.destination.id = newUuid
|
||||||
@@ -5346,7 +5346,7 @@ const AngularWorkflow = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME - remove index
|
// FIXME - remove index
|
||||||
const conditionId = uuid.v4()
|
const conditionId = uuidv4()
|
||||||
return(
|
return(
|
||||||
<div style={appApiViewStyle}>
|
<div style={appApiViewStyle}>
|
||||||
<div style={{display: "flex", height: "40px", marginBottom: "30px"}}>
|
<div style={{display: "flex", height: "40px", marginBottom: "30px"}}>
|
||||||
@@ -6143,7 +6143,7 @@ const AngularWorkflow = (props) => {
|
|||||||
setSubworkflowStartnode(e.target.value)
|
setSubworkflowStartnode(e.target.value)
|
||||||
//console.log("WF: ", workflow)
|
//console.log("WF: ", workflow)
|
||||||
|
|
||||||
const branchId = uuid.v4()
|
const branchId = uuidv4()
|
||||||
const newbranch = {
|
const newbranch = {
|
||||||
"source_id": workflow.triggers[selectedTriggerIndex].id,
|
"source_id": workflow.triggers[selectedTriggerIndex].id,
|
||||||
"destination_id": e.target.value.id,
|
"destination_id": e.target.value.id,
|
||||||
@@ -8474,7 +8474,7 @@ const AngularWorkflow = (props) => {
|
|||||||
"name": newVariableName,
|
"name": newVariableName,
|
||||||
"description": "An execution variable",
|
"description": "An execution variable",
|
||||||
"value": "",
|
"value": "",
|
||||||
"id": uuid.v4(),
|
"id": uuidv4(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8607,7 +8607,7 @@ const AngularWorkflow = (props) => {
|
|||||||
"name": newVariableName,
|
"name": newVariableName,
|
||||||
"description": newVariableDescription,
|
"description": newVariableDescription,
|
||||||
"value": newVariableValue,
|
"value": newVariableValue,
|
||||||
"id": uuid.v4(),
|
"id": uuidv4(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8635,7 +8635,7 @@ const AngularWorkflow = (props) => {
|
|||||||
usage: [{
|
usage: [{
|
||||||
workflow_id: workflow.id,
|
workflow_id: workflow.id,
|
||||||
}],
|
}],
|
||||||
id: uuid.v4(),
|
id: uuidv4(),
|
||||||
active: true,
|
active: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import Dropzone from '../components/Dropzone';
|
|||||||
import {Link} from 'react-router-dom';
|
import {Link} 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 uuid from "uuid"
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import CytoscapeWrapper from '../components/RenderCytoscape'
|
import CytoscapeWrapper from '../components/RenderCytoscape'
|
||||||
|
|
||||||
//import mobileImage from '../assets/img/mobile.svg';
|
//import mobileImage from '../assets/img/mobile.svg';
|
||||||
@@ -783,7 +783,7 @@ const Workflows = (props) => {
|
|||||||
trigger.status = "stopped"
|
trigger.status = "stopped"
|
||||||
}
|
}
|
||||||
|
|
||||||
const newId = uuid.v4()
|
const newId = uuidv4()
|
||||||
if (trigger.trigger_type === "WEBHOOK") {
|
if (trigger.trigger_type === "WEBHOOK") {
|
||||||
const hookname = "webhook_"+newId
|
const hookname = "webhook_"+newId
|
||||||
if (trigger.parameters !== undefined && trigger.parameters !== null && trigger.parameters.length === 2) {
|
if (trigger.parameters !== undefined && trigger.parameters !== null && trigger.parameters.length === 2) {
|
||||||
@@ -831,7 +831,7 @@ const Workflows = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newId = uuid.v4()
|
const newId = uuidv4()
|
||||||
for (var branchkey in data.branches) {
|
for (var branchkey in data.branches) {
|
||||||
const branch = data.branches[branchkey]
|
const branch = data.branches[branchkey]
|
||||||
if (branch.source_id === data.actions[key].id) {
|
if (branch.source_id === data.actions[key].id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user