Ray Dashboard
@@ -281,7 +254,7 @@ class Component extends React.Component
, State> {
- Hostname
+ Host
Workers
Uptime
CPU
@@ -296,23 +269,23 @@ class Component extends React.Component, State> {
{result.clients.map(client => {
return (
-
+
- {!expanded[client.hostname] ? (
+ {!expanded[client.ip] ? (
) : (
)}
- {client.hostname}
+ {client.hostname} ({client.ip})
{client.workers.length}
@@ -356,7 +329,7 @@ class Component extends React.Component, State> {
{/*{(client.net[0] / Math.pow(1024, 2)).toFixed(3)} MiB/s*/}
{/*{(client.net[1] / Math.pow(1024, 2)).toFixed(3)} MiB/s*/}
- {logCounts[client.hostname].total === 0 ? (
+ {logCounts[client.ip].total === 0 ? (
No logs
) : (
, State> {
to={`/logs/${client.hostname}`}
>
View all logs (
- {logCounts[client.hostname].total.toLocaleString()}{" "}
- {logCounts[client.hostname].total === 1
- ? "line"
- : "lines"}
- )
+ {logCounts[client.ip].total.toLocaleString()}{" "}
+ {logCounts[client.ip].total === 1 ? "line" : "lines"})
)}
- {errorCounts[client.hostname].total === 0 ? (
+ {errorCounts[client.ip].total === 0 ? (
No errors
) : (
, State> {
to={`/errors/${client.hostname}`}
>
View all errors (
- {errorCounts[client.hostname].total.toLocaleString()})
+ {errorCounts[client.ip].total.toLocaleString()})
)}
- {expanded[client.hostname] &&
+ {expanded[client.ip] &&
client.workers.map((worker, index: number) => (
@@ -425,8 +395,7 @@ class Component extends React.Component, State> {
- {logCounts[client.hostname].perWorker[worker.pid] ===
- 0 ? (
+ {logCounts[client.ip].perWorker[worker.pid] === 0 ? (
No logs
) : (
, State> {
to={`/logs/${client.hostname}/${worker.pid}`}
>
View log (
- {logCounts[client.hostname].perWorker[
+ {logCounts[client.ip].perWorker[
worker.pid
].toLocaleString()}{" "}
- {logCounts[client.hostname].perWorker[
- worker.pid
- ] === 1
+ {logCounts[client.ip].perWorker[worker.pid] === 1
? "line"
: "lines"}
)
@@ -447,9 +414,8 @@ class Component extends React.Component, State> {
)}
- {errorCounts[client.hostname].perWorker[
- worker.pid
- ] === 0 ? (
+ {errorCounts[client.ip].perWorker[worker.pid] ===
+ 0 ? (
No errors
) : (
, State> {
to={`/errors/${client.hostname}/${worker.pid}`}
>
View errors (
- {errorCounts[client.hostname].perWorker[
+ {errorCounts[client.ip].perWorker[
worker.pid
].toLocaleString()}
)
@@ -474,16 +440,6 @@ class Component extends React.Component, State> {
Last updated: {new Date(timestamp * 1000).toLocaleString()}
- (
-
- )}
- />
- }
- />
);
}
diff --git a/python/ray/dashboard/client/src/Errors.tsx b/python/ray/dashboard/client/src/Errors.tsx
index 2361b2dcc..189cdd853 100644
--- a/python/ray/dashboard/client/src/Errors.tsx
+++ b/python/ray/dashboard/client/src/Errors.tsx
@@ -1,5 +1,6 @@
import Dialog from "@material-ui/core/Dialog";
import IconButton from "@material-ui/core/IconButton";
+import { fade } from "@material-ui/core/styles/colorManipulator";
import { Theme } from "@material-ui/core/styles/createMuiTheme";
import createStyles from "@material-ui/core/styles/createStyles";
import withStyles, { WithStyles } from "@material-ui/core/styles/withStyles";
@@ -16,85 +17,88 @@ const styles = (theme: Theme) =>
},
closeButton: {
position: "absolute",
- right: theme.spacing(1),
- top: theme.spacing(1),
+ right: theme.spacing(1.5),
+ top: theme.spacing(1.5),
zIndex: 1
},
title: {
borderBottomColor: theme.palette.divider,
borderBottomStyle: "solid",
borderBottomWidth: 1,
+ fontSize: "1.5rem",
lineHeight: 1,
marginBottom: theme.spacing(3),
- paddingBottom: theme.spacing(3),
- position: "relative",
- "&:not(:first-of-type)": {
- marginTop: theme.spacing(6)
- }
+ paddingBottom: theme.spacing(3)
+ },
+ header: {
+ lineHeight: 1,
+ marginBottom: theme.spacing(3),
+ marginTop: theme.spacing(3)
},
error: {
- "&:not(:last-child)": {
- marginBottom: theme.spacing(3)
- }
+ backgroundColor: fade(theme.palette.error.main, 0.06),
+ borderLeftColor: theme.palette.error.main,
+ borderLeftStyle: "solid",
+ borderLeftWidth: 3,
+ marginTop: theme.spacing(3),
+ padding: theme.spacing(2)
},
timestamp: {
+ color: theme.palette.text.secondary,
marginBottom: theme.spacing(1)
}
});
-interface Props {
- errors: {
- [jobId: string]: Array<{
+interface State {
+ result: {
+ [pid: string]: Array<{
message: string;
timestamp: number;
type: string;
}>;
- };
+ } | null;
+ error: string | null;
}
class Component extends React.Component<
- Props &
- WithStyles