diff --git a/docker-compose.yml b/docker-compose.yml
index 64eabd79..f1c7ff7c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,7 +1,7 @@
version: '3'
services:
frontend:
- build: ./frontend
+ #build: ./frontend
image: ghcr.io/frikky/shuffle-frontend:nightly
container_name: shuffle-frontend
hostname: shuffle-frontend
@@ -16,7 +16,7 @@ services:
depends_on:
- backend
backend:
- build: ./backend
+ #build: ./backend
image: ghcr.io/frikky/shuffle-backend:nightly
container_name: shuffle-backend
hostname: ${BACKEND_HOSTNAME}
diff --git a/frontend/src/components/ShuffleCodeEditor.jsx b/frontend/src/components/ShuffleCodeEditor.jsx
index bb0eb615..a1026f82 100644
--- a/frontend/src/components/ShuffleCodeEditor.jsx
+++ b/frontend/src/components/ShuffleCodeEditor.jsx
@@ -12,6 +12,10 @@ import {
FullscreenExit as FullscreenExitIcon,
} from "@material-ui/icons";
+import {
+ AutoFixHigh as AutoFixHighIcon,
+} from '@mui/icons-material';
+
import { useTheme } from '@material-ui/core/styles';
import { validateJson } from "../views/Workflows.jsx";
import ReactJson from "react-json-view";
@@ -28,6 +32,22 @@ const CodeEditor = (props) => {
const [validation, setValidation] = React.useState(false);
const [expOutput, setExpOutput] = React.useState(" ");
+ const autoFormat = (input) => {
+ if (validation !== true) {
+ return
+ }
+
+ try {
+ input = JSON.stringify(JSON.parse(input), null, 4)
+ } catch (e) {
+ console.log("Failed magic JSON stringification: ", e)
+ }
+
+ if (input !== localcodedata) {
+ setlocalcodedata(input)
+ }
+ }
+
function expectedOutput(input) {
const found = input.match(/[$]{1}([a-zA-Z0-9_-]+\.?){1}([a-zA-Z0-9#_-]+\.?){0,}/g)
@@ -80,14 +100,34 @@ const CodeEditor = (props) => {
display: 'flex',
}}
>
-