aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct
diff options
context:
space:
mode:
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-07-23 17:01:41 +0300
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-07-23 17:01:47 +0000
commit2d020a250af519765bcb6706986cef84614dbec6 (patch)
tree45003bc9a2cbcbfd4528e907061623f460c53940 /openecomp-ui/src/sdc-app/onboarding/softwareProduct
parentd2a61c3ab9eb1812613fdd8c468425903a2bc6e1 (diff)
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 <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationReducer.js23
1 files changed, 21 insertions, 2 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 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,