@@ -50,21 +50,34 @@ include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/index.js[tags=cust
50
50
<1> Name of the view and the route.
51
51
<2> Path in Vue router.
52
52
<3> The imported custom component, which will be rendered on the route.
53
- <4> The handle for the custom view to be shown in the top navigation bar.
54
- <5> Order for the view.
55
- <6> Using `i18n.mergeLocaleMessage` allows to add custom translations.
53
+ <4> An optional group name that allows to bind views to a logical group (defaults to "none")
54
+ <5> The handle for the custom view to be shown in the top navigation bar.
55
+ <6> Order for the view.
56
+ <7> Using `i18n.mergeLocaleMessage` allows to add custom translations.
56
57
57
58
Views in the top navigation bar are sorted by ascending order.
58
59
59
60
If new top level routes are added to the frontend, they also must be known to the backend.
60
61
Add a `/META-INF/spring-boot-admin-server-ui/extensions/{name}/routes.txt` with all your new toplevel routes (one route per line).
61
62
63
+ Groups are used in instance sidebar to aggregate multiple views into a collapsible menu entry showing the group's name.
64
+ When a group contains just a single element, the label of the view is shown instead of the group's name.
65
+
66
+ ==== Override/Set custom group icons ====
67
+ In order to override or set icons for (custom) groups you can use the `SBA.viewRegistry.setGroupIcon` function as follows:
68
+
69
+ [source,javascript]
70
+ ----
71
+ include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/index.js[tags=customization-ui-groups]
72
+ ----
73
+ <1> Name of the group to set icon for
74
+ <2> Arbitrary HTML code (e.g. SVG image) that is inserted and parsed as icon.
75
+
62
76
[[customizing-custom-views-top-level]]
63
77
==== Adding a Top-Level View ====
64
78
65
79
Here is a simple top level view just listing all registered applications:
66
80
[source,html]
67
-
68
81
----
69
82
include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/custom.vue[lines=17..-1]
70
83
----
@@ -109,8 +122,8 @@ include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/custom-endpoint.vu
109
122
<2> Each instance has a preconfigured https://github.com/axios/axios[axios] instance to access the endpoints with the correct path and headers.
110
123
111
124
Registering the instance view works like for the top-level view with some additional properties:
112
- [source,javascript]
113
125
126
+ [source,javascript]
114
127
----
115
128
include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/index.js[tags=customization-ui-endpoint]
116
129
----
0 commit comments