From 8c6beedc3d58420988c9e80d75aad96198e2962e Mon Sep 17 00:00:00 2001 From: brunomilitzer Date: Fri, 4 Jun 2021 14:40:46 +0100 Subject: MERGE Clamp UI-React repo to Policy Gui Repo According to a Diff differences from one repo to the other, there was some missing changes from the original clamp repo to the policy gui repo. Issue-ID: POLICY-3267 Change-Id: I9a71841732dc5c3d9623bca9c1384866f4c826a6 Signed-off-by: brunomilitzer --- .../src/components/dialogs/Loop/DeployLoopModal.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'gui-clamp/ui-react/src/components/dialogs/Loop/DeployLoopModal.js') diff --git a/gui-clamp/ui-react/src/components/dialogs/Loop/DeployLoopModal.js b/gui-clamp/ui-react/src/components/dialogs/Loop/DeployLoopModal.js index b7ab8a5..5fff586 100644 --- a/gui-clamp/ui-react/src/components/dialogs/Loop/DeployLoopModal.js +++ b/gui-clamp/ui-react/src/components/dialogs/Loop/DeployLoopModal.js @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * ONAP CLAMP + * ONAP POLICY-CLAMP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights + * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -44,6 +44,7 @@ const FormStyled = styled(Form.Group)` ` export default class DeployLoopModal extends React.Component { + constructor(props, context) { super(props, context); @@ -65,13 +66,7 @@ export default class DeployLoopModal extends React.Component { getInitialKeyValue(temporaryPropertiesJson) { const deployJsonList = temporaryPropertiesJson["dcaeDeployParameters"]; - let initialKey; - Object.keys(deployJsonList) - .filter((obj) => Object.keys(deployJsonList).indexOf(obj) === 0) - .map(obj => - initialKey = obj - ); - return initialKey; + return Object.keys(deployJsonList).find((obj) => Object.keys(deployJsonList).indexOf(obj) === 0); } componentWillReceiveProps(newProps) { @@ -145,8 +140,8 @@ export default class DeployLoopModal extends React.Component { const deployJsonList = this.state.temporaryPropertiesJson["dcaeDeployParameters"]; var indents = []; - Object.keys(deployJsonList).map((item, key) => - indents.push( + Object.keys(deployJsonList).forEach(item => + indents.push( { this.renderDeployParam(deployJsonList[item]) } ) ); @@ -155,8 +150,8 @@ export default class DeployLoopModal extends React.Component { renderDeployParam(deployJson) { var indents = []; - Object.keys(deployJson).map((item, key) => - indents.push( + Object.keys(deployJson).forEach(item => + indents.push( { item } )); -- cgit 1.2.3-korg