From b7bd9b6206b6cac2793c45425a0a20befa6a9ffd Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 17 Apr 2021 02:39:05 +0300 Subject: [PATCH] machine actions --- .../network/components/MachineItem.js | 54 ++++++++++++++++--- .../network/components/MachinesList.js | 2 +- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/features/network/components/MachineItem.js b/src/features/network/components/MachineItem.js index 1f6e94b..ecd5f7e 100644 --- a/src/features/network/components/MachineItem.js +++ b/src/features/network/components/MachineItem.js @@ -1,11 +1,21 @@ import React from "react"; import PropTypes from "prop-types"; -import { TableCell, TableRow, IconButton } from "@material-ui/core"; -import Collapse from "@material-ui/core/Collapse"; -import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown"; -import KeyboardArrowUpIcon from "@material-ui/icons/KeyboardArrowUp"; +import { + TableCell, + TableRow, + IconButton, + Collapse, + Tooltip +} from "@material-ui/core"; +import { + KeyboardArrowDown, + KeyboardArrowUp, + PowerSettingsNew, + LastPage +} from "@material-ui/icons"; import { makeStyles } from "@material-ui/core/styles"; import MachineLog from "./MachineLog"; +import { useTranslation } from "react-i18next"; const useRowStyles = makeStyles({ root: { @@ -18,6 +28,11 @@ const useRowStyles = makeStyles({ const MachineItem = ({ machine }) => { const [open, setOpen] = React.useState(false); const classes = useRowStyles(); + const { t } = useTranslation(); + + const handleClick = event => { + alert("asdasd"); + }; return ( @@ -28,7 +43,7 @@ const MachineItem = ({ machine }) => { size="small" onClick={() => setOpen(!open)} > - {open ? : } + {open ? : } @@ -36,7 +51,34 @@ const MachineItem = ({ machine }) => { {machine.machineName} {machine.iPv4Address} - {"buttons"} + + <> + + + + + + + + + + + + + + + + diff --git a/src/features/network/components/MachinesList.js b/src/features/network/components/MachinesList.js index c4af8a2..1b35a78 100644 --- a/src/features/network/components/MachinesList.js +++ b/src/features/network/components/MachinesList.js @@ -21,7 +21,7 @@ const MachinesList = ({ dense, machines }) => { Full machine name Machine name IP - Actions +