Merge "Handle long strings in build/buildsets tables"

This commit is contained in:
Zuul 2021-10-04 22:01:17 +00:00 committed by Gerrit Code Review
commit 86285fece2
2 changed files with 16 additions and 0 deletions

View File

@ -39,6 +39,9 @@ import {
TableHeader,
TableBody,
TableVariant,
truncate,
breakWord,
cellWidth,
} from '@patternfly/react-table'
import 'moment-duration-format'
import * as moment from 'moment'
@ -58,14 +61,17 @@ function BuildTable({
{
title: <IconProperty icon={<BuildIcon />} value="Job" />,
dataLabel: 'Job',
cellTransforms: [breakWord],
},
{
title: <IconProperty icon={<CubeIcon />} value="Project" />,
dataLabel: 'Project',
cellTransforms: [breakWord],
},
{
title: <IconProperty icon={<CodeBranchIcon />} value="Branch" />,
dataLabel: 'Branch',
cellTransforms: [breakWord],
},
{
title: <IconProperty icon={<StreamIcon />} value="Pipeline" />,
@ -74,6 +80,8 @@ function BuildTable({
{
title: <IconProperty icon={<CodeIcon />} value="Change" />,
dataLabel: 'Change',
transforms: [cellWidth(10)],
cellTransforms: [truncate],
},
{
title: <IconProperty icon={<OutlinedClockIcon />} value="Duration" />,

View File

@ -37,6 +37,9 @@ import {
TableHeader,
TableBody,
TableVariant,
truncate,
breakWord,
cellWidth,
} from '@patternfly/react-table'
import { BuildResult, BuildResultWithIcon, IconProperty } from './Misc'
@ -53,18 +56,23 @@ function BuildsetTable({
{
title: <IconProperty icon={<CubeIcon />} value="Project" />,
dataLabel: 'Project',
cellTransforms: [breakWord],
},
{
title: <IconProperty icon={<CodeBranchIcon />} value="Branch" />,
dataLabel: 'Branch',
cellTransforms: [breakWord],
},
{
title: <IconProperty icon={<StreamIcon />} value="Pipeline" />,
dataLabel: 'Pipeline',
cellTransforms: [breakWord],
},
{
title: <IconProperty icon={<CodeIcon />} value="Change" />,
dataLabel: 'Change',
transforms: [cellWidth(10)],
cellTransforms: [truncate],
},
{
title: <IconProperty icon={<PollIcon />} value="Result" />,