martin-g commented on code in PR #1593:
URL: 
https://github.com/apache/datafusion-ballista/pull/1593#discussion_r3204319688


##########
docs/source/user-guide/cli.md:
##########
@@ -130,3 +137,91 @@ Available commands inside Ballista CLI are:
 ```bash
 > \h function_table
 ```
+
+## Terminal User Interface (TUI)
+
+When Ballista CLI is built with the `tui` feature, you can launch an 
interactive terminal user interface
+that provides a visual overview of the Ballista cluster.
+
+### Launching the TUI
+
+```bash
+ballista-cli --tui
+```

Review Comment:
   There is also a second way to start the TUI:
   1) `ballista-cli` - to start the CLI
   2) in the CLI execute the `\tui` command



##########
docs/source/user-guide/cli.md:
##########
@@ -130,3 +137,91 @@ Available commands inside Ballista CLI are:
 ```bash
 > \h function_table
 ```
+
+## Terminal User Interface (TUI)
+
+When Ballista CLI is built with the `tui` feature, you can launch an 
interactive terminal user interface
+that provides a visual overview of the Ballista cluster.
+
+### Launching the TUI
+
+```bash
+ballista-cli --tui
+```
+
+### TUI Features
+
+The TUI provides the following views:
+
+- **Executors**: Lists all registered executors with their host, port, CPU 
cores, memory, and current job count. Supports sorting by any column.
+- **Jobs**: Displays active and completed jobs with their status, start time, 
and duration. Supports sorting, job search (`/`), and shows job details on 
selection.
+- **Job Stages**: When viewing a job, press `Enter` to see its execution 
stages with input/output rows, elapsed compute, and task percentiles.
+- **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see 
individual task details or `p` to view the stage execution plan.

Review Comment:
   ```suggestion
   - **Stage Tasks & Plan**: Within the Job Stages view, press `Enter` to see 
individual task details or `p` to view the stage execution plan.
   ```



##########
docs/source/user-guide/cli.md:
##########
@@ -130,3 +137,91 @@ Available commands inside Ballista CLI are:
 ```bash
 > \h function_table
 ```
+
+## Terminal User Interface (TUI)
+
+When Ballista CLI is built with the `tui` feature, you can launch an 
interactive terminal user interface
+that provides a visual overview of the Ballista cluster.
+
+### Launching the TUI
+
+```bash
+ballista-cli --tui
+```
+
+### TUI Features
+
+The TUI provides the following views:
+
+- **Executors**: Lists all registered executors with their host, port, CPU 
cores, memory, and current job count. Supports sorting by any column.
+- **Jobs**: Displays active and completed jobs with their status, start time, 
and duration. Supports sorting, job search (`/`), and shows job details on 
selection.
+- **Job Stages**: When viewing a job, press `Enter` to see its execution 
stages with input/output rows, elapsed compute, and task percentiles.
+- **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see 
individual task details or `p` to view the stage execution plan.
+- **Job Plans**: For completed jobs, press `p` to view the Stage, Physical, or 
Logical query plans.
+- **Job Stages Graph**: Press `g` to visualize the job's stage execution graph.
+- **Metrics**: Fetches and displays Prometheus metrics from the scheduler, 
including query execution statistics.
+- **Scheduler Info**: Shows the current scheduler state and configuration.
+
+### TUI Navigation
+
+#### Global Keybindings
+
+| Key         | Action                                  |
+| ----------- | --------------------------------------- |
+| `j`         | Switch to Jobs view                     |
+| `e`         | Switch to Executors view                |
+| `m`         | Switch to Metrics view                  |
+| `i`         | Show Scheduler Info popup               |
+| `?` / `h`   | Show help overlay with all key bindings |
+| `q` / `Esc` | Quit the TUI                            |
+
+#### Jobs View Keybindings
+
+| Key             | Action                                                     
                             |
+| --------------- | 
---------------------------------------------------------------------------------------
 |
+| `↑` / `↓`       | Navigate rows in the jobs table                            
                             |
+| `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, 
third press removes sorting) |
+| `/`             | Search jobs                                                
                             |
+| `Enter`         | Open Job Stages popup for the selected job                 
                             |
+| `g`             | View job stages graph (DOT visualization)                  
                             |

Review Comment:
   ```suggestion
   | `g`             | View job stages graph (DOT visualization) for completed 
