* Fix: Add relativeTimeRange from dataSource when using Resample expression
* Add test for relativeTimeRange when updating resample expression
* update time range for expressions when data sources are updated
* Get data source recursively from expression up to the last query that this tree is referencing to
* Remove unnecessary produce from immer, and check if there is a cycle in the queries structure
* Theme: Inter font change with new line-height
* Add it behind feature toggle
* make buildVariant easier to read + enforce integer multiples of 2 (#56486)
* Minor update
* Update
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add api route for validating a dashboard json
* add feature flag for showDashboardValidationWarnings
* tidy up
* comments and messages
* swagger specs
* fix typo
* more swagger
* tests!
* tidy test a little bit
* no more ioutil
* api will return different status code depending on validation error
* clean up
* handle 4xx errors
* remove console.log
* fix backend tests
* tidy up
* Swagger: Exclude alpha endpoints
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Refactor fetch for reveivers for using RTKQuery
* Simplify receiversApi contactPointsState endpoint
* Fix tests and create useGetContactPointsState hook for using receiversApi.useContactPointsStateQuery
This PR adds an audit table for public dashboards allowing a user to view all public dashboards on an instance of grafana. The public dashboards team is working on a proposal for adding RBAC support to the audit table for 9.3
Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
* Add feature tracking for ad-hoc statistics in log rows
* Make row prop mandatory in LogDetailsRow.tsx
* Remove optional chaining
* fix: failing test by mocking reportInteraction
* Delete en-US.json before extracting strings so it's always up to date
* Add 'comment' to message jsons
* Enable Pseudo-locale option only in dev mode
* don't load english messages
* fix package.json
* fix
* LDAP: Add skip_org_role_sync option
* Document the new config option
* Nit on docs
* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Docs suggestions
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Add test, Fix disabled user when no role
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Attach static generic data link to data frames in Explore
* WIP
* Always load correlations config when the query is run
This will be moved to Wrapper.tsx and called only once Explore is mounted
* remove comment
* Load the config when Explore is loaded
* Clean up
* Check for feature toggle, simplify cod
* Simplify the code
* Remove unused code
* Fix types
* Add a test for attaching links
* Revert package.json changes
* Display title provided in the correlation label
* Add missing mocks
* Fix tests
* Merge branch 'main' into ifrost/integration/attach-generic-data-link
# Conflicts:
# public/app/features/explore/Wrapper.tsx
# public/app/features/explore/state/main.ts
* Remove redundant async calls
* Do not block Wrapper before correlations are loaded (only delay the query)
* Test showing results after correlations are loaded
* Post-merge fix
* Use more consistent naming
* Avoid null assertions
Co-authored-by: Elfo404 <me@giordanoricci.com>
* add topbar layout and wrapper
* mobile support for topnav icons
* improved hooks implementation
* added tests for TopSearchBarSection
* support css overrides for select and valuepicker
* make singlevalue inherit the color from select
* integrate Explore actions into topnav toolbar
* add keys
* fix unit test
* fix bug with ToolbarButtonRow overflow
* make the render function a bit more readable
* fix overflow not updating when children change
* WIP: Testing the NestedQuery component
* Add tests for NestedQuery.jsx
* Add aria-labels to select elements
* Update aria-labels
* Create datasource using createLokiDatasource()
We have received a lot of feedback regarding the ValueString in alert notifications. Perhaps one of the most frequent complaints about ValueString is that it is difficult to read because it contains a lot of information, and the information is shown as a JSON-like string. Users have often asked how it can be templated and the answer is that it can't.
Until now users have been able to add custom annotations to their alert rules which contains values via the $values variable added in previous versions of Grafana. However, these custom annotations must be added for each of the user's alert rule, instead of once in a template that all of their alerts can be notified via.
This commit adds then the much requested feature to support values in notification templates. Users can then create a single template that prints the annotations, labels and values of their alerts in a format of their choice!
* Fix: use type=button in editor
* Grafana-UI: TextArea: make ctextare a block element
* WIP: add field & target query to correlations
* add table query helpers & test ordering
* refactor some tests for disappearance
* chore: move QueryEditorField & add tests
* cleanup & fix typo
* revert textarea changes
* update form to support new config
* move defaults
* added org dropdown to topnav
* render icon and dropdown for mobile screen
* remove switch org from profile node
* adjust styles to be mobile first
* add test for select
* hide profile node only when topnav is on
* replace margin with gap instead
* improve tests
* add aria labels
* fix broken test
* Show '-' in notifiers table when lastNotifyAttemptDuration is 0s
* Add tests for no attempt (lastNotifyAttempt null date) and no last duration (lastNotifyAttemptDuration 0s)
* Flamegraph
* Updated flame graph width/height values
* Fix top table rendering issue
* Add feature toggle for flamegraph in explore
* Update tests
* Hide flamegraph from dash panel viz list if feature toggle not enabled
* Show table if no flameGraphFrames
* Add flame graph to testdata ds
* Minor improvement
* Switch from lingui from i18next
* Change lingui messages to i18next messages
* Change lingui messages to i18next messages (grafana-ui)
* Init i18n for tests
* loki: switch to a monaco-based query field, step 1 (#46291)
* loki: use monaco-logql (#46318)
* loki: use monaco-logql
* updated monaco-logql
* fix all the tests (#46327)
* loki: recommend parser (#46362)
* loki: recommend parser
* additional improvements
* more improvements
* type and lint fixes
* more improvements
* trigger autocomplete on focus
* rename
* loki: more smart features (#46414)
* loki: more smart features
* loki: updated syntax-highlight version
* better explanation (#46443)
* better explanation
* improved help-text
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Fix label
* feat(loki-monaco-editor): add monaco-logql as a dependency
* feat(loki-monaco-editor): add back range function removed during merge
* feat(loki-monaco-editor): sync imports with recent changes
* feat(loki-monaco-editor): add missing lang provider functions
* feat(loki-monaco-editor): fix imports
* feat(loki-monaco-editor): display monaco editor by default
Temporarily
* Chore: remove commented code
* Chore: minor refactor to NeverCaseError
* Chore: minor code cleanups
* feat(loki-monaco-editor): add history implementation
Will see how it behaves and base the history slicing on tangible feedback
* feat(loki-monaco-editor): turn completion data provider into a class
* Chore: fix missing imports
* feat(loki-monaco-editor): refactor data provider methods
Move complexity scattered everywhere to the provider
* Chore: clean up redundant code
* Chore: minor comments cleanup
* Chore: simplify override services
* Chore: rename callback
* feat(loki-monaco-editor): use query hints implementation to parse expression
* feat(loki-monaco-editor): improve function name
* Chore: remove superfluous variable in favor of destructuring
* Chore: remove unused imports
* Chore: make method async
* feat(loki-monaco-editor): fix deprecations and errors in situation
* feat(loki-monaco-editor): comment failing test case
* Chore: remove comment from test
* Chore: remove duplicated completion item
* Chore: fix linting issues
* Chore: update language provider test
* Chore: update datasource test
* feat(loki-monaco-editor): create feature flag
* feat(loki-monaco-editor): place the editor under a feature flag
* Chore: add completion unit test
* Chore: add completion data provider test
* Chore: remove unwanted export
* Chore: remove unused export
* Chore(loki-query-field): destructure all props
* chore(loki-completions): remove odd string
* fix(loki-completions): remove rate_interval
Not supported
* fix(loki-completions): remove line filters for after pipe case
We shouldn't offer line filters if we are after first pipe.
* refactor(loki-datasource): update default parameter
* fix(loki-syntax): remove outdated documentation
* Update capitalization in pkg/services/featuremgmt/registry.go
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* refactor(situation): use node types instead of names
* Chore: comment line filters pending implementation
It's breaking the build due to a linting error.
* Chore: update feature flag test after capitalization change
* Revert "fix(loki-completions): remove line filters for after pipe case"
This reverts commit 3d003ca4bc.
* Revert "Chore: comment line filters pending implementation"
This reverts commit 84bfe76a6a.
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
* prevent annotation query from filtering values less then 1
* unit tests were asserting that gaps in data (0 value) are removed from annotation, update filter to exclude 0
* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)
* Add interfaces for contact point errors
* [WIP] Create fake response for the new service to get contact point errors
* [WIP] Create action an reducer for the new service to get contact point errors
* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes
* [WIP] Use store to get error count
* Show number of integrations errors at the contact points main view
* Add warning icon and refactor styles using getStyles
* Change lastNotify type to string instead of DateTime
* Use Stack component from experimental library when it is possible
* Alerting: Add receivers error feedback in contact point list (#52524)
* Refactor types for contact points state
* Add health column in ReceiversTable in case error state is available for this AM
* Create method for converting contact points state DTO to the FE type used in Redux store
* Update types
* Fix indexOf criteria getting integration type
* Change type name to integrationType name
* Change new components to be named functions to follow the FE style-guide
* Fix typos
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Decouple ReceiversTable from Redux state
* Create private useContactPointsState hook to simplify code in ReceiversTable component
* Add tests for getIntegrationType and refactor the method to validate the name
* Add tests for contactPointsStateDtoToModel method
* Remove unnecessary check
* Use Badge compoment for health status in contact point list
* Create new method parseIntegrationName to simplify getting types and index from integration name
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Alerting: Show integrations error feedback when expanding contact point in list (#52920)
* Use DynamicTable for rendering list of contact points and make them expandable if error status is available
* Render expanded content for contact points integrations
* Style and format last notify column
* Add send resolve column to the integration details
* Fix receiver id for DynamicTable row
* Update clock icon in integration state
* Fix tests
* Add PR review sugestions
* Alerting/integrations error feedback handle null dates in response 3 (#55659)
* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes
* Update LastNotify in ReceiversTable component to handle null date
* Alerting/integrations error feedback handle 404 state not available (#55803)
* Create fetchContactPointsState using the future contact point url and handle 404 error
* Add contact points state tests
* Alerting/update receivers dto naming 2 (#56201)
* Update NotifierStatus naming and fix sendResolved not being updated in UI
* Return always empty ContactPointsState array when catching an error in the request response
* Fix test
* Show notification status only in notifications main view
* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response
* Add PR review suggestions
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* add new uid endpoing for star
* add store pool into service
* fix the endpoint caller
* udpate swagger file
* Update pkg/api/stars.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* remove useless code for star dashboard
* add new uid endpoing for star
* add store pool into service
* fix the endpoint caller
* Update pkg/api/stars.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update pkg/api/stars.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* solve linter
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* fix log row being falsely added to context
* do not add to many lines
* fix scroll position in context
* more flexible id comparison
* add original refid to context query
* added missing row comparison
* updated comment
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* feat(sass): introduce font-file-path var to define where to load fonts from
* feat(storybook): introduce storybook sass theme styles to set font file paths
* chore(sass): change imports so treated as sass rather than css
* feat(storybook): filter assets so builds dont contain thousands of files
* playlist: Split PlaylistItem into standalone TS type
* update playlist model
* actually set the title
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* chore(grafana-ui): don't bundle emotionPerfTest
* chore(grafana-ui): fix circular dependencies that cause esm chunks to not match up
* chore(grafana-ui): prevent bundling all css properties in package types
* Revert "Explore: Prevent panes from disappearing when resizing window in split view (#55696)"
This reverts commit 0a5aa19ca2.
* Revert "Explore: Add resize to split view, with Min/Max button (#54420)"
This reverts commit c3e4f1f876.
* add navid and pagenav to edit/add/view alert rules
* move ruleeditor smaller component to its own file
* fix form alignments with new layout
* fixed broken test
* reuse AlertingPageWrapper
* Ensure resourceURI template vars are migrated
- Do not filter queries containing a resource URI template
- Update migration
- Add test
* Update condition
* Review
* feat: make it possible to pass in `options` to `.get()`, `.post()`, etc methods
* feat(Datasource): make it possible to specify `optinos` for `getResource()` and `postResource()`
* fix(BackendSrv): use partial `BackendSrvRequest`
* feat(Datasource): make it possible to set `options` for resource requests
* refactor(BackendSrv): remove internal usage of `.request()`
* fix(GettingStarted): remove unnecessary import
* fix: fix type issues by typing the delete dashboard response
* refactor: use more strict types for `params`
By reusing the type of `BackendSrvRequest.params`
* refactor: make the options paramater partial
* fix: extract `data` from the fetch response
* docs: update the deprecation notice or `BackendSrv.request()`
* refactor: use `.request()` as if it was private
* refactor: remove unnecessary change
* initial collapsible section nav implementation
* fix unit tests
* automatically collapse sectionnav when below lg size
* fix unit tests
* only register 1 event listener each time
* fix display name for SectionNavToggle
* add query editor to module
* add metric section, add tests, update query type
* remove use of any for betterer
* fix test
* add tooltip for alias
* run runQuery on select change, fix metric select loading
* add downsample row, differentiate for tsdb version
* add tests for mteric section and downsample section
* add filter section react component and tests
* add tag section and tests
* add rate section and tests
* remove angular code
* fix styling
* remove comments
* remove unused code
* show breadcrumbs correctly when on the home page
* adjust breadcrumb unit tests
* update betterer
* fix backend tests
* update getSectionRoot to look at the home nav id
* remove redundant setting of home dashboard
* construct a home navmodelitem in the backend
* fix cases when the feature toggle is off
* fix unit test
* fix more unit tests
* refactor how buildBreadcrumbs works
* use HOME_NAV_ID
* move homeNav useSelector into NavToolbar
* remove unnecesary cloneDeep
* don't need locationUtil here
* restore using getUrlForPartial in DashboardPage
* special case for the editview query param
* remove commented out code
* add comment to clarify splice behaviour
* slightly cleaner syntax
* Add messages for new trackings
* Track clicking on alert state filters
* Track creating alert rule from panel
* Track creating alert rule from scratch
* Track on success and when cancelling a rule creation
* Alerting: Allow created by to be manually set when there's no creator
Grafana has a mode that allows unauthenticated interaction, typically the created by field of a silence is inferred from the current logged user. When this is not present, the field is left black and thus the silence creation fails.
This allows us to set the created by when we is not possible to infer it from the current user.
* Show created by input field only if user is not logged
* Add test for new logic with createdBy input field
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* added news feed component
* move button to news component
* create newsfeed hooks and conver NewsPanel to functional component
* added news_feed_enabled and news_feed_url to server settings ini
* add default value in defaults.ini
* set news drawer settings value to true by default
* remove server settings config
* use useToggle hook
* fix newsitem render
* support drawer on mobile screen
* use media query utility
* added center implementation
* fixed passing `scrollElement` to wrong component
* rather destructure than direct ref
* removed unnecessary `undefined`
When a contact point configuration field has `showWhen` set on it, the contact point form was not correctly displaying. This change fixes that so that forms display correctly.
The original check has been added ~3 years ago and since then a new
variable has been added that says whether the mode is browser or
proxied.
Start using the new variable in this function so that proxy mode could
be properly detected. It's important to us to get these headers and this
check is currently broken for HTTP/HTTPS URLs.
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
* NewIA: Plugin nav config
* progress
* Progress
* Things are working
* Add monitoring node
* Add alerts and incidents
* added experiment with standalone page
* Refactoring by adding a type for navtree root
* First test working
* More tests
* more tests
* Progress on richer config and sorting
* Sort weight working
* Path config
* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing
* fixed index routes
* removed file
* Fixes
* Fixing tests
* Fixing more tests and adding support for weight config
* Updates
* Remove unused fake
* More fixes
* Minor tweak
* Minor fix
* Can now control position using sortweight even when existing items have no sortweight
* Added tests for frontend standalone page logic
* more tests
* Remove unused fake and fixed lint issue
* Moving reading settings to navtree impl package
* remove nav_id setting prefix
* Remove old test file
* Fix trailing newline
* Fixed bug with adding nil node
* fixing lint issue
* remove some code we have to rethink
* move read settings to PrivideService and switch to util.SplitString
* Skip intercepting links of different orgs
* Check if orgId is present on query params
* Use locationSearchToObject instead of parseKeyValue
* Revert locationSearchToObject to parseKeyValue