From 2d020a250af519765bcb6706986cef84614dbec6 Mon Sep 17 00:00:00 2001 From: svishnev Date: Mon, 23 Jul 2018 17:01:41 +0300 Subject: heat validation fix ASDC onboarding is not showing error message from nested files inside volume in HEAT zip Issue-ID: SDC-1554 Change-Id: If348c5d506c2334c9d4db87872c574f00ea92c62 Signed-off-by: svishnev --- .../validation/HeatValidationReducer.js | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct') 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 67e36ca040..19684512a1 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 @@ -16,10 +16,10 @@ import { actionTypes as softwareProductsActionTypes } from 'sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js'; import { actionTypes, nodeFilters } from './HeatValidationConstants.js'; -const mapVolumeData = ({ fileName, env, errors }) => ({ +const mapNestedData = ({ fileName, env, errors }) => ({ name: fileName, expanded: true, - type: 'volume', + type: 'heat', children: env && [ { name: env.fileName, @@ -30,6 +30,25 @@ const mapVolumeData = ({ fileName, env, errors }) => ({ errors }); +const mapVolumeData = ({ fileName, env, errors, nested }) => ({ + name: fileName, + expanded: true, + type: 'volume', + children: [ + ...(env + ? [ + { + name: env.fileName, + errors: env.errors, + type: 'env' + } + ] + : []), + ...(nested ? nested.map(mapNestedData) : []) + ], + errors +}); + const mapNetworkData = ({ fileName, env, errors }) => ({ name: fileName, expanded: true, -- cgit 1.2.3-korg