From 8a6178ddf30283cd87d3a3d2d667b776bdf80ff6 Mon Sep 17 00:00:00 2001 From: Alessandro Detta Date: Wed, 28 Feb 2024 14:15:05 +0100 Subject: [PATCH] Fix resource status not enhanced for calls to /api/k8s/{kind}/get route --- pkg/dashboard/handlers/kubeHandlers.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/dashboard/handlers/kubeHandlers.go b/pkg/dashboard/handlers/kubeHandlers.go index cc9966a7..dad3b056 100644 --- a/pkg/dashboard/handlers/kubeHandlers.go +++ b/pkg/dashboard/handlers/kubeHandlers.go @@ -1,6 +1,8 @@ package handlers import ( + "net/http" + "github.com/gin-gonic/gin" "github.com/joomcode/errorx" "github.com/komodorio/helm-dashboard/pkg/dashboard/utils" @@ -8,7 +10,6 @@ import ( "k8s.io/apimachinery/pkg/api/errors" v12 "k8s.io/apimachinery/pkg/apis/testapigroup/v1" "k8s.io/utils/strings/slices" - "net/http" ) const Unknown = "Unknown" @@ -56,7 +57,7 @@ func (h *KubeHandler) GetResourceInfo(c *gin.Context) { return } - EnhanceStatus(res, nil) + res.Status = *EnhanceStatus(res, nil) c.IndentedJSON(http.StatusOK, res) }