diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/ChildCheckbox.js b/monkey/monkey_island/cc/ui/src/components/ui-components/ChildCheckbox.js
index 47a86dab6..6ebe69985 100644
--- a/monkey/monkey_island/cc/ui/src/components/ui-components/ChildCheckbox.js
+++ b/monkey/monkey_island/cc/ui/src/components/ui-components/ChildCheckbox.js
@@ -52,18 +52,13 @@ function ChildCheckbox(props) {
safe
} = props;
- let displayLabel = [{label}];
-
- if (!safe) {
- displayLabel.push()
- }
-
return (
onPaneClick(value)}>
- {displayLabel}
+ {label}
+ {!safe && }
);
}
diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js b/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js
index e6476d3a2..21e71e29f 100644
--- a/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js
+++ b/monkey/monkey_island/cc/ui/src/components/ui-components/InfoPane.js
@@ -60,37 +60,38 @@ function getSubtitle(props) {
}
function getBody(props) {
- let body = [{props.body}];
-
- if (props.warningType !== WarningType.NONE) {
- body.push(getWarning(props.warningType));
- }
-
return (
- {body}
+ {props.body}
+ {props.warningType !== WarningType.NONE && getWarning(props.warningType)}
)
}
function getWarning(warningType) {
- if (warningType === WarningType.SINGLE) {
- var warning = This option may cause a system to become unstable or
- may change a system's state in undesirable ways. Therefore, this option
- is not recommended for use in production or other sensitive
- environments.;
- } else {
- warning = Some options have been selected that may cause a system
- to become unstable or may change a system's state in undesirable ways.
- Running Infection Monkey in a production or other sensitive environment
- with this configuration is not recommended.;
- }
-
return (
);
}
+function getSingleOptionWarning() {
+ return (
+ This option may cause a system to become unstable or
+ may change a system's state in undesirable ways. Therefore, this option
+ is not recommended for use in production or other sensitive
+ environments.
+ );
+}
+
+function getMultipleOptionsWarning() {
+ return (
+ Some options have been selected that may cause a system
+ to become unstable or may change a system's state in undesirable ways.
+ Running Infection Monkey in a production or other sensitive environment
+ with this configuration is not recommended.
+ );
+}
+
export {getDefaultPaneParams, InfoPane, WarningType}