zack commited on
Commit
66d4b6d
1 Parent(s): 0146adb

:wrench: Adjust ReactFlowEnv settings

Browse files
frontend/src/components/ReactFlow/ReactFlowEnv.js CHANGED
@@ -1,4 +1,4 @@
1
- import CustomNodeIframe from "../Nodes/EmbedNode.js";
2
  import '../../css/dist/output.css'
3
  import ReactFlow, { Background,
4
  applyNodeChanges,
@@ -17,13 +17,10 @@ import { useThemeDetector } from '../../helper/visual'
17
  import {CgMoreVerticalAlt} from 'react-icons/cg'
18
  import {BsFillEraserFill} from 'react-icons/bs'
19
  import {FaRegSave} from 'react-icons/fa'
20
- import ProxmoxVM from '../Proxmox/proxmox.js';
21
- import EmbedNode from "../Nodes/EmbedNode.js";
22
 
23
  const NODE = {
24
  custom : CustomNodeIframe,
25
- proxmoxVM: ProxmoxVM,
26
- embed: EmbedNode,
27
  }
28
 
29
  const EDGE = {
@@ -217,15 +214,6 @@ export default function ReactEnviorment() {
217
  <FaRegSave title="Save" className={`mt-6 text-black dark:text-white ${tool ? "visible" : " invisible"} ml-auto mr-auto `} onClick={() => onSave()}/>
218
  <BsFillEraserFill title="Erase" className={`mt-6 text-black dark:text-white ml-auto mr-auto ${tool ? "visible" : " invisible"} `} onClick={() => onErase()}/>
219
  </div>
220
- {showProxmoxForm && (
221
- <form onSubmit={(e) => {
222
- e.preventDefault();
223
- addProxmoxVMNode(e.target.vmAddress.value);
224
- }} className="absolute top-10 left-10 z-50">
225
- <input name="vmAddress" type="text" placeholder="Enter Proxmox VM Address" required className="p-2"/>
226
- <button type="submit" className="p-2 bg-blue-500 text-white">Add VM</button>
227
- </form>
228
- )}
229
  <button onClick={() => setShowProxmoxForm(true)} className="absolute top-10 right-10 z-50 p-2 bg-green-500 text-white">Add Proxmox VM</button>
230
  <div className={`flex h-screen w-screen ${theme ? "dark" : ""} transition-all`}>
231
  <ReactFlowProvider>
 
1
+ import CustomNodeIframe from "../Nodes/Custom.js";
2
  import '../../css/dist/output.css'
3
  import ReactFlow, { Background,
4
  applyNodeChanges,
 
17
  import {CgMoreVerticalAlt} from 'react-icons/cg'
18
  import {BsFillEraserFill} from 'react-icons/bs'
19
  import {FaRegSave} from 'react-icons/fa'
 
 
20
 
21
  const NODE = {
22
  custom : CustomNodeIframe,
23
+ embed: Custom,
 
24
  }
25
 
26
  const EDGE = {
 
214
  <FaRegSave title="Save" className={`mt-6 text-black dark:text-white ${tool ? "visible" : " invisible"} ml-auto mr-auto `} onClick={() => onSave()}/>
215
  <BsFillEraserFill title="Erase" className={`mt-6 text-black dark:text-white ml-auto mr-auto ${tool ? "visible" : " invisible"} `} onClick={() => onErase()}/>
216
  </div>
 
 
 
 
 
 
 
 
 
217
  <button onClick={() => setShowProxmoxForm(true)} className="absolute top-10 right-10 z-50 p-2 bg-green-500 text-white">Add Proxmox VM</button>
218
  <div className={`flex h-screen w-screen ${theme ? "dark" : ""} transition-all`}>
219
  <ReactFlowProvider>