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>
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.clamp</groupId>
<artifactId>clds</artifactId>
<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>
<!-- Enable language to disable javascript analysis -->
<!-- <sonar.language>java</sonar.language> -->
<!-- Parameters for Javascript coverage -->
<!-- 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>
<sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
<sonar.exclusions>src/main/resources/**</sonar.exclusions>
const svcAction = uiAction.toLowerCase();
return fetch("/restservices/clds/v2/loop/" + svcAction + "/" + cl_name, {
method: 'PUT',
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) {
})
.then(function (response) {
if (response.ok) {
return fetch("/restservices/clds/v2/loop/getstatus/" + cl_name, {
method: 'GET',
return fetch("/restservices/clds/v2/loop/getstatus/" + cl_name, {
method: 'GET',
- credentials: 'same-origin',
+ credentials: 'same-origin'
})
.then(function (response) {
if (response.ok) {
})
.then(function (response) {
if (response.ok) {
export default class LoopService {
static getLoopNames() {
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) {
.then(function (response) {
console.debug("GetLoopNames response received: ", response.status);
if (response.ok) {
return fetch('/restservices/clds/v2/loop/' + loopName, {
method: 'GET',
headers: {
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);
})
.then(function (response) {
console.debug("GetLoop response received: ", response.status);
static getSvg(loopName) {
return fetch('/restservices/clds/v2/loop/svgRepresentation/' + loopName, {
method: 'GET',
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);
})
.then(function (response) {
console.debug("svgRepresentation response received: ", response.status);
method: 'POST',
credentials: 'same-origin',
headers: {
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);
})
.then(function (response) {
console.debug("updateMicroservicePolicy response received: ", response.status);
method: 'POST',
credentials: 'same-origin',
headers: {
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);
})
.then(function (response) {
console.debug("updateOperationalPolicies response received: ", response.status);
method: 'POST',
credentials: 'same-origin',
headers: {
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);
})
.then(function (response) {
console.debug("updateGlobalProperties response received: ", response.status);
static login() {
return fetch('/restservices/clds/v1/user/getUser', {
method: 'GET',
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);
})
.then(function (response) {
console.debug("getUser response received, status code:", response.status);
static logout() {
return fetch('/restservices/clds/v1/user/logout', {
method: 'POST',
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);
})
.then(function (response) {
console.debug("logout response received, status code:", response.status);
static getUserInfo() {
return fetch('/restservices/clds/v1/clds/cldsInfo', {
method: 'GET',
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);
})
.then(function (response) {
console.debug("getUserInfo response received, status code:", response.status);
show: true,
loopCache: this.props.loopCache,
jsonEditor: null,
show: true,
loopCache: this.props.loopCache,
jsonEditor: null,
- componentName: this.props.match.params.componentName,
+ componentName: this.props.match.params.componentName
};
constructor(props, context) {
};
constructor(props, context) {
state = {
show: true,
loopCache: this.props.loopCache,
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) {
};
constructor(props, context) {
componentWillReceiveProps(newProps) {
this.setState({
loopCache: newProps.loopCache,
componentWillReceiveProps(newProps) {
this.setState({
loopCache: newProps.loopCache,
- temporaryPropertiesJson: JSON.parse(JSON.stringify(newProps.loopCache.getGlobalProperties())),
-
+ temporaryPropertiesJson: JSON.parse(JSON.stringify(newProps.loopCache.getGlobalProperties()))
state = {
show: true,
loopCache: this.props.loopCache,
state = {
show: true,
loopCache: this.props.loopCache,
};
constructor(props, context) {
};
constructor(props, context) {
export default class LoopLogs extends React.Component {
state = {
export default class LoopLogs extends React.Component {
state = {
- loopCache: new LoopCache({}),
+ loopCache: new LoopCache({})
}
constructor(props) {
super(props);
}
constructor(props) {
super(props);
componentWillReceiveProps(newProps) {
this.setState({
componentWillReceiveProps(newProps) {
this.setState({
- loopCache: newProps.loopCache,
+ loopCache: newProps.loopCache
export default class LoopStatus extends React.Component {
state = {
export default class LoopStatus extends React.Component {
state = {
- loopCache: new LoopCache({}),
+ loopCache: new LoopCache({})
componentWillReceiveProps(newProps) {
this.setState({
componentWillReceiveProps(newProps) {
this.setState({
- loopCache: newProps.loopCache,
+ loopCache: newProps.loopCache
state = {
svgContent: LoopViewSvg.emptySvg,
loopCache: new LoopCache({}),
state = {
svgContent: LoopViewSvg.emptySvg,
loopCache: new LoopCache({}),
- componentModalMapping: new Map([]),
+ componentModalMapping: new Map([])
if (this.state.loopCache !== newProps.loopCache) {
this.setState({
loopCache: newProps.loopCache,
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());
}
});
this.getSvg(newProps.loopCache.getLoopName());
}
base_version=${major}.${minor}.${patch}
base_version=${major}.${minor}.${patch}