From a620ac831422a29b97aaf377bfc09163a2aeccf0 Mon Sep 17 00:00:00 2001 From: Geoffrey Grosenbach Date: Fri, 29 Jun 2018 18:27:48 -0700 Subject: [PATCH 1/2] Improve styling of discovery snippet Original `discovery` snippet had a `curl` command that mentioned multi-datacenter support. This removes part of the command that was incorrect. It adds styling for the `dc2` section of the JSON output that highlights the part of the query that relates to multiple data centers. --- website/source/discovery.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/source/discovery.html.erb b/website/source/discovery.html.erb index 55f77d494f..d144cef7c4 100644 --- a/website/source/discovery.html.erb +++ b/website/source/discovery.html.erb @@ -175,14 +175,13 @@ web-frontend.service.consul. 0 IN A 10.0.1.109
- $ curl http://localhost:8500/v1/catalog/datacenters -["dc1", "dc2"]$ curl http://localhost:8500/v1/catalog/nodes?dc=dc2 + $ curl http://localhost:8500/v1/catalog/nodes?dc=dc2 [ { "ID": "7081dcdf-fdc0-0432-f2e8-a357d36084e1", "Node": "10-0-1-109", "Address": "10.0.1.109", - "Datacenter": "dc2", + "Datacenter": "dc2", "TaggedAddresses": { "lan": "10.0.1.109", "wan": "10.0.1.109" From 5ea644c9e92da431f5e49b4e5bcd69eda26139ac Mon Sep 17 00:00:00 2001 From: Geoffrey Grosenbach Date: Fri, 29 Jun 2018 18:36:47 -0700 Subject: [PATCH 2/2] Corrects formatting of JSON in snippet The original snippet did not put the JSON output on its own line, which made it look like it was part of the previous or next `curl` command. This patch formats and highlights the command and output to appear as they would in the terminal while also highlighting the multi-datacenter elements of the output. --- website/source/discovery.html.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/website/source/discovery.html.erb b/website/source/discovery.html.erb index d144cef7c4..0755043d68 100644 --- a/website/source/discovery.html.erb +++ b/website/source/discovery.html.erb @@ -175,7 +175,13 @@ web-frontend.service.consul. 0 IN A 10.0.1.109
- $ curl http://localhost:8500/v1/catalog/nodes?dc=dc2 + +$ curl http://localhost:8500/v1/catalog/datacenters +[ + "dc1", + "dc2" +] +$ curl http://localhost:8500/v1/catalog/nodes?dc=dc2 [ { "ID": "7081dcdf-fdc0-0432-f2e8-a357d36084e1",