General change
This commit is contained in:
parent
9bc7b93def
commit
2508af3cde
34
package-lock.json
generated
34
package-lock.json
generated
@ -2546,6 +2546,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/lodash": {
|
||||||
|
"version": "4.14.165",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.165.tgz",
|
||||||
|
"integrity": "sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg=="
|
||||||
|
},
|
||||||
"@types/minimatch": {
|
"@types/minimatch": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||||
@ -11750,6 +11755,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
||||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
|
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
|
||||||
},
|
},
|
||||||
|
"nanoclone": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/nanoclone/-/nanoclone-0.2.1.tgz",
|
||||||
|
"integrity": "sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA=="
|
||||||
|
},
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.1.16",
|
"version": "3.1.16",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.16.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.16.tgz",
|
||||||
@ -13849,6 +13859,11 @@
|
|||||||
"warning": "^4.0.0"
|
"warning": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"property-expr": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-sFPkHQjVKheDNnPvotjQmm3KD3uk1fWKUN7CrpdbwmUx3CrG3QiM8QpTSimvig5vTXmTvjz7+TDvXOI9+4rkcg=="
|
||||||
|
},
|
||||||
"proxy-addr": {
|
"proxy-addr": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
|
||||||
@ -17102,6 +17117,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
||||||
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
||||||
},
|
},
|
||||||
|
"toposort": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA="
|
||||||
|
},
|
||||||
"tough-cookie": {
|
"tough-cookie": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
|
||||||
@ -19114,6 +19134,20 @@
|
|||||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
|
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"yup": {
|
||||||
|
"version": "0.32.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/yup/-/yup-0.32.5.tgz",
|
||||||
|
"integrity": "sha512-bLbkTrPrFEF4rg30lS8T3QqoVLSAJ1N/b6btn5HVM4y9Q2EVJr2VLk+3kcskqPB41OSPx0cGRLINklH7PNqSYg==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.10.5",
|
||||||
|
"@types/lodash": "^4.14.165",
|
||||||
|
"lodash": "^4.17.20",
|
||||||
|
"lodash-es": "^4.17.11",
|
||||||
|
"nanoclone": "^0.2.1",
|
||||||
|
"property-expr": "^2.0.4",
|
||||||
|
"toposort": "^2.0.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,8 @@
|
|||||||
"reactstrap-date-picker": "0.0.11",
|
"reactstrap-date-picker": "0.0.11",
|
||||||
"redux": "^4.0.5",
|
"redux": "^4.0.5",
|
||||||
"styled-components": "^5.2.1",
|
"styled-components": "^5.2.1",
|
||||||
"web-vitals": "^0.2.4"
|
"web-vitals": "^0.2.4",
|
||||||
|
"yup": "^0.32.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
|||||||
@ -33,16 +33,8 @@ export class Navigation extends Component {
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{/* Inline UUID search bar is here */}
|
{/* Inline UUID search bar is here */}
|
||||||
<ul className="right hide-on-med-and-down">
|
<ul className="right ">
|
||||||
<li style={{ paddingRight: "1em" }}>UUID:</li>
|
<InLineSearch />
|
||||||
<li>
|
|
||||||
<InLineSearch style={{ paddingRight: "4em" }}></InLineSearch>
|
|
||||||
</li>
|
|
||||||
{/* <li>
|
|
||||||
<Link>
|
|
||||||
<IdSearchForm />
|
|
||||||
</Link>
|
|
||||||
</li> */}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,6 +6,12 @@ import FormPage from "../common/Forms/FormPage";
|
|||||||
// links directly to FormPage which contains the POST request
|
// links directly to FormPage which contains the POST request
|
||||||
|
|
||||||
export default class Book extends Component {
|
export default class Book extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
migs: [],
|
||||||
|
};
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-fluid">
|
<div className="container-fluid">
|
||||||
|
|||||||
@ -31,6 +31,7 @@ export default class Reports extends Component {
|
|||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
console.log(urlID);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import "bootstrap/dist/css/bootstrap.min.css";
|
|||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { Col, FormGroup, Row, Container, Label } from "reactstrap";
|
import { Col, FormGroup, Row, Container, Label } from "reactstrap";
|
||||||
import { Formik, Form } from "formik";
|
import { Formik, Form } from "formik";
|
||||||
|
import * as Yup from "yup";
|
||||||
import { Input, Submit } from "formstrap";
|
import { Input, Submit } from "formstrap";
|
||||||
import { callAPI } from "../../../actions/API";
|
import { callAPI } from "../../../actions/API";
|
||||||
|
|
||||||
@ -10,6 +11,10 @@ import { callAPI } from "../../../actions/API";
|
|||||||
// found at /book under the web hosting migration tab
|
// found at /book under the web hosting migration tab
|
||||||
// Things to add:
|
// Things to add:
|
||||||
// better date time picking.
|
// 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 = () => {
|
export const CPanelBooking = () => {
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
@ -30,152 +35,158 @@ export const CPanelBooking = () => {
|
|||||||
resetForm({ values: "" });
|
resetForm({ values: "" });
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Formik initialValues={initialValues} onSubmit={onSubmit}>
|
<Formik
|
||||||
<Form>
|
initialValues={initialValues}
|
||||||
<Container>
|
onSubmit={onSubmit}
|
||||||
<Row>
|
validationSchema={InputValidation}
|
||||||
<Col>
|
>
|
||||||
<FormGroup>
|
{({ errors, touched }) => (
|
||||||
<Label for="bookedDate">Date</Label>
|
<Form>
|
||||||
<Input
|
<Container>
|
||||||
type="date"
|
<Row>
|
||||||
name="booked_date"
|
<Col>
|
||||||
id="bookedDate"
|
<FormGroup>
|
||||||
placeholder="date placeholder"
|
<Label for="bookedDate">Date</Label>
|
||||||
mindate={Date()}
|
<Input
|
||||||
/>
|
type="date"
|
||||||
</FormGroup>
|
name="booked_date"
|
||||||
</Col>
|
id="bookedDate"
|
||||||
<Col>
|
placeholder="date placeholder"
|
||||||
<FormGroup>
|
mindate={Date()}
|
||||||
<Label for="bookedTime">Timeslot</Label>
|
/>
|
||||||
<Input type="select" name="booked_time" id="bookedTime">
|
</FormGroup>
|
||||||
<option>Select</option>
|
</Col>
|
||||||
<option>00:00-03:00</option>
|
<Col>
|
||||||
<option>03:00-06:00</option>
|
<FormGroup>
|
||||||
<option>06:00-09:00</option>
|
<Label for="bookedTime">Timeslot</Label>
|
||||||
<option>08:00-12:00</option>
|
<Input type="select" name="booked_time" id="bookedTime">
|
||||||
<option>12:00-18:00</option>
|
<option>Select</option>
|
||||||
<option>18:00-00:00</option>
|
<option>00:00-03:00</option>
|
||||||
</Input>
|
<option>03:00-06:00</option>
|
||||||
</FormGroup>
|
<option>06:00-09:00</option>
|
||||||
</Col>
|
<option>08:00-12:00</option>
|
||||||
<Col>
|
<option>12:00-18:00</option>
|
||||||
<FormGroup>
|
<option>18:00-00:00</option>
|
||||||
<Label for="bookedDomain">Domain</Label>
|
</Input>
|
||||||
<Input
|
</FormGroup>
|
||||||
type="text"
|
</Col>
|
||||||
name="domain"
|
<Col>
|
||||||
id="bookedDomain"
|
<FormGroup>
|
||||||
placeholder="example.com.au"
|
<Label for="bookedDomain">Domain</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
</Col>
|
name="domain"
|
||||||
<Col>
|
id="bookedDomain"
|
||||||
<FormGroup>
|
placeholder="example.com.au"
|
||||||
<Label for="bookedUsername">cPanel username</Label>
|
/>
|
||||||
<Input
|
</FormGroup>
|
||||||
type="text"
|
</Col>
|
||||||
name="username"
|
<Col>
|
||||||
id="bookedUsername"
|
<FormGroup>
|
||||||
placeholder="example"
|
<Label for="bookedUsername">cPanel username</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
</Col>
|
name="username"
|
||||||
</Row>
|
id="bookedUsername"
|
||||||
<Row>
|
placeholder="example"
|
||||||
<Col>
|
/>
|
||||||
<FormGroup>
|
</FormGroup>
|
||||||
<Label for="bookedSource">Original server</Label>
|
</Col>
|
||||||
<Input
|
</Row>
|
||||||
type="text"
|
<Row>
|
||||||
name="original_server"
|
<Col>
|
||||||
id="bookedSource"
|
<FormGroup>
|
||||||
placeholder="1.2.3.4"
|
<Label for="bookedSource">Original server</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
</Col>
|
name="original_server"
|
||||||
<Col>
|
id="bookedSource"
|
||||||
<FormGroup>
|
placeholder="1.2.3.4"
|
||||||
<Label for="bookedDestination">New server</Label>
|
/>
|
||||||
<Input
|
</FormGroup>
|
||||||
type="text"
|
</Col>
|
||||||
name="new_server"
|
<Col>
|
||||||
id="bookedDestination"
|
<FormGroup>
|
||||||
placeholder="1.2.3.4"
|
<Label for="bookedDestination">New server</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
</Col>
|
name="new_server"
|
||||||
</Row>
|
id="bookedDestination"
|
||||||
<Row>
|
placeholder="1.2.3.4"
|
||||||
<Col>
|
/>
|
||||||
<FormGroup>
|
</FormGroup>
|
||||||
<Label for="bookedBrand">Brand</Label>
|
</Col>
|
||||||
<Input type="select" name="brand" id="bookedBrand">
|
</Row>
|
||||||
<option>Select</option>
|
<Row>
|
||||||
<option>VentraIP</option>
|
<Col>
|
||||||
<option>Zuver</option>
|
<FormGroup>
|
||||||
<option>Synergy</option>
|
<Label for="bookedBrand">Brand</Label>
|
||||||
</Input>
|
<Input type="select" name="brand" id="bookedBrand">
|
||||||
</FormGroup>
|
<option>Select</option>
|
||||||
</Col>
|
<option>VentraIP</option>
|
||||||
<Col>
|
<option>Zuver</option>
|
||||||
<FormGroup>
|
<option>Synergy</option>
|
||||||
<Label for="bookedTicket">Ticket ID</Label>
|
</Input>
|
||||||
<Input
|
</FormGroup>
|
||||||
type="text"
|
</Col>
|
||||||
name="ticket_id"
|
<Col>
|
||||||
id="bookedTicket"
|
<FormGroup>
|
||||||
placeholder="VIP-A1234567"
|
<Label for="bookedTicket">Ticket ID</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
</Col>
|
name="ticket_id"
|
||||||
<Col>
|
id="bookedTicket"
|
||||||
<FormGroup>
|
placeholder="VIP-A1234567"
|
||||||
<Label for="bookedType">Migration type</Label>
|
/>
|
||||||
<Input type="select" name="migration_type" id="bookedType">
|
</FormGroup>
|
||||||
<option>Select</option>
|
</Col>
|
||||||
<option>cPanel</option>
|
<Col>
|
||||||
<option>Plesk</option>
|
<FormGroup>
|
||||||
<option>Other</option>
|
<Label for="bookedType">Migration type</Label>
|
||||||
</Input>
|
<Input type="select" name="migration_type" id="bookedType">
|
||||||
</FormGroup>
|
<option>Select</option>
|
||||||
</Col>
|
<option>cPanel</option>
|
||||||
<Col>
|
<option>Plesk</option>
|
||||||
<FormGroup>
|
<option>Other</option>
|
||||||
<Label for="bookedAgent">Agent Initials</Label>
|
</Input>
|
||||||
<Input
|
</FormGroup>
|
||||||
type="text"
|
</Col>
|
||||||
name="agent_booked"
|
<Col>
|
||||||
id="bookedAgent"
|
<FormGroup>
|
||||||
placeholder="SZ"
|
<Label for="bookedAgent">Agent Initials</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
</Col>
|
name="agent_booked"
|
||||||
</Row>
|
id="bookedAgent"
|
||||||
<FormGroup>
|
placeholder="SZ"
|
||||||
<Label for="bookedAdditionalDomains">Addon Domains</Label>
|
/>
|
||||||
<Input
|
</FormGroup>
|
||||||
type="text"
|
</Col>
|
||||||
name="additional_domains"
|
</Row>
|
||||||
id="bookedAdditionalDomains"
|
<FormGroup>
|
||||||
placeholder="example.com.au,example.net.au"
|
<Label for="bookedAdditionalDomains">Addon Domains</Label>
|
||||||
/>
|
<Input
|
||||||
</FormGroup>
|
type="text"
|
||||||
|
name="additional_domains"
|
||||||
|
id="bookedAdditionalDomains"
|
||||||
|
placeholder="example.com.au,example.net.au"
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label for="bookedTermDate">
|
<Label for="bookedTermDate">
|
||||||
Estimated termination date (internal migrations only)
|
Estimated termination date (internal migrations only)
|
||||||
</Label>
|
</Label>
|
||||||
<Input type="date" name="term_date" id="bookedTermDate" />
|
<Input type="date" name="term_date" id="bookedTermDate" />
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label for="bookedNotes">Notes</Label>
|
<Label for="bookedNotes">Notes</Label>
|
||||||
<Input type="textarea" name="notes" id="notes" />
|
<Input type="textarea" name="notes" id="notes" />
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<Submit withSpinner>Submit</Submit>
|
<Submit withSpinner>Submit</Submit>
|
||||||
</Container>
|
</Container>
|
||||||
</Form>
|
</Form>
|
||||||
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import classnames from "classnames";
|
|||||||
import { CPanelBooking } from "./CPanelBooking";
|
import { CPanelBooking } from "./CPanelBooking";
|
||||||
import EmailBooking from "./EmailBooking";
|
import EmailBooking from "./EmailBooking";
|
||||||
|
|
||||||
const FormPage = (props) => {
|
const FormPage = ({ item }) => {
|
||||||
const [activeTab, setActiveTab] = useState("1");
|
const [activeTab, setActiveTab] = useState("1");
|
||||||
|
|
||||||
const toggle = (tab) => {
|
const toggle = (tab) => {
|
||||||
|
|||||||
@ -29,7 +29,11 @@ class InLineSearch extends React.Component {
|
|||||||
value={this.state.data}
|
value={this.state.data}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
onKeyDown={this.onKeyPressed}
|
onKeyDown={this.onKeyPressed}
|
||||||
></input>
|
placeholder="Enter Migration UUID"
|
||||||
|
id="search"
|
||||||
|
type="search"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user