* convert Slider tests to RTL
* slight update
* don't need to check they're in the document
* Update packages/grafana-ui/src/components/Slider/Slider.test.tsx
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* check below minimum value as well
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Logs: Add pagination range to prevent pagination from skipping entries
* Revert "Logs: Add pagination range to prevent pagination from skipping entries"
This reverts commit 2e7a6b3870.
* Refactor
* Update
* refactor: replace uses of checked prop for <Switch> with value prop
* fix: remove spaces from ids
The ID format is stated as follows([source][1]):
> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]),
hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
Since `QueryHeaderSwitch` is used in two places I created a new variable that replaces spaces with a dash in the label.
[1]: https://www.w3.org/TR/html401/types.html#type-name
* fix: allow Switch in AlertingSettings to be focused by keyboard
* fix: allow Switch in PromSettings to be focused by keyboard
Fixes#46472
Co-authored-by: Elfo404 <me@giordanoricci.com>
* Fix: Render unitless strings as strings from displayProcessor
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
* update tests
* Rename none unit
* rename none unit to Number
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
* move upload to http
* use storage from grafanads
* rever gomod changes
* fix test
* wip
* add upload func
* update upload func
* writing to uploads
* edit response from service
* use dropzone for UI
* modify response struct in service
* better read file
* set content type for svg
* restrict file types upload
* add test and clean up errors
* pass test
* fix backend lint errors
* limit type of files on FE
* add TODO for after merge
* rebase with storage changes
* comment out unused function
* update UI to not have 2 uploads
* only call upload on select
* use utils function to find * in path
* show preview on drag over
* not allowing upload of svg
* add preview to upload tab
* no console.log
* resolve conflicts
* refactor log line
* fix failing BE test
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
* CloudWatch: prevent log groups from being removed on query change.
Previously when a query was changed the existing log groups for that query were "dropped". The fix is to combine the
new query with the existing query object in memory to preserve the log groups.
fixes#33626
* CloudWatch: fix typos in runWithRetry documentation
* chore: fix eslint issue
* Move tab height and horizontal drawer height to themable variables so they can be referred to. Add a default height to tabbed container so it can set an explicit height. Add overflow: scroll to inspector content
* Use height variable that changes on resize
* Use css to set height
* Add feature flag and scaffodling
* start adding actions
* WIP
* move action files
* Start adding styles
* Fix implementation based on feedback
* Add more hackathon code back to command palette
* Cleanup
* Cleanup unused service files for simple MVP pass
* Move type def to library
* WIP
* Move provider to proper place to pick up other routes’ actions
* Build actions off navbar, add explore actions
* Work around undefined typescript stuff
* Fix based on feedback
* close palette on ESC
* Fix based on PR feedback pt 1
* Move styles to classes
* Move another inline style to a class
* Enable command palette by default
* change around async hook structure
* Add simple feature tracking
* Code cleanup, and be sure the command is accurate
* Change to only render if there are actions, and only add actions once past login
* Fix Date picker content when pane is splitted (#46900). Show narrow(mobile) content version.
* Change from boolean to value override and use it in calendar styles. Change calendar modal to be in center of screen.
* Be sure width division only happens on split view
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* Updates queryResponse tests to include new cachedResponse bool
* Adds cachedResponse bool to QueryResponse
* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests
* Adds totalQueries and cachedQueries counts to the data-request events
* Adds new metrics and their descriptions to docs
* uses more descriptive variable name
* changes naming
* removes hyphen in docs
* extracts calculations to own lines prior to assignment
* Update dependency @testing-library/user-event to v14.1.1
* make this test more consistent
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Update dependency @testing-library/user-event to v14
* everything is async...
* everything is async pt.2
* Fix cascader tests
* hack the yarn.lock file to remove the old version of @testing-library/dom
* some more fixes!
* MOAR FIXES
* more fixes
* remove a bunch of places where we're wrapping in act()
* down to 7 failing tests...
* Fix arrow tests
* Fix rest of NavBarItem tests
* Fix last tests
* Use {Enter} instead of {enter}
* Revert "Use {Enter} instead of {enter}"
This reverts commit e72453bb52.
* remove some unused act imports
* Fix LibraryPanelsSearch tests
* more stable test
* More consistent test...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* coremodel: finish string -> object datasource ref
Seems we missed updating a couple of the datasource references from
strings to objects.
* cue fmt
* Also fix dashboard in scuemata dashboard schema
* Update devenv/dev-dashboards/panel-graph/graph-ng-stacking2.json
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Show query errors under each query row
* Testing a more plain error box
* Font size
* Make it green
* Nit UI
* Slight simplification of condition
* New design
* Update
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Performance: Create separate div for portal root to limit reflow -> recalc style
* refactoring
* NoData: Use field config No value option as text when display no data message
* Use PanelDataErrorView in TabelPanel
* Add PanelDataErrorView to PieChart
* Updated
* Load Rich History when the container is opened
* Store rich history for each pane separately
* Do not update currently opened query history when an item is added
It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.
* Test starring and deleting query history items when both panes are open
* Remove e2e dependency on ExploreId
* Fix unit test
* Assert exact queries
* Simplify test
* Fix e2e tests
* Fix toolbar a11y
* Reload the history after an item is added
* Fix unit test
* Remove references to Explore from generic PageToolbar component
* Update test name
* Fix test assertion
* Add issue item to TODO
* Improve test assertion
* Simplify test setup
* Move query history settings to persistence layer
* Fix test import
* Fix unit test
* Fix unit test
* Test local storage settings API
* Code formatting
* Fix linting errors
* Add an integration test
* Add missing aria role
* Fix a11y issues
* Fix a11y issues
* Use divs instead of ul/li
Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:
Certain ARIA roles must contain particular children
(https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)
(#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)
<ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>
* Clean up settings tab
* Remove redundant aria label
* Remove redundant container
* Clean up test assertions
* Nav: Show overlay icons based on allowed list
* user essentials mob! 🔱
* Navigation: clean up and use new backend prop to show plus icons and
improve visual styling
* Nav: Fix top padding
* refactor to not use showIconInNavbar in NavBarMenuItem
* remove a missed bit
* refactor icon into const
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Select: Expose AsyncSelectProps interface
* DashboardPicker: Add a generic DashboardPicker component
* Dashboard Service: improve types
* Explore: allow saving explore state in a new panel in an existing dashboard
* Handle saving provisioned dashboards error
* Improve test coverage
* simplify test setup
* Strip base path from url when redirecting to a dashboard
* Keep existing variables when saving to an existing dashboard
* group assertions in test
* SearchCard: handle undefined in meta.updated
* Change required error message
* Add to dashboard alternative
* Add to existing is working
* Add to dashboard form
* remove default add-panel when creating a dashboard from explore
* types cleanup
* remove unneeded BE change
* simplify selector
* Add explore2Dashboard feature toggle
* add tests
* Small refactor & add tests
* small DashboardPicker improvements
* use partial from lodash
* Better error handling
* improve tests & disable button when there are no queries
* rename addPanelToDashboard function
* remove localStorage item if opening tab fails
* UI touchups & tracking
* Fix tests & remove close reporting
* remove echologger debug
* fix adding a panel to an existing dashboard
* Enable explore2Dashboard by default and add docs
* Ensure each panel in dashboards has a valid ID
* force CI restart
Co-authored-by: Elfo404 <me@giordanoricci.com>
* Load Rich History when the container is opened
* Store rich history for each pane separately
* Do not update currently opened query history when an item is added
It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.
* Test starring and deleting query history items when both panes are open
* Remove e2e dependency on ExploreId
* Fix unit test
* Assert exact queries
* Simplify test
* Fix e2e tests
* Fix toolbar a11y
* Reload the history after an item is added
* Fix unit test
* Remove references to Explore from generic PageToolbar component
* Update test name
* Fix test assertion
* Add issue item to TODO
* Improve test assertion
* Simplify test setup
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
FilterInput escapes all input strings for special characters that might
be used in a RegExp by calling escapeStringForRegex, and using
unEscapeStringFromRegex for display. Both of these functions used
string.prototype.replace() for escaping. replace() only replaces the
first occurence of a search string unless called with a global RegExp.
The output of these functions was not necessarily safe to compile into a
RegExp literal.
This change creates RegExps for escapeStringForRegex and
unEscapeStringFromRegex to match all occurrences of the special
characters instead of just their first occurrence. This makes a variety
of strings safe for RegExp compilation.
* AccessControl: Add a feature flag for the builtin role simplification
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Update standardDeatureFlags instead
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Next/prev buttons
* expand
* Sticky search bar
* Removed anys
* testing
* testing
* Tests for next/prev/suffix
* More tests
* Span bar row color
* Add clear to input and update search bar styles
* Update test
* PR changes
Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
* Expose option to disable help menu
* Expose option to disable profile menu
* Add Profile FeatureTogglePage
* Update public/app/features/profile/FeatureTogglePage.tsx
Uptake PR wording suggestion.
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Fix front end lint issue
* Fix back end lint issue
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Ensure TemplateService is updated with new time range on each time range change.
* Fix linting errors
* Fix explorePane.test.ts
* Reuse createDefaultInitialState
* Remove unused imports
* Add a test for left/right split
* Silence console.error in tests
* Silence console.error in tests
* feat: Bar Gauge Support scrolling
* Update public/app/plugins/panel/bargauge/module.tsx
Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
* Update public/app/plugins/panel/bargauge/module.tsx
Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
* docs: Bar gauge add 'min-width' and 'min-height'
Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
* Dashboard: Fixes save modal rendered ontop of save drawer
* removed commented line
* Simplified dismiss -> hideModal mapping
* Fixed issue with new dashboard
* Fixing issues
* Add history listener to update titleHref/parentHref when location changes
* Convert to functional component and use useLocation
* Wrap component in React.memo
* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
* Use bookmark icon for Saved Items, add support for solid bookmark icon
* Add some unit tests
* Refactor utils into own file
* Update test title
* Fix import
* consistent function style
* Update dependency @react-aria/button to v3.4.2
* Use type assertions
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Update Yarn to v3.2.0
* Update sdks as well
* Update nodejs to latest
* Updates
* Update grabpl to 2.9.23
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* PanelEdit: Change the meaning of default data source to be just that the default for new panels
* Added migration, and also migration for annotation datasource prop to data source refs
* fix
* Fixing tests
* Fixes to annotation
* Fixing unit test