Commit Graph

61 Commits

Author SHA1 Message Date
Mario Trangoni
b7628f2060 pkg/util/{filepath.go,shortid_generator.go}: Fix golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
filepath.go:12:5⚠️ error var WalkSkipDir should have name of the form ErrFoo (golint)
shortid_generator.go:11:5⚠️ var validUidPattern should be validUIDPattern (golint)
shortid_generator.go:19:6⚠️ func IsValidShortUid should be IsValidShortUID (golint)
shortid_generator.go:24:6⚠️ func GenerateShortUid should be GenerateShortUID (golint)
2019-01-28 22:37:44 +01:00
Mario Trangoni
abb6b135a3 pkg/plugins/plugins.go: remove ineffective break statement.
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/plugins/plugins.go:124:4⚠️ ineffective break statement. Did you mean to break out of the outer loop? (SA4011) (megacheck)
2018-10-19 19:49:04 +02:00
Torkel Ödegaard
80d694d205
Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
Torkel Ödegaard
fa7d7ed5df
Initial Baby Step to refactoring settings from global vars to instance (#11777)
* wip: start on refactoring settings

* settings: progress on settings refactor

* refactor: progress on settings refactoring

* fix: fixed failing test

* settings: moved smtp settings from global to instance
2018-04-30 16:21:04 +02:00
Karsten Weiss
de8696d5d3 Outdent code after if block that ends with return (golint)
This commit fixes the following golint warnings:
pkg/bus/bus.go:64:9: if block ends with a return statement, so drop this else and outdent its block
pkg/bus/bus.go:84:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:137:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:177:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:183:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:199:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:208:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/components/dynmap/dynmap.go:236:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:242:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:257:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:263:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:278:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:284:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:299:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:331:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:350:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:356:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:366:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:390:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:396:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:405:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:427:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:433:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:442:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:459:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:465:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:474:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:491:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:497:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:506:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:523:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:529:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:538:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:555:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:561:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:570:12: if block ends with a return statement, so drop this else and outdent its block
pkg/login/ldap.go:55:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/login/ldap_test.go:372:10: if block ends with a return statement, so drop this else and outdent its block
pkg/middleware/middleware_test.go:213:12: if block ends with a return statement, so drop this else and outdent its block
pkg/plugins/dashboard_importer.go:153:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/dashboards_updater.go:39:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/dashboards_updater.go:121:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/plugins.go:210:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/plugins.go:235:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/eval_context.go:111:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:92:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:98:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:122:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:108:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:118:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:121:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifiers/telegram.go:94:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/annotation.go:34:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/annotation.go:99:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/dashboard_test.go:107:13: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/plugin_setting.go:78:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/preferences.go:91:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/user.go:50:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/migrator/migrator.go:106:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/migrator/postgres_dialect.go:48:10: if block ends with a return statement, so drop this else and outdent its block
pkg/tsdb/time_range.go:59:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/tsdb/time_range.go:67:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/tsdb/cloudwatch/metric_find_query.go:225:9: if block ends with a return statement, so drop this else and outdent its block
pkg/util/filepath.go:68:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
2018-04-27 23:10:43 +02:00
Torkel Ödegaard
b3531362ca fix: minor fix to plugin service shut down flow 2018-04-27 21:22:29 +02:00
Torkel Ödegaard
a8eed9d344 Refactoring PluginManager to be a self registering service (#11755)
* refator: refactored PluginManager to be a self registering service, a lot more work needed to fully make plugin manager use instance variables and not so many globals
2018-04-27 15:11:55 +02:00
Carl Bergquist
28f7b6dad1 Enable Grafana extensions at build time. (#11752)
* extensions: import and build

* bus: use predefined error

* enterprise: build script for enterprise packages

* poc: auto registering services and dependency injection

(cherry picked from commit b5b1ef875f905473af41e49f8071cb9028edc845)

* poc: backend services registry progress

(cherry picked from commit 97be69725881241bfbf1e7adf0e66801d6b0af3d)

* poc: minor update

(cherry picked from commit 03d7a6888b81403f458b94305792e075568f0794)

* ioc: introduce manuel ioc

* enterprise: adds setting for enterprise

* build: test and build specific ee commit

* cleanup: test testing code

* removes example hello service
2018-04-27 13:41:58 +02:00
bergquist
b511788c51 code style fixes 2018-01-15 10:26:33 +01:00
bergquist
44e485af41 backend plugins: improves logging 2018-01-09 14:56:23 +01:00
bergquist
75a54e85dc dont spawn new subprocess while shutting down 2017-12-25 14:12:25 +01:00
Carl Bergquist
20284f7745 merge backend datasources and datasources 2017-12-20 16:24:49 +01:00
bergquist
7977d6b669 merge backend-datasource and datasource type 2017-12-15 17:17:58 +01:00
bergquist
411e8a16c2 backend plugins: manage plugins lifecycle with context 2017-12-11 15:05:06 +01:00
bergquist
e1d4bf2607 kill plugin processes when grafana shuts down 2017-12-07 16:59:35 +01:00
Torkel Ödegaard
84d4958a3c plugin change: make interval, cache timeout & max data points options in plugin.json, remove query.options component feature, add help markdown feature and toggle for data sources 2017-08-31 14:05:52 +02:00
Torkel Ödegaard
b62f1f00cd feat(apps): auto update dashboard dashboards, #5529 2016-07-07 18:11:03 +02:00
Torkel Ödegaard
22778e6efd feat(logging): a lot of progress on moving to new logging lib, #4590 2016-06-06 23:06:44 +02:00
Torkel Ödegaard
6ac3bd4c7c feat(): update checks starting to work 2016-04-11 12:47:04 -04:00
Torkel Ödegaard
b4a8c227cc feat(update checks): started work on update checks 2016-04-11 12:21:48 -04:00
Torkel Ödegaard
581ffb862c feat(plugins): polish to plugin page, better handling for reading readme file contents 2016-03-13 19:21:44 +01:00
bergquist
00dd0e8a9d fix(plugins): fixes missed dist loading for plugindir
closes #4230
2016-03-03 11:04:26 +01:00
bergquist
eb79436ab7 feat(plugins): mounts dist folder if exists in plugin
closes #4230
2016-03-02 15:13:19 +01:00
Dmitry Smirnov
3fd6ae597d minor spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2016-02-16 12:12:04 +11:00
Torkel Ödegaard
257b824d4f feat(plugins): better logging and handling of loading plugins, try to create plugins dir if it does not exist, fixes #3974 2016-02-10 11:03:12 +01:00
Torkel Ödegaard
baff9b0267 feat(apps): lots of work making apps easier to develop, module paths are handled automatically 2016-02-09 22:10:36 +01:00
Torkel Ödegaard
8784be9a14 feat(plugins): made it possible to have relative plugin template urls 2016-02-09 18:17:32 +01:00
Anthony Woods
f94599cd29 merge apiPlugins with appPlugins 2016-01-22 01:15:04 +08:00
Torkel Ödegaard
7a26d309b1 feat(apps): more work on apps and how apps can include panels 2016-01-19 18:18:53 +01:00
bergquist
01d47fb280 fix(plugins): fix for default plugin dif 2016-01-15 11:22:41 +01:00
bergquist
83346a29aa fix(plugins): scans default plugin path 2016-01-15 11:01:56 +01:00
Torkel Ödegaard
c1e94e61d0 feat(apps): lots of more work on apps, changed app_plugin to app_settings in order to to confuse the app plugin model (definition) and app org settings 2016-01-10 21:37:11 +01:00
Torkel Ödegaard
1ffcea1952 feat(plugins): major improvement in plugins golang code 2016-01-09 23:34:20 +01:00
Torkel Ödegaard
9943b9a226 feat(plugin): more work on plugin schema 2016-01-09 08:12:27 +01:00
Torkel Ödegaard
3bb20dbf2e feat(plugins): changed plugin schema, pluginType -> type, type -> id 2016-01-08 23:15:44 +01:00
Torkel Ödegaard
7a8b3c419b feat(apps): lots of progress 2016-01-08 20:57:58 +01:00
Torkel Ödegaard
69d0e82453 Merge branch 'master' into apps
Conflicts:
	pkg/services/sqlstore/migrations/migrations.go
2016-01-08 10:20:46 +01:00
bergquist
5792a16222 fix(plugins): removes warnings for missing folder
Remove warnings when scanning for plugins in the default
catalog data/plugins

closes #3663
2016-01-07 08:51:31 +01:00
bergquist
9343b0378d feat(plugins): adds warn log for scanning folders
symlinks outside to plugin folder can cause problems.
This commit makes sure to warn about it in the logs
2016-01-06 11:57:17 +01:00
Torkel Ödegaard
eacc46da6d feat(plugins): WIP on new apps concept 2015-12-21 23:09:27 +01:00
woodsaj
0903d5541b Merge branch 'master' of github.com:grafana/grafana into externalPlugin
Conflicts:
	pkg/api/api.go
	pkg/api/api_plugin.go
	pkg/api/datasources.go
	pkg/api/frontendsettings.go
	pkg/api/index.go
	pkg/plugins/models.go
	pkg/plugins/plugins.go
2015-12-22 00:23:24 +08:00
woodsaj
3d15ee6d74 allow app menu items to be selectivly pinned to the left nav menu 2015-12-18 15:10:52 +08:00
woodsaj
c35b51a268 refactor.
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.
2015-12-17 23:53:58 +08:00
carl bergquist
d4e98cd9bc Merge branch 'feature/symlinks' of https://github.com/jmaitrehenry/grafana into jmaitrehenry-feature/symlinks
Conflicts:
	pkg/plugins/plugins.go

closes #2899
closes #2834
2015-12-16 09:21:52 +01:00
Torkel Ödegaard
f83d5f4280 cleanup(influxdb_08): removed influxdb 0.8 data source as an built in official data source, moved it to an external plugin repo, https://github.com/grafana/datasource-plugin-influxdb-08, closes #3523 2015-12-15 11:21:00 +01:00
Torkel Ödegaard
5eab5dc47b feat(plugins): removed external plugins and bundle code, not ready for master yet, will revert this commit in seperate branch 2015-12-15 10:28:52 +01:00
woodsaj
0697274695 I add plugin dependency check.
This check ensures that all of the plugins required by a bundle
are loaded.
2015-12-05 01:20:42 +08:00
woodsaj
c4a0fe0234 add pluginBundle backend api methods and SQL storage 2015-12-03 23:43:55 +08:00
woodsaj
bd4cb549d6 add pluginBundle support
A plugnBundle is meta plugin that has a set of dependent plugins
to enable.  This commit includes a plugin.json for a default
"core" bundle that enables all of the shipped panels and datasources.
2015-12-03 15:52:37 +08:00
Torkel Ödegaard
4a69de1f30 feat(plugins): made panels work as plugins 2015-11-21 13:46:43 +01:00