[Dashboard] fix new dashboard entrance and some table problem (#13790)

This commit is contained in:
Dominic Ming 2021-01-30 10:42:16 +08:00 committed by GitHub
parent 30f82329e3
commit 4b60c388ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 58 deletions

View file

@ -35,6 +35,7 @@ const useDashboardStyles = makeStyles((theme: Theme) =>
"& > :not(:first-child)": {
marginTop: theme.spacing(4),
},
position: "relative",
},
tabs: {
borderBottomColor: theme.palette.divider,
@ -106,8 +107,14 @@ const Dashboard: React.FC = () => {
return (
<div className={classes.root}>
<Typography variant="h5">Ray Dashboard</Typography>
<Button onClick={() => history.push("/summary")}>
Try New Dashboard
<Button
style={{ position: "absolute", right: 16, top: 16 }}
variant="contained"
size="small"
color="primary"
onClick={() => history.push("/node")}
>
Try Experimental Dashboard
</Button>
<Tabs
className={classes.tabs}

View file

@ -98,9 +98,7 @@ const JobList = () => {
driverIpAddress,
isDead,
driverPid,
state,
timestamp,
namespaceId,
}) => (
<TableRow key={jobId}>
<TableCell align="center">
@ -114,7 +112,6 @@ const JobList = () => {
<TableCell align="center">
{dayjs(timestamp * 1000).format("YYYY/MM/DD HH:mm:ss")}
</TableCell>
<TableCell align="center">{namespaceId}</TableCell>
</TableRow>
),
)}

View file

@ -77,16 +77,6 @@ const BasicLayout = (
<img width={48} src={Logo} alt="Ray" /> <br /> Ray Dashboard
</Typography>
<List>
<ListItem
button
className={classnames(
classes.menuItem,
location.pathname === "/summary" && classes.selected,
)}
onClick={() => history.push("/summary")}
>
<ListItemText>SUMMARY</ListItemText>
</ListItem>
<ListItem
button
className={classnames(
@ -132,7 +122,7 @@ const BasicLayout = (
className={classnames(classes.menuItem)}
onClick={() => history.push("/")}
>
<ListItemText>BACK TO LEGACY</ListItemText>
<ListItemText>BACK TO EXISTING DASHBOARD</ListItemText>
</ListItem>
<ListItem>
<IconButton

View file

@ -14,7 +14,6 @@ import {
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import Pagination from "@material-ui/lab/Pagination";
import dayjs from "dayjs";
import React from "react";
import { Link } from "react-router-dom";
import Loading from "../../components/Loading";
@ -45,8 +44,6 @@ const columns = [
"Disk(root)",
"Sent",
"Received",
"BRPC Port",
"Time Info",
"Log",
];
@ -72,7 +69,7 @@ export const NodeCard = (props: { node: NodeDetail }) => {
}
const { raylet, hostname, ip, cpu, mem, net, disk, logUrl } = node;
const { nodeId, state, brpcPort } = raylet;
const { nodeId, state } = raylet;
return (
<Paper variant="outlined" style={{ padding: "12px 12px", margin: 12 }}>
@ -126,15 +123,6 @@ export const NodeCard = (props: { node: NodeDetail }) => {
)}
</Grid>
<Grid container justify="flex-end" spacing={1} style={{ margin: 8 }}>
<Grid>
<Button
target="_blank"
rel="noopener noreferrer"
href={brpcLinkChanger(`${ip}:${raylet.brpcPort}`)}
>
BRPC {brpcPort}
</Button>
</Grid>
<Grid>
<Button>
<Link to={`/log/${encodeURIComponent(logUrl)}`}>log</Link>
@ -329,35 +317,6 @@ const Nodes = () => {
<TableCell align="center">
{memoryConverter(net[1])}/s
</TableCell>
<TableCell align="center">
{raylet.brpcPort && (
<a
target="_blank"
rel="noopener noreferrer"
href={brpcLinkChanger(`${ip}:${raylet.brpcPort}`)}
>
{raylet.brpcPort}
</a>
)}
</TableCell>
<TableCell align="center">
{!!raylet.startTime && (
<p>
Start Time:{" "}
{dayjs(raylet.startTime * 1000).format(
"YYYY/MM/DD HH:mm:ss",
)}
</p>
)}
{!!raylet.terminateTime && (
<p>
End Time:{" "}
{dayjs(raylet.terminateTime * 1000).format(
"YYYY/MM/DD HH:mm:ss",
)}
</p>
)}
</TableCell>
<TableCell>
<Link to={`/log/${encodeURIComponent(logUrl)}`}>
Log