Commit Graph

11265 Commits

Author SHA1 Message Date
Dominik Prokop
bdb5659977
NewPanelEdit: Organise sidebar in tabs (#22870)
* Refactor value mappings UI to work better with new panel edit

* TS fix

* Experimenting with tabs in the sidebar

* Small refactor and added Panel general settings

* Merge fixes

* fix fieldOptions being used instead of fieldConfig

* Added icons to tabs (testing)

* Only 3 tabs i think, panel specific options need ot exist in first tab, some style tweaks

* Moved title and no value up

* Updated

* Render panel options in Options tab and add old options styles hack to display those vertically

* Basic settings to Panel settings

* Make nullcheck pass

* Snaps bump

* Fix standard configs not update

* Organise sidebar better, add tmp NewPanelEditorContext to hide duplicate legacy options

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-20 15:15:04 +01:00
Boyko
c600a08524
Query components unsafe lifecycle methods (#21163)
* Chore: refactor query components unsafe lifecycle methods

* Chore: remove redundant defaults

* Chore: check expression exist while filter targets in query

* Chore: fix broken test

* Chore: adding query filed tests

* pass normalized query to QueryFieldsEditor

Signed-off-by: Boyko Lalov <boiskila@gmail.com>

* Remove introduced strictNullCheck errors and correctly solve merged conficts

* Improve redability and fix strictNullChecks

Co-authored-by: Ivana <ivana.huckova@gmail.com>
2020-03-20 13:00:49 +01:00
Torkel Ödegaard
8e131384e3
Panels: Fixed size issue with panels when existing panel edit mode (#22912) 2020-03-20 11:49:54 +01:00
Torkel Ödegaard
d16211b782
Azure: Fixed dropdowns not showing current value (#22914) 2020-03-20 11:04:21 +01:00
Marcus Andersson
5cf7803264
Fix: failing tests when running on none english os. (#22913) 2020-03-20 10:34:35 +01:00
Hugo Häggmark
8d5c6053db
BackendSrv: only add content-type on POST, PUT requests (#22910)
* BackendSrv: only add content-type on POST, PUT requests
Fixes #22869

* Tests: imports polyfill for Headers
2020-03-20 10:21:32 +01:00
Tobias Skarhed
a2b3da2792
Migration: Create org (#22542)
* Add NewOrgPage

* Remove filrs

* Remove import

* Remove comments

* Get navModel from Redux

* Add DTO

* Get nav model from state

* Change error display

* Add async await and check if org is available

* Fix null strict null error

* Update public/app/features/org/NewOrgPage.tsx

Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-03-19 14:22:53 +01:00
Dominik Prokop
f2742d4a28
NewPanelEdit: Refactor value mappings UI to work better with new panel edit (#22808)
* Refactor value mappings UI to work better with new panel edit

* TS fix
2020-03-19 12:28:05 +01:00
Dominik Prokop
bf7579d984
FieldOverrides: Move FieldConfigSource from fieldOptions to PanelModel.fieldConfig (#22600)
* Apply field overrides in PanelChrome

* Move applyFieldOverrides to panel query runner

* Review updates

* Make sure overrides are applied back on souce panel when exiting the new edit mode

* TS ignores in est

* Make field display work in viz repeater

* Review updates

* Review and test updates

* Change the way overrides and trransformations are retrieved in PQR

* Add fieldConfig property to PanelModel

* Dashboard migration v1

* Use field config when exiting new panel edit mode

* Gauge - use fieldConfig from panel model

* FieldDisplayOptions - don's extend FieldConfigSource

* Fix fieldDisplay ts

* StatPanel updated

* Stat panel defaults applied

* Table2 panel options  update

* React graph updates

* BarGauge updated

* PieChart, Gauge, BarGauge and Stat updates

* PieChart - remove field config defaults from options

* FieldDisplayEditor - remove unused methos

* PanelModel - remove debugger

* Remove fieldConfig from field options when migrating dashboard

* Update data links migrations

* Update fieldDisaplay tests to respect new fieldConfig

* Update dashboard schema version in snapshots

* Fix BarGaugePanel test

* Rebase fixes

* Add onFieldConfigChange to PanelProps type

* Update shared single stat migration

* Pass PanelModel instead of options only for panel type change handler [breaking]

* Renames

* Don't mutate panel options

* Migrations update

* Remove obsolete snap

* Minor updates after review

* Fix null checks

* Temporarily (until we decide to switch to new pane edit) bring back old aditors

* Temporarily rename ValueMappingEditor and MappingRow to Legacy*

* Migrations update

* Updae setFieldConfigDefaults API

* Update the way field config defaults are applied

* Use standard field config for gauge, bar gauge and stat panels

* refactoring

* Revert dashboard fieldOptions migrations as those are handled by single stat migrator

* Fix ts in tests

* Strict null fix and some minor fixes

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-19 11:50:31 +01:00
Ivana Huckova
8ba75e77b1
Design tweaks (#22886) 2020-03-19 10:17:56 +01:00
Ivana Huckova
0d88a49126
Remove duplicated localStorage mock (#22872) 2020-03-19 09:24:28 +01:00
Jess
db85c3e7b9
Rich history UX fixes (#22783)
* Initial commit

* Visualised renamed or deleted  datasources as well, if they have queries

* Pass ds image to card and information if the datasource was removed/renamed

* Set up card with datasource info and change run query

* Style comment, run button

* Fix button naming

* Remember last filters

* Update public/app/core/store.ts

* Update public/app/features/explore/RichHistory/RichHistory.tsx

* Update comments

* Rename datasource to data source

* Add test coverage, fix naming

* Remove unused styles, add feedback info

Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2020-03-19 08:47:27 +01:00
Daniel Lee
3b9a4e6444
AzureMonitor: support workspaces function for template variables (#22882)
* azuremonitor: adds support for workspaces query macro...

...for Azure Logs template variable queries

* docs: azure logs workspaces templating function

* Update docs/sources/features/datasources/azuremonitor.md

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* docs: convert list into table

* docs: fixes prettier formatting problem

Prettier adds a slash before dollar signs in markdown. Disabling it
for this table with a prettier comment.

https://prettier.io/docs/en/ignore.html

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-03-19 00:41:35 +01:00
Cyril Tovena
ec9167e972
Check if the datasource is of type loki using meta.id instead of name. (#22877)
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
2020-03-18 21:18:48 +01:00
Denis
26626d9073
Prometheus: Render missing labels in legend formats as an empty string (#22355)
* Empty value for unknown Prometheus label (grafana#16041)

* Empty value for unknown Prometheus label (grafana#16041)

* fix linter
2020-03-18 19:57:11 +01:00
Hugo Häggmark
52242ddf76
Variables: adds missing feature toggle in DashboardModel (#22868) 2020-03-18 15:55:12 +01:00
Torkel Ödegaard
044ec40112
Graphite: Rollup Indicator (#22738)
* WIP: Rollup indiator progress

* Progress

* Progress, can now open inspector with right tab

* changed type and made inspect

* Showing stats

* Progress

* Progress

* Getting ready for v1

* Added option and fixed some strict nulls

* Updated

* Fixed test
2020-03-18 13:00:14 +01:00
Torkel Ödegaard
aa4ed76a00
Graphite: Fixed issue with query editor and next select metric now showing after selecting metric node (#22856)
* Graphite: Fixed digest issue in graphite query editor

* Fixed unit test

* Updated
2020-03-18 11:47:31 +01:00
maximka
be73dcd2eb
Search: Improve tags layout , #22804 (#22830) 2020-03-18 08:14:56 +01:00
Erik Sundell
1cd7ce24c7
Stackdriver: Fix GCE auth bug when creating new data source (#22836)
* Fix test datasource for gce auth

* Cache gce default project locally

* Await gce default project call

* Remove reload functionality

* Fix build problem
2020-03-18 08:11:14 +01:00
Ivana Huckova
8edf8e3982
Rich history: Test coverage (#22852)
* Add unit test coverage

* Add tests to util/richHistory

* Remove unused import

* Remove redundant tests

* Fix tests for components

* Test saving to local storage

* Add boxshadow to container

* Revert "Add boxshadow to container"

This reverts commit 5ca2e850e4.

* Fix failing tests after merging master

* Fix imports, aria-labels

* Remove console.log
2020-03-17 23:24:27 +01:00
Ivana Huckova
d7312750a3
Revert "Explore: Add test coverage for Rich history (#22722)" (#22850)
This reverts commit 40a8aea313.
2020-03-17 17:20:32 +01:00
Ivana Huckova
40a8aea313
Explore: Add test coverage for Rich history (#22722)
* Add unit test coverage

* Add tests to util/richHistory

* Remove unused import

* Remove redundant tests

* Fix tests for components

* Test saving to local storage

* Add boxshadow to container

* Revert "Add boxshadow to container"

This reverts commit 5ca2e850e4.
2020-03-17 16:10:56 +01:00
Ivana Huckova
544690060a
Rich History: UX adjustments and fixes (#22729)
* Initial commit

* Fix spelling of data sources

* Display sorting value for starred and query tab

* Fix handle color for light theme

* Add close button and fix animation

* Remove toggling of tabs

* Stop event propagation when clicking on comment buttons

* Add title for card functionality

* Remove interpolation for easier searchability of variables

* Improve syncing of comments and starred

* Add modal to check if user wants to permanently delete history

* Fix the height of the query card buttons

* Adjust slider's width based on drawer width

* Add spacing between slider and legend

* Semantic variable naming

* Fix disabled button when live tailing

* Add error handling

* Remove unused imports

* Fix starring, remove useEffect

* Remove emiting of appEvents.alertError in store

* Remove unused imports
2020-03-17 16:06:02 +01:00
Hugo Häggmark
d953511e02
Variables: adds onTimeRangeUpdated to newVariables (#22821)
* Feature: adds onTimeRangeUpdated to newVariables

* Refactor: removes VariableWithRefresh and unused func

* Refactor: adds console output when something throws as well
2020-03-17 14:10:30 +01:00
Hugo Häggmark
dc76cc1a26
Variables: fixes so order in list is preserved after save (#22805) 2020-03-17 13:28:14 +01:00
Dominik Prokop
58298919c8
TablePanel: Enable new units picker (#22833) 2020-03-17 12:32:48 +01:00
Alex Khomenko
2fac834413
Fix dashboard picker's props (#22815) 2020-03-17 12:07:40 +02:00
Torkel Ödegaard
6c6fa7606e
TestData: New dashboard that tests variables that update on time range change (#22829) 2020-03-17 10:33:36 +01:00
Hugo Häggmark
45784f58f5
Variables: fixes so single value picker closes dropdown on select (#22823) 2020-03-17 08:29:10 +01:00
Torkel Ödegaard
46165a7f7b
SaveDashboard: Updated modal design/layout a bit (#22810) 2020-03-16 15:33:18 +01:00
Dominik Prokop
642c1a16dd
FieldOverrides: Apply field overrides in PanelQueryRunner (#22439)
* Apply field overrides in PanelChrome

* Move applyFieldOverrides to panel query runner

* Review updates

* Make sure overrides are applied back on souce panel when exiting the new edit mode

* TS ignores in est

* Make field display work in viz repeater

* Review updates

* Review and test updates

* Change the way overrides and trransformations are retrieved in PQR

* Minor updates after review

* Fix null checks
2020-03-16 14:26:03 +01:00
Hugo Häggmark
fb789e8398
Variables: migrates interval variable type to React/Redux (#22797)
* Feature: migrates interval variable type to React/Redux
2020-03-16 13:45:51 +01:00
Lukas Siatka
fd99bfab1d
DevEnv: update frontend dependencies - mixed 2/2 (#22148)
* DevEnv: updates sinon 1.17.6 -> 8.1.1

* DevEnv: updates zone.js 0.7.8 -> 0.10.2

* DevEnv: updates brace 0.10.0 -> 0.11.1

* DevEnv: updates eventemitter3 2.0.3 -> 4.0.0

* DevEnv: updates file-saver 1.3.8 -> 2.0.2

* DevEnv: updates is-hotkey 0.1.4 -> 0.1.6

* DevEnv: updates mousetrap 1.6.3 -> 1.6.5

* DevEnv: updates prismjs 1.16.0 -> 1.19.0

* DevEnv: updates search-query-parser 1.5.2 -> 1.5.4

* DevEnv: updates tether 1.4.5 -> 1.4.7

* DevEnv: updates xss 1.0.3 -> 1.0.6

* Revert "DevEnv: updates zone.js 0.7.8 -> 0.10.2"

* DevEnv: updates sinon 1.17.6 -> 8.1.1 in grafana-data package

* DevEnv: updates @types/sinon 7.0.11 -> 7.5.2 in grafana-data package

* DevEnv: updates eventemitter import

* DevEnv: updates lockfile
2020-03-16 13:14:57 +01:00
Marcus Andersson
be192b8191
Chore: migrate admin/users from angular to react + redux (#22759)
* Start adding admin users list page to redux/react.

* removed unused code.

* added pagination.

* changed so we use the new form styles.

* added tooltip.

* using tagbadge for authlabels.

* remove unused code.

* removed old code.

* Fixed the last feedback on PR.
2020-03-16 09:53:20 +01:00
Torkel Ödegaard
f78501f3b5
AngularPanels: Fixed inner height calculation (#22796) 2020-03-16 09:48:44 +01:00
Hugo Häggmark
1db067396a
Variables: migrates data source variable type to React/Redux (#22770)
* Refactor: moves all the newVariables part to features/variables directory

* Feature: adds datasource type

* Tests: adds reducer tests

* Tests: covers data source actions with tests

* Chore: reduces strict null errors
2020-03-16 06:32:04 +01:00
Hugo Häggmark
b30f4c7bb0
Fix: fixes issue with headers property with different casing (#22778)
Fixes #22756
2020-03-16 06:24:55 +01:00
Torkel Ödegaard
7b5b8ad3d3 Fronted: Fixed webpack chunk syntax error 2020-03-15 17:03:41 +01:00
Torkel Ödegaard
dfb3272bdb
E2E: Moving files & refactoring (#22787)
* E2E refactoring

* Updated circleci

* Updated lint paths
2020-03-13 18:48:38 +01:00
Peter Holmberg
7019471f3f
Migrate: Create new folder page (#22693)
* Migrate create new folder page

* Add header

* Bump react-hook-form

* Form async validatio example

* fix async validation

* Change input size

* async validation on new folder create + documentation

* remove angular things

* fix errors in docs

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-03-13 15:02:54 +01:00
Torkel Ödegaard
64877baa82
E2E: Run e2e tests on PRs and easy local isolated e2e grafana server setup & conf (#22772)
* e2e: Trying to get end-2-end tests to run on PRs

* Probably need quotes here

* Change back to machine

* CI: only build amd64 docker

* lowercase docker image name

* Fixed docker image name

* added end-to-end-test

* Fixed paths

* Added setup_remote_docker

* Updated

* Minor tweak

* update

* Testing

* UpdateD#

* Making some progress

* Update

* Updated

* update

* Updated

* Updated

* testing

* Updated

* Updated

* Updated

* Updated

* updated

* Changed image

* Updated image

* updated

* Addd logging

* trying one more thing

* Fixed build-fast-frontend

* Updated

* Added devenv to end-to-end server setup

* removed file

* Updated

* Minor change

* Fixes

* Updated workspace, and tried to make naming and paths compatible with master & release jobs

* fixed syntax issue

* Updated truth

* Fixed path
2020-03-13 14:34:25 +01:00
Alex Khomenko
451c95808d
Core: Pass the rest of to props to Select (#22776)
* Pass the rest of to props to Select

* Remove log
2020-03-13 13:07:15 +01:00
Lukas Siatka
2693f44a03
Explore: removes handling onBlur action in Explore for Loki and Prometheus (#22768)
* Explore: turns off actions execution on blur for Loki

* Explore: turns off actions execution on blur for Prometheus

* Explore: updates snapshots for Loki & Prometheus after turning off onBlur
2020-03-13 12:00:02 +01:00
Dominik Prokop
1256d9e78d
grafana/data: PanelTypeChangedHandler API update to use PanelModel instead of panel options object [BREAKING] (#22754)
This changes PanelModel's API to support PanelModel API updates when changing panel type. Primary useful when changing panel type between Angular and React panels, as other migrations can be handled via DashboardMigrator.

API change: https://github.com/grafana/grafana/pull/22754/files#diff-d9e3f91dc7d5697f6d85ada008003b4b
2020-03-13 08:27:16 +01:00
Marcus Andersson
f44c0f0643
Datasource: making sure we are having the same data field order when using mixed data sources. (#22718)
* changed so data query response always it returned in the correct order when using mixed data sources.

* refactored the code to make it a bit simpler and not failing the tests.

* changed to simple array type.
2020-03-12 18:16:32 +01:00
Dominik Prokop
b441b73345
DashboardSave: Autofocus save dashboard form input (#22748) 2020-03-12 11:50:50 +01:00
Hugo Häggmark
b51e28bc15
Chore: reduces strict null errors to 824 (#22744)
* Chore: reduces strict null errors with 100+

* Chore: lowers the build error number
2020-03-12 10:22:33 +01:00
Peter Holmberg
08d8190c02
PanelInspector: Add Stats Tab (#22683)
* add tab

* add process measurement

* Fixed some design issues

* Align tabs margin

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-11 13:19:06 +01:00
Torkel Ödegaard
c75574298c
Revert "Graph: Improve point rendering performance (#22610)" (#22716)
This reverts commit 0f6769665a.
2020-03-11 13:18:37 +01:00