From 524299a3c2c80af481371a00d77cef54f329c280 Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Tue, 15 Mar 2022 09:27:53 -0500 Subject: [PATCH] Make pipeline, parameters & product interactive --- relog-web/src/Button.js | 14 +- relog-web/src/ButtonRow.js | 6 +- relog-web/src/Card.js | 6 +- relog-web/src/DictInputRow.js | 56 ++++-- relog-web/src/FileInputRow.js | 8 +- relog-web/src/Footer.js | 6 +- relog-web/src/Form.js | 2 +- relog-web/src/Header.js | 6 +- relog-web/src/InputPage.js | 250 ++++++++++++++++++++++++- relog-web/src/ParametersBlock.js | 27 ++- relog-web/src/PipelineBlock.js | 183 +++++++++++------- relog-web/src/PipelineBlock.module.css | 3 + relog-web/src/PlantBlock.js | 20 +- relog-web/src/ProductBlock.js | 44 +++-- relog-web/src/Section.js | 6 +- relog-web/src/TextInputRow.js | 11 +- relog-web/src/index.css | 4 + relog-web/src/index.js | 2 +- 18 files changed, 496 insertions(+), 158 deletions(-) diff --git a/relog-web/src/Button.js b/relog-web/src/Button.js index e6dc850..7ffb84b 100644 --- a/relog-web/src/Button.js +++ b/relog-web/src/Button.js @@ -1,22 +1,22 @@ -import styles from './Button.module.css' +import styles from './Button.module.css'; const Button = (props) => { - let className = styles.Button + let className = styles.Button; if (props.kind === "inline") { - className += " " + styles.inline + className += " " + styles.inline; } let tooltip = ""; if (props.tooltip != undefined) { - tooltip = {props.tooltip} + tooltip = {props.tooltip}; } return ( - - ) -} + ); +}; export default Button; \ No newline at end of file diff --git a/relog-web/src/ButtonRow.js b/relog-web/src/ButtonRow.js index ba4db2b..db3afcd 100644 --- a/relog-web/src/ButtonRow.js +++ b/relog-web/src/ButtonRow.js @@ -1,7 +1,7 @@ -import styles from './ButtonRow.module.css' +import styles from './ButtonRow.module.css'; const ButtonRow = (props) => { - return
{props.children}
-} + return
{props.children}
; +}; export default ButtonRow; \ No newline at end of file diff --git a/relog-web/src/Card.js b/relog-web/src/Card.js index 8e56615..5a2a14a 100644 --- a/relog-web/src/Card.js +++ b/relog-web/src/Card.js @@ -1,7 +1,7 @@ -import styles from './Card.module.css' +import styles from './Card.module.css'; const Card = (props) => { - return (
{props.children}
) -} + return (
{props.children}
); +}; export default Card; \ No newline at end of file diff --git a/relog-web/src/DictInputRow.js b/relog-web/src/DictInputRow.js index 482b59d..5ce6973 100644 --- a/relog-web/src/DictInputRow.js +++ b/relog-web/src/DictInputRow.js @@ -1,27 +1,37 @@ -import form_styles from './Form.module.css' -import Button from './Button' +import { useState } from 'react'; +import form_styles from './Form.module.css'; +import Button from './Button'; const DictInputRow = (props) => { + const dict = { ...props.value }; + if (!props.disableKeys) { + dict[""] = ""; + } + let unit = ""; if (props.unit) { - unit = ({props.unit}) + unit = ({props.unit}); } let tooltip = ""; if (props.tooltip != undefined) { - tooltip =