File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
extensions/smallrye-health/deployment/src/main/java/io/quarkus/smallrye/health/deployment Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ package io .quarkus .smallrye .health .deployment ;
2+
3+ import io .quarkus .deployment .IsDevelopment ;
4+ import io .quarkus .deployment .annotations .BuildStep ;
5+ import io .quarkus .deployment .annotations .ExecutionTime ;
6+ import io .quarkus .deployment .annotations .Record ;
7+ import io .quarkus .devui .spi .page .CardPageBuildItem ;
8+ import io .quarkus .devui .spi .page .Page ;
9+ import io .quarkus .smallrye .health .runtime .SmallRyeHealthRecorder ;
10+ import io .quarkus .vertx .http .deployment .NonApplicationRootPathBuildItem ;
11+
12+ /**
13+ * This processor is responsible for the dev ui widget.
14+ */
15+ public class SmallRyeHealthDevUiProcessor {
16+
17+ @ BuildStep (onlyIf = IsDevelopment .class )
18+ @ Record (ExecutionTime .STATIC_INIT )
19+ CardPageBuildItem create (NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem ,
20+ SmallRyeHealthConfig config ,
21+ SmallRyeHealthRecorder recorder ) {
22+ CardPageBuildItem pageBuildItem = new CardPageBuildItem ("Smallrye Health" );
23+
24+ pageBuildItem .addPage (Page .externalPageBuilder ("Health" )
25+ .icon ("font-awesome-solid:heart-circle-bolt" )
26+ .url (nonApplicationRootPathBuildItem .resolvePath (config .rootPath ))
27+ .isJsonContent ());
28+
29+ pageBuildItem .addPage (Page .externalPageBuilder ("Health UI" )
30+ .icon ("font-awesome-solid:stethoscope" )
31+ .url (nonApplicationRootPathBuildItem .resolvePath (config .ui .rootPath ))
32+ .isHtmlContent ());
33+
34+ return pageBuildItem ;
35+ }
36+
37+ }
You can’t perform that action at this time.
0 commit comments