-
Notifications
You must be signed in to change notification settings - Fork 1.5k
docs: update docs for Toolbox UI #1033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| --- | ||
| title: "Toolbox UI" | ||
| type: docs | ||
| weight: 1 | ||
| description: > | ||
| How to effectively use Toolbox UI. | ||
| --- | ||
|
|
||
| Toolbox UI is a built-in web interface that allows users to visually inspect and test out configured resources such as tools and toolsets. | ||
|
|
||
| ## Launching Toolbox UI | ||
|
|
||
| To launch Toolbox's interactive UI, use the `--ui` flag. | ||
|
|
||
| ```sh | ||
| ./toolbox --ui | ||
| ``` | ||
|
|
||
| Toolbox UI will be served from the same host and port as the Toolbox Server, with the `/ui` suffix. Once Toolbox | ||
| is launched, the following INFO log with Toolbox UI's url will be shown: | ||
|
|
||
| ```bash | ||
| INFO "Toolbox UI is up and running at: http://localhost:5000/ui" | ||
| ``` | ||
|
|
||
| ## Navigating the Tools Page | ||
|
|
||
| The tools page shows all tools loaded from your configuration file. This corresponds to the default toolset (represented by an empty string). Each tool's name on this page will exactly match its name in the configuration | ||
| file. | ||
|
|
||
| To view details for a specific tool, click on the tool name. The main content area will be populated | ||
| with the tool name, description, and available parameters. | ||
|
|
||
|  | ||
|
|
||
| ### Invoking a Tool | ||
|
|
||
| 1. Click on a Tool | ||
| 2. Enter appropriate parameters in each parameter field | ||
| 3. Click "Run Tool" | ||
| 4. Done! Your results will appear in the response field | ||
| 5. (Optional) Uncheck "Prettify JSON" to format the response as plain text | ||
|
|
||
|
AlexTalreja marked this conversation as resolved.
Outdated
|
||
|  | ||
|
|
||
| ### Optional Parameters | ||
|
|
||
| Toolbox allows users to add [optional parameters](../../resources/tools/#basic-parameters) with or without a default value. | ||
|
|
||
| To exclude a parameter, uncheck the box to the right of an associated parameter, and that parameter will not be | ||
| included in the request body. If the parameter is not sent, Toolbox will either use it as `nil` value or the `default` value, if configured. If the parameter is required, Toolbox will throw an error. | ||
|
|
||
| When the box is checked, parameter will be sent exactly as entered in the response field (e.g. empty string). | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| ### Editing Headers | ||
|
AlexTalreja marked this conversation as resolved.
|
||
|
|
||
| To edit headers, press the "Edit Headers" button to display the header modal. Within this modal, | ||
| users can make direct edits by typing into the header's text area. | ||
|
|
||
| Toolbox UI validates that the headers are in correct JSON format. Other header-related errors (e.g., | ||
| incorrect header names or values required by the tool) will be reported in the Response section | ||
| after running the tool. | ||
|
|
||
|  | ||
|
|
||
| #### Google OAuth | ||
|
|
||
| Currently, Toolbox supports Google OAuth 2.0 as an AuthService, which allows tools to utilize | ||
| authorized parameters. When a tool uses an authorized parameter, the parameter will be displayed | ||
| but not editable, as it will be populated from the authentication token. | ||
|
|
||
| To provide the token, add your Google OAuth ID Token to the request header using the "Edit Headers" | ||
| button and modal described above. The key should be the name of your AuthService as defined in | ||
| your tool configuration file, suffixed with `_token`. The value should be your ID token as a string. | ||
|
|
||
| 1. Select a tool that requires [authenticated parameters]() | ||
| 2. The auth parameter's text field is greyed out. This is because it cannot be entered manually and will | ||
| be parsed from the resolved auth token | ||
| 3. To update request headers with the token, select "Edit Headers" | ||
| 4. Checkout the dropdown "How to extract Google OAuth ID Token manually" for guidance on retrieving ID token | ||
| 5. Paste the request header | ||
| 6. Click "Save" | ||
| 7. Click "Run Tool" | ||
|
|
||
| ```json | ||
| { | ||
| "Content-Type": "application/json", | ||
| "my-google-auth_token": "YOUR_ID_TOKEN_HERE" | ||
| } | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
| ## Navigating the Toolsets Page | ||
|
|
||
| Through the toolsets page, users can search for a specific toolset to retrieve tools from. Simply | ||
| enter the toolset name in the search bar, and press "Enter" to retrieve the associated tools. | ||
|
|
||
| If the toolset name is not defined within the tools configuration file, an error message will be | ||
| displayed. | ||
|
|
||
|  | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.