Plugins: Remove pkg/services/org and pkg/services/pluginsintegration/pluginerrs dependencies (#115820)
* remove deps from pkg/plugins * fmt * lint fix
This commit is contained in:
+1
-1
@@ -13,6 +13,7 @@ require (
|
||||
github.com/grafana/grafana v0.0.0-00010101000000-000000000000
|
||||
github.com/grafana/grafana-app-sdk v0.48.7
|
||||
github.com/grafana/grafana-app-sdk/logging v0.48.7
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
k8s.io/apimachinery v0.34.3
|
||||
k8s.io/apiserver v0.34.3
|
||||
@@ -99,7 +100,6 @@ require (
|
||||
github.com/grafana/grafana-aws-sdk v1.3.0 // indirect
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.3.1 // indirect
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.284.0 // indirect
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0 // indirect
|
||||
github.com/grafana/grafana/pkg/apiserver v0.0.0 // indirect
|
||||
github.com/grafana/grafana/pkg/semconv v0.0.0-20250804150913-990f1c69ecc2 // indirect
|
||||
github.com/grafana/otel-profiling-go v0.5.1 // indirect
|
||||
|
||||
@@ -137,7 +137,7 @@ metaV0Alpha1: {
|
||||
type?: "dashboard" | "page" | "panel" | "datasource"
|
||||
name?: string
|
||||
component?: string
|
||||
role?: "Admin" | "Editor" | "Viewer"
|
||||
role?: "Admin" | "Editor" | "Viewer" | "None"
|
||||
action?: string
|
||||
path?: string
|
||||
addToNav?: bool
|
||||
|
||||
@@ -504,6 +504,7 @@ const (
|
||||
MetaIncludeRoleAdmin MetaIncludeRole = "Admin"
|
||||
MetaIncludeRoleEditor MetaIncludeRole = "Editor"
|
||||
MetaIncludeRoleViewer MetaIncludeRole = "Viewer"
|
||||
MetaIncludeRoleNone MetaIncludeRole = "None"
|
||||
)
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
pluginsv0alpha1 "github.com/grafana/grafana/apps/plugins/pkg/apis/plugins/v0alpha1"
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginstore"
|
||||
)
|
||||
@@ -253,12 +254,14 @@ func jsonDataToMetaJSONData(jsonData plugins.JSONData) pluginsv0alpha1.MetaJSOND
|
||||
if include.Role != "" {
|
||||
var role pluginsv0alpha1.MetaIncludeRole
|
||||
switch include.Role {
|
||||
case "Admin":
|
||||
case identity.RoleAdmin:
|
||||
role = pluginsv0alpha1.MetaIncludeRoleAdmin
|
||||
case "Editor":
|
||||
case identity.RoleEditor:
|
||||
role = pluginsv0alpha1.MetaIncludeRoleEditor
|
||||
case "Viewer":
|
||||
case identity.RoleViewer:
|
||||
role = pluginsv0alpha1.MetaIncludeRoleViewer
|
||||
case identity.RoleNone:
|
||||
role = pluginsv0alpha1.MetaIncludeRoleNone
|
||||
}
|
||||
v0Include.Role = &role
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/pipeline/termination"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/pipeline/validation"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/sources"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginerrs"
|
||||
"github.com/grafana/grafana/pkg/plugins/pluginerrs"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user