diff options
author | 2017-09-11 15:45:37 +0300 | |
---|---|---|
committer | 2017-09-12 10:38:35 +0300 | |
commit | c8a540b3c234449163f6fb1899807bba951113b4 (patch) | |
tree | a8aae0dd0f6a0feb27369914e9e3fa321740e7ed /openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation | |
parent | 82d454fd3e8c9fdf66517d01a99019a379dbfdb6 (diff) |
Create new VSP, onboard from TOSCA file - UI
Change-Id: I018c6d07a4b9ec7e6b1507ab37e2550865423cfe
Issue-ID: SDC-230
Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation')
2 files changed, 9 insertions, 8 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationReducer.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationReducer.js index f0c10ed457..1d11bdd6b7 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationReducer.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationReducer.js @@ -89,16 +89,16 @@ function createErrorList(node, parent, deep = 0, errorList = []) { return errorList; } -const mapValidationDataToTree = validationData => { - let {heat, volume, network, artifacts, other} = validationData.importStructure || {}; +const mapValidationDataToTree = (validationData, packageName) => { + let {heat, nested, volume, network, artifacts, other} = validationData.importStructure || {}; return { children: [ { - name: 'HEAT', + name: packageName, expanded: true, type: 'heat', header: true, - children: (heat ? heat.map(mapHeatData) : []) + children: (heat ? heat.map(mapHeatData) : nested ? nested.map(mapHeatData) : []) }, ...(artifacts ? [{ name: 'artifacts', @@ -165,7 +165,8 @@ export default (state = {attachmentsTree: {}}, action) => { switch (action.type) { case softwareProductsActionTypes.SOFTWARE_PRODUCT_LOADED: let currentSoftwareProduct = action.response; - let attachmentsTree = currentSoftwareProduct.validationData ? mapValidationDataToTree(currentSoftwareProduct.validationData) : {}; + const packageName = currentSoftwareProduct.networkPackageName; + let attachmentsTree = currentSoftwareProduct.validationData ? mapValidationDataToTree(currentSoftwareProduct.validationData, packageName) : {}; let errorList = createErrorList(attachmentsTree); return { ...state, 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 2a2f4ac291..80d74b2964 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 @@ -93,9 +93,9 @@ function HeatFileTreeHeader(props) { <div onClick={() => props.selectNode(nodeFilters.ALL)} className={classNames({'attachments-tree-header': true, 'header-selected' : props.selectedNode === nodeFilters.ALL})} data-test-id='validation-tree-header'> <div className='tree-header-title' > - <SVGIcon name='zip' color={props.selectedNode === nodeFilters.ALL ? 'primary' : ''} iconClassName='header-icon' /> + {/*<SVGIcon name='zip' color={props.selectedNode === nodeFilters.ALL ? 'primary' : ''} iconClassName='header-icon' />*/} <span className={classNames({'tree-header-title-text' : true, - 'tree-header-title-selected' : props.selectedNode === nodeFilters.ALL})}>{i18n(`HEAT${hasErrors ? ' (Draft)' : ''}`)}</span> + 'tree-header-title-selected' : props.selectedNode === nodeFilters.ALL})}>{i18n(`${props.headerTitle} ${hasErrors ? '(Draft)' : ''}`)}</span> </div> <ErrorsAndWarningsCount errorList={props.errorList} size='large' /> </div>); @@ -134,7 +134,7 @@ class HeatFileTree extends React.Component { <div key={node.name + rand} className={classNames({'tree-block-inside' : !node.header})}> { node.header ? - <HeatFileTreeHeader selectedNode={selectedNode} errorList={this.props.errorList} selectNode={(nodeName) => this.selectNode(nodeName)} /> : + <HeatFileTreeHeader headerTitle={node.name} selectedNode={selectedNode} errorList={this.props.errorList} selectNode={(nodeName) => this.selectNode(nodeName)} /> : <HeatFileTreeRow toggleExpanded={this.props.toggleExpanded} node={node} path={path} selectedNode={selectedNode} selectNode={() => this.selectNode(node.name)} /> } { |