Daniel Lee
2d1bd270fb
Stale permissions ( #10768 )
...
* dashfolders: hide permissions in settings if folder has changed
and the dashboard has not been saved yet. Otherwise the use will
see stale permissions from the original folder.
* dashfolders: return folder url for inherited permissions
2018-02-05 14:28:24 +01:00
Carl Bergquist
04a94ce396
adds unique index for org_id+folder_id+title on dashboards ( #10766 )
2018-02-05 14:11:19 +01:00
Marcus Efraimsson
a879dd8c0c
dashboards: render correct link for folder when searching for dashboards ( #10763 )
...
Fixes #10761
2018-02-05 13:23:24 +01:00
Marcus Efraimsson
55100d5ff9
Merge pull request #10760 from grafana/10749_link_to_folder
...
Fix link to folder from permissions list
2018-02-05 11:34:59 +01:00
Marcus Efraimsson
7d3b990e91
permissions: fix link to folder from permissions list
...
Also, closing Add Permissions CTA when DashboardPermissions and
FolderPermissions unmounts.
Fixes #10749 "
2018-02-05 11:10:37 +01:00
Carl Bergquist
cc0cc8dd73
changes to new urlformat for home dashboard ( #10738 )
2018-02-05 10:24:48 +01:00
Torkel Ödegaard
07fa2f1722
fix: alert list links did not work, changed dashboardUri to Url, this is breaking api change in alert api ( #10756 )
2018-02-05 09:42:41 +01:00
Marcus Efraimsson
32054ad9a6
dashboard: fix redirect of legacy dashboard url's
...
Redirect of /dashboard/db/:slug to /d/:uid/:slug and
/dashboard-solo/db/:slug to /d-solo/:uid/:slug now includes querystring parameters.
Fixes #10752
2018-02-04 17:29:16 +01:00
bergquist
130a2b6499
handle new error message
2018-02-02 11:06:32 +01:00
Daniel Lee
512f6992f1
dashfolders: rename Root folder to General. Closes #10692
2018-02-02 10:39:26 +01:00
Marcus Efraimsson
cd61d2b237
Merge branch 'master' into 7883_new_url_structure
2018-02-01 17:32:43 +01:00
Marcus Efraimsson
744f402a96
db: fix failing integration tests for mysql and postgresql
2018-02-01 17:27:29 +01:00
bergquist
90207bcb7d
register handler for get dashboards by slug
2018-02-01 14:17:14 +01:00
bergquist
fcd86fb24f
make it easier for dashboards to generate ur;
2018-02-01 14:08:51 +01:00
bergquist
74ca6f6dbf
changes dashboard url in alertlist
2018-02-01 14:08:51 +01:00
bergquist
992fd37010
alert: use new url format
2018-02-01 14:08:51 +01:00
Mikael Olenfalk
c0f100f1b5
Improve logging in the phantomjs renderer ( #10697 )
...
* Add add adapter between io.Writer and log.Logger
* Add phantomjs output to grafana log
* Unexport LogWriterImpl
* Add test for LogWriter
* Make it possible to get phantomjs debug output
* Make it possible to get the configured log level
2018-02-01 14:04:52 +01:00
Marcus Efraimsson
ef90b3e49c
Merge branch '7883_new_url_structure' into 7883_frontend_step2
2018-02-01 11:08:39 +01:00
Marcus Efraimsson
b135df9a6c
Merge remote-tracking branch 'upstream/master' into 7883_new_url_structure
2018-02-01 10:48:06 +01:00
Carl Bergquist
eff687bece
Merge pull request #10694 from grafana/7883_backend
...
backend for new url structure.
2018-02-01 09:35:00 +01:00
Marcus Efraimsson
90933b0621
dashboard: refactor logic for retrieving url for folder/dashboard
2018-01-31 23:14:48 +01:00
Marcus Efraimsson
c0c3f17d84
dashboards: when restoring a dashboard to an older version, set current uid
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
035b724725
dashboards: remove slug property in dashboard search responses
...
Removes slug property in dashboard search responses since this property isn't needed
anymore and it haven't been released to any stable release.
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
92a0171a9b
folders: change the front end route for browsing folders
...
Change the front end route for folders to /dashboards/f/<uid>/<slug of folder title>.
Use new route for deleting dashboard/folder by uid.
Retrieve dashboard/folder by uid when moving or deleting dashboards/folders.
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
b23560ed5a
dashboards: add validation to delete dashboard by slug
...
Validates that there are only one folder/dashboard having that slug,
otherwise returns 412 Precondition Failed
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
95d063621e
dashboards: new route for deleting dashboards by uid
2018-01-31 18:40:54 +01:00
Alexander Zobnin
db7890ec1e
plugins: return table with empty rows array insteaf of nil
2018-01-31 19:59:15 +03:00
bergquist
58cfb23625
retry uid generation
2018-01-31 17:29:17 +01:00
Daniel Lee
a9e2273064
Merge remote-tracking branch 'upstream/master' into dashboard_permissions
2018-01-31 16:45:32 +01:00
Daniel Lee
7e2e57c306
dashfolders: fixes #10671 . Allow Editors default access to Root.
...
Editors should be able to create dashboards in root and should be
able to create folders. They cannot administrate permissions though
and these dashboards and folders will get the default permissions.
2018-01-31 16:43:21 +01:00
bergquist
9aa488c084
Merge remote-tracking branch 'origin/7883_frontend_step' into 7883_backend
...
* origin/7883_frontend_step:
dashboards: make scripted dashboards work using the old legacy urls
dashboards: redirect from old url used to load dashboard to new url
dashboards: add new default frontend route for rendering a dashboard panel
dashboards: fix links to recently viewed and starred dashboards
dashboards: use new *url* prop from dashboard search for linking to dashboards
dashboards: when saving dashboard redirect if url changes
dashboards: add new default frontend route for loading a dashboard
dashboards: return url in response to save dashboard. #7883
2018-01-31 15:57:03 +01:00
bergquist
16a1642831
gofmt...
2018-01-31 15:15:15 +01:00
bergquist
3da2ab61e0
Verifies requirement of id in dashboards.
2018-01-31 14:36:14 +01:00
bergquist
7e96052594
ensure dashboard title is unique in folder
2018-01-31 14:18:54 +01:00
Marcus Efraimsson
57edf89033
dashboards: make scripted dashboards work using the old legacy urls
...
Scripted dashboards are still requested from /dashboard/script/scripted.js
#7883
2018-01-31 14:07:49 +01:00
Marcus Efraimsson
a99331cdb9
dashboards: redirect from old url used to load dashboard to new url
...
If legacy backend routes (/dashboard/db/<slug> and /dashboard-solo/db/<slug>)
are requested we try to redirect to new routes with a 301 Moved Permanently
#7883
2018-01-31 14:06:19 +01:00
Daniel Lee
79fe01959b
alerting: small refactoring
2018-01-31 10:47:31 +01:00
bergquist
bb3183f6cd
removes uniqnes check on slug when saving dashboards
2018-01-31 10:29:52 +01:00
bergquist
6d2a555866
Drops unique index orgid_slug from dashboards.
2018-01-31 10:26:06 +01:00
bergquist
56d5ece340
plugins: return empty tables array insteaf of nil
2018-01-31 09:59:23 +01:00
Patrick O'Carroll
465e701b42
moved icon ( #10681 )
2018-01-31 09:52:29 +01:00
Marcus Efraimsson
369597f7b2
dashboards: return url in response to save dashboard. #7883
2018-01-31 00:09:14 +01:00
Daniel Lee
eb765d288c
alertlist: disable pause button when user does not have permission
2018-01-30 23:35:27 +01:00
Marcus Efraimsson
fd59241e35
dashboards: revert adding api for retrieving uid by slug
...
Since we're already have possibility to get a dashboard by slug
it makes little sense to have a separate endpoint in api for
retrieving uid by slug.
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
4829ea0e9f
util: remove retry logic in shortid_generator
...
Use shortid.MustGenerate() instead of shortid.Generate(). Instead
of returning errors it will panic.
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
9fb7b887db
dashboards: add url property to dashboard meta and search api responses
...
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
7ee691dc48
dashboards: api for retrieving uid by slug. #7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
13d5db7d19
dashboards: add support for retrieving a dashboard by uid
...
Introduces new url in api /dashboards/<uid> for fetching dashboard by unique id
Leave the old dashboard by slug url /dashboards/db/<slug> for backward
compatibility and for supporting fallback
WIP for #7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
c1cff3849e
dashboard: change unique index for uid to include org_id
...
Make the max length of uid longer in case we want to change it later
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
46e1296700
dashboards: return uid in response to creating/updating a dashboard. #7883
2018-01-30 23:18:34 +01:00