* Embedding dashboards exploratino
* Update
* Update
* Added e2e test
* Update
* initial state, and onStateChange, only explore panel menu action and other fixes and tests
* fix e2e spec
* Fix url
* fixing test
* update selectors for prom
* add selector to switch component, needs id instead of testid
* add testid and ids to Prom settings
* add e2e tests for prom config
* add config to editor test
* export select function
* start query editor spec
* clean up describe
* add selectors for general query editor
* add selectors to components in options in best locations
* wrap header switch in id because component doesn't accept testid nor id
* add id to wrap legend components in one selector
* update selector in shared folder component, note to change in shared library
* update selector in shared folder component, note to change in shared library
* add notes for selectors in shared folder
* add tests and file for query editor
* add selectors for metrics browser in code editor
* add selector to component to open metrics browser
* add selectors to components within the metrics browser
* add tests for metrics browser and stub resource calls
* add selectors to query builder components
* add e2e tests for query builder
* generic query builder test with hints
* add selectors for more code editor parts
* add test for code and update selector
* fix tests with selector
* remove shared folder changes and use data-testid where possible
* remove unused import
* share getResources
* create variable query editor selectors
* add selectors to the variable query editor
* add e2e tests for the Prometheus variable query editor
* fix test function
* refactor add data source method
* add annotation selectors
* add selectors to annotation components
* add annotation e2e tests
* commit for yarn i18n:extract error in drone
* migrate from aria-label to data-testid for selectors
* fix e2e tests with shared components
* fix e2e tests with more shared components
* pass data-testid to SelectBase component
* pass data-testid to value container and traverse the dom to access the input in e2e
* Start splitting out code
* Use flag
* A bit of rocket surgery
* Prettify
* Cleanup behavior
* Work through behaviors
* Move empty message from other PR
* Import fixes and prettier
* Clean things up
* Add selector for tests
* Cleanups
* Working with transformation redesign
* Some more tweaks to make sure of correct behavior
* Update betterer/eslint exceptions
* Localization
* Remove unecessary fragments
* Spacing and prettier
* Update tests for new UI
* Update e2e tests
* One more e2e test fix
* Update selectors
* Fix one test and break another
* Add timeFilter macro to query builder
* Only render SQLWhereRow when fields are there
* Change the default query to timeseries and remove 50 limit
* Add timeFilter macro for the first time when timeSeries
* Add test for timeFilter macro
* Lint fix
* Annotation query format should be table
* Set order by as default
* Revert changes that made time series default
* Fix e2e test
* Fix e2e test
* Make sure to reset the date value when operator is changed
* Add docs
* user essentials mob! 🔱
lastFile:public/app/plugins/panel/dashlist/DashList.tsx
* DashList: Update variables in URL when they change
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add e2e test to check dashlist variables are always correctly passed
* add comment with link to issue
* Alternative solution
* Minor tweaks
* revert accidental change
* fix
* New solution
* Fix test
* refinement
* Added unit test
* Update devenv/dev-dashboards/panel-dashlist/dashlist.json
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* user essentials mob! 🔱
lastFile:public/app/plugins/panel/dashlist/DashList.tsx
* DashList: Update variables in URL when they change
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add e2e test to check dashlist variables are always correctly passed
* add comment with link to issue
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* Navigation: Basic e2e tests for docked mega menu
* give mega menu an e2e selector
* make existing tests narrower so menu doesn't default to docked. add test for auto docking at large viewport
* use new selector in nondocked menu
* clean up some e2e/runtime types
* fix some stories
* some more fixes
* fix route props
* update unit tests
* update more unit tests
* don't throw here
* build(npm): remove ts-loader from core and input-datasource
* build(input-datasource): update webpack config to use swc-loader
* chore(e2e): replace ts-loader with esbuild-loader
* Sandbox: initial dummy datasource plugin for e2e
* WIP: tests
* Add metrics to plugin.json so it shows up in explore
* Fix false positives in frontend-sandbox-datasource.spec.ts
* Change typed name to be static
* Add code to delete the datasource after tests are complete
* Add fail on status code
* Update tests for more config
* Replace visit with existing page
* Delete cleanup code
* Add initial e2e tests for sandboxing
* Add tests for sandbox on
* Add additional sandbox tests
* Move sandbox into various suite
* Test drone setup
* Move variable
* Update drone
* Update plugins path for e2e
* Revert drone changes
* use drone from main
* Use lib.star from main
* Move sandbox test to its own suite
* Expand methods to inject iframes
* Restore e2e script
* Add back change to script
* Update tests for trusted types
* Integrate custom plugins into grafana-server
* Echo for deubging
* add debugging message
* Expand message
* Add extra for ci
* fix path
* Improve start-server logic
* Remove duplicated logic
* Restore file deleted by mistake
* Restore file to main
p
* restore file
* Restore start script
* Update e2e/panels-suite/frontend-sandbox-panel.spec.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* remove scenario wrapping in cypress tests
* remove more hardcoded logins
* don't forget the various suite!
* make sure we log in for every test
* fix afterAll revert
* stability
* account for timezone when using relative times
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>
* keep as it was originally for now
* add e2e test for relative time zone overrides
* empty commit to add coauthors
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>
* fix types
* switch to using table panel in e2e test
* use regex for partial text match
* actually go to the dashboard...
* use include.text
* check for visibility first
* try waiting on backend request to complete
* CI driven development is fun
* make sure we're waiting for both data query calls
* open dashboard instead
* kick drone
* Revert "open dashboard instead"
This reverts commit bab9c77c4d.
* check timezone second
* refactor to avoid detached elements
---------
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>
* Revert "remove regions/locations from variable editor"
This reverts commit 41dc6a8bfb.
* Revert "remove region pieces from e2e"
This reverts commit 6b1f82f14a.
* e2e: open resource picker correctly
* AzureMonitor: Fix ResourcePicker hanging
Removed location fetching for every subscription.
Fixes#70523
* fix region for multi metricnames
* fix tests
* fix e2e
* remove regions/locations from variable editor
* remove region pieces from e2e
* Update public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/SettingsBar.tsx
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* revert modal styling and add specific styling to Sharing
* Update public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/SettingsBar.tsx
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* functions > const
* put a gat between all items in email config, instead of margins for each item
* fix html semantic elements
* ad theme to class component ShareModal
* add labels
* fix failing tests; now Settings has a summary and has to be opened to be able to see the On/Off toggles
* fix dashboard-public-create test with settings dropdown
* feat: template data source option current by uid
* fix: e2e with explicit uid for "slow-prometheus"
* revert: unrelated change
* revert: unreverted the actually related change
* chore: e2e support for testing ${variable:text}
* fix: use `:raw` instead of `:value` in e2e dashboard
* add tests for empty dashboard page
* add tests for AddPanelButton
* export default components
* test +Add menu in dashboard page
* use userEvent instead of firing an event on the DOM itself
* fix test to match new analytic events
* organize layout, make design uniform, add doc link
* fix e2e test
* move overhauled config parts into prometheus code
* update tooltips with doc links
* clean component styles for section padding, top and bottom 32px
* make additional settings subsection headers h6
* use secondary gray for section descriptions
* fix merge issues
* change inlineswitch to switch only in prom settings because the other components are shared
* remove legacy formfield and input, replace with inlinefield and input from grafana-ui
* find more formfield and UI design fixes like changing inlineformlabel to inlinefield
* remove unused inline form label
* replace legacy duration validations with <FieldValidationMessage>
* fix styles secondary gray from theme
* change language, headings and datasource -> data source
* update alert setting styles with new component
* update prom url heading and tooltip
* update default editor tooltip and set builder as default editor
* update interval tooltip
* update prom type tooltip
* update custom query params tooltip
* update exemplar internal link tooltip
* fix inline form styling inconsistency
* allow for using the DataSourceHTTPSettings component without the connection string
* remove overhaul component, re-use dshtttps comp, and use connection input in config editor
* make tooltips interactive to click links
* consistent label width across the elements we can control for now, fix exemplar switch
* make connection url a component
* refactor onBlur validation
* remove unused component
* add tests for config validations
* add more meaningful health check
* fix e2e test
* fix e2e test
* fix e2e test
* add error handling for more url errors
* remove unnecessary conversion
* health check tests
* Clean up the health check
* health check unit tests
* health check unit tests improved
* make pretty for drone
* lint check go
* lint check go
* add required attr to connection component
* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* fix read only issue for provisioned datasources
* validate multiple durations for incremental query setting
* use sentence case for headers
* use className consistently for styles
* add tests for url regex
* remove console logs
* only use query as healthcheck as the healthy api is not supported by Mimir
* fix exemplar e2e test
* remove overhaul prop from custom headers setting component
* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip
* add spaces back
* spaces
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
remove elements of flaky e2e test
This test only checks 'undo' in the code editor and then checks if the query builder is present. The test is timing out when looking for the query builder. There should be a second test to check if undo works in the query builder so I'm removing the query builder check. I will add an issue to create a test for 'undo' in the query builder.
* Update e2e package
- Ensure health request is monitored for addDatasource flow
- Add custom timeout to configurePanel flow
* Make health check optional
* update react 18 related deps
* fix some types
* make sure we're on react-router-dom >= 5.3.3
* Use new root API
* Remove StrictMode for now - react 18 double rendering causes issues
* fix + ignore some @grafana/ui types
* fix some more types
* use renderHook from @testing-library/react in almost all cases
* fix storybook types
* rewrite useDashboardSave to not use useEffect
* make props optional
* only render if props are provided
* add correct type for useCallback
* make resourcepicker tests more robust
* fix ModalManager rendering
* fix some more unit tests
* store the click coordinates in a ref as setState is NOT synchronous
* fix remaining e2e tests
* rewrite dashboardpage tests to avoid act warnings
* undo lint ignores
* fix ExpanderCell types
* set SymbolCell type correctly
* fix QueryAndExpressionsStep
* looks like the types were actually wrong instead :D
* undo this for now...
* remove spinner waits
* more robust tests
* rewrite errorboundary test to not explicitly count the number of renders
* make urlParam expect async
* increase timeout in waitFor
* revert ExplorePage test changes
* Update public/app/features/dashboard/containers/DashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* skip fakeTimer test, ignore table types for now + other review comments
* update package peerDeps
* small tweak to resourcepicker test
* update lockfile...
* increase timeout in sharepublicdashboard tests
* ensure ExplorePaneContainer passes correct queries to initializeExplore
* fix LokiContextUI test
* fix unit tests
* make importDashboard flow more consistent
* wait for dashboard name before continuing
* more test fixes
* readd dashboard name to variable e2e tests
* wait for switches to be enabled before clicking
* fix modal rendering
* don't use @testing-library/dom directly
* quick fix for rendering of panels in firefox
* make PromQueryField test more robust
* don't wait for chartData - in react 18 this can happen before the wait code even gets executed
---------
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Run test datasource query when mounted
* Auto running test-datasource creates more query history entries
* Make exemplar query intercept more robust
* Delete unrelated query history queries
* Revert "Run test datasource query when mounted"
This reverts commit 28b37e4df9.
* Add default query to testdata and grafana datasources
* add selector to close dashboard settings and use it in e2e tests
* check visibility of add panel button
* check visibility of add new panel button before clicking
* enable topnav by default
* rename dashboard-search to dashboard-browse
* wait for time to be set in e2e test before attempting to click button
* update toggle description
* Initial schema
- Add types based off of current frontend
* Rename and field-level comments
* Update report and regenerate files
* Rename frontend Azure folder
- Doing this for consistency and to ensure code-generation works
- Update betterer results due to file renames
* Remove default and add back enum vals that I deleted
* Set workspace prop as optional
* Replace template variable types
* Connect frontend query types
- Keep properties optional for now to avoid major changes
- Rename AzureMetricResource
- Correctly use ResultFormat
* Add TSVeneer decorator
* Update schema
* Update type
* Update CODEOWNERS
* Fix gen-cue issue
* Fix backend test
* Fix e2e test
* Update code coverage
* Remove references to old Azure Monitor path
* Review
* Regen files
* SQL: toRawSQL required and escape table
* Fix autocomplete for MySQL
* Change the way we escape for builder
* Rework escape ident to be smart instead
* Fix A11y for alias
* Add first e2e test
* Add test for code editor
* Add doc
* Review comments
* Move functions to sqlUtil
* Add e2e boilerplate for enterprise tests
* Remove enterprise symlink file
* Add tsconfig to e2e extensions folder and gitignore
* Update run-suite to use extensions folder
* Remove unnecessary tsconfig file
* Update e2e enterprise paths on gitignore
* Copy symlinked e2e enterprise files on run-suite
* Add cleanup command to run-suite
* Improve cleanup and setup for enterprise e2e tests
* Update e2e path for enterprise tests on gitignore
* Support to run different e2e tests for each license
* turn on topnav toggle in e2e tests
* fix variable e2e tests
* fix remaining tests + remove some hardcoded waits
* speculative fixes
* wait for error to disappear
* use new selector, turn toggle back off
* Add ability to retry e2e test scenarios
* Add wait and remove retries
* Revert retry logic and elaborate on 15s wait time
* No need to update datasource name now
* set default query expression
* always show raw query
* remove raw query title
* remove test for raw query toggle
* remove raw query toggle
* remove default expression
* hide raw query preview if empty
* remove e2e test for raw query toggle
* update test name
* Component that can cache and extract variable dependencies
* Component that can cache and extract variable dependencies
* Updates
* Refactoring
* Lots of refactoring and iterations of supporting both re-rendering and query re-execution
* Updated SceneCanvasText
* Updated name of file
* Updated
* Refactoring a bit
* Added back getName
* Added comment
* minor fix
* Minor fix
* Merge fixes
* Scene variable interpolation progress
* Merge fixes
* Added all format registeries
* Progress on multi value support
* Progress on multi value support
* Updates
* Progress on scoped vars
* Fixed circular dependency
* Updates
* Some review fixes
* Updated comment
* Added forceRender function
* Add back fail on console log
* Update public/app/features/scenes/variables/interpolation/sceneInterpolator.test.ts
* Moving functions from SceneObjectBase
* fixing tests
* Fixed e2e
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* feat(loki-monaco-editor): update e2e test with autocomplete steps
* Chore: replace typing method
* Test simpler POC test
* Chore: refactor test
* Chore: use selector to get the editor value
* feat(loki-monaco-editor): update tests
* chore(loki): use unified datasource mock function in tests
* chore: enable monaco feature flag in tests
* feat(loki-monaco-editor): add test case for disabled feature
* feat(loki-monaco-editor): enable by default
* Revert "feat(loki-monaco-editor): enable by default"
This reverts commit 08904f94a707a4fa32aa1e7f3f0de377575a7636.
* feat(loki-monaco-editor): enable from registry
* feat(loki-monaco-editor): make feature flag frontend only
* Update credentials form with data-testids and aria-labels
* Update gitignore
* Add example dashboard
* Stub out E2E test for creating ds and importing dashboard
* Add component selectors
* Remove subscription check temporarily
* Appropriately set disabled prop
* Fix lint issues
* Update to use selectors and wait on subscriptions request
* Add test for metrics panel
- Add required selectors for resource picker and metrics query editor
* Add logs and ARG basic query scenarios
- More selector updates
* Add E2E test for template variables
- Tests advanced resource picker
- Adds required selectors
* Remove log and add annotation e2e test
* Update test
* Prettier/betterer updates
- Remove gitignore change
* Lint issues
* Update betterer results
* Lint issue and remove unneeded import
* Don't print certain commands
* Avoiding flakiness
- Ensure code editor has sufficient time to load in ARG test
- Avoid flakiness around correct template variable being selected by typing in resource name
* Remove be.visible requirement
* Update test
* Update selector name
* Reuse datasource
* Fix datasource reuse and combine query tests
* Remove import dashboard step as unneeded
* Review
- Randomise datasource name
- Skip annotations test
- Remove unused example dashboard
* Update to ensure e2e test works in CI
* Update e2e test
- Update environment variables (process is not available in cypress)
- Add wait on resource picker searches to avoid flakiness
- Update subscription and resource group names
* Update CODEOWNERS
* Parse credentials in CI from outputs file
* Update outputs file path
* Fix selector
* Undo selector change
* Update e2e tests
- Set default subscription
- Fix datasource selection in variable editor
- Fix resource picker search flakiness
- Set subscription in ARG query test
- Fix resource group selection
- Update resource group
* Review
* Review 2
This PR splits the create and update paths for public dashboards and includes assorted refactors toward a proper REST API. Additionally, we removed the concept of a "public dashboard config" in favor of "public dashboard"
Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
This PR fixes the naming of routes for public dashboards to be more accurate and descriptive.
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected