reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 46 forks source link

cli: show interactive session information #262

Closed diegodelemos closed 5 years ago

diegodelemos commented 5 years ago

Currently we allow to open interactive sessions but users will forget they had them open, so we should display this information. It could look as follows:

$ reana-client workflows
NAME       RUN_NUMBER   CREATED               STATUS     INTERACTIVE
workflow   1            2019-03-04T16:11:11   created    *

workflow   2            2019-03-04T18:30:02   running    -
$ reana-client workflows -v
NAME       RUN_NUMBER   CREATED               STATUS    ID                                     USER                                   SIZE       INTERACTIVE_SESSION
workflow   1            2019-03-04T16:11:11   created   23e2fd73-bf16-4aaf-af37-ca74707c4b18   00000000-0000-0000-0000-000000000000   0          http://192.168.99.100:32107/23e2fd73-bf16-4aaf-af37-ca74707c4b18?token=<I_dream_I_am_a_token>
$ reana-client status -w workflow.1
NAME       RUN_NUMBER   CREATED               STATUS    PROGRESS    INTERACTIVE
workflow   1            2019-03-04T16:11:11   created   -/-         http://192.168.99.100:32107/23e2fd73-bf16-4aaf-af37-ca74707c4b18?token=<I_dream_I_am_a_token>

cc @tiborsimko

tiborsimko commented 5 years ago

Some raw musings:

The choice is basically:

  1. Expand the above table in the horizontal direction, as it were, and add new columns matching session types:
$ reana-client workflows
NAME       RUN_NUMBER   CREATED               STATUS     JUPYTER
workflow   1            2019-03-04T16:11:11   created    http://example.org/workflows/1/jupyter?foo=bar
  1. Expand the above table in the vertical direction, as it were, and introduce new rows or separate the display for batch workflows and interactive sessions:
$ reana-client workflows
NAME       RUN_NUMBER   CREATED               STATUS     URI
workflow   1            2019-03-04T16:11:11   created    http://example.org/workflows/1/dashboard
workflow   2            2019-03-04T16:20:11   created    http://example.org/workflows/2/dashboard

$ reana-client sessions
NAME       RUN_NUMBER   CREATED               SESSION     URI
workflow   1            2019-03-04T16:11:11   jupyter     http://example.org/workflows/1/jupyter?foo=bar
workflow   1            2019-03-04T17:11:11   shell       http://example.org/workflows/1/shell

I'd be leaning towards something like the later, as it is more expandable.

P.S. Note that the future Web UI would also list any open interactive session for the currently display workflow, which would be probably more natural interface than CLI for those...