Changed to generic list
This commit is contained in:
parent
cb57fa23c0
commit
705830b5be
@ -37,14 +37,17 @@ class App extends Component {
|
|||||||
<GenericList {...props} APILINK="/completed/" />
|
<GenericList {...props} APILINK="/completed/" />
|
||||||
)} />
|
)} />
|
||||||
<Route exact path="/pending-terminations" render={(props) => (
|
<Route exact path="/pending-terminations" render={(props) => (
|
||||||
<GenericList {...props} APILINK="/pendingterm/" />
|
<GenericList {...props} APILINK="/waitingterm/" />
|
||||||
)} />
|
)} />
|
||||||
<Route exact path="/all-terminations" render={(props) => (
|
<Route exact path="/all-terminations" render={(props) => (
|
||||||
<GenericList {...props} APILINK="/waitingterm/" />
|
<GenericList {...props} APILINK="/pendingterm/" />
|
||||||
)} />
|
)} />
|
||||||
<Route exact path="/historical-migrations" render={(props) => (
|
<Route exact path="/historical-migrations" render={(props) => (
|
||||||
<GenericList {...props} APILINK="/all/" />
|
<GenericList {...props} APILINK="/all/" />
|
||||||
)} />
|
)} />
|
||||||
|
<Route exact path="/booked" render={(props) => (
|
||||||
|
<GenericList {...props} APILINK="/booked/" />
|
||||||
|
)} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
</Router>
|
</Router>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link as a } from "react-router-dom";
|
||||||
import InLineSearch from "./common/Functionality/InlineSearchBar";
|
import InLineSearch from "./common/Functionality/InlineSearchBar";
|
||||||
|
|
||||||
// Navbar class component, Just simple href's to retain styling
|
// Navbar class component, Just simple href's to retain styling
|
||||||
@ -12,24 +12,24 @@ export class Navigation extends Component {
|
|||||||
<div className="nav-wrapper">
|
<div className="nav-wrapper">
|
||||||
<ul className="left">
|
<ul className="left">
|
||||||
<li>
|
<li>
|
||||||
<Link className="active" to="/">
|
<a className="active" href="/">
|
||||||
Dashboard
|
Dashboard
|
||||||
</Link>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Link to="/upcoming-migrations">Upcoming Migrations</Link>
|
<a href="/upcoming-migrations">Upcoming Migrations</a>
|
||||||
</li>
|
</li>
|
||||||
{/* <li>
|
{/* <li>
|
||||||
<Link to="/migrations">Migrations</Link>
|
<Link to="/migrations">Migrations</Link>
|
||||||
</li> */}
|
</li> */}
|
||||||
<li>
|
<li>
|
||||||
<Link to="/reports" className="hide-on-med-and-down">Reports</Link>
|
<a href="/reports" className="hide-on-med-and-down">Reports</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Link to="/historical-migrations" className="hide-on-med-and-down">Historical Migrations</Link>
|
<a href="/historical-migrations" className="hide-on-med-and-down">Historical Migrations</a>
|
||||||
</li>
|
</li>
|
||||||
<li className="orange accent-4 active">
|
<li className="orange accent-4 active">
|
||||||
<Link to="/book">Book</Link>
|
<a href="/book">Book</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{/* Inline UUID search bar is here */}
|
{/* Inline UUID search bar is here */}
|
||||||
|
|||||||
@ -5,11 +5,14 @@ import React, { Component } from "react";
|
|||||||
// is referenced on Home
|
// is referenced on Home
|
||||||
|
|
||||||
class Cards extends Component {
|
class Cards extends Component {
|
||||||
|
upcomingMig() {
|
||||||
|
return this.props.migs["upcoming_count"];
|
||||||
|
}
|
||||||
bookedMig() {
|
bookedMig() {
|
||||||
return this.props.migs["booked_count"];
|
return this.props.migs["booked_count"]
|
||||||
}
|
}
|
||||||
waitingMig() {
|
waitingMig() {
|
||||||
return this.props.migs["awaitterm_count"];
|
return this.props.migs["pendterm_count"];
|
||||||
}
|
}
|
||||||
completedMig() {
|
completedMig() {
|
||||||
return this.props.migs["complete_count"];
|
return this.props.migs["complete_count"];
|
||||||
@ -25,6 +28,17 @@ class Cards extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
|
<div className="col s6 m4">
|
||||||
|
<div className="card grey darken-1">
|
||||||
|
<div className="card-content white-text">
|
||||||
|
<span className="card-title"></span>
|
||||||
|
{this.upcomingMig()}
|
||||||
|
</div>
|
||||||
|
<div className="card-action">
|
||||||
|
<a href="/upcoming-migrations">upcoming</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div className="col s6 m4">
|
<div className="col s6 m4">
|
||||||
<div className="card grey darken-1">
|
<div className="card grey darken-1">
|
||||||
<div className="card-content white-text">
|
<div className="card-content white-text">
|
||||||
@ -32,31 +46,7 @@ class Cards extends Component {
|
|||||||
{this.bookedMig()}
|
{this.bookedMig()}
|
||||||
</div>
|
</div>
|
||||||
<div className="card-action">
|
<div className="card-action">
|
||||||
<a href="/upcoming-migrations">booked</a>
|
<a href="/booked">booked</a>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="col s6 m4">
|
|
||||||
<div className="card grey darken-1">
|
|
||||||
<div className="card-content white-text">
|
|
||||||
<span className="card-title"></span>
|
|
||||||
<p></p>
|
|
||||||
{this.waitingMig()}
|
|
||||||
</div>
|
|
||||||
<div className="card-action">
|
|
||||||
<a href="/pending-terminations">waiting</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="col s6 m4">
|
|
||||||
<div className="card grey darken-1">
|
|
||||||
<div className="card-content white-text">
|
|
||||||
<span className="card-title"></span>
|
|
||||||
{this.completedMig()}
|
|
||||||
</div>
|
|
||||||
<div className="card-action">
|
|
||||||
<a href="/completed">complete</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -71,6 +61,18 @@ class Cards extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="col s6 m4">
|
||||||
|
<div className="card grey darken-1">
|
||||||
|
<div className="card-content white-text">
|
||||||
|
<span className="card-title"></span>
|
||||||
|
<p></p>
|
||||||
|
{this.waitingMig()}
|
||||||
|
</div>
|
||||||
|
<div className="card-action">
|
||||||
|
<a href="/pending-terminations">pending term</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import ToolkitProvider, {
|
|||||||
const CompTable = (props) => {
|
const CompTable = (props) => {
|
||||||
const [list, setList] = useState([]);
|
const [list, setList] = useState([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [ticURl, setURL] = useState(null)
|
|
||||||
const { SearchBar } = Search;
|
const { SearchBar } = Search;
|
||||||
const { ExportCSVButton } = CSVExport;
|
const { ExportCSVButton } = CSVExport;
|
||||||
const sizePerPageRenderer = ({
|
const sizePerPageRenderer = ({
|
||||||
@ -89,10 +89,15 @@ const CompTable = (props) => {
|
|||||||
formatter: (cell, row) => (
|
formatter: (cell, row) => (
|
||||||
<a
|
<a
|
||||||
href={
|
href={
|
||||||
row.brand === "VentraIP" ? "https://helpdesk.ventraip.com.au/profiles/ticket/" + row.ticket_id
|
row.brand === "VentraIP"
|
||||||
: row.brand === "Zuver" ? "https://helpdesk.zuver.net.au/profiles/ticket/" + row.ticket_id
|
? "https://helpdesk.ventraip.com.au/profiles/ticket/" +
|
||||||
: row.brand === "Synergy" ? "https://helpdesk.synergywholesale.com/profiles/ticket/" + row.ticket_id
|
row.ticket_id
|
||||||
: null
|
: row.brand === "Zuver"
|
||||||
|
? "https://helpdesk.zuver.net.au/profiles/ticket/" + row.ticket_id
|
||||||
|
: row.brand === "Synergy"
|
||||||
|
? "https://helpdesk.synergywholesale.com/profiles/ticket/" +
|
||||||
|
row.ticket_id
|
||||||
|
: null
|
||||||
}
|
}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
@ -115,7 +120,6 @@ const CompTable = (props) => {
|
|||||||
{ dataField: "migration_type", text: "Type", sort: true },
|
{ dataField: "migration_type", text: "Type", sort: true },
|
||||||
{ dataField: "original_server", text: "Original Server", sort: true },
|
{ dataField: "original_server", text: "Original Server", sort: true },
|
||||||
{ dataField: "new_server", text: "New Server", sort: true },
|
{ dataField: "new_server", text: "New Server", sort: true },
|
||||||
{ dataField: "migration_status", text: "Status", sort: true },
|
|
||||||
// { dataField: "term_date", text: "Termination Date", sort: true },
|
// { dataField: "term_date", text: "Termination Date", sort: true },
|
||||||
{ dataField: "notes", text: "Notes", sort: true },
|
{ dataField: "notes", text: "Notes", sort: true },
|
||||||
// { dataField: "submit_time", text: "Submit Time", sort: true },
|
// { dataField: "submit_time", text: "Submit Time", sort: true },
|
||||||
|
|||||||
Reference in New Issue
Block a user