General change

This commit is contained in:
pepper committed 2020-12-10 23:17:14 -05:00
1 parent 9bc7b93def
commit 2508af3cde
8 files changed
+207 -158

No files matched your search

+2 -10
View File
@@ -33,16 +33,8 @@ export class Navigation extends Component {
</li>
</ul>
{/* Inline UUID search bar is here */}
<ul className="right hide-on-med-and-down">
<li style={{ paddingRight: "1em" }}>UUID:</li>
<li>
<InLineSearch style={{ paddingRight: "4em" }}></InLineSearch>
</li>
{/* <li>
<Link>
<IdSearchForm />
</Link>
</li> */}
<ul className="right ">
<InLineSearch />
</ul>
</div>
</div>
+6
View File
@@ -6,6 +6,12 @@ import FormPage from "../common/Forms/FormPage";
// links directly to FormPage which contains the POST request
export default class Book extends Component {
constructor(props) {
super(props);
this.state = {
migs: [],
};
}
render() {
return (
<div className="container-fluid">
+1
View File
@@ -31,6 +31,7 @@ export default class Reports extends Component {
.catch(function (error) {
console.log(error);
});
console.log(urlID);
}
render() {
+156 -145
View File
@@ -3,6 +3,7 @@ import "bootstrap/dist/css/bootstrap.min.css";
import moment from "moment";
import { Col, FormGroup, Row, Container, Label } from "reactstrap";
import { Formik, Form } from "formik";
import * as Yup from "yup";
import { Input, Submit } from "formstrap";
import { callAPI } from "../../../actions/API";
@@ -10,6 +11,10 @@ import { callAPI } from "../../../actions/API";
// found at /book under the web hosting migration tab
// Things to add:
// better date time picking.
const InputValidation = Yup.object().shape({
domain: Yup.string().min(2, "Too Short!").required("Required"),
username: Yup.string().min(2, "Too Short!").required("Required"),
});
export const CPanelBooking = () => {
const initialValues = {
@@ -30,152 +35,158 @@ export const CPanelBooking = () => {
resetForm({ values: "" });
};
return (
<Formik initialValues={initialValues} onSubmit={onSubmit}>
<Form>
<Container>
<Row>
<Col>
<FormGroup>
<Label for="bookedDate">Date</Label>
<Input
type="date"
name="booked_date"
id="bookedDate"
placeholder="date placeholder"
mindate={Date()}
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedTime">Timeslot</Label>
<Input type="select" name="booked_time" id="bookedTime">
<option>Select</option>
<option>00:00-03:00</option>
<option>03:00-06:00</option>
<option>06:00-09:00</option>
<option>08:00-12:00</option>
<option>12:00-18:00</option>
<option>18:00-00:00</option>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedDomain">Domain</Label>
<Input
type="text"
name="domain"
id="bookedDomain"
placeholder="example.com.au"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedUsername">cPanel username</Label>
<Input
type="text"
name="username"
id="bookedUsername"
placeholder="example"
/>
</FormGroup>
</Col>
</Row>
<Row>
<Col>
<FormGroup>
<Label for="bookedSource">Original server</Label>
<Input
type="text"
name="original_server"
id="bookedSource"
placeholder="1.2.3.4"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedDestination">New server</Label>
<Input
type="text"
name="new_server"
id="bookedDestination"
placeholder="1.2.3.4"
/>
</FormGroup>
</Col>
</Row>
<Row>
<Col>
<FormGroup>
<Label for="bookedBrand">Brand</Label>
<Input type="select" name="brand" id="bookedBrand">
<option>Select</option>
<option>VentraIP</option>
<option>Zuver</option>
<option>Synergy</option>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedTicket">Ticket ID</Label>
<Input
type="text"
name="ticket_id"
id="bookedTicket"
placeholder="VIP-A1234567"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedType">Migration type</Label>
<Input type="select" name="migration_type" id="bookedType">
<option>Select</option>
<option>cPanel</option>
<option>Plesk</option>
<option>Other</option>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedAgent">Agent Initials</Label>
<Input
type="text"
name="agent_booked"
id="bookedAgent"
placeholder="SZ"
/>
</FormGroup>
</Col>
</Row>
<FormGroup>
<Label for="bookedAdditionalDomains">Addon Domains</Label>
<Input
type="text"
name="additional_domains"
id="bookedAdditionalDomains"
placeholder="example.com.au,example.net.au"
/>
</FormGroup>
<Formik
initialValues={initialValues}
onSubmit={onSubmit}
validationSchema={InputValidation}
>
{({ errors, touched }) => (
<Form>
<Container>
<Row>
<Col>
<FormGroup>
<Label for="bookedDate">Date</Label>
<Input
type="date"
name="booked_date"
id="bookedDate"
placeholder="date placeholder"
mindate={Date()}
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedTime">Timeslot</Label>
<Input type="select" name="booked_time" id="bookedTime">
<option>Select</option>
<option>00:00-03:00</option>
<option>03:00-06:00</option>
<option>06:00-09:00</option>
<option>08:00-12:00</option>
<option>12:00-18:00</option>
<option>18:00-00:00</option>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedDomain">Domain</Label>
<Input
type="text"
name="domain"
id="bookedDomain"
placeholder="example.com.au"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedUsername">cPanel username</Label>
<Input
type="text"
name="username"
id="bookedUsername"
placeholder="example"
/>
</FormGroup>
</Col>
</Row>
<Row>
<Col>
<FormGroup>
<Label for="bookedSource">Original server</Label>
<Input
type="text"
name="original_server"
id="bookedSource"
placeholder="1.2.3.4"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedDestination">New server</Label>
<Input
type="text"
name="new_server"
id="bookedDestination"
placeholder="1.2.3.4"
/>
</FormGroup>
</Col>
</Row>
<Row>
<Col>
<FormGroup>
<Label for="bookedBrand">Brand</Label>
<Input type="select" name="brand" id="bookedBrand">
<option>Select</option>
<option>VentraIP</option>
<option>Zuver</option>
<option>Synergy</option>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedTicket">Ticket ID</Label>
<Input
type="text"
name="ticket_id"
id="bookedTicket"
placeholder="VIP-A1234567"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedType">Migration type</Label>
<Input type="select" name="migration_type" id="bookedType">
<option>Select</option>
<option>cPanel</option>
<option>Plesk</option>
<option>Other</option>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="bookedAgent">Agent Initials</Label>
<Input
type="text"
name="agent_booked"
id="bookedAgent"
placeholder="SZ"
/>
</FormGroup>
</Col>
</Row>
<FormGroup>
<Label for="bookedAdditionalDomains">Addon Domains</Label>
<Input
type="text"
name="additional_domains"
id="bookedAdditionalDomains"
placeholder="example.com.au,example.net.au"
/>
</FormGroup>
<FormGroup>
<Label for="bookedTermDate">
Estimated termination date (internal migrations only)
</Label>
<Input type="date" name="term_date" id="bookedTermDate" />
</FormGroup>
<FormGroup>
<Label for="bookedNotes">Notes</Label>
<Input type="textarea" name="notes" id="notes" />
</FormGroup>
<Submit withSpinner>Submit</Submit>
</Container>
</Form>
<FormGroup>
<Label for="bookedTermDate">
Estimated termination date (internal migrations only)
</Label>
<Input type="date" name="term_date" id="bookedTermDate" />
</FormGroup>
<FormGroup>
<Label for="bookedNotes">Notes</Label>
<Input type="textarea" name="notes" id="notes" />
</FormGroup>
<Submit withSpinner>Submit</Submit>
</Container>
</Form>
)}
</Formik>
);
};
+1 -1
View File
@@ -13,7 +13,7 @@ import classnames from "classnames";
import { CPanelBooking } from "./CPanelBooking";
import EmailBooking from "./EmailBooking";
const FormPage = (props) => {
const FormPage = ({ item }) => {
const [activeTab, setActiveTab] = useState("1");
const toggle = (tab) => {
@@ -29,7 +29,11 @@ class InLineSearch extends React.Component {
value={this.state.data}
onChange={this.onChange}
onKeyDown={this.onKeyPressed}
></input>
placeholder="Enter Migration UUID"
id="search"
type="search"
required
/>
</span>
);
}