Commit Graph
48 Commits
Author SHA1 Message Date
woodsaj ad8dbbb559 allow updates to secureJsonData.
SecureJsonData is stored as a json object in the DB. As the
secureJsonData is never returned to the user they are unable
to provide the full json object when performing updates instead
the user can only provide the specific keys they wish to update.
This commit ensures that only the provided keys are updated and
existing keys in the secureJsonData object are left untouched.
2016-04-28 18:39:23 +08:00
woodsaj 2f3627e74b add missing ngInject comment. fixes #4501 2016-03-29 22:53:02 +08:00
woodsaj dc4743a392 ensure current template variable is set.
- When distributing a dashboard it is often not practical to have
"current" template variable option set. This commit ensures that
for dashboards with no current, it is assigned when the dashboard
loads (assuming refresh on load is set.)
2016-03-08 15:41:24 +08:00
woodsaj 0cb57f52de refactor how template vars are updated. fixes #4283
Use promises to order the updates of variable options so that
parents are always updated before children.
This ensures that we only need to query the datasource once per
variable as variables that depend on other variables will only be
processed once their parent has been.
This commit also ensures that variable options are refreshed if
"refresh_on_load" is true even when query params are used to
set the variable seltion.
2016-03-08 15:03:34 +08:00
woodsaj f953033ba7 add support for screenshots in plugins.
Allow plugin creators to include screenshots of their plugin
in action. Primarily for use in Grafana.net info pages.
2016-02-09 22:36:42 +08: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 e7a0ab76c3 change plugin to app in breadcrumb 2015-12-18 22:09:33 +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 48cf56b69a more renaming. also moved apps and datasource menus 2015-12-18 13:46:40 +08:00
woodsaj 42db1378e0 rename app config directive to grafana-app-* 2015-12-17 23:59:01 +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
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 523cf21b4a tune pluginConfig directive 2015-12-05 00:34:48 +08:00
woodsaj 3c13901695 add ui elements for plugins.
This includes support for cusom plugin config directives.
2015-12-04 19:21:33 +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
woodsaj fd392a2422 Merge remote-tracking branch 'upstream/external-plugins' into externalPlugin
Conflicts:
	public/views/index.html
2015-12-03 12:47:58 +08:00
woodsaj 13864853a8 support separate css files for light/dark themes. 2015-12-03 12:29:57 +08:00
woodsaj 79d29db18b really fix unit tests. 2015-11-27 17:17:27 +08:00
woodsaj 4f6a52503d fix plugin unit test 2015-11-27 17:04:43 +08:00
woodsaj 1b5c40dd1f add role access limitions for menu items.
This allows external-plugin menu items to conditionally
be added to the UI depending on the logged in users
current role.
2015-11-27 16:27:14 +08:00
woodsaj 700b77c450 implement role access checks on external-plugin routes. 2015-11-27 16:26:30 +08:00
woodsaj 8449017592 Add plugin type field to externalPlugin model 2015-11-27 15:21:57 +08:00
woodsaj 437b957be1 remove external_plugin from models package. 2015-11-11 17:45:38 +08:00
woodsaj d503c5d83d refer to plugins are ExternalPlugin instead of thirdParty 2015-11-11 14:30:07 +08:00
woodsaj 3926226417 fix getting default quota as map[string]int64 2015-09-15 20:31:58 +08:00
woodsaj 1ad10914ce add quota middleware unittests 2015-09-15 18:19:47 +08:00
woodsaj 86ed85aa6e move toMap function to be a method on the quota structs 2015-09-15 17:18:26 +08:00
woodsaj b7de847236 add unittests for quota sqltore methods. 2015-09-15 17:10:46 +08:00
woodsaj 3cf2cd4684 be sure to pass result obj by reference to xorm. 2015-09-15 17:10:16 +08:00
woodsaj 6488324cf1 enhance quota support.
now includes:
- perOrg (users, dashboards, datasources, api_keys)
- perUser (orgs)
- global (users, orgs, dashboards, datasources, api_keys, sessions)
2015-09-11 23:17:10 +08:00
woodsaj 47bf1bd21a return 404 when quotas not enabled. 2015-09-11 01:51:12 +08:00
woodsaj 852f9bd277 refactor quota settings 2015-09-11 01:47:33 +08:00
woodsaj 555cbeffa5 allow all users to retrieve org and quota data. 2015-09-11 01:18:36 +08:00
woodsaj 3d4d822528 implement updateQuota function 2015-09-11 01:04:29 +08:00
woodsaj c238130842 quote table names passed by arguments 2015-09-11 01:04:22 +08:00
woodsaj 76e9ebde36 always return after errors. 2015-09-11 01:03:58 +08:00
woodsaj 0688050552 add quota middleware to enforce quotas. issue #321
Conflicts:
	pkg/api/api.go
2015-09-11 01:03:47 +08:00
woodsaj 9023171940 inital backend suport for quotas. issue #321
Conflicts:
	conf/defaults.ini
	main.go
	pkg/services/sqlstore/migrations/migrations.go
2015-09-11 01:01:36 +08:00
woodsaj c138f390ac close all existing loggers before re-initilizing loggers. fixes #2533 2015-08-17 15:59:40 +08:00
woodsaj c9e5da48a4 Merge branch 'issue_1481' of github.com:raintank/grafana into issue_1481 2015-02-13 22:00:57 +08:00
woodsaj 7d69885e06 fixes #1481. correctly escape api_key.key column name
'key' is a reserved word in mysql. So when building a query,
the api-key.key column name needs to be escaped
2015-02-13 22:00:03 +08:00
woodsaj 55ba8ad0c4 fix issue 1481. correctly escape api_key.key column name
'key' is a reserved word in mysql. So when building a query,
the api-key.key column name needs to be escaped
2015-02-13 21:52:56 +08:00
woodsaj c4fe9d50bf correctly handle event being a ptr
Events are passed in as PTRs, so we need to de-reference when getting the type and value.
2015-02-08 18:13:32 +08:00
woodsaj a712f1a231 Add inital implementation of Notification events.
If notifications are enabled in the config, Adds a eventHandler
accepting Notification{} payloads to the internal Bus.  The
eventHandler then marshals the payload into json and sends it
to a rabbitmq topic exchange using the
Notification.Priority+Noticiation.EventType as the routing key.
eg.  INFO.account.created

Currently, notifications are only being emitted for
INFO.account.created
INFO.account.updated
INFO.user.created
INFO.user.updated
2015-02-03 23:57:42 +08:00
woodsaj 3887aa72cb add tokens to UI under the Account Settings.
Adds support for adding and removing API tokens.
2015-01-16 16:04:46 +08:00
woodsaj f25cffd24e fix getAccountByToken query. 2015-01-14 21:45:00 +08:00
woodsaj 7b17e38f5d add Token authentication support
Added CRUD methods for Tokens.
Extend Auth Handler to check for the presence of a Bearer Authorization
header to authenticate against. If there is no header, or the token is not
valid, the Auth Handler falls back to looking for a Session.
2015-01-14 16:33:34 +08:00