jobs                                           |
   ```



##########
docs/source/user-guide/cli.md:
##########
@@ -130,3 +137,91 @@ Available commands inside Ballista CLI are:
 ```bash
 > \h function_table
 ```
+
+## Terminal User Interface (TUI)
+
+When Ballista CLI is built with the `tui` feature, you can launch an 
interactive terminal user interface
+that provides a visual overview of the Ballista cluster.
+
+### Launching the TUI
+
+```bash
+ballista-cli --tui
+```
+
+### TUI Features
+
+The TUI provides the following views:
+
+- **Executors**: Lists all registered executors with their host, port, CPU 
cores, memory, and current job count. Supports sorting by any column.
+- **Jobs**: Displays active and completed jobs with their status, start time, 
and duration. Supports sorting, job search (`/`), and shows job details on 
selection.
+- **Job Stages**: When viewing a job, press `Enter` to see its execution 
stages with input/output rows, elapsed compute, and task percentiles.
+- **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see 
individual task details or `p` to view the stage execution plan.
+- **Job Plans**: For completed jobs, press `p` to view the Stage, Physical, or 
Logical query plans.
+- **Job Stages Graph**: Press `g` to visualize the job's stage execution graph.
+- **Metrics**: Fetches and displays Prometheus metrics from the scheduler, 
including query execution statistics.
+- **Scheduler Info**: Shows the current scheduler state and configuration.
+
+### TUI Navigation
+
+#### Global Keybindings
+
+| Key         | Action                                  |
+| ----------- | --------------------------------------- |
+| `j`         | Switch to Jobs view                     |
+| `e`         | Switch to Executors view                |
+| `m`         | Switch to Metrics view                  |
+| `i`         | Show Scheduler Info popup               |
+| `?` / `h`   | Show help overlay with all key bindings |
+| `q` / `Esc` | Quit the TUI                            |
+
+#### Jobs View Keybindings
+
+| Key             | Action                                                     
                             |
+| --------------- | 
---------------------------------------------------------------------------------------
 |
+| `↑` / `↓`       | Navigate rows in the jobs table                            
                             |
+| `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, 
third press removes sorting) |

Review Comment:
   ```suggestion
   | `1` / `2` / `3` / ... | Sort by first/second/third/... column (press again 
to reverse, third press removes sorting) |
   ```



##########
docs/source/user-guide/cli.md:
##########
@@ -130,3 +137,91 @@ Available commands inside Ballista CLI are:
 ```bash
 > \h function_table
 ```
+
+## Terminal User Interface (TUI)
+
+When Ballista CLI is built with the `tui` feature, you can launch an 
interactive terminal user interface
+that provides a visual overview of the Ballista cluster.
+
+### Launching the TUI
+
+```bash
+ballista-cli --tui
+```
+
+### TUI Features
+
+The TUI provides the following views:
+
+- **Executors**: Lists all registered executors with their host, port, CPU 
cores, memory, and current job count. Supports sorting by any column.
+- **Jobs**: Displays active and completed jobs with their status, start time, 
and duration. Supports sorting, job search (`/`), and shows job details on 
selection.
+- **Job Stages**: When viewing a job, press `Enter` to see its execution 
stages with input/output rows, elapsed compute, and task percentiles.
+- **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see 
individual task details or `p` to view the stage execution plan.
+- **Job Plans**: For completed jobs, press `p` to view the Stage, Physical, or 
Logical query plans.
+- **Job Stages Graph**: Press `g` to visualize the job's stage execution graph.
+- **Metrics**: Fetches and displays Prometheus metrics from the scheduler, 
including query execution statistics.
+- **Scheduler Info**: Shows the current scheduler state and configuration.
+
+### TUI Navigation
+
+#### Global Keybindings
+
+| Key         | Action                                  |
+| ----------- | --------------------------------------- |
+| `j`         | Switch to Jobs view                     |
+| `e`         | Switch to Executors view                |
+| `m`         | Switch to Metrics view                  |
+| `i`         | Show Scheduler Info popup               |
+| `?` / `h`   | Show help overlay with all key bindings |
+| `q` / `Esc` | Quit the TUI                            |
+
+#### Jobs View Keybindings
+
+| Key             | Action                                                     
                             |
+| --------------- | 
---------------------------------------------------------------------------------------
 |
+| `↑` / `↓`       | Navigate rows in the jobs table                            
                             |
