aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.js
diff options
context:
space:
mode:
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 => ({