mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-20 21:36:12 +08:00
add copy id for the rest of tables
This commit is contained in:
@@ -36,6 +36,7 @@ import { ActiveTaskExtended } from "../reducers/tasksReducer";
|
|||||||
import { durationBefore, timeAgo, uuidPrefix, prettifyPayload } from "../utils";
|
import { durationBefore, timeAgo, uuidPrefix, prettifyPayload } from "../utils";
|
||||||
import { TableColumn } from "../types/table";
|
import { TableColumn } from "../types/table";
|
||||||
import { taskDetailsPath } from "../paths";
|
import { taskDetailsPath } from "../paths";
|
||||||
|
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
table: {
|
table: {
|
||||||
@@ -264,8 +265,14 @@ function ActiveTasksTable(props: Props & ReduxProps) {
|
|||||||
const useRowStyles = makeStyles((theme) => ({
|
const useRowStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: theme.shadows[2],
|
boxShadow: theme.shadows[2],
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "inline-block"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"&:hover .MuiTableCell-root": {
|
"&:hover .MuiTableCell-root": {
|
||||||
borderBottomColor: theme.palette.background.paper,
|
borderBottomColor: theme.palette.background.paper,
|
||||||
@@ -306,6 +313,19 @@ function Row(props: RowProps) {
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
<Tooltip title="Copy text to clipboard">
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
navigator.clipboard.writeText(task.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size="small"
|
||||||
|
id="copy-button"
|
||||||
|
>
|
||||||
|
<FileCopyOutlinedIcon fontSize="small" style={{ height: "12px", width: "12px" }} />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{task.type}</TableCell>
|
<TableCell>{task.type}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@@ -21,6 +21,7 @@ import Alert from "@material-ui/lab/Alert";
|
|||||||
import AlertTitle from "@material-ui/lab/AlertTitle";
|
import AlertTitle from "@material-ui/lab/AlertTitle";
|
||||||
import SyntaxHighlighter from "./SyntaxHighlighter";
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
||||||
import { AppState } from "../store";
|
import { AppState } from "../store";
|
||||||
|
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';
|
||||||
import {
|
import {
|
||||||
batchDeleteArchivedTasksAsync,
|
batchDeleteArchivedTasksAsync,
|
||||||
batchRunArchivedTasksAsync,
|
batchRunArchivedTasksAsync,
|
||||||
@@ -294,8 +295,14 @@ function ArchivedTasksTable(props: Props & ReduxProps) {
|
|||||||
const useRowStyles = makeStyles((theme) => ({
|
const useRowStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: theme.shadows[2],
|
boxShadow: theme.shadows[2],
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "inline-block"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"&:hover .MuiTableCell-root": {
|
"&:hover .MuiTableCell-root": {
|
||||||
borderBottomColor: theme.palette.background.paper,
|
borderBottomColor: theme.palette.background.paper,
|
||||||
@@ -345,6 +352,19 @@ function Row(props: RowProps) {
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
<Tooltip title="Copy text to clipboard">
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
navigator.clipboard.writeText(task.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size="small"
|
||||||
|
id="copy-button"
|
||||||
|
>
|
||||||
|
<FileCopyOutlinedIcon fontSize="small" style={{ height: "12px", width: "12px" }} />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{task.type}</TableCell>
|
<TableCell>{task.type}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@@ -20,6 +20,7 @@ import Alert from "@material-ui/lab/Alert";
|
|||||||
import AlertTitle from "@material-ui/lab/AlertTitle";
|
import AlertTitle from "@material-ui/lab/AlertTitle";
|
||||||
import SyntaxHighlighter from "./SyntaxHighlighter";
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
||||||
import { AppState } from "../store";
|
import { AppState } from "../store";
|
||||||
|
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';
|
||||||
import {
|
import {
|
||||||
listCompletedTasksAsync,
|
listCompletedTasksAsync,
|
||||||
deleteAllCompletedTasksAsync,
|
deleteAllCompletedTasksAsync,
|
||||||
@@ -270,8 +271,14 @@ function CompletedTasksTable(props: Props & ReduxProps) {
|
|||||||
const useRowStyles = makeStyles((theme) => ({
|
const useRowStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: theme.shadows[2],
|
boxShadow: theme.shadows[2],
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "inline-block"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"&:hover .MuiTableCell-root": {
|
"&:hover .MuiTableCell-root": {
|
||||||
borderBottomColor: theme.palette.background.paper,
|
borderBottomColor: theme.palette.background.paper,
|
||||||
@@ -320,6 +327,19 @@ function Row(props: RowProps) {
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
<Tooltip title="Copy text to clipboard">
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
navigator.clipboard.writeText(task.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size="small"
|
||||||
|
id="copy-button"
|
||||||
|
>
|
||||||
|
<FileCopyOutlinedIcon fontSize="small" style={{ height: "12px", width: "12px" }} />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{task.type}</TableCell>
|
<TableCell>{task.type}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@@ -346,14 +346,12 @@ function Row(props: RowProps) {
|
|||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
<Tooltip title="Copy text to clipboard">
|
<Tooltip title="Copy text to clipboard">
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={(e) =>
|
onClick={(e) =>{
|
||||||
{
|
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
navigator.clipboard.writeText(task.id) }
|
navigator.clipboard.writeText(task.id) }
|
||||||
}
|
}
|
||||||
size="small"
|
size="small"
|
||||||
id="copy-button"
|
id="copy-button"
|
||||||
className={classes.actionButton}
|
|
||||||
>
|
>
|
||||||
<FileCopyOutlinedIcon fontSize="small" style={{height:"12px", width:"12px"}} />
|
<FileCopyOutlinedIcon fontSize="small" style={{height:"12px", width:"12px"}} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
@@ -44,6 +44,7 @@ import { usePolling } from "../hooks";
|
|||||||
import { TaskInfoExtended } from "../reducers/tasksReducer";
|
import { TaskInfoExtended } from "../reducers/tasksReducer";
|
||||||
import { TableColumn } from "../types/table";
|
import { TableColumn } from "../types/table";
|
||||||
import { taskDetailsPath } from "../paths";
|
import { taskDetailsPath } from "../paths";
|
||||||
|
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
table: {
|
table: {
|
||||||
@@ -327,8 +328,14 @@ function RetryTasksTable(props: Props & ReduxProps) {
|
|||||||
const useRowStyles = makeStyles((theme) => ({
|
const useRowStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: theme.shadows[2],
|
boxShadow: theme.shadows[2],
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "inline-block"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"&:hover .MuiTableCell-root": {
|
"&:hover .MuiTableCell-root": {
|
||||||
borderBottomColor: theme.palette.background.paper,
|
borderBottomColor: theme.palette.background.paper,
|
||||||
@@ -380,6 +387,19 @@ function Row(props: RowProps) {
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
<Tooltip title="Copy text to clipboard">
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
navigator.clipboard.writeText(task.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size="small"
|
||||||
|
id="copy-button"
|
||||||
|
>
|
||||||
|
<FileCopyOutlinedIcon fontSize="small" style={{ height: "12px", width: "12px" }} />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{task.type}</TableCell>
|
<TableCell>{task.type}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
@@ -44,6 +44,7 @@ import { usePolling } from "../hooks";
|
|||||||
import { TaskInfoExtended } from "../reducers/tasksReducer";
|
import { TaskInfoExtended } from "../reducers/tasksReducer";
|
||||||
import { TableColumn } from "../types/table";
|
import { TableColumn } from "../types/table";
|
||||||
import { taskDetailsPath } from "../paths";
|
import { taskDetailsPath } from "../paths";
|
||||||
|
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
table: {
|
table: {
|
||||||
@@ -324,8 +325,14 @@ function ScheduledTasksTable(props: Props & ReduxProps) {
|
|||||||
const useRowStyles = makeStyles((theme) => ({
|
const useRowStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "none"
|
||||||
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: theme.shadows[2],
|
boxShadow: theme.shadows[2],
|
||||||
|
"& #copy-button": {
|
||||||
|
display: "inline-block"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"&:hover .MuiTableCell-root": {
|
"&:hover .MuiTableCell-root": {
|
||||||
borderBottomColor: theme.palette.background.paper,
|
borderBottomColor: theme.palette.background.paper,
|
||||||
@@ -376,6 +383,19 @@ function Row(props: RowProps) {
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
<Tooltip title="Copy text to clipboard">
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
navigator.clipboard.writeText(task.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size="small"
|
||||||
|
id="copy-button"
|
||||||
|
>
|
||||||
|
<FileCopyOutlinedIcon fontSize="small" style={{ height: "12px", width: "12px" }} />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{task.type}</TableCell>
|
<TableCell>{task.type}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
Reference in New Issue
Block a user