From aa486be66b1c29ad2e953cb44d105ca1bde40b1c Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 18 Feb 2020 02:00:11 -0800 Subject: Modify the Ui Modify the Ui to have a modify option in the menu so that the user can tune the loop instance Issue-ID: CLAMP-648 Change-Id: I57523bc1c3afaf5ca5a2acf5c59823df06fd4cd9 Signed-off-by: sebdet --- ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js') diff --git a/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js b/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js index 5b66a25c0..650080520 100644 --- a/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js +++ b/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js @@ -26,7 +26,7 @@ import MaterialTable from "material-table"; import Button from 'react-bootstrap/Button'; import Modal from 'react-bootstrap/Modal'; import styled from 'styled-components'; -import TemplateMenuService from '../../../api/TemplateMenuService'; +import PolicyToscaService from '../../../api/PolicyToscaService'; import ArrowUpward from '@material-ui/icons/ArrowUpward'; import ChevronLeft from '@material-ui/icons/ChevronLeft'; import ChevronRight from '@material-ui/icons/ChevronRight'; @@ -109,14 +109,14 @@ export default class ViewToscalPolicyModal extends React.Component { } getToscaPolicyModels() { - TemplateMenuService.getToscaPolicyModels().then(toscaPolicyModelNames => { + PolicyToscaService.getToscaPolicyModels().then(toscaPolicyModelNames => { this.setState({ toscaPolicyModelNames: toscaPolicyModelNames }); }); } - getToscaPolicyModelYaml(policyModelType) { + getToscaPolicyModelYaml(policyModelType, policyModelVersion) { if (typeof policyModelType !== "undefined") { - TemplateMenuService.getToscaPolicyModelYaml(policyModelType).then(toscaYaml => { + PolicyToscaService.getToscaPolicyModelYaml(policyModelType, policyModelVersion).then(toscaYaml => { if (toscaYaml.length !== 0) { this.setState({content: toscaYaml}) } else { @@ -148,7 +148,7 @@ export default class ViewToscalPolicyModal extends React.Component { data={this.state.toscaPolicyModelNames} columns={this.state.toscaColumns} icons={this.state.tableIcons} - onRowClick={(event, rowData) => {this.getToscaPolicyModelYaml(rowData.policyModelType);this.setState({selectedRow: rowData.tableData.id})}} + onRowClick={(event, rowData) => {this.getToscaPolicyModelYaml(rowData.policyModelType,rowData.version);this.setState({selectedRow: rowData.tableData.id})}} options={{ headerStyle: rowHeaderStyle, rowStyle: rowData => ({ -- cgit 1.2.3-korg