WebCLI

Coming Soon
Combine the full power of the Op CLI with the convenience of Shoreline's web UI.

The WebCLI allows you to execute Op commands within your browser, without setting up and authenticating using the local CLI. Notebooks contain a series of interactive WebCLI cells, similar to the Jupyter project.

Getting Started

  1. Navigate to your Shoreline cluster's UI dashboard.
  2. Click the H O M E navigation dropdown at the top-left.
  3. Select Configuration from the dropdown.
  4. Under Tools, click the Notebooks card:
NotebooksManage CLI in browser

Create a Notebook

Create a new Notebook by clicking the button at the bottom-left of the Notebooks panel. This creates a new Notebook with a default name.

Rename a Notebook

  1. Click on the current Notebook's name in the Notebooks panel to display an editing cursor.

  2. Modify the current name and press the Enter key.

    my-new-notebook
    The new Notebook name is now saved.

Use a Notebook

  1. Select the desired Notebook in the Notebooks panel on the left.

    new-notebook
    The right-side panel displays all cells for the selected Notebook.
    cell
  2. Click inside the Op cell, which emulates a normal Op CLI terminal window.

  3. Type a valid Op command and press the Enter key to execute.

    For example, below we're executing a hosts Resource query:

    hosts-example

    The cell output displays the results of the executed Op command. In this example, we get the list of host Resources, similar to the output when issuing the same command in the CLI.

Linux Commands

Executing a Linux Op command returns and displays detailed information including the targeted Resources, the exit status, and any stdout or stderr content.

For example, here we're listing the home directory contents of the first app="shoreline" container Resource:

op>
containers | app="shoreline" | limit=1 | `ls -l`

The resulting WebCLI output shows the execution status and the expected Linux command output:

Execution completed in 621 ms at 2021-08-25 20:14:04.230Z

CONTAINER alpha-cust.shoreline-w5979.shoreline
STATUS: 0
STDOUT
total 0
drwxrwxrwx 3 root root 86 Aug 25 17:01 backgroundjob
drwxr-xr-x 2 root root 110 Aug 19 19:34 bin
drwxr-x--x 3 root root 18 Aug 25 17:02 databases
drwxr-xr-x 8 root root 88 Aug 19 19:34 erts-11.2.2.4
drwxr-xr-x 2 root root 49 Aug 19 19:34 etc
drwxr-xr-x 1 root root 55 Aug 19 19:34 lib
drwxr-xr-x 2 root root 6 Aug 25 20:13 metric_cache
drwxr-xr-x 3 root root 57 Aug 19 19:34 releases
drwxr-xr-x 1 root root 273 Aug 19 19:41 scripts
drwxr-xr-x 2 root root 92 Aug 25 17:02 secrets
drwxr-xr-x 3 root root 72 Aug 25 17:02 var

Metric Graphs

The WebCLI outputs Op command results in multiple formats, depending on the original command.

For example, executing a Metric query such as hosts | cpu_usage displays all resulting Metric graphs, identical to those found in the Monitoring UI:

hosts-cpu-usage-example

Switch Modes

Quickly toggle between the default graph result view and the data table view.

  • Graph View: Click the button at the top-right.
  • Data Table View: Click the button at the top-right.

Column Count

You can adjust the number of displayed graph columns.

  1. Click the 1 column button at the top-right of the results panel.
  2. Select the desired column count: 1 column2 columns3 columns

Download Results

Click the button at the top-right of the WebCLI results panel to download the results of an Op command.

The full CSV will automatically download within your browser.

Save a Notebook

The Notebook name at the top has an asterisk whenever there are unsaved changes to the Notebook. To save your changes click the Update button at the bottom-right of the Notebook panel.

Duplicate a Notebook

Create a new copy of an existing Notebook by clicking the Save as new button at the bottom-right of the Notebook panel.

Delete a Notebook

  1. Select the desired Notebook in the Notebooks panel on the left.
  2. Click the button at the bottom-left of the Notebooks panel.
  3. Click the Confirm button to complete deletion.

Manage Notebook Cells

Click the icon on the right, then select the desired option:

  • Insert cell above Adds a new cell above the current cell.
  • Insert cell below Adds a new cell below the current cell.
  • Insert cell above Removes the current cell.

Notebook Utilities

There are a handful of utility actions you can issue within the currently selected Notebook.

Run all cells

In some circumstances you may want to execute all cells

  1. Click the Actions button at the top-right of the active Notebook panel.

  2. Select Run all cells to execute the Op commands within all cells of the current Notebook.

Download a Notebook

You can download an entire Notebook in JSON format.

  1. Click the Actions button at the top-right of the active Notebook panel.

  2. Select Download Notebook to download the full configuration of the current Notebook to a local JSON file.

    You can freely modify, share, and upload this Notebook at any time.

Upload a Notebook

You can upload a previously-downloaded Notebook configuration to save it to your private Notebook collection.

  1. Click the Actions button at the top-right of the active Notebook panel.

  2. Select Upload Notebook.

  3. In the file navigator, select the Notebook configuration JSON file and click Open.

Permissions

Notebooks are private and cannot be viewed or edited by any other user. However, you can download a Notebook and share that file with others.

Additionally, your own Access Control permissions determine what you can and cannot execute.