+| `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, 
third press removes sorting) |
+| `/`             | Search jobs                                                
                             |
+| `Enter`         | Open Job Stages popup for the selected job                 
                             |
+| `g`             | View job stages graph (DOT visualization)                  
                             |
+| `c`             | Cancel the selected job (if cancelable)                    
                             |
+| `p`             | View job plans (Stage / Physical / Logical) for completed 
jobs                          |
+
+#### Job Stages Popup Keybindings
+
+| Key       | Action                                     |
+| --------- | ------------------------------------------ |
+| `↑` / `↓` | Navigate stages                            |
+| `Enter`   | View tasks for the selected stage          |
+| `p`       | View execution plan for the selected stage |
+| `Esc`     | Close popup                                |
+
+#### Stage Tasks / Plan Popup Keybindings
+
+| Key   | Action      |
+| ----- | ----------- |
+| `Esc` | Close popup |

Review Comment:
   ```suggestion
   | `Esc` | Return to Job Stages popup |
   ```
   I know that the context-aware keybindings in the footer say "Close popup" 
but here we have more room, so we can use `Return to Job Stages popup`, since 
it is more correct.



##########
docs/source/user-guide/cli.md:
##########
@@ -130,3 +137,91 @@ Available commands inside Ballista CLI are:
 ```bash
 > \h function_table
 ```
+
+## Terminal User Interface (TUI)
+
+When Ballista CLI is built with the `tui` feature, you can launch an 
interactive terminal user interface
+that provides a visual overview of the Ballista cluster.
+
+### Launching the TUI
+
+```bash
+ballista-cli --tui
+```
+
+### TUI Features
+
+The TUI provides the following views:
+
+- **Executors**: Lists all registered executors with their host, port, CPU 
cores, memory, and current job count. Supports sorting by any column.
+- **Jobs**: Displays active and completed jobs with their status, start time, 
and duration. Supports sorting, job search (`/`), and shows job details on 
selection.
+- **Job Stages**: When viewing a job, press `Enter` to see its execution 
stages with input/output rows, elapsed compute, and task percentiles.
+- **Stage Tasks & Plan**: Within the Job Stages view, press `t` to see 
individual task details or `p` to view the stage execution plan.
+- **Job Plans**: For completed jobs, press `p` to view the Stage, Physical, or 
Logical query plans.
+- **Job Stages Graph**: Press `g` to visualize the job's stage execution graph.
+- **Metrics**: Fetches and displays Prometheus metrics from the scheduler, 
including query execution statistics.
+- **Scheduler Info**: Shows the current scheduler state and configuration.
+
+### TUI Navigation
+
+#### Global Keybindings
+
+| Key         | Action                                  |
+| ----------- | --------------------------------------- |
+| `j`         | Switch to Jobs view                     |
+| `e`         | Switch to Executors view                |
+| `m`         | Switch to Metrics view                  |
+| `i`         | Show Scheduler Info popup               |
+| `?` / `h`   | Show help overlay with all key bindings |
+| `q` / `Esc` | Quit the TUI                            |
+
+#### Jobs View Keybindings
+
+| Key             | Action                                                     
                             |
+| --------------- | 
---------------------------------------------------------------------------------------
 |
+| `↑` / `↓`       | Navigate rows in the jobs table                            
                             |
+| `1` / `2` / `3` | Sort by first/second/third column (press again to reverse, 
third press removes sorting) |
+| `/`             | Search jobs                                                
                             |
+| `Enter`         | Open Job Stages popup for the selected job                 
                             |
+| `g`             | View job stages graph (DOT visualization)                  
                             |
+| `c`             | Cancel the selected job (if cancelable)                    
                             |
+| `p`             | View job plans (Stage / Physical / Logical) for completed 
jobs                          |
+
+#### Job Stages Popup Keybindings
+
+| Key       | Action                                     |
+| --------- | ------------------------------------------ |
+| `↑` / `↓` | Navigate stages                            |
+| `Enter`   | View tasks for the selected stage          |
+| `p`       | View execution plan for the selected stage |
+| `Esc`     | Close popup                                |
+
+#### Stage Tasks / Plan Popup Keybindings
+
+| Key   | Action      |
+| ----- | ----------- |
+| `Esc` | Close popup |
+
+#### Job Plans Popup Keybindings
+
+| Key       | Action             |
+| --------- | ------------------ |
+| `s`       | Show Stage plan    |
+| `p`       | Show Physical plan |
+| `l`       | Show Logical plan  |
+| `↑` / `↓` | Scroll up/down     |
+| `Esc`     | Close popup        |
+

Review Comment:
   ```suggestion
   
   #### Job Stages Graph Popup Keybindings
   
   |    Key    |    Action      |
   | --------- | -------------- |
   | `↑` / `↓` | Scroll up/down |
   |   `Esc`   | Close popup    |
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to