Skip to content

Commit

Permalink
add periodic hardware sync checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Mar 31, 2022
1 parent ef89d8d commit 846495d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,7 @@ describe("DeployFormFields", () => {
// Previous kernel selection should be cleared.
expect(wrapper.find("Select[name='kernel']").prop("value")).toBe("");
});

// TODO:
// it("displays perdiodically sync hardware checkbox with additional tooltip information", () => {});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { useState } from "react";
import * as React from "react";

import {
Button,
Col,
Icon,
Input,
Notification,
Row,
Select,
Tooltip,
} from "@canonical/react-components";
import classNames from "classnames";
import { useFormikContext } from "formik";
Expand All @@ -24,6 +27,7 @@ import configSelectors from "app/store/config/selectors";
import { osInfo as osInfoSelectors } from "app/store/general/selectors";
import { PodType } from "app/store/pod/constants";
import type { RootState } from "app/store/root/types";
import { breakLines } from "app/utils";

export const DeployFormFields = (): JSX.Element => {
const [deployVmHost, setDeployVmHost] = useState(false);
Expand Down Expand Up @@ -184,6 +188,30 @@ export const DeployFormFields = (): JSX.Element => {
"u-sv2": userDataVisible,
})}
/>
<FormikField
label={
<>
Periodically sync hardware{" "}
<Tooltip
positionElementClassName="u-display-inline-important"
message={breakLines(
"Enable this to make MAAS periodically check the hardware configuration of this machine and reflect any possible change after the deployment."
)}
>
<Button
appearance="base"
aria-label="more about periodically sync hardware"
className="u-no-margin--bottom"
>
<Icon name="information" />
</Button>
</Tooltip>
</>
}
help="Hardware sync interval: 6 hours - Admins can change this in the global settings."
name="enable_hw_sync"
type="checkbox"
/>
{userDataVisible && (
<UploadTextArea
label="Upload script"
Expand Down

0 comments on commit 846495d

Please sign in to comment.