sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 1 | /*- |
| 2 | * ============LICENSE_START======================================================= |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 3 | * ONAP POLICY-CLAMP |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 4 | * ================================================================================ |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 5 | * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 6 | * reserved. |
| 7 | * ================================================================================ |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | * ============LICENSE_END============================================ |
| 20 | * =================================================================== |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | import React from 'react' |
| 25 | import Button from 'react-bootstrap/Button'; |
xuegao | 635445a | 2020-03-02 11:37:20 +0100 | [diff] [blame] | 26 | import Form from 'react-bootstrap/Form'; |
| 27 | import Col from 'react-bootstrap/Col'; |
| 28 | import Row from 'react-bootstrap/Row'; |
| 29 | import Select from 'react-select'; |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 30 | import Modal from 'react-bootstrap/Modal'; |
| 31 | import styled from 'styled-components'; |
| 32 | import LoopService from '../../../api/LoopService'; |
xuegao | e18ed70 | 2020-03-17 10:46:39 +0100 | [diff] [blame] | 33 | import LoopCache from '../../../api/LoopCache'; |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 34 | import { JSONEditor } from '@json-editor/json-editor/dist/jsoneditor.js'; |
| 35 | import "@fortawesome/fontawesome-free/css/all.css" |
xuegao | e18ed70 | 2020-03-17 10:46:39 +0100 | [diff] [blame] | 36 | import Alert from 'react-bootstrap/Alert'; |
sebdet | c0ec0fc | 2020-05-18 12:31:11 +0200 | [diff] [blame] | 37 | import OnapConstant from '../../../utils/OnapConstants'; |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 38 | import OnapUtils from '../../../utils/OnapUtils'; |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 39 | |
| 40 | const ModalStyled = styled(Modal)` |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 41 | background-color: transparent; |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 42 | ` |
| 43 | |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 44 | const DivWhiteSpaceStyled = styled.div` |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 45 | white-space: pre; |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 46 | ` |
| 47 | |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 48 | export default class PolicyModal extends React.Component { |
| 49 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 50 | state = { |
| 51 | show: true, |
| 52 | loopCache: this.props.loopCache, |
| 53 | jsonEditor: null, |
| 54 | policyName: this.props.match.params.policyName, |
| 55 | // This is to indicate whether it's an operational or config policy (in terms of loop instance) |
| 56 | policyInstanceType: this.props.match.params.policyInstanceType, |
| 57 | pdpGroup: null, |
| 58 | pdpGroupList: [], |
| 59 | pdpSubgroupList: [], |
| 60 | chosenPdpGroup: '', |
| 61 | chosenPdpSubgroup: '', |
| 62 | showSucAlert: false, |
| 63 | showFailAlert: false |
| 64 | }; |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 65 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 66 | constructor(props, context) { |
| 67 | super(props, context); |
| 68 | this.handleClose = this.handleClose.bind(this); |
| 69 | this.handleSave = this.handleSave.bind(this); |
| 70 | this.renderJsonEditor = this.renderJsonEditor.bind(this); |
| 71 | this.handlePdpGroupChange = this.handlePdpGroupChange.bind(this); |
| 72 | this.handlePdpSubgroupChange = this.handlePdpSubgroupChange.bind(this); |
| 73 | this.createJsonEditor = this.createJsonEditor.bind(this); |
| 74 | this.handleRefresh = this.handleRefresh.bind(this); |
| 75 | this.disableAlert = this.disableAlert.bind(this); |
| 76 | this.renderPdpGroupDropDown = this.renderPdpGroupDropDown.bind(this); |
| 77 | this.renderOpenLoopMessage = this.renderOpenLoopMessage.bind(this); |
| 78 | this.renderModalTitle = this.renderModalTitle.bind(this); |
| 79 | this.readOnly = props.readOnly !== undefined ? props.readOnly : false; |
| 80 | } |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 81 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 82 | handleSave() { |
| 83 | var editorData = this.state.jsonEditor.getValue(); |
| 84 | var errors = this.state.jsonEditor.validate(); |
| 85 | errors = errors.concat(this.customValidation(editorData, this.state.loopCache.getTemplateName())); |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 86 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 87 | if (errors.length !== 0) { |
| 88 | console.error("Errors detected during policy data validation ", errors); |
| 89 | this.setState({ |
| 90 | showFailAlert: true, |
| 91 | showMessage: 'Errors detected during policy data validation:\n' + OnapUtils.jsonEditorErrorFormatter(errors) |
| 92 | }); |
| 93 | return; |
| 94 | } |
| 95 | else { |
| 96 | console.info("NO validation errors found in policy data"); |
| 97 | if (this.state.policyInstanceType === OnapConstant.microServiceType) { |
| 98 | this.state.loopCache.updateMicroServiceProperties(this.state.policyName, editorData); |
| 99 | this.state.loopCache.updateMicroServicePdpGroup(this.state.policyName, this.state.chosenPdpGroup, this.state.chosenPdpSubgroup); |
| 100 | LoopService.setMicroServiceProperties(this.state.loopCache.getLoopName(), this.state.loopCache.getMicroServiceForName(this.state.policyName)).then(resp => { |
| 101 | this.setState({ show: false }); |
| 102 | this.props.history.push('/'); |
| 103 | this.props.loadLoopFunction(this.state.loopCache.getLoopName()); |
| 104 | }); |
| 105 | } else if (this.state.policyInstanceType === OnapConstant.operationalPolicyType) { |
| 106 | this.state.loopCache.updateOperationalPolicyProperties(this.state.policyName, editorData); |
| 107 | this.state.loopCache.updateOperationalPolicyPdpGroup(this.state.policyName, this.state.chosenPdpGroup, this.state.chosenPdpSubgroup); |
| 108 | LoopService.setOperationalPolicyProperties(this.state.loopCache.getLoopName(), this.state.loopCache.getOperationalPolicies()).then(resp => { |
| 109 | this.setState({ show: false }); |
| 110 | this.props.history.push('/'); |
| 111 | this.props.loadLoopFunction(this.state.loopCache.getLoopName()); |
| 112 | }); |
| 113 | } |
| 114 | } |
| 115 | } |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 116 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 117 | customValidation(editorData, templateName) { |
| 118 | // method for sub-classes to override with customized validation |
| 119 | return []; |
| 120 | } |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 121 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 122 | handleClose() { |
| 123 | this.setState({ show: false }); |
| 124 | this.props.history.push('/'); |
| 125 | } |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 126 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 127 | componentDidMount() { |
| 128 | this.renderJsonEditor(); |
| 129 | } |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 130 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 131 | componentDidUpdate() { |
| 132 | if (this.state.showSucAlert === true || this.state.showFailAlert === true) { |
| 133 | let modalElement = document.getElementById("policyModal") |
| 134 | if (modalElement) { |
| 135 | modalElement.scrollTo(0, 0); |
| 136 | } |
| 137 | } |
| 138 | } |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 139 | |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 140 | createJsonEditor(toscaModel, editorData) { |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 141 | /*JSONEditor.defaults.themes.myBootstrap4 = JSONEditor.defaults.themes.bootstrap4.extend({ |
| 142 | getTab: function(text,tabId) { |
| 143 | var liel = document.createElement('li'); |
| 144 | liel.classList.add('nav-item'); |
| 145 | var ael = document.createElement("a"); |
| 146 | ael.classList.add("nav-link"); |
| 147 | ael.setAttribute("style",'padding:10px;max-width:160px;'); |
| 148 | ael.setAttribute("href", "#" + tabId); |
| 149 | ael.setAttribute('data-toggle', 'tab'); |
| 150 | text.setAttribute("style",'word-wrap:break-word;'); |
| 151 | ael.appendChild(text); |
| 152 | liel.appendChild(ael); |
| 153 | return liel; |
| 154 | } |
| 155 | });*/ |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 156 | return new JSONEditor(document.getElementById("editor"), |
| 157 | { schema: toscaModel, |
| 158 | startval: editorData, |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 159 | theme: 'bootstrap4', |
| 160 | iconlib: 'fontawesome5', |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 161 | object_layout: 'grid', |
sebdet | 1b4f20d | 2020-03-17 07:47:03 -0700 | [diff] [blame] | 162 | disable_properties: false, |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 163 | disable_edit_json: false, |
| 164 | disable_array_reorder: true, |
| 165 | disable_array_delete_last_row: true, |
| 166 | disable_array_delete_all_rows: false, |
sebdet | 49ab84a | 2020-03-13 15:27:41 -0700 | [diff] [blame] | 167 | array_controls_top: true, |
| 168 | keep_oneof_values: false, |
| 169 | collapsed:true, |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 170 | show_errors: 'always', |
| 171 | display_required_only: false, |
sebdet | 8277572 | 2020-03-16 07:07:18 -0700 | [diff] [blame] | 172 | show_opt_in: false, |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 173 | prompt_before_delete: true, |
sebdet | 8277572 | 2020-03-16 07:07:18 -0700 | [diff] [blame] | 174 | required_by_default: false |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 175 | }) |
| 176 | } |
| 177 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 178 | renderJsonEditor() { |
| 179 | console.debug("Rendering PolicyModal ", this.state.policyName); |
| 180 | var toscaModel = {}; |
| 181 | var editorData = {}; |
| 182 | var pdpGroupValues = {}; |
| 183 | var chosenPdpGroupValue, chosenPdpSubgroupValue; |
| 184 | if (this.state.policyInstanceType === OnapConstant.microServiceType) { |
| 185 | toscaModel = this.state.loopCache.getMicroServiceJsonRepresentationForName(this.state.policyName); |
| 186 | editorData = this.state.loopCache.getMicroServicePropertiesForName(this.state.policyName); |
| 187 | pdpGroupValues = this.state.loopCache.getMicroServiceSupportedPdpGroup(this.state.policyName); |
| 188 | chosenPdpGroupValue = this.state.loopCache.getMicroServicePdpGroup(this.state.policyName); |
| 189 | chosenPdpSubgroupValue = this.state.loopCache.getMicroServicePdpSubgroup(this.state.policyName); |
| 190 | } else if (this.state.policyInstanceType === OnapConstant.operationalPolicyType) { |
| 191 | toscaModel = this.state.loopCache.getOperationalPolicyJsonRepresentationForName(this.state.policyName); |
| 192 | editorData = this.state.loopCache.getOperationalPolicyPropertiesForName(this.state.policyName); |
| 193 | pdpGroupValues = this.state.loopCache.getOperationalPolicySupportedPdpGroup(this.state.policyName); |
| 194 | chosenPdpGroupValue = this.state.loopCache.getOperationalPolicyPdpGroup(this.state.policyName); |
| 195 | chosenPdpSubgroupValue = this.state.loopCache.getOperationalPolicyPdpSubgroup(this.state.policyName); |
| 196 | } |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 197 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 198 | if (toscaModel == null) { |
| 199 | return; |
| 200 | } |
sebdet | c11160e | 2020-02-25 15:13:31 -0800 | [diff] [blame] | 201 | |
sebdet | 2dd4e99 | 2020-03-04 15:47:39 -0800 | [diff] [blame] | 202 | var pdpSubgroupValues = []; |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 203 | if (typeof(chosenPdpGroupValue) !== "undefined") { |
| 204 | var selectedPdpGroup = pdpGroupValues.filter(entry => (Object.keys(entry)[0] === chosenPdpGroupValue)); |
| 205 | pdpSubgroupValues = selectedPdpGroup[0][chosenPdpGroupValue].map((pdpSubgroup) => { return { label: pdpSubgroup, value: pdpSubgroup } }); |
| 206 | } |
| 207 | this.setState({ |
| 208 | jsonEditor: this.createJsonEditor(toscaModel,editorData), |
| 209 | pdpGroup: pdpGroupValues, |
| 210 | pdpGroupList: pdpGroupValues.map(entry => { |
| 211 | return { label: Object.keys(entry)[0], value: Object.keys(entry)[0] }; |
| 212 | }), |
| 213 | pdpSubgroupList: pdpSubgroupValues, |
| 214 | chosenPdpGroup: chosenPdpGroupValue, |
| 215 | chosenPdpSubgroup: chosenPdpSubgroupValue |
| 216 | }) |
sebdet | c0ec0fc | 2020-05-18 12:31:11 +0200 | [diff] [blame] | 217 | } |
| 218 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 219 | handlePdpGroupChange(e) { |
| 220 | var selectedPdpGroup = this.state.pdpGroup.filter(entry => (Object.keys(entry)[0] === e.value)); |
| 221 | const pdpSubgroupValues = selectedPdpGroup[0][e.value].map((pdpSubgroup) => { return { label: pdpSubgroup, value: pdpSubgroup } }); |
| 222 | if (this.state.chosenPdpGroup !== e.value) { |
| 223 | this.setState({ |
| 224 | chosenPdpGroup: e.value, |
| 225 | chosenPdpSubgroup: '', |
| 226 | pdpSubgroupList: pdpSubgroupValues |
| 227 | }); |
| 228 | } |
| 229 | } |
sebdet | c0ec0fc | 2020-05-18 12:31:11 +0200 | [diff] [blame] | 230 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 231 | handlePdpSubgroupChange(e) { |
| 232 | this.setState({ chosenPdpSubgroup: e.value }); |
| 233 | } |
| 234 | |
| 235 | handleRefresh() { |
| 236 | var newLoopCache, toscaModel, editorData; |
| 237 | if (this.state.policyInstanceType === OnapConstant.microServiceType) { |
| 238 | LoopService.refreshMicroServicePolicyJson(this.state.loopCache.getLoopName(),this.state.policyName).then(data => { |
| 239 | newLoopCache = new LoopCache(data); |
| 240 | toscaModel = newLoopCache.getMicroServiceJsonRepresentationForName(this.state.policyName); |
| 241 | editorData = newLoopCache.getMicroServicePropertiesForName(this.state.policyName); |
| 242 | document.getElementById("editor").innerHTML = ""; |
| 243 | this.setState({ |
| 244 | loopCache: newLoopCache, |
| 245 | jsonEditor: this.createJsonEditor(toscaModel,editorData), |
| 246 | showSucAlert: true, |
| 247 | showMessage: "Successfully refreshed" |
| 248 | }); |
| 249 | }) |
| 250 | .catch(error => { |
| 251 | console.error("Error while refreshing the Operational Policy Json Representation"); |
| 252 | this.setState({ |
| 253 | showFailAlert: true, |
| 254 | showMessage: "Refreshing of UI failed" |
| 255 | }); |
| 256 | }); |
| 257 | } else if (this.state.policyInstanceType === OnapConstant.operationalPolicyType) { |
| 258 | LoopService.refreshOperationalPolicyJson(this.state.loopCache.getLoopName(),this.state.policyName).then(data => { |
| 259 | var newLoopCache = new LoopCache(data); |
| 260 | toscaModel = newLoopCache.getOperationalPolicyJsonRepresentationForName(this.state.policyName); |
| 261 | editorData = newLoopCache.getOperationalPolicyPropertiesForName(this.state.policyName); |
| 262 | document.getElementById("editor").innerHTML = ""; |
| 263 | this.setState({ |
| 264 | loopCache: newLoopCache, |
| 265 | jsonEditor: this.createJsonEditor(toscaModel,editorData), |
| 266 | showSucAlert: true, |
| 267 | showMessage: "Successfully refreshed" |
| 268 | }); |
| 269 | }) |
| 270 | .catch(error => { |
| 271 | console.error("Error while refreshing the Operational Policy Json Representation"); |
| 272 | this.setState({ |
| 273 | showFailAlert: true, |
| 274 | showMessage: "Refreshing of UI failed" |
| 275 | }); |
| 276 | }); |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | disableAlert() { |
| 281 | this.setState ({ showSucAlert: false, showFailAlert: false }); |
| 282 | } |
| 283 | |
| 284 | renderPdpGroupDropDown() { |
| 285 | if(this.state.policyInstanceType !== OnapConstant.operationalPolicyType || !this.state.loopCache.isOpenLoopTemplate()) { |
| 286 | return ( |
| 287 | <Form.Group as={Row} controlId="formPlaintextEmail"> |
| 288 | <Form.Label column sm="2">Pdp Group Info</Form.Label> |
| 289 | <Col sm="3"> |
| 290 | <Select value={{ label: this.state.chosenPdpGroup, value: this.state.chosenPdpGroup }} onChange={this.handlePdpGroupChange} options={this.state.pdpGroupList} /> |
| 291 | </Col> |
| 292 | <Col sm="3"> |
| 293 | <Select value={{ label: this.state.chosenPdpSubgroup, value: this.state.chosenPdpSubgroup }} onChange={this.handlePdpSubgroupChange} options={this.state.pdpSubgroupList} /> |
| 294 | </Col> |
| 295 | </Form.Group> |
| 296 | ); |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | renderOpenLoopMessage() { |
| 301 | if(this.state.policyInstanceType === OnapConstant.operationalPolicyType && this.state.loopCache.isOpenLoopTemplate()) { |
| 302 | return ( |
| 303 | "Operational Policy cannot be configured as only Open Loop is supported for this Template!" |
| 304 | ); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | renderModalTitle() { |
| 309 | return ( |
| 310 | <Modal.Title>Edit the policy</Modal.Title> |
| 311 | ); |
| 312 | } |
| 313 | |
| 314 | renderButton() { |
| 315 | var allElement = [(<Button variant="secondary" onClick={this.handleClose}> |
| 316 | Close |
sebdet | c0ec0fc | 2020-05-18 12:31:11 +0200 | [diff] [blame] | 317 | </Button>)]; |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 318 | if(this.state.policyInstanceType !== OnapConstant.operationalPolicyType || !this.state.loopCache.isOpenLoopTemplate()) { |
sebdet | c0ec0fc | 2020-05-18 12:31:11 +0200 | [diff] [blame] | 319 | allElement.push(( |
| 320 | <Button variant="primary" disabled={this.readOnly} onClick={this.handleSave}> |
| 321 | Save Changes |
| 322 | </Button> |
| 323 | )); |
| 324 | allElement.push(( |
| 325 | <Button variant="primary" disabled={this.readOnly} onClick={this.handleRefresh}> |
| 326 | Refresh |
| 327 | </Button> |
| 328 | )); |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 329 | } |
| 330 | return allElement; |
| 331 | } |
sebdet | c0ec0fc | 2020-05-18 12:31:11 +0200 | [diff] [blame] | 332 | |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 333 | render() { |
| 334 | return ( |
| 335 | <ModalStyled size="xl" backdrop="static" keyboard={false} show={this.state.show} onHide={this.handleClose}> |
| 336 | <Modal.Header closeButton> |
| 337 | {this.renderModalTitle()} |
| 338 | </Modal.Header> |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 339 | <Alert variant="success" show={this.state.showSucAlert} onClose={this.disableAlert} dismissible> |
| 340 | <DivWhiteSpaceStyled> |
| 341 | {this.state.showMessage} |
| 342 | </DivWhiteSpaceStyled> |
| 343 | </Alert> |
| 344 | <Alert variant="danger" show={this.state.showFailAlert} onClose={this.disableAlert} dismissible> |
| 345 | <DivWhiteSpaceStyled> |
| 346 | {this.state.showMessage} |
| 347 | </DivWhiteSpaceStyled> |
| 348 | </Alert> |
sebdet | b8831e5 | 2021-03-12 19:30:22 +0100 | [diff] [blame] | 349 | <Modal.Body> |
| 350 | {this.renderOpenLoopMessage()} |
| 351 | <div id="editor" /> |
| 352 | {this.renderPdpGroupDropDown()} |
| 353 | </Modal.Body> |
| 354 | <Modal.Footer> |
| 355 | {this.renderButton()} |
| 356 | </Modal.Footer> |
| 357 | </ModalStyled> |
| 358 | ); |
| 359 | } |
Ted Humphrey | 9dfd03b | 2020-07-07 03:37:37 -0400 | [diff] [blame] | 360 | } |