summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-09-06 18:11:51 +0200
committersebdet <sebastien.determe@intl.att.com>2019-09-06 18:18:14 +0200
commit337f36602a553ecb937c041a27b1c7270571c647 (patch)
tree935f593c1cb43b421f14cf0e4b84e210cbdb2125
parent64d4727e2bb0973cf61a125fed240c8c4952d6ff (diff)
Fix sonar issues
FIx some issues reported incorrectly by sonar for the new javascript code Issue-ID: CLAMP-425 Change-Id: I485b727c3a6007c0f0f9301fcda526b028d6251f Signed-off-by: sebdet <sebastien.determe@intl.att.com>
-rw-r--r--pom.xml4
-rw-r--r--ui-react/src/api/LoopActionService.js4
-rw-r--r--ui-react/src/api/LoopService.js20
-rw-r--r--ui-react/src/api/UserService.js6
-rw-r--r--ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js2
-rw-r--r--ui-react/src/components/dialogs/LoopProperties.js5
-rw-r--r--ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js2
-rw-r--r--ui-react/src/components/loop_viewer/logs/LoopLogs.js4
-rw-r--r--ui-react/src/components/loop_viewer/status/LoopStatus.js4
-rw-r--r--ui-react/src/components/loop_viewer/svg/LoopSvg.js4
-rw-r--r--version.properties2
11 files changed, 28 insertions, 29 deletions
diff --git a/pom.xml b/pom.xml
index efb95cad7..698717b75 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.clamp</groupId>
<artifactId>clds</artifactId>
- <version>4.1.1-SNAPSHOT</version>
+ <version>4.1.2-SNAPSHOT</version>
<name>clamp</name>
@@ -93,7 +93,7 @@
<!-- Enable language to disable javascript analysis -->
<!-- <sonar.language>java</sonar.language> -->
<!-- Parameters for Javascript coverage -->
- <sonar.sources>src/main,${project.build.directory}/${ui.react.src}</sonar.sources>
+ <sonar.sources>src/main,${project.build.directory}/${ui.react.src}/src</sonar.sources>
<sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
<sonar.exclusions>src/main/resources/**</sonar.exclusions>
diff --git a/ui-react/src/api/LoopActionService.js b/ui-react/src/api/LoopActionService.js
index 6e45ce4b9..7e20e2f6c 100644
--- a/ui-react/src/api/LoopActionService.js
+++ b/ui-react/src/api/LoopActionService.js
@@ -28,7 +28,7 @@ export default class LoopActionService{
const svcAction = uiAction.toLowerCase();
return fetch("/restservices/clds/v2/loop/" + svcAction + "/" + cl_name, {
method: 'PUT',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
if (response.ok) {
@@ -53,7 +53,7 @@ export default class LoopActionService{
return fetch("/restservices/clds/v2/loop/getstatus/" + cl_name, {
method: 'GET',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
if (response.ok) {
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js
index eece20c96..e2e234821 100644
--- a/ui-react/src/api/LoopService.js
+++ b/ui-react/src/api/LoopService.js
@@ -22,7 +22,7 @@
export default class LoopService {
static getLoopNames() {
- return fetch('/restservices/clds/v2/loop/getAllNames', { method: 'GET', credentials: 'same-origin', })
+ return fetch('/restservices/clds/v2/loop/getAllNames', { method: 'GET', credentials: 'same-origin' })
.then(function (response) {
console.debug("GetLoopNames response received: ", response.status);
if (response.ok) {
@@ -42,9 +42,9 @@ export default class LoopService {
return fetch('/restservices/clds/v2/loop/' + loopName, {
method: 'GET',
headers: {
- "Content-Type": "application/json",
+ "Content-Type": "application/json"
},
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
console.debug("GetLoop response received: ", response.status);
@@ -64,7 +64,7 @@ export default class LoopService {
static getSvg(loopName) {
return fetch('/restservices/clds/v2/loop/svgRepresentation/' + loopName, {
method: 'GET',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
console.debug("svgRepresentation response received: ", response.status);
@@ -86,9 +86,9 @@ export default class LoopService {
method: 'POST',
credentials: 'same-origin',
headers: {
- "Content-Type": "application/json",
+ "Content-Type": "application/json"
},
- body: JSON.stringify(jsonData),
+ body: JSON.stringify(jsonData)
})
.then(function (response) {
console.debug("updateMicroservicePolicy response received: ", response.status);
@@ -110,9 +110,9 @@ export default class LoopService {
method: 'POST',
credentials: 'same-origin',
headers: {
- "Content-Type": "application/json",
+ "Content-Type": "application/json"
},
- body: JSON.stringify(jsonData),
+ body: JSON.stringify(jsonData)
})
.then(function (response) {
console.debug("updateOperationalPolicies response received: ", response.status);
@@ -134,9 +134,9 @@ export default class LoopService {
method: 'POST',
credentials: 'same-origin',
headers: {
- "Content-Type": "application/json",
+ "Content-Type": "application/json"
},
- body: JSON.stringify(jsonData),
+ body: JSON.stringify(jsonData)
})
.then(function (response) {
console.debug("updateGlobalProperties response received: ", response.status);
diff --git a/ui-react/src/api/UserService.js b/ui-react/src/api/UserService.js
index 37ec73d1a..8da6e3a71 100644
--- a/ui-react/src/api/UserService.js
+++ b/ui-react/src/api/UserService.js
@@ -26,7 +26,7 @@ export default class UserService {
static login() {
return fetch('/restservices/clds/v1/user/getUser', {
method: 'GET',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
console.debug("getUser response received, status code:", response.status);
@@ -51,7 +51,7 @@ export default class UserService {
static logout() {
return fetch('/restservices/clds/v1/user/logout', {
method: 'POST',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
console.debug("logout response received, status code:", response.status);
@@ -76,7 +76,7 @@ export default class UserService {
static getUserInfo() {
return fetch('/restservices/clds/v1/clds/cldsInfo', {
method: 'GET',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
console.debug("getUserInfo response received, status code:", response.status);
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
index 9863ef721..b0f601ec2 100644
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
+++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
@@ -38,7 +38,7 @@ export default class ConfigurationPolicyModal extends React.Component {
show: true,
loopCache: this.props.loopCache,
jsonEditor: null,
- componentName: this.props.match.params.componentName,
+ componentName: this.props.match.params.componentName
};
constructor(props, context) {
diff --git a/ui-react/src/components/dialogs/LoopProperties.js b/ui-react/src/components/dialogs/LoopProperties.js
index fa82a7e48..990fe7754 100644
--- a/ui-react/src/components/dialogs/LoopProperties.js
+++ b/ui-react/src/components/dialogs/LoopProperties.js
@@ -35,7 +35,7 @@ export default class LoopProperties extends React.Component {
state = {
show: true,
loopCache: this.props.loopCache,
- temporaryPropertiesJson: JSON.parse(JSON.stringify(this.props.loopCache.getGlobalProperties())),
+ temporaryPropertiesJson: JSON.parse(JSON.stringify(this.props.loopCache.getGlobalProperties()))
};
constructor(props, context) {
@@ -53,8 +53,7 @@ export default class LoopProperties extends React.Component {
componentWillReceiveProps(newProps) {
this.setState({
loopCache: newProps.loopCache,
- temporaryPropertiesJson: JSON.parse(JSON.stringify(newProps.loopCache.getGlobalProperties())),
-
+ temporaryPropertiesJson: JSON.parse(JSON.stringify(newProps.loopCache.getGlobalProperties()))
});
}
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
index 7f349a10f..1ebe5f0e8 100644
--- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
+++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
@@ -37,7 +37,7 @@ export default class OperationalPolicyModal extends React.Component {
state = {
show: true,
loopCache: this.props.loopCache,
- jsonEditor: null,
+ jsonEditor: null
};
constructor(props, context) {
diff --git a/ui-react/src/components/loop_viewer/logs/LoopLogs.js b/ui-react/src/components/loop_viewer/logs/LoopLogs.js
index b6a777a40..6abdc4b4f 100644
--- a/ui-react/src/components/loop_viewer/logs/LoopLogs.js
+++ b/ui-react/src/components/loop_viewer/logs/LoopLogs.js
@@ -47,7 +47,7 @@ const TableRow = ({ logRow }) => (
export default class LoopLogs extends React.Component {
state = {
- loopCache: new LoopCache({}),
+ loopCache: new LoopCache({})
}
constructor(props) {
super(props);
@@ -61,7 +61,7 @@ export default class LoopLogs extends React.Component {
componentWillReceiveProps(newProps) {
this.setState({
- loopCache: newProps.loopCache,
+ loopCache: newProps.loopCache
});
}
diff --git a/ui-react/src/components/loop_viewer/status/LoopStatus.js b/ui-react/src/components/loop_viewer/status/LoopStatus.js
index 141a41f51..d960c31e6 100644
--- a/ui-react/src/components/loop_viewer/status/LoopStatus.js
+++ b/ui-react/src/components/loop_viewer/status/LoopStatus.js
@@ -46,7 +46,7 @@ const TableRow = ({ statusRow }) => (
export default class LoopStatus extends React.Component {
state = {
- loopCache: new LoopCache({}),
+ loopCache: new LoopCache({})
}
constructor(props) {
@@ -74,7 +74,7 @@ export default class LoopStatus extends React.Component {
componentWillReceiveProps(newProps) {
this.setState({
- loopCache: newProps.loopCache,
+ loopCache: newProps.loopCache
});
}
diff --git a/ui-react/src/components/loop_viewer/svg/LoopSvg.js b/ui-react/src/components/loop_viewer/svg/LoopSvg.js
index 1b1e24280..48f0335fc 100644
--- a/ui-react/src/components/loop_viewer/svg/LoopSvg.js
+++ b/ui-react/src/components/loop_viewer/svg/LoopSvg.js
@@ -45,7 +45,7 @@ class LoopViewSvg extends React.Component {
state = {
svgContent: LoopViewSvg.emptySvg,
loopCache: new LoopCache({}),
- componentModalMapping: new Map([]),
+ componentModalMapping: new Map([])
}
constructor(props) {
@@ -65,7 +65,7 @@ class LoopViewSvg extends React.Component {
if (this.state.loopCache !== newProps.loopCache) {
this.setState({
loopCache: newProps.loopCache,
- componentModalMapping: LoopComponentConverter.buildMapOfComponents(newProps.loopCache),
+ componentModalMapping: LoopComponentConverter.buildMapOfComponents(newProps.loopCache)
});
this.getSvg(newProps.loopCache.getLoopName());
}
diff --git a/version.properties b/version.properties
index 0a0ad216b..75f8a3b3a 100644
--- a/version.properties
+++ b/version.properties
@@ -27,7 +27,7 @@
major=4
minor=1
-patch=1
+patch=2
base_version=${major}.${minor}.${patch}