From 280f8015d06af1f41a3ef12e8300801c7a5e0d54 Mon Sep 17 00:00:00 2001 From: AviZi Date: Fri, 9 Jun 2017 02:39:56 +0300 Subject: [SDC-29] Amdocs OnBoard 1707 initial commit. Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi --- openecomp-ui/src/sdc-app/flows/FlowsActions.js | 46 ++++++++---------- openecomp-ui/src/sdc-app/flows/FlowsConstants.js | 23 ++++----- openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js | 46 +++++++++--------- .../src/sdc-app/flows/FlowsEditorModalView.jsx | 38 ++++++++++++--- openecomp-ui/src/sdc-app/flows/FlowsListEditor.js | 31 ++++++------ .../src/sdc-app/flows/FlowsListEditorView.jsx | 20 +++++++- openecomp-ui/src/sdc-app/flows/FlowsListReducer.js | 56 +++++++++++----------- openecomp-ui/src/sdc-app/flows/FlowsPunchOut.jsx | 15 ++++++ openecomp-ui/src/sdc-app/flows/FlowsReducersMap.js | 23 ++++----- openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx | 15 ++++++ openecomp-ui/src/sdc-app/flows/SequenceDiagram.jsx | 17 ++++++- .../sdc-app/flows/SequenceDiagramModelHelper.js | 21 ++++---- 12 files changed, 211 insertions(+), 140 deletions(-) (limited to 'openecomp-ui/src/sdc-app/flows') diff --git a/openecomp-ui/src/sdc-app/flows/FlowsActions.js b/openecomp-ui/src/sdc-app/flows/FlowsActions.js index b8772edb08..5a751064df 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsActions.js +++ b/openecomp-ui/src/sdc-app/flows/FlowsActions.js @@ -1,23 +1,18 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ - import RestAPIUtil from 'nfvo-utils/RestAPIUtil.js'; import Configuration from 'sdc-app/config/Configuration.js'; import {actionTypes, enums} from './FlowsConstants.js'; @@ -59,7 +54,8 @@ function decodeContent(base64Contents) { sequenceDiagramModel = payload.data || payload; sequenceDiagramModel = sequenceDiagramModel.model || sequenceDiagramModel; - } else if (payload.VERSION.major === 1) { + } + else if (payload.VERSION.major === 1) { description = payload.description; sequenceDiagramModel = payload.sequenceDiagramModel; } @@ -80,7 +76,7 @@ function createOrUpdate(flowData) { description: flowData.description }; - return RestAPIUtil.create( + return RestAPIUtil.post( baseUrl(flowData.serviceID, flowData.uniqueId), createOrUpdateRequest, {md5: true} @@ -89,11 +85,13 @@ function createOrUpdate(flowData) { const FlowsActions = Object.freeze({ - fetchFlowArtifacts(dispatch, {artifacts, diagramType, participants, serviceID}) { + fetchFlowArtifacts(dispatch, {artifacts, diagramType, participants, serviceID, readonly}) { let results = []; if (!Object.keys(artifacts).length) { - dispatch({type: actionTypes.FLOW_LIST_LOADED, results, participants, serviceID, diagramType}); - FlowsActions.openFlowDetailsEditor(dispatch); + dispatch({type: actionTypes.FLOW_LIST_LOADED, results, participants, serviceID, diagramType, readonly}); + if (!readonly) { + FlowsActions.openFlowDetailsEditor(dispatch); + } } else { Object.keys(artifacts).forEach(artifact => results.push({ @@ -102,13 +100,13 @@ const FlowsActions = Object.freeze({ serviceID, ...artifacts[artifact] })); - dispatch({type: actionTypes.FLOW_LIST_LOADED, results, participants, serviceID, diagramType}); + dispatch({type: actionTypes.FLOW_LIST_LOADED, results, participants, serviceID, diagramType, readonly}); } }, fetchArtifact(dispatch, {flow}){ let {serviceID, uniqueId, participants} = flow; - RestAPIUtil.fetch(baseUrl(serviceID, uniqueId)).then(response => { + return RestAPIUtil.fetch(baseUrl(serviceID, uniqueId)).then(response => { let {artifactName, base64Contents} = response; let {sequenceDiagramModel, ...other} = decodeContent(base64Contents); @@ -146,7 +144,7 @@ const FlowsActions = Object.freeze({ name: flow.artifactName }); } - createOrUpdate(flow).then(response => { + return createOrUpdate(flow).then(response => { let {uniqueId, artifactLabel} = response; flow = {...flow, uniqueId, artifactLabel}; if (isNew) { @@ -157,7 +155,7 @@ const FlowsActions = Object.freeze({ }, deleteFlow(dispatch, {flow}) { - RestAPIUtil.destroy(baseUrl(flow.serviceID, flow.uniqueId)).then(() => dispatch({ + return RestAPIUtil.destroy(baseUrl(flow.serviceID, flow.uniqueId)).then(() => dispatch({ type: actionTypes.DELETE_FLOW, flow })); @@ -179,10 +177,6 @@ const FlowsActions = Object.freeze({ dispatch({type: actionTypes.CLOSE_FLOW_DIAGRAM_EDITOR}); }, - flowDetailsDataChanged(dispatch, {deltaData}) { - dispatch({type: actionTypes.CURRENT_FLOW_DATA_CHANGED, deltaData}); - }, - reset(dispatch) { dispatch({type: actionTypes.RESET}); } diff --git a/openecomp-ui/src/sdc-app/flows/FlowsConstants.js b/openecomp-ui/src/sdc-app/flows/FlowsConstants.js index 5a43a4df4f..2b3d86bae2 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsConstants.js +++ b/openecomp-ui/src/sdc-app/flows/FlowsConstants.js @@ -1,23 +1,18 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ - import keyMirror from 'nfvo-utils/KeyMirror.js'; export const actionTypes = keyMirror({ @@ -46,3 +41,5 @@ export const enums = { INSTANTIATION_FLOWS: 'instantiationflows', MESSAGE_FLOWS: 'messageflows' }; + +export const FLOWS_EDITOR_FORM = 'FLOWS_FORM'; diff --git a/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js b/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js index eff1c36b80..f9585f985f 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js +++ b/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js @@ -1,42 +1,43 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ - import {connect} from 'react-redux'; import FlowsEditorModalView from './FlowsEditorModalView.jsx'; import FlowsActions from './FlowsActions.js'; +import {FLOWS_EDITOR_FORM} from './FlowsConstants.js'; +import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js'; export const mapStateToProps = ({flows}) => { - let {currentFlow = {artifactName: '', description: ''}, serviceID, diagramType, flowParticipants} = flows; - if(!currentFlow.serviceID){ - currentFlow.serviceID = serviceID; + let {data = {artifactName: '', description: ''}, serviceID, diagramType, flowParticipants, genericFieldInfo, formReady} = flows; + if(!data.serviceID){ + data.serviceID = serviceID; } - if(!currentFlow.artifactType){ - currentFlow.artifactType = diagramType; + if(!data.artifactType){ + data.artifactType = diagramType; } - if(!currentFlow.participants){ - currentFlow.participants = flowParticipants; + if(!data.participants){ + data.participants = flowParticipants; } + let isFormValid = ValidationHelper.checkFormValid(genericFieldInfo); return { - currentFlow + currentFlow: data, + genericFieldInfo, + isFormValid, + formReady }; }; @@ -47,7 +48,8 @@ const mapActionsToProps = (dispatch, {isNewArtifact}) => { FlowsActions.createOrUpdateFlow(dispatch, {flow}, isNewArtifact); }, onCancel: () => FlowsActions.closeFlowDetailsEditor(dispatch), - onDataChanged: deltaData => FlowsActions.flowDetailsDataChanged(dispatch, {deltaData}) + onDataChanged: deltaData => ValidationHelper.dataChanged(dispatch, {deltaData, formName: FLOWS_EDITOR_FORM}), + onValidateForm: () => ValidationHelper.validateForm(dispatch, FLOWS_EDITOR_FORM) }; }; diff --git a/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx b/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx index 8441c7d1d6..1250a0b58e 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx +++ b/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx @@ -1,30 +1,54 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ import React, {Component} from 'react'; import i18n from 'nfvo-utils/i18n/i18n.js'; -import Input from 'nfvo-components/input/validation/ValidationInput.jsx'; -import Form from 'nfvo-components/input/validation/ValidationForm.jsx'; +import Input from 'nfvo-components/input/validation/Input.jsx'; +import Form from 'nfvo-components/input/validation/Form.jsx'; class FlowsEditorModalView extends Component { render() { - let {onCancel, onDataChanged, currentFlow} = this.props; + let {onCancel, onDataChanged, currentFlow, genericFieldInfo, formReady, isFormValid, onValidateForm} = this.props; let {artifactName, description} = currentFlow; return ( -
this.onSaveClicked()} onReset={onCancel}> +
+ {genericFieldInfo && this.onSaveClicked()} + onReset={onCancel} formReady={formReady} isValid={isFormValid} onValidateForm={() => onValidateForm()} > onDataChanged({artifactName})}/> onDataChanged({description})}/> - + } +
); } diff --git a/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js b/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js index ff301b6e13..642c578eb7 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js +++ b/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js @@ -1,30 +1,28 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ - import {connect} from 'react-redux'; import FlowsActions from './FlowsActions.js'; import FlowsListEditorView from './FlowsListEditorView.jsx'; export const mapStateToProps = ({flows}) => { - let {flowList = [], isDisplayModal, isModalInEditMode, shouldShowWorkflowsEditor = true, currentFlow = undefined} = flows; - let isCheckedOut = currentFlow ? !currentFlow.readonly : true; + let {flowList = [], isDisplayModal, isModalInEditMode, shouldShowWorkflowsEditor = true, data = undefined, readonly} = flows; + let isCheckedOut = !readonly; + if(data && data.readonly){ + isCheckedOut = !data.readonly; + } return { flowList, @@ -32,7 +30,8 @@ export const mapStateToProps = ({flows}) => { isCheckedOut, isModalInEditMode, shouldShowWorkflowsEditor, - currentFlow + currentFlow: data, + readonly }; }; diff --git a/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx b/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx index 3cea3968ff..c5dbb4f909 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx +++ b/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx @@ -1,3 +1,18 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ import React, {PropTypes, Component} from 'react'; import i18n from 'nfvo-utils/i18n/i18n.js'; @@ -18,6 +33,7 @@ class FlowsListEditorView extends Component { isModalInEditMode: PropTypes.bool, isCheckedOut: PropTypes.bool, shouldShowWorkflowsEditor: PropTypes.bool, + readonly: PropTypes.bool, onAddWorkflowClick: PropTypes.func, onEditFlowDetailsClick: PropTypes.func, @@ -55,7 +71,7 @@ class FlowsListEditorView extends Component { onAdd={onAddWorkflowClick} filterValue={localFilter} onFilter={filter => this.setState({localFilter: filter})} - isCheckedOut={isCheckedOut}> + isReadOnlyMode={!isCheckedOut}> {this.filterList().map(flow => this.renderWorkflowListItem(flow, isCheckedOut))} @@ -68,7 +84,7 @@ class FlowsListEditorView extends Component { renderWorkflowEditorModal() { let { isDisplayModal, isModalInEditMode} = this.props; return ( - + {`${isModalInEditMode ? i18n('Edit Workflow') : i18n('Create New Workflow')}`} diff --git a/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js b/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js index f025450a58..14bf595050 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js +++ b/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js @@ -1,24 +1,19 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ - -import {actionTypes} from './FlowsConstants.js'; +import {actionTypes, FLOWS_EDITOR_FORM} from './FlowsConstants.js'; export default (state = {}, action) => { switch (action.type) { @@ -28,7 +23,8 @@ export default (state = {}, action) => { flowList: action.results, flowParticipants: action.participants, serviceID: action.serviceID, - diagramType: action.diagramType + diagramType: action.diagramType, + readonly: action.readonly }; case actionTypes.ADD_OR_UPDATE_FLOW: case actionTypes.ARTIFACT_LOADED: @@ -49,14 +45,6 @@ export default (state = {}, action) => { serviceID: action.flow.serviceID, diagramType: action.flow.artifactType || state.diagramType }; - case actionTypes.CURRENT_FLOW_DATA_CHANGED: - return { - ...state, - currentFlow: { - ...state.currentFlow, - ...action.deltaData - } - }; case actionTypes.DELETE_FLOW: return { ...state, @@ -65,7 +53,21 @@ export default (state = {}, action) => { case actionTypes.OPEN_FLOW_DETAILS_EDITOR: return { ...state, - currentFlow: action.flow, + formName: FLOWS_EDITOR_FORM, + formReady: null, + genericFieldInfo: { + artifactName : { + isValid: true, + errorText: '', + validations: [{type: 'required', data: true}] + }, + description: { + isValid: true, + errorText: '', + validations: [{type: 'required', data: true}] + } + }, + data: action.flow, isDisplayModal: true, isModalInEditMode: Boolean(action.flow && action.flow.uniqueId) }; @@ -73,20 +75,20 @@ export default (state = {}, action) => { case actionTypes.CLOSE_FLOW_DETAILS_EDITOR: return { ...state, - currentFlow: undefined, + data: undefined, isDisplayModal: false, isModalInEditMode: false }; case actionTypes.OPEN_FLOW_DIAGRAM_EDITOR: return { ...state, - currentFlow: action.flow, + data: action.flow, shouldShowWorkflowsEditor: false }; case actionTypes.CLOSE_FLOW_DIAGRAM_EDITOR: return { ...state, - currentFlow: undefined, + data: undefined, shouldShowWorkflowsEditor: true }; case actionTypes.RESET: diff --git a/openecomp-ui/src/sdc-app/flows/FlowsPunchOut.jsx b/openecomp-ui/src/sdc-app/flows/FlowsPunchOut.jsx index 958f9a0a2d..873003492b 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsPunchOut.jsx +++ b/openecomp-ui/src/sdc-app/flows/FlowsPunchOut.jsx @@ -1,3 +1,18 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ import React from 'react'; import ReactDOM from 'react-dom'; import Configuration from 'sdc-app/config/Configuration.js'; diff --git a/openecomp-ui/src/sdc-app/flows/FlowsReducersMap.js b/openecomp-ui/src/sdc-app/flows/FlowsReducersMap.js index b3c0b2e27b..54043498f0 100644 --- a/openecomp-ui/src/sdc-app/flows/FlowsReducersMap.js +++ b/openecomp-ui/src/sdc-app/flows/FlowsReducersMap.js @@ -1,25 +1,22 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ import flowListReducer from './FlowsListReducer.js'; +import {createPlainDataReducer} from 'sdc-app/common/reducers/PlainDataReducer.js'; export default { - flows: flowListReducer + flows: createPlainDataReducer(flowListReducer) }; diff --git a/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx b/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx index c4ab41841b..d0a5bf3251 100644 --- a/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx +++ b/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx @@ -1,3 +1,18 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ import React, {Component} from 'react'; import md5 from 'md5'; diff --git a/openecomp-ui/src/sdc-app/flows/SequenceDiagram.jsx b/openecomp-ui/src/sdc-app/flows/SequenceDiagram.jsx index 9970969884..b0bd40db40 100644 --- a/openecomp-ui/src/sdc-app/flows/SequenceDiagram.jsx +++ b/openecomp-ui/src/sdc-app/flows/SequenceDiagram.jsx @@ -1,3 +1,18 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ import React, {Component, PropTypes} from 'react'; import Button from 'react-bootstrap/lib/Button.js'; import Sequencer from 'dox-sequence-diagram-ui'; @@ -8,7 +23,7 @@ class SequenceDiagram extends Component { static propTypes = { onSave: PropTypes.func.isRequired, - onClose: PropTypes.func.isRequired, + onClose: PropTypes.func, model: PropTypes.object.isRequired }; diff --git a/openecomp-ui/src/sdc-app/flows/SequenceDiagramModelHelper.js b/openecomp-ui/src/sdc-app/flows/SequenceDiagramModelHelper.js index c2e10a6360..c83fdc91f0 100644 --- a/openecomp-ui/src/sdc-app/flows/SequenceDiagramModelHelper.js +++ b/openecomp-ui/src/sdc-app/flows/SequenceDiagramModelHelper.js @@ -1,23 +1,18 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ +/*! * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. */ - import emptyModel from './emptyModel.json'; function mergeLifelines(oldLifelines, newLifelines) { -- cgit 1.2.3-korg