Commit Graph

14413 Commits

Author SHA1 Message Date
Karsten Weiss
b7adf28501 Remove redundancy in variable declarations (golint)
This commit fixes the following golint warnings:
pkg/api/avatar/avatar.go:229:12: should omit type *http.Client from declaration of var client; it will be inferred from the right-hand side
pkg/login/brute_force_login_protection.go:13:26: should omit type time.Duration from declaration of var loginAttemptsWindow; it will be inferred from the right-hand side
pkg/metrics/graphitebridge/graphite.go:58:26: should omit type []string from declaration of var metricCategoryPrefix; it will be inferred from the right-hand side
pkg/metrics/graphitebridge/graphite.go:69:22: should omit type []string from declaration of var trimMetricPrefix; it will be inferred from the right-hand side
pkg/models/alert.go:37:36: should omit type error from declaration of var ErrCannotChangeStateOnPausedAlert; it will be inferred from the right-hand side
pkg/models/alert.go:38:36: should omit type error from declaration of var ErrRequiresNewState; it will be inferred from the right-hand side
pkg/models/datasource.go:61:28: should omit type map[string]bool from declaration of var knownDatasourcePlugins; it will be inferred from the right-hand side
pkg/plugins/update_checker.go:16:13: should omit type http.Client from declaration of var httpClient; it will be inferred from the right-hand side
pkg/services/alerting/engine.go:103:24: should omit type time.Duration from declaration of var unfinishedWorkTimeout; it will be inferred from the right-hand side
pkg/services/alerting/engine.go:105:19: should omit type time.Duration from declaration of var alertTimeout; it will be inferred from the right-hand side
pkg/services/alerting/engine.go:106:19: should omit type int from declaration of var alertMaxAttempts; it will be inferred from the right-hand side
pkg/services/alerting/notifier.go:143:23: should omit type map[string]*NotifierPlugin from declaration of var notifierFactories; it will be inferred from the right-hand side
pkg/services/alerting/rule.go:136:24: should omit type map[string]ConditionFactory from declaration of var conditionFactories; it will be inferred from the right-hand side
pkg/services/alerting/conditions/evaluator.go:12:15: should omit type []string from declaration of var defaultTypes; it will be inferred from the right-hand side
pkg/services/alerting/conditions/evaluator.go:13:15: should omit type []string from declaration of var rangedTypes; it will be inferred from the right-hand side
pkg/services/alerting/notifiers/opsgenie.go:44:19: should omit type string from declaration of var opsgenieAlertURL; it will be inferred from the right-hand side
pkg/services/alerting/notifiers/pagerduty.go:43:23: should omit type string from declaration of var pagerdutyEventApiUrl; it will be inferred from the right-hand side
pkg/services/alerting/notifiers/telegram.go:21:17: should omit type string from declaration of var telegramApiUrl; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/config_reader_test.go:11:24: should omit type string from declaration of var simpleDashboardConfig; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/config_reader_test.go:12:24: should omit type string from declaration of var oldVersion; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/config_reader_test.go:13:24: should omit type string from declaration of var brokenConfigs; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/file_reader.go:22:30: should omit type time.Duration from declaration of var checkDiskForChangesInterval; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/file_reader.go:24:23: should omit type error from declaration of var ErrFolderNameMissing; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:15:34: should omit type string from declaration of var twoDatasourcesConfig; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:16:34: should omit type string from declaration of var twoDatasourcesConfigPurgeOthers; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:17:34: should omit type string from declaration of var doubleDatasourcesConfig; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:18:34: should omit type string from declaration of var allProperties; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:19:34: should omit type string from declaration of var versionZero; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:20:34: should omit type string from declaration of var brokenYaml; it will be inferred from the right-hand side
pkg/services/sqlstore/stats.go:16:25: should omit type time.Duration from declaration of var activeUserTimeLimit; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/mysql_dialect.go:69:14: should omit type bool from declaration of var hasLen1; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/mysql_dialect.go:70:14: should omit type bool from declaration of var hasLen2; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/postgres_dialect.go:95:14: should omit type bool from declaration of var hasLen1; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/postgres_dialect.go:96:14: should omit type bool from declaration of var hasLen2; it will be inferred from the right-hand side
pkg/setting/setting.go:42:15: should omit type string from declaration of var Env; it will be inferred from the right-hand side
pkg/setting/setting.go:161:18: should omit type bool from declaration of var LdapAllowSignup; it will be inferred from the right-hand side
pkg/setting/setting.go:473:30: should omit type bool from declaration of var skipStaticRootValidation; it will be inferred from the right-hand side
pkg/tsdb/interval.go:14:21: should omit type time.Duration from declaration of var defaultMinInterval; it will be inferred from the right-hand side
pkg/tsdb/interval.go:15:21: should omit type time.Duration from declaration of var year; it will be inferred from the right-hand side
pkg/tsdb/interval.go:16:21: should omit type time.Duration from declaration of var day; it will be inferred from the right-hand side
pkg/tsdb/cloudwatch/credentials.go:26:24: should omit type map[string]cache from declaration of var awsCredentialCache; it will be inferred from the right-hand side
pkg/tsdb/influxdb/query.go:15:27: should omit type *regexp.Regexp from declaration of var regexpOperatorPattern; it will be inferred from the right-hand side
pkg/tsdb/influxdb/query.go:16:27: should omit type *regexp.Regexp from declaration of var regexpMeasurementPattern; it will be inferred from the right-hand side
pkg/tsdb/mssql/mssql_test.go:25:14: should omit type string from declaration of var serverIP; it will be inferred from the right-hand side
2018-04-27 22:14:36 +02:00
Torkel Ödegaard
b3531362ca fix: minor fix to plugin service shut down flow 2018-04-27 21:22:29 +02:00
Daniel Lee
7e2fb5e92e appveyor: uppercase the C drive in go path
Fixes #11758
2018-04-27 17:32:53 +02:00
David
cc74f6c6a0
Merge pull request #11761 from grafana/davkal/explore-multi-row
Explore: add support for multiple queries
2018-04-27 17:31:25 +02:00
Leonard Gram
ec23816df6
docs: further documents changes to the docker image. (#11763)
* docs: further documents changes to the docker image.
* docs: explains the changes to user id better.
2018-04-27 17:06:08 +02:00
bergquist
c902ec1808 Merge branch 'notification-service-refactor2'
* notification-service-refactor2:
  fix: removed log calls used while troubleshooting
  refactor: refactoring notification service to use new service registry hooks
2018-04-27 16:59:32 +02:00
Carl Bergquist
2cc855a131 Merge branch 'master' into notification-service-refactor2 2018-04-27 16:59:14 +02:00
bergquist
0cbeb56af1 disable ent build to avoid slowing down build speed 2018-04-27 16:41:07 +02:00
David
d8abfe6a7d
Merge pull request #11742 from grafana/davkal/explore
Explore UI skeleton
2018-04-27 15:46:40 +02:00
David Kaltschmidt
949e3d29e8 Explore: add support for multiple queries
* adds +/- buttons to query rows in the Explore section
* on Run Query all query expressions are submitted
* `generateQueryKey` and `ensureQueries` are helpers to ensure each
 query field has a unique key for react.
2018-04-27 15:42:35 +02:00
David Kaltschmidt
25d3ec5bbf Fixed settings default and explore path 2018-04-27 15:35:46 +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
Torkel Ödegaard
44b0f15a61 fix: removed log calls used while troubleshooting 2018-04-27 14:28:42 +02:00
Torkel Ödegaard
df71fe33fd refactor: refactoring notification service to use new service registry hooks 2018-04-27 14:15:17 +02:00
Marcus Efraimsson
8f29d28572
Merge pull request #11753 from grafana/11743_unit_revert
revert renaming of unit key ppm
2018-04-27 14:02:57 +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
Marcus Efraimsson
138c8c348e
revert renaming of unit key ppm
#11211 removed the unit key ppm in favor of conppm. A change which is not forward compatible.
This commit revert the unit key back to ppm.
Also adds some better error description if trying to use a unit which don't exists.
Fixes #11743
2018-04-27 13:41:20 +02:00
David Kaltschmidt
d338b7ea7b Import and typescript fixups 2018-04-27 11:49:11 +02:00
David Kaltschmidt
1e6e89121c Settings to enable Explore UI 2018-04-27 11:39:14 +02:00
bergquist
afce0feb05 Merge branch 'mjtrangoni-fix-deadcode-issues'
* mjtrangoni-fix-deadcode-issues:
  tech: removes unused code
  add deadcode linter to circleci
  pkg: fix deadcode issues
  build.go: fix deadcode issues
2018-04-27 10:41:56 +02:00
bergquist
8e9b3507c5 tech: removes unused code 2018-04-27 10:39:06 +02:00
bergquist
034f5921cc Merge branch 'fix-deadcode-issues' of https://github.com/mjtrangoni/grafana into mjtrangoni-fix-deadcode-issues
* 'fix-deadcode-issues' of https://github.com/mjtrangoni/grafana:
  add deadcode linter to circleci
  pkg: fix deadcode issues
  build.go: fix deadcode issues
2018-04-27 10:31:44 +02:00
David Kaltschmidt
f1220fd2a4 Explore WIP 2018-04-26 20:27:19 +02:00
Mario Trangoni
0459261d19 add deadcode linter to circleci 2018-04-26 19:24:21 +02:00
Mario Trangoni
97fd66db2e pkg: fix deadcode issues 2018-04-26 19:24:21 +02:00
Mario Trangoni
7aaa188471 build.go: fix deadcode issues 2018-04-26 19:04:07 +02:00
Marcus Efraimsson
b53a57610b
docs: update current version to 5.1 2018-04-26 18:59:45 +02:00
Marcus Efraimsson
6fa7ffc23f
docs: update installation instructions targeting v5.1.0 stable 2018-04-26 18:56:44 +02:00
Marcus Efraimsson
914071993d
Merge branch 'docs-5.1' 2018-04-26 18:44:51 +02:00
Daniel Lee
44a61a6db3 changelog: update for v5.1.0 2018-04-26 18:18:54 +02:00
Marcus Efraimsson
28781e7dfd
Merge pull request #11736 from grafana/11735_ga
fix so that google analytics script are cached
2018-04-26 16:01:08 +02:00
Marcus Efraimsson
ddeba41638
fix so that google analytics script are cached 2018-04-26 15:49:22 +02:00
Daniel Lee
1dd4f03100
Merge pull request #11726 from grafana/11708_prom_variables
prometheus: variable query should fallback correctly to a series query
2018-04-26 10:29:09 +02:00
Daniel Lee
375816106e
Merge pull request #11714 from grafana/11703_mysql_ts_datatypes
sql tsdb: fix value columns conversion to float when using timeseries query
2018-04-25 23:17:22 +02:00
Marcus Efraimsson
fff5d7154e
Merge pull request #11721 from grafana/11677-missaligned-menu-carot
fix misalignment of unit and other drop downs in firefox
2018-04-25 17:24:54 +02:00
Daniel Lee
4b73f67703
Merge pull request #11722 from grafana/ie11-panel-edit-height
removed height 100% from panel-container to fix ie11 panel edit mode
2018-04-25 16:26:41 +02:00
Daniel Lee
3000a2a43b
Merge pull request #11652 from grafana/davkal/hmr
Add weback-dev-server with hot/hmr support
2018-04-25 15:52:53 +02:00
Marcus Efraimsson
f112e38266
prometheus: convert metric find query tests to jest 2018-04-25 15:37:58 +02:00
Marcus Efraimsson
6687409efb
prometheus: fix variable query to fallback correctly to series query
Using a query of for example up or up{job=job1}
2018-04-25 15:37:58 +02:00
Patrick O'Carroll
6836268f3e removed height 100% from panel-container to fix ie11 panel edit mode 2018-04-25 12:44:39 +02:00
Patrick O'Carroll
99aa9a46bc replaced border hack carot with fontawesome carot fixes #11677 2018-04-25 12:16:43 +02:00
Leonard Gram
1290087b78
dev: Mac compatible prometheus block. (#11718) 2018-04-25 11:01:33 +02:00
David
c99d6bd505
Merge pull request #11678 from grafana/davkal/11673-silent-response
Add silent option to backend requests
2018-04-25 09:46:41 +02:00
Carl Bergquist
f2b5b6f299
Merge pull request #11694 from flopp999/patch-5
Added requests/sec(throughput)
2018-04-24 21:30:34 +02:00
Marcus Efraimsson
7626775491
Merge pull request #11695 from grafana/11508_variables_preview_values
allow to show more preview values for variables
2018-04-24 20:05:47 +02:00
Marcus Efraimsson
1452634a2a
mssql: fix value columns conversion to float when using timeseries query 2018-04-24 19:54:08 +02:00
Marcus Efraimsson
cf43007531
postgres: fix value columns conversion to float when using timeseries query 2018-04-24 19:53:36 +02:00
Marcus Efraimsson
346577b664
mysql: fix value columns conversion to float when using timeseries query 2018-04-24 19:53:06 +02:00
Marcus Efraimsson
76bd2aea44
sql datasource: extract common logic for converting value column to float 2018-04-24 19:50:14 +02:00
Patrick O'Carroll
a40314022b added pointer to show more, reset values on new query 2018-04-24 17:40:03 +02:00