grafana/pkg/services
Pete Davids 65940c7726
Dashboard: Allow shortlink generation (#27409)
* intial frontend resolution/redirection logic

* backend scaffolding

* enough of the frontend to actually test end to end

* bugfixes

* add tests

* cleanup

* explore too hard for now

* fix build

* Docs: add docs

* FE test

* redirect directly from backend

* validate incoming uids

* add last_seen_at

* format documentation

* more documentation feedback

* very shaky migration of get route to middleware

* persist unix timestamps

* add id, orgId to table

* fixes for orgId scoping

* whoops forgot the middleware

* only redirect to absolute URLs under the AppUrl domain

* move lookup route to /goto/:uid, stop manually setting 404 response code

* renaming things according to PR feedback

* tricky deletion

* sneaky readd

* fix test

* more BE renaming

* FE updates -- no more @ts-ignore hacking :) and accounting for subpath

* Simplify code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Short URLs: Drop usage of bus

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* ShortURLService: Make injectable

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Rename file

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add handling of url parsing and creating of full shortURL to backend

* Update test, remove unused imports

* Update pkg/api/short_urls.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add correct import

* Pass context to short url service

* Remove not needed error log

* Rename dto and field to denote URL rather than path

* Update api docs based on feedback/suggestion

* Rename files to singular

* Revert to send relative path to backend

* Fixes after review

* Return dto when creating short URL that includes the full url

Use full url to provide shorten URL to the user

* Fix after review

* Fix relative url path when creating new short url

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-10-14 12:48:48 +02:00
..
alerting Alerting: Add labels to name when converting data frame to series (#28085) 2020-10-09 08:21:16 -04:00
annotations Annotation: Add clean up job for old annotations (#26156) 2020-09-02 08:07:31 +02:00
auth Settings: Rename constants/variables to follow Go naming standards (#28002) 2020-10-02 15:45:45 +02:00
cleanup Users: Expire old user invites (#27361) 2020-10-13 12:30:09 +02:00
dashboards Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
datasources Data sources: Use SQL store directly, not via bus (#27000) 2020-08-21 09:30:06 +02:00
guardian Chore: Enable Go linter gocritic (#26224) 2020-07-16 14:39:01 +02:00
hooks Footer: Display Grafana edition (#21717) 2020-01-27 09:24:44 +01:00
ldap Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
licensing provide license token directly via plugin environment (#25987) 2020-07-01 13:02:53 -04:00
live Live: cleanup and simple changes (#28028) 2020-10-04 23:53:52 -07:00
login Chore: Use errors.Is for comparing errors (#26719) 2020-07-31 10:16:49 +02:00
multildap Chore: Enable Go linter gocritic (#26224) 2020-07-16 14:39:01 +02:00
ngalert Fix linting: remove commented code (#28208) 2020-10-13 08:35:41 +02:00
notifications Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
provisioning Provisioning: Remove provisioned dashboards without parental reader (#26143) 2020-09-11 09:19:44 +02:00
quota Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
rendering Settings: Rename constants/variables to follow Go naming standards (#28002) 2020-10-02 15:45:45 +02:00
search Provisioning: Fix bug when provision app plugins using Enterprise edition (#26340) 2020-07-16 10:36:08 +02:00
shorturls Dashboard: Allow shortlink generation (#27409) 2020-10-14 12:48:48 +02:00
sqlstore Dashboard: Allow shortlink generation (#27409) 2020-10-14 12:48:48 +02:00
teamguardian chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00