K8s: Dashboards: Set v1alpha1 as priority (#102729)

This commit is contained in:
Stephanie Hingtgen
2025-03-25 10:32:49 -06:00
committed by GitHub
parent 0f6aff2057
commit 7c2890384a
25 changed files with 87 additions and 87 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ import (
"strings"
claims "github.com/grafana/authlib/types"
dashboardsV0 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1"
dashboardsV1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1"
"github.com/grafana/grafana/pkg/api/apierrors"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/api/response"
@@ -168,7 +168,7 @@ func (hs *HTTPServer) GetDashboard(c *contextmodel.ReqContext) response.Response
creator = hs.getIdentityName(ctx, dash.OrgID, dash.CreatedBy)
}
annotationPermissions := &dashboardsV0.AnnotationPermission{}
annotationPermissions := &dashboardsV1.AnnotationPermission{}
if hs.Features.IsEnabled(ctx, featuremgmt.FlagAnnotationPermissionUpdate) {
hs.getAnnotationPermissionsByScope(c, &annotationPermissions.Dashboard, dashboards.ScopeDashboardsProvider.GetResourceScopeUID(dash.UID))
} else {
@@ -276,7 +276,7 @@ func (hs *HTTPServer) GetDashboard(c *contextmodel.ReqContext) response.Response
return response.JSON(http.StatusOK, dto)
}
func (hs *HTTPServer) getAnnotationPermissionsByScope(c *contextmodel.ReqContext, actions *dashboardsV0.AnnotationActions, scope string) {
func (hs *HTTPServer) getAnnotationPermissionsByScope(c *contextmodel.ReqContext, actions *dashboardsV1.AnnotationActions, scope string) {
ctx, span := tracer.Start(c.Req.Context(), "api.getAnnotationPermissionsByScope")
defer span.End()
c.Req = c.Req.WithContext(ctx)
+2 -2
View File
@@ -3,7 +3,7 @@ package dtos
import (
"time"
dashboardsV0 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1"
dashboardsV1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1"
"github.com/grafana/grafana/pkg/components/simplejson"
)
@@ -34,7 +34,7 @@ type DashboardMeta struct {
FolderUrl string `json:"folderUrl"`
Provisioned bool `json:"provisioned"`
ProvisionedExternalId string `json:"provisionedExternalId"`
AnnotationsPermissions *dashboardsV0.AnnotationPermission `json:"annotationsPermissions"`
AnnotationsPermissions *dashboardsV1.AnnotationPermission `json:"annotationsPermissions"`
PublicDashboardEnabled bool `json:"publicDashboardEnabled,omitempty"`
}