summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-02-18 02:00:11 -0800
committerSébastien Determe <sebastien.determe@intl.att.com>2020-02-25 10:57:35 +0000
commitaa486be66b1c29ad2e953cb44d105ca1bde40b1c (patch)
treeb5893560b1eee8f1e456104deec7924f05e4fbfb /ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js
parent4e8e11afced0693e24074fd6bb8d5b2cace98ab6 (diff)
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 <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js')
-rw-r--r--ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js10
1 files changed, 5 insertions, 5 deletions
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 => ({