-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added zfs storage pool configs
Signed-off-by: Mason Hu <mason.hu@canonical.com>
- Loading branch information
Showing
7 changed files
with
118 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { FormikProps } from "formik"; | ||
import { FC } from "react"; | ||
import { StoragePoolFormValues } from "./StoragePoolForm"; | ||
import { getConfigurationRow } from "components/ConfigurationRow"; | ||
import { Input, Select } from "@canonical/react-components"; | ||
import { optionTrueFalse } from "util/instanceOptions"; | ||
import ScrollableConfigurationTable from "components/forms/ScrollableConfigurationTable"; | ||
|
||
interface Props { | ||
formik: FormikProps<StoragePoolFormValues>; | ||
} | ||
|
||
const StoragePoolFormZFS: FC<Props> = ({ formik }) => { | ||
return ( | ||
<ScrollableConfigurationTable | ||
rows={[ | ||
getConfigurationRow({ | ||
formik, | ||
label: "ZFS pool name", | ||
name: "zfs_pool_name", | ||
defaultValue: "", | ||
children: <Input type="text" placeholder="Enter ZFS pool name" />, | ||
disabled: !formik.values.isCreating || formik.values.readOnly, | ||
disabledReason: "ZFS pool name cannot be modified", | ||
}), | ||
getConfigurationRow({ | ||
formik, | ||
label: "Clone copy", | ||
name: "zfs_clone_copy", | ||
defaultValue: "", | ||
children: <Select options={optionTrueFalse} />, | ||
}), | ||
getConfigurationRow({ | ||
formik, | ||
label: "Export", | ||
name: "zfs_export", | ||
defaultValue: "", | ||
children: <Select options={optionTrueFalse} />, | ||
}), | ||
]} | ||
/> | ||
); | ||
}; | ||
|
||
export default StoragePoolFormZFS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters