+
Branding
diff --git a/frontend/src/components/CacheView.jsx b/frontend/src/components/CacheView.jsx
index 4d4d02fe..4e4f2fdd 100644
--- a/frontend/src/components/CacheView.jsx
+++ b/frontend/src/components/CacheView.jsx
@@ -1,10 +1,10 @@
import React, { useState, useEffect } from "react";
import theme from "../theme.jsx";
-import { toast } from 'react-toastify';
-import ReactJson from "react-json-view";
-
+import { toast } from 'react-toastify';
+import ReactJson from "react-json-view";
+
import {
- Typography,
+ Typography,
Tooltip,
Divider,
TextField,
@@ -22,8 +22,8 @@ import {
} from "@mui/material";
import {
- Link as LinkIcon,
- AutoFixHigh as AutoFixHighIcon,
+ Link as LinkIcon,
+ AutoFixHigh as AutoFixHighIcon,
Edit as EditIcon,
FileCopy as FileCopyIcon,
SelectAll as SelectAllIcon,
@@ -46,7 +46,7 @@ import {
Visibility as VisibilityIcon,
VisibilityOff as VisibilityOffIcon,
} from "@mui/icons-material";
-import { validateJson, } from "../views/Workflows.jsx";
+import { validateJson, } from "../views/Workflows.jsx";
const scrollStyle1 = {
height: 100,
@@ -64,9 +64,9 @@ const scrollStyle2 = {
overflow: "scroll",
}
-
+
const CacheView = (props) => {
- const { globalUrl, userdata, serverside, orgId } = props;
+ const { globalUrl, userdata, serverside, orgId, isSelectedDataStore } = props;
const [orgCache, setOrgCache] = React.useState("");
const [listCache, setListCache] = React.useState([]);
const [addCache, setAddCache] = React.useState("");
@@ -79,7 +79,7 @@ const CacheView = (props) => {
const [dataValue, setDataValue] = React.useState({});
const [editCache, setEditCache] = React.useState(false);
const [show, setShow] = useState({});
-
+
useEffect(() => {
listOrgCache(orgId);
}, []);
@@ -155,22 +155,22 @@ const CacheView = (props) => {
const deleteCache = (orgId, key) => {
toast("Attempting to delete Cache");
-
+
// method: "DELETE",
- const method = "POST"
- //const url = `${globalUrl}/api/v1/orgs/${orgId}/cache/${key}`
- const url = `${globalUrl}/api/v1/orgs/${orgId}/delete_cache`
- const parsed = {
- "org_id": orgId,
- "key": key,
- }
-
+ const method = "POST"
+ //const url = `${globalUrl}/api/v1/orgs/${orgId}/cache/${key}`
+ const url = `${globalUrl}/api/v1/orgs/${orgId}/delete_cache`
+ const parsed = {
+ "org_id": orgId,
+ "key": key,
+ }
+
fetch(url, {
- method: method,
+ method: method,
headers: {
Accept: "application/json",
},
- body: JSON.stringify(parsed),
+ body: JSON.stringify(parsed),
credentials: "include",
})
.then((response) => {
@@ -255,20 +255,20 @@ const CacheView = (props) => {
});
};
- const isValidJson = validateJson(value)
- const autoFixJson = (inputvalue) => {
- console.log("inputvalue: ", inputvalue)
- try {
- var parsedjson = JSON.parse(inputvalue)
-
- // setValue() with the parsed json as string
- setValue(JSON.stringify(parsedjson, null, 2))
- } catch (e) {
- console.log("Error parsing JSON: ", e)
- //return JSON.stringify(inputvalue);
- }
- }
-
+ const isValidJson = validateJson(value)
+ const autoFixJson = (inputvalue) => {
+ console.log("inputvalue: ", inputvalue)
+ try {
+ var parsedjson = JSON.parse(inputvalue)
+
+ // setValue() with the parsed json as string
+ setValue(JSON.stringify(parsedjson, null, 2))
+ } catch (e) {
+ console.log("Error parsing JSON: ", e)
+ //return JSON.stringify(inputvalue);
+ }
+ }
+
const modalView = (
// console.log("key:", dataValue.key),
//console.log("value:",dataValue.value),
@@ -316,21 +316,21 @@ const CacheView = (props) => {
/>
-
-
- Value - ({isValidJson.valid === true ? "Valid" : "Invalid"} JSON)
-
-
- {
- autoFixJson(value)
- }}
- >
-
-
-
-
+
+
+ Value - ({isValidJson.valid === true ? "Valid" : "Invalid"} JSON)
+
+
+ {
+ autoFixJson(value)
+ }}
+ >
+
+
+
+
{
id="Valuefield"
margin="normal"
variant="outlined"
- multiline
- minRows={4}
- maxRows={12}
+ multiline
+ minRows={4}
+ maxRows={12}
//defaultValue={editCache ? dataValue.value : ""}
- value={value}
+ value={value}
onChange={(e) => setValue(e.target.value)}
/>