machine actions
parent
93fdc26886
commit
b7bd9b6206
|
@ -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 (
|
||||
<React.Fragment>
|
||||
|
@ -28,7 +43,7 @@ const MachineItem = ({ machine }) => {
|
|||
size="small"
|
||||
onClick={() => setOpen(!open)}
|
||||
>
|
||||
{open ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}
|
||||
{open ? <KeyboardArrowUp /> : <KeyboardArrowDown />}
|
||||
</IconButton>
|
||||
</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
|
@ -36,7 +51,34 @@ const MachineItem = ({ machine }) => {
|
|||
</TableCell>
|
||||
<TableCell>{machine.machineName}</TableCell>
|
||||
<TableCell>{machine.iPv4Address}</TableCell>
|
||||
<TableCell align="right">{"buttons"}</TableCell>
|
||||
<TableCell align="right">
|
||||
<>
|
||||
<Tooltip title={t("General.Actions")}>
|
||||
<span>
|
||||
<IconButton
|
||||
id={`machine-item-${machine.machineId}-wake`}
|
||||
size={"small"}
|
||||
disabled={false}
|
||||
onClick={handleClick}
|
||||
>
|
||||
<PowerSettingsNew />
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip title={t("General.Actions")}>
|
||||
<span>
|
||||
<IconButton
|
||||
id={`machine-item-${machine.machineId}-ping`}
|
||||
size={"small"}
|
||||
disabled={false}
|
||||
onClick={handleClick}
|
||||
>
|
||||
<LastPage />
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
</>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>
|
||||
|
|
|
@ -21,7 +21,7 @@ const MachinesList = ({ dense, machines }) => {
|
|||
<TableCell>Full machine name</TableCell>
|
||||
<TableCell>Machine name</TableCell>
|
||||
<TableCell>IP</TableCell>
|
||||
<TableCell align="right">Actions</TableCell>
|
||||
<TableCell align="right" />
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
|
|
Loading…
Reference in New Issue