From aac7e7d2bc9f395ca749f7be68fc245373baf85b Mon Sep 17 00:00:00 2001 From: Alessandro Detta <62752370+alessandrodetta@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:04:02 +0100 Subject: [PATCH] Fix resource status not enhanced for calls to /api/k8s/{kind}/get route (#517) --- 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) }