</goals>
<phase>generate-sources</phase>
<configuration>
- <nodeVersion>v12.10.0</nodeVersion>
- <npmVersion>6.10.3</npmVersion>
+ <nodeVersion>v12.13.0</nodeVersion>
+ <npmVersion>6.13.0</npmVersion>
</configuration>
</execution>
<execution>
"react": "16.9.0",
"react-dom": "16.9.0",
"react-scripts": "3.1.1",
- "react-bootstrap": "1.0.0-beta.12",
+ "react-bootstrap": "1.0.0-beta.14",
"bootstrap-css-only": "4.3.1",
"styled-components": "4.3.2",
"react-router-dom": "5.0.1",
- "@material-ui/core": "4.3.2",
- "@material-ui/icons": "4.2.1",
- "material-table": "1.48.0",
- "react-select": "3.0.4"
+ "@material-ui/core": "4.6.0",
+ "@material-ui/icons": "4.5.1",
+ "material-table": "1.53.0",
+ "react-select": "3.0.8"
},
"devDependencies": {
"jest": "24.8.0",
import LoopProperties from './components/dialogs/LoopProperties';
import UserInfo from './components/dialogs/UserInfo';
import LoopService from './api/LoopService';
-import ViewToscaModals from './components/dialogs/ViewToscaModals/ViewToscaModals';
+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';
render() {
return (
<StyledMainDiv id="main_div">
- <Route path="/viewToscaModals" render={(routeProps) => (<ViewToscaModals {...routeProps} />)} />
+ <Route path="/viewToscaModal" render={(routeProps) => (<ViewToscaModal {...routeProps} />)} />
<Route path="/operationalPolicyModal"
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}/>)} />
id="main_div"
>
<Route
- path="/viewToscaModals"
+ path="/viewToscaModal"
render={[Function]}
/>
<Route
id="main_div"
>
<Route
- path="/viewToscaModals"
+ path="/viewToscaModal"
render={[Function]}
/>
<Route
*
*/
-export default class TemplateMenu {
- static getToscaModals() {
- return fetch('restservices/clds/v2/loop/tosca/models', { method: 'GET', credentials: 'same-origin', })
+export default class TemplateMenuService {
+ static getToscaModels() {
+ return fetch('restservices/clds/v2/loop/tosca/models', { method: 'GET', credentials: 'same-origin' })
.then(function (response) {
console.debug("getToscaModels response received: ", response.status);
if (response.ok) {
title=""
type="checkbox"
>
- <FormCheckLabel
- type="checkbox"
- >
+ <FormCheckLabel>
Read Only
</FormCheckLabel>
<Styled(FormCheckInput)
import Button from 'react-bootstrap/Button';
import Modal from 'react-bootstrap/Modal';
import styled from 'styled-components';
-import TemplateMenu from '../../../api/TemplateMenu';
+import TemplateMenuService from '../../../api/TemplateMenuService';
import ArrowUpward from '@material-ui/icons/ArrowUpward';
import ChevronLeft from '@material-ui/icons/ChevronLeft';
import ChevronRight from '@material-ui/icons/ChevronRight';
const ModalStyled = styled(Modal)`
background-color: transparent;
`
-const StyledToscaView = styled.textarea`
-`
-const StyledToscaDiv = styled.div`
-`
+
const vtmCellStyle = { border: '1px solid black' };
const vtmHeaderStyle = { backgroundColor: '#ddd', border: '2px solid black' };
const vtmRowHeaderStyle = {backgroundColor:'#ddd', fontSize: '15pt', text: 'bold', border: '1px solid black'};
-export default class ViewToscalModals extends React.Component {
+export default class ViewToscalModal extends React.Component {
state = {
show: true,
}
],
tableIcons: {
- FirstPage: forwardRef((props, ref) => <FirstPage {...props} ref={ref} />),
- LastPage: forwardRef((props, ref) => <LastPage {...props} ref={ref} />),
- NextPage: forwardRef((props, ref) => <ChevronRight {...props} ref={ref} />),
- PreviousPage: forwardRef((props, ref) => <ChevronLeft {...props} ref={ref} />),
- ResetSearch: forwardRef((props, ref) => <Clear {...props} ref={ref} />),
- Search: forwardRef((props, ref) => <Search {...props} ref={ref} />),
- SortArrow: forwardRef((props, ref) => <ArrowUpward {...props} ref={ref} />),
+ FirstPage: forwardRef((props, ref) => <FirstPage {...props} ref={ref} />),
+ LastPage: forwardRef((props, ref) => <LastPage {...props} ref={ref} />),
+ NextPage: forwardRef((props, ref) => <ChevronRight {...props} ref={ref} />),
+ PreviousPage: forwardRef((props, ref) => <ChevronLeft {...props} ref={ref} />),
+ ResetSearch: forwardRef((props, ref) => <Clear {...props} ref={ref} />),
+ Search: forwardRef((props, ref) => <Search {...props} ref={ref} />),
+ SortArrow: forwardRef((props, ref) => <ArrowUpward {...props} ref={ref} />)
}
};
constructor(props, context) {
super(props, context);
this.handleClose = this.handleClose.bind(this);
- this.getToscaModals = this.getToscaModals.bind(this);
+ this.getToscaModels = this.getToscaModels.bind(this);
this.handleYamlContent = this.handleYamlContent.bind(this);
}
componentWillMount() {
- this.getToscaModals();
+ this.getToscaModels();
}
- getToscaModals() {
- TemplateMenu.getToscaModals().then(toscaNames => {
+ getToscaModels() {
+ TemplateMenuService.getToscaModels().then(toscaNames => {
this.setState({ toscaNames: toscaNames });
});
}
handleYamlContent(event) {
- console.log('inside handleYamlContent');
this.setState({ content: event.target.value });
}
})
}}
/>
- <StyledToscaDiv>
- <StyledToscaView value={this.state.content} onChange={this.handleYamlContent}/>
- </StyledToscaDiv>
+ <div>
+ <textarea value={this.state.content} onChange={this.handleYamlContent}/>
+ </div>
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={this.handleClose}>Close</Button>
*/
import React from 'react';
import { shallow } from 'enzyme';
-import ViewToscaModals from './ViewToscaModals';
+import ViewToscaModal from './ViewToscaModal';
import { mount } from 'enzyme';
-describe('Verify ViewToscaModals', () => {
+describe('Verify ViewToscaModal', () => {
beforeEach(() => {
fetch.resetMocks();
fetch.mockImplementation(() => {
});
it('Test the tosca model view render method', () => {
- const component = shallow(<ViewToscaModals/>);
+ const component = shallow(<ViewToscaModal/>);
component.setState({ toscaNames: {
"index": "1",
"toscaModelYaml": "MTCA",
});
it('Test Table icons', () => {
- const component = mount(<ViewToscaModals/>);
+ const component = mount(<ViewToscaModal/>);
expect(component.find('[className="MuiSelect-icon MuiTablePagination-selectIcon"]')).toBeTruthy();
});
it('Test handleYamlContent', () => {
const yamlContent = 'MTCA Tosca model details';
- const component = shallow(<ViewToscaModals/>);
+ const component = shallow(<ViewToscaModal/>);
component.find('[value="Please select Tosca model to view the details"]').prop('onChange')({ target: { value: yamlContent }});
expect(component.state('content')).toEqual(yamlContent);
});
it('Test handleClose', () => {
const historyMock = { push: jest.fn() };
- const handleClose = jest.spyOn(ViewToscaModals.prototype,'handleClose');
- const component = shallow(<ViewToscaModals history={historyMock} />)
+ const handleClose = jest.spyOn(ViewToscaModal.prototype,'handleClose');
+ const component = shallow(<ViewToscaModal history={historyMock} />)
component.find('[variant="secondary"]').prop('onClick')();
expect(handleClose).toHaveBeenCalledTimes(1);
expect(component.state('show')).toEqual(false);
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Verify ViewToscaModals Test the tosca model view render method 1`] = `
+exports[`Verify ViewToscaModal Test the tosca model view render method 1`] = `
<Styled(Bootstrap(Modal))
onHide={[Function]}
show={true}
}
title="View ToscaModel"
/>
- <styled.div>
- <styled.textarea
+ <div>
+ <textarea
onChange={[Function]}
value="Please select Tosca model to view the details"
/>
- </styled.div>
+ </div>
</ModalBody>
<ModalFooter>
<Button
<Navbar.Collapse>
<StyledNavDropdown title="Template">
- <NavDropdown.Item as={StyledLink} to="/viewToscaModals">View Tosca Model</NavDropdown.Item>
+ <NavDropdown.Item as={StyledLink} to="/viewToscaModal">View Tosca Model</NavDropdown.Item>
</StyledNavDropdown>
<StyledNavDropdown title="Closed Loop">
<NavDropdown.Item as={StyledLink} to="/openLoop">Open CL</NavDropdown.Item>
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
}
}
disabled={false}
- to="/viewToscaModals"
+ to="/viewToscaModal"
>
View Tosca Model
</DropdownItem>
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
- "componentId": "sc-jKJlTe",
+ "componentId": "sc-dxgOiQ",
"isStatic": false,
"rules": Array [
"
"displayName": "Styled(Link)",
"foldedComponentIds": Array [],
"render": [Function],
- "styledComponentId": "sc-jKJlTe",
+ "styledComponentId": "sc-dxgOiQ",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],