diff --git a/.eslintrc b/.eslintrc
index b804a6ea..6c79457e 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -8,6 +8,6 @@
// avoid https://github.com/prettier/eslint-config-prettier/issues/29
"standard/computed-property-even-spacing": 0,
//"eqeqeq": "warn",
- "max-lines": ["error", {"max": 550, "skipBlankLines": true, "skipComments": true}],
+ "max-lines": ["error", {"max": 650, "skipBlankLines": true, "skipComments": true}],
},
}
diff --git a/webpack/components/ApplicationInstance/ApplicationInstance.js b/webpack/components/ApplicationInstance/ApplicationInstance.js
index 8b6ecec6..158d10c9 100644
--- a/webpack/components/ApplicationInstance/ApplicationInstance.js
+++ b/webpack/components/ApplicationInstance/ApplicationInstance.js
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React from 'react';
import PropTypes from 'prop-types';
import {
Icon,
@@ -28,16 +28,12 @@ import {
} from '../ParameterSelection/ParameterSelectionConstants';
class ApplicationInstance extends React.Component {
- constructor(props) {
- super(props);
- }
-
- isEditing({ rowData }) {
+ static isEditing({ rowData }) {
return rowData.backup !== undefined;
}
changeDataAllowed() {
- return this.props.editMode || this.props.appDefinition.id == '';
+ return this.props.editMode || this.props.appDefinition.id === '';
}
validateParameters() {
@@ -46,11 +42,11 @@ class ApplicationInstance extends React.Component {
this.props.hosts.forEach(h => {
if (
- h.foremanParameters.map(e => e.value).filter(i => i == '').length > 0
+ h.foremanParameters.map(e => e.value).filter(i => i === '').length > 0
) {
result = false;
- if (msg == '') {
+ if (msg === '') {
msg += __(
'For some hosts the values for some parameters are missing. Check the values for these hosts:\n'
);
@@ -60,23 +56,23 @@ class ApplicationInstance extends React.Component {
});
const invalidMinServices = this.props.services.filter(
- s => Number(s.minCount) != 0 && s.currentCount < s.minCount
+ s => Number(s.minCount) !== 0 && s.currentCount < s.minCount
);
const invalidMaxServices = this.props.services.filter(
- s => Number(s.maxCount) != 0 && s.currentCount > s.maxCount
+ s => Number(s.maxCount) !== 0 && s.currentCount > s.maxCount
);
if (invalidMinServices.length > 0 || invalidMaxServices.length > 0) {
result = false;
- if (msg != '') {
+ if (msg !== '') {
msg += '\n';
}
msg += __('Unachieved service counts:');
msg += '\n';
- invalidMinServices.map(s => {
+ invalidMinServices.forEach(s => {
msg += sprintf(
__(
`- service ${s.name} expects at ${s.minCount} least configured hosts\n`
@@ -84,7 +80,7 @@ class ApplicationInstance extends React.Component {
);
});
- invalidMaxServices.map(s => {
+ invalidMaxServices.forEach(s => {
msg += sprintf(
__(
`- service ${s.name} expects no more than ${s.axCount} configured hosts\n`
@@ -110,7 +106,6 @@ class ApplicationInstance extends React.Component {
supportedPlugins,
},
initApplicationInstance,
- addApplicationInstanceHost,
deleteApplicationInstanceHost,
activateEditApplicationInstanceHost,
changeEditApplicationInstanceHost,
@@ -123,7 +118,7 @@ class ApplicationInstance extends React.Component {
loadApplicationDefinition(appDefinition.id, { url: appDefinitionUrl });
}
- const already_deployed_msg = __(
+ const alreadyDeployedMsg = __(
'This is an already deployed host. Changing the parameters is not possible!'
);
@@ -131,12 +126,12 @@ class ApplicationInstance extends React.Component {
isEditing: additionalData => this.props.editMode,
renderValue: (value, additionalData) => (
- {additionalData.rowData.isExistingHost == true ? (
+ {additionalData.rowData.isExistingHost === true ? (
) : (
@@ -148,7 +143,7 @@ class ApplicationInstance extends React.Component {
- {additionalData.rowData.isExistingHost == false ? (
+ {additionalData.rowData.isExistingHost === false ? (
|