mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-08-24 14:48:42 +08:00
Use uuid prefix in task table
This commit is contained in:
@@ -32,6 +32,7 @@ import TablePaginationActions, {
|
||||
} from "./TablePaginationActions";
|
||||
import { usePolling } from "../hooks";
|
||||
import { ActiveTaskExtended } from "../reducers/tasksReducer";
|
||||
import { uuidPrefix } from "../utils";
|
||||
|
||||
const useStyles = makeStyles({
|
||||
table: {
|
||||
@@ -177,7 +178,7 @@ function Row(props: { task: ActiveTaskExtended; onCancelClick: () => void }) {
|
||||
</IconButton>
|
||||
</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
{task.id}
|
||||
{uuidPrefix(task.id)}
|
||||
</TableCell>
|
||||
<TableCell>{task.type}</TableCell>
|
||||
<TableCell align="center">
|
||||
|
@@ -37,7 +37,7 @@ import TablePaginationActions, {
|
||||
rowsPerPageOptions,
|
||||
} from "./TablePaginationActions";
|
||||
import TableActions from "./TableActions";
|
||||
import { timeAgo } from "../timeutil";
|
||||
import { timeAgo, uuidPrefix } from "../utils";
|
||||
import { usePolling } from "../hooks";
|
||||
import { DeadTaskExtended } from "../reducers/tasksReducer";
|
||||
|
||||
@@ -283,7 +283,7 @@ function Row(props: RowProps) {
|
||||
</IconButton>
|
||||
</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
{task.id}
|
||||
{uuidPrefix(task.id)}
|
||||
</TableCell>
|
||||
<TableCell>{task.type}</TableCell>
|
||||
<TableCell>{timeAgo(task.last_failed_at)}</TableCell>
|
||||
|
@@ -29,6 +29,7 @@ import { listPendingTasksAsync } from "../actions/tasksActions";
|
||||
import { AppState } from "../store";
|
||||
import { PendingTask } from "../api";
|
||||
import { usePolling } from "../hooks";
|
||||
import { uuidPrefix } from "../utils";
|
||||
|
||||
const useStyles = makeStyles({
|
||||
table: {
|
||||
@@ -166,7 +167,7 @@ function Row(props: { task: PendingTask }) {
|
||||
</IconButton>
|
||||
</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
{task.id}
|
||||
{uuidPrefix(task.id)}
|
||||
</TableCell>
|
||||
<TableCell>{task.type}</TableCell>
|
||||
<TableCell>
|
||||
|
@@ -40,7 +40,7 @@ import TablePaginationActions, {
|
||||
rowsPerPageOptions,
|
||||
} from "./TablePaginationActions";
|
||||
import TableActions from "./TableActions";
|
||||
import { durationBefore } from "../timeutil";
|
||||
import { durationBefore, uuidPrefix } from "../utils";
|
||||
import { usePolling } from "../hooks";
|
||||
import { RetryTaskExtended } from "../reducers/tasksReducer";
|
||||
|
||||
@@ -307,7 +307,7 @@ function Row(props: RowProps) {
|
||||
</IconButton>
|
||||
</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
{task.id}
|
||||
{uuidPrefix(task.id)}
|
||||
</TableCell>
|
||||
<TableCell>{task.type}</TableCell>
|
||||
<TableCell>{durationBefore(task.next_process_at)}</TableCell>
|
||||
|
@@ -40,7 +40,7 @@ import TablePaginationActions, {
|
||||
rowsPerPageOptions,
|
||||
} from "./TablePaginationActions";
|
||||
import TableActions from "./TableActions";
|
||||
import { durationBefore } from "../timeutil";
|
||||
import { durationBefore, uuidPrefix } from "../utils";
|
||||
import { usePolling } from "../hooks";
|
||||
import { ScheduledTaskExtended } from "../reducers/tasksReducer";
|
||||
|
||||
@@ -304,7 +304,7 @@ function Row(props: RowProps) {
|
||||
</IconButton>
|
||||
</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
{task.id}
|
||||
{uuidPrefix(task.id)}
|
||||
</TableCell>
|
||||
<TableCell>{task.type}</TableCell>
|
||||
<TableCell>{durationBefore(task.next_process_at)}</TableCell>
|
||||
|
@@ -14,7 +14,7 @@ import syntaxHighlightStyle from "react-syntax-highlighter/dist/esm/styles/hljs/
|
||||
import { SortDirection, ColumnConfig } from "../types/table";
|
||||
import TableSortLabel from "@material-ui/core/TableSortLabel";
|
||||
import { SchedulerEntry } from "../api";
|
||||
import { timeAgo, durationBefore } from "../timeutil";
|
||||
import { timeAgo, durationBefore } from "../utils";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
table: {
|
||||
|
Reference in New Issue
Block a user