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/" />
|
||||
)} />
|
||||
<Route exact path="/pending-terminations" render={(props) => (
|
||||
<GenericList {...props} APILINK="/pendingterm/" />
|
||||
<GenericList {...props} APILINK="/waitingterm/" />
|
||||
)} />
|
||||
<Route exact path="/all-terminations" render={(props) => (
|
||||
<GenericList {...props} APILINK="/waitingterm/" />
|
||||
<GenericList {...props} APILINK="/pendingterm/" />
|
||||
)} />
|
||||
<Route exact path="/historical-migrations" render={(props) => (
|
||||
<GenericList {...props} APILINK="/all/" />
|
||||
)} />
|
||||
<Route exact path="/booked" render={(props) => (
|
||||
<GenericList {...props} APILINK="/booked/" />
|
||||
)} />
|
||||
</Switch>
|
||||
</div>
|
||||
</Router>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
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";
|
||||
|
||||
// Navbar class component, Just simple href's to retain styling
|
||||
@ -12,24 +12,24 @@ export class Navigation extends Component {
|
||||
<div className="nav-wrapper">
|
||||
<ul className="left">
|
||||
<li>
|
||||
<Link className="active" to="/">
|
||||
<a className="active" href="/">
|
||||
Dashboard
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<Link to="/upcoming-migrations">Upcoming Migrations</Link>
|
||||
<a href="/upcoming-migrations">Upcoming Migrations</a>
|
||||
</li>
|
||||
{/* <li>
|
||||
<Link to="/migrations">Migrations</Link>
|
||||
</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>
|
||||
<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 className="orange accent-4 active">
|
||||
<Link to="/book">Book</Link>
|
||||
<a href="/book">Book</a>
|
||||
</li>
|
||||
</ul>
|
||||
{/* Inline UUID search bar is here */}
|
||||
|
||||
@ -5,11 +5,14 @@ import React, { Component } from "react";
|
||||
// is referenced on Home
|
||||
|
||||
class Cards extends Component {
|
||||
upcomingMig() {
|
||||
return this.props.migs["upcoming_count"];
|
||||
}
|
||||
bookedMig() {
|
||||
return this.props.migs["booked_count"];
|
||||
return this.props.migs["booked_count"]
|
||||
}
|
||||
waitingMig() {
|
||||
return this.props.migs["awaitterm_count"];
|
||||
return this.props.migs["pendterm_count"];
|
||||
}
|
||||
completedMig() {
|
||||
return this.props.migs["complete_count"];
|
||||
@ -25,6 +28,17 @@ class Cards extends Component {
|
||||
|
||||
return (
|
||||
<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="card grey darken-1">
|
||||
<div className="card-content white-text">
|
||||
@ -32,31 +46,7 @@ class Cards extends Component {
|
||||
{this.bookedMig()}
|
||||
</div>
|
||||
<div className="card-action">
|
||||
<a href="/upcoming-migrations">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>
|
||||
<a href="/booked">booked</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -71,6 +61,18 @@ class Cards extends Component {
|
||||
</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>
|
||||
);
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ import ToolkitProvider, {
|
||||
const CompTable = (props) => {
|
||||
const [list, setList] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [ticURl, setURL] = useState(null)
|
||||
|
||||
const { SearchBar } = Search;
|
||||
const { ExportCSVButton } = CSVExport;
|
||||
const sizePerPageRenderer = ({
|
||||
@ -89,10 +89,15 @@ const CompTable = (props) => {
|
||||
formatter: (cell, row) => (
|
||||
<a
|
||||
href={
|
||||
row.brand === "VentraIP" ? "https://helpdesk.ventraip.com.au/profiles/ticket/" + row.ticket_id
|
||||
: 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
|
||||
row.brand === "VentraIP"
|
||||
? "https://helpdesk.ventraip.com.au/profiles/ticket/" +
|
||||
row.ticket_id
|
||||
: 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"
|
||||
>
|
||||
@ -115,7 +120,6 @@ const CompTable = (props) => {
|
||||
{ dataField: "migration_type", text: "Type", sort: true },
|
||||
{ dataField: "original_server", text: "Original 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: "notes", text: "Notes", sort: true },
|
||||
// { dataField: "submit_time", text: "Submit Time", sort: true },
|
||||
|
||||
Reference in New Issue
Block a user