@@ -199,6 +199,11 @@ func (h *Handler) GetCustomBoard(ctx *gin.Context) {
199
199
SingleSource : len (sources ) == 1 ,
200
200
MultipleSource : len (sources ) > 1 ,
201
201
Namespaces : make ([]string , 0 ),
202
+ Display : config .Display ,
203
+ Severities : config .Filter .Severities ,
204
+ Status : config .Filter .Results ,
205
+ NamespaceKinds : config .Filter .NamespaceKinds ,
206
+ ClusterKinds : config .Filter .ClusterKinds ,
202
207
Charts : service.Charts {
203
208
ClusterScope : make (map [string ]map [string ]int ),
204
209
NamespaceScope : make (map [string ]* service.ChartVariants ),
@@ -210,7 +215,17 @@ func (h *Handler) GetCustomBoard(ctx *gin.Context) {
210
215
211
216
query ["namespaces" ] = namespaces
212
217
213
- dashboard , err := h .service .Dashboard (ctx , ctx .Param ("cluster" ), sources , namespaces , config .ClusterScope , query )
218
+ dashboard , err := h .service .Dashboard (ctx , service.DashboardOptions {
219
+ Cluster : ctx .Param ("cluster" ),
220
+ Sources : sources ,
221
+ Namespaces : namespaces ,
222
+ Display : config .Display ,
223
+ ClusterScope : config .ClusterScope ,
224
+ Status : config .Filter .Results ,
225
+ Severities : config .Filter .Severities ,
226
+ NamespaceKinds : config .Filter .NamespaceKinds ,
227
+ ClusterKinds : config .Filter .ClusterKinds ,
228
+ }, query )
214
229
if err != nil {
215
230
zap .L ().Error ("failed to generate dashboard" , zap .Error (err ))
216
231
ctx .AbortWithStatus (http .StatusInternalServerError )
@@ -322,7 +337,12 @@ func (h *Handler) Dashboard(ctx *gin.Context) {
322
337
return
323
338
}
324
339
325
- dashboard , err := h .service .Dashboard (ctx , ctx .Param ("cluster" ), sources , namespaces , true , ctx .Request .URL .Query ())
340
+ dashboard , err := h .service .Dashboard (ctx , service.DashboardOptions {
341
+ Cluster : ctx .Param ("cluster" ),
342
+ Sources : sources ,
343
+ Namespaces : namespaces ,
344
+ ClusterScope : true ,
345
+ }, ctx .Request .URL .Query ())
326
346
if err != nil {
327
347
zap .L ().Error ("failed to generate dashboard" , zap .Error (err ))
328
348
ctx .AbortWithStatus (http .StatusInternalServerError )
0 commit comments