Skip to content
Snippets Groups Projects
Commit b87ede75 authored by Dillon Scott Fitzgerald's avatar Dillon Scott Fitzgerald
Browse files

Fix pre-commit errors

parent f57e627c
No related branches found
No related tags found
2 merge requests!95Pickup final changes from alpha branch,!83Remove Preambulo Configuration Option
Pipeline #7844096 passed
......@@ -248,46 +248,49 @@ class ParticleConfig extends React.Component {
<Modal.Body>
{selectedTool ? (
<Form>
{Object.entries(
this.state.dtt.getToolConfig(this.props.particleID, selectedTool)
).filter(([param,value]) => { return param !="Preambulo"; }).map(([param, value]) => {
const paramObj = {...this.getParam(selectedTool, param)};
const {description, type} = paramObj;
const defaultValue = paramObj["default"]; // TODO: get rid of JS keywords from metadata
const list_re = /\[(\w+)\]/;
const dict_re = /\{(\w+):(\w+)\}/;
const configProps = {
value: value,
defaultValue: defaultValue,
callback: this.handleUpdateTool(selectedTool, param),
};
const inputBox =
type.match(list_re) !== null ? (
<ConfigList type={type.match(list_re)[1]} {...configProps} />
) : type.match(dict_re) !== null ? (
<ConfigDict
keyType={type.match(dict_re)[1]}
valType={type.match(dict_re)[2]}
{...configProps}
/>
) : (
<ConfigValue type={type} {...configProps} />
{Object.entries(this.state.dtt.getToolConfig(this.props.particleID, selectedTool))
.filter(([param]) => {
console.log(param);
return param != "Preambulo";
})
.map(([param, value]) => {
const paramObj = {...this.getParam(selectedTool, param)};
const {description, type} = paramObj;
const defaultValue = paramObj["default"]; // TODO: get rid of JS keywords from metadata
const list_re = /\[(\w+)\]/;
const dict_re = /\{(\w+):(\w+)\}/;
const configProps = {
value: value,
defaultValue: defaultValue,
callback: this.handleUpdateTool(selectedTool, param),
};
const inputBox =
type.match(list_re) !== null ? (
<ConfigList type={type.match(list_re)[1]} {...configProps} />
) : type.match(dict_re) !== null ? (
<ConfigDict
keyType={type.match(dict_re)[1]}
valType={type.match(dict_re)[2]}
{...configProps}
/>
) : (
<ConfigValue type={type} {...configProps} />
);
return (
<Form.Group key={param} as={Row} className="mb-2">
<Form.Label column sm={3}>
<OverlayTrigger overlay={<Tooltip>{description}</Tooltip>}>
<QuestionCircle />
</OverlayTrigger>
<code> {param} </code>
</Form.Label>
<Form.Label column sm={2}>
<code> {type} </code>
</Form.Label>
<Col sm={7}>{inputBox}</Col>
</Form.Group>
);
return (
<Form.Group key={param} as={Row} className="mb-2">
<Form.Label column sm={3}>
<OverlayTrigger overlay={<Tooltip>{description}</Tooltip>}>
<QuestionCircle />
</OverlayTrigger>
<code> {param} </code>
</Form.Label>
<Form.Label column sm={2}>
<code> {type} </code>
</Form.Label>
<Col sm={7}>{inputBox}</Col>
</Form.Group>
);
})}
})}
</Form>
) : (
"No tool selected"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment