Commit Graph

2146 Commits

Author SHA1 Message Date
Karsten Weiss be2d635078 Simplify error returns (gosimple)
This fixes:
pkg/api/avatar/avatar.go:261:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/log/file.go:102:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/metrics/graphitebridge/graphite.go:298:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/provisioning/provisioning.go:23:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:351:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:435:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/stats.go:22:2: 'if err != nil { return err }; return err' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/team.go:213:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
2018-04-16 21:04:57 +02:00
Daniel Lee bb7a6a0153 Merge pull request #11595 from kichristensen/DeleteEmptyPlaylist
Support deleting empty playlist
2018-04-16 17:06:59 +02:00
David Kaltschmidt 5a29c17282 moved version in help menu to top 2018-04-16 16:25:28 +02:00
David Kaltschmidt 712212d6aa Show Grafana version and build in Help menu
* establishes Help as the single place to look for the Grafana version
* version is passed as menu sub-title to side menu
* added rendering of sub-title, plus styles
* sub-title was used by profile menu (its value is the login string),
but was not shown; now showing this value on condition that login name
is different from user name
2018-04-16 13:37:05 +02:00
Daniel Lee 67daa9b058 Merge pull request #11588 from mjtrangoni/fix-codespell-issues
Fix codespell issues
2018-04-16 09:12:49 +02:00
Kim Christensen 7534f0bff6 Support deleting empty playlist 2018-04-15 21:37:34 +02:00
Mario Trangoni 91fb2e07ce pkg: fix codespell issues 2018-04-13 20:31:29 +02:00
Daniel Lee 9413ce5ef6 Merge pull request #8096 from ryantxu/influx-db-query2
let the influxdb API set a database
2018-04-13 18:22:12 +02:00
bergquist f424d13b53 provisioning: dont override permissions 2018-04-10 12:35:06 +02:00
bergquist 949484b949 provisioning: simplify db query
the GetProvisionedDashboardQuery wasent used for anything
else than check if a dashboard is provisioned or not. So
we simplified this query to make it more maintainable.
2018-04-10 12:30:37 +02:00
bergquist 0f9b592428 provisioning: fixes broken tests 2018-04-10 10:48:10 +02:00
bergquist bcbe7a1c55 provisioning: adds error handling 2018-04-10 09:31:35 +02:00
ryan 5ca972542b convert graphite epoch to ms 2018-04-09 13:58:09 +02:00
Marcus Efraimsson 84d034c688 api: allow authenticated users to search current org users and teams
Any authenticated user of an organization should be able to
- search its organization's users
- search its organization's users
- retrieve a single user of its organization (this how it was
  implemented earlier)
2018-04-07 10:39:28 +02:00
Marcus Efraimsson 6bbeb723ca Merge branch 'master' into readonly_dashboards 2018-04-05 20:30:27 +02:00
ryan 392c47f39b Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master: (51 commits)
  Use curly brackets around hyperlink help text #11478 (#11479)
  migrated playlist-routes to ts
  migrated last all.js to ts
  Notes for closing #7119
  changelog: adds note for #11128
  variables: adds test for variable sorting
  Add case-insensitive sort for variables.
  graphite: fixes #11434
  settings: fixes test
  changed from margin to padding
  changed variable for tabbed close btn hover, and changed text-strong variable for lighttheme, removed commented out variable
  mssql: typos in help sections
  Webpack Grafana plugin template project to links (#11457)
  rm panel.type  constrain from threshold_mapper.ts (#11448)
  No need for node_modules/bin in npm run-script (#11449)
  changelog: adds note about closing #11555
  add article
  fix some typos
  migrated graph_tooltip to ts
  started migration to ts
  ...
2018-04-05 09:48:00 +02:00
Marcus Efraimsson 8f94cecf0f permissions: return user and team avatar in folder permissions api 2018-04-04 15:51:19 +02:00
Marcus Efraimsson ebad863f95 permission: generate team avatar url with default 2018-04-04 15:50:45 +02:00
Daniel Lee 32264c61c4 Merge branch 'master' into dashboard-acl-ux2 2018-03-29 11:32:24 +02:00
bergquist 9e2e6fc586 add fallback for gravatar in org/admin view
closes #11095
2018-03-27 22:52:29 +02:00
bergquist 627df67992 dashboards: reject updates of provisioned dashboards 2018-03-27 15:12:47 +02:00
bergquist d6faa3d06f provisioning: improve UX when saving provisioned dashboards 2018-03-26 15:08:46 +02:00
ryan 71ef9b6db5 Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master: (26 commits)
  notes about closing #11306
  cleanup
  changelog: unix socket permissions
  Adjust permissions of unix socket
  docs: tweaks
  changelog: adds note about closing #5855
  legend: small refactoring
  Make golint happier
  mysql: skip tests by default
  mssql: update query editor help
  mysql: fix precision for the time column in table/annotation query mode
  postgres: fix precision for the time column in table/annotation query mode
  mssql: fix precision for the time column in table/annotation query mode
  mssql: remove UTC conversion in macro functions
  mssql: fix timeGroup macro so that it properly creates correct groups
  small screen legend right also work like legend under in render + set scrollbar to undefined in destroyScrollbar so it doesnt become disabled when toggeling between right and under
  fixed so legend right works like legend under on small screens
  Alerting: move getNewState to EvalContext
  graphite: adds more traces for alerting
  sql datasource: extract common logic for converting time column to epoch time in ms
  ...
2018-03-24 11:39:35 +01:00
Carl Bergquist 980e078222 Merge pull request #11326 from bergquist/more_traces
dataproxy: adds dashboardid and panelid as tags
2018-03-23 17:13:15 +01:00
Julian Kornberger 6f363153d7 Adjust permissions of unix socket
fixes #8358
2018-03-23 16:09:04 +01:00
ryan 7defb1adf5 remove dashboardId check... i can't figure out how the tests work 2018-03-23 12:54:53 +01:00
ryan e92ea79524 get circle to run tests again 2018-03-23 12:48:03 +01:00
ryan 2116152295 add dashboardId to test 2018-03-23 12:35:39 +01:00
ryan a58b4ff2d6 remove api tests 2018-03-23 12:13:38 +01:00
ryan b39fb7fdd5 fix operator 2018-03-23 12:01:21 +01:00
ryan db92a96067 move dashboard error to API (not sql) 2018-03-23 11:36:44 +01:00
Julian Kornberger 0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
ryan 20353db966 convert epoch to milliseconds 2018-03-22 16:21:47 +01:00
ryan a2bbd89a9e adding updated column 2018-03-22 15:52:09 +01:00
ryan df94b380f4 Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master:
  Make golint happier
2018-03-22 14:59:14 +01:00
Julian Kornberger 7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
ryan 3898ea02e6 adding created column 2018-03-22 02:22:58 +01:00
bergquist f142548969 dataproxy: adds dashboardid and panelid as tags
closes #11315
2018-03-20 22:23:28 +01:00
Daniel Lee 1cef373d16 Merge remote-tracking branch 'upstream/master' into update-xorm 2018-03-20 19:21:58 +01:00
Daniel Lee 3ca1e06509 session: fork Macaron mysql session middleware
This changes forks the mysql part of the Macaron session middleware.

In the forked mysql file:

- takes in a config setting for SetConnMaxLifetime (this solves wait_timeout
problem if it is set to a shorter interval than wait_timeout)
- removes the panic when an error is returned in the Exist function.
- retries the exist query once
- retries the GC query once
2018-03-16 01:19:28 +01:00
ryan a04c4ba454 allow any database for influx proxy 2018-03-15 13:01:17 +01:00
ryan ad88e5398c remove 2018-03-15 12:57:09 +01:00
Mitja Zivkovic 5669596518 add regex search of username and password in urls, which are replaced by strings.Replace 2018-03-15 10:50:57 +01:00
ryan 4f8ee9f5a7 merge with master 2018-03-14 23:52:24 +01:00
Marcus Efraimsson 5fbfd67b94 dashboards: should be possible to browse dashboard using only uid
That is, the slug part of url should be optional.
Closes #11231
2018-03-13 21:06:25 +01:00
Daniel Lee 3f2c086e6f teams: removes quota on route
Got added by mistake a year ago.
2018-03-13 10:56:35 +01:00
Mitsuhiro Tanda a83ede0193 support POST for query and query_range 2018-03-12 13:25:05 +09:00
Dan Cech bbd6adabbf move quota to dedicated service 2018-03-07 17:19:35 -05:00
Dan Cech c0ecdee375 rename Context to ReqContext 2018-03-07 11:54:50 -05:00
Dan Cech 338655dd37 move Context and session out of middleware 2018-03-06 18:16:49 -05:00