Commit Graph

545 Commits

Author SHA1 Message Date
Jack Westbrook
7374f380bd
chore: Bump storybook to 6.2 (#32638)
* chore(grafanaui): bump storybook to 6.2, remove nohoist babel conflict hack

* chore(grafanaui): update storybook react doc gen defaults

* feat(grafanaui): map public/img as storybook static path for images/icons

* refactor(grafanaui): remove storybook noopControl in favour of parameters.controls.exclude

* feat(grafanaui): add component for storybook docs theming

* chore(grafanaui): silence button docs react warnings

* chore(grafanaui): bump storybook to v6.2.3

* revert(grafanaui): remove test description param from legacy switch story
2021-04-06 14:47:17 +02:00
Torkel Ödegaard
16efc4c1b9
ReactSelect: Upgrades react-select from v3 to v4 and switches from fork to main npm package (#32618)
* ReactSelect: Upgrades react-select from v3 to v4 and switches from fork to main npm package

* Updated snapshot

* Removed hidden time in timepicker
2021-04-02 11:11:46 +02:00
Ryan McKinley
f67489a1f6
Chore: update centrifuge import (avoid protobuf) (#32616) 2021-04-01 21:47:04 +02:00
Ryan McKinley
c7ea96940a
Arrow: move arrow support from frontend to backend only (#32575) 2021-04-01 10:30:08 -07:00
Leon Sorokin
a080669151
Icons: use plain SVG files, load on-demand (#32387) 2021-04-01 09:09:56 -05:00
Torkel Ödegaard
10badea19e
Emotion: Upgrades emotion from 10 to 11 and updates all import paths (#32541)
* Babel: Updates babel dependencies to latest version

* Emotion: Upgrade form 10 to 11

* Fixing tests

* Updated to use emotion/css instead in test
2021-04-01 14:15:23 +02:00
Jack Westbrook
b714cdf395
chore: bump execa to v2.1.0 (#32543)
* chore(toolkit): bump execa to v2 to fix vulnerability issue

* chore(toolkit): update usage of execa
2021-04-01 12:38:53 +02:00
Zoltán Bedi
bf524c91e6
Chore: Upgrade tslib (#32449)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-04-01 11:50:33 +02:00
Torkel Ödegaard
7f6229494d
Babel: Target more modern browsers, updates browserlistrc (#32573)
* Babel: Target more modern browsers, updates browserlistrc

* Updates

* Fixed circular dependencies, grafana booted
2021-04-01 10:32:00 +02:00
Ryan McKinley
dc791c4121
Chore: update caniuse (#32569) 2021-03-31 22:16:56 +02:00
Torkel Ödegaard
b0ffcfd558
Babel: Refactoring config so that it's shared and removes legacy plugin (#32559)
* Updated plugins

* Fixing stuff

* Update

* Fixing more stuff
2021-03-31 19:09:19 +02:00
Torkel Ödegaard
d92145be28
Babel: Updates babel dependencies to latest version (#32534)
* Babel: Updates babel dependencies to latest version

* Fixed problem introduced by babel where calling super with prefedefined this is not supported

* fixing test

* Fixed tests

* Improve fix for QueryCtrl

* Fixed more tests

* Updated tests
2021-03-31 17:03:07 +02:00
Erik Sundell
f0d6f132ae
SigV4: Add support EC2 IAM role auth and possibility to toggle auth providers (#32444)
* wip: consume aws-sdk config in auth http settings

* fix typings

* use sdk regions

* use latest version of grafana/aws-sdk

* use newest sdk

* add comment

* bump sdk

* fix yarn lock file

* fix storybook issue

* upgrade aws-sdk. also use it in grafana ui

* remove not used config

* add aws-sdk as an external dep for grafana in the grafana ui rollup

Co-authored-by: Will Browne <will.browne@grafana.com>
2021-03-30 12:30:34 +02:00
Jack Westbrook
c9eff1892e
DashboardSettings: Migrates history diff view from angular to react (#31997)
* chore(dashboardsettings): introduce deep-diff for diffing dashboard models

* feat(dashboardsettings): initial commit of diff comparision react migration

* feat(dashboardsettings): wip - use json-source-map and monaco editor

* chore(deps): add react-diff-viewer to package.json

* feat(dashboardsettings): take the simplistic road for diff view

* refactor(dashboardsettings): clean up Version Settings components

* chore: delete angular historyListCtrl code

* refactor(dashboardsettings): styling fixes

* Small color tweaks

* refactor(versionhistory): fix issues around summary text. write tests

* test(versionhistory): add test for jsonDiff

* refactor(versionhistory): cleanup utils and reduce dom elements

* test(versionsettings): add tests for comparision view

* test(versionsettings): finialise tests for version history comparison view

* test(versionsettings): remove debug

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-03-25 11:51:09 +01:00
Jack Westbrook
405f54565a
chore(deps): bump visx/tooltip to 1.7.2 (#32248)
* chore(deps): prefer react-use-measure 2.0.4 over forked fix

* chore(grafana-ui): bump visx/tooltip@1.7.2 instead of react-use-measure resolution
2021-03-25 10:28:26 +01:00
Jack Westbrook
7317daf80e
chore(deps): remove load-grunt-tasks dependency (#32070) 2021-03-23 10:50:44 +01:00
Erik Sundell
c1d53bd646
CloudWatch: Use latest version of aws sdk (#32217)
* use latest version of aws sdk

* use yet a newer version
2021-03-22 17:04:08 +01:00
Leon Sorokin
fd9dee87e4
EchoSrv: remove deprecated tti-polyfill (#32140)
* EchoSrv: remove deprecated tti-polyfill

* more cleanup
2021-03-22 10:42:02 +01:00
Ryan McKinley
9dd1d5f553
Cloudwatch: use shared library for aws auth (#29550)
* use sdk for handling auth

* fix broken test

* lint fixes

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2021-03-12 14:30:21 +01:00
Dimitris Sotirakis
f917c2ab0f
Bug: Update react-use-measure dependency to fix docker-build-full f… (#31802)
* Bug: Update `react-use-measure` dependency to fix docker-build-full failure

* Add #remove-cjs-export to point to the correct branch

* Add git package - update js-builder version
2021-03-12 12:28:54 +02:00
Leon Sorokin
4c2ab6752e
uPlot 1.6.7 (#31913) 2021-03-11 11:15:19 -06:00
Alex Khomenko
b017c65409
Chore: upgrade eslint and fork-ts-checker-webpack-plugin (#31854)
* Chore upgrade eslint, fork-ts-checker-webpack-plugin

* Update eslint version for grafana-toolkit

* Update @grafana/eslint-config version

* Update @grafana/eslint-config in grafana-toolkit

* Update lockfile
2021-03-11 13:39:43 +02:00
Josh Hunt
a51cc050e2
Chore: type backendSrv.datasourceRequest (#31870) 2021-03-10 20:52:25 +01:00
Dominik Prokop
a55a272276
Routing NG: Replace Angular routing with react-router (#31463)
* Add router packages

* Get react app root work instead of Angular one

* Logger util

* Patch Angular routing ($routeProvider, $routeParamsProvider)

* Use react-router-dom history instead of separate dependency

* Add test routes

* Sidemenu - use Link instead of anchors

* Patch Angular $location service (stub)

* WIP: geting rid of $location provider from TimeSrv

* Intercept anchor clicks to use history under the hood

* Sync Redux location slice with history state

* Make login/logout work

* Debug routes for testing

* Make force login work

* Make sure query param change does not recreate page components

* Hide side menu in specified locations

* Make the dashboar route query parameters work, make panel edit menu work

* Enable more routes

* Fix side menu

* Handle view modes

* Disable playlist routes

* Make SafeDynamicImport work again

* Bring back router-debug

* Separate redux location sync from route rendering

* Refactor updateLocation to thunk and move force refresh(login) to it

* Fixing init dashboard issue

* Support switching between dashboards without an unmount of DashboardPage

* More fixes for init dashboard and panel edit

* More type fixes

* Moving angular location wrapper out of main LocationService, and fixing typescript issues

* Fixed last typescript errors

* LocationService: Move to runtime and  remove getLocationService and export singleston const instead (#31523)

* Moving location service implementation to runtime and removing get function and making it a package const singleton

* Added test that used locationService directly

* removed unused import

* AngularApp: Moving angular dependencies and the app boot out of the main app into it's own file  (#31525)

* Fixes angular panels by calling the monkey patch

* Moving angular stuff to to it's own files

* udpated

* Fixing clicking on divs and spans inside anchor

* Moving app notifications out of angular app and removing angular directive wrapper

* Moving search from angular to react and removing angular search wrapper

* Clean up, tried to remove the redux location wrapper but requires a big update for DashboardPage, so adding it back

* Moving AppWrapper to root to limit circular dependencies (app/core -> app/routing and back)

* Open and close search now works

* Hide sidemenu when in kiosk mode

* Restoring some keybindings like ESC key

* Removed kiosk events and simplified it, just handled through updating URL

* Fixing typescript errors

* Simplified GrafanaRouteComponentProps and renamed to ContainerProps

* renamed back

* Changed AlertRuleList to use GrafanaRouteComponentProps and location.search passed to it

* Removing the reloadOnSearch property, this is not needed now for react as react by default does not unmount components when only url match or query parmas change

* SafeDynamicImport causing unmount un every search update, not sure how to fix yet

* Fix signature for SafeDynamicImport so we do not create new route components on every route render

* Removing the redux location wrapper as it was causing errors, and making dashboard page work with RouteProps (location, match) etc

* Updating DashboardPage and SoloPanelPage to use match params and history location

* Fixed DashboardPage tests

* Fixing solo route tests

* LocationService: Rename getCurrentLocation to just getLocation

* do not intercept link clicks with target blank or self

* Experimental useUrlParams hook

* Update DataSourceSettingsPage to use router match params

* fix links with urls that have no starting / to work like before

* Fix forceLogin

* Add queryParams to GrafanaRouteComponentProps

* PanelEditor get rid of updateLocation and location state

* Improve grafana route query params typing

* Add getSearchObject to LocationService

* Use DashboardPAge queryParams instead of location.search parsing

* Fix DashboardPage typing

* Fix some tests weirdness

* Bring back KeyboardSrv

* Fixes typescript issues

* Team pages now use router match params

* Get rid of  from GrafanaRouteComponent props

* Removed unnessary calls to getSearchObject when calling locationService.partial

* Updated DashboardPage tests after queryParams was added

* Fixing dashboard settings back

* GrafanaRoute: Adding tests and remove use of global locationService

* Fixing tests and typescript errors

* Bring back kiosk modes and add tests

* Fix TimeSrv tests

* Fix typecheck errors

* Fixing tests

* Updated SideMenu test to react-testing and wrapped component in Router, and fixed issue importing createMemoryHistory

* Get rid of routeChange event from TimeSrv from

* Fixed TopSectionItem test

* Trying to make basename work but failing

* Update TopSectionItem snapshot

* Fix TopSectionItem snapshot test

* Fix API keys creation

* Remove Angular dependencies from KeybindingSrv (#31617)

* Remove Angular dependency from KeybindingsSrv

* Fix tests and typecheck issues

* basename is starting to work

* Make dashboard save work

* KeybindingSrv: Remove as angular service and no usage angular scope

* So long bridge_srv, we won't miss you

* Update snapshots

* Dashboard: Refactoring ChangeTracker to use History api and no angular (#31653)

* Dashboard: Refactoring ChangeTracker to use History api and no angular

* Updated

* Removed logging

* fixed unit tests

* updated snapshots

* Mechanism for force reloading routes (#31683)

* e2e: Fixes various things in e2e scenarios after router migration (#31685)

* Explore: Update reading query params from router props and updating location via locationService (ReactRouter)  (#31688)

* RoutingNG: Initial explore redux location to router location migration

* Updated explore Wrapper tests

* Fixing more tests

* remove loggin

* rename back to make naming consistent

* Fixing return to dashboard button

* fixing navigation to explore from dashboard

* updated routeProps

* Updated tests

* Make DashboardListPage work

* Fixing navigation after add new data source, and fixes explore e2e

* Fixing solo panel page

* PluginsPage now works

* RoutingNG: When parsing and rendering url search/query params preseve old logic of handling booleans and arrays (#31725)

* RoutingNG: When parsing and rendering url search/query params preserve old logic of handling booleans and arrays

* Fixed test

* Make snapshots list work

* fixed alert notification channel edit page

* Simplify LocationService, did not need special handling for login or forceLogin as target _self on link already handles that

* fixed UserAdminPage

* fixed edit orgs page

* Fixing LdapPage

* fixing dashboard import

* Fixed new folder page

* Fixed data source dashboards page

* fixing Folder permissions and folder settings page

* fixing snapshot list page nav model

* remove unused file

* Added placeholder page for playlist

* Moved browser compatability to index-template

* Restored 404/default page

* Fixed reset password page

* Fixed SignUpInvited page

* Fixing CreateTeam, Create user page, add panel widget

* Restore browwser file to make tests happy

* Fixed unit tests

* Removed unused import

* Replacing usage of updateLocation

* Fixed test

* Updating search filters to use history / location service for filters

* remove unused file

* AppRootPage fixed

* Fixing test and search issue

* Changes to support enterprise extensions

* remove console.log

* Removing more use of redux location

* Fixed signup page

* removed unused old angular controllers

* Fixing bugs

* one final bugfix

* Removed location from redux state

* Fixing ts issues and tests

* Fixing test issue

* fixing tests

* Fixing tests

* removed unused stuff

* Fixed search test

* Adding some doc comments

* Routing NG: Angular location provider patch (#31773)

* Patch Angulars $location provider

* Update public/app/angular/bridgeReactAngularRouting.ts

* Remove only test

* Update tests, disable loggers in test env

* Routing NG: remove $location provider usage (#31816)

* Remove dashboard_loaders

* Remove $location from Analytics service, track page views form GrafanaRoute

* Remove NotificationsEditCtrl

* Remove Angular dependencies from uploadDashboardDirective

* Update public/app/features/dashboard/containers/DashboardPage.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/DashboardPage.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Remove unused test helpers (#31831)

* Playlist react (#31829)

* playlist list in react

* Playlist start

* Things started to work

* Updated

* Handle empty list

* Fix ts

* Fixes and kiosk mode stuff

* Removed unused events

* fixing ts issue

* Another ts issue

* Fixing tests

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* fixed test

* Update public/app/AppWrapper.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/AppWrapper.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Remove Angular dependency from DashboardLoaderSrv (#31863)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-03-10 18:03:36 +01:00
Erik Sundell
f135d75a22
CloudWatch: Consume the grafana/aws-sdk (#31807)
* consume the grafana/aws-sdk

* upgrade aws-sdk
2021-03-10 14:19:39 +01:00
dependabot[bot]
d583875a63
Chore(deps): Bump elliptic from 6.5.3 to 6.5.4 (#31834)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-09 20:28:59 +01:00
Leon Sorokin
1fcf2c30c6
GraphNG: uPlot 1.6.6 (#31795) 2021-03-09 00:14:14 -06:00
dependabot[bot]
fb58c06383
Chore(deps): Bump prismjs from 1.21.0 to 1.23.0 (#31568)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.21.0 to 1.23.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.21.0...v1.23.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-05 07:57:17 +01:00
Alexander Emelin
8016b3c5ca
Live: Use pure WebSocket transport (#31630) 2021-03-04 09:06:42 +03:00
Marcus Andersson
a8bf1d68e3
Bug: adding resolution for react-use-measure to prevent plugin tests from failing. (#31603) 2021-03-02 16:00:27 +01:00
Jack Westbrook
e13a48166b
chore: bump lodash to 4.17.21 (#31549) 2021-03-02 10:13:27 +01:00
Jack Westbrook
5dc000d6b0
Grafana-data: bump markedjs to v2.x to resolve vulnerability (#31036)
* chore(grafana-data): bump marked to v2.x to resolve vulnerability

* chore(grafana-data): bump marked to v2.0.1
2021-03-01 11:35:51 +01:00
Torkel Ödegaard
5b0fe1a500
GrafanaUI: Fixes typescript error for missing css prop (#31479) 2021-02-25 16:16:32 +01:00
Zoltán Bedi
67c215f5f1
Chore: Upgrade eslint packages (#31408) 2021-02-23 10:02:07 +01:00
Jack Westbrook
4b25310941
Chore: grafana-toolkit uses grafana-ui and grafana-data workspaces (#30701)
* chore(grafana-toolkit): use workspace versions of grafana/ui and grafana/data

* chore: replace references to popperjs 1 typings with popperjs 2 typings
2021-02-16 19:33:50 +01:00
Josh Hunt
85e186cf10
Grafana-UI: Add id to Select to make it easier to test (#31230)
* Prettier formatting

* Grafana-UI: Add support for id and inputId props to Select

* Grafana-UI: Add aria-label to Select

* Grafana-UI: InlineField and Field get ID from inputId prop

For Select

* Fix tests using TagFilter

* Update Select prop documentation

* Update Field tests to use screen instead

* Fix the last few tests
2021-02-16 16:19:55 +00:00
Torkel Ödegaard
cb5928fdb7
PieChart: Progress on new core pie chart (#28020)
Use visx for the Pie chart plugin.

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-02-11 14:32:33 +01:00
Dominik Prokop
8d339a279b
Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989)
* Eslint: no-duplicate-imports rule (bump grafana-eslint-config)

* Chore: Fix duplicate imports (#31041)

* Rebased this branch into eslint-no-duplicate-imports

* updated some changes

* merged uncaught duplicate imports

* fixes frontend test- I hope

* fixes e2e test- I hope

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-02-11 13:45:25 +01:00
Leon Sorokin
b5400922e2
BarChart: inside-align strokes, upgrade uPlot to 1.6.4. (#30806) 2021-02-02 11:49:45 -06:00
Vicky Lee
b8dd50c297
bump cypress to 6.3.0 (#30644)
* bump cypress to 6.3.0

* fix inspect-drawer spec

* fix panelEdit_base spec

* fix select-focus spec

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* add be.visible assertion to new-query-variable spec to avoid flakiness

* increase waits in new-query-variable spec to avoid flakiness

* increase waits in new-query-variable spec by another 500

* remove be.visible assertion added before

* Chore: trying to fix flakiness

* skip the new-variable-query e2e test

* Chore: refactor so we might avoid flakiness

* Revert "skip the new-variable-query e2e test"

This reverts commit 203c1875c2.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-01-29 15:01:50 +00:00
Alex Khomenko
e36b035c05
DashboardPicker: switch to promise-based debounce, return dashboard UID (#30706)
* Use uid in dashboard picker

* Set both id and uid from picker

* Use debounce-promise

* Simplify logic

* Use exact package versions
2021-01-28 16:57:57 +02:00
Jack Westbrook
d2c88034e9
chore(grafana-ui): bump storybook to 6.1.15 (#30642) 2021-01-26 15:48:13 +01:00
Jack Westbrook
10aabe8ce3
chore: bump redux toolkit to 1.5.0 for immer 8.0.1 vulnerability fix (#30605) 2021-01-26 10:18:42 +01:00
Leon Sorokin
92a0ad7273
GraphNG: uPlot 1.6.3 (fix bands not filling below 0). close #30523. (#30527) 2021-01-21 19:30:24 -08:00
Leon Sorokin
87ef5598e6
GraphNG: uPlot 1.6.2 (#30521) 2021-01-21 16:10:50 -06:00
Jack Westbrook
e4d8cdfcdf
chore: update packages dependent on dot-prop to fix security vulnerability (#30432) 2021-01-21 11:20:30 +01:00
Jack Westbrook
930c19eb09
Chore: upgrade NPM security vulnerabilities (#30397)
* chore: bump serialize-javascript dependents to use 3.1.0+

* chore: manually bump is-my-json-valid to 2.20.5

* chore: resolve kind-of@6 to 6.0.3

* chore: bump webpack-dev-server to solve faye-websocket vulnerability
2021-01-20 13:32:24 +01:00
Torkel Ödegaard
1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00
Andrej Ocenas
218a8de220
NodeGraph: Add node graph visualization (#29706)
* Add GraphView component

* Add service map panel

* Add more metadata visuals

* Add context menu on click

* Add context menu for services

* Fix service map in dashboard

* Add field proxy in explore linkSupplier

* Refactor the link creation

* Remove test file

* Fix scale change when view is panned

* Fix node centering

* Don't show context menu if no links

* Fix service map containers

* Add collapsible around the service map

* Fix stats computation

* Remove debug log

* Fix time stats

* Allow string timestamp

* Make panning bounded

* Add zooming by mouse wheel

* Clean up the colors

* Fix stats for single trace graph

* Don't show debug config

* Add more complex layout

* Update layout with better fixing of the root nodes

* Code cleanup

* Change how we pass in link creation function and some more cleanup

* Refactor the panel section into separate render methods

* Make the edge hover more readable

* Move stats computation to data source

* Put edge labels to front

* Simplify layout for better multi graph layout

* Update for dark theme

* Move function to utils

* Visual improvements

* Improve context menu detail

* Allow custom details

* Rename to NodeGraph

* Remove unused dependencies

* Use named color palette and add some fallbacks for missing data

* Add test data scenario

* Rename plugin

* Switch scroll zoom direction to align with google maps

* Do some perf optimisations and rise the node limit

* Update alert styling

* Rename function

* Add tests

* Add more tests

* Change data frame column mapping to use column names

* Fix test

* Fix type errors

* Don't show context menu without links

* Add beta status to panel

* Fix tests

* Changed function to standard methods

* Fix typing

* Clean up yarn.lock

* Add some UI improvements

- better styling of the zoom buttons
- disable buttons when max reached

* Fix panel references after rename

* Add panel icon
2021-01-19 16:34:43 +01:00
Jack Westbrook
3279a032c6
chore: bump lodash to 4.17.20 (#30359) 2021-01-18 17:22:25 +01:00