Commit Graph

22084 Commits

Author SHA1 Message Date
Hugo Häggmark
3424b64299
Typescript: Removes implicit anys (#17625)
* Chore: Remove implicit anys from ResultProcessor and tests

* Chore: Removes implicit anys for /loki/**/*.ts

* Chore: Removes implicit anys for prometheus/**/*
2019-06-18 11:01:12 +02:00
kay delaney
d6ee96ee64
Explore: Removes minus button in adhoc query field (#17573)
Closes #17571
2019-06-18 09:48:32 +01:00
Remi Verchere
4c4c689907 Correct 6.2.3 release date (#17624) 2019-06-18 09:40:08 +02:00
Carl Bergquist
b98bb48d59
codestyle: styleguide and arch for grafanas backend (#17545) 2019-06-18 09:31:51 +02:00
srid12
b950eebf99 JsonTree: fix jsonTree angular binding (#17608)
The API changed so it expects a numeric level rather than a boolean flag.  Since 6.1 plugins using jsonTree just show an empty div
2019-06-17 15:10:56 -07:00
Yann Verry
ed613194ac HTTPServer: Fix X-XSS-Protection header formatting (#17620)
Fixes #17619
2019-06-17 23:46:35 +02:00
Marcus Efraimsson
64841fe417
Changelog: Add known issues for v6.2.3 (#17615) 2019-06-17 17:35:13 +02:00
gotjosh
3563f71ba2
Update the changelog with v6.2.3 information (#17612) 2019-06-17 15:42:11 +01:00
Tobias Skarhed
6de75de755
Refactor buttons (#17611) 2019-06-17 16:15:49 +02:00
Hugo Häggmark
8192fa538e
Tests: Replaces e2e tests truth screenshot (#17609) 2019-06-17 13:41:29 +02:00
gotjosh
6fbca90269
cli: grafana-cli should receive flags from the command line (#17606)
grafana-cli should allow configuration overrides to be received from the command line. e.g.

```
grafana-cli admin reset-password cfg:default.paths.logs=custom/log/directory/
```

Seems like we missed the inclusion of `flag.Parse` as we run the command,  to be able to consume them.

Additionally, it'll be useful for the user to know whenever these are being overriden or not - hence the addition of logging the configuration to be used as we run the command.
2019-06-17 11:27:26 +01:00
Martin Brenner
aa1f9cdd40 AppPlugin: Fix load legacy plugin app (#17574)
* first init meta befor set legacy components

* add load legacy app test

* AppPlugin: minor refactor
2019-06-15 08:26:31 +02:00
Tobias Skarhed
8ffef57178 Typescript: A batch of implicit any fixes (#17590)
* Reduce noImplicitAny errors

* Lower err count

* Static version

* Fix noImplicitAny

* Table: moved type file
2019-06-15 08:25:33 +02:00
Tobias Skarhed
2f00087a08 RefreshPicker: Handle empty intervals (#17585)
* Refresh picker empty

* RefreshPicker: refactoring
2019-06-15 08:24:52 +02:00
Carl Bergquist
f9b691bd54
Docker: Switch base to ubuntu:latest (#17066) 2019-06-14 22:57:55 +02:00
Oleg Gaidarenko
c853ef7318
SQLStore: extend user.SearchUsers method (#17514)
* SQLStore: extend `user.SearchUsers` method

Allow `user.SearchUsers` to search users based on their auth type
2019-06-14 09:50:38 +01:00
Hugo Häggmark
51c6b50582
Explore: Tag and Values for Influx are filtered by the selected measurement (#17539)
* Fix: Filters Tags and Values depending on options passed
Fixes: #17507

* Fix: Makes sure options is not undefined

* Fix: Fixes tests and small button refactor

* Chore: PR comments
2019-06-14 10:13:06 +02:00
Leonard Gram
37e9988e95
ldap: makes mocks available for testing. (#17576)
* ldap: makes mocks available for testing.
2019-06-14 09:54:19 +02:00
Andrej Ocenas
97f7c92455
Devenv: Add nginx proxy for mac (#17572) 2019-06-13 21:29:33 +02:00
Torkel Ödegaard
2c5c333858
Graph: Added new fill gradient option (#17528)
* Graph: Added new fill gradient option

* Graph: changed gradient area fill option, added test dashboard
2019-06-13 20:06:04 +02:00
Tobias Skarhed
375dc333f2 Typescript: Reduce implicit any errors (#17550)
* Fix types on linkSrv

* Lower err count, shoot down some errs, add type pkg

* Fix changes and add test

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update public/app/features/panel/panellinks/link_srv.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>

* Fix last types to compile

* Fix formatting issue

* Update public/app/features/panel/panel_ctrl.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>
2019-06-13 20:04:15 +02:00
Daniele Ruggieri
74829f4898 SinglestatPanel: Manages when getColorForValue() function returns null value. Closes #9747 (#17552) 2019-06-13 20:00:13 +02:00
Oleg Gaidarenko
1b1d951495 LDAP: refactoring (#17479)
* LDAP: use only one struct

* Use only models.ExternalUserInfo

* Add additional helper method :/

* Move all the helpers to one module

* LDAP: refactoring

* Rename some of the public methods and change their behaviour

* Remove outdated methods

* Simplify logic

* More tests
  There is no and never were tests for settings.go, added tests for helper
  methods (cover is now about 100% for them). Added tests for the main
  LDAP logic, but there is some stuff to add. Dial() is not tested and not
  decoupled. It might be a challenge to do it properly

* Restructure tests:
   * they wouldn't depend on external modules
   * more consistent naming
   * logical division

* More guards for erroneous paths

* Login: make login service an explicit dependency

* LDAP: remove no longer needed test helper fns

* LDAP: remove useless import

* LDAP: Use new interface in multildap module

* LDAP: corrections for the groups of multiple users

* In case there is several users their groups weren't detected correctly

* Simplify helpers module
2019-06-13 16:47:51 +02:00
Dave
c78b6e2a67 Elasticsearch: Fix empty query request to send properly (#17488)
* ensure that empty Elasticsearch queries are properly set to *.  Fixes issue that appears when passing raw data from variables.

* combine null check and empty check into one
2019-06-13 15:45:31 +02:00
☃ pitr
a2370a379d SinglestatPanel: fix min/max config in singlestat sparklines (#17543) 2019-06-13 15:43:42 +02:00
Sofia Papagiannaki
7b70e7db2d
AuthProxy: Optimistic lock pattern for remote cache Set (#17485)
* Implementation of optimistic lock pattern

Try to insert the remote cache key and handle integrity error

* Remove transaction

Integrity error inside a transaction results in deadlock

* Remove check for existing remote cache key

Is no longer needed since integrity constrain violations are handled

* Add check for integrity constrain violation

Do not update the row if the insert statement fails
for other than an integrity constrain violation

* Handle failing inserts because of deadlocks

If the insert statement fails because of a deadlock
try to update the row

* Add utility function for returning SQL error code

Useful for debugging

* Add logging for failing expired cache key deletion

Do not shallow it completely

* Revert "Add utility function for returning SQL error code"

This reverts commit 8e0b82c79633e7d8bc350823cbbab2ac7a58c0a5.

* Better log for failing deletion of expired cache key

* Add some comments

* Remove check for existing cache key

Attempt to insert the key without checking if it's already there
and handle the error situations

* Do not propagate deadlocks created during update

Most probably somebody else is trying to insert/update
the key at the same time so it is safe enough to ignore it
2019-06-13 15:36:09 +02:00
kay delaney
e11edf3fc2
Explore: Includes context parameter when invoking getExploreState() from Prometheus datasource (#17569)
Closes #17457
2019-06-13 14:14:09 +01:00
Hugo Häggmark
c59f308414
Tests: Replaces truth image (#17570) 2019-06-13 14:45:15 +02:00
Hugo Häggmark
fabc6f4241
Fix: Fixes merge conflict (#17568) 2019-06-13 12:46:10 +02:00
Hugo Häggmark
9e9fdb9cf1
Build: Fix failing e2e tests and implicit any check (#17567)
* Tests: Updates truth screen shot

* Fix: Fixes an implicit any error
2019-06-13 12:37:18 +02:00
kay delaney
d612beec25
Explore: Fixes implicit any error in AdHocFilterField.test.tsx (#17565) 2019-06-13 11:28:03 +01:00
Marcus Efraimsson
e1df51109e
Fix so that correct cache is provided to di registry (#17566)
This fix prevents Grafana from crashing after being logged in.

Ref #17519
2019-06-13 12:15:52 +02:00
Kyle Brandt
073851f9c7 Build: Upgrades to golang 1.12.6 (#17542) 2019-06-13 11:08:48 +02:00
kay delaney
6170a039e5
Explore: Adds ability to remove filter from <AdHocFilterField /> key dropdown (#17553)
Also adds tests to validate behaviour
Query now reruns when filter is removed
Changes <AdHocFilterField /> such that after a measurement and field have been chosen,
just a '+' button is displayed, rather than an empty <AdHocFilter />

Closes #17544
Closes #17497
2019-06-13 10:00:53 +01:00
Carl Bergquist
6809d2bb29
codestyle: moves cache to infra (#17519) 2019-06-13 10:55:38 +02:00
Zayn-ul-Abdin
df917663e6 Docs feedback: installation/debian.md (#17563)
Closes #17129
2019-06-13 09:52:44 +02:00
Hugo Häggmark
8e1dfd32f9 Chore: Lowered implicit anys limit to 5131 (#17562)
Progress: #14714
2019-06-13 08:12:30 +02:00
Marcus Efraimsson
d168057fc6
Influx: Reset logs query field on clear all and clear row in explore (#17549)
Resets influx logs query field when hitting clear all and clear row 
in explore logs mode.

Fixes #17506
2019-06-12 17:27:13 +02:00
Marcus Efraimsson
f41a6c8962
Devenv: Add telegraf with log parsing to influxdb docker block (#17546) 2019-06-12 15:30:33 +02:00
kay delaney
0a3af385e1
Explore: Runs query when measurement/field and pairs are selected in logs mode for influx (#17523)
* Explore: Runs query when measurement/field and pairs are select in logs mode for influx
Closes #17500

* Explore: Modifies logic determining when to auto-run query during influx logs mode
Also adds test to validate this logic
2019-06-12 14:14:39 +01:00
kay delaney
2a47c315df
Influx: Adds start page for logs in Explore (#17521)
* Influx: Adds start page for logs in Explore
Closes #17499

* Influx: Rebased with master and removed conditional display of cheat sheet in explore
Cheat sheet now displays during both Metrics and Logs mode, though this is only
temporary.
2019-06-12 14:01:48 +01:00
Maxim Ivanov
151fe240fc OAuth: Fix for wrong user token updated on OAuth refresh in DS proxy (#17541) 2019-06-12 13:47:38 +02:00
Kyle Brandt
599514ad68
middleware: add security related HTTP(S) response headers (#17522)
* x_xss_protection
  * strict_transport_security (HSTS)
  * x_content_type_options

these are currently defaulted to false (off) until the next minor release.

fixes #17509
2019-06-12 13:15:50 +02:00
Hugo Häggmark
41fb38d522
Docs: Clarifies from which version the Patch VERB is available (#17532)
* Docs: Clarifies from which version the Patch VERB is available

Closes: #17508

* Docs: Removes setting after PR comments
2019-06-12 11:14:30 +02:00
Johannes Schill
3da8cff6e9
Chore: Hugo upgrade (#17494)
* Fix: Upgrade hugo wip

* Chore: Rename index to _index for latest hugo

* Chore: Use relative refs, no starting slash

* Feat: Add possibility to mount layouts from grafana.org project
2019-06-12 08:01:44 +02:00
Mario Trangoni
ab4e1526b3 Codestyle: Fix some goconst issues (#17530)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-06-12 07:27:47 +02:00
Hugo Häggmark
39e23ba672
Docs: Adds clarification to the provider name for provisioned dashboards (#17524)
Closes: #17516
2019-06-12 06:36:14 +02:00
☃ pitr
3e64214338 Singlestat: Add y min/max config to singlestat sparklines (#17527)
* Add scaling toggle to Singlestat panel

This toggle allows a user to choose between auto scaling or
zero-based scaling.

* Update Singlestat docs to include Zero Scale option

* Add min/max config to Singlestat sparklines y axis
2019-06-11 21:39:09 +02:00
Marcus Efraimsson
fcd2fb8b04
Explore: Clear queries when switching between metrics and logs (#17505)
This will clear the existing queries when switching between metrics and logs. 

Closes #17496
2019-06-11 16:18:33 +02:00
Shavonn Brown
40f95a95c0
16223 user auth token list and revoke (#17434)
* Start user auth token list on user profile (#16223)

* Now session found and first, better os regex (#16223)

* Revoke for user and admin user token manage (#16223)

* Tidying and styling (#16223)

* Tidying and styling (#16223)

* Update to use #16222 (#16223)

* Update for changes to 16222

* update per api issue
2019-06-11 14:23:54 +02:00