Commit Graph

644 Commits

Author SHA1 Message Date
bergquist
ebbfc529e0 datasource as cfg: support globbing 2017-11-15 14:30:32 +01:00
bergquist
36676e23c1 datasource as cfg: adds readonly datasources 2017-11-15 14:30:32 +01:00
bergquist
0f29b8ac83 datasources as cfg: tests for insert/updating datasources 2017-11-15 14:30:32 +01:00
Alexander Zobnin
08e2bbef83 dashboard history: clean up dashboard version history 2017-11-14 18:22:18 +03:00
Torkel Ödegaard
9605ab4475 Merge branch 'master' into develop 2017-10-26 15:59:50 +02:00
bergquist
d68bfaa8be datasource as cfg: typo 2017-10-25 12:21:06 +02:00
bergquist
89923bf77a datasources: change to optimisic concurrency
prerequisite for #9504
2017-10-23 07:55:16 +02:00
Torkel Ödegaard
fff0fa2aee Merge branch 'master' into develop 2017-10-22 11:51:14 +02:00
bergquist
b3a8d93dca mysql: add usage stats for mysql 2017-10-19 10:30:54 +02:00
Torkel Ödegaard
88ceb19d96 Merge branch 'master' into develop 2017-10-12 16:32:44 +02:00
bergquist
4ca3cc90dd Merge branch 'mattbostock-verify_datasource_tls' 2017-10-12 10:39:07 +02:00
bergquist
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
Torkel Ödegaard
ad1d69861e Merge branch 'master' of github.com:grafana/grafana into develop 2017-10-11 16:47:16 +02:00
Matt Bostock
4f3856adfb Retain old name for TLS client auth
I renamed `tlsAuth` to `tlsClientAuth` to better describe the fact that
this variable is used to enable TLS client authentication (as opposed to
server authentication) in c04d95f35.

However, changing the name breaks backwards compatibility for existing
installations using this feature and Grafana does not have a
standardised way of migrating changes in the schema:
https://github.com/grafana/grafana/pull/9377#issuecomment-333063543

For reasons of expediency given the severity of the bug (not verifying
TLS), keep the old name.
2017-10-11 08:18:04 +01:00
Matt Bostock
f6aa0e41e5 Return error if datasource TLS CA not parsed 2017-10-11 08:18:03 +01:00
Matt Bostock
5d312be419 Datasource HTTP settings: Add TLS skip verify
In c04d95f35 I changed the default for datasource HTTP requests so that
TLS is always verified.

This commit adds a checkbox to allow an admin to explicitly skip TLS
verification, for testing purposes.
2017-10-11 08:18:03 +01:00
Matt Bostock
43169e4302 Verify datasource TLS and split client auth and CA 2017-10-11 08:18:03 +01:00
Matt Bostock
592c46c8b5 Tests: Clarify what InsecureSkipVerify does 2017-10-11 08:18:03 +01:00
Daniel Lee
d1c9760fa8 Postgres Data Source (#9475)
* add postgresql datasource

* add rest of files for postgres datasource

* fix timeseries query, remove unused code

* consistent naming, refactoring

* s/mysql/postgres/

* s/mysql/postgres/

* couple more tests

* tests for more datatypes

* fix macros for postgres

* add __timeSec macro

* add frontend for postgres datasource

* adjust documentation

* fix formatting

* add proper plugin description

* merge editor changes from mysql

* port changes from mysql datasource

* set proper defaultQuery for postgres

* add time_sec to timeseries query
accept int for value for timeseries query

* revert allowing time_sec and handle int or float values as unix
timestamp for "time" column

* fix tslint error

* handle decimal values in timeseries query

* allow setting sslmode for postgres datasource

* use type switch for handling data types

* fix value for timeseries query

* refactor timeseries queries to make them more flexible

* remove debug statement from inner loop in type conversion

* use plain for loop in getTypedRowData

* fix timeseries queries

* adjust postgres datasource to tsdb refactoring

* adjust postgres datasource to frontend changes

* update lib/pq to latest version

* move type conversion to getTypedRowData

* handle address types cidr, inet and macaddr

* adjust response parser and docs for annotations

* convert unknown types to string

* add documentation for postgres datasource

* add another example query with metric column

* set more helpful default query

* update help text in query editor

* handle NULL in value column of timeseries query

* add __timeGroup macro

* add test for __timeGroup macro

* document __timeGroup and set proper default query for annotations

* fix typos in docs

* add postgres to list of datasources

* add postgres to builtInPlugins

* mysql: refactoring as prep for merging postgres

Refactors out the initialization of the xorm engine and the query logic
for an sql data source.

* mysql: rename refactoring + test update

* postgres:refactor to use SqlEngine(same as mysql)

Refactored to use a common base class with the MySql data source.

Other changes from the original PR:
- Changed time column to be time_sec to allow other time units in the
future and to be the same as MySQL
- Changed integration test to test the main Query method rather than
the private transformToTable method
- Changed the __timeSec macro name to __timeEpoch
- Renamed PostgresExecutor to PostgresQueryEndpoint

Fixes #9209 (the original PR)

* postgres: encrypt password on config page

With some other cosmetic changes to the config page:
- placeholder texts
- reset button for the password after it has been encrypted.
- default value for the sslmode field.

* postgres: change back col name to time from time_sec

* postgres mysql: remove annotation title

Title has been removed from annotations

* postgres: fix images for docs page

* postgres mysql: fix specs
2017-10-10 15:19:14 +02:00
Alexander Zobnin
473c47cd1c snapshots: improve snapshot listing performance, #9314 (#9477)
exclude dashboard field from snapshot list search
2017-10-10 14:25:19 +02:00
Torkel Ödegaard
647a3cc5ae Merge branch 'master' into develop 2017-10-09 16:01:54 +02:00
Torkel Ödegaard
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
Torkel Ödegaard
d38c891fac merge with master 2017-10-02 14:14:45 +02:00
Carl Bergquist
e9e8ffc769 Merge pull request #9367 from bobrik/dualstack
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
Torkel Ödegaard
5849fbf04e Merge branch 'master' of github.com:grafana/grafana into develop 2017-09-28 10:37:57 +02:00
Ivan Babrou
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
bergquist
8175783f93 go fmt 2017-09-24 18:59:21 +02:00
bergquist
c927209447 Merge branch 'master' of https://github.com/BrandonArp/grafana into BrandonArp-master 2017-09-24 18:56:46 +02:00
Torkel Ödegaard
41e01184aa Merge branch 'master' into develop 2017-09-18 12:32:29 +02:00
bergquist
93cff1a42a move more known datasources from others 2017-09-15 14:26:29 +02:00
Brandon Arp
cffbcb504d allow ssl renegotiation for datasources 2017-09-13 16:20:24 -07:00
Torkel Ödegaard
011c582ebb minor user avatar stuff 2017-08-18 14:49:04 +02:00
Torkel Ödegaard
bb7b55277c users view update 2017-08-18 08:17:35 +02:00
Torkel Ödegaard
95f5c84a57 ux: making org visibile in profile view 2017-08-16 15:03:49 +02:00
Torkel Ödegaard
1dab313ca3 Merge branch 'master' into develop 2017-08-14 10:30:36 +02:00
Torkel Ödegaard
e8a20643d6 feat: store last seen date for users and present in stats and user lists, closes #9007 2017-08-09 10:36:41 +02:00
Torkel Ödegaard
9fb60c2fc8 Merge branch 'develop' into panel-title-menu-ux 2017-08-02 09:56:08 +02:00
Daniel Lee
b8aa203707 signup: fix email sent logic for tempuser
Fixes #8656 and properly sets the email_sent and email_sent_on fields
for a tempuser (signup user).
2017-06-30 20:21:08 +02:00
Denis Doria
5aac2d2078 Include user Id on the lookup api (#8698)
Implements feature request #8682
2017-06-25 14:23:03 +02:00
Torkel Ödegaard
1833c65559 Merge branch 'develop' of github.com:grafana/grafana into develop 2017-06-23 16:07:16 -04:00
Torkel Ödegaard
fc69d59cae dashboard folder search fix 2017-06-23 16:00:26 -04:00
Daniel Lee
01ac3a49bd dashfolders: fix user group picker + cleanup 2017-06-23 20:56:02 +02:00
Torkel Ödegaard
9c6c8c0f3f acl fixes 2017-06-22 17:10:43 -04:00
Torkel Ödegaard
2257c1f874 dashboard acl work 2017-06-21 19:02:03 -04:00
Torkel Ödegaard
48305b5789 dashboard acl 2017-06-21 14:19:08 -04:00
Torkel Ödegaard
fcc8557dbb dashboard acl work 2017-06-21 14:11:16 -04:00
Torkel Ödegaard
43ffe826fa dashboard acl work 2017-06-20 17:18:20 -04:00
Torkel Ödegaard
212a66ae5f Merge branch 'dashboard_folders' of github.com:grafana/grafana into dashboard_folders 2017-06-19 18:55:34 -04:00
Daniel Lee
812112f2f6 WIP: fix acl route 2017-06-20 00:34:25 +02:00
Torkel Ödegaard
e290015887 refactoring: renaming 2017-06-19 18:19:58 -04:00
Torkel Ödegaard
aaf2a897b0 folders: changed api urls for dashboard acls 2017-06-19 18:11:30 -04:00
Torkel Ödegaard
c4a1803060 refactoring more renaming 2017-06-19 17:30:54 -04:00
Torkel Ödegaard
e0b9ba7554 refactoring renaming dashboard folder operations 2017-06-19 17:15:25 -04:00
Torkel Ödegaard
d6341162cb refactoring dashboad folder acl checks 2017-06-19 11:54:37 -04:00
Torkel Ödegaard
b494fd7689 dashboard folders acl work 2017-06-19 11:03:54 -04:00
Torkel Ödegaard
cbbbccf12a refactoring dashoard folder guardian 2017-06-17 18:24:38 -04:00
Torkel Ödegaard
3fe031d25d refactoring: Dashboard guardian 2017-06-16 21:25:24 -04:00
Daniel Lee
dd02bf7c9b WIP: adds API check to stop folders being included in folders 2017-06-16 02:45:47 +02:00
Daniel Lee
699f9095e2 WIP: remove permissions when deleting global user 2017-06-14 23:45:30 +02:00
Daniel Lee
9f79b9b8c5 WIP: fix go fmt error 2017-06-12 15:49:09 +02:00
Daniel Lee
9eccb4e79f WIP: API - add dash permission 2017-06-12 15:49:09 +02:00
Daniel Lee
2097ed0bb8 WIP: Permission Type as string in permission query 2017-06-12 15:49:09 +02:00
Daniel Lee
5c89c4b2bd WIP: dashlist in template for new folder 2017-06-12 15:49:09 +02:00
Daniel Lee
fff7b706d6 WIP: user group additions 2017-06-12 15:49:09 +02:00
Daniel Lee
f1e1da39e3 WIP: get Dashboard Permissions
The guardian class checks if the user is allowed to get the
permissions for a dashboard.
2017-06-12 15:49:09 +02:00
Daniel Lee
13314f23ba WIP: Can remove dashboard permission - sql 2017-06-12 15:49:09 +02:00
Daniel Lee
97c13b77bf WIP: Add or update Dashboard ACL
SQL Integration Tests for the guardian class too.
2017-06-12 15:49:09 +02:00
Daniel Lee
3785894b40 WIP: guardian service for search
Removes restricted dashboards from search result.
2017-06-12 15:49:09 +02:00
Daniel Lee
552935031b WIP: API methods for add/remove members to user group 2017-06-12 15:49:09 +02:00
Daniel Lee
0a1df0905e WIP: add update user group command 2017-06-12 15:49:09 +02:00
Daniel Lee
233cd7af4a WIP: add user group search 2017-06-12 15:49:09 +02:00
Daniel Lee
af67aea2a9 WIP: add usergroup commands and queries 2017-06-12 15:49:09 +02:00
Daniel Lee
1248728d7f WIP: rough prototype of dashboard folders
Breaks some stuff like selected dash in the search result.
In dashboard search, if the user is not searching then the result is
returned as a tree structure. No ACL's or user group ux yet.
2017-06-12 15:49:09 +02:00
Torkel Ödegaard
e2061312f5 refactoring: moved compare dashboard version command out of sqlstore, the code in this command did not use any sql operations and was more high level, could be moved out and use existing queries to get the versions 2017-06-06 00:15:40 +02:00
Torkel Ödegaard
746d6cdc88 refactoring: changed name on compare command to make properties more explainatory 2017-06-05 23:29:25 +02:00
Torkel Ödegaard
cabbfe9adc refactoring: moved dashboard history item formating (message) and fixed dashboard history migration issue, and removed from frontend tests that where no longer needed 2017-06-05 22:59:04 +02:00
Torkel Ödegaard
c87418d060 refactoring: Dashboard history restore operation is now reusing existing
operations instead of duplicating a bunch of get & save logic.
2017-06-05 17:45:27 +02:00
Torkel Ödegaard
e18007153d refactoring: Renamed dashboard version queries that wrongly had Command suffix, added missing OrgId to dashboard history commands and queries 2017-06-05 16:34:32 +02:00
sanchitraizada
77c046aac6 Implement review feedback 2017-06-01 17:57:09 -04:00
sanchitraizada
e6616cc551 Merge pull request #10 from walmartlabs/version-control
History and Version Control for Dashboard Updates
2017-05-25 14:50:47 -07:00
Ben Tranter
b6e46c9eb8 History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.

Goals

1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.

Usage

Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.

Overview of Changes

Backend Changes

- A `dashboard_version` table was created to store each dashboard
  version, along with a dashboard version model and structs to represent
  the queries and commands necessary for the dashboard version API
  methods.
- API endpoints were created to support working with dashboard
  versions.
- Methods were added to create, update, read, and destroy dashboard
  versions in the database.
  - Logic was added to compute the diff between two versions, and
  display it to the user.
  - The dashboard migration logic was updated to save a "Version
  1" of each existing dashboard in the database.

Frontend Changes

- New views
- Methods to pull JSON and HTML from endpoints

New API Endpoints

Each endpoint requires the authorization header to be sent in
the format,

```
Authorization: Bearer <jwt>
```

where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.

`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`

Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:

- `orderBy` String to order the results by. Possible values
  are `version`, `created`, `created_by`, `message`. Default
  is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from

`GET "/api/dashboards/db/:dashboardId/versions/:id"`

Get an individual dashboard version by ID, for the given
dashboard ID.

`POST "/api/dashboards/db/:dashboardId/restore"`

Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.

```json
{
  "dashboardId": <int>,
  "version": <int>
}
```

`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`

Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.

Dependencies Added

- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
  was added and vendored.
2017-05-24 19:14:39 -04:00
Torkel Ödegaard
c34db77f04 grafana_com: changed name of oauth grafana_net integration (old settings names still work), and updated login button look, closes #8415 2017-05-22 14:56:50 +02:00
Torkel Ödegaard
4ce0bf4d16 mysql: improved mysql data source, added test feature when adding data source, fixed cache issue 2017-05-11 10:50:24 +02:00
Torkel Ödegaard
368e847d12 feat: added api health endpoint that does not require auth and never creates sessions, returns db status as well. #3302 2017-04-25 17:17:45 +02:00
Torkel Ödegaard
87c978ebc9 fix: better error handling / messsage when testing email notification when stmp is not configured, fixes #8093 2017-04-25 13:16:41 +02:00
Dan Cech
b489e93d94 Config Array Syntax (#8204)
* refactor util encryption library so it doesn't have to import log

* add util.SplitString to handle space and/or comma-separated config lines

* go fmt
2017-04-25 09:14:29 +02:00
Dan Cech
f490c5f12c use X-Grafana-Org-Id header to ensure backend uses correct org (#8122) 2017-04-14 15:47:39 +02:00
Torkel Ödegaard
1cd632cc43 plugins: added state property to plugins 2017-04-07 12:00:03 +02:00
Torkel Ödegaard
d6d2080f11 mysql: minor progress on response processing 2017-03-31 11:45:25 +02:00
Torkel Ödegaard
bd4f073425 mysql: minor update 2017-03-30 20:23:40 +02:00
Torkel Ödegaard
998f04e1e8 mysql: testdata 2017-03-30 20:01:04 +02:00
Torkel Ödegaard
6965064ea9 Merge branch 'master' into sql-proxy 2017-03-29 16:40:14 +02:00
Andrzej Ressel
1bf982439b Sending image 2017-03-23 21:53:54 +01:00
bergquist
00dddca26a alerting: dedupe alert notifications when running multiple servers
alert notifications will only be sent if the database value
is updated.

ref #6957
2017-02-21 16:54:49 +01:00
bergquist
52566376b2 tech(server): remove unused code 2017-02-17 10:18:11 +01:00
Daniel Lee
193d468ed3 admin: adds paging to global user list
Currently there is a limit of 1000 users in the global
user list. This change introduces paging so that an
admin can see all users and not just the first 1000.

Adds a new route to the api - /api/users/search that
returns a list of users and a total count. It takes
two parameters perpage and page that enable paging.

Fixes #7469
2017-02-13 12:59:36 +01:00
huydx
143cbe921f (feat) support datasource delete by name api 2017-02-10 23:30:14 +09:00
Torkel Ödegaard
01f1c1b8dc feat(): began refactoring PR #5364 2017-01-31 17:10:27 +01:00
Torkel Ödegaard
fce2e341d2 mergefix(): fixed issue with master merge 2017-01-31 09:00:36 +01:00
Torkel Ödegaard
8a95c563bb Merge branch 'master' into websocket 2017-01-31 08:56:49 +01:00
huydx
376d2d56bf (feature) add LINE notify to notifier 2017-01-19 17:26:53 +09:00
bergquist
9a3e51894b tech(alerting): remove unused property 2017-01-03 08:11:17 +01:00
Torkel Ödegaard
8bccbdafd2 feat(live): minor progress on stream manager 2016-12-21 09:16:29 +01:00
bergquist
6c2c3c7e24 Revert "fix(alerting): pause dto can only pause one"
This reverts commit b2c5a6a037.
2016-12-19 16:07:55 +01:00
bergquist
b2c5a6a037 fix(alerting): pause dto can only pause one 2016-12-19 16:05:24 +01:00
bergquist
ecdf1888c4 feat(alerting): removes pause per datasource 2016-12-19 13:24:45 +01:00
bergquist
fb6aa0e026 feat(api): adds endpoint for mass pausing alerts
ref #6589
2016-12-16 15:00:58 +01:00
bergquist
c467e48940 feat(notifications): removes html escaping subject
closes #6905
2016-12-15 14:27:33 +01:00
bergquist
ca7baca21d feat(alerting): adds ok as no data option
closes #6866
2016-12-15 11:13:19 +01:00
bergquist
96e8ecfa7b feat(cli): adds command to reset admin password
closes #5479
2016-12-09 15:25:02 +01:00
Torkel Ödegaard
dee6b7d150 Merge branch 'master' into getting-started-panel 2016-12-08 08:51:40 +01:00
Carl Bergquist
2c7adccf12 Use cache for http.client in tsdb package. (#6833)
* datasource: move caching closer to datasource struct

* tsdb: use cached version of datasource http transport

closes #6825
2016-12-07 11:10:42 +01:00
Pavlos Daoglou
7f7f080ad8 [5443] Check if title is empty before save a new dashboard 2016-11-29 12:25:20 +02:00
Daniel Lee
c9b2c694f1 refactor(dataproxy): TLS Client Auth
Use a SecureJsonData field for TLS
Client Auth instead of 3 new db
fields. Same model as used for
PluginSettings.

Saves and encrypts the pem file
content rather than just saving
the paths to the cert and key.
This allows for uploading from
the Edit Datasource page in
Grafana.
2016-11-24 13:22:25 +01:00
Daniel Lee
af07adb146 refactor(securejsondata): extract to class
Extract from pluginsettings class so that the
securejsondata type can be used in the other
classes. Encrypt and decrypt functions
extracted too.
2016-11-24 13:22:25 +01:00
Joe Lanford
56b7e2dfaf Added support for TLS client auth for datasource proxies (#5801) 2016-11-24 13:22:25 +01:00
Torkel Ödegaard
fd512457d8 Merge remote-tracking branch 'origin/master' into getting-started-panel-css2 2016-11-18 16:31:54 +01:00
bergquist
a87fd11f26 feat(stats): add alerts to global admin stats 2016-11-11 14:04:38 +01:00
bergquist
ad97db937c feat(stats_usage): add stats about alerts 2016-11-11 13:57:11 +01:00
Torkel Ödegaard
fb57bf77da ux(getting started): progress on getting started panel and persited help flag states, #6466 2016-11-09 10:41:39 +01:00
bergquist
5bbdd99d35 tech(notifications): remove async webhook 2016-11-08 08:06:42 +01:00
bergquist
489f087fbd feat(alerting): reduce states. Make exeuction result configurable.
ref #6444
2016-11-07 12:42:39 +01:00
utkarshcmu
d9f2519916 Renamed Initialized to Pending 2016-11-01 07:30:55 -07:00
utkarshcmu
4c64e45a59 Added initalized state to alerts 2016-10-28 14:44:45 -07:00
Carl Bergquist
bc90e6ce46 Alerting: Keep last state on no data (#6354)
* feat(alerting): add support to keep last state on no data

closes #6332

* refactoring(alerting PR #6354): added new option type for NoData option so AlertStateType does not have to contain invalid state, #6354
2016-10-22 10:56:04 +02:00
bergquist
5bf5ed68e1 tech(notifications): replace internal email code 2016-10-21 09:06:03 +02:00
bergquist
f77799837e feat(alerting): support for attached graphs in alert notifications
closes #6183
2016-10-21 09:06:03 +02:00
Eric Uldall
eda442dbf9 added support to login user oauth user by email only (#6330)
* added support to login user oauth user by email only

* added sql handler

* fixed model method name from GetUserByEmail to GetUserByEmailQuery

* fixed variable declaration typo
2016-10-20 06:45:10 +02:00
bergquist
d1eceedf55 feat(webhook): add httpmethod to webhook
closes #6255
2016-10-18 16:50:16 +02:00
bergquist
804797245d feat(alerting): make it possible to pause from alert tab 2016-10-11 08:40:38 +02:00
bergquist
f3825263d4 feat(alerting): add pause button in alert list 2016-10-10 15:17:14 +02:00
bergquist
264590a9c2 feat(alerting): add paused api endpoint 2016-10-10 14:26:09 +02:00
Carl Bergquist
c38f6ff182 Make alerting notifcations sync (#6158)
* tech(routines): move the async logic from notification to alerting notifier

* tech(notification): reduce code dupe

* fix(notification): dont touch the response unless its an error

* feat(alerting): make alerting exeuction async but flow sync

* tech(alerting): remove commented code

* tech(alerting): remove unused code

* tech(alerting): fix typo

* tech(alerting): implement Context on EvalContext

* tech(alerting): wait for all alerts to return

* feat(alerting): dont allow alert responses to cancel

* Revert "feat(alerting): dont allow alert responses to cancel"

This reverts commit 324b006c96.

* feat(alerting): give alerts some time to finish before closing down
2016-10-03 09:38:03 +02:00
Torkel Ödegaard
a6918617ff feat(api): fixed minor issue with error message when trying to create duplicate datasource, fixes #6164 2016-10-01 16:41:27 +02:00
Torkel Ödegaard
7c339f0794 feat(alerting): show alertin state in panel header, closes #6136 2016-09-30 17:37:47 +02:00
Torkel Ödegaard
86b546c21d refactor(main): refactoring main grafana server / startup code 2016-09-30 08:36:20 +02:00
Torkel Ödegaard
c28d004731 Merge branch 'go_routines' 2016-09-28 21:06:07 +02:00
Torkel Ödegaard
71e2c6f6ef refactor(backend): refactoring management of go routines in backend 2016-09-28 21:06:00 +02:00
Torkel Ödegaard
5ccdbf01fd merge with master 2016-09-28 13:02:15 +02:00
bergquist
dbb7852f21 feat: purge old files and snapshots
closes #4087
closes #2172
2016-09-26 14:33:40 +02:00
Torkel Ödegaard
6574dfacfb feat(internal metrics): added some total stats to metrics reporting, closes #5865 2016-09-22 11:16:19 +02:00
Torkel Ödegaard
39af588a94 fix(playlist): fixed sorting issue with playlist playback, fixes #5467 2016-09-22 10:06:03 +02:00
Dan Cech
630a8ed8aa support setting default org role when adding user via grafana.net auth 2016-09-20 12:36:36 -04:00
Dan Cech
fc17ed351c support logging in with grafana.net credentials 2016-09-19 16:48:07 -04:00
bergquist
a23b7f1371 fix(alerting): add missing evaldata field to set state command 2016-09-14 14:35:05 +02:00
bergquist
d0f9623037 feat(alertlistpanel): support state filter
ref #5981
2016-09-14 10:49:05 +02:00
Torkel Ödegaard
b0c7e61ef8 feat(alerting): removed severity 2016-09-13 15:09:55 +02:00
bergquist
bec099cd84 tech: remove unused files 2016-09-08 11:41:56 +02:00
bergquist
374016b9b5 Merge branch 'kfitzpatrick-custom-github-style-oauth' 2016-09-07 11:07:30 +02:00
bergquist
53dddf1a8f fix(oauth): remove github refs from generic auth 2016-09-07 10:55:46 +02:00
Torkel Ödegaard
fbae6abb3c feat(alerting): progress on handling no data in alert query, #5860 2016-09-06 20:40:12 +02:00
bergquist
2ca7284a56 tech(notifications): splitt into 3 queries
closes #5883
2016-09-06 08:43:15 +02:00
bergquist
c893e5d241 feat(notifications): add support for default notifications
ref #5883
2016-09-05 21:35:37 +02:00
Torkel Ödegaard
09cdf3e9e1 feat(alerting): show execution errors in alert list 2016-08-18 11:37:35 +02:00
Torkel Ödegaard
63a283b4bc feat(alerting): working on alert state filters for alert list 2016-08-17 11:00:00 +02:00
bergquist
6497b307c4 feat(alerting): save execution error upon state changed 2016-08-17 09:27:29 +02:00
bergquist
9915f15ed0 feat(alerting): adds sql layer for saving execution errors 2016-08-17 07:49:14 +02:00
Torkel Ödegaard
f934081bcb feat(alerting): making progress on alerting list, #5784 2016-08-16 09:52:45 +02:00
Torkel Ödegaard
0392fde34e feat(alerting): doing schema changes 2016-08-15 15:12:43 +02:00
bergquist
16e75a3036 feat(alerting): add alert message to slack integration 2016-08-12 10:12:04 +02:00
Torkel Ödegaard
357358898d feat(annotations): working on alert annotations, #5694 2016-08-01 10:07:00 +02:00
Torkel Ödegaard
4fc50742a0 feat(alerting): working on image rendering with alert notifications 2016-07-29 14:55:02 +02:00
Torkel Ödegaard
a6c6094775 feat(alerting): started reworking notifications 2016-07-22 16:45:17 +02:00
Torkel Ödegaard
7eb2d2cf47 feat(alerting): working on state management 2016-07-22 13:14:09 +02:00
Torkel Ödegaard
783d697529 feat(alerting): more output when testing alert 2016-07-21 21:54:12 +02:00
Torkel Ödegaard
f872d5cfa3 feat(alerting): more refactoring work in backend code 2016-07-19 22:36:59 +02:00
Torkel Ödegaard
0f555d6ab5 fix(alerting): minor fix 2016-07-19 09:28:49 +02:00
Torkel Ödegaard
f13b869aa4 feat(alerting): work on alerting 2016-07-14 13:32:16 +02:00
Torkel Ödegaard
d9096110f8 Merge branch 'master' into alerting
Conflicts:
	pkg/api/dashboard.go
	pkg/models/dashboards.go
	pkg/services/sqlstore/dashboard.go
2016-07-11 18:28:07 +02:00
Torkel Ödegaard
68a8d9bc91 feat(apps): more work on plugin dashboard sync 2016-07-08 13:41:46 +02:00
Torkel Ödegaard
85be7dd902 feat(apps): progress on app dashboard sync 2016-07-08 12:26:51 +02:00
Torkel Ödegaard
d44325affd feat(apps): progress on app dashboard imports 2016-07-08 09:35:06 +02:00
Torkel Ödegaard
b62f1f00cd feat(apps): auto update dashboard dashboards, #5529 2016-07-07 18:11:03 +02:00
bergquist
4fc16c36ed feat(alerting): saves new state when alert updates 2016-06-29 00:05:48 +02:00
bergquist
48e1a17ac2 feat(alerting): remove dummie values from email notifier 2016-06-23 16:30:12 +02:00
bergquist
67197d54f9 feat(alerting): add triggeredAlerts as json to alert_state 2016-06-23 11:14:40 +02:00
bergquist
488b42377b feat(alerting): update state if not been updated for 15min 2016-06-23 11:03:27 +02:00
bergquist
fa309ec925 feat(alerting): add default notification group 2016-06-20 15:24:48 +02:00
bergquist
ebada26b85 Merge branch 'alerting' into alerting_notifications 2016-06-17 08:27:58 +02:00
bergquist
e8a324c7f5 feat(alerting): add frequency back to alert model 2016-06-17 08:27:38 +02:00
bergquist
a0418da160 Merge branch 'alerting' into alerting_notifications 2016-06-16 16:49:16 +02:00
bergquist
8ec311ade4 Merge branch 'master' into alerting 2016-06-16 16:29:41 +02:00
bergquist
b907ce341c feat(alerting): enables deletes for alert notifications 2016-06-16 15:21:44 +02:00
bergquist
7f767224af feat(alerting): basic support for creating and updating notifications 2016-06-16 14:29:20 +02:00
bergquist
2e809cae05 tech(alerting): enforce POST for webhooks 2016-06-16 08:16:16 +02:00
bergquist
efea3bc9cb feat(alerting): skeleton commit for webhook 2016-06-16 08:16:16 +02:00
bergquist
b9b65cf2d4 tech(alerting): add logging about failed notifications 2016-06-16 08:16:16 +02:00
bergquist
9a8416416d feat(alerting): converter for db model to notification 2016-06-16 08:16:16 +02:00
bergquist
dbf3795aaf feat(alerting): add sql layer for alert notifications 2016-06-16 08:16:16 +02:00
bergquist
8b91e57ef6 feat(alerting): notification query 2016-06-16 08:16:16 +02:00
Torkel Ödegaard
dac8b35a1a feat(alerting): renamed scheduler to handler 2016-06-13 15:58:22 +02:00
bergquist
7f22b9eb6e tech(alerting): expression -> settings 2016-06-13 15:18:19 +02:00
bergquist
bb6888885e fix(alerting): makes valid to save more explicit 2016-06-13 15:01:07 +02:00
Nozomi Anzai
6586cc4029 Add the datasource of RDBMS (PostgreSQL and MySQL) 2016-06-13 18:24:18 +09:00
bergquist
1e41eb8c97 tech(alerting): remove frequency from alert model 2016-06-13 10:42:36 +02:00
Torkel Ödegaard
a362984c57 feat(alerting): renamed AlertRuleModel to just Alert, think making a distinction between an Alert and an Alert Rule is just confusing and was a mistake on my part 2016-06-11 10:26:48 +02:00
Torkel Ödegaard
2b4a9954b1 feat(alerting): progress on alerting UI and model, refactoring of dashboard parser and tests into extractor component, moved tests from sqlstore to alerting package 2016-06-11 10:13:33 +02:00
bergquist
ea8fb66f73 test(alerting): fixes broken unittests 2016-06-10 13:47:54 +02:00
bergquist
0c69c5afb1 test(alerting): fixes broken unittests 2016-06-10 11:37:03 +02:00
bergquist
ef35184a80 feat(alerting): rename alertrule model to alertruleDAO 2016-06-10 10:00:00 +02:00