Commit Graph

1969 Commits

Author SHA1 Message Date
Marcus Efraimsson
b0df7280be
begin user auth token implementation 2019-01-15 15:16:20 +01:00
bergquist
1b6203e430 removes error2 logger 2019-01-15 11:49:18 +01:00
Carl Bergquist
1a7eb2f462
Merge pull request #14868 from bergquist/provisioning_inifinite_loop
Avoid infinite loop in the dashboard provisioner
2019-01-15 10:34:18 +01:00
sharkpc0813
e172bade40 fix that alert context and result handle context do not use the same derived context. 2019-01-15 17:51:50 +09:00
bergquist
8880829eda avoid infinite loop in the dashboard provisioner
if one dashboard with an uid is refered to by two
provsioners each provsioner overwrite each other.
filling up dashboard_versions quite fast if using
default settings.

ref #12864
2019-01-14 16:38:39 +01:00
fredbcode
110ffb69de Fix bug tls renegociation problem in Notification channel (webhook) #14800 2019-01-13 21:42:33 +01:00
NighterMan
ec0fe11939 pushover: add support for attaching images (closes #10780)
Use native pushover native attachment support to deliver images
2019-01-13 04:09:51 +01:00
bergquist
fbb3ad5fc4 make sure frequency cannot be zero
frequency set to zero causes division by zero
panics in the alert schedular.

closes #14810
2019-01-10 14:17:10 +01:00
Torkel Ödegaard
0a936a55b4 Fixed new gometalinter issues 2019-01-07 11:01:31 +01:00
tpetr
db61fc1dd1 EqualFold() 2019-01-05 00:17:31 -05:00
tpetr
32dfc4e8b1 forgot go fmt 2019-01-05 00:02:15 -05:00
tpetr
5bc8d50864 pull connection string args from url instead 2019-01-04 23:52:36 -05:00
Torkel Ödegaard
3e873a2500
Merge pull request #14710 from grafana/fixed-gometalinter
Fixed new gotmetalinter warning
2019-01-03 07:23:45 +01:00
Torkel Ödegaard
80e441f48b Fixed new gotmetalinter warning 2019-01-02 19:17:35 +01:00
tpetr
a693d42e31 add support for defining additonal database connection string args via extra_connection_string_args 2019-01-02 13:02:40 -05:00
Dan Cech
efa738ddf6
Merge pull request #14540 from grafana/session-skip-update
only update session in mysql database when required
2018-12-31 11:54:04 -05:00
Torkel Ödegaard
22399b336f
Merge pull request #14577 from marefr/14351_db_migration
fix only create/drop database indices if not exists/exists
2018-12-31 16:20:07 +01:00
Torkel Ödegaard
983b85139c
Merge pull request #14665 from bergquist/sqlite_cache_mode_setting
WIP: makes cache mode configurable
2018-12-31 08:35:27 +01:00
bergquist
9895b1e6d0 adds orgId to user dto for provisioned dashboards 2018-12-28 10:49:00 +01:00
bergquist
24636da800 closes the body properly on successful webhooks
this commit also adds a test docker container
for receiving alerting web hook requests
2018-12-27 16:08:13 +01:00
bergquist
74124ec8ed makes cache mode configurable
this makes the cache mode in the sqlite connection
string configurable. the default also changed from
shared to private to solve #107272 but allow the user
to use shared if performance is more important.

ref #10727
2018-12-27 10:48:11 +01:00
Carl Bergquist
52ccb49167
Merge pull request #14593 from bergquist/export_create_notifier_func
export init notifier func
2018-12-19 13:51:40 +01:00
bergquist
69489993c3 export init notifier func
makes it possible to validate that an notifier can be
initialzed from the provisioning package
2018-12-19 13:38:49 +01:00
Torkel Ödegaard
cbeefcd376
Merge pull request #14574 from grafana/14543_org_redirect
fix signed in user for orgId=0 result should return active org id
2018-12-19 11:31:06 +01:00
Torkel Ödegaard
36154e59b0
Merge pull request #14571 from oiooj/pr-ds-limit
Raise datasources number to 5000
2018-12-19 11:26:16 +01:00
Marcus Efraimsson
12f3c8f9d6
fix only add column if not exists for mysql 2018-12-18 23:02:08 +01:00
Carl Bergquist
854487acab
Merge pull request #14441 from cinaglia/delete-external-snapshot
Add support for deleting external snapshots from Snapshots List
2018-12-18 22:43:12 +01:00
Marcus Efraimsson
a451c20129
fix handling of indices with multiple columns (mysql) 2018-12-18 22:28:27 +01:00
Marcus Efraimsson
09b3014683
fix only create/drop database indices if not exists/exists 2018-12-18 21:47:45 +01:00
Marcus Efraimsson
e82b3632f6
fix signed in user for orgId=0 result should return active org id 2018-12-18 20:02:27 +01:00
Dan Cech
3f85901c4a
only update session in mysql database when required 2018-12-18 11:19:32 -05:00
Baokun Lee
f51222027d Raise datasources number to 5000 2018-12-18 23:59:14 +08:00
bergquist
7aa84aeb61 moves migrations to /sqlstore/migrations 2018-12-17 16:36:57 +01:00
bergquist
11cde7ed71 renames main lock function 2018-12-17 16:36:57 +01:00
bergquist
823bba8d98 change from db_text to nvarchar 2018-12-17 16:36:57 +01:00
Joesis
92a8c5b81b log error when resolvePath 2018-12-13 02:10:29 -08:00
Daniel Lee
90e2175716 migration: renames logging ds to loki ds in data_source table 2018-12-12 20:54:05 +01:00
Victor Cinaglia
9d6da10e82
snapshots: Move external snapshot creation to backend 2018-12-10 16:36:32 -05:00
Victor Cinaglia
d9d6a4481f
snapshots: Add external_delete_url column 2018-12-10 16:25:02 -05:00
bergquist
9eea585773 removes unused code 2018-12-07 14:39:44 +01:00
bergquist
5d720674e3 Merge branch 'master' into add_google_hangouts_chat_notifier
* master: (322 commits)
  graphInterval needs to update after query execution, fixes #14364
  Explore: Parse initial dates
  Aligned styling of stats popover/box with rest of grafana & minor css refactoring
  Prometheus: Make result transformer more robust for empty responses
  Rebase fixes
  Explore: Logging line parsing and field stats
  fixed unit tests
  made unknown color theme aware and sync with graph color, some minor cleanup
  Explore: improve error handling
  use render props instead of cloneElement
  sort of a hacky way to figure if the small variation should be used for the label
  add basic button group component, using the the same label style as is
  explore logs styling
  wip: alternative level styling & hover effect
  wip: explore logs styling
  more detailed error message for loki
  If user login equals user email, only show the email once #14341
  UserPicker and TeamPicker should use min-width instead of fixed widths to avoid overflowing form buttons.  #14341
  wip: explore logs styling
  restoring monospace & making sure width are correct when hiding columns
  ...
2018-12-07 14:31:13 +01:00
bergquist
a90bba859a fixes merge error 2018-12-07 14:17:09 +01:00
moznion
4397ee61d0
Put issue number to test code 2018-12-05 22:47:41 +09:00
moznion
d1e1cde00e
Fix bug what updating user quota doesn't work
Reason is same as 061e06c226
2018-12-05 22:29:07 +09:00
moznion
061e06c226
Fix bug what updating org quota doesn't work
3c330c8e4c/pkg/services/sqlstore/quota.go (L106)

In the real use case, `has` that is described by the above code is always `false` because it includes `Updated` in a query.

So this commit fixes this issue.
2018-12-05 22:19:40 +09:00
Mario Trangoni
fadd816d89 pkg/*: Fix misspell issues
See,
$ find . -type f | xargs misspell -locale US | grep -vi -e vendor -e devenv -e Unknwon -e Destory | grep pkg
./pkg/services/sqlstore/org_test.go:190:15: "frome" is a misspelling of "from"
./pkg/tsdb/elasticsearch/response_parser.go:544:24: "Unkown" is a misspelling of "Unknown"
./pkg/tsdb/opentsdb/opentsdb.go:87:20: "marshalling" is a misspelling of "marshaling"
./pkg/components/dynmap/dynmap_test.go:2:7: "Licence" is a misspelling of "License"
./pkg/components/dynmap/dynmap.go:2:7: "Licence" is a misspelling of "License"
2018-12-04 23:29:34 +01:00
danielbh
d1b8f13c66
feat: #11067 prevent removing last grafana admin permissions 2018-12-03 20:05:52 -05:00
Marcus Efraimsson
36aec52c08
return actual error if failing to update alert data 2018-11-22 11:19:08 +01:00
bergquist
862815d18d go meta lint errors 2018-11-19 14:00:20 +01:00
Carl Bergquist
6049855dc7
Merge pull request #13947 from bergquist/alerting_for
Introduce alert debouncing
2018-11-19 10:38:02 +01:00
Patrick
2de5a7119b
Merge branch 'master' into add_google_hangouts_chat_notifier 2018-11-18 22:00:53 +01:00
bergquist
caec36e7ec alert rule have to be pending before alerting is for is specified 2018-11-15 15:37:46 +01:00
bergquist
a70ea2101c alertmanager: adds tests for should notify 2018-11-15 12:36:11 +01:00
bergquist
28029ce4a7 alerting: support for on execution errors and notdata 2018-11-15 11:04:16 +01:00
bergquist
84eb3bd095 tests for supporting for with all alerting scenarios 2018-11-14 23:43:09 +01:00
bergquist
8fb997d935 should not notify when going from unknown to pending 2018-11-14 23:43:09 +01:00
Marcus Efraimsson
5f9fecd254
feat: team preferences 2018-11-12 20:01:53 +01:00
bergquist
2fb78a50d6 minor fixes based on code review 2018-11-12 10:50:56 +01:00
Athurg Feng
919d00437e Add pic into actionCard message 2018-11-12 11:18:53 +08:00
Athurg Feng
b7787db34e Add new option to set where to open the message url 2018-11-08 18:44:00 +08:00
Andrey Kaipov
63fdffe8c0 Fixes #13993 - adds more options for Slack notifications 2018-11-07 22:08:26 -05:00
Marcus Efraimsson
26cbc6be81
Merge pull request #13966 from marefr/alert_extractor_refactor
Refactor dashboard alert extractor
2018-11-05 17:06:27 +01:00
bergquist
423331dae0 alerting: delete alerts when parent folder is deleted
closes #13322
2018-11-05 14:25:26 +01:00
Marcus Efraimsson
9e0da02b6a
refactor dashboard alert extractor 2018-11-05 14:25:19 +01:00
bergquist
ae2d536740 adds tests for extracting for property 2018-11-05 13:29:33 +01:00
bergquist
ccd89eee97 renames debouceduration to for 2018-11-05 11:05:30 +01:00
Marcus Efraimsson
5882e5bb46
Merge pull request #13900 from marefr/ds_cache_refactor
Datasource proxy cache refactor
2018-11-05 11:02:31 +01:00
bergquist
d25284a364 introduce state unknown for rules that have not been evaluated yet 2018-11-05 10:50:28 +01:00
bergquist
6f748d8a96 fixes go meta lint issue 2018-11-05 10:50:28 +01:00
bergquist
4526660cb2 wire up debounce setting in the ui 2018-11-05 10:50:28 +01:00
bergquist
2d3a575489 adds db migration for debounce_duration 2018-11-05 10:50:28 +01:00
bergquist
ccfd9c89b2 introduces hard coded deboucing for alerting 2018-11-05 10:50:28 +01:00
Marcus Efraimsson
818d48c2c0
always execute the user teams query 2018-11-05 10:49:56 +01:00
Marcus Efraimsson
5be2332c66
handle error before populating cache 2018-11-05 09:58:13 +01:00
bergquist
7c3dcb3702 alerting: adds tests for the median reducer
adds a test that verify that null values are not used
when calculating the median value in alerting

closes #10056
2018-11-05 09:03:35 +01:00
Marcus Efraimsson
6ef941ea17
fix failing tests 2018-11-02 16:03:12 +01:00
Sergio Conde Gomez
65a15b157f
Increase Telegram captions length limit. 2018-10-31 18:07:09 +01:00
Torkel Ödegaard
93453c2d94 added caching of signed in user DB calls 2018-10-31 06:47:14 -07:00
Marcus Efraimsson
6f9c0241af
register datasource cache service with proper name 2018-10-30 12:32:14 +01:00
Marcus Efraimsson
70ddf93688
include teams on signed in user 2018-10-30 09:32:32 +01:00
Marcus Efraimsson
cfb061ddab
refactor datasource caching 2018-10-30 09:31:56 +01:00
Torkel Ödegaard
d505d83ee1
Merge pull request #13679 from mjtrangoni/fix-megacheck-issues
Fix megacheck issues
2018-10-25 16:31:53 +02:00
Athurg Feng
201dd6bf65 Optimize the Dingding match values format 2018-10-25 18:53:45 +08:00
Athurg Feng
cb86e38628 Add Dingding message type to support mass text notification 2018-10-25 18:34:34 +08:00
Athurg Feng
7f45afac63 Split text template into variable 2018-10-25 18:24:04 +08:00
Athurg Feng
ca6dd73923 Add match values into Dingding notification message 2018-10-25 18:23:37 +08:00
Carl Bergquist
0d41904ee5
Merge pull request #13755 from Yukinoshita-Yukino/master
Fix cannot receive dingding alert when alert message is empty
2018-10-24 14:56:08 +02:00
bergquist
0a9bfc5529 delete provisioning meta data when deleting folder
prior to this fix Grafana didnt delete meta data
about the provisioned dashboard in `dashboard_provisioning`
which means that the dashboard wasn't inserted into
Grafana again if the folder was delete within Grafana.

closes #13280
2018-10-24 13:32:45 +02:00
Marcus Efraimsson
b371f2d91f
add debug logging of folder/dashbord permission checks 2018-10-23 11:08:57 +02:00
Mario Trangoni
68507e8855 pkg/services/alerting/reader.go: Fix should use for range instead of for { select {} }.
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/services/alerting/reader.go:37:2⚠️ should use for range instead of for { select {} } (S1000) (megacheck)
2018-10-19 19:49:04 +02:00
Yuan Liu
68c460a957
fix cannot receive dingding alert bug 2018-10-19 17:17:38 +08:00
Marcus Efraimsson
da89c27caf
Merge pull request #13702 from grafana/data-source-instance-to-react
Support Data source permissions
2018-10-17 16:54:57 +02:00
bergquist
70385119bc removes d in disableResolvedMessage 2018-10-17 10:41:18 +02:00
bergquist
5566a61aef alerting: tests default value for disable resolve message 2018-10-17 09:53:03 +02:00
Dave Waters
a3137e731d clean up tests 2018-10-16 20:39:07 -04:00
Dave Waters
0eae7b077d fix gofmt, add test, correct noted concerns with default value 2018-10-16 17:38:59 -04:00
Dave Waters
c4dcf5a4ee fix gofmt, add test, correct noted concerns with default value 2018-10-16 17:33:38 -04:00
Dave Waters
18c73631ea rename UI Option, align with control, update tests 2018-10-16 07:12:32 -04:00
Peter Holmberg
ee0cc9bd77 Merge branch 'master' into data-source-instance-to-react 2018-10-16 12:14:11 +02:00
Dave Waters
6376154b16 add channel option to disable the resolved alert (OK Message) that is sent when condition returns to normal. 2018-10-15 17:16:14 -04:00
Torkel Ödegaard
938541be2e
Merge pull request #13660 from grafana/alerting-validation-messages
Alerting: Propagate alert validation issues to the api/user
2018-10-15 18:16:29 +02:00
Andreas Kohn
272274220c
Fix grammar in log message 2018-10-15 14:37:12 +02:00
Torkel Ödegaard
ba67dc7689 changed to plain errors further down the alerting validation model so error did not get double wrapping in ValidationError 2018-10-12 23:15:23 -07:00
Torkel Ödegaard
ec4698fb96 alerting: propagate alert validation issues to the user instead of just 'invalid alert data' message 2018-10-12 23:03:54 -07:00
Torkel Ödegaard
d17025fb43
Merge pull request #13631 from mjtrangoni/fix-megacheck-issues
Fix trivial megacheck issues
2018-10-13 06:56:29 +02:00
Mario Trangoni
74533a7a19 pkg/services/sqlstore/user_auth_test.go: comment unused users slice
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/services/sqlstore/user_auth_test.go:28:18⚠️ this result of append is never used, except maybe in other appends (SA4010) (megacheck)
2018-10-13 02:35:03 +02:00
Torkel Ödegaard
8c9939df72 Adds backend hooks service so extensions can modify index data 2018-10-12 11:26:42 +02:00
Torkel Ödegaard
d5d8d7efa6 minor setting refactorings 2018-10-12 07:55:36 +02:00
Torkel Ödegaard
b671b9704f changed property name to UserWasDeleted and added an assert for it 2018-10-11 12:20:53 -07:00
Mario Trangoni
9c44c75936 pkg/services/alerting/notifiers/telegram.go: check error before close.
See,
$ gometalinter --vendor --deadline 6m --disable-all --enable=megacheck ./...
pkg/services/alerting/notifiers/telegram.go:130:2⚠️ should check returned error before deferring imageFile.Close() (SA5001) (megacheck)
2018-10-11 19:51:54 +02:00
Torkel Ödegaard
9585dc7825 added the UserWasRemoved flag to make api aware of what happened to return correct message to UI 2018-10-11 07:58:22 +02:00
Torkel Ödegaard
5b5cb6622d Remove user form org now completely removes the user from the system if the user is orphaned 2018-10-11 07:48:35 +02:00
Marcus Efraimsson
4d719b0d05
Merge remote-tracking branch 'origin/master' into noop-services-poc 2018-10-08 16:02:44 +02:00
Torkel Ödegaard
019d0ee179
Merge pull request #13506 from mjtrangoni/fix-megacheck-issues
Fix megacheck issues
2018-10-03 20:10:01 +02:00
bergquist
4498d75b17 provisioning: adds more logging about failed to deletion of provisioned dashboards 2018-10-03 17:38:10 +02:00
Mario Trangoni
d1e1fb7e72 pkg/services/alerting/notifiers/telegram_test.go: pass context.Background() instead of nil
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./...
pkg/services/alerting/notifiers/telegram_test.go:55:44⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/services/alerting/notifiers/telegram_test.go:71:45⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/services/alerting/notifiers/telegram_test.go:88:45⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/services/alerting/notifiers/telegram_test.go:104:45⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
2018-10-03 09:47:54 +02:00
Torkel Ödegaard
6c41cfb72c wip: made sqlstore dialect accessable from outside 2018-10-02 16:14:29 +02:00
Marcus Efraimsson
9af809ff8a
Merge pull request #13440 from grafana/reminder_refactoring
Transaction issues for alert reminder
2018-10-02 15:55:18 +02:00
Marcus Efraimsson
0e0901874b
better comment about state changes 2018-10-02 15:11:33 +02:00
Marcus Efraimsson
418f77e70e
get or create alert notification should use transaction 2018-10-02 15:07:44 +02:00
bergquist
7b781e4c3c use notification state id instead of notifier id 2018-10-02 14:53:39 +02:00
bergquist
9289cba625 merges defaultShouldNotify and ShouldNotify 2018-10-02 14:28:48 +02:00
bergquist
67e5f62514 move version conflict logging for mark as complete to sqlstore package 2018-10-02 14:23:18 +02:00
bergquist
9d3659d30d improve local variable name 2018-10-02 14:04:50 +02:00
bergquist
b45a1bd45c avoid exporting notificationState and notificationStateSlice 2018-10-02 14:03:30 +02:00
bergquist
9022e871e3 avoid sending full notification state to pending/complete 2018-10-02 13:57:41 +02:00
bergquist
341d8af637 rename GetNotificationStateQuery to GetOrCreateNotificationStateQuery 2018-10-02 11:23:40 +02:00
bergquist
7f1d7cefc0 reminder: uses UpdatedAt to track state changes. 2018-10-02 11:19:09 +02:00
Mario Trangoni
dde650905d Fix megacheck issue unused code.
I removed some code, and commented out other one.

See,
$ gometalinter --vendor --disable-all --disable=gotype --enable=megacheck --deadline 6m ./... | grep unused
pkg/api/avatar/avatar.go💯26⚠️ func (*CacheServer).mustInt is unused (U1000) (megacheck)
pkg/api/folder_test.go:136:6⚠️ func callGetFolderByUID is unused (U1000) (megacheck)
pkg/api/folder_test.go:141:6⚠️ func callDeleteFolder is unused (U1000) (megacheck)
pkg/api/live/hub.go:40:15⚠️ func (*hub).removeConnection is unused (U1000) (megacheck)
pkg/components/imguploader/azureblobuploader.go:130:5⚠️ var client is unused (U1000) (megacheck)
pkg/middleware/middleware_test.go:438:28⚠️ func (*scenarioContext).withInvalidApiKey is unused (U1000) (megacheck)
pkg/services/alerting/ticker.go:40:18⚠️ func (*Ticker).updateOffset is unused (U1000) (megacheck)
pkg/services/notifications/notifications_test.go:12:6⚠️ type testTriggeredAlert is unused (U1000) (megacheck)
pkg/services/sqlstore/dashboard_service_integration_test.go:935:6⚠️ type scenarioContext is unused (U1000) (megacheck)
pkg/services/sqlstore/dashboard_service_integration_test.go:939:6⚠️ type scenarioFunc is unused (U1000) (megacheck)
pkg/services/sqlstore/dashboard_service_integration_test.go:941:6⚠️ func dashboardGuardianScenario is unused (U1000) (megacheck)
pkg/services/sqlstore/transactions_test.go:13:6⚠️ type testQuery is unused (U1000) (megacheck)
2018-10-01 18:23:59 +02:00
bergquist
75f832cda8 use alert state changes counter as secondary version 2018-10-01 15:58:30 +02:00
Torkel Ödegaard
b3c78f1265 wip: data source permissions hooks 2018-10-01 15:38:55 +02:00
Marcus Efraimsson
1be8fb76b8
cleanup alert_notification_state when deleting alert rules and channels 2018-09-30 21:57:15 +02:00
Marcus Efraimsson
5ec086dc56
don't notify if notification state pending
If notification state is pending and last update of state was made
less than a minute ago. In the case of a grafana instance is shut down/crashes
between setting pending state and before sending the notification/marks as complete
this logic should allow the notification to be sent after some time instead of
being left in an inconsistent state where no notifications are being sent.
2018-09-30 21:52:50 +02:00
Marcus Efraimsson
d412aafb7e
remove unused code 2018-09-30 20:16:01 +02:00
Marcus Efraimsson
8551ffa0b0
alert -> ok with reminders enabled should send 2018-09-28 18:34:20 +02:00
Marcus Efraimsson
a0e1a1a1f9
Merge remote-tracking branch 'origin/master' into reminder_refactoring 2018-09-28 15:17:30 +02:00
Marcus Efraimsson
67c58fa5e4
fix set sent_at on complete 2018-09-28 15:11:03 +02:00
Torkel Ödegaard
d2464812eb noop services poc 2018-09-28 14:52:12 +02:00
Marcus Efraimsson
c1763508e0
handle pending and completed state for alert notifications 2018-09-28 14:22:03 +02:00
Marcus Efraimsson
2bf399d3c8
No need to get alert notification state in ShouldNotify 2018-09-28 12:59:35 +02:00
Marcus Efraimsson
69cc24ea3f
wip: test get alert notification state 2018-09-28 11:17:03 +02:00
Marcus Efraimsson
88bbc452a7
wip: send and mark as complete 2018-09-28 11:14:36 +02:00
Leonard Gram
1a75aa54de wip: impl so that get alertstate also creates it if it does not exist 2018-09-28 10:48:08 +02:00
bergquist
15ce474639 wip 2018-09-27 16:21:53 +02:00
Marcus Efraimsson
d093244282
sqlstore: add support for checking if error is constraint validation error 2018-09-27 13:38:22 +02:00
bergquist
c5278af6c4 add support for mysql and postgres unique index error codes 2018-09-27 11:33:13 +02:00
bergquist
3fab616239 implement sql queries for transactional alert reminders 2018-09-27 11:14:44 +02:00
bergquist
ff79f80685 initial rename refactoring 2018-09-27 09:43:00 +02:00
Carl Bergquist
464f3f738f
Merge pull request #13360 from sapcc/symlinks
resolve symlink on each run
2018-09-27 09:21:29 +02:00
Torkel Ödegaard
ec4b165b3c
Merge pull request #13392 from mjtrangoni/fix-goconst-issues
Fix goconst issues
2018-09-26 20:12:44 +02:00
bergquist
b04052f515 alerting: move all notification conditions to defaultShouldNotify 2018-09-26 14:34:10 +02:00
Carl Bergquist
af0f3f2119
Merge pull request #13391 from grafana/provisioning-interval
provisioning: changed update interval default 3 to 10 seconds
2018-09-25 22:43:34 +02:00
Torkel Ödegaard
862ca07f03 fix: updated tests 2018-09-25 14:01:38 +02:00
Torkel Ödegaard
cb96c6d942 Changed setting to be an alerting setting 2018-09-25 12:17:04 +02:00
Torkel Ödegaard
4dab595ed7 rendering: Added concurrent rendering limits 2018-09-24 16:14:11 +02:00
Mario Trangoni
0870464ea5 Fix goconst issues
See,
$ gometalinter --vendor --disable-all --enable=goconst --disable=gotype --deadline=6m ./...
build.go:113:15⚠️ 2 other occurrence(s) of "linux" found in: build.go:119:15 build.go:491:34 (goconst)
build.go:119:15⚠️ 2 other occurrence(s) of "linux" found in: build.go:113:15 build.go:491:34 (goconst)
build.go:491:34⚠️ 2 other occurrence(s) of "linux" found in: build.go:113:15 build.go:119:15 (goconst)
build.go:381:21⚠️ 2 other occurrence(s) of "windows" found in: build.go:423:13 build.go:487:13 (goconst)
build.go:423:13⚠️ 2 other occurrence(s) of "windows" found in: build.go:381:21 build.go:487:13 (goconst)
build.go:487:13⚠️ 2 other occurrence(s) of "windows" found in: build.go:381:21 build.go:423:13 (goconst)
pkg/api/dashboard.go:67:22⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/dashboard.go:67:35⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/dashboard.go:131:10⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/dashboard.go:406:13⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/folder.go:98:22⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:35 (goconst)
pkg/api/folder.go:98:35⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 (goconst)
pkg/api/index.go:63:47⚠️ 2 other occurrence(s) of "light" found
in: pkg/api/index.go:91:22 pkg/api/index.go:93:16 (goconst)
pkg/api/index.go:91:22⚠️ 2 other occurrence(s) of "light" found in: pkg/api/index.go:63:47 pkg/api/index.go:93:16 (goconst)
pkg/api/index.go:93:16⚠️ 2 other occurrence(s) of "light" found in: pkg/api/index.go:63:47 pkg/api/index.go:91:22 (goconst)
pkg/components/null/float.go:71:25⚠️ 2 other occurrence(s) of "null" found in: pkg/components/null/float.go:103:10 pkg/components/null/float.go:112:10 (goconst)
pkg/components/null/float.go:103:10⚠️ 2 other occurrence(s) of "null" found in: pkg/components/null/float.go:71:25 pkg/components/null/float.go:112:10 (goconst)
pkg/components/null/float.go:112:10⚠️ 2 other occurrence(s) of "null" found in: pkg/components/null/float.go:71:25 pkg/components/null/float.go:103:10 (goconst)
pkg/services/alerting/notifiers/pagerduty.go:79:16⚠️ 2 other occurrence(s) of "Triggered metrics:\n\n" found in: pkg/services/alerting/notifiers/kafka.go:64:16 pkg/services/alerting/notifiers/opsgenie.go:98:16 (goconst)
pkg/services/alerting/notifiers/kafka.go:64:16⚠️ 2 other occurrence(s) of "Triggered metrics:\n\n" found in: pkg/services/alerting/notifiers/pagerduty.go:79:16 pkg/services/alerting/notifiers/opsgenie.go:98:16 (goconst)
pkg/services/alerting/notifiers/opsgenie.go:98:16⚠️ 2 other occurrence(s) of "Triggered metrics:\n\n" found in: pkg/services/alerting/notifiers/pagerduty.go:79:16 pkg/services/alerting/notifiers/kafka.go:64:16 (goconst)
pkg/social/social.go:85:11⚠️ 2 other occurrence(s) of "grafana_com" found in: pkg/social/social.go:162:14 pkg/social/social.go:197:11 (goconst)
pkg/social/social.go:162:14⚠️ 2 other occurrence(s) of "grafana_com" found in: pkg/social/social.go:85:11 pkg/social/social.go:197:11 (goconst)
pkg/social/social.go:197:11⚠️ 2 other occurrence(s) of "grafana_com" found in: pkg/social/social.go:85:11 pkg/social/social.go:162:14 (goconst)
pkg/tsdb/elasticsearch/time_series_query.go:92:17⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/response_parser.go:152:8 pkg/tsdb/elasticsearch/response_parser.go:167:31 pkg/tsdb/elasticsearch/response_parser.go:315:9 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:152:8⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/time_series_query.go:92:17 pkg/tsdb/elasticsearch/response_parser.go:167:31 pkg/tsdb/elasticsearch/response_parser.go:315:9 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:167:31⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/time_series_query.go:92:17 pkg/tsdb/elasticsearch/response_parser.go:152:8 pkg/tsdb/elasticsearch/response_parser.go:315:9 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:315:9⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/time_series_query.go:92:17 pkg/tsdb/elasticsearch/response_parser.go:152:8 pkg/tsdb/elasticsearch/response_parser.go:167:31 (goconst)
pkg/tsdb/elasticsearch/time_series_query.go:78:9⚠️ 2 other occurrence(s) of "date_histogram" found in: pkg/tsdb/elasticsearch/response_parser.go:84:22 pkg/tsdb/elasticsearch/response_parser.go:369:24 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:84:22⚠️ 2 other occurrence(s) of "date_histogram" found in: pkg/tsdb/elasticsearch/time_series_query.go:78:9 pkg/tsdb/elasticsearch/response_parser.go:369:24 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:369:24⚠️ 2 other occurrence(s) of "date_histogram" found in: pkg/tsdb/elasticsearch/time_series_query.go:78:9 pkg/tsdb/elasticsearch/response_parser.go:84:22 (goconst)
2018-09-23 21:19:21 +02:00
Torkel Ödegaard
98dad530e2 provisioning: changed provisioning default update interval from 3 to 10 seconds 2018-09-22 10:06:57 +02:00
Mario Trangoni
60dfff11a0 Fix datbase > database 2018-09-21 13:41:31 +02:00
Mario Trangoni
80fa66fcb0 Fix some typos found by codespell
See,
$ codespell -S "./.git*,./vendor*,./public*"
2018-09-21 11:54:52 +02:00
Mario Trangoni
0dea8fe1e0 pkg/services/sqlstore/user.go: empty branch
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline=6m ./...
pkg/services/sqlstore/user.go:274:3⚠️ empty branch (SA9003) (megacheck)
2018-09-20 20:16:14 +02:00
Arno Uhlig
1355c00c44 fix reader linux test 2018-09-20 13:42:56 +02:00
Arno Uhlig
6b2d91815a resolve symlink on each run 2018-09-20 11:46:32 +02:00
Mario Trangoni
bb5aaa2dce pkg/services/sqlstore/alert_notification.go: Simplify err check
$ gometalinter --vendor --disable=all --enable=megacheck --deadline=10m ./...
pkg/services/sqlstore/alert_notification.go:242:3⚠️ 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013) (megacheck)
2018-09-18 23:42:20 +02:00
Carl Bergquist
f22f1d46c8
Merge pull request #10163 from grafana/9587_annotation_tags_wih_temp_var
annotations: allows template variables to be used in tag filter
2018-09-17 10:34:38 +02:00
Carl Bergquist
6dff5e6bc7
Merge pull request #13295 from mjtrangoni/fix-some-megacheck-issues
Fix some megacheck issues
2018-09-17 10:13:34 +02:00
Marcus Efraimsson
b2833daf32
Merge pull request #13285 from marefr/team_member_ext
Team member labels
2018-09-17 09:14:06 +02:00
Mario Trangoni
e85d0e8d6b pkg/services/sqlstore: Fix sess.Id is deprecated: use ID instead. (megacheck)
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./... | grep ID
alert.go:193:15⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
alert.go:252:18⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
annotation.go:113:12⚠️ sess.Table("annotation").Id is deprecated: use ID instead  (SA1019) (megacheck)
org.go:136:24⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org.go:169:16⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org_users.go:24:21⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org_users.go:88:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org_users.go:141:21⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
plugin_setting.go:103:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
preferences.go:97:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
quota.go:119:17⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
quota.go:221:17⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
team.go:77:24⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:243:16⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:267:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:282:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:313:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:475:3⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:479:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:493:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
2018-09-16 12:37:08 +02:00
Mario Trangoni
f73236f8f4 pkg/services/sqlstore: Fix x.Sql is deprecated: use SQL instead. (megacheck)
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./... | grep SQL
alert.go:43:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
alert_notification.go:122:12⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
annotation.go:226:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:228:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:302:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:416:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:635:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
migrations/user_mig.go:137:9⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
plugin_setting.go:29:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:41:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:84:13⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:143:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:186:13⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:234:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
team.go:172:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
team.go:199:17⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
team.go:223:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
temp_user.go:99:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
temp_user.go:124:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
user.go:375:3⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
user.go:377:3⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
user.go:379:3⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
2018-09-16 12:26:05 +02:00
Marcus Efraimsson
9a6446c2b5
new column for team_member table 2018-09-14 17:27:36 +02:00
Cyril Bonté
0f4ee4ce87 fix hipchat color code used "no data" notifications 2018-09-14 17:22:07 +02:00
bergquist
aed8208d78 renames PartialMatch to MatchAny 2018-09-13 15:15:42 +02:00
bergquist
1638c6bea1 enable partial tag matches for annotations 2018-09-11 15:50:04 +02:00
Carl Bergquist
5069e4eadd
Merge pull request #11681 from Jonnymcc/sort-dashboard-tags
Sort results from GetDashboardTags
2018-09-11 09:19:30 +02:00
Marcus Efraimsson
fc597260c0
Merge pull request #13167 from holiiveira/teams-image
Alert Teams - Adding Action to view the graph by its public URL.
2018-09-07 11:24:06 +02:00
Marcus Efraimsson
a1d1c4fb9a
fix code formatting 2018-09-07 11:06:19 +02:00
Carl Bergquist
b070784b8a adds usage stats for alert notifiers (#13173) 2018-09-06 21:03:09 +02:00
Henrique Oliveira
e983f8f54b Adding Action to view the graph by its public URL. 2018-09-05 17:35:22 -03:00
Leonard Gram
5d87aa2fa4
Merge pull request #13031 from bergquist/golang_1.11
upgrade to golang 1.11
2018-09-05 15:31:43 +02:00
Anthony Woods
5c0fbbf7c8 improve remote image rendering (#13102)
* improve remote image rendering

- determine "domain" during Init() so we are not re-parsing settings
  on every request
- if using http-mode via a rednererUrl, then use the AppUrl for the
  page that the renderer loads.  When in http-mode the renderer is likely
  running on another server so trying to use the localhost or even the
  specific IP:PORT grafana is listening on wont work.
- apply the request timeout via a context rather then directly on the http client.
- use a global http client so we can take advantage of connection re-use
- log and handle errors better.

* ensure imagesDir exists

* allow users to define callback_url for remote rendering

- allow users to define the url that a remote rendering service
  should use for connecting back to the grafana instance.
  By default the "root_url" is used.

* improve remote image rendering

- determine "domain" during Init() so we are not re-parsing settings
  on every request
- if using http-mode via a rednererUrl, then use the AppUrl for the
  page that the renderer loads.  When in http-mode the renderer is likely
  running on another server so trying to use the localhost or even the
  specific IP:PORT grafana is listening on wont work.
- apply the request timeout via a context rather then directly on the http client.
- use a global http client so we can take advantage of connection re-use
- log and handle errors better.

* ensure imagesDir exists

* allow users to define callback_url for remote rendering

- allow users to define the url that a remote rendering service
  should use for connecting back to the grafana instance.
  By default the "root_url" is used.

* rendering: fixed issue with renderKey where userId and orgId was in mixed up, added test for RenderCallbackUrl reading logic
2018-09-04 13:42:55 +02:00
bergquist
12c9860882 string formating fixes 2018-08-28 22:33:38 +02:00
Marcus Efraimsson
eba147c1a3
change/add tests for alerting notification reminders 2018-08-24 19:09:19 +02:00
Marcus Efraimsson
34e448c6d4
Merge remote-tracking branch 'origin/master' into alerting_reminder 2018-08-22 18:08:50 +02:00
Torkel Ödegaard
92ed1f04af sql: added code migration type 2018-08-21 13:53:04 +02:00
Marcus Efraimsson
dfa5d17670
don't write to notification journal when testing notifier/rule 2018-08-20 16:27:13 +02:00
Marcus Efraimsson
3350a3477d
fix after merge with master 2018-08-20 13:31:06 +02:00
Marcus Efraimsson
6d2136b853
Merge remote-tracking branch 'origin/master' into alerting_reminder 2018-08-20 13:29:30 +02:00
Leonard Gram
da2822c88d alerting: inline docs for the slack channel.
Related to #12944
2018-08-17 16:49:27 +02:00
Marcus Efraimsson
0a7be2618e
cleaning up test data 2018-08-17 15:00:37 +02:00
Marcus Efraimsson
aed89b49c0
should allow one default datasource per organisation using provisioning 2018-08-14 14:48:14 +02:00
Torkel Ödegaard
f2b1fabd5c
fix: Alerting rendering timeout was 30 seconds, same as alert rule eval timeout, this should be much lower so the rendering timeout does not timeout the rule context, fixes #12151 (#12903) 2018-08-13 15:38:28 +02:00
Marcus Efraimsson
1dd9646a50
fix failing test due to time diff issues 2018-07-24 19:05:09 +02:00
Daniel Lee
f5cc7618c5 alert: add missing test after refactor 2018-07-17 22:17:43 +02:00
Caleb Tote
10aaf7b506
Adding eval_data to alerts query results 2018-07-16 12:38:42 -04:00
Mark Meyer
0f6e5e2953 Allow settting of default org id to auto-assign to (#12401)
Author:    Mark Meyer <mark@ofosos.org>
2018-07-13 12:14:40 -07:00
Torkel Ödegaard
c03764ff8a
Refactor team pages to react & design change (#12574)
* Rewriting team pages in react

* teams to react progress

* teams: getting team by id returns same DTO as search, needed for AvatarUrl

* teams: progress on new team pages

* fix: team test

* listing team members and removing team members now works

* teams: team member page now works

* ux: fixed adding team member issue

* refactoring TeamPicker to conform to react coding styles better

* teams: very close to being done with team page rewrite

* minor style tweak

* ux: polish to team pages

* feature: team pages in react & everything working

* fix: removed flickering when changing tabs by always rendering PageHeader
2018-07-11 11:23:07 -07:00
yogy rahmawan
8b32dc5847 move go vet out of scripts and fixing warning (#12552) 2018-07-09 23:25:32 -07:00
Jesse Tane
677117fb03 fix diff and percent_diff (#12515)
* make diff and percent_diff tests more realistic

* fix diff and percent_diff

* include @marefr's additional tests
2018-07-08 21:58:34 -07:00
Marcus Efraimsson
d2f31a716f
remove unnecessary conversions 2018-07-04 12:16:39 +02:00
Carl Bergquist
861af4cb97 Improve extensions build. (#12461)
* enable ee build on pr/master

* step1: of including group sync

* disable commit pinning for now

* fixes broken build

* enable team to ldap group sync

* avoid returning error for missing external handler

* services: allow routes to be added before http server start

* services: allows services to add their own migrations

* moves db migrations to ee code base

* build using master branch in ee

* disable enterprise build in .bra.toml

[skip ci]

* removes team sync extensions

* removes commented line
2018-07-01 07:01:43 -07:00
bergquist
66c56e7bbe notifications: dont return error if one notifer failed 2018-06-30 23:14:18 +02:00
bergquist
e91e3ea771 notifications: send notifications synchronous 2018-06-29 16:16:09 +02:00
bergquist
d31c7bc6a4 Merge branch 'master' into alerting_reminder
* master: (95 commits)
  registry: adds more comments
  registry: adds comments to interfaces
  changelog: update
  changelog: update
  changelog: add notes about closing #12438
  alerting: only log when screenshot been uploaded
  fixes typos
  changelog: add notes about closing #12444
  Revert "auth proxy: use real ip when validating white listed ip's"
  changelog: adds note for #11892
  changelog: add notes about closing #12430
  fix footer css issue
  Karma to Jest: 3 test files (#12414)
  fix: log close/flush was done too early, before server shutdown log message was called, fixes #12438
  Karma to Jest: value_select_dropdown (#12435)
  support passing api token in Basic auth password (#12416)
  Add disabled styles for checked checkbox (#12422)
  changelog: add notes about closing #11920
  changelog: add notes about closing #11920
  changelog: update
  ...
2018-06-29 15:44:20 +02:00
bergquist
396f8e6464 notifications: read without tran, write with tran 2018-06-29 15:15:31 +02:00
bergquist
c4292b43f5 alerting: only log when screenshot been uploaded 2018-06-29 09:58:58 +02:00
bergquist
8ff538be07 notifier: handle known error first 2018-06-26 14:13:45 +02:00
Marcus Efraimsson
f106de0efd
enhance error message if phantomjs executable is not found
if arm build, explain that phantomjs is not included by default in arm
builds. If not explain that phantom js isn't installed correctly
2018-06-25 16:06:52 +02:00
Torkel Ödegaard
132df4553c fix: annnotation api & sql issue 2018-06-25 16:03:38 +02:00
Carl Bergquist
578a8e8f55
Merge pull request #12322 from bergquist/sqlstore_refactoring
expose session and transaction helpers to other services
2018-06-20 10:22:06 +02:00
Marcus Efraimsson
5377ad4e96
remove unused argument in default scenario of guardian test 2018-06-19 12:34:34 +02:00
Torkel Ödegaard
24d0b43e62 fix: fixed permission issue with api key with viewer role in dashboards with default permissions 2018-06-19 11:10:17 +02:00
bergquist
3479cf4b39 expose functions to use sessions 2018-06-18 14:50:36 +02:00
Carl Bergquist
764a4247f5
Merge pull request #12274 from xapon/11607-cleanup
#11607 Cleanup time of temporary files is now configurable
2018-06-18 13:50:05 +02:00
bergquist
ffda5efc66 Merge branch 'master' into alerting_reminder
* master:
  changelog: add notes about closing #11076
  snapshot: copy correct props when creating a snapshot
  set current org when adding/removing user to org
  changelog: add notes about closing #10707
  Include the vendor directory when copying source in to Docker (#12305)
  changelog: adds note about closing #12199
  adds inTransactionCtx that calls inTransactionWithRetryCtx
  merge create user handlers
  transactions: start sessions and transactions at the same place
  cloudwatch: handle invalid time range
  make sure to use real ip when validating white listed ip's
  changelog: adds note about closing #12286
2018-06-18 11:26:31 +02:00
Marcus Efraimsson
004142a1e4
Merge pull request #12263 from grafana/11076_current_org
Set current org when adding/removing user to org
2018-06-18 11:19:42 +02:00
Marcus Efraimsson
6d48d0a80c
set current org when adding/removing user to org
To not get into a situation where a user has a current organization assign which he is
not a member of we try to always make sure that a user has a valid current organization
assigned.
2018-06-18 09:30:01 +02:00
bergquist
83a12afc07 adds tests for journaling sql operations 2018-06-16 11:27:04 +02:00
bergquist
c21938d4c4 use epoch to compare timestamp 2018-06-16 00:03:13 +02:00
bergquist
4c5fe68e7e adds inTransactionCtx that calls inTransactionWithRetryCtx 2018-06-15 21:57:13 +02:00
bergquist
1181e96799 merge create user handlers 2018-06-15 21:23:57 +02:00
bergquist
da91b91b4b transactions: start sessions and transactions at the same place
this make it possible for handler to use `withSession` when
transactions is not nedded and `inTransactionCtx` if its needed
without knowing who owns the session/transaction
2018-06-15 20:52:57 +02:00
bergquist
12bf5c225a tests for defaultShouldNotify 2018-06-15 16:27:20 +02:00
bergquist
f4b089d551 notifications: make journaling ctx aware 2018-06-15 15:30:17 +02:00
bergquist
7632983c62 notifications: gather actions in one transaction 2018-06-15 14:27:16 +02:00
bergquist
0cfdebf0a2 Merge remote-tracking branch 'fork/bus_multi_dispatch' into alerting_reminder
* fork/bus_multi_dispatch:
  sql: adds tests for InTransaction
  bus: noop should still execute fn
  removes unused code
  bus: Dispatch now passes empty ctx if handler require it
  bus: dont start transaction when creating session
  bus: dont mix ctx/classic handlers
  bus: DispatchCtx can now invoke any handler
  refactoring: renamed AddCtxHandler to AddHandlerCtx PR #12203
  refactoring: transaction manager PR #12203
  fixes typo in code
  check if admin exists or create one in one transaction
  replace begin/end with wrapper function
  bus: support multiple dispatch in one transaction
2018-06-15 13:17:24 +02:00
bergquist
09e71e00a3 sql: adds tests for InTransaction 2018-06-15 12:46:20 +02:00
bergquist
9ca9a7c302 bus: dont start transaction when creating session 2018-06-15 12:46:20 +02:00
bergquist
629eab0b1e bus: dont mix ctx/classic handlers 2018-06-15 12:46:20 +02:00
Torkel Ödegaard
5af0b924ff refactoring: renamed AddCtxHandler to AddHandlerCtx PR #12203 2018-06-15 12:46:20 +02:00
Torkel Ödegaard
442e0e437b refactoring: transaction manager PR #12203 2018-06-15 12:46:20 +02:00
bergquist
6775a82c82 fixes typo in code 2018-06-15 12:46:20 +02:00
bergquist
1bd31aa313 check if admin exists or create one in one transaction 2018-06-15 12:46:20 +02:00
bergquist
263572813a replace begin/end with wrapper function 2018-06-15 12:46:20 +02:00
bergquist
8143610024 bus: support multiple dispatch in one transaction
this makes it possible to run multiple DispatchCtx
in one transaction. The TransactionManager will
start/end the transaction and pass the dbsession
in the context.Context variable
2018-06-15 12:46:20 +02:00
bergquist
6cd83e182a Merge branch 'master' into alerting_reminder
* master: (84 commits)
  docs: adds info about grafana-dev container
  changelog: add notes about closing #12282
  Added Litre/min and milliLitre/min in Flow (#12282)
  remove papaparse dependency
  list name is deleteDatasources, not delete_datasources
  remove internal influx ifql datasource
  Document the endpoint for deleting an org
  tests: rewrite into table tests
  influxdb: adds mode func to backend
  changelog: add notes about closing #11484
  changelog: add notes about closing #11233
  Remove import
  Fix PR feedback
  Removed papaparse from external plugin exports
  Karma to Jest: query_builder
  dsproxy: move http client variable back
  Karma to Jest: threshold_mapper
  Expose react and slate to external plugins
  Karma to Jest: threshold_manager
  Karma to Jest: query_def, index_pattern
  ...
2018-06-15 12:45:35 +02:00
Marcus Efraimsson
81d34137a8
Merge pull request #11484 from manacker/master
alerting: fix mobile notifications for microsoft teams notifier
2018-06-14 15:56:18 +02:00
Anton Sergeyev
2565a8087c #11607 corrected file cleanup test 2018-06-14 13:00:07 +05:00
Anton Sergeyev
2024cf4b56 #11607 fixed formatting 2018-06-14 12:46:29 +05:00
Anton Sergeyev
516839d7b2 #11607 Cleanup time of temporary files is now configurable 2018-06-14 12:35:22 +05:00
bergquist
4a8e9cf93f removes more unused code 2018-06-07 07:15:50 +02:00
bergquist
850aa21d45 removes unused code 2018-06-07 07:06:13 +02:00
bergquist
f93d83befe adds missing return statement 2018-06-06 22:17:19 +02:00
bergquist
171a38df99 alerting: fixes broken table rename 2018-06-05 14:29:48 +02:00
bergquist
ab70ead5e4 alerting: renames journal table to alert_notification_journal 2018-06-05 13:10:38 +02:00
bergquist
bcbae7aa62 alerting: move queries from evalcontext to notifier base 2018-06-05 12:07:02 +02:00
bergquist
7333d7b8d4 alerting: invert sendOnce to sendReminder 2018-06-05 10:44:17 +02:00
bergquist
93124f38fa alerting: only check frequency when not send once 2018-06-04 22:19:27 +02:00
bergquist
0e647db485 Merge branch 'master' into alerting_reminder
* master: (30 commits)
  changelog: add notes about closing #11882
  renamed variable in tests
  added comment, variableChange -> variableValueChange
  added a test
  added if to check if new variable has been added
  Gravatar fallback does not respect 'AppSubUrl'-setting (#12149)
  change admin password after first login
  changelog: adds note about closing #11958
  revert: reverted singlestat panel position change PR #12004
  Revert "provisioning: turn relative symlinked path into absolut paths"
  provisioning: turn relative symlinked path into absolut paths
  changelog: adds note about closing #11670
  elasticsearch: sort bucket keys to fix issue wth response parser tests
  docs: what's new in v5.2
  changelog: add notes about closing #11167
  docs: docker secrets support. (#12141)
  alerting: show alerts for user with Viewer role
  datasource: added option no-direct-access to ds-http-settings diretive, closes #12138
  provisioning: adds fallback if evalsymlink/abs fails
  tests: uses different paths depending on os
  ...
2018-06-04 17:44:18 +02:00
bergquist
86e65f84f9 alerting: fixes invalid error handling 2018-06-04 17:30:57 +02:00
Carl Bergquist
7214ee9024
Merge pull request #12007 from bergquist/provisioning_symlinked_folders
Add support for symlinked folders in dashboard provisioning
2018-06-04 16:00:32 +02:00
bergquist
cd4026da6b Revert "provisioning: turn relative symlinked path into absolut paths"
This reverts commit d089b5e05d.
2018-06-04 15:38:37 +02:00
bergquist
d089b5e05d provisioning: turn relative symlinked path into absolut paths 2018-06-04 15:20:26 +02:00
Carl Bergquist
49d9235433
Merge pull request #12122 from grafana/provisioning_ha
Support provisioning in HA setup where modtime differs
2018-06-04 15:12:46 +02:00
John Baublitz
bdf433594a Implement code review changes 2018-06-04 13:19:14 +02:00
John Baublitz
5c5951bc42 Bug fix for repeated alerting even on OK state and add notification_journal cleanup when alert resolves 2018-06-04 13:19:14 +02:00
John Baublitz
c0a9e5cf1d Fix tests 2018-06-04 13:19:14 +02:00
John Baublitz
fca97535d1 Fix multiple bugs 2018-06-04 13:19:14 +02:00
John Baublitz
3cb0e27e1c Revert changes post code review and move them to notification page 2018-06-04 13:19:14 +02:00
John Baublitz
e068be4c26 Feature for repeated alerting in grafana 2018-06-04 13:19:13 +02:00
Alexander Zobnin
13c6f37ea5
alerting: show alerts for user with Viewer role
changelog: add notes about closing #11167

remove changelog note

reformat alert_test.go
2018-06-04 12:34:30 +03:00
bergquist
f606654c50 provisioning: adds fallback if evalsymlink/abs fails 2018-06-04 09:04:33 +02:00
bergquist
3f5078339c tests: uses different paths depending on os 2018-06-04 08:27:03 +02:00
bergquist
75ee1e9208 renames intervalSeconds to updateIntervalSeconds 2018-06-04 08:13:20 +02:00
Patrick O'Carroll
0c269d64d0 Alert panel filters (#11712)
alert list panel: filter alerts by name, dashboard, folder, tags
2018-06-01 14:36:40 +02:00
bergquist
333af6fd9b provisioning: makes the interval for polling for changes configurable 2018-05-31 21:07:34 +02:00
bergquist
c817aecd66 provisioning: only update dashboard if hash of json changed 2018-05-31 21:05:52 +02:00
bergquist
44f5b92fbc provisioning: only provision if json file is newer then db 2018-05-31 11:38:29 +02:00
bergquist
2bd4c14e5f make path absolute before following symlink 2018-05-31 09:53:15 +02:00
bergquist
47d3884377 provisioning: follow symlinked folders
fixes #11958
2018-05-31 09:38:09 +02:00
bergquist
d5aeae3a90 test: fixes broken test on windows 2018-05-31 08:27:29 +02:00
bergquist
c7acbcdaf5 provisioning: enable relative path's
this commit enable relatives path for provisioning dashboards.
this enables easier dev setups
2018-05-30 08:46:44 +02:00
bergquist
1411709db1 provisioning: place testfiles within testdata folder 2018-05-29 16:30:12 +02:00
Marcus Efraimsson
5a96863eed
pin versions of xorm to resolve sql tests
Resolves issue with postgres tests.
Also sets timezone of test instance and database to utc to resolve
mysql tests.
Closes #12065
2018-05-28 13:07:41 +02:00
Carl Bergquist
519e58a267
Merge pull request #12071 from grafana/12056_usage_stats
Additional anonymous usage stats
2018-05-28 11:23:16 +02:00
Marcus Efraimsson
c9e9f25699
use sql builder for the get system stats sql query 2018-05-28 10:37:17 +02:00
bergquist
238139fad6 alerting: refactor tests 2018-05-25 16:12:34 +02:00
Marcus Efraimsson
fbc44025dc
add usage stats for datasource access mode 2018-05-25 16:06:35 +02:00
Marcus Efraimsson
2ea5b6fe33
add additional usage stats metrics
nr of folders
nr of folder permissions
nr of dashboard permissions
nr of snapshots
nr of teams
nr of provisioned dashboards
2018-05-25 14:33:37 +02:00
Torkel Ödegaard
80d694d205
Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
bergquist
c40b0ea1df test: moves test files to testdata folder 2018-05-18 23:23:13 +02:00
Torkel Ödegaard
6c0752473a
Sqlstore refactor (#11908)
* refactor: tracing service refactoring

* refactor: sqlstore to instance service

* refactor: sqlstore & registory priority

* refactor: sqlstore refactor wip

* sqlstore: progress on getting tests to work again

* sqlstore: progress on refactoring and getting tests working

* sqlstore: connection string fix

* fix: not sure why this test is not working and required changing expires

* fix: updated grafana-cli
2018-05-18 11:10:10 +02:00
bergquist
78e837cf39 test: increase expire time to avoid tz issues in tests 2018-05-17 14:59:50 +02:00
Dan Cech
1dfff74da9 move database-specific code into dialects (#11884) 2018-05-10 16:54:21 +02:00
Torkel Ödegaard
c79b1bef15
Merge branch 'master' into master 2018-05-08 21:23:34 +02:00
Marcus Efraimsson
219118ef4a
Merge pull request #11867 from grafana/11862_migration
decrease length of auth_id column in user_auth table
2018-05-08 13:10:22 +02:00
bergquist
b649358734 rename alerting engine to service 2018-05-08 11:56:30 +02:00
bergquist
7e9a10a5fb renames alerting engine to match other services 2018-05-08 10:53:42 +02:00
Marcus Efraimsson
8ed79d614b
decrease length of auth_id column in user_auth table
certain mysql versions don't support having indices with a greater varchar length
than 190.
2018-05-08 09:26:28 +02:00
Torkel Ödegaard
4c6e4e2aa6 fix: fixed gometalinter issues with Discord PR 2018-05-07 17:01:31 +02:00
Carl Bergquist
23738ad4ac
Merge pull request #11801 from grafana/provision-service-refactor
Server shutdown flow rewrite & provision service refactor
2018-05-07 16:32:26 +02:00
Torkel Ödegaard
e5e8b9800c merge: fixed conflicts in discord PR 2018-05-07 15:40:43 +02:00
Dan Cech
b4ad044044 better handling for special chars in db config (#11662) 2018-05-07 10:33:33 +02:00
Daniel Lee
2c10f29b0f
Merge pull request #11784 from grafana/11754_auth_migration
increase length of auth_id column in user_auth table
2018-05-03 15:30:38 +02:00
Torkel Ödegaard
053c2039bb refactor: provisioning service refactoring 2018-05-02 19:56:15 +02:00
Marcus Efraimsson
f17100e98e
Merge pull request #11786 from marefr/11625_save_as
dashboard: show save as button if user has edit permission

This will show the "Save As..." button in dashboard settings page if the user 
has edit permissions (org role admin/editor or viewers_can_edit enabled) 
and has at least edit permission in any folder.
2018-05-02 11:15:22 +02:00
Torkel Ödegaard
fa7d7ed5df
Initial Baby Step to refactoring settings from global vars to instance (#11777)
* wip: start on refactoring settings

* settings: progress on settings refactor

* refactor: progress on settings refactoring

* fix: fixed failing test

* settings: moved smtp settings from global to instance
2018-04-30 16:21:04 +02:00
Marcus Efraimsson
770acee56a
new property for current user indicating if edit permissions in folders 2018-04-30 15:34:31 +02:00
Marcus Efraimsson
3d9b7a5892
increase length of auth_id column in user_auth table 2018-04-30 14:41:52 +02:00
Karsten Weiss
de8696d5d3 Outdent code after if block that ends with return (golint)
This commit fixes the following golint warnings:
pkg/bus/bus.go:64:9: if block ends with a return statement, so drop this else and outdent its block
pkg/bus/bus.go:84:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:137:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:177:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:183:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:199:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:208:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/components/dynmap/dynmap.go:236:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:242:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:257:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:263:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:278:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:284:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:299:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:331:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:350:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:356:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:366:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:390:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:396:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:405:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:427:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:433:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:442:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:459:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:465:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:474:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:491:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:497:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:506:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:523:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:529:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:538:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:555:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:561:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:570:12: if block ends with a return statement, so drop this else and outdent its block
pkg/login/ldap.go:55:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/login/ldap_test.go:372:10: if block ends with a return statement, so drop this else and outdent its block
pkg/middleware/middleware_test.go:213:12: if block ends with a return statement, so drop this else and outdent its block
pkg/plugins/dashboard_importer.go:153:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/dashboards_updater.go:39:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/dashboards_updater.go:121:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/plugins.go:210:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/plugins.go:235:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/eval_context.go:111:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:92:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:98:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:122:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:108:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:118:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:121:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifiers/telegram.go:94:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/annotation.go:34:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/annotation.go:99:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/dashboard_test.go:107:13: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/plugin_setting.go:78:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/preferences.go:91:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/user.go:50:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/migrator/migrator.go:106:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/migrator/postgres_dialect.go:48:10: if block ends with a return statement, so drop this else and outdent its block
pkg/tsdb/time_range.go:59:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/tsdb/time_range.go:67:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/tsdb/cloudwatch/metric_find_query.go:225:9: if block ends with a return statement, so drop this else and outdent its block
pkg/util/filepath.go:68:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
2018-04-27 23:10:43 +02:00
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
df71fe33fd refactor: refactoring notification service to use new service registry hooks 2018-04-27 14:15:17 +02:00