* WIP
* Add barchart panel with scenes
* Fix timerange in barchart panel
* Refactor: component names
* Remove not used css styles and rename panel title
* Remove unnecessary HistoryEventsListObject class and update text in labels filter
* add padding top for filter
* Add translations
* update limit labels constant
* Update showing state reason
* Fix scene object
* Address review comments
* Update icons
* use endpoints instead of the autogenerated hook
* Address review comments
* Add tooltip for alert name
* use private polling interval
* fix autogenerated translations
* Address pr rewview comments
* Address review comments
* Update text in placeholder
* Rename variable and remove spaces in Trans children
* rename some stuff
* more renaming
* clean up api
* rename more functions
* rename cms -> gms
* update comment
* update swagger gen
* update endpoints
* overzealous
* final touches
* dont modify existing migrations
* break structs into domain and dtos
* add some conversion funcs
* fix build
* update frontend
* try to make swagger happy
* migrate section-heading
* move fonts to global styles
* migrate code styles to emotion globals
* migrate spacings styles and leave some in angular
* padding should be 2 here not 1
* Scenes: Add support for viewing variable dependency graph in settings
* Fix failing e2e test
* Add test for createDependencyNodes/Edges
* Refactor for better separation between old architecture and scenes
* Add internationalization
* run maker
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* wip: working version
* add delete buttons, put pinned logs on top,
* Use already available onPinLine prop
* cleanup
* Fix alignment of pinned log
* Limit to 3 pinned log lines
* Format tooltip message
* Lower to font size and adjust padding so pinned log title is fully visible
* Add internationalization support in Explore Logs
* Update json for i18n
* Test remove button
* Open content outline after pinning a log
* Remove console.log statements
* Minor changes
* Conflict stuff
* Allow undefined filter prop in adhoc variable when comparing two adhoc variables
* set mock implementation before each test
* mock console.warn in each test
* Calculate row height
* Move things around
* Update getItemSize to use text bounding box
* Update types
* Cleanups and reminders
* Calculate line height
* Update line height calculation
* Remove debugging
* Add cell option editing
* Prettier
* Use field configured for text wrapping
* Add TODO
* Make sure column configuration is correct
* Update height heuristic and hover behavior
* Disable overflow on hover with text wrapping
* Update heuristic
* Clean things up
* Color background cell options
* Fix tests
* Prettier
* React deps
* Remove old hook dep
* Fix type errors
* Update label and description for editor
* Fix non-wrapped case
* Make sure color background works
* Prettier
* Address review comments
* fix prettier
* Add heuristic for field sizing
* Fix up logic
* Prettier
* Fix test
* Oh prettier 🙈
* Don't wrap text on non-string fields
* Add wrapping to color text cell
* Prettier
* Fix option not showing for auto cell type
* Move longest field guessing into function
* Clean things up
* Add tests
* Make sure text won't flake
* Prettier
* Remove spurious import
* Ignore any in this case
* Add alpha label
* Prettier
* Fix typecheck
* Fix crash when sampling when there are undefined records
* Update heuristic to take into account long strings
* Prettier
* Update scale factors
* Update field index selection
* Prettier
---------
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* feat: introduce exposable components and update the public APIs
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* tests: fix the tests for `usePluginComponent()`
I broke them when I wrapped the component with the PluginContextProvider which fetches the plugin metadata.
* fix: typo
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* do it
* set empty child version to parent version
* feat(plugins): use pluginId for loader cache keys
* feat(plugins): apply caching to all js and css files systemjs loads
* remove old code and add comment
* test(plugins): update systemjs hooks tests in line with better caching
* test(plugins): wip - comment out failing backend loader tests
* fix tests and improve comment
* Update public/app/features/plugins/loader/cache.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
---------
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* add version to time-interval models
* set time interval fingerprint as version
* update to check provided version
* delete to check if version is provided in query parameter 'version'
* update integration tests
* update specs
* Support record struct in provisioning API
* Update api spec
* Use record field
* Restrict API endpoints following toggle
* Fix swagger spec
* Add recording rule validation to store validator
* Update types
* Mark datasource as supporting traces
* Add logic to transform exemplar query to traces query
* Render appropriate editor
* Run trace query for exemplars
* Refactor out common functions
- Add function to retrieve first/default subscription
* Add route for trace exemplars
* Update logic to appropriately query exemplars
* Update traces query builder
* Update instance test
* Remove unneeded import
* Set traces pseudo data source
* Replace deprecated function calls
* Add helper for setting default traces query
* Don't show resource field for exemplars query
* When resetting operation ID for exemplars set query to default
- Update tests
* Update query header to appropriately set the service value
* Fix response frame creation and update tests
* Correctly select resource
* Convert subscriptionsApiVersion to const
* Add feature toggle
* revert Select changes as we can handle it outside of the base select component
* update scenes
* update scenes properly
* revert changes to azure-monitor e2e tests
* Kick start your query: keep pipe operations in the original query
* QueryPatternsModal: define keep operations from the operations list
* QueryPatternsModal: resolve deprecation
* QueryPatternsModal: use the correct import
* QueryPatternsModal: use category instead of order rank
* QueryPatternsModal: add unit test case
* Chore: change button cta
* Remove role requirement for editing silence (instead handled by silence editor displaying error)
* Send query params for metadata/access control silence logic
* Add new access control types to enum
* Add folder-specific checks for silences
* Remove filtering in alert manager picker
* fix flakey rule viewer test and update permissions helper
* Use `returnTo` in rule viewer page
* Fix incorrect display of duration
* Clean up some mock server behaviour in rule details tests
* Tweak styles for silences alerts table
* Remove alertmanager picker from silences drawer
* Add error if user cannot edit a silence
* Show alert rule name in silences table and consume RBAC logic
* Update mocks to include RBAC access control logic
* Update silences tests
* Update silences type to include access control info
* Update comment for missing alertmanager
* Update mock handlers and query param logic
* Tweak query params again
* Update access control mock
* Revert AM picker fix as user may not have access to Grafana AM
* Swap ternary order
* Change text for no alert rule targeted
* Don't show error alert from RTKQ query and remove alert instance preview in case of error
* Add missing translations
* Fix test adding missing mock for getting alert rule
* Add missing translations in SilencesTable
* Add translations autogenerated files
* fix allowing edit silence in external alert manager
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* feat: add search input and filters
* feat: add state management v0
* feat: update search view and add to trash page
* refactor: fix some errors
* feat: page population
* feat: fix error
* Run betterer checks locally
* Run i18n abstraction
* refactor: clean up after merging main
* refactor: clean up after merging main
* Run i18n abstraction
* refactor: remove browse view
* Grafana UI: stop input element of the react select component from overflowing the input container
* update snapshot since the css changed
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Show queryVariable editor even if the variable does not support variables
* Fix VariableQueryRunner unit test, now takes into account the new function
* Cloud migration: create route to fetch cloud migration token
* implement gcomStub.ListTokens
* fix swagger for POST /cloudmigration/migration
* fix swagger for POST /cloudmigration/migration
* fix swagger for POST /cloudmigration/migration
* AzureMonitor: get the list of azure clouds from the SDK instead of from a hard coded list
* add azure-sdk to yarn.lock
* merge legacy with custom options
* Normalize legacy cloud names
* Workaround: send new credential format to backend while we wait to migrate to the new format
* Lint fix
* resolveLegacyCloudName should not return undefined
* re-add undefined handling in resolveLegacyCloudName so that we fallback to getDefaultAzureCloud when not defined
---------
Co-authored-by: Jeremy Angel <jeremyangel@microsoft.com>
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Alex Petrov <alex.petrov.vt@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
Co-authored-by: Alex Petrov <apetrov@fastly.com>
* Scopes: Select scope even without data retrieval
* Pass entire scope and not only the spec to Prometheus
* Enrich ScopeSpec that is sent to Prometheus
* add name to BE
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>
fix: in Components, `model.useState()`, instead of `model.state`
Generally, it is better practice. More succinct.
It could also eliminate subtle state bugs.
* Add custom attention state to dashboard
* Add attention state to DashboardGrid
* Remove old functionality
* Add attention state to keybindingSrv
* Create PanelAttentionService
* Add PanelAttentionService with scenes support
* Remove unused code
* Use viz panel key instead of VizPanel
* Add type assertion
* Add e2e test
* Update comments
* Use panel id for non-scenes use case
* Support undefined service use case
* Memoize singleton call
* Debounce mouseover
* Set panelAttention with appEvents
* Use AppEvents for Scenes
* Remove panelAttentionSrv
* Wait in e2e to handle debounce
* Move subscription to KeybindingSrv
* Remove imports and reset keyboardShortcuts from main
* Fix on* event handlers
* Azure monitor: Basic Logs frontend (#85905)
* adds datasource level config for enabling basic logs
* add basiclogsquery type to query json
* add toggle between basic and analytics
* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected
* add check to remove UI if alerting
* tests for logsmanagement component
* tests for logs query editor
* tests for time mangement control
* remove unused imports
* clears query whenever toggle changes from basic <-> analytics
* add test to account for clearning query
* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx
wording
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* update dependency list
* clear basic logs if resources change
* fix tests
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Azure Monitor: Basic Logs modal acknowledgement (#86244)
* adds datasource level config for enabling basic logs
* add basiclogsquery type to query json
* add toggle between basic and analytics
* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected
* add check to remove UI if alerting
* tests for logsmanagement component
* tests for logs query editor
* tests for time mangement control
* remove unused imports
* add confirm modal
* clears query whenever toggle changes from basic <-> analytics
* add test to account for clearning query
* adds modal acknowledgement for basic logs query
* tests for handling modal logic
* basic logs ack type
* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx
wording
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* update dependency list
* clear basic logs if resources change
* remove modal from config page
* remove basic logs query ack type
* add modal acknowledgement to toggle between basic and analytics
* clear query if resources change
* fix tests
* fix tests
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsManagement.tsx
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* fix tests
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Azure Monitor: Basic Logs Backend (#87653)
* fix logic for showingBasicLogsToggle
* move to utils function and add basiclogsquery in apply template variable
* add backend safeguards for basiclogsqueries
* adds support for calling search or query apis based on whether it is basic logs or not
* add tests for utils
* initial test for basic logs query in the backend
* tests for basic logs
* remve comment
* simplify checks for basic logs
* adds fromAlert prop for azure monitor backend services
* adds fromAlert check fo basic logs
* fix working and empty tags
* add telemetry for basic logs
* remove import from grafana core package
* change fromAlert true in tests
* change the way tests catch errors
* Update pkg/tsdb/azuremonitor/loganalytics/utils.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update pkg/tsdb/azuremonitor/loganalytics/utils.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update pkg/tsdb/azuremonitor/loganalytics/utils.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* restructure code to only run basic logs checks if basiclogsflag is true
* data retention warning
* tests for calculate time range
* Simplify determining if request is from alerting
* Fix lint and bool check
* Fix tests
* clarify data retention
---------
Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
* Azure Monitor: Basic Logs data volume notification (#88009)
* frontend changes for data ingested warning
* initial logic for getResource
* payload processing
* create basicLogs usage function
* add utils for converting time and getting the data volume query for basic logs
* frontend updates for showing the data ingested for the given query
* frontend tests
* add check for when no dataIngested is returned
* remove backend.logger prints
* comment on what function does
* fix merge
* make resource URI regex case insensitive
* add support for workspace variables in basic logs flow
* add undefined check
* structure and add tests for variable support
* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* add tracing for basic logs usage request
* clean up data volume query struct
* use async/await instead of callback
* fix parameters for getApiURL
* restrict time on usage query to 8 days max
* add time to dependency array to refetch basic logs usage
* move time check implementation to backend
* fix utils tests
---------
Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
---------
Co-authored-by: jcolladokuri <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
* NodeGraph: Use values from fixedX/fixedY column for layout
* Cleanup some code, typings and naming
* Add test
---------
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
* LogRowMessage: strip new lines when wrapping is disabled
* LogRowMessage: prevent conflicts between failed json parsing and unwrapping
* LogRowMessage: expand multi-line unwrapped logs when opening details
* Add unit test
* Prettier
* chore: update comment
* POC preserve filters and group by when navigating between dashboards
* Save all variables and time range
* minor refactor
* Add feature toggle
* Update feature toggle usage
* Delete local storage item if nothing to preserve
* Structural changes
* Simplify restore params code
* Use session storage
* Add tests
* Merge fix
* Remove unused code
* And make it better, errrrrr
* Minor deduplication refactor
* last minor
* Prometheus: get the list of azure clouds from the SDK instead of from a hard coded list
* Update yarn.lock
* Fix lint
---------
Co-authored-by: Jeremy Angel (from Dev Box) <jeremyangel@microsoft.com>
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>