Skip to content

Commit 9fa81cf

Browse files
authored
Show pipeline ID (#479)
* Add ID column to pipeline table * Add ID field to pipeline details * Update pipeline sort order * Tweak dialog trigger apperance * Make id a sortable field
1 parent c60dad4 commit 9fa81cf

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

ui/src/pages/overview/pipelines/pipelines-columns.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import { PipelineDetailsDialog } from 'pages/pipeline-details/pipeline-details-d
55
import { STRING, translate } from 'utils/language'
66

77
export const columns: (projectId: string) => TableColumn<Pipeline>[] = () => [
8+
{
9+
id: 'id',
10+
sortField: 'id',
11+
name: translate(STRING.FIELD_LABEL_ID),
12+
renderCell: (item: Pipeline) => <BasicTableCell value={item.id} />,
13+
},
814
{
915
id: 'name',
1016
name: translate(STRING.FIELD_LABEL_NAME),

ui/src/pages/overview/pipelines/pipelines.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { columns } from './pipelines-columns'
1313
export const Pipelines = () => {
1414
const { projectId } = useParams()
1515
const [sort, setSort] = useState<TableSortSettings | undefined>({
16-
field: 'created_at',
17-
order: 'desc',
16+
field: 'id',
17+
order: 'asc',
1818
})
1919
const { pagination, setPage } = usePagination()
2020
const { pipelines, total, isLoading, isFetching, error } = usePipelines({

ui/src/pages/pipeline-details/pipeline-details-dialog.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,25 @@ const PipelineDetailsContent = ({
6464
<FormSection title={translate(STRING.SUMMARY)}>
6565
<FormRow>
6666
<InputValue
67-
label={translate(STRING.FIELD_LABEL_NAME)}
68-
value={pipeline.name}
67+
label={translate(STRING.FIELD_LABEL_ID)}
68+
value={pipeline.id}
6969
/>
7070
<InputValue
71-
label={translate(STRING.FIELD_LABEL_DESCRIPTION)}
72-
value={pipeline.description}
71+
label={translate(STRING.FIELD_LABEL_VERSION)}
72+
value={pipeline.versionLabel}
7373
/>
7474
</FormRow>
7575
<FormRow>
7676
<InputValue
77-
label={translate(STRING.FIELD_LABEL_VERSION)}
78-
value={pipeline.versionLabel}
77+
label={translate(STRING.FIELD_LABEL_NAME)}
78+
value={pipeline.name}
79+
/>
80+
<InputValue
81+
label={translate(STRING.FIELD_LABEL_DESCRIPTION)}
82+
value={pipeline.description}
7983
/>
8084
</FormRow>
85+
8186
<FormRow>
8287
<InputValue
8388
label={translate(STRING.FIELD_LABEL_CREATED_AT)}

ui/src/pages/pipeline-details/styles.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
.dialogTrigger {
1111
@include paragraph-medium();
1212
color: $color-primary-1-600;
13+
font-weight: 600;
1314

1415
&:hover {
1516
cursor: pointer;

0 commit comments

Comments
 (0)