aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/loop_viewer/svg
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-07-08 14:33:45 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-08 14:33:45 +0000
commitfa30aec1d332573f26ad5cd8324a1946273ac58d (patch)
treee8349b3e39cd754ee2da46fb88749eff580f21fa /ui-react/src/components/loop_viewer/svg
parentc29567afad53e62908abcffcfcc5e6b221102925 (diff)
parent4fb32395392c3c65ad8dcadc42d7804d2e656c63 (diff)
Merge "add framework for blocking user interaction"
Diffstat (limited to 'ui-react/src/components/loop_viewer/svg')
-rw-r--r--ui-react/src/components/loop_viewer/svg/SvgGenerator.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/ui-react/src/components/loop_viewer/svg/SvgGenerator.js b/ui-react/src/components/loop_viewer/svg/SvgGenerator.js
index d718c2e4..7070455e 100644
--- a/ui-react/src/components/loop_viewer/svg/SvgGenerator.js
+++ b/ui-react/src/components/loop_viewer/svg/SvgGenerator.js
@@ -70,13 +70,15 @@ class SvgGenerator extends React.Component {
}
handleSvgClick(event) {
- if (this.state.clickable) {
- console.debug("svg click event received");
- var elementName = event.target.parentNode.getAttribute('policyId');
- console.info("SVG element clicked", elementName);
- if (elementName !== null) {
- this.props.history.push("/policyModal/"+event.target.parentNode.getAttribute('policyType')+"/"+elementName);
- }
+ console.debug("svg click event received");
+ if (this.state.clickable) {
+ var elementName = event.target.parentNode.getAttribute('policyId');
+ console.info("SVG element clicked", elementName);
+ // Only allow movement to policy editing IF there busyLoadingCOunt is 0,
+ // meaning we are not waiting for refreshStatus to complete, for example
+ if (elementName !== null && !this.props.isBusyLoading()) {
+ this.props.history.push("/policyModal/"+event.target.parentNode.getAttribute('policyType')+"/"+elementName);
+ }
}
}