plugins

package
v5.4.5+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PluginTypeApp        = "app"
	PluginTypeDatasource = "datasource"
	PluginTypePanel      = "panel"
	PluginTypeDashboard  = "dashboard"
)
View Source
var (
	DataSources  map[string]*DataSourcePlugin
	Panels       map[string]*PanelPlugin
	StaticRoutes []*PluginStaticRoute
	Apps         map[string]*AppPlugin
	Plugins      map[string]*PluginBase
	PluginTypes  map[string]interface{}
	Renderer     *RendererPlugin

	GrafanaLatestVersion string
	GrafanaHasUpdate     bool
)

Functions

func ComposePluginStartCommmand

func ComposePluginStartCommmand(executable string) string

func GetPluginMarkdown

func GetPluginMarkdown(pluginId string, name string) ([]byte, error)

func GetPluginSettings

func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)

func ImportDashboard

func ImportDashboard(cmd *ImportDashboardCommand) error

Types

type AppPlugin

type AppPlugin struct {
	FrontendPluginBase
	Routes []*AppPluginRoute `json:"routes"`

	FoundChildPlugins []*PluginInclude `json:"-"`
	Pinned            bool             `json:"-"`
}

func (*AppPlugin) Load

func (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error

type AppPluginCss

type AppPluginCss struct {
	Light string `json:"light"`
	Dark  string `json:"dark"`
}

type AppPluginRoute

type AppPluginRoute struct {
	Path         string                 `json:"path"`
	Method       string                 `json:"method"`
	ReqRole      models.RoleType        `json:"reqRole"`
	Url          string                 `json:"url"`
	Headers      []AppPluginRouteHeader `json:"headers"`
	TokenAuth    *JwtTokenAuth          `json:"tokenAuth"`
	JwtTokenAuth *JwtTokenAuth          `json:"jwtTokenAuth"`
}

type AppPluginRouteHeader

type AppPluginRouteHeader struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

type DashTemplateEvaluator

type DashTemplateEvaluator struct {
	// contains filtered or unexported fields
}

func (*DashTemplateEvaluator) Eval

func (this *DashTemplateEvaluator) Eval() (*simplejson.Json, error)

type DashboardInputMissingError

type DashboardInputMissingError struct {
	VariableName string
}

func (DashboardInputMissingError) Error

type DataSourcePlugin

type DataSourcePlugin struct {
	FrontendPluginBase
	Annotations  bool              `json:"annotations"`
	Metrics      bool              `json:"metrics"`
	Alerting     bool              `json:"alerting"`
	Explore      bool              `json:"explore"`
	Logs         bool              `json:"logs"`
	QueryOptions map[string]bool   `json:"queryOptions,omitempty"`
	BuiltIn      bool              `json:"builtIn,omitempty"`
	Mixed        bool              `json:"mixed,omitempty"`
	HasQueryHelp bool              `json:"hasQueryHelp,omitempty"`
	Routes       []*AppPluginRoute `json:"routes"`