Merge branch 'master' into 'master'

Payload improvements in add new  policy feature  in React App

See merge request entgra/carbon-device-mgt!472
4.x.x
Dharmakeerthi Lasantha 5 years ago
commit 2a20c06c46

@ -30,7 +30,7 @@ class PublishDevices extends React.Component {
this.props.form.validateFields((err, values) => {
if (!err) {
if (isPublish) {
Object.assign(values, { active: isPublish });
values = { ...values, ...{ active: isPublish } };
}
this.props.getPolicyPayloadData(formName, values);
}

@ -65,14 +65,14 @@ class AddPolicy extends React.Component {
devicetype: selectedPlatformData.deviceType,
};
let payload = Object.assign(
newPolicyPayload,
publishDevicesData,
policyProfile,
policyTypeData,
groupData,
{ profile: profile },
);
let payload = {
...newPolicyPayload,
...publishDevicesData,
...policyProfile,
...policyTypeData,
...groupData,
...{ profile: profile },
};
console.log(payload);
};

@ -1,3 +1,20 @@
/*
* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.extensions.device.type.template.config;
import javax.xml.bind.annotation.XmlAttribute;

Loading…
Cancel
Save