mirror of https://github.com/grafana/grafana
commit
11e35f7b68
@ -1,4 +1,10 @@ |
|||||||
graphite: |
graphite: |
||||||
build: blocks/graphite |
build: blocks/graphite |
||||||
ports: |
ports: |
||||||
- "8776:80" |
- "8080:80" |
||||||
|
- "2003:2003" |
||||||
|
volumes: |
||||||
|
- /var/docker/gfdev/graphite:/opt/graphite/storage/whisper |
||||||
|
- /etc/localtime:/etc/localtime:ro |
||||||
|
- /etc/timezone:/etc/timezone:ro |
||||||
|
|
||||||
|
|||||||
@ -0,0 +1 @@ |
|||||||
|
grafana:$apr1$4R/20xhC$8t37jPP5dbcLr48btdkU// |
||||||
@ -1,38 +0,0 @@ |
|||||||
package plugins |
|
||||||
|
|
||||||
import ( |
|
||||||
"encoding/json" |
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/models" |
|
||||||
) |
|
||||||
|
|
||||||
type ApiPluginRoute struct { |
|
||||||
Path string `json:"path"` |
|
||||||
Method string `json:"method"` |
|
||||||
ReqSignedIn bool `json:"reqSignedIn"` |
|
||||||
ReqGrafanaAdmin bool `json:"reqGrafanaAdmin"` |
|
||||||
ReqRole models.RoleType `json:"reqRole"` |
|
||||||
Url string `json:"url"` |
|
||||||
Headers []ApiPluginHeader `json:"headers"` |
|
||||||
} |
|
||||||
|
|
||||||
type ApiPlugin struct { |
|
||||||
PluginBase |
|
||||||
Routes []*ApiPluginRoute `json:"routes"` |
|
||||||
} |
|
||||||
|
|
||||||
type ApiPluginHeader struct { |
|
||||||
Name string `json:"name"` |
|
||||||
Content string `json:"content"` |
|
||||||
} |
|
||||||
|
|
||||||
func (app *ApiPlugin) Load(decoder *json.Decoder, pluginDir string) error { |
|
||||||
if err := decoder.Decode(&app); err != nil { |
|
||||||
return err |
|
||||||
} |
|
||||||
|
|
||||||
app.PluginDir = pluginDir |
|
||||||
|
|
||||||
ApiPlugins[app.Id] = app |
|
||||||
return nil |
|
||||||
} |
|
||||||
Loading…
Reference in new issue