From 644017cb3edd5b7a077a634ffd5daf2fee6bc088 Mon Sep 17 00:00:00 2001 From: az2497 Date: Thu, 10 Aug 2017 17:49:40 +0300 Subject: [SDC] OnBoard with enabled tests and features Change-Id: I4c1bbf6e1c854cf97a3561c736f83da44b58b7c0 Signed-off-by: az2497 [SDC] OnBoard with enabled tests and features. Change-Id: Icd52f039aee4dd393a1404d530bb9fdd0b20e604 Signed-off-by: az2497 --- .../softwareProduct/SoftwareProductActionHelper.js | 2 + .../attachments/SoftwareProductAttachmentsView.jsx | 37 +++++++++------- .../attachments/setup/HeatSetupView.jsx | 51 ++++++++++++---------- .../attachments/validation/HeatValidationView.jsx | 28 +++++------- .../components/images/ImageValidations.js | 6 +++ .../images/SoftwareProductComponentsImageEditor.js | 9 ++-- .../SoftwareProductComponentsImageEditorReducer.js | 2 +- .../SoftwareProductComponentsImageEditorView.jsx | 5 ++- .../images/imagesEditorComponents/FileDetails.jsx | 1 + .../images/imagesEditorComponents/Version.jsx | 4 +- ...oftwareProductComponentLoadBalancingRefView.jsx | 1 + .../SoftwareProductComponentsMonitoringView.jsx | 47 +++++++++++--------- ...SoftwareProductComponentProcessesEditorView.jsx | 14 +----- .../landingPage/SoftwareProductLandingPageView.jsx | 17 +++----- .../SoftwareProductProcessesEditorView.jsx | 14 +----- 15 files changed, 120 insertions(+), 118 deletions(-) create mode 100644 openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/ImageValidations.js (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct') diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js index 90a2bb8f2e..d4bee0a876 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js @@ -409,6 +409,7 @@ const SoftwareProductActionHelper = { } }); const newVersionId = adjustMajorVersion(version.label, 1); + OnboardingActionHelper.updateCurrentScreenVersion(dispatch, {label: newVersionId, id: newVersionId}); SoftwareProductActionHelper.fetchSoftwareProduct(dispatch,{softwareProductId, version: {id: newVersionId}}); return Promise.resolve({newVersion: {id: newVersionId}}); }); @@ -438,6 +439,7 @@ const SoftwareProductActionHelper = { newVersionId = adjustMinorVersion(version.label, -1); break; } + OnboardingActionHelper.updateCurrentScreenVersion(dispatch, {label: newVersionId, id: newVersionId}); SoftwareProductActionHelper.fetchSoftwareProduct(dispatch,{softwareProductId, version:{id: newVersionId}}); return Promise.resolve({newVersion: {id: newVersionId}}); }); diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx index ef4aecf568..3da26cc20f 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx @@ -18,7 +18,7 @@ import Tabs from 'react-bootstrap/lib/Tabs.js'; import Tab from 'react-bootstrap/lib/Tab.js'; import {tabsMapping} from './SoftwareProductAttachmentsConstants.js'; import i18n from 'nfvo-utils/i18n/i18n.js'; -import Icon from 'nfvo-components/icon/Icon.jsx'; +import SVGIcon from 'sdc-ui/lib/react/SVGIcon.js'; import HeatValidation from './validation/HeatValidation.js'; class HeatScreenView extends Component { @@ -38,27 +38,32 @@ class HeatScreenView extends Component {
{(this.state.activeTab === tabsMapping.SETUP) && - onDownload({heatCandidate: heatSetup, isReadOnlyMode, version}) : undefined} data-test-id='download-heat'/>} {(this.state.activeTab === tabsMapping.VALIDATION && softwareProductId) && - onGoToOverview({version}) : undefined} - image='go-to-overview' + name='proceedToOverview' + className='icon-component' label={i18n('Go to Overview')} + labelPosition='right' + color={this.props.goToOverview ? 'primary' : 'secondary'} data-test-id='go-to-overview'/>} - {this.refs.hiddenImportFileInput.click(evt);}} data-test-id='upload-heat'/> this.setState({activeTab: tabsMapping.VALIDATION}) ); diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetupView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetupView.jsx index 901a583e24..17b3179d01 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetupView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetupView.jsx @@ -20,7 +20,6 @@ import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger.js'; import FormControl from 'react-bootstrap/lib/FormControl.js'; import i18n from 'nfvo-utils/i18n/i18n.js'; import SelectInput from 'nfvo-components/input/SelectInput.jsx'; -import Icon from 'nfvo-components/icon/Icon.jsx'; import SVGIcon from 'sdc-ui/lib/react/SVGIcon.js'; import {fileTypes} from './HeatSetupConstants.js'; import {tabsMapping} from '../SoftwareProductAttachmentsConstants.js'; @@ -52,7 +51,7 @@ class SortableModuleFileList extends Component { render() { - let {unassigned, onModuleRename, onModuleDelete, onModuleAdd, onBaseAdd, onModuleFileTypeChange, isBaseExist} = this.props; + let {unassigned, onModuleRename, onModuleDelete, onModuleAdd, onBaseAdd, onModuleFileTypeChange, isBaseExist, isReadOnlyMode} = this.props; const childProps = module => ({ module, onModuleRename, @@ -68,19 +67,17 @@ class SortableModuleFileList extends Component { items={this.state.data} draggingIndex={this.state.draggingIndex} sortId={i} - outline='list'> + outline='list'> ); }, this); return ( -
+
0) ? 'modules-list-wrapper-divider' : ''}`}>
-
- {!isBaseExist && } - -
+ {!isBaseExist &&
} +
-
    {listItems}
+ {(listItems.length > 0) &&
    {listItems}
}
); } @@ -89,20 +86,24 @@ class SortableModuleFileList extends Component { const tooltip = (name) => {name}; const UnassignedFileList = (props) => { return ( -
+
+
+
{i18n('UNASSIGNED FILES')}
{props.children}
+
); }; const EmptyListContent = props => { - let {onClick, heatDataExist} = props; + let {onClick, heatDataExist, isReadOnlyMode} = props; let displayText = heatDataExist ? 'All Files Are Assigned' : ''; return (
{i18n(displayText)}
- {heatDataExist &&
{i18n('Proceed To Validation')}
} + {heatDataExist && }
); }; @@ -112,14 +113,11 @@ const UnassignedFile = (props) => ( ); -const AddOrDeleteVolumeFiels = ({add = true, onAdd, onDelete}) => { +const AddOrDeleteVolumeFiles = ({add = true, onAdd, onDelete, isReadOnlyMode}) => { const displayText = add ? 'Add Volume Files' : 'Delete Volume Files'; const action = add ? onAdd : onDelete; return ( -
- - {i18n(displayText)} -
+ ); }; @@ -195,14 +193,14 @@ class ModuleFile extends Component { } render() { - const {module: {name, isBase, yaml, env, vol, volEnv}, onModuleDelete, files, onModuleFileTypeChange} = this.props; + const {module: {name, isBase, yaml, env, vol, volEnv}, onModuleDelete, files, onModuleFileTypeChange, isReadOnlyMode} = this.props; const {displayVolumes} = this.state; const moduleType = isBase ? 'BASE' : 'MODULE'; return (
- + {`${moduleType}: `}
{this.renderNameAccordingToEditState()} @@ -235,7 +233,7 @@ class ModuleFile extends Component { files={files} selected={volEnv} onChange={onModuleFileTypeChange}/>} - this.setState({displayVolumes: true})} onDelete={() => this.deleteVolumeFiles()} add={!displayVolumes}/> + this.setState({displayVolumes: true})} onDelete={() => this.deleteVolumeFiles()} add={!displayVolumes}/>
); @@ -245,15 +243,15 @@ class ModuleFile extends Component { class ArtifactOrNestedFileList extends Component { render() { - let {type, title, selected, options, onSelectChanged, onAddAllUnassigned} = this.props; + let {type, title, selected, options, onSelectChanged, onAddAllUnassigned, isReadOnlyMode, headerClassName} = this.props; return ( -
+
- {type === 'artifact' && ()} + {type === 'artifact' && ()} {`${title}`} - {type === 'artifact' && {i18n('Add All Unassigned Files')}} + {type === 'artifact' && }
{type === 'nested' ? (
    {selected.map(nested => @@ -294,6 +292,7 @@ class SoftwareProductHeatSetupView extends Component {
    0) ? 'with-list-items' : ''} onAddAllUnassigned={onAddAllUnassigned}/>
    @@ -316,6 +318,7 @@ class SoftwareProductHeatSetupView extends Component { : ( this.processAndValidateHeat({modules, unassigned, artifacts, nested}, heatSetupCache)}/>) } diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationView.jsx index f2d5de4dff..62dcb82db1 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationView.jsx @@ -16,19 +16,18 @@ import React, {Component, PropTypes} from 'react'; import classNames from 'classnames'; import Collapse from 'react-bootstrap/lib/Collapse.js'; -import Icon from 'nfvo-components/icon/Icon.jsx'; import SVGIcon from 'sdc-ui/lib/react/SVGIcon.js'; import i18n from 'nfvo-utils/i18n/i18n.js'; import {mouseActions, errorLevels, nodeFilters} from './HeatValidationConstants.js'; const leftPanelWidth = 250; const typeToIcon = Object.freeze({ - heat: 'heat', - volume: 'volume', + heat: 'nestedHeat', + volume: 'base', network: 'network', - artifact: 'validation-artifacts', + artifact: 'artifacts', env: 'env', - other: 'validation-other' + other: 'other' }); @@ -74,7 +73,7 @@ function HeatFileTreeRow(props) { { - + } { @@ -94,7 +93,7 @@ function HeatFileTreeHeader(props) {
    props.selectNode(nodeFilters.ALL)} className={classNames({'attachments-tree-header': true, 'header-selected' : props.selectedNode === nodeFilters.ALL})} data-test-id='validation-tree-header'>
    - + {i18n(`HEAT${hasErrors ? ' (Draft)' : ''}`)}
    @@ -200,12 +199,13 @@ class HeatMessageBoard extends Component { } renderError(error) { let rand = Math.random() * (3000 - 1) + 1; + console.log(this.props.selectedNode ); return (
    {error.level === errorLevels.WARNING ? - : } + : } { (this.props.selectedNode === nodeFilters.ALL) ? @@ -217,7 +217,7 @@ class HeatMessageBoard extends Component { {i18n(error.errorMessage)} : - i18n(error.errorMesage) + i18n(error.errorMessage) }
    @@ -234,18 +234,14 @@ class ErrorsAndWarningsCount extends Component { if (!errors) { return null; } - let errIcon = 'error'; let {size} = this.props; - if (size && size === 'large') { - errIcon += '-lg'; - } return (
    {(errors.errorCount > 0) &&
    - -
    {errors.errorCount}
    + +
    ={errors.errorCount}
    } {(errors.warningCount > 0) &&
    - +
    {errors.warningCount}
    }
    ); diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/ImageValidations.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/ImageValidations.js new file mode 100644 index 0000000000..2483d0aaa2 --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/ImageValidations.js @@ -0,0 +1,6 @@ + +import Validator from 'nfvo-utils/Validator.js'; + +export const imageCustomValidations = { + 'version': value => Validator.validate('version', value, [{type: 'required', data: true}]) +}; diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditor.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditor.js index 49d891c9df..5c81f05e80 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditor.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditor.js @@ -54,9 +54,12 @@ const mapActionsToProps = (dispatch, {softwareProductId, componentId, version}) onDataChanged: (deltaData) => ValidationHelper.dataChanged(dispatch, {deltaData, formName: forms.IMAGE_EDIT_FORM}), onSubmit: ({data, qdata}) => SoftwareProductComponentsImageActionHelper.saveImageDataAndQuestionnaire(dispatch, {softwareProductId, componentId, version, data, qdata}), onCancel: () => SoftwareProductComponentsImageActionHelper.closeImageEditor(dispatch), - onValidateForm: () => ValidationHelper.validateForm(dispatch, forms.IMAGE_EDIT_FORM), - onQDataChanged: (deltaData) => ValidationHelper.qDataChanged(dispatch, {deltaData, - qName: IMAGE_QUESTIONNAIRE}), + onValidateForm: customValidations => { + ValidationHelper.validateForm(dispatch, forms.IMAGE_EDIT_FORM); + ValidationHelper.qValidateForm(dispatch, IMAGE_QUESTIONNAIRE, customValidations); + }, + onQDataChanged: (deltaData, customValidations) => ValidationHelper.qDataChanged(dispatch, {deltaData, + qName: IMAGE_QUESTIONNAIRE, customValidations}), }; }; diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorReducer.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorReducer.js index 0ab785a97f..7c357429e5 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorReducer.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorReducer.js @@ -30,7 +30,7 @@ export default (state = {}, action) => { 'fileName' : { isValid: true, errorText: '', - validations: [{type: 'required', data: true}, {type: 'validateName', data: true}] + validations: [{type: 'required', data: true}] } }, formName: forms.IMAGE_EDIT_FORM diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorView.jsx index 300f8edcc3..7c1a3f5b55 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/SoftwareProductComponentsImageEditorView.jsx @@ -20,6 +20,7 @@ import Form from 'nfvo-components/input/validation/Form.jsx'; import FileDetails from './imagesEditorComponents/FileDetails.jsx'; import ImageDetails from './imagesEditorComponents/ImageDetails.jsx'; +import {imageCustomValidations} from './ImageValidations.js'; class SoftwareProductComponentsImageEditorView extends React.Component { static propTypes = { @@ -44,7 +45,7 @@ class SoftwareProductComponentsImageEditorView extends React.Component { isValid={isFormValid} formReady={formReady} submitButtonText={editingMode ? i18n('Save') : i18n('Create')} - onValidateForm={() => onValidateForm() } + onValidateForm={() => onValidateForm(imageCustomValidations) } className='vsp-components-image-editor'>
    - {editingMode && } + {editingMode && }
    }
    diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/FileDetails.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/FileDetails.jsx index ca58b697a2..2e9ab417d8 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/FileDetails.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/FileDetails.jsx @@ -40,6 +40,7 @@ const FileDetails = ({editingMode, fileName, onDataChanged, isManual, dataMap, o type='text' className='image-filename'/> + {!editingMode &&
    {i18n('After image creation you must go to Edit Image and add File Version')}
    } {editingMode && } {editingMode && } diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/Version.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/Version.jsx index 3cac9a51b8..7dd577b8c9 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/Version.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/images/imagesEditorComponents/Version.jsx @@ -17,6 +17,7 @@ import React from 'react'; import i18n from 'nfvo-utils/i18n/i18n.js'; import Input from 'nfvo-components/input/validation/Input.jsx'; import GridItem from 'nfvo-components/grid/GridItem.jsx'; +import {imageCustomValidations} from '../ImageValidations.js'; const Version = ({isManual, dataMap, qgenericFieldInfo, onQDataChanged}) => { @@ -28,7 +29,8 @@ const Version = ({isManual, dataMap, qgenericFieldInfo, onQDataChanged}) => { type='text' className='image-version' label={i18n('Version')} - onChange={(version) => onQDataChanged({'version' : version})} + isRequired={true} + onChange={(version) => onQDataChanged({'version' : version}, {'version' : imageCustomValidations['version']})} isValid={qgenericFieldInfo['version'].isValid} errorText={qgenericFieldInfo['version'].errorText} value={dataMap['version']}/> diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/loadBalancing/SoftwareProductComponentLoadBalancingRefView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/loadBalancing/SoftwareProductComponentLoadBalancingRefView.jsx index 9ae9e359b0..8a82f54901 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/loadBalancing/SoftwareProductComponentLoadBalancingRefView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/loadBalancing/SoftwareProductComponentLoadBalancingRefView.jsx @@ -50,6 +50,7 @@ const pointers = [ added: 'Please describe.' } ]; +//TODO check for buttons const TextAreaItem = ({item, toggle, expanded, genericFieldInfo, dataMap, onQDataChanged}) => ( diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringView.jsx index 36c1728ef3..2d5a965c40 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringView.jsx @@ -15,10 +15,8 @@ */ import React, {Component, PropTypes} from 'react'; import Dropzone from 'react-dropzone'; -import ButtonGroup from 'react-bootstrap/lib/ButtonGroup.js'; -import ButtonToolbar from 'react-bootstrap/lib/ButtonToolbar.js'; -import Button from 'react-bootstrap/lib/Button.js'; -import i18n from 'nfvo-utils/i18n/i18n.js'; +import Button from 'sdc-ui/lib/react/Button.js'; +import DraggableUploadFileBox from 'nfvo-components/fileupload/DraggableUploadFileBox.jsx'; import {fileTypes, type2Title, type2Name} from './SoftwareProductComponentsMonitoringConstants.js'; @@ -59,7 +57,7 @@ class SoftwareProductComponentsMonitoringView extends Component { let typeDisplayName = type2Title[type]; return ( this.handleImport(acceptedFiles, rejectedFiles, {isReadOnlyMode, type, refAndName})} onDragEnter={() => this.handleOnDragEnter(isReadOnlyMode)} onDragLeave={() => this.setState({dragging:false})} @@ -71,7 +69,7 @@ class SoftwareProductComponentsMonitoringView extends Component { disabled>
    {typeDisplayName}
    - {fileName ? this.renderUploadedFileName(fileName, type) : this.renderUploadButton(refAndName)} + {fileName ? this.renderUploadedFileName(fileName, type, isReadOnlyMode) : this.renderUploadButton(refAndName)}
    ); @@ -80,25 +78,32 @@ class SoftwareProductComponentsMonitoringView extends Component { renderUploadButton(refAndName) { let {isReadOnlyMode} = this.props; return ( -
    -
    {i18n('Drag & drop for upload')}
    -
    {i18n('or')}
    -
    this.refs[refAndName].open()}> - {i18n('Select file')} -
    -
    + this.refs[refAndName].open()}/> ); } - renderUploadedFileName(filename, type) { + renderUploadedFileName(filename, type, isReadOnlyMode) { return ( - - - - - - +
    + + +
    ); } diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesEditorView.jsx index 18f2ee129c..87abaf4978 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesEditorView.jsx @@ -17,6 +17,7 @@ import React from 'react'; import i18n from 'nfvo-utils/i18n/i18n.js'; import Dropzone from 'react-dropzone'; +import DraggableUploadFileBox from 'nfvo-components/fileupload/DraggableUploadFileBox.jsx'; import {optionsInputValues as ComponentProcessesOptionsInputValues} from './SoftwareProductComponentProcessesConstants.js'; import Form from 'nfvo-components/input/validation/Form.jsx'; import Input from 'nfvo-components/input/validation/Input.jsx'; @@ -31,17 +32,6 @@ const SoftwareProductProcessEditorPropType = React.PropTypes.shape({ type: React.PropTypes.string }); -const FileUploadBox = ({onClick}) => { - return ( -
    -
    {i18n('Drag & drop for upload')}
    -
    {i18n('or')}
    -
    - {i18n('Select file')} -
    -
    - ); -}; class SoftwareProductProcessesEditorView extends React.Component { @@ -99,7 +89,7 @@ class SoftwareProductProcessesEditorView extends React.Component { type='text'/>
    - this.refs.processEditorFileInput.open()} /> + this.refs.processEditorFileInput.open()} /> diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx index d3738e3ea4..7ffbeda4dc 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx @@ -19,7 +19,7 @@ import Dropzone from 'react-dropzone'; import i18n from 'nfvo-utils/i18n/i18n.js'; - +import DraggableUploadFileBox from 'nfvo-components/fileupload/DraggableUploadFileBox.jsx'; import SVGIcon from 'sdc-ui/lib/react/SVGIcon.js'; import SoftwareProductComponentsList from '../components/SoftwareProductComponentsList.js'; @@ -128,14 +128,11 @@ class SoftwareProductLandingPageView extends React.Component {
-
-
{i18n('Drag & drop for upload')}
-
{i18n('or')}
-
this.refs.fileInput.open()}> - {i18n('Select file')} -
-
+ this.refs.fileInput.open()}/>
); @@ -229,7 +226,7 @@ const ProductSummary = ({currentSoftwareProduct, onDetailsSelect}) => { const LicenseAgreement = ({licenseAgreementName}) => { if (!licenseAgreementName) { - return (
{i18n('Missing')}
); + return (
{i18n('Missing')}
); } return
{licenseAgreementName}
; }; diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesEditorView.jsx index 137e4a2b4e..0df36cf65d 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesEditorView.jsx @@ -17,6 +17,7 @@ import React from 'react'; import Dropzone from 'react-dropzone'; import classnames from 'classnames'; +import DraggableUploadFileBox from 'nfvo-components/fileupload/DraggableUploadFileBox.jsx'; import i18n from 'nfvo-utils/i18n/i18n.js'; import {optionsInputValues as ProcessesOptionsInputValues} from './SoftwareProductProcessesConstants.js'; import Form from 'nfvo-components/input/validation/Form.jsx'; @@ -32,17 +33,6 @@ const SoftwareProductProcessEditorPropType = React.PropTypes.shape({ type: React.PropTypes.string }); -const FileUploadBox = ({onClick}) => { - return ( -
-
{i18n('Drag & drop for upload')}
-
{i18n('or')}
-
- {i18n('Select file')} -
-
- ); -}; class SoftwareProductProcessesEditorView extends React.Component { @@ -101,7 +91,7 @@ class SoftwareProductProcessesEditorView extends React.Component { type='text'/> - this.refs.processEditorFileInput.open()}/> + this.refs.processEditorFileInput.open()}/> -- cgit 1.2.3-korg