From 580e1685e56d635f38c0758125bc5f915d14b778 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 11 Oct 2017 18:24:58 -0700 Subject: [PATCH 1/2] UI command documentation --- command/ui.go | 2 +- website/source/docs/commands/ui.html.md.erb | 51 +++++++++++++++++++++ website/source/layouts/docs.erb | 3 ++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 website/source/docs/commands/ui.html.md.erb diff --git a/command/ui.go b/command/ui.go index c343677ba..d11e75d71 100644 --- a/command/ui.go +++ b/command/ui.go @@ -24,7 +24,7 @@ func (c *UiCommand) Help() string { Usage: nomad ui [options] Open the Nomad Web UI in the default browser. An optional identifier may be -provided in which case the UI will be opened to view the details for that +provided, in which case the UI will be opened to view the details for that object. Supported identifiers are jobs, allocations and nodes. General Options: diff --git a/website/source/docs/commands/ui.html.md.erb b/website/source/docs/commands/ui.html.md.erb new file mode 100644 index 000000000..2cd534171 --- /dev/null +++ b/website/source/docs/commands/ui.html.md.erb @@ -0,0 +1,51 @@ +--- +layout: "docs" +page_title: "Commands: ui" +sidebar_current: "docs-commands-ui" +description: > + The ui command is used to open the Nomad Web UI. +--- + +# Command: ui + +The `ui` command is used to open the Nomad Web UI. + +## Usage + +``` +nomad ui [options] +``` + +The `ui` command can be called with no arguments, in which case the UI homepage +will be opened in the default browser. + +An identifier may be provided, in which case the UI will be opened to view the +details for that object. Supported identifiers are jobs, allocations and nodes. + + +## General Options + +<%= partial "docs/commands/_general_options" %> + +## Examples + +Open the UI homepage: + +``` +$ nomad ui +Opening URL "http://127.0.0.1:4646" +``` + +Open the UI directly to look at a job: + +``` +$ nomad ui redis-job +http://127.0.0.1:4646/ui/jobs/example +``` + +Open the UI directly to look at an allocation: + +``` +$ nomad ui d4005969 +Opening URL "http://127.0.0.1:4646/ui/allocations/d4005969-b16f-10eb-4fe1-a5374986083d" +``` diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 16560fbd6..dd9b0ba08 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -332,6 +332,9 @@ > stop + > + ui + > validate From 9ae009eadb7ac54a5bd07e7c47e6d8bb40d88e28 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 12 Oct 2017 09:42:11 -0700 Subject: [PATCH 2/2] Update ui.html.md.erb --- website/source/docs/commands/ui.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/commands/ui.html.md.erb b/website/source/docs/commands/ui.html.md.erb index 2cd534171..b63215dd2 100644 --- a/website/source/docs/commands/ui.html.md.erb +++ b/website/source/docs/commands/ui.html.md.erb @@ -40,7 +40,7 @@ Open the UI directly to look at a job: ``` $ nomad ui redis-job -http://127.0.0.1:4646/ui/jobs/example +http://127.0.0.1:4646/ui/jobs/redis-job ``` Open the UI directly to look at an allocation: