Dashboards: Add apiVersion to dashboard table (#100845)

This commit is contained in:
Ryan McKinley
2025-03-04 07:47:45 +03:00
committed by GitHub
parent 8a341ebcce
commit c1b48cc488
84 changed files with 1074 additions and 2392 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"golang.org/x/net/context"
"k8s.io/apimachinery/pkg/runtime/schema"
dashboard "github.com/grafana/grafana/pkg/apis/dashboard"
dashboard "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1"
folders "github.com/grafana/grafana/pkg/apis/folder/v0alpha1"
)
+4 -3
View File
@@ -10,14 +10,15 @@ import (
"sync"
"time"
dashboardv0alpha1 "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1"
folderv0alpha1 "github.com/grafana/grafana/pkg/apis/folder/v0alpha1"
"github.com/hashicorp/golang-lru/v2/expirable"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"
"k8s.io/apimachinery/pkg/runtime/schema"
dashboardv0alpha1 "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1"
folderv0alpha1 "github.com/grafana/grafana/pkg/apis/folder/v0alpha1"
"github.com/grafana/authlib/types"
)
@@ -685,7 +686,7 @@ func AsResourceKey(ns string, t string) (*ResourceKey, error) {
return &ResourceKey{
Namespace: ns,
Group: dashboardv0alpha1.GROUP,
Resource: dashboardv0alpha1.RESOURCE,
Resource: dashboardv0alpha1.DASHBOARD_RESOURCE,
}, nil
// NOT really supported in the dashboard search UI, but useful for manual testing