From cd5a207d69cdaf05b47d956c18e89d928585eec7 Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Mon, 1 Jun 2020 11:29:01 -0700 Subject: [PATCH] [Dashboard] Frontend Lint Fix. (#8696) --- .../dashboard/client/src/pages/dashboard/Dashboard.tsx | 8 ++++---- .../client/src/pages/dashboard/memory/Memory.tsx | 10 +++++----- .../src/pages/dashboard/memory/MemoryRowGroup.tsx | 8 +++----- .../ray/dashboard/client/src/pages/dashboard/state.ts | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/python/ray/dashboard/client/src/pages/dashboard/Dashboard.tsx b/python/ray/dashboard/client/src/pages/dashboard/Dashboard.tsx index 7e30a2cff..b10039610 100644 --- a/python/ray/dashboard/client/src/pages/dashboard/Dashboard.tsx +++ b/python/ray/dashboard/client/src/pages/dashboard/Dashboard.tsx @@ -10,20 +10,20 @@ import { import React from "react"; import { connect } from "react-redux"; import { + getMemoryTable, getNodeInfo, getRayletInfo, getTuneAvailability, - getMemoryTable, stopMemoryTableCollection, } from "../../api"; import { StoreState } from "../../store"; import LastUpdated from "./LastUpdated"; import LogicalView from "./logical-view/LogicalView"; +import MemoryInfo from "./memory/Memory"; import NodeInfo from "./node-info/NodeInfo"; import RayConfig from "./ray-config/RayConfig"; import { dashboardActions } from "./state"; import Tune from "./tune/Tune"; -import MemoryInfo from "./memory/Memory"; const styles = (theme: Theme) => createStyles({ @@ -64,7 +64,7 @@ class Dashboard extends React.Component< ]; refreshInfo = async () => { - let { shouldObtainMemoryTable } = this.props; + const { shouldObtainMemoryTable } = this.props; try { const [ nodeInfo, @@ -110,7 +110,7 @@ class Dashboard extends React.Component< render() { const { classes, tab, tuneAvailability } = this.props; - let tabs = this.tabs.slice(); + const tabs = this.tabs.slice(); // if Tune information is not available, remove Tune tab from the dashboard if (tuneAvailability === null || !tuneAvailability.available) { diff --git a/python/ray/dashboard/client/src/pages/dashboard/memory/Memory.tsx b/python/ray/dashboard/client/src/pages/dashboard/memory/Memory.tsx index 764f6c195..f2bec4f98 100644 --- a/python/ray/dashboard/client/src/pages/dashboard/memory/Memory.tsx +++ b/python/ray/dashboard/client/src/pages/dashboard/memory/Memory.tsx @@ -1,4 +1,5 @@ import { + Button, createStyles, Table, TableBody, @@ -6,18 +7,17 @@ import { TableHead, TableRow, Theme, - withStyles, WithStyles, - Button, + withStyles, } from "@material-ui/core"; import PauseIcon from "@material-ui/icons/Pause"; import PlayArrowIcon from "@material-ui/icons/PlayArrow"; import React from "react"; -import { StoreState } from "../../../store"; import { connect } from "react-redux"; -import MemoryRowGroup from "./MemoryRowGroup"; -import { dashboardActions } from "../state"; import { stopMemoryTableCollection } from "../../../api"; +import { StoreState } from "../../../store"; +import { dashboardActions } from "../state"; +import MemoryRowGroup from "./MemoryRowGroup"; const styles = (theme: Theme) => createStyles({ diff --git a/python/ray/dashboard/client/src/pages/dashboard/memory/MemoryRowGroup.tsx b/python/ray/dashboard/client/src/pages/dashboard/memory/MemoryRowGroup.tsx index 800033407..fb6e4fd8d 100644 --- a/python/ray/dashboard/client/src/pages/dashboard/memory/MemoryRowGroup.tsx +++ b/python/ray/dashboard/client/src/pages/dashboard/memory/MemoryRowGroup.tsx @@ -11,8 +11,8 @@ import RemoveIcon from "@material-ui/icons/Remove"; import classNames from "classnames"; import React from "react"; import { - MemoryTableResponse, MemoryTableEntry, + MemoryTableResponse, MemoryTableSummary, } from "../../../api"; import MemorySummary from "./MemorySummary"; @@ -94,10 +94,8 @@ class MemoryRowGroup extends React.Component< {features.map((feature, index) => ( - { - // TODO(sang): For now, it is always grouped by node_ip_address. - feature === "node_ip_address" ? groupKey : "" - } + {// TODO(sang): For now, it is always grouped by node_ip_address. + feature === "node_ip_address" ? groupKey : ""} ))} diff --git a/python/ray/dashboard/client/src/pages/dashboard/state.ts b/python/ray/dashboard/client/src/pages/dashboard/state.ts index 7b172a97d..fd8d3ed17 100644 --- a/python/ray/dashboard/client/src/pages/dashboard/state.ts +++ b/python/ray/dashboard/client/src/pages/dashboard/state.ts @@ -1,11 +1,11 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { + MemoryTableResponse, NodeInfoResponse, RayConfigResponse, RayletInfoResponse, TuneAvailabilityResponse, TuneJobResponse, - MemoryTableResponse, } from "../../api"; const name = "dashboard";