-
Notifications
You must be signed in to change notification settings - Fork 83
Integrate Bubbletea Pagination into get execution #473
Integrate Bubbletea Pagination into get execution #473
Conversation
Signed-off-by: zychen5186 <[email protected]> fix: catches existing commands in os.Args Signed-off-by: zychen5186 <[email protected]> fix: restore neccessary codes Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
fa5d50b
to
99c9b49
Compare
Signed-off-by: zychen5186 <[email protected]> change dot to arabic paging format Signed-off-by: zychen5186 <[email protected]> change var names Signed-off-by: zychen5186 <[email protected]> fix: lint Signed-off-by: zychen5186 <[email protected]>
99c9b49
to
44e2676
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]> change := to var Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
@katrogan @pmahindrakar-oss could you help review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for following the pattern
Signed-off-by: zychen5186 <[email protected]>
d9d6468
Can we restrict the flag to be used with only list api's and not for modification api's / on usage display that this mode is not supported for the command being used |
if config.GetConfig().Interactive { | ||
bubbletea.Paginator(executionColumns, getCallBack(ctx, cmdCtx)) | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we restrict the flag to be used with only list api's and not for modification api's / on usage display that this mode is not supported for the command being used
Currently, I'm planning to add pagination to only list API functions, and they will check if -i flag is specified, other non-list API functions will not be affected even if the -i flag is set. Do you think we should explicitly inform users that interactive CLI will not be triggered if they use -i on non-list commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we will keep adding interactive feature, I think it's fine if the flag is not yet implemented for some apis at this moment. But we should explicitly point out what apis support interactive mode when this is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i Agree since we will keep implementing new changes for this mode. We can probably mention the help string that this is only support for get calls and others is no-op. Can be a followup. but this change looks good
TL;DR
Use Bubbletea Pagination to show the get execution list instead of printing 100 rows each time
Type
Are all requirements met?
Complete description
User can use -i or --interactive to trigger Bubbletea interface, for example,
please refer to Bubbletea Github page to see what Bubbletea library offers.
Users can use the Bubbletea interface to check the entire list at once by going left and right, instead of showing 100 rows every command and need to specify which page they want to look at in the command line.
Tracking Issue
flyteorg/flyte#4440
Follow-up issue
Integrate this functionality into other flytectl get functions.