From 51fb2e32f64ac79eec35a858f604ed646f2d1d84 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 5 Aug 2015 18:54:37 -0700 Subject: [PATCH] Fix link elements in restdoc headings Replace `Link :` prefixes in the restdoc headings with link icons next to the HTTP request. This fixes render issues with the titles and allows the TOC to still function correctly. Fixes gh-3689 --- .../src/main/asciidoc/autoconfig.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/beans.adoc | 4 ++-- .../src/main/asciidoc/configprops.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/dump.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/env.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/health.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/index.adoc | 9 ++++++--- spring-boot-actuator-docs/src/main/asciidoc/info.adoc | 4 ++-- .../src/main/asciidoc/mappings.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/metrics.adoc | 4 ++-- spring-boot-actuator-docs/src/main/asciidoc/trace.adoc | 4 ++-- 11 files changed, 26 insertions(+), 23 deletions(-) diff --git a/spring-boot-actuator-docs/src/main/asciidoc/autoconfig.adoc b/spring-boot-actuator-docs/src/main/asciidoc/autoconfig.adoc index 50e424ddd2b..f8b0bec3742 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/autoconfig.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/autoconfig.adoc @@ -1,4 +1,4 @@ -=== Link: autoconfig +=== /autoconfig This endpoint is a report on the Spring Boot auto-configuration process that happened when your application started up. It lists all the `@Conditional` annotations that were evaluated as the context started and in each case it gives an indication of if (and why) @@ -16,7 +16,7 @@ of overlap. Example curl request: include::{generated}/autoconfig/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../autoconfig[icon:external-link[role="silver"]]## include::{generated}/autoconfig/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/beans.adoc b/spring-boot-actuator-docs/src/main/asciidoc/beans.adoc index ff1cfa88f0f..3b74df2f496 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/beans.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/beans.adoc @@ -1,4 +1,4 @@ -=== Link: beans +=== /beans This endpoint is a report on the Spring Boot `ApplicationContext`. It lists the beans in the context and their dependencies, detailing the names and concrete classes of each bean. @@ -7,7 +7,7 @@ NOTE: Some beans are pure configuration (any class that is annotated `@Configura Example curl request: include::{generated}/beans/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../beans[icon:external-link[role="silver"]]## include::{generated}/beans/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/configprops.adoc b/spring-boot-actuator-docs/src/main/asciidoc/configprops.adoc index e5cc2714783..c68f452ecd1 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/configprops.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/configprops.adoc @@ -1,4 +1,4 @@ -=== Link: configprops +=== /configprops This endpoint is a report on the Spring Boot `@ConfigurationProperties` beans. Beans with this annotation are bound to the `Environment` on startup, so they reflect the externalised configuration of the application. Beans are listed by name. A bean that is @@ -9,7 +9,7 @@ specified in the `@ConfigurationProperties` annotation. Example curl request: include::{generated}/configprops/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../configprops[icon:external-link[role="silver"]]## include::{generated}/configprops/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/dump.adoc b/spring-boot-actuator-docs/src/main/asciidoc/dump.adoc index ae02b771d79..cf0a25f8ecc 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/dump.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/dump.adoc @@ -1,4 +1,4 @@ -=== Link: dump +=== /dump This endpoint is a thread dump: the result is a list of threads each with their name, monitor state and stack. It is the same information as you would get from `kill -3` of a running Java process. It can be very useful for detecting issues at runtime, especially @@ -10,7 +10,7 @@ NOTE: Some `SecurityManager` implementations might prevent this endpoint from wo Example curl request: include::{generated}/dump/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../dump[icon:external-link[role="silver"]]## include::{generated}/dump/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/env.adoc b/spring-boot-actuator-docs/src/main/asciidoc/env.adoc index 57e043925c0..bda5fcc3036 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/env.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/env.adoc @@ -1,4 +1,4 @@ -=== Link: env +=== /env This endpoint is a dump of the Spring `Environment`. It lists the active profiles and all the `PropertySources` in the `Environment` (the ones that are listed first take precedence when binding to `@ConfigurationProperties` or `@Value`). Normally you will see the Java @@ -8,7 +8,7 @@ any `.properties` or `.yml` files used to configure the application on start up. Example curl request: include::{generated}/env/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../env[icon:external-link[role="silver"]]## include::{generated}/env/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/health.adoc b/spring-boot-actuator-docs/src/main/asciidoc/health.adoc index a08d7ed82c4..9b68455d657 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/health.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/health.adoc @@ -1,4 +1,4 @@ -=== Link: health +=== /health This endpoint is an indication of the health of the application. It has an overall status ("UP", "DOWN" etc.), which is the only thing you see unless either you are authenticated or the endpoint is marked as `sensitive=false` (`endpoints.health.sensitive=false`). @@ -10,7 +10,7 @@ The HTTP code in the response reflects the status (e.g. "`UP`"=200, Example curl request: include::{generated}/health/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../health[icon:external-link[role="silver"]]## include::{generated}/health/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/index.adoc b/spring-boot-actuator-docs/src/main/asciidoc/index.adoc index 33a75bd7a82..47ba311fd46 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/index.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/index.adoc @@ -1,6 +1,9 @@ = Spring Boot Actuator Endpoints :toc: left :idprefix: spring_boot_actuator_ +:sectanchors: +:icons: font +:last-update-label!: Actuator endpoints allow you to monitor and interact with your application. Spring Boot includes a number of built-in endpoints and you can also add your own. For example the @@ -17,7 +20,7 @@ include::{generated}/endpoints.adoc[] -=== Link: logfile +=== /logfile This endpoint (if available) contains the plain text logfile configured by the user using `logging.file` or `logging.path` (by default logs are only emitted on stdout so one of these properties has to be set for this endpoint to be active). @@ -25,7 +28,7 @@ so one of these properties has to be set for this endpoint to be active). Example curl request: include::{generated}/logfile/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../logfile[icon:external-link[role="silver"]]## include::{generated}/logfile/http-request.adoc[] Example HTTP response: @@ -33,7 +36,7 @@ include::{generated}/logfile/http-response.adoc[] -=== Link: docs +=== /docs This endpoint (if available) contains HTML documemtation for the other endpoints. Its path can be "/docs" (if there is an existing home page) or "/" (otherwise, including if the HAL browser is not active). diff --git a/spring-boot-actuator-docs/src/main/asciidoc/info.adoc b/spring-boot-actuator-docs/src/main/asciidoc/info.adoc index 9a5a40ca82a..9c40cb28c49 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/info.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/info.adoc @@ -1,4 +1,4 @@ -=== Link: info +=== /info This endpoint is empty and marked as `sensitive=false` by default (so it is unauthenticated by default if Spring Security is in use). It reflects the content of the `info.*` properties in the `Environment`, as well as the properties in `git.properties` @@ -7,7 +7,7 @@ if such a file exists in the root of the classpath. Example curl request: include::{generated}/info/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../info[icon:external-link[role="silver"]]## include::{generated}/info/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/mappings.adoc b/spring-boot-actuator-docs/src/main/asciidoc/mappings.adoc index 1d38e0b4368..76f85c5b9a6 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/mappings.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/mappings.adoc @@ -1,11 +1,11 @@ -=== Link: mappings +=== /mappings This endpoint lists the Spring MVC request mappings, so users can see the handlers registered for requests by path, method, media type, etc. Example curl request: include::{generated}/mappings/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../mappings[icon:external-link[role="silver"]]## include::{generated}/mappings/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/metrics.adoc b/spring-boot-actuator-docs/src/main/asciidoc/metrics.adoc index b78b625f6e6..00fcba4751c 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/metrics.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/metrics.adoc @@ -1,4 +1,4 @@ -=== Link: metrics +=== /metrics This endpoint lists the public metrics exposed by the application. By default this includes all the counters in the `CounterService` and all the gauges in the `GaugeService`, plus a few JVM metrics about memory and uptime. Users can register @@ -8,7 +8,7 @@ counters and gauges. Example curl request: include::{generated}/metrics/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../metrics[icon:external-link[role="silver"]]## include::{generated}/metrics/http-request.adoc[] Example HTTP response: diff --git a/spring-boot-actuator-docs/src/main/asciidoc/trace.adoc b/spring-boot-actuator-docs/src/main/asciidoc/trace.adoc index 6e7da07c237..68293be079c 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/trace.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/trace.adoc @@ -1,4 +1,4 @@ -=== Link: trace +=== /trace This endpoint lists contents of the `TraceRepository` (which users can override by providing a bean of that type, or by injecting that bean and adding stuff to it). By default it stores the last 100 HTTP requests, including all headers in the request and @@ -7,7 +7,7 @@ response, and the path and HTTP status. Example curl request: include::{generated}/trace/curl-request.adoc[] -Example HTTP request: +Example HTTP request: [small]##link:../trace[icon:external-link[role="silver"]]## include::{generated}/trace/http-request.adoc[] Example HTTP response: