1051 Commits

Author SHA1 Message Date
5aab6b5c20 removes last pieces of dashboard.json 2017-12-07 16:26:07 +01:00
f5eac2e91d dashboards as cfg: expose dashboard service as interface 2017-12-07 15:27:01 +01:00
16f072b320 dashboards as cfg: move saving logic for dashboards into its own service 2017-12-07 15:27:01 +01:00
9cebb23e01 dashboards as cfg: revert minor changes 2017-12-07 15:27:01 +01:00
d6d64c53cd typo 💥 2017-12-01 16:23:55 +01:00
3f95180c98 fix render http[get] params error 2017-11-28 22:20:22 +08:00
3a772c7f7f allows head requests for /api/health endpoint
closes #9955
2017-11-21 15:03:04 +01:00
0d12b37dfd fix: alert list panel now works correctly after adding manual annotation on dashboard, fixes #9951 2017-11-21 11:28:17 +01:00
303e3de488 fix: fix for avatar images when gzip is turned on, fixes #5952 2017-11-17 13:13:58 +01:00
0f69e06fcf removes invalid comment 2017-11-16 16:55:02 +01:00
909601d6ab api: fix so that datasources functions returns Response 2017-11-16 16:29:05 +01:00
89b27b35ba fix: Use Response as return type 2017-11-16 16:19:01 +01:00
540d540ea9 fix: return id from api when creating new annotation/graphite annotation, fixes #9798
When creating a region annotation the response will include both
id (region start id) and endId (region end id), if not only id.
2017-11-16 16:19:01 +01:00
36676e23c1 datasource as cfg: adds readonly datasources 2017-11-15 14:30:32 +01:00
0d85c63fff middleware: recovery handles panics in all handlers
Also, changes the order of the middleware so that recovery is after the
gzip middleware. Otherwise, a 200 OK is returned instead of a 500 error.
2017-11-15 13:57:33 +01:00
c91a1e994b Merge pull request #9594 from bergquist/datasources_optimistic_concurrency
datasources: change to optimistic concurrency
2017-10-25 12:44:36 +02:00
d68bfaa8be datasource as cfg: typo 2017-10-25 12:21:06 +02:00
9b6535cca1 alerting: only editors can pause rules
closes #9640
2017-10-24 11:01:08 +02:00
9cce5217d0 build: fixed gofmt issue and addd mock response feature 2017-10-23 09:57:28 +02:00
139f077453 prometheus: enable gzip for /metrics endpoint
closes #9464
2017-10-23 09:35:46 +02:00
1fd2270a93 build: split circle test shell scripts 2017-10-23 09:06:50 +02:00
89923bf77a datasources: change to optimisic concurrency
prerequisite for #9504
2017-10-23 07:55:16 +02:00
74e90d01ec Fixes for annotations API (#9577)
* annotations: throw error if no text specified and set default time to Now() if empty, #9571

* annotations: fix saving graphite event with empty string tags

* docs: add /api/annotations/graphite endpoint docs, #9571
2017-10-18 10:13:02 +02:00
b5727949fd logging: dont use cli logger in http_server 2017-10-12 15:29:01 +02:00
88f55b01d8 oauth: raise error if session state is missing
ref #9476
2017-10-12 15:25:27 +02:00
0848ba2e9c oauth: provide more logging for failed oauth requests 2017-10-12 15:25:27 +02:00
ee5f69beb4 metrics: disable gzip for /metrics endpoint (#9468)
Prometheus client lib support gzip by itself. Which caused the
response to be double gzipped sometimes. We should use the Grafana
middle ware instead.

closes #9464
2017-10-12 12:02:36 +02:00
9d53653647 Merge pull request #9378 from mattbostock/verify_tls
Bugfix: Always verify TLS unless explicitly told otherwise
2017-10-12 11:11:02 +02:00
4ca3cc90dd Merge branch 'mattbostock-verify_datasource_tls' 2017-10-12 10:39:07 +02:00
c0d257a0ee Merge branch 'verify_datasource_tls' of https://github.com/mattbostock/grafana into mattbostock-verify_datasource_tls 2017-10-12 10:15:32 +02:00
04ea7efac9 annotations: add endpoint for writing graphite-like events (#9495)
* annotations: add endpoint for writing graphite-like events

* annotations: fix new line handling in tooltip

* annotations: support tags in prior to Graphite 0.10.0 format
2017-10-12 10:12:15 +02:00
a286ffa5f2 Alias macron package in app_routes.go
...to make this file compatible with goimports:
https://godoc.org/golang.org/x/tools/cmd/goimports
2017-10-11 08:18:03 +01:00
8423260f58 gzip: plugin readme content set explicitly
Macaron's gzip middleware tries to automatically figure out the content
type for a file when gzipped and seems to mostly fail with plugin
readmes. This change sets the content type to plain text.

Fixes #9344. Ref #5952.
2017-10-09 10:17:45 +02:00
25aa9df270 Create annotations (#8197)
* annotations: add 25px space for events section

* annotations: restored create annotation action

* annotations: able to use fa icons as event markers

* annotations: initial emoji support from twemoji lib

* annotations: adjust fa icon position

* annotations: initial emoji picker

* annotation: include user info into annotation requests

* annotation: add icon info

* annotation: display user info in tooltip

* annotation: fix region saving

* annotation: initial region markers

* annotation: fix region clearing (add flot-temp-elem class)

* annotation: adjust styles a bit

* annotations: minor fixes

* annoations: removed userId look in loop, need a sql join or a user cache for this

* annotation: fix invisible events

* lib: changed twitter emoij lib to be npm dependency

* annotation: add icon picker to Add Annotation dialog

* annotation: save icon to annotation table

* annotation: able to set custom icon for annotation added by user

* annotations: fix emoji after library upgrade (switch to 72px)

* emoji: temporary remove bad code points

* annotations: improve icon picker

* annotations: icon show icon picker at the top

* annotations: use svg for emoji

* annotations: fix region drawing when add annotation editor opened

* annotations: use flot lib for drawing region fill

* annotations: move regions building into event_manager

* annotations: don't draw additional space if no events are got

* annotations: deduplicate events

* annotations: properly render cut regions

* annotations: fix cut region building

* annotations: refactor

* annotations: adjust event section size

* add-annotations: fix undefined default icon

* create-annotations:  edit event (frontend part)

* fixed bug causes error when hover event marker

* create-annotations:  update event (backend)

* ignore grafana-server debug binary in git (created VS Code)

* create-annotations: use PUT request for updating annotation.

* create-annotations: fixed time format when editing existing event

* create-annotations: support for region update

* create-annotations: fix bug with limit and event type

* create-annotations: delete annotation

* create-annotations: show only selected icon in edit mode

* create-annotations: show event editor only for users with at least Editor role

* create-annotations: handle double-sized emoji codepoints

* create-annotations: refactor

use CP_SEPARATOR from emojiDef

* create-annotations: update emoji list, add categories.

* create-annotations: copy SVG emoji into public/vendor/npm and use it as a base path

* create-annotations: initial tabs for emoji picker

* emoji-picker: adjust styles

* emoji-picker: minor refactor

* emoji-picker: refactor - rename and move into one directory

* emoji-picker: build emoji elements on app load, not on picker open

* emoji-picker: fix emoji searching

* emoji-picker: refactor

* emoji-picker: capitalize category name

* emoji-picker: refactor

move buildEmojiElem() into emoji_converter.ts for future reuse.

* jquery.flot.events: refactor

use buildEmojiElem() for making emojis, remove unused code for font awesome based icons.

* emoji_converter: handle converting error

* tech: updated

* merged with master

* shore: clean up some stuff

* annotation: wip tags

* annotation: filtering by tags

* tags: parse out spaces etc. from a tags string

* annotations: use tagsinput component for tag filtering

* annotation: wip work on how we query alert & panel annotations

* annotations: support for updating tags in an annotation

* linting

* annotations: work on unifying how alert history annotations and manual panel annotations are created

* tslint: fixes

* tags: create tag on blur as well

Currently, the tags directive only creates the tag when the
user presses enter. This change means the tag is created on
blur as well (when the user clicks outside the input field).

* annotations: fix update after refactoring

* annotations: progress on how alert annotations are fetched

* annotations: minor progress

* annotations: progress

* annotation: minor progress

* annotations: move tag parsing from tooltip to ds

Instead of parsing a tag string into an array in the annotation_tooltip
class, this moves the parsing to the datasources. InfluxDB ds already
does that parsing. Graphite now has it.

* annotations: more work on querying

* annotations: change from tags as string to array

when saving in the db and in the api.

* annotations: delete tag link if removed on edit

* annotation: more work on depricating annotation title

* annotations: delete tag links on delete

* annotations: fix for find

* annotation: added user to annotation tooltip and added alertName to annoation dto

* annotations: use id from route instead from cmd for updating

* annotations: http api docs

* create annotation: last edits

* annotations: minor fix for querying annotations before dashboard saved

* annotations: fix for popover placement when legend is on the side (and doubel render pass is causing original marker to be removed)

* annotations: changing how the built in query gets added

* annotation: added time to header in edit mode

* tests: fixed jshint built issue
2017-10-07 10:31:39 +02:00
83f1ae4e3e OAuth: Rename sslcli
Rename `sslcli` to the more descriptive `oauthClient`.
2017-10-06 17:10:03 +01:00
ccf093da81 OAuth: Separate TLS client auth and CA config
It should be specify to either use TLS client authentication or use a
user-supplied CA; previously you had to enable client authentication to
use a custom CA.
2017-10-06 17:10:03 +01:00
f2f8ca52d9 OAuth: Check both TLS client cert and key
If either is set, try to use them.

This should help avoid a situation where someone has half-configured TLS
client authentication and it doesn't work without raising an obvious
error.
2017-10-06 17:10:03 +01:00
16c5d0e4b7 Always verify TLS unless explicitly told otherwise
TLS was not being verified in a number of places:

- connections to grafana.com

- connections to OAuth providers when TLS client authentication was
  enabled

- connections to self-hosted Grafana installations when using the CLI
  tool

TLS should always be verified unless the user explicitly enables an
option to skip verification.

Removes some instances where `InsecureSkipVerify` is explicitly set to
`false`, the default, to help avoid confusion and make it more difficult
to regress on this fix by accident.

Adds a `--insecure` flag to `grafana-cli` to skip TLS verification.

Adds a `tls_skip_verify_insecure` setting for OAuth.

Adds a `app_tls_skip_verify_insecure` setting under a new `[plugins]`
section.

I'm not super happy with the way the global setting is used by
`pkg/api/app_routes.go` but that seems to be the existing pattern used.
2017-10-06 17:09:27 +01:00
fe9fca381c move cloudwatch crendential related code 2017-09-29 13:45:11 +09:00
4f5f38f41b remove old handler 2017-09-29 13:45:11 +09:00
1dcc51adce re-implement dimension_values() 2017-09-29 13:44:01 +09:00
78e3556e95 remove performEC2DescribeInstances() 2017-09-29 13:44:01 +09:00
f66e1c02a6 remove obsolete GetMetricStatistics() 2017-09-29 13:44:01 +09:00
f590db1b78 move test code 2017-09-29 13:44:01 +09:00
feed90c0e2 re-implement get regions 2017-09-29 13:44:01 +09:00
0c95148486 move the metric find query code 2017-09-29 13:44:01 +09:00
d31f264576 cache creds for keys/credentials auth type 2017-09-29 13:44:00 +09:00
39607d09d7 (cloudwatch) alerting 2017-09-29 13:44:00 +09:00
e9e8ffc769 Merge pull request #9367 from bobrik/dualstack
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
9a4ae30227 Enable dualstack in every net.Dialer, fixes #9364
Default transport enables it:

* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46

```
    DialContext: (&net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
    }).DialContext,
```

See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00