Commit Graph

11233 Commits

Author SHA1 Message Date
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
Agnès Toulet
34c9233501
Datasources: Update dashboards (#22476)
* Datasources: Update dashboards

* Datasources: increase dashboard versions

* Datasources: prometheus dashboards improvements

- Update links
- Add target="blank" if missing
- Remove not showing image
2020-03-11 10:56:45 +01:00
Sofia Papagiannaki
be022d4239
API: Fix redirect issues (#22285)
* Revert "API: Fix redirect issue when configured to use a subpath (#21652)" (#22671)

This reverts commit 0e2d874ecf.

* Fix redirect validation (#22675)

* Chore: Add test for parse of app url and app sub url

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Fix redirect: prepend subpath only if it's missing (#22676)

* Validate redirect in login oauth (#22677)

* Fix invalid redirect for authenticated user (#22678)

* Login: Use correct path for OAuth logos

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-03-11 11:04:48 +02:00
Lukas Siatka
688283a5cc
Explore: adds QueryRowErrors component, moves error display to QueryRow (#22438)
* Explore: adds QueryRowErrors component

* Explore: updates QueryRow to use QueryRowErrors component

* Explore: updates PromQueryField to remove error render

* Explore: updates Elastic query field  to remove error render

* Explore: updates LokiQueryFieldForm to remove error render

* Explore: updates QueryRow component - brings back passing errors down

* Explore: removes QueryRowErrors component

* Explore: updates ErrorContainer component - moves out data filtering

* Explore: updates QueryRow component - changes QueryRowErrors to ErrorContainer

* Explore: updates Explore component - adds error filtering for ErrorContainer

* Explore: updates ErrorContainer and adds a basic test for it

* Explore: updates Explore component props name and adds a basic render test

* Explore: adds snapshots for Explore and ErrorContainer

* Explore: adds a test for error render

* Explore: adds a comment to Explore component explaining the way we filter non-query-row-specific errors

* Explore: adds getFirstNonQueryRowSpecificError method to explore utilities

* Explore: extracts getFirstNonQueryRowSpecificError method and slightly refactors Explore component

* Explore: updates Explore component tests to cover non-query-row-specific errors
2020-03-11 10:01:58 +01:00
Torkel Ödegaard
bbed213115
RichHistory: Design Tweaks (#22703)
* design tweaks

* RichHistory: Design tweaks
2020-03-11 09:37:35 +01:00
Dominik Prokop
4845321b43
Modals: Unify angular/react modals backdrop color (#22708) 2020-03-11 09:30:08 +01:00
Torkel Ödegaard
9824219a58
UX: Update new form styles to dark inputs (#22701)
* UX: Update new form styles to dark inputs

* Aligning styles a bit

* Updated snapshot
2020-03-11 09:20:28 +01:00
Tobias Skarhed
b4666456f0
Pass dashboard via angular directive (#22696) 2020-03-11 08:31:07 +01:00
Shavonn Brown
b761679d80
Graphite: Update config editor (#22553)
* update config editor

* inlining

* move inline styles

* removed inline style but emotion not working

* fix styles, update types const
2020-03-10 13:20:38 -04:00
Ivana Huckova
62c824e3a4
Explore: Rich History (#22570)
* Explore: Refactor active buttons css

* Explore: Add query history button

* WIP: Creating drawer

* WIP: Create custom drawer (for now)

* Revert changes to Drawer.tsx

* WIP: Layout finished

* Rich History: Set up boilerplate for Settings

* WIP: Query history cards

* Refactor, split components

* Add resizability, interactivity

* Save history to local storage

* Visualise queries from queryhistory local storage

* Set up query history settings

* Refactor

* Create link, un-refactored verison

* Copyable url

* WIP: Add slider

* Commenting feature

* Slider filtration

* Add headings

* Hide Rich history behind feature toggle

* Cleaning up, refactors

* Update tests

* Implement getQueryDisplayText

* Update lockfile for new dependencies

* Update heading based on sorting

* Fix typescript strinctNullCheck errors

* Fix Forms, new forms

* Fixes based on provided feedback

* Fixes, splitting component into two

* Add tooltips, add delete history button

* Clicking on card adds queries to query rows

* Delete history, width of drawers

* UI/UX changes, updates

* Add number of queries to headings, box shadows

* Fix slider, remove feature toggle

* Fix typo in the beta announcement

* Fix how the rich history state is rendered when initialization

* Move updateFilters when activeDatasourceFilter onlyto RichHistory, remove duplicated code

* Fix typescript strictnull errors, not used variables errors
2020-03-10 15:08:15 +01:00
Erik Sundell
cd012bdfb4
Fix caching problem (#22473) 2020-03-10 14:10:48 +01:00
Tobias Skarhed
7598d3fb43
Notification Channel: Make test button wider (#22653)
* Remove width
2020-03-10 13:17:03 +01:00
Miguel Carvajal
6979b44592
Alerting: Fixed bad background color for default notifications in alert tab (#22660)
* fix: remove harcoded bg color

* added default info

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-10 11:24:23 +01:00
Alex Khomenko
5aeb367322
Core: DashboardPicker improvements (#22619)
* Refactor the picker to FC

* Remove redundant variable

* currentDashboardId => currentDashboard

* Make isClearable configurable

* Use useAsyncFn for options loading

* Move getDashboards outside of component
2020-03-10 11:16:56 +02:00
Marcus Andersson
cc813d71c6
Templating: Migrates some variable types from Angular to React/Redux (#22434)
* Refactor: Adds variables in state to TemplateSrv

* Refactor: Introduces some typings and structures

* Refactor: Introduces picker to adapter

* Refactor: Removes useState and introduces contains instead

* Refactor: Introduces Variable Editor

* Refactor: Adds uuid and simplifies state

* Refactor: Consolidates to VariableRenderer

* Refactor: Adds name change capability

* Refactor: Adds variableMiddleware

* Refactor: Adds ability to change Angular type to type in State

* Fix: Fixes so we check for duplicate names

* Refactor: Adds ability to change State type to type in Angular

* Refactor: Updates name in dashboard templating list

* Refactor: Adds label change to VariableEditor

* Refactor: Adds hide change to VariableEditor

* Refactor: Adds update ability

* Refactor: Adds tooltip

* Refactor: Adds SelectionOptionsEditor

* Refactor: Adds query editor and validation

* Refactor: Adds regex and sort to editor

* Refactor: Adds Selection options

* Refactor: Adds Varible Values Previewer

* Refactor: Changes from array in state to Record

* Refactor: Removes getVariableAtIndex from templateSrv

* Tests: Fixs broken tests

* Chore: Fixes duplicate merge import

* Refactor: Removes strict null errors

* Refactor: Adds duplicate variable

* Refactor: Adds remove variable

* Refactor: Adds change order of variables

* Refactor: Adds add new variable

* Chore: Fixes Prettier formatting

* Refactor: Adds VariablePicker

* Fixed so sub menu is displayed when we only have redux template variables.

* removed unused variable.

* tags will be visibile in the new react picker.

* added some nice colors to the tags.

* Added thunk for selecting a tag.

* Refactor: Cleans up templating state when dashboard unloads

* Refactor: Adds save capabilities for variables in state

* added possibility to select tag.

* Added so you can deselect a tag.

* Fixed issue with coloring on top.

* minor refactoring to make the code more slim.

* Refactor: Fixes dispatch return and copy of variable

* selecting options when tag i selected

* small refactoring.

* fixed so we use options.

* Refactor: Adds getValueForUrl capabilities

* first implementation of keyboard navigation on picker.

* removed comment.

* fixed so you can toggle all options.

* Refactor: Simplified state handling using Redux Toolkit and flat reducer structure

* Refactor: Adds sharedTemplatingReducer and queryVariableReducer

* Tests: Fixs broken tests

* Chore: Removes some strict null errors

* Tests: Fix broken tests

* Refactor: Splitted QueryVariablePicker into smaller components

* Refactor: Moves linktext and selected tags to component instead

* Fix: Fixes the ability to have multiple dropdowns opened at same time

* Fix: Fixes onKeyDown from prev refactor

* Refactor: Adds searchfilter searching

* Tests: Fixes after running e2e tests

* Refactor: Adds an attempt to solve dependencies at startup

* Refactor: Adds feature toggle

* Refactor: Resets all angular files to master

* Refactor: Move stuff to query folder

* Refactor: Initial commit for SubMenu component

* Refactor: Updated DashboardModel with new list

* Refactor: Adds feature toggle to dashboard model and friends

* Refactor: Adds picker to SubMenu

* Refactor: Fixes styling on SubMenu

* Refactor: Fixes processvariables

* Refactor: Initial EditorList skeleton

* Refactor: Refactors out VariableEditorList and VariableEditorContainer

* Refactor: Adds New variable functionality

* Refactor: Adds registred types

* Refactor: Adds edit existing variable functionality

* Refactor: Changes params to thunks

* Refactor: Small fix for cleaning up state when clicking update/add

* Refactor: Better typings for outer containers

* Refactor: Adds change order functionality

* Refactor: Removed notify angular args

* Change so the url is in sync with the redux template variables.

* Adding support for saving proper values and checking changes.

* Refactor: Adds duplicate variable functionality

* Feature: Adds remove variable functionality

* Refactor: Small refactor so e2e tests work as before

* Refactor: Returns null if no visible variables

* Refactor: Adds annotations to SubMenu

* Refactor: Fixes toggling of annotations in SubMenu

* added dashboard links to new submehu.

* Refactor: Small refactor breaking up into smaller components

* Fix: Fixes infinite recursive loop when changing varible name

* Templating: Do not mutate location query state

* Refactor: Fixes minor timing issue when adding new variable

* Refactor: removes initialization in variable_srv constructor

* Refactor: Suggestion on how to handle templating.list in DashboardExporter

* Refactor: Adds getVariables typings and changes ChangeTracker and ShareSnapshotCtrl

* Refactor: Adds getVariable on DashboardModel and changes DashboardMigrator

* Fix: Fixes repeated panels

* wip: starting to add custom variable type.

* Refactor: Merging two different toVariablePayload functions

* Tests: Fixes broken tests

* Fix: Reduces strict null errors

* Tests: Initial commit and fixes strange dependency order

* Tests: Covers sharedTemplatingReducer with tests

* Refactor: Rename state/index.ts => state/reducers.ts as every where else

* Refactor: Renames and moves adapters.ts

* Tests: Adds tests for templatingReducer

* Tests: Adds intitial tests for queryVariableReducer

* starting to ad custom variable.

* Tests: Adds more queryVariableReducer tests

* Added support for custom variable. Next up applying some DRY principles and refactoring.

* fixed compile issue.

* added todo.

* Tests: Fixes broken test

* Tests: Covers queryVariableReducer with tests and fixed a couple of bugs

* Fix: Fixes broken test

* Fix: Reduces strict null errors

* change so custom won't be depending on anything elese.

* fixed descriptions.

* removed unused dependency.

* Fixed issue when adding a new variable and editor is being unmount twice.

* fixed issue with select option loop.

* changed so we update query on typing in editor and removed it from component state.

* Moved runQuery up one level in the component tree.

* renamed action and moved it to custom actions.

* moved applyStateChanges to shared code.

* removed todo comment.

* first stab on moving picker to more general.

* Refactor: Changes so we always show variables type

* removed duplicate code regarding picker.

* Did some renamings.

* Feature: Adds text box variable type

* moved tests from query reducer to picker reducer.

* Removed picker from VariableState.

* removed reference to picker.

* Some more refactorings of the picker reducer + actions.

* Chore: Refactors away editor state to its own state slice (#22515)

* Refactor: Inital move, tests not working

* Tests: Adds editorReducer tests

* Refactor: Cleaning up

* Refactor: Moves logic to thunk instead

* Refactor: Initial commit

* Refactor: Combines reducers to one state

* Refactor: Adds combine reducers

* moved navigation logic flow to a thunk instead of in the component.

* fixed issue with rendering picker link.

* Refactor: Removes variable prop from templating.variables

* refactored and removed some more code.

* Feature: adds Constant variable type

* fixed so tags can be selected.

* Fix: fixes default hide for constant and enum order

* fixed so tags works again.

* Fix: fixes so we use Angular editor when newVariables is not defined

* Fix: fixes wrong hide default for Constant variable

* Fix: fixes bug when using duplicate button

* Fix: changes action id

* Tests: prepares for newVariables

* Chore: reduces strict null errors

* Refactor: removes uuidInEditorReducer for simplification

* Chore: changes after PR comments

* Chore: uses getConfig instead of config

* Tests: fixes so e2e tests check for feature toggle and fixed initLock bug

* Refactor: changes so sharedReducer uses createSlice instead

* Refactor: changes textBoxVariableReducer to use creactSlice instead

* Refactor: changes queryBoxVariableReducer to use creactSlice instead

* Refactor: changes customVariableReducer to use creactSlice instead

* Refactor: changes constantVariableReducer to use creactSlice instead

* Refactor: moves types to specific types.ts files instead

* changed so we use queryValue stored on the variable to populate options input when opening picker.

* Feature: adds the ability to test templating thunks using real store and middleware

* Chore: cleans up unused import

* excluded queryValue from the getSaveModel

* Refactor: adds whenAsyncActionIsDispatched to reduxTester

* Tests: adds initial tests for processVariables

* Added reducer tests for constant variable.

* added tests for custom reducer.

* added tets for texbox reducer.

* Tests: adds more tests for ProcessVariable

* Refactor: fixes processVariable flow so we do notrun updateOptions twice

* Tests: finishes tests for processVariables and removed skip test

* added actions tests for custom and constant.

* Tests: adds tests for setOptionFromUrl

* Tests: adds a naive variable mock builder

* Tests: adds tests for validateVariableSelectionState

* added tests for query variable actions.

* added last test for query actions.

* added more tests.

* some more tests.

* fixed typing errors.

* Fixed issues with variable tags.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-10 08:53:41 +01:00
Dominik Prokop
0304493bd2
DashboardSave: Correctly overwrite dashboard when saving (#22650) 2020-03-09 18:16:10 +01:00
jonghyeon
0f6769665a
Graph: Improve point rendering performance (#22610)
this PR improves canvas rendering performance in drawSeriesPoints
2020-03-06 09:26:15 +01:00
Lukas Siatka
99daa4454b
Alerting: Fix state age test failures (#22606)
- use output from relative time instead of static string to prevent
clock issues
2020-03-06 00:28:20 +01:00
Daniel Lee
f95c8b785c
Stackdriver: Migrate GCE default project (#22593)
* Ensure default project

* Remove debug logging

* Fix broken test

* Update snapshot
2020-03-05 17:53:41 +01:00
Marcus Andersson
d227353321
Fix: when reloading page make sure that time picker history is converted to dateTime. 2020-03-05 13:14:42 +01:00
David
54a3f5fd87
Loki: use series API for stream facetting (#21332) 2020-03-04 17:17:02 +01:00
Shavonn Brown
b27985ef38
Azure Monitor: config editor updates, update sameas switch, fix test snaps (#22554)
* azure monitor config editor updates, do not show helper for sameas unless just switched, not create

* update snapshots
2020-03-04 09:11:11 -05:00
Alexander Zobnin
e1af933d4a
Chore: fix moment import in alerting tests (#22567)
* Chore: disable no-restricted-imports rule for moment

fix enterprise build

* Chore: get rid of moment, use dateTime in alerting tetst
2020-03-04 15:47:23 +03:00
Alexander Zobnin
fcaff011b1
ShareModal: able to extend tabs (#22537)
* ShareModal: use generic tab type

* ShareModal: able to extend with custom tabs

* ShareModal: able to extend dash/panel tabs separately

* grafana-ui: ModalTabContent component
2020-03-04 12:59:30 +03:00
Alexander Zobnin
9731ea9b89
Tests: fix alerting reducers tests (#22560) 2020-03-04 12:39:56 +03:00
Alexander Zobnin
3aa3fa3ee1
Chore: add missing aria-label for rendered panel image (e2e tests) (#22543) 2020-03-03 18:51:49 +03:00
Alex Khomenko
3a5375ddd8
Form migrations: Dashboard- and TimeZonePicker (#22459)
* Add new form styles to dashboard picker

* Use Forms.Select for TimeZonePicker

* Use new form elements for DashboardPicker

* Grafana UI: Extract types from SelectBase, add utils.ts

* Grafana UI: Fix imports

* Grafana UI: Add support for value of type number

* Grafana UI: tweak value search function

* Grafana UI: Add tests for findSelectedValue

* Grafana UI: Add tests for cleanValue

* Grafana UI: Remove redundant check

* Grafana UI: Order imports

* Grafana-UI: Fix TimeZonePicker.story.tsx

* Grafana-UI: Fix timezone value

* Fix merge

* Grafana-UI: Use Cascader vs Forms.Select for TimeZonePicker

* Grafana-UI: Add default size props
2020-03-03 15:09:52 +01:00
Alexander Zobnin
d66e72fa67
Migration: Share dashboard/panel modal (#22436)
* ShareModal: refactor dashboard export modal

* Modal: show react modals with appEvents

* ShareModal: embed panel tab

* ShareModal: bind to shortcut (p s)

* grafana-ui: ClipboardButton component

* ShareModal: use ClipboardButton component

* ClipboardButton: add to storybook

* ShareModal: use event-based approach for dashboard share

* ShareModal: remove unused

* ModalReact: pass theme to the component

* ShareModal: styles clean up

* DashboardExporter: fix tests

* fixed whitespace betwen icon and link

* ShareModal: use theme from config

* Modal: tab header refactor

* ShareModal: tests

* ShareModal: fix share url rendering

* ShareModal: remove unused angular files

* Chore: fix strictNullChecks errors

* Modal: provide theme for event-based modal usage

* ShareModal: use ModalsController for opening modal

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-03 15:04:28 +03:00
Tobias Skarhed
87da6a293b
Revert "Select: scroll into view when navigate with up/down arrows (#22503)" (#22535)
This reverts commit 75fe3c839b.
2020-03-03 11:51:17 +01:00
Dominik Prokop
baa356e26d
Migration: Save dashboard modals (#22395)
* Add mechanism for imperatively showing modals

* Migration work in progress

* Reorganise save modal components

* use app events emmiter instead of root scope one

* Add center alignment to layoout component

* Make save buttons wotk

* Prettier

* Remove save dashboard logic  from dashboard srv

* Remove unused code

* Dont show error notifications

* Save modal when dashboard is overwritten

* For tweaks

* Folder picker tweaks

* Save dashboard tweaks

* Copy provisioned dashboard to clipboard

* Enable saving dashboard json to file

* Use SaveDashboardAsButton

* Review

* Align buttons in dashboard settings

* Migrate SaveDashboardAs tests

* TS fixes

* SaveDashboardForm tests migrated

* Fixe some failing tests

* Fix folder picker tests

* Fix HistoryListCtrl tests

* Remove old import

* Enable fixed positioning for folder picker select menu

* Modal: show react modals with appEvents

* Open react modals using event

* Move save dashboard modals to dashboard feature

* Make e2e pass

* Update public/app/features/dashboard/components/SaveDashboard/SaveDashboardButton.tsx

* Hacking old vs new buttons to make all the things look like it's old good Grafana ;)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2020-03-03 08:22:26 +01:00
Erik Sundell
934a8f08ae
Stackdriver: Project selector (#22447)
* clean PR #17366

* udpate vendor

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* Implement projects management for stackdriver

* [WIP][Tests] Fix errors

* clean anonymous struct

* remove await

* don't store project list

* Add default project on query editor

* gofmt

* Fix tests

* Move test data source to backend

* Use segment instead of dropdown. remove ensure default project since it's not being used anymore.

* Fix broken annotation editor

* Load gceDefaultAccount only once when in the config page

* Reset error message on auth type change

* Add metric find query for projects

* Remove debug code

* Fix broken tests

* Fix typings

* Fix lint error

* Slightly different approach - now having a distiction between config page default project, and project that is selectable from the dropdown in the query editor.

* Fix broken tests

* Attempt to fix strict ts errors

* Prevent state from being set multiple times

* Remove noOptionsMessage since it seems to be obosolete in react select

* One more attempt to solve ts strict error

* Interpolate project template variable. Make sure its loaded correctly when opening variable query editor first time

* Implicit any fix

* fix: typescript strict null check fixes

* Return empty array in case project endpoint fails

* Rename project to projectName to prevent clashing with legacy query prop

* Fix broken test

* fix: Stackdriver - template replace on filter label

should have a regex format as that escapes the dots
in the label name which is not valid.

Co-authored-by: Labesse Kévin <kevin@labesse.me>
Co-authored-by: Elias Cédric Laouiti <elias@abtasty.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2020-03-02 09:31:09 -05:00
Boyko
75fe3c839b
Select: scroll into view when navigate with up/down arrows (#22503)
* scroll into view when move item up/down

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

* update test snapshots

Signed-off-by: blalov <boiskila@gmail.com>
2020-03-02 12:17:39 +01:00
Chadi El Masri
3c21a37bbe
Elastic: To get fields, start with today's index and go backwards (#22318)
* Elastic: To get fields, start with today's index and go backwards

* Elastic: distinguish non-existing indices from other issues; change index traversal from recursive to iterative; go through a max of 7 days

* Elastic: fix the comments

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2020-03-02 10:45:31 +01:00