Fixed Theme name issue and updated backend to 0.4.17
This commit is contained in:
@@ -6,7 +6,7 @@ import countries from "../components/Countries.jsx";
|
||||
import CodeEditor from "../components/ShuffleCodeEditor.jsx";
|
||||
import getLocalCodeData from "../components/ShuffleCodeEditor.jsx";
|
||||
import CacheView from "../components/CacheView.jsx";
|
||||
import theme from "../theme";
|
||||
import theme from "../theme.jsx";
|
||||
import AddIcon from "@mui/icons-material/Add";
|
||||
import ClearIcon from '@mui/icons-material/Clear';
|
||||
import StorageIcon from '@mui/icons-material/Storage';
|
||||
|
||||
@@ -13,7 +13,7 @@ import ReactJson from "react-json-view";
|
||||
import NestedMenuItem from "material-ui-nested-menu-item";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import { useAlert } from "react-alert";
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
import { isMobile } from "react-device-detect"
|
||||
import aa from 'search-insights'
|
||||
import Drift from "react-driftjs";
|
||||
@@ -128,7 +128,7 @@ import undoRedo from "cytoscape-undo-redo";
|
||||
|
||||
import Draggable from "react-draggable";
|
||||
|
||||
import cytoscapestyle from "../defaultCytoscapeStyle";
|
||||
import cytoscapestyle from "../defaultCytoscapeStyle.jsx";
|
||||
import cxtmenu from "cytoscape-cxtmenu";
|
||||
|
||||
import { validateJson, GetIconInfo } from "./Workflows.jsx";
|
||||
@@ -1710,7 +1710,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
//"Testing",
|
||||
const internalIds = ["Shuffle Tools", "http", "email"];
|
||||
|
||||
const getAppAuthentication = (reset, updateAction) => {
|
||||
const getAppAuthentication = (reset, updateAction, closeMenu) => {
|
||||
fetch(globalUrl + "/api/v1/apps/authentication", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
@@ -1727,6 +1727,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
return response.json();
|
||||
})
|
||||
.then((responseJson) => {
|
||||
var shouldClose = false
|
||||
if (responseJson.success) {
|
||||
var newauth = [];
|
||||
for (let authkey in responseJson.data) {
|
||||
@@ -1757,13 +1758,18 @@ const AngularWorkflow = (defaultprops) => {
|
||||
for (let authkey in tmpAuth) {
|
||||
var item = tmpAuth[authkey];
|
||||
|
||||
//console.log("Got auth: ", item);
|
||||
|
||||
const newfields = {};
|
||||
for (let filterkey in item.fields) {
|
||||
newfields[item.fields[filterkey].key] = item.fields[filterkey].value;
|
||||
}
|
||||
|
||||
item.fields = newfields;
|
||||
if (item.app.name === selectedApp.name) {
|
||||
|
||||
const appname = selectedApp.name.toLowerCase().replace(" ", "_", -1)
|
||||
const itemname = item.app.name.toLowerCase().replace(" ", "_", -1)
|
||||
if (itemname === appname) {
|
||||
authenticationOptions.push(item);
|
||||
|
||||
// Always becoming the last one
|
||||
@@ -1772,14 +1778,19 @@ const AngularWorkflow = (defaultprops) => {
|
||||
selectedAction.selectedAuthentication = item;
|
||||
|
||||
for (let actionkey in workflow.actions) {
|
||||
if (workflow.actions[actionkey].app_name === selectedApp.name) {
|
||||
const actionAppname = workflow.actions[actionkey].app_name.toLowerCase().replace(" ", "_", -1)
|
||||
if (actionAppname === appname) {
|
||||
workflow.actions[actionkey].selectedAuthentication = item;
|
||||
workflow.actions[actionkey].authentication_id = item.id;
|
||||
appUpdates = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//console.log("Not newer: ", item.edited, " vs ", latest)
|
||||
}
|
||||
} else {
|
||||
//console.log("Appname is wrong: ", appname, " vs ", itemname)
|
||||
}
|
||||
}
|
||||
|
||||
selectedAction.authentication = authenticationOptions;
|
||||
@@ -1799,18 +1810,28 @@ const AngularWorkflow = (defaultprops) => {
|
||||
setWorkflow(workflow);
|
||||
saveWorkflow(workflow);
|
||||
alert.info("Added and updated authentication!");
|
||||
shouldClose = true
|
||||
} else {
|
||||
console.log("Closing auth modal? FAIL")
|
||||
|
||||
alert.error("Failed to find new authentication. See details in Oauth2 popup window where auth was attempted.");
|
||||
shouldClose = false
|
||||
}
|
||||
} else {
|
||||
alert.info("No authentication to update");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
shouldClose = true
|
||||
}
|
||||
} else {
|
||||
setAppAuthentication([]);
|
||||
shouldClose = true
|
||||
}
|
||||
|
||||
// Auto-closing if changes were made
|
||||
if (closeMenu === true && shouldClose === true) {
|
||||
setAuthenticationModalOpen(false);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
setAppAuthentication([]);
|
||||
@@ -3364,7 +3385,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
alert.error("Failed to auto-activate the app. Go to /apps and activate it.")
|
||||
} else {
|
||||
if (refresh === true) {
|
||||
alert.success("App activated for your organization! Refresh the page to use the app.")
|
||||
//alert.success("App activated for your organization! Refresh the page to use the app.")
|
||||
getApps()
|
||||
}
|
||||
}
|
||||
@@ -14760,7 +14781,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
{curapp === null ? null : (
|
||||
<img
|
||||
alt={selectedResult.action.app_name}
|
||||
src={selectedResult === undefined ? theme.palette.defaultImage : selectedResult.action.app_name === "shuffle-subflow" ? triggers[4].large_image : selectedResult.action.app_name === "User Input" ? triggers[5].large_image : selectedResult.action.large_image}
|
||||
src={selectedResult === undefined ? theme.palette.defaultImage : selectedResult.action.app_name === "shuffle-subflow" ? triggers[4].large_image : selectedResult.action.app_name === "User Input" ? triggers[5].large_image : selectedResult.action.large_image !== undefined && selectedResult.action.large_image !== null && selectedResult.action.large_image !== "" ? selectedResult.action.large_image : curapp.large_image}
|
||||
style={{
|
||||
marginRight: 20,
|
||||
width: imgsize,
|
||||
|
||||
@@ -4,7 +4,7 @@ import AppFramework from "../components/AppFramework.jsx";
|
||||
import { makeStyles, useTheme } from "@material-ui/core/styles";
|
||||
// nodejs library that concatenates classes
|
||||
import classNames from "classnames";
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
import { useNavigate, Link, useParams } from "react-router-dom";
|
||||
|
||||
// react plugin used to create charts
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useInterval } from "react-powerhooks";
|
||||
import { makeStyles, useTheme } from "@material-ui/core/styles";
|
||||
// nodejs library that concatenates classes
|
||||
import classNames from "classnames";
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
import { useNavigate, Link, useParams } from "react-router-dom";
|
||||
|
||||
// react plugin used to create charts
|
||||
|
||||
@@ -4,7 +4,7 @@ import ReactDOM from "react-dom"
|
||||
import AppFramework from "../components/AppFramework.jsx";
|
||||
import { useAlert } from "react-alert";
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
|
||||
import {
|
||||
Button,
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useInterval } from "react-powerhooks";
|
||||
import { makeStyles } from '@material-ui/styles';
|
||||
import { useNavigate, Link, useParams } from "react-router-dom";
|
||||
import {isMobile} from "react-device-detect";
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
import { validateJson, GetIconInfo } from "./Workflows.jsx";
|
||||
import { green, yellow } from "./AngularWorkflow.jsx";
|
||||
|
||||
@@ -39,15 +39,6 @@ const bodyDivStyle = {
|
||||
position: "relative",
|
||||
}
|
||||
|
||||
const boxStyle = {
|
||||
color: "white",
|
||||
paddingLeft: "30px",
|
||||
paddingRight: "30px",
|
||||
paddingBottom: "30px",
|
||||
paddingTop: "30px",
|
||||
backgroundColor: theme.palette.surfaceColor,
|
||||
marginBottom: 150,
|
||||
}
|
||||
|
||||
const RunWorkflow = (defaultprops) => {
|
||||
const { globalUrl, isLoaded, isLoggedIn, setIsLoggedIn, setCookie, register, serverside } = defaultprops;
|
||||
@@ -65,11 +56,25 @@ const RunWorkflow = (defaultprops) => {
|
||||
const [apps, setApps] = React.useState([]);
|
||||
const [buttonClicked, setButtonClicked] = React.useState("");
|
||||
|
||||
const boxStyle = {
|
||||
color: "white",
|
||||
paddingLeft: "30px",
|
||||
paddingRight: "30px",
|
||||
paddingBottom: "30px",
|
||||
paddingTop: "30px",
|
||||
backgroundColor: theme.palette.surfaceColor,
|
||||
marginBottom: 150,
|
||||
}
|
||||
|
||||
const params = useParams();
|
||||
var props = JSON.parse(JSON.stringify(defaultprops))
|
||||
props.match = {}
|
||||
props.match.params = params
|
||||
|
||||
const defaultTitle = "Run Workflow"
|
||||
if (document != undefined && document.title != defaultTitle) {
|
||||
document.title = defaultTitle
|
||||
}
|
||||
|
||||
const parsedsearch = serverside === true ? "" : window.location.search
|
||||
if (serverside !== true) {
|
||||
@@ -513,6 +518,9 @@ const RunWorkflow = (defaultprops) => {
|
||||
if (responseJson.sync_features === undefined || responseJson.sync_features === null) {
|
||||
}
|
||||
|
||||
if (document != undefined && document.title != defaultTitle) {
|
||||
document.title = responseJson.name + " - " + defaultTitle
|
||||
}
|
||||
setSelectedOrganization(responseJson)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
import {isMobile} from "react-device-detect";
|
||||
import AppGrid from "../components/AppGrid.jsx"
|
||||
import WorkflowGrid from "../components/WorkflowGrid.jsx"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { Typography, CircularProgress } from "@material-ui/core";
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
|
||||
const SetAuthentication = (props) => {
|
||||
const { globalUrl } = props;
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
CardContent,
|
||||
CardActionArea,
|
||||
} from '@mui/material';
|
||||
import theme from '../theme';
|
||||
import theme from '../theme.jsx';
|
||||
import { useNavigate, Link } from "react-router-dom";
|
||||
import Drift from "react-driftjs";
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ import { useNavigate, Link } from "react-router-dom";
|
||||
import { useAlert } from "react-alert";
|
||||
import ChipInput from "material-ui-chip-input";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import theme from "../theme";
|
||||
import theme from "../theme.jsx";
|
||||
|
||||
const inputColor = "#383B40";
|
||||
const surfaceColor = "#27292D";
|
||||
@@ -3447,8 +3447,8 @@ const Workflows = (props) => {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{/*userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0 ?
|
||||
<div style={{width: "100%", border: "1px solid rgba(255,255,255,0.1)", borderRadius: theme.palette.borderRadius, marginTop: 10, marginBottom: 10, padding: 15, textAlign: "center", height: 70, textAlign: "left", backgroundColor: theme.palette.surfaceColor, display: "flex", }}>
|
||||
{userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0 && userdata.priorities[0].name.includes("CPU") ?
|
||||
<div style={{border: "1px solid rgba(255,255,255,0.1)", borderRadius: theme.palette.borderRadius, marginTop: 10, marginBottom: 10, padding: 15, textAlign: "center", height: 70, textAlign: "left", backgroundColor: theme.palette.surfaceColor, display: "flex", }}>
|
||||
<div style={{flex: 2, overflow: "hidden",}}>
|
||||
<Typography variant="body1" >
|
||||
{userdata.priorities[0].name}
|
||||
@@ -3459,14 +3459,16 @@ const Workflows = (props) => {
|
||||
</div>
|
||||
<div style={{flex: 1, display: "flex", marginLeft: 30, }}>
|
||||
<Button style={{height: 50, borderRadius: 25, marginTop: 8, width: 200, }} variant="contained" color="secondary" onClick={() => {navigate(userdata.priorities[0].url)}}>
|
||||
Continue
|
||||
explore
|
||||
</Button>
|
||||
{/*
|
||||
<Button style={{borderRadius: 25, width: 200, height: 50, marginTop: 8, }} variant="text" color="secondary">
|
||||
Ignore
|
||||
</Button>
|
||||
*/}
|
||||
</div>
|
||||
</div>
|
||||
: null*/}
|
||||
: null}
|
||||
|
||||
<div style={{marginTop: 15, }}>
|
||||
{view === "grid" ? (
|
||||
|
||||
Reference in New Issue
Block a user