* forbid setting role higher than user's role
* change response code
* can assign API key permissions to non-admin users
* add: assign viewer role directly upon creation
* refactor: add AddSATcommand infavor of AddAPIkey
* refactor: frontend fixes for ServiceAccountToken
Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
* Add permission check to the find route, add query not accessible warning for the view page
* Hide grafana or mimir rule buttons depending on user's permissions
* Add grafana and cloud read rules checking on the alert rules list view
* Improve missing data source handling, refactor edit and remove permissions handling
* Add tests for rule edit permissions
* PR feedback
* Explore: no data message
display no data text when query executed succesfully but no data was
returned
* Explore: 'no-data' display logic and styling fix
* pipeline trigger
* Revert "pipeline trigger"
This reverts commit f08d246ba767e66344ad252577523f391832ec18.
* Add more parameters for when to show no data
* Change check to use frame length
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.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
* 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
* Move count_values from function to aggregation
* Fix typos
* Fix loki operations
* Fix error that change the aggregation variant on blur
* Fix loki ops
* 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>
* Explore/Logs: Clarify phrasing of newline escape fix tooltip
Rewrite the tooltip for the smart feature in PR #31352 that
replaces incorrectly escaped newlines in log lines.
- Clarify the functionality of the feature to emphasize its
interactivity.
- Remove language suggesting that the feature is experimental,
when we intended to suggest reviewing the results manually for
correctness.
* Docs: Document escape newlines feature
Describe and provide steps for using the "Escape newlines" feature
in Explore added in PR #31352.
* Rewrite topic lead to clarify conditional behavior
* Describe reversion of replacements as a standalone task
Reverting the replacements is a separate action, so it should have
its own task. This also describes the option's transformation and
tightens the task language.
* Remove Grafana 7 version qualifier
* Clarify escape sequence detection lede on task
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Clarify "Remove escaping" state change
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
* Clarify confidence of tooltip content
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This change makes it explicit in the UI that a notification policy with no matching labels matches all alerts that it processes. There are visual changes in both the Notification Policy editor, and in the Notification Policy table where matching columns are shown.
It's valid to have a notification policy with no label matchers attached. Such a policy matches all alerts sent to it. It's a common stumbling block for users. Where are all my alerts going?
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
* wip: new metrics query editor
* prepend subscriptions to url path
* remove duplicated setQueryValue file
* add tests for new metrics query editor
* wip start extracting resource field into a shared component
* fix query editor test
* fix up backend tests
* move azure monitor specific getters to azure_monitor_datasource
* use existing useAsyncState hook
* extract useAsyncState into separate file
* add datahooks tests
* extract resource field component
* cleanup
* clarify variable names
* remove logs query specific resource field component
* add url_builder test
* add azure_monitor_datasources tests
* address comments
* add types
* pass resourceUri to resource field component
* add test to check we reset the query fields when changing resources
* Apply FGAC on the alert rules list page
* Add tests for edit, delete and silence buttons
* Unify access-control helpers
* Fix import
* Add route permissions for alert groups, unify access control helpers
* Improve buttons with data source explore permission
* Fix test
* loki: use single dataframe-format for both live and normal queries
* better comment
* better function-name
* simplified code
* logs_model: added test
* add FGAC actions for silences table
* redirect users without permissions
* add permissions checks to routes
* add fgac to notifications and contact points
* fgac for notification policies
* fix mute timing authorization
* use consistent naming for checking grafana alertmanager
* tests for fgac in contact points and notification policies
* bump up timeout on rule editor test
* use new permissions util
* break out route evaluation into util
* Remove test timeout
* Change permissions for the alert-notifiers endpoint
* Use signed in handler for alert-notifiers when unified alerting enabled
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* navigation: implement proper mobile menu
* Update public/app/core/components/NavBar/Next/NavBarMenu.tsx
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* animation feedback
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.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
* Add basic UI for custom ruler URL
* Add build info fetching for alerting data sources
* Add keeping data sources build info in the store
* Use data source build info to construct data source urls
* Remove unused code
* Add custom ruler support in prometheus api calls
* Migrate actions
* Use thunk condition to prevent multiple data source buildinfo fetches
* Unify prom and ruler rules loading
* Upgrade RuleEditor tests
* Upgrade RuleList tests
* Upgrade PanelAlertTab tests
* Upgrade actions tests
* Build info refactoring
* Get rid of lotex ruler support action
* Add prom ruler availability checking when the buildinfo is not available
* Add rulerUrlBuilder tests
* Improve prometheus data source validation, small build info refactoring
* Change prefix based on Prometheus subtype
* Use the correct path
* Revert config routing
* Add deprecation notice for /api/prom prefix
* Add tests to the datasource subtype
* Remove custom ruler support
* Remove deprecation notice
* Prevent fetching ruler rules when ruler api is not available
* Add build info tests
* Unify naming of ruler methods
* Fix test
* Change buildinfo data source validation
* Use strings for subtype params and unveil mimir
* organise imports
* frontend changes and wordsmithing
* fix test suite
* add a nicer verbose message for prometheus datasources
* detect Mimir datasource
* fix test
* fix buildinfo test for Mimir
* shrink vectors
* add some code documentation
* DRY prepareRulesFilterQueryParams
* clarify that Prometheus does not support managing rules
* Improve buildinfo error handling
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
* no other tab has title
* made Add service button not visable and upper right
* renaming and added space between token number
* aligned button (:css:)
* refactor: out component listitem
* unused import
* loki: do not mutate the caller's data
* Update public/app/plugins/datasource/loki/result_transformer.ts
better comment
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update public/app/plugins/datasource/loki/result_transformer.ts
no need to handle __name__
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* simplify code
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
* Create parser
* Add parsing
* Update comment
* Remove operations that we don't support
* Resolve type errors
* Update test
* Handle backticks
* Handle backticks
* Remove copied test, update test
* Parsing for binary operations
* Remove error about setting state after unmount
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.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>
* Binary ops support
* Add support for nested expressions in loki
* Nested queries working
* Fixing tests
* Share more code between loki and prometheus query modellers
* 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`