mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 01:11:49 +08:00

Rename externalPlugin to apiPlugin Rename bundle to app Move js, css, menuItem and staticRoot to be properties os App Add "app" field to panel, datasource and api plugin models. If populated then the plugin is only enabled if the specific app is enabled for the Org. If app is "", then the plugin is enabled for all orgs and can't be disabled.
35 lines
615 B
Go
35 lines
615 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type AppPlugin struct {
|
|
Id int64
|
|
Type string
|
|
OrgId int64
|
|
Enabled bool
|
|
JsonData map[string]interface{}
|
|
|
|
Created time.Time
|
|
Updated time.Time
|
|
}
|
|
|
|
// ----------------------
|
|
// COMMANDS
|
|
|
|
// Also acts as api DTO
|
|
type UpdateAppPluginCmd struct {
|
|
Type string `json:"type" binding:"Required"`
|
|
Enabled bool `json:"enabled"`
|
|
JsonData map[string]interface{} `json:"jsonData"`
|
|
|
|
Id int64 `json:"-"`
|
|
OrgId int64 `json:"-"`
|
|
}
|
|
|
|
// ---------------------
|
|
// QUERIES
|
|
type GetAppPluginsQuery struct {
|
|
OrgId int64
|
|
Result []*AppPlugin
|
|
}
|