11import _ from 'lodash' ;
22import React from 'react' ;
3- // import cn from 'classnames';
43
5- // import styles from '../index.module.scss';
64import { iconColors , iconSizes , ID_MAX_LENGTH } from '../../../../../constants' ;
7- // import { translate } from '../translate';
5+
86import {
97 formatDateToDisplay ,
108 truncate ,
@@ -16,20 +14,17 @@ import { routePaths } from '../../../../../routes/routePaths';
1614import {
1715 FlexBox ,
1816 Paragraph ,
19- // LinkBox,
2017 Box ,
2118 icons ,
2219 ColoredCircle ,
2320} from '../../../../components' ;
2421import { HeaderCol } from '../../../common/Table' ;
2522import { RunStatus } from '../RunStatus' ;
26- // import { RunTime } from '../../RunTime';
27- // import { RunUser } from '../RunUser';
23+
2824import { SortingHeader } from '../SortingHeader' ;
2925import { Sorting , SortingDirection } from '../types' ;
3026import { useService } from './useService' ;
3127import ReactTooltip from 'react-tooltip' ;
32- // import { PipelineName } from '../PipelineName';
3328
3429export const useHeaderCols = ( {
3530 runs,
@@ -46,14 +41,7 @@ export const useHeaderCols = ({
4641 setActiveSortingDirection : ( direction : SortingDirection | null ) => void ;
4742 setActiveSorting : ( sorting : Sorting | null ) => void ;
4843} ) : HeaderCol [ ] => {
49- const {
50- // toggleSelectRun,
51- // isRunSelected,
52- // selectRuns,
53- // unselectRuns,
54- // allRunsSelected,
55- sortMethod,
56- } = useService ( {
44+ const { sortMethod } = useService ( {
5745 setActiveSortingDirection,
5846 setActiveSorting,
5947 setRuns,
@@ -91,16 +79,8 @@ export const useHeaderCols = ({
9179 { truncate ( run . id , ID_MAX_LENGTH ) }
9280 </ Paragraph >
9381 </ div >
94- < ReactTooltip
95- id = { run . id }
96- place = "top"
97- effect = "solid"
98- // backgroundColor={getBGColorFromInvoiceStatus(invoice.status)}
99- >
100- < Paragraph color = "white" >
101- { run . id }
102- { /* {truncate(pipeline.id, ID_MAX_LENGTH)} */ }
103- </ Paragraph >
82+ < ReactTooltip id = { run . id } place = "top" effect = "solid" >
83+ < Paragraph color = "white" > { run . id } </ Paragraph >
10484 </ ReactTooltip >
10585 </ FlexBox >
10686 ) ,
@@ -126,18 +106,9 @@ export const useHeaderCols = ({
126106 < div style = { { alignItems : 'center' } } >
127107 < div data-tip data-for = { run . name } >
128108 < Paragraph size = "small" > { run . name } </ Paragraph >
129- { /* <Paragraph size="small">{pipeline.name}</Paragraph> */ }
130109 </ div >
131- < ReactTooltip
132- id = { run . name }
133- place = "top"
134- effect = "solid"
135- // backgroundColor={getBGColorFromInvoiceStatus(invoice.status)}
136- >
137- < Paragraph color = "white" >
138- { run . name }
139- { /* {translate(`tooltips.${invoice.status}`) } */ }
140- </ Paragraph >
110+ < ReactTooltip id = { run . name } place = "top" effect = "solid" >
111+ < Paragraph color = "white" > { run . name } </ Paragraph >
141112 </ ReactTooltip >
142113 </ div >
143114 ) ,
@@ -178,18 +149,9 @@ export const useHeaderCols = ({
178149 >
179150 { run . pipeline ?. name }
180151 </ Paragraph >
181- { /* <Paragraph size="small">{pipeline.name}</Paragraph> */ }
182152 </ div >
183- < ReactTooltip
184- id = { run . pipeline ?. name }
185- place = "top"
186- effect = "solid"
187- // backgroundColor={getBGColorFromInvoiceStatus(invoice.status)}
188- >
189- < Paragraph color = "white" >
190- { run . pipeline ?. name }
191- { /* {translate(`tooltips.${invoice.status}`) } */ }
192- </ Paragraph >
153+ < ReactTooltip id = { run . pipeline ?. name } place = "top" effect = "solid" >
154+ < Paragraph color = "white" > { run . pipeline ?. name } </ Paragraph >
193155 </ ReactTooltip >
194156 </ FlexBox >
195157 ) ,
@@ -248,18 +210,9 @@ export const useHeaderCols = ({
248210 >
249211 { run . stack ?. name }
250212 </ Paragraph >
251- { /* <Paragraph size="small">{pipeline.name}</Paragraph> */ }
252213 </ div >
253- < ReactTooltip
254- id = { run . stack ?. name }
255- place = "top"
256- effect = "solid"
257- // backgroundColor={getBGColorFromInvoiceStatus(invoice.status)}
258- >
259- < Paragraph color = "white" >
260- { run . stack ?. name }
261- { /* {translate(`tooltips.${invoice.status}`) } */ }
262- </ Paragraph >
214+ < ReactTooltip id = { run . stack ?. name } place = "top" effect = "solid" >
215+ < Paragraph color = "white" > { run . stack ?. name } </ Paragraph >
263216 </ ReactTooltip >
264217 </ FlexBox >
265218 ) ,
@@ -281,9 +234,6 @@ export const useHeaderCols = ({
281234 AUTHOR
282235 </ Paragraph >
283236 </ SortingHeader >
284- // <Paragraph size="small" color="black" style={{ fontSize: '12px' }}>
285- // AUTHOR
286- // </Paragraph>
287237 ) ,
288238 width : '10%' ,
289239 renderRow : ( run : TRun ) => {
@@ -311,11 +261,9 @@ export const useHeaderCols = ({
311261 id = { run . user . full_name ? run . user . full_name : run . user . name }
312262 place = "top"
313263 effect = "solid"
314- // backgroundColor={getBGColorFromInvoiceStatus(invoice.status)}
315264 >
316265 < Paragraph color = "white" >
317266 { run . user . full_name ? run . user . full_name : run . user . name }
318- { /* {translate(`tooltips.${invoice.status}`) } */ }
319267 </ Paragraph >
320268 </ ReactTooltip >
321269 </ FlexBox >
@@ -361,12 +309,8 @@ export const useHeaderCols = ({
361309 id = { formatDateToSort ( run . created ) }
362310 place = "top"
363311 effect = "solid"
364- // backgroundColor={getBGColorFromInvoiceStatus(invoice.status)}
365312 >
366- < Paragraph color = "white" >
367- { run . created }
368- { /* {translate(`tooltips.${invoice.status}`) } */ }
369- </ Paragraph >
313+ < Paragraph color = "white" > </ Paragraph >
370314 </ ReactTooltip >
371315 </ FlexBox >
372316 ) ,
0 commit comments