Modify the PolicyDeploymentEditor to support checkboxes
Add code to the PolicyDeploymentEditor so that checkboxes are rendered.
Issue-ID: POLICY-2931
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I3c933272419770595b706f6950f821220a76f789
diff --git a/ui-react/src/components/dialogs/Policy/ViewAllPolicies.js b/ui-react/src/components/dialogs/Policy/ViewAllPolicies.js
index 48d52a1..f986dff 100644
--- a/ui-react/src/components/dialogs/Policy/ViewAllPolicies.js
+++ b/ui-react/src/components/dialogs/Policy/ViewAllPolicies.js
@@ -75,7 +75,8 @@
font-size: ${props => props.theme.policyEditorFontSize};
width: 97%;
margin-left: auto;
- margin-right: 0;
+ margin-right: auto;
+ margin-top: 20px;
`
@@ -291,13 +292,14 @@
render: rowData => {
return (
<DetailedRow>
- <PolicyEditor policyModelType={rowData["type"]} policyModelTypeVersion={rowData["type_version"]} policyName={rowData["name"]} policyVersion={rowData["version"]} policyProperties={rowData["properties"]} policyUpdateFunction={this.getAllPolicies} />
+ <PolicyEditor policyModelType={rowData["type"]} policyModelTypeVersion={rowData["type_version"]} policyName={rowData["name"]} policyVersion={rowData["version"]} policyProperties={rowData["properties"]} policiesTableUpdateFunction={this.getAllPolicies} />
</DetailedRow>
)
},
},
{
icon: DehazeIcon,
+ openIcon: DehazeIcon,
tooltip: 'Show Raw Data',
render: rowData => {
return (
@@ -309,10 +311,13 @@
},
{
icon: PublishIcon,
+ openIcon: PublishIcon,
tooltip: 'PDP Group Deployment',
render: rowData => {
return (
- <PolicyDeploymentEditor policyData={rowData}/>
+ <DetailedRow>
+ <PolicyDeploymentEditor policyData={rowData} policiesTableUpdateFunction={this.getAllPolicies} />
+ </DetailedRow>
)
},
}
@@ -367,6 +372,7 @@
},
{
icon: DehazeIcon,
+ openIcon: DehazeIcon,
tooltip: 'Show Raw Data',
render: rowData => {
return (
@@ -378,11 +384,12 @@
},
{
icon: AddIcon,
+ openIcon: AddIcon,
tooltip: 'Create a policy from this model',
render: rowData => {
return (
<DetailedRow>
- <PolicyEditor policyModelType={rowData["policyModelType"]} policyModelTypeVersion={rowData["version"]} policyProperties={{}} policyUpdateFunction={this.getAllPolicies} />
+ <PolicyEditor policyModelType={rowData["policyModelType"]} policyModelTypeVersion={rowData["version"]} policyProperties={{}} policiesTableUpdateFunction={this.getAllPolicies} />
</DetailedRow>
)
},