aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/components/dialogs')
-rw-r--r--ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js14
-rw-r--r--ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js1
-rw-r--r--ui-react/src/components/dialogs/OperationalPolicy/template.json15
-rw-r--r--ui-react/src/components/dialogs/Policy/PolicyModal.test.js1
4 files changed, 6 insertions, 25 deletions
diff --git a/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js b/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js
index 71477ae0c..54ac6411b 100644
--- a/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js
+++ b/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js
@@ -21,7 +21,7 @@
*/
-import React from 'react';
+import React, { forwardRef } from 'react';
import Button from 'react-bootstrap/Button';
import Modal from 'react-bootstrap/Modal';
import styled from 'styled-components';
@@ -30,7 +30,6 @@ import MaterialTable, {MTableToolbar} from "material-table";
import IconButton from '@material-ui/core/IconButton';
import Tooltip from '@material-ui/core/Tooltip';
import Grid from '@material-ui/core/Grid';
-import { forwardRef } from 'react';
import AddBox from '@material-ui/icons/AddBox';
import ArrowUpward from '@material-ui/icons/ArrowUpward';
import Check from '@material-ui/icons/Check';
@@ -206,7 +205,7 @@ export default class ManageDictionaries extends React.Component {
cellStyle: cellStyle,
headerStyle: headerStyle
},
- {
+ {
title: "Sub-Dictionary", field: "subDictionary",
editComponent: props => (
<div>
@@ -216,7 +215,7 @@ export default class ManageDictionaries extends React.Component {
cellStyle: cellStyle,
headerStyle: headerStyle
},
- {
+ {
title: "Updated By", field: "updatedBy", editable: 'never',
cellStyle: cellStyle,
headerStyle: headerStyle
@@ -296,7 +295,7 @@ export default class ManageDictionaries extends React.Component {
var dictionaryElements = [];
if (event.target.files[0].type === 'text/csv' ) {
if (event.target.files && event.target.files[0]) {
- let reader = new FileReader();
+ const reader = new FileReader();
reader.onload = function(e) {
var dictElems = reader.result.split('\n');
var jsonObj = [];
@@ -314,7 +313,6 @@ export default class ManageDictionaries extends React.Component {
const mandatoryKeys = [ 'Element Short Name', 'Element Name', 'Element Type' ];
const validTypes = ['string','number','datetime','json','map'];
if (!dictElems){
-
text.setState({validData: false});
} else if (headers.length !== dictKeys.length){
text.setState({validImport: false});
@@ -375,7 +373,7 @@ export default class ManageDictionaries extends React.Component {
}
}
-
+
render() {
return (
<ModalStyled size="xl" show={this.state.show} onHide={this.handleClose} backdrop="static" keyboard={false} >
@@ -442,7 +440,7 @@ export default class ManageDictionaries extends React.Component {
new Promise((resolve, reject) => {
setTimeout(() => {
{
- let data = this.state.dictionaryNames;
+ const data = this.state.dictionaryNames;
const index = data.indexOf(oldData);
data.splice(index, 1);
this.setState({ data }, () => resolve());
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js
index c10c6ff0a..4c11ce535 100644
--- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js
+++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js
@@ -41,7 +41,6 @@ describe('Verify OperationalPolicyModal', () => {
"operationalPolicies": [{
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
- "guard_policies": {},
"operational_policy": {
"controlLoop": {},
"policies": []
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/template.json b/ui-react/src/components/dialogs/OperationalPolicy/template.json
index 6b4477f88..7c9dc0cdd 100644
--- a/ui-react/src/components/dialogs/OperationalPolicy/template.json
+++ b/ui-react/src/components/dialogs/OperationalPolicy/template.json
@@ -3,21 +3,6 @@
{
"name": "OPERATIONAL_LOOP_NAME",
"configurationsJson": {
- "guard_policies": {
- "guard.minmax.new": {
- "recipe": "",
- "clname": "LOOP_NAME",
- "actor": "",
- "targets": "",
- "min": "",
- "max": "",
- "limit": "",
- "timeUnits": "",
- "timeWindow": "",
- "guardActiveStart": "00:00:00Z",
- "guardActiveEnd": "00:00:01Z"
- }
- },
"operational_policy": {
"controlLoop": {
"trigger_policy": "new",
diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.test.js b/ui-react/src/components/dialogs/Policy/PolicyModal.test.js
index bf0b91096..d4021c97c 100644
--- a/ui-react/src/components/dialogs/Policy/PolicyModal.test.js
+++ b/ui-react/src/components/dialogs/Policy/PolicyModal.test.js
@@ -42,7 +42,6 @@ describe('Verify PolicyModal', () => {
"operationalPolicies": [{
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
- "guard_policies": {},
"operational_policy": {
"controlLoop": {},
"policies": []