From f87a9dd5405b09464f0df057e5b25e3f3efe3cd2 Mon Sep 17 00:00:00 2001 From: David Radley Date: Thu, 30 Sep 2021 12:06:18 +0100 Subject: [PATCH 1/5] #268 correct onclick in Tex Signed-off-by: David Radley Signed-off-by: Nigel Jones --- .../components/diagram/EntityInheritanceDiagram.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cra-client/src/components/TypeExplorer/components/diagram/EntityInheritanceDiagram.js b/cra-client/src/components/TypeExplorer/components/diagram/EntityInheritanceDiagram.js index a8efea4d..9f9c5e07 100644 --- a/cra-client/src/components/TypeExplorer/components/diagram/EntityInheritanceDiagram.js +++ b/cra-client/src/components/TypeExplorer/components/diagram/EntityInheritanceDiagram.js @@ -409,7 +409,6 @@ export default function EntityInheritanceDiagram(props) { */ const typeSelected = useCallback( (cat, typeName) => { - focusContext.typeSelected("Entity", typeName); }, [focusContext] @@ -524,7 +523,7 @@ export default function EntityInheritanceDiagram(props) { .attr("x", 12) .attr("text-anchor", "start") .text(d => typesContext.isTypeDeprecated("Entity", d.data.name) ? "["+d.data.name+"]" : d.data.name ) - .on("click", d => { typeSelected("Entity", d.data.name); }) + .on("click", d => { typeSelected("Entity", d.currentTarget.textContent); }) .clone(true) .lower() .attr("stroke-linejoin", "round") From 79cfa29ad4e795233b7422450542d812b9b422fe Mon Sep 17 00:00:00 2001 From: David Radley Date: Thu, 30 Sep 2021 12:37:14 +0100 Subject: [PATCH 2/5] #268 correct onclick in Text in heighbourhood Signed-off-by: David Radley Signed-off-by: Nigel Jones --- .../components/diagram/EntityNeighborhoodDiagram.js | 4 ++-- .../TypeExplorer/components/focus-controls/FocusControls.js | 5 ++++- .../src/components/TypeExplorer/contexts/FocusContext.js | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cra-client/src/components/TypeExplorer/components/diagram/EntityNeighborhoodDiagram.js b/cra-client/src/components/TypeExplorer/components/diagram/EntityNeighborhoodDiagram.js index 2797944c..519000a0 100644 --- a/cra-client/src/components/TypeExplorer/components/diagram/EntityNeighborhoodDiagram.js +++ b/cra-client/src/components/TypeExplorer/components/diagram/EntityNeighborhoodDiagram.js @@ -719,7 +719,7 @@ export default function EntityNeighborhoodDiagram(props) { .style("font-style", d => d.inherited ? "italic" : "normal") .text(d => d.name) .text(d => typesContext.isTypeDeprecated(d.category, d.name) ? "["+d.name+"]" : d.name ) - .on("click", d => { nodeSelected(d.category, d.name); }) + .on("click", d => { nodeSelected("Entity", d.currentTarget.textContent); }) .clone(true) .lower() .attr("stroke-linejoin", "round") @@ -734,7 +734,7 @@ export default function EntityNeighborhoodDiagram(props) { .attr("stroke-width",1) .attr("stroke", "#000") .attr("fill", d => (d.category === "Relationship" ? "none" : "#FFF")) - .on("click", d => { nodeSelected(d.category, d.name); }); + .on("click", d => { nodeSelected("Entity", d.currentTarget.textContent); }); nodeEnter.append("polyline") .lower() diff --git a/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js b/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js index 99c2b22a..71413d27 100644 --- a/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js +++ b/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js @@ -55,6 +55,7 @@ export default function FocusControls() { const typeName = e.target.value; resetRelTypeSelector(); resetClsTypeSelector(); + console.log("entityChangeHandler"); focusContext.typeSelected("Entity",typeName); }; @@ -64,12 +65,14 @@ export default function FocusControls() { const relationshipSelectorHandler = (e) => { const typeName = e.target.value; resetClsTypeSelector(); + console.log("relationshipChangeHandler"); focusContext.typeSelected("Relationship",typeName); }; const classificationSelectorHandler = (e) => { const typeName = e.target.value; - resetRelTypeSelector(); + resetRelTypeSelector(); + console.log("ClassChangeHandler"); focusContext.typeSelected("Classification",typeName); }; diff --git a/cra-client/src/components/TypeExplorer/contexts/FocusContext.js b/cra-client/src/components/TypeExplorer/contexts/FocusContext.js index 785e19f9..fc16777f 100644 --- a/cra-client/src/components/TypeExplorer/contexts/FocusContext.js +++ b/cra-client/src/components/TypeExplorer/contexts/FocusContext.js @@ -64,6 +64,7 @@ const FocusContextProvider = (props) => { setView({ typeName : typeName , category : category }); break; default: + console.log("Unknown type selection category in FocusContext"); alert("Unknown type selection category in FocusContext "+category+" for type "+typeName); break; } From 1940beb74f6d5d7b1cd86972962168420abfcec6 Mon Sep 17 00:00:00 2001 From: David Radley Date: Thu, 30 Sep 2021 12:41:39 +0100 Subject: [PATCH 3/5] #268 correct onclick in Text in neighbourhood Signed-off-by: David Radley Signed-off-by: Nigel Jones --- cra-client/src/components/TypeExplorer/contexts/FocusContext.js | 1 - 1 file changed, 1 deletion(-) diff --git a/cra-client/src/components/TypeExplorer/contexts/FocusContext.js b/cra-client/src/components/TypeExplorer/contexts/FocusContext.js index fc16777f..785e19f9 100644 --- a/cra-client/src/components/TypeExplorer/contexts/FocusContext.js +++ b/cra-client/src/components/TypeExplorer/contexts/FocusContext.js @@ -64,7 +64,6 @@ const FocusContextProvider = (props) => { setView({ typeName : typeName , category : category }); break; default: - console.log("Unknown type selection category in FocusContext"); alert("Unknown type selection category in FocusContext "+category+" for type "+typeName); break; } From 2b6d6b1e52749215307f9ae58947a39937e1324c Mon Sep 17 00:00:00 2001 From: David Radley Date: Thu, 30 Sep 2021 12:43:12 +0100 Subject: [PATCH 4/5] #268 remove logging Signed-off-by: David Radley Signed-off-by: Nigel Jones --- .../TypeExplorer/components/focus-controls/FocusControls.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js b/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js index 71413d27..4d3bd9bd 100644 --- a/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js +++ b/cra-client/src/components/TypeExplorer/components/focus-controls/FocusControls.js @@ -55,7 +55,6 @@ export default function FocusControls() { const typeName = e.target.value; resetRelTypeSelector(); resetClsTypeSelector(); - console.log("entityChangeHandler"); focusContext.typeSelected("Entity",typeName); }; @@ -65,14 +64,12 @@ export default function FocusControls() { const relationshipSelectorHandler = (e) => { const typeName = e.target.value; resetClsTypeSelector(); - console.log("relationshipChangeHandler"); focusContext.typeSelected("Relationship",typeName); }; const classificationSelectorHandler = (e) => { const typeName = e.target.value; resetRelTypeSelector(); - console.log("ClassChangeHandler"); focusContext.typeSelected("Classification",typeName); }; From 4fae534262116ff534ffff794b9185ef97486ff0 Mon Sep 17 00:00:00 2001 From: David Radley Date: Thu, 30 Sep 2021 13:44:37 +0100 Subject: [PATCH 5/5] #264 add checking before addressing fields in Dino Signed-off-by: David Radley Signed-off-by: Nigel Jones --- .../components/details-panel/ServerConfigEventBusDisplay.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cra-client/src/components/Dino/components/details-panel/ServerConfigEventBusDisplay.js b/cra-client/src/components/Dino/components/details-panel/ServerConfigEventBusDisplay.js index 20cca381..53d162c8 100644 --- a/cra-client/src/components/Dino/components/details-panel/ServerConfigEventBusDisplay.js +++ b/cra-client/src/components/Dino/components/details-panel/ServerConfigEventBusDisplay.js @@ -22,9 +22,9 @@ export default function ServerConfigEventBusDisplay(props) {
  • Topic URL Root : {cfg.topicURLRoot}
  • Producer : - {cfg.configurationProperties.producer ? formatBootstrapEndpoints(cfg.configurationProperties.producer) : blank}
  • + {cfg !== undefined && cfg.configurationProperties !== undefined && cfg.configurationProperties.producer ? formatBootstrapEndpoints(cfg.configurationProperties.producer) : blank}
  • Consumer : - {cfg.configurationProperties.consumer ? formatBootstrapEndpoints(cfg.configurationProperties.consumer) : blank}
  • + {cfg !== undefined && cfg.configurationProperties !== undefined && cfg.configurationProperties.consumer ? formatBootstrapEndpoints(cfg.configurationProperties.consumer) : blank}
  • Additional Properties : {cfg.additionalProperties ? formatAdditionalProperties(cfg.additionalProperties) : blank}