aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react
diff options
context:
space:
mode:
authorXue Gao <xg353y@intl.att.com>2019-07-18 04:29:33 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-18 04:29:33 +0000
commit0ce38c26f68efa97f7d16ec9bbba5888982d97ba (patch)
tree9c62d416f3b56c145d4dddb8a06fa1e77d691631 /ui-react
parenta60064d01f6d37c0a75f1020010e5511d939785e (diff)
parent5976c17b09b82db4d5dbce7cb7fe3b1b27891104 (diff)
Merge "Fix warnings"
Diffstat (limited to 'ui-react')
-rw-r--r--ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js6
-rw-r--r--ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js6
-rw-r--r--ui-react/src/components/loop_viewer/svg/LoopSvg.js5
3 files changed, 9 insertions, 8 deletions
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
index 453ca6bb..da2d4230 100644
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
+++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
@@ -72,8 +72,10 @@ export default class ConfigurationPolicyModal extends React.Component {
JSONEditor.defaults.options.disable_array_delete_all_rows = false;
JSONEditor.defaults.options.show_errors = 'always';
- this.state.jsonEditor = new JSONEditor(document.getElementById("editor"),
- { schema: toscaModel.schema, startval: editorData });
+ this.setState({
+ jsonEditor: new JSONEditor(document.getElementById("editor"),
+ { schema: toscaModel.schema, startval: editorData })
+ })
}
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
index 6822f3ff..2a812c87 100644
--- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
+++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
@@ -217,7 +217,7 @@ export default class OperationalPolicyModal extends React.Component {
</div>
<span id="formSpan" style={{ display: 'none' }}>
- <form className="policyProperties" className="form-horizontal"
+ <form className="policyProperties form-horizontal"
style={{ border: '2px dotted gray' }}
title="Operational Policy Properties">
<div className="form-group clearfix">
@@ -350,7 +350,7 @@ export default class OperationalPolicyModal extends React.Component {
</div>
</div>
</form>
- <form className="policyTarget" className="form-horizontal"
+ <form className="policyTarget form-horizontal"
title="Operational Policy Target" style={{ border: '2px dotted gray' }}>
<div className="form-group clearfix">
<label htmlFor="type" className="col-sm-4 control-label"> Target
@@ -437,7 +437,7 @@ export default class OperationalPolicyModal extends React.Component {
</select>
</div>
</div>
- <form className="guardProperties" className="form-horizontal"
+ <form className="guardProperties form-horizontal"
title="Guard policy associated" style={{ border: '2px dotted gray' }}>
<div className="form-group clearfix withnote">
diff --git a/ui-react/src/components/loop_viewer/svg/LoopSvg.js b/ui-react/src/components/loop_viewer/svg/LoopSvg.js
index 44356c1c..fa028c0d 100644
--- a/ui-react/src/components/loop_viewer/svg/LoopSvg.js
+++ b/ui-react/src/components/loop_viewer/svg/LoopSvg.js
@@ -23,7 +23,6 @@
import React from 'react';
import styled from 'styled-components';
import { withRouter } from "react-router";
-import LoopCache from '../../../api/LoopCache'
import LoopService from '../../../api/LoopService'
const LoopViewSvgDivStyled = styled.div`
@@ -57,13 +56,13 @@ class LoopViewSvg extends React.Component {
}
componentWillReceiveProps(newProps) {
- this.state.loopCache = newProps.loopCache;
+ this.setState({ loopCache: newProps.loopCache });
this.getSvg();
}
getSvg() {
LoopService.getSvg(this.state.loopCache.getLoopName()).then(svgXml => {
- if (svgXml.length != 0) {
+ if (svgXml.length !== 0) {
this.setState({ svgContent: svgXml })
} else {
this.setState({ svgContent: LoopViewSvg.emptySvg })