diff options
-rw-r--r-- | pom.xml | 9 | ||||
-rw-r--r-- | src/main/script/SelectNpmRepo.groovy | 4 | ||||
-rw-r--r-- | ui-react/package.json | 3 | ||||
-rw-r--r-- | ui-react/src/LoopUI.js | 14 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/DeployLoopModal.js (renamed from ui-react/src/components/dialogs/DeployLoop.js) | 6 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js (renamed from ui-react/src/components/dialogs/DeployLoop.test.js) | 22 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js (renamed from ui-react/src/components/dialogs/LoopProperties.js) | 4 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/LoopPropertiesModal.test.js (renamed from ui-react/src/components/dialogs/LoopProperties.test.js) | 20 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/OpenLoopModal.js (renamed from ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.js) | 0 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js (renamed from ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js) | 0 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/__snapshots__/DeployLoopModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap) | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/__snapshots__/LoopPropertiesModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap) | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/__snapshots__/OpenLoopModal.test.js.snap (renamed from ui-react/src/components/dialogs/OpenLoop/__snapshots__/OpenLoopModal.test.js.snap) | 0 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/UserInfoModal.js (renamed from ui-react/src/components/dialogs/UserInfo.js) | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/UserInfoModal.test.js (renamed from ui-react/src/components/dialogs/UserInfo.test.js) | 10 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/__snapshots__/UserInfoModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap) | 2 |
17 files changed, 53 insertions, 49 deletions
@@ -33,7 +33,7 @@ <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>2.0.0</version> + <version>2.1.0</version> </parent> <description> @@ -1164,7 +1164,7 @@ </goals> <phase>deploy</phase> <configuration> - <arguments>run-script publish</arguments> + <arguments>publish</arguments> </configuration> </execution> </executions> @@ -1178,6 +1178,11 @@ <target>13</target> </configuration> </plugin> + <plugin> + <groupId>org.sonarsource.scanner.maven</groupId> + <artifactId>sonar-maven-plugin</artifactId> + <version>3.7.0.1746</version> + </plugin> </plugins> </build> </project> diff --git a/src/main/script/SelectNpmRepo.groovy b/src/main/script/SelectNpmRepo.groovy index 08a2cb0a2..92371cfe9 100644 --- a/src/main/script/SelectNpmRepo.groovy +++ b/src/main/script/SelectNpmRepo.groovy @@ -28,7 +28,7 @@ println project.properties['clamp.project.version']; if ( project.properties['clamp.project.version'].endsWith("-SNAPSHOT") ) { project.properties['npm.publish.url']="https://nexus3.onap.org/repository/npm.snapshot/" } else { - project.properties['npm.publish.url']="https://nexus3.onap.org/repository/npm.release/" + project.properties['npm.publish.url']="https://nexus3.onap.org/repository/npm.snapshot/" } -println 'NPM repository: ' + project.properties['npm.publish.url'];
\ No newline at end of file +println 'NPM repository: ' + project.properties['npm.publish.url']; diff --git a/ui-react/package.json b/ui-react/package.json index 2d70e270e..73598ec5a 100644 --- a/ui-react/package.json +++ b/ui-react/package.json @@ -15,8 +15,7 @@ "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage", - "eject": "react-scripts eject", - "publish": "npm publish" + "eject": "react-scripts eject" }, "files": [ "src/*.js", diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js index 05f466bc6..b8fbe8991 100644 --- a/ui-react/src/LoopUI.js +++ b/ui-react/src/LoopUI.js @@ -36,16 +36,16 @@ import LoopCache from './api/LoopCache'; import LoopActionService from './api/LoopActionService'; import { Route } from 'react-router-dom' -import OpenLoopModal from './components/dialogs/OpenLoop/OpenLoopModal'; +import OpenLoopModal from './components/dialogs/Loop/OpenLoopModal'; import OperationalPolicyModal from './components/dialogs/OperationalPolicy/OperationalPolicyModal'; import ConfigurationPolicyModal from './components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal'; -import LoopProperties from './components/dialogs/LoopProperties'; -import UserInfo from './components/dialogs/UserInfo'; +import LoopPropertiesModal from './components/dialogs/Loop/LoopPropertiesModal'; +import UserInfoModal from './components/dialogs/UserInfoModal'; import LoopService from './api/LoopService'; import ViewToscaModal from './components/dialogs/ViewToscaModal/ViewToscaModal'; import PerformAction from './components/dialogs/PerformActions'; import RefreshStatus from './components/dialogs/RefreshStatus'; -import DeployLoop from './components/dialogs/DeployLoop'; +import DeployLoopModal from './components/dialogs/Loop/DeployLoopModal'; import Alert from 'react-bootstrap/Alert'; import { Link } from 'react-router-dom'; @@ -253,15 +253,15 @@ export default class LoopUI extends React.Component { render={(routeProps) => (<OperationalPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop} showAlert={this.showAlert}/>)} /> <Route path="/configurationPolicyModal/:componentName" render={(routeProps) => (<ConfigurationPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> <Route path="/openLoop" render={(routeProps) => (<OpenLoopModal {...routeProps} loadLoopFunction={this.loadLoop} />)} /> - <Route path="/loopProperties" render={(routeProps) => (<LoopProperties {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> - <Route path="/userInfo" render={(routeProps) => (<UserInfo {...routeProps} />)} /> + <Route path="/loopProperties" render={(routeProps) => (<LoopPropertiesModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> + <Route path="/userInfo" render={(routeProps) => (<UserInfoModal {...routeProps} />)} /> <Route path="/closeLoop" render={this.closeLoop} /> <Route path="/submit" render={(routeProps) => (<PerformAction {...routeProps} loopAction="submit" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> <Route path="/stop" render={(routeProps) => (<PerformAction {...routeProps} loopAction="stop" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> <Route path="/restart" render={(routeProps) => (<PerformAction {...routeProps} loopAction="restart" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> <Route path="/delete" render={(routeProps) => (<PerformAction {...routeProps} loopAction="delete" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> <Route path="/undeploy" render={(routeProps) => (<PerformAction {...routeProps} loopAction="undeploy" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> - <Route path="/deploy" render={(routeProps) => (<DeployLoop {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> + <Route path="/deploy" render={(routeProps) => (<DeployLoopModal {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> <Route path="/refreshStatus" render={(routeProps) => (<RefreshStatus {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> <Route path="/logout" render={this.logout} /> <GlobalClampStyle /> diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js index e0aa8c6b0..4fa08e680 100644 --- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js +++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js @@ -26,7 +26,7 @@ import ConfigurationPolicyModal from './ConfigurationPolicyModal'; import LoopCache from '../../../api/LoopCache'; -describe('Verify DeployLoop', () => { +describe('Verify ConfigurationPolicyModal', () => { beforeEach(() => { fetch.resetMocks(); fetch.mockImplementation(() => { diff --git a/ui-react/src/components/dialogs/DeployLoop.js b/ui-react/src/components/dialogs/Loop/DeployLoopModal.js index d71af9240..34304d611 100644 --- a/ui-react/src/components/dialogs/DeployLoop.js +++ b/ui-react/src/components/dialogs/Loop/DeployLoopModal.js @@ -21,8 +21,8 @@ * */ import React from 'react'; -import LoopActionService from '../../api/LoopActionService'; -import LoopService from '../../api/LoopService'; +import LoopActionService from '../../../api/LoopActionService'; +import LoopService from '../../../api/LoopService'; import Button from 'react-bootstrap/Button'; import Modal from 'react-bootstrap/Modal'; import Form from 'react-bootstrap/Form'; @@ -34,7 +34,7 @@ const ModalStyled = styled(Modal)` const FormStyled = styled(Form.Group)` padding: .25rem 1.5rem; ` -export default class DeployLoop extends React.Component { +export default class DeployLoopModal extends React.Component { state = { loopCache: this.props.loopCache, temporaryPropertiesJson: JSON.parse(JSON.stringify(this.props.loopCache.getGlobalProperties())), diff --git a/ui-react/src/components/dialogs/DeployLoop.test.js b/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js index 44bc78379..2ebb8c067 100644 --- a/ui-react/src/components/dialogs/DeployLoop.test.js +++ b/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js @@ -22,12 +22,12 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import DeployLoop from './DeployLoop'; -import LoopCache from '../../api/LoopCache'; -import LoopActionService from '../../api/LoopActionService'; -import LoopService from '../../api/LoopService'; +import DeployLoopModal from './DeployLoopModal'; +import LoopCache from '../../../api/LoopCache'; +import LoopActionService from '../../../api/LoopActionService'; +import LoopService from '../../../api/LoopService'; -describe('Verify DeployLoop', () => { +describe('Verify DeployLoopModal', () => { const loopCache = new LoopCache({ "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca", "globalPropertiesJson": { @@ -40,7 +40,7 @@ describe('Verify DeployLoop', () => { it('Test the render method', () => { const component = shallow( - <DeployLoop loopCache={loopCache}/> + <DeployLoopModal loopCache={loopCache}/> ) expect(component).toMatchSnapshot(); @@ -48,8 +48,8 @@ describe('Verify DeployLoop', () => { it('Test handleClose', () => { const historyMock = { push: jest.fn() }; - const handleClose = jest.spyOn(DeployLoop.prototype,'handleClose'); - const component = shallow(<DeployLoop history={historyMock} loopCache={loopCache}/>) + const handleClose = jest.spyOn(DeployLoopModal.prototype,'handleClose'); + const component = shallow(<DeployLoopModal history={historyMock} loopCache={loopCache}/>) component.find('[variant="secondary"]').prop('onClick')(); @@ -62,7 +62,7 @@ describe('Verify DeployLoop', () => { const historyMock = { push: jest.fn() }; const updateLoopFunction = jest.fn(); const showAlert = jest.fn(); - const handleSave = jest.spyOn(DeployLoop.prototype,'handleSave'); + const handleSave = jest.spyOn(DeployLoopModal.prototype,'handleSave'); LoopService.updateGlobalProperties = jest.fn().mockImplementation(() => { return Promise.resolve({ ok: true, @@ -85,7 +85,7 @@ describe('Verify DeployLoop', () => { }); }); - const component = shallow(<DeployLoop history={historyMock} + const component = shallow(<DeployLoopModal history={historyMock} loopCache={loopCache} updateLoopFunction={updateLoopFunction} showAlert={showAlert} />) component.find('[variant="primary"]').prop('onClick')(); @@ -100,7 +100,7 @@ describe('Verify DeployLoop', () => { it('Onchange event', () => { const event = { target: { name: "location_id", value: "testLocation"} }; - const component = shallow(<DeployLoop loopCache={loopCache}/>); + const component = shallow(<DeployLoopModal loopCache={loopCache}/>); const forms = component.find('StateManager'); component.find('[name="location_id"]').simulate('change', event); diff --git a/ui-react/src/components/dialogs/LoopProperties.js b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js index 990fe7754..73946f45d 100644 --- a/ui-react/src/components/dialogs/LoopProperties.js +++ b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js @@ -25,12 +25,12 @@ import Button from 'react-bootstrap/Button'; import Modal from 'react-bootstrap/Modal'; import Form from 'react-bootstrap/Form'; import styled from 'styled-components'; -import LoopService from '../../api/LoopService'; +import LoopService from '../../../api/LoopService'; const ModalStyled = styled(Modal)` background-color: transparent; ` -export default class LoopProperties extends React.Component { +export default class LoopPropertiesModal extends React.Component { state = { show: true, diff --git a/ui-react/src/components/dialogs/LoopProperties.test.js b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.test.js index 9b74fe76a..5bbefe228 100644 --- a/ui-react/src/components/dialogs/LoopProperties.test.js +++ b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.test.js @@ -22,11 +22,11 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import LoopProperties from './LoopProperties'; -import LoopCache from '../../api/LoopCache'; -import LoopService from '../../api/LoopService'; +import LoopPropertiesModal from './LoopPropertiesModal'; +import LoopCache from '../../../api/LoopCache'; +import LoopService from '../../../api/LoopService'; -describe('Verify LoopProperties', () => { +describe('Verify LoopPropertiesModal', () => { const loopCache = new LoopCache({ "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca", "globalPropertiesJson": { @@ -39,7 +39,7 @@ describe('Verify LoopProperties', () => { it('Test the render method', () => { const component = shallow( - <LoopProperties loopCache={loopCache}/> + <LoopPropertiesModal loopCache={loopCache}/> ) component.setState({ show: true, temporaryPropertiesJson: { @@ -62,8 +62,8 @@ describe('Verify LoopProperties', () => { it('Test handleClose', () => { const historyMock = { push: jest.fn() }; - const handleClose = jest.spyOn(LoopProperties.prototype,'handleClose'); - const component = shallow(<LoopProperties history={historyMock} loopCache={loopCache}/>) + const handleClose = jest.spyOn(LoopPropertiesModal.prototype,'handleClose'); + const component = shallow(<LoopPropertiesModal history={historyMock} loopCache={loopCache}/>) component.find('[variant="secondary"]').prop('onClick')(); @@ -75,7 +75,7 @@ describe('Verify LoopProperties', () => { const flushPromises = () => new Promise(setImmediate); const historyMock = { push: jest.fn() }; const loadLoopFunction = jest.fn(); - const handleSave = jest.spyOn(LoopProperties.prototype,'handleSave'); + const handleSave = jest.spyOn(LoopPropertiesModal.prototype,'handleSave'); LoopService.updateGlobalProperties = jest.fn().mockImplementation(() => { return Promise.resolve({ ok: true, @@ -84,7 +84,7 @@ describe('Verify LoopProperties', () => { }); }); - const component = shallow(<LoopProperties history={historyMock} + const component = shallow(<LoopPropertiesModal history={historyMock} loopCache={loopCache} loadLoopFunction={loadLoopFunction} />) component.find('[variant="primary"]').prop('onClick')(); @@ -98,7 +98,7 @@ describe('Verify LoopProperties', () => { it('Onchange event', () => { const event = {target:{name:"dcaeDeployParameters", value:"{\"location_id\": \"testLocation\",\"policy_id\": \"TCA_h2NMX_v1_0_ResourceInstanceName1_tca\"}"}}; - const component = shallow(<LoopProperties loopCache={loopCache}/>); + const component = shallow(<LoopPropertiesModal loopCache={loopCache}/>); component.find('FormControl').simulate('change', event); component.update(); diff --git a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.js index fbfc727eb..fbfc727eb 100644 --- a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.js +++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.js diff --git a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js index 208c947c3..208c947c3 100644 --- a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js +++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js diff --git a/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/DeployLoopModal.test.js.snap index 1fd4b1047..bf06965be 100644 --- a/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap +++ b/ui-react/src/components/dialogs/Loop/__snapshots__/DeployLoopModal.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Verify DeployLoop Test the render method 1`] = ` +exports[`Verify DeployLoopModal Test the render method 1`] = ` <Styled(Bootstrap(Modal)) onHide={[Function]} show={true} diff --git a/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/LoopPropertiesModal.test.js.snap index c7e81c392..fe9aee2ab 100644 --- a/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap +++ b/ui-react/src/components/dialogs/Loop/__snapshots__/LoopPropertiesModal.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Verify LoopProperties Test the render method 1`] = ` +exports[`Verify LoopPropertiesModal Test the render method 1`] = ` <Styled(Bootstrap(Modal)) onHide={[Function]} show={true} diff --git a/ui-react/src/components/dialogs/OpenLoop/__snapshots__/OpenLoopModal.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/OpenLoopModal.test.js.snap index 9e7222415..9e7222415 100644 --- a/ui-react/src/components/dialogs/OpenLoop/__snapshots__/OpenLoopModal.test.js.snap +++ b/ui-react/src/components/dialogs/Loop/__snapshots__/OpenLoopModal.test.js.snap diff --git a/ui-react/src/components/dialogs/UserInfo.js b/ui-react/src/components/dialogs/UserInfoModal.js index 7d81b38b3..1273d87c0 100644 --- a/ui-react/src/components/dialogs/UserInfo.js +++ b/ui-react/src/components/dialogs/UserInfoModal.js @@ -33,7 +33,7 @@ const ModalStyled = styled(Modal)` background-color: transparent; ` -export default class UserInfo extends React.Component { +export default class UserInfoModal extends React.Component { constructor(props, context) { super(props, context); diff --git a/ui-react/src/components/dialogs/UserInfo.test.js b/ui-react/src/components/dialogs/UserInfoModal.test.js index beddde148..b5a2b272e 100644 --- a/ui-react/src/components/dialogs/UserInfo.test.js +++ b/ui-react/src/components/dialogs/UserInfoModal.test.js @@ -22,9 +22,9 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import UserInfo from './UserInfo'; +import UserInfoModal from './UserInfoModal'; -describe('Verify UserInfo', () => { +describe('Verify UserInfoModal', () => { beforeEach(() => { fetch.resetMocks(); @@ -42,7 +42,7 @@ describe('Verify UserInfo', () => { }) it('Test the render method full permission', () => { - const component = shallow(<UserInfo />) + const component = shallow(<UserInfoModal />) component.setState({ userInfo: { "userName": "test", "cldsVersion": "1.0.0", @@ -57,7 +57,7 @@ describe('Verify UserInfo', () => { }); it('Test the render method no permission', () => { - const component = shallow(<UserInfo />) + const component = shallow(<UserInfoModal />) component.setState({ userInfo: {} }); @@ -65,7 +65,7 @@ describe('Verify UserInfo', () => { }); it('Test the render method read permission', () => { - const component = shallow(<UserInfo />) + const component = shallow(<UserInfoModal />) component.setState({ userInfo: { "userName": "test", "cldsVersion": "1.0.0", diff --git a/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap b/ui-react/src/components/dialogs/__snapshots__/UserInfoModal.test.js.snap index 1ae567a2d..fdb24a430 100644 --- a/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap +++ b/ui-react/src/components/dialogs/__snapshots__/UserInfoModal.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Verify UserInfo Test the render method full permission 1`] = ` +exports[`Verify UserInfoModal Test the render method full permission 1`] = ` <Styled(Bootstrap(Modal)) onHide={[Function]} show={true} |