@@ -175,122 +175,125 @@ class RpConnectPipelinesList extends PageComponent<{}> {
175
175
176
176
return (
177
177
< PageContent >
178
- < Section >
179
- < ToastContainer />
180
- { /* Pipeline List */ }
178
+ < ToastContainer />
179
+ { /* Pipeline List */ }
181
180
182
- { pipelinesApi . pipelines . length !== 0 && (
183
- < Flex my = { 5 } flexDir = { 'column' } gap = { 2 } >
184
- < CreatePipelineButton />
185
- < SearchField
186
- width = "350px"
187
- searchText = { uiSettings . pipelinesList . quickSearch }
188
- setSearchText = { ( x ) => ( uiSettings . pipelinesList . quickSearch = x ) }
189
- placeholderText = "Enter search term / regex..."
190
- />
191
- </ Flex >
192
- ) }
181
+ { pipelinesApi . pipelines . length !== 0 && (
182
+ < Flex my = { 5 } flexDir = { 'column' } gap = { 2 } >
183
+ < CreatePipelineButton />
184
+ < SearchField
185
+ width = "350px"
186
+ searchText = { uiSettings . pipelinesList . quickSearch }
187
+ setSearchText = { ( x ) => ( uiSettings . pipelinesList . quickSearch = x ) }
188
+ placeholderText = "Enter search term / regex..."
189
+ />
190
+ </ Flex >
191
+ ) }
193
192
194
- { ( pipelinesApi . pipelines ?? [ ] ) . length === 0 ? (
195
- < EmptyPlaceholder />
196
- ) : (
197
- < DataTable < Pipeline >
198
- data = { filteredPipelines }
199
- pagination
200
- defaultPageSize = { 10 }
201
- sorting
202
- columns = { [
203
- {
204
- header : 'ID' ,
205
- cell : ( { row : { original } } ) => (
206
- < Link to = { `/rp-connect/${ encodeURIComponentPercents ( original . id ) } ` } >
207
- < Text > { original . id } </ Text >
208
- </ Link >
209
- ) ,
210
- size : 100 ,
211
- } ,
212
- {
213
- header : 'Pipeline Name' ,
214
- cell : ( { row : { original } } ) => (
215
- < Link to = { `/rp-connect/${ encodeURIComponentPercents ( original . id ) } ` } >
216
- < Text wordBreak = "break-word" whiteSpace = "break-spaces" >
217
- { original . displayName }
218
- </ Text >
219
- </ Link >
220
- ) ,
221
- size : Number . POSITIVE_INFINITY ,
222
- } ,
223
- {
224
- header : 'Description' ,
225
- accessorKey : 'description' ,
226
- size : 100 ,
227
- } ,
228
- {
229
- header : 'State' ,
230
- cell : ( { row : { original } } ) => {
231
- return (
232
- < >
233
- < PipelineStatus status = { original . state } />
234
- </ >
235
- ) ;
236
- } ,
193
+ { ( pipelinesApi . pipelines ?? [ ] ) . length === 0 ? (
194
+ < EmptyPlaceholder />
195
+ ) : (
196
+ < DataTable < Pipeline >
197
+ data = { filteredPipelines }
198
+ pagination
199
+ defaultPageSize = { 10 }
200
+ sorting
201
+ columns = { [
202
+ {
203
+ header : 'ID' ,
204
+ cell : ( { row : { original } } ) => (
205
+ < Link to = { `/rp-connect/${ encodeURIComponentPercents ( original . id ) } ` } >
206
+ < Text > { original . id } </ Text >
207
+ </ Link >
208
+ ) ,
209
+ size : 100 ,
210
+ } ,
211
+ {
212
+ header : 'Pipeline Name' ,
213
+ cell : ( { row : { original } } ) => (
214
+ < Link to = { `/rp-connect/${ encodeURIComponentPercents ( original . id ) } ` } >
215
+ < Text wordBreak = "break-word" whiteSpace = "break-spaces" >
216
+ { original . displayName }
217
+ </ Text >
218
+ </ Link >
219
+ ) ,
220
+ size : Number . POSITIVE_INFINITY ,
221
+ } ,
222
+ {
223
+ header : 'Description' ,
224
+ accessorKey : 'description' ,
225
+ cell : ( { row : { original } } ) => (
226
+ < Text minWidth = "200px" wordBreak = "break-word" whiteSpace = "break-spaces" >
227
+ { original . description }
228
+ </ Text >
229
+ ) ,
230
+ size : 200 ,
231
+ } ,
232
+ {
233
+ header : 'State' ,
234
+ cell : ( { row : { original } } ) => {
235
+ return (
236
+ < >
237
+ < PipelineStatus status = { original . state } />
238
+ </ >
239
+ ) ;
237
240
} ,
238
- // {
239
- // header: 'Throughput',
240
- // cell: ({ row: { original } }) => {
241
- // return <>
242
- // <PipelineThroughput pipeline={original} />
243
- // </>
244
- // },
245
- // size: 100,
246
- // },
247
- {
248
- header : '' ,
249
- id : 'actions' ,
250
- cell : ( { row : { original : r } } ) => (
251
- < Button
252
- variant = "icon"
253
- height = "16px"
254
- color = "gray.500"
255
- // disabledReason={api.userData?.canDeleteTransforms === false ? 'You don\'t have the \'canDeleteTransforms\' permission' : undefined}
256
- onClick = { ( e ) => {
257
- e . stopPropagation ( ) ;
258
- e . preventDefault ( ) ;
241
+ } ,
242
+ // {
243
+ // header: 'Throughput',
244
+ // cell: ({ row: { original } }) => {
245
+ // return <>
246
+ // <PipelineThroughput pipeline={original} />
247
+ // </>
248
+ // },
249
+ // size: 100,
250
+ // },
251
+ {
252
+ header : '' ,
253
+ id : 'actions' ,
254
+ cell : ( { row : { original : r } } ) => (
255
+ < Button
256
+ variant = "icon"
257
+ height = "16px"
258
+ color = "gray.500"
259
+ // disabledReason={api.userData?.canDeleteTransforms === false ? 'You don\'t have the \'canDeleteTransforms\' permission' : undefined}
260
+ onClick = { ( e ) => {
261
+ e . stopPropagation ( ) ;
262
+ e . preventDefault ( ) ;
259
263
260
- openDeleteModal ( r . displayName , ( ) => {
261
- pipelinesApi
262
- . deletePipeline ( r . id )
263
- . then ( async ( ) => {
264
- toast ( {
265
- status : 'success' ,
266
- duration : 4000 ,
267
- isClosable : false ,
268
- title : 'Pipeline deleted' ,
269
- } ) ;
270
- pipelinesApi . refreshPipelines ( true ) ;
271
- } )
272
- . catch ( ( err ) => {
273
- toast ( {
274
- status : 'error' ,
275
- duration : null ,
276
- isClosable : true ,
277
- title : 'Failed to delete pipeline' ,
278
- description : String ( err ) ,
279
- } ) ;
264
+ openDeleteModal ( r . displayName , ( ) => {
265
+ pipelinesApi
266
+ . deletePipeline ( r . id )
267
+ . then ( async ( ) => {
268
+ toast ( {
269
+ status : 'success' ,
270
+ duration : 4000 ,
271
+ isClosable : false ,
272
+ title : 'Pipeline deleted' ,
280
273
} ) ;
281
- } ) ;
282
- } }
283
- >
284
- < TrashIcon />
285
- </ Button >
286
- ) ,
287
- size : 1 ,
288
- } ,
289
- ] }
290
- emptyText = ""
291
- />
292
- ) }
293
- </ Section >
274
+ pipelinesApi . refreshPipelines ( true ) ;
275
+ } )
276
+ . catch ( ( err ) => {
277
+ toast ( {
278
+ status : 'error' ,
279
+ duration : null ,
280
+ isClosable : true ,
281
+ title : 'Failed to delete pipeline' ,
282
+ description : String ( err ) ,
283
+ } ) ;
284
+ } ) ;
285
+ } ) ;
286
+ } }
287
+ >
288
+ < TrashIcon />
289
+ </ Button >
290
+ ) ,
291
+ size : 1 ,
292
+ } ,
293
+ ] }
294
+ emptyText = ""
295
+ />
296
+ ) }
294
297
</ PageContent >
295
298
) ;
296
299
}
0 commit comments