VeleroForm.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import React, { Component } from "react";
  2. import Heading from "../../form-components/Heading";
  3. import InputRow from "../../form-components/InputRow";
  4. import MultiSelect from "./MultiSelect";
  5. type PropsType = {};
  6. type StateType = {
  7. name: string;
  8. excludeNamespaces: string[];
  9. excludeResources: string[];
  10. includeNamespaces: string[];
  11. includeResources: string[];
  12. storageLocation: string;
  13. volumeSnapshotLocations: string[];
  14. };
  15. export default class VeleroForm extends Component<PropsType, StateType> {
  16. state = {
  17. name: "",
  18. excludeNamespaces: [] as string[],
  19. excludeResources: [] as string[],
  20. includeNamespaces: [] as string[],
  21. includeResources: [] as string[],
  22. storageLocation: "",
  23. volumeSnapshotLocations: [] as string[],
  24. };
  25. render() {
  26. return (
  27. <>
  28. <Heading>Create a Bakup</Heading>
  29. <InputRow
  30. placeholder="ex: my-backup"
  31. type="text"
  32. width="300px"
  33. value={this.state.name}
  34. setValue={(x: string) => { this.setState({ name: x }); }}
  35. label="Name"
  36. />
  37. <MultiSelect />
  38. </>
  39. );
  40. }
  41. }