mirror of https://github.com/grafana/grafana
parent
cf89b565a6
commit
d503c5d83d
@ -0,0 +1,3 @@ |
||||
Example app is available at https://github.com/raintank/grafana-plugin-example |
||||
|
||||
To use, download the example app from github and run it (requires python Flask). Then rename the "_plugin.json" file in this director to "plugin.json" and restart Grafana. |
@ -0,0 +1,41 @@ |
||||
{ |
||||
"pluginType": "externalPlugin", |
||||
"settings": { |
||||
"routes": [ |
||||
{ |
||||
"path": "/example/static/*", |
||||
"method": "*", |
||||
"req_signed_in": false, |
||||
"req_grafana_admin": false, |
||||
"req_role": "Admin", |
||||
"url": "http://localhost:5000/static" |
||||
}, |
||||
{ |
||||
"path": "/example/api/*", |
||||
"method": "*", |
||||
"req_signed_in": true, |
||||
"req_grafana_admin": false, |
||||
"req_role": "Admin", |
||||
"url": "http://localhost:5000/api" |
||||
} |
||||
], |
||||
"css": [ |
||||
{ |
||||
"href": "/example/static/css/example.css" |
||||
} |
||||
], |
||||
"js": [ |
||||
{ |
||||
"src": "/example/static/js/app.js" |
||||
} |
||||
], |
||||
"menu_items": [ |
||||
{ |
||||
"text": "Example Plugin", |
||||
"icon": "fa fa-fw fa-smile-o", |
||||
"href": "/example/servers", |
||||
"adminOnly": false, |
||||
} |
||||
] |
||||
} |
||||
} |
@ -1,40 +0,0 @@ |
||||
{ |
||||
"pluginType": "thirdPartyIntegration", |
||||
"integration": { |
||||
"routes": [ |
||||
{ |
||||
"path": "/raintank/public/*", |
||||
"method": "*", |
||||
"req_signed_in": false, |
||||
"req_grafana_admin": false, |
||||
"req_role": "Admin", |
||||
"url": "http://localhost:3001/public" |
||||
}, |
||||
{ |
||||
"path": "/raintank/api/*", |
||||
"method": "*", |
||||
"req_signed_in": true, |
||||
"req_grafana_admin": false, |
||||
"req_role": "Admin", |
||||
"url": "http://localhost:3001/api" |
||||
} |
||||
], |
||||
"css": [ |
||||
{ |
||||
"href": "/path/to/file.css" |
||||
} |
||||
], |
||||
"js": [ |
||||
{ |
||||
"src": "/raintank/public/app.js" |
||||
} |
||||
], |
||||
"menu_items": [ |
||||
{ |
||||
"text": "Menu Text", |
||||
"icon": "fa fa-fw fa-database", |
||||
"href": "/raintank/test" |
||||
} |
||||
] |
||||
} |
||||
} |
Loading…
Reference in new issue