diff options
author | Tejas Kharat | 2024-03-13 17:10:52 +0530 |
---|---|---|
committer | Tejas Kharat | 2024-03-22 10:43:58 +0530 |
commit | 092f0b0c11979de172cbd2f492b95941eef43997 (patch) | |
tree | 74c7a748372fc3e7f3674280b06cf0e4534a4c0e | |
parent | 4d85ace13c70c141cdf12967c1fa2f1545c17260 (diff) | |
download | Common-Interface-Project-092f0b0c11979de172cbd2f492b95941eef43997.tar.gz Common-Interface-Project-092f0b0c11979de172cbd2f492b95941eef43997.tar.bz2 Common-Interface-Project-092f0b0c11979de172cbd2f492b95941eef43997.zip |
final code for new api
4 files changed, 8 insertions, 5 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js b/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js index 196d75e4..9c4804e6 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js @@ -296,6 +296,7 @@ export default function ComponentProperties () { if (compProperties && compProperties[rootKeyName] !== null && compType !== null) { return ( <ListItem key={i}> + {console.log('Value for key', keyName, ':', val[keyName])} <TextField id={keyName} label={compProperties[rootKeyName]} value={val[keyName] || ''} helperText={helperText} error={error} size='small' variant='outlined' onChange={getInputValues} /> </ListItem> ) diff --git a/blocks/eda-frontend/src/components/SchematicEditor/ComponentSidebar.js b/blocks/eda-frontend/src/components/SchematicEditor/ComponentSidebar.js index 8e8a59b6..d6e52b85 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/ComponentSidebar.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/ComponentSidebar.js @@ -74,7 +74,7 @@ export default function ComponentSidebar ({ compRef }) { // call api here setLoading(true) - api.get(`blocks/?${searchOptions[searchOption]}=${searchText}`) + api.get(`newblocks/?${searchOptions[searchOption]}=${searchText}`) .then( (res) => { if (res.data.length === 0) { diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js index 1b7b6d40..fef77030 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js @@ -38,15 +38,17 @@ export function getSvgMetadata (graph, parent, evt, target, x, y, component) { const parameterValues = {} for (let i = 0; i < parameterCount; i++) { const p = getParameter(i) + '_value' - const pinitial = p + '_initial' - parameterValues[p] = component[pinitial] + // const pinitial = p + '_initial' + // parameterValues[p] = component[pinitial] + parameterValues[p] = component?.newblockparameter_set[i]?.p_value_initial } v1.parameter_values = parameterValues v1.errorFields = {} v1.setConnectable(false) - const blockports = component.blockport_set + const blockports = component.newblockport_set + console.log(component) const ports = blockports.length v1.explicitInputPorts = 0 v1.implicitInputPorts = 0 diff --git a/blocks/eda-frontend/src/redux/actions/schematicEditorActions.js b/blocks/eda-frontend/src/redux/actions/schematicEditorActions.js index d9f61d48..00fc1e1e 100644 --- a/blocks/eda-frontend/src/redux/actions/schematicEditorActions.js +++ b/blocks/eda-frontend/src/redux/actions/schematicEditorActions.js @@ -46,7 +46,7 @@ export const fetchComponents = (libraryId) => (dispatch) => { // "p039_value_initial": null, // }, // ] -- Multiple dicts in array - const url = 'blocks/?categories=' + parseInt(libraryId) + const url = 'newblocks/?categories=' + parseInt(libraryId) api.get(url) .then( (res) => { |