grafana/pkg/api/dtos
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
..
acl.go Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
alerting_test.go Fix misspell issues 2018-09-21 11:54:36 +02:00
alerting.go Chore: Enable Go linter gocritic (#26224) 2020-07-16 14:39:01 +02:00
annotations.go Annotations: use a single row to represent a region (#17673) 2019-08-16 10:49:30 +02:00
apikey.go API: return resource ID for auth key creation, folder permissions update and user invite complete endpoints (#27419) 2020-09-07 17:06:11 +02:00
dashboard.go Provisioning: Show file path of provisioning file in save/delete dialogs (#16706) 2019-04-30 13:32:18 +02:00
datasource.go Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
folder.go folders: use new folder service in folder api routes 2018-02-20 13:57:32 +01:00
index.go Core: Make application title customizable for WL (#22401) 2020-02-25 15:18:37 +01:00
invite.go chore: avoid alias for models in plugins (#22483) 2020-02-28 12:51:21 +01:00
models.go Chore: Enable goprintffuncname and nakedret linters (#26376) 2020-07-23 08:14:39 +02:00
ngalert.go AlertingNG: POC of evaluator under feature flag. (#27922) 2020-10-12 21:51:39 +03:00
org.go feat(organization): added update org address to http api and to org details settings view, closes #2672 2015-09-08 14:22:44 +02:00
playlist.go Added playlist controls to new react DashNav 2019-02-04 21:08:30 +01:00
plugins.go Plugins: add a signature status flag (#23420) 2020-04-09 00:00:16 -07:00
prefs.go Make golint happier 2018-03-22 22:38:44 +01:00
short_url.go Dashboard: Allow shortlink generation (#27409) 2020-10-14 12:48:48 +02:00
stream.go feat(grafana_live): more work pushing data to websocket, #4355 2016-03-14 22:26:43 +01:00
user_token.go Feature: Parse user agent string in user auth token api response (#16… (#17504) 2019-06-11 14:12:52 +02:00
user.go Allow API to assign new user to a specific organization (#21775) 2020-04-15 12:11:45 +03:00