This repository was archived by the owner on Jul 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
plugins/plugin-kubectl/src Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,15 @@ export const formatTable = async <O extends KubeOptions>(
255
255
if ( drilldownVerb === 'get' ) {
256
256
const kind =
257
257
kindColumnIdx >= 0 ? row [ kindColumnIdx ] . value : nameSplit . length > 1 ? nameSplit [ 0 ] : entityTypeFromCommandLine
258
- return kind ? ' ' + kind : ''
258
+
259
+ // re: slashIdx, see https://github.com/kubernetes-sigs/kui/issues/9068
260
+ // e.g. `kubectl get pod/nginx` then user clicks to drill down on the row
261
+ const slashIdx = kind ? kind . indexOf ( '/' ) : - 1
262
+ if ( slashIdx >= 0 ) {
263
+ return ' ' + kind . slice ( 0 , slashIdx )
264
+ } else {
265
+ return kind ? ' ' + kind : ''
266
+ }
259
267
/* } else if (drilldownVerb === 'config') {
260
268
return ' use-context'; */
261
269
} else if ( drilldownVerb === 'krew' ) {
Original file line number Diff line number Diff line change @@ -275,6 +275,15 @@ commands.forEach(command => {
275
275
}
276
276
} )
277
277
278
+ // see https://github.com/kubernetes-sigs/kui/issues/9068
279
+ it ( `should list pods via '${ command } get pod/nginx' then click` , async ( ) => {
280
+ try {
281
+ await openSidecarByList ( this , `${ command } get pod/nginx ${ inNamespace } ` , 'nginx' )
282
+ } catch ( err ) {
283
+ return Common . oops ( this , true ) ( err )
284
+ }
285
+ } )
286
+
278
287
// it(`should click on containers sidecar tab and show containers table`, testContainersTab)
279
288
280
289
// it('should drill down to log when container is clicked', testLogsTabs)
You can’t perform that action at this time.
0 commit comments