Backend:
* Update the Grafana Alerting engine to provide feedback to HysteresisCommand. The feedback information is stored in state.Manager as a fingerprint of each state. The fingerprint is persisted to the database. Only fingerprints that belong to Pending and Alerting states are considered as "loaded" and provided back to the command.
- add ResultFingerprint to state.State. It's different from other fingerprints we store in the state because it is calculated from the result labels.
- add rule_fingerprint column to alert_instance
- update alerting evaluator to accept AlertingResultsReader via context, and update scheduler to provide it.
- add AlertingResultsFromRuleState that implements the new interface in eval package
- update getExprRequest to patch the hysteresis command.
* Only one "Recovery Threshold" query is allowed to be used in the alert rule and it must be the Condition.
Frontend:
* Add hysteresis option to Threshold in UI. It's called "Recovery Threshold"
* Add test for getUnloadEvaluatorTypeFromCondition
* Hide hysteresis in panel expressions
* Refactor isInvalid and add test for it
* Remove unnecesary React.memo
* Add tests for updateEvaluatorConditions
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* use floating-ui instead of react-popper-tooltip in Tooltip
* remove useTheme2 usage
* remove escape handling logic in favour of useDismiss
* don't need this useEffect anymore
* convert Toggletip to use floating-ui
* use explicit version
* convert OperationInfoButton to use Toggletip
* convert nestedFolderPicker to use floating-ui
* convert Dropdown to use floating-ui and remove react-popper-tooltip
* fix Modal/Tooltip tests
* revert to old toggletip behaviour
* revert OperationInfoButton to not use Toggletip
* add mock for requestAnimationFrame
* remove requestAnimationFrame mock
* remove fakeTimers where they're not used
* use floating-ui in ButtonSelect
* Fix filters unit tests
* only attach description if label is different
* use 'fixed' strategy for Toggletip
* use stroke and strokeWidth
* set move: false to only show the tooltip if a hover event occurs
* update type for onClose
* Canvas: Add Zoom
* Scale selecto components based on zoom state
* Fix pan by reverting to 3.1.0 for zoom-pan
* Update to latest library that fixes pan regression
* Add mini map to canvas pan zoom
* Fix selecto and anchors on hover
* Update naming to be more clear
* Switch back to contentComponent
* Apply transformScale to drag and resize
* Update connection source and target scaling
* Add option to display mini map
* Update yarn lock
* Revert "Update yarn lock"
This reverts commit 3d1dd65d57.
* Set yarn lock to main
* Revert "Set yarn lock to main"
This reverts commit 64bc50557e.
* Update to Yarn 4
* Add react-zoom-pan-pinch
* Update react-zoom-pan checksum
* Revert changes to json files
* Remove last line of api merged
* Remove last lines of all impacted jsons
* Update home json
* Update coordinate calc function to include scale
* Fix types in coordinate calc function
* Fix util calculation for transform
* Fix arrow anchor shift behavior
* Fix scale offset when adding elements during zoom
* Fix drag of selected group during zoom
* Add feature flag for canvas pan zoom
* Revert "Add feature flag for canvas pan zoom"
This reverts commit b026e31d8d.
* Regenerate feature flag after merge
* Apply feature flag to enable pan zoom wrappers
* Add mini map toggle behind feature flag
* Simplify minimap behavior
* Update feature flag registry
* Set minimap to false by default
* fix gen-cue
* Set toggles gen to main
Add blank line to toggle gen csv
* Add canvas pan zoom to csv
* Remove old comment
* Change ref parameter to be more descriptive
* Rename visibleFun to be more descriptive
* Consolidate transformScale transformRef in util
* Remove non-null assertion on connection parentRect
* Consolidate parentRect null coalescing into object
* Remove minimap and change toggle
* Add controls inline help for pan and zoom
* Clean up mouse events
* Pull scale out of ref and isolate transform
* Remove transform ref from scene div
* Fix context menu visible behavior
* Fix connections and update util functions
* Move transform component instance to util
* fix backend test
* minor updates
* Clean up connections / fix minor bug where offset of arrow wasn't being calculated correctly
* missed connection code cleanup
* cleanup scene code a bit more
* actually fix backend test
* move eslint disable line closer to actual issue
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* wip
* WIP: Added some actions, timings and grouping
* WIP: remove reducer and use form fields instead
* Show defaults when using override in route settings
* Update alert rule model for simplified routing
* Use defaults in placeholders when overriding timings
* Add validation for contact point
* Add selected contact point details
* Refactor: extract components to separate files and reorg in subfolders
* Fix test
* Update revalidate mode in form
* Extract RuleEditorSectionBody outside NotificationStep component to avoid unmounting any time this one renders
* Remove reValidateMode option in form
* Fix after merging
* Address PR review comments part1
* Address PR review comments part2
* Create routeTimingsFields constant to reuse labels, descriptions and arial labels for the mute timing fields
* Move conditional rendering to the parent in AutomaticRooting and ManualAndAutomaticRouting
* Simplify AlertManagerManualRouting properties
* add alert with link to docs
* remove historical secondary text
* add tooltip to opening button to suggest selecting a metric
* fix merge conflict issue
* add llm check for tooltip with docs
* update starting message copy and alert copy
* Update public/app/plugins/datasource/prometheus/querybuilder/components/promQail/PromQail.tsx
Co-authored-by: Rob Whelan <github@jtheory.com>
* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilder.tsx
Co-authored-by: Rob Whelan <github@jtheory.com>
* add check for vector for button, remove check in helpers
* clean a little, fix tests
* refactor out query assistant button
* fix styles
---------
Co-authored-by: Rob Whelan <github@jtheory.com>
* 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
* (WIP) Alerting: Use the forked Alertmanager for remote secondary mode
* fall back to using internal AM in case of error
* remove TODOs, clean up .ini file, add orgId as part of remote AM config struct
* log warnings and errors, fall back to remoteSecondary, fall back to internal AM only
* extract logic to decide remote Alertmanager mode to a separate function, switch on mode
* tests
* make linter happy
* remove func to decide remote Alertmanager mode
* refactor factory function and options
* add default case to switch statement
* remove ineffectual assignment
* pass `getLogRowContextQuery` to component
* reset `appliedContextFilters` in `getLogRowContextQuery`
* open show context in new tab
* open window before crafting url
* only open in new tab if getRowContextQuery is set
* only open `about:blank`
* change conditional
* Add definition of external service registration
* Add style and tables for permissions needed
* Add external service registration to local without counterpart
* Add feature toggle check
* Add feature flag check in the backend as well
* Add the disclaimer for permissions
---------
Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
* Use levenshtein method to sort metric names
* Optionally hide empty panels in MetricSelectScene
* Transform ignore leven
* Refactor code to use $behaviours. Move preview cache to class variable instead of state
* Use lazy loading for metric scene
* Update scenes lib
* simplify behavior
* Remove hide empty toggle
* Bump scenes
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Scenes bump
* Refactor query group components so that they are reusable
* Basic queries rendering and datasource change
* Store last used ds in local storage
* maxDataPoints and minInterval queries options
* Progress on query options
* Query options tests
* Allow panel inspection / queries inspection from panel edit
* Add counters to data pane tabs
* Betterer update
* Handle data source changes
* Minor fixes
* Data source change tests
* Handle scenario of data source change when transformations are in place
* Review comment
* Fix test
* Stat: Add Percent Change Option
* Ensure div style only applied for percent change
* Add metrics section to gdev
* Apply new style and fix nan truthy
* Handle no text case properly
* Only display percent change with value
* Improve styling
* Remove VizOrientation dep and improve styling
* Display percent change for text mode name
* Add check for undefined percentChange
* Don't show percent change option for all values
* Make metric alignment more robust
* Make percent change column case tighter
Check undefined directly to avoid truthy issues
* Simplify percentChange calculation
* Add documentation for show percent change
* Add tests for percent change
* Refactor big value and pull out percent change
* minor changes
* initial approach at addressing setting % change colors to be conventional (not super happy with handling of contrast)
* Clean up initial color change approach (no need to handle 0 case as is handled as NaN currently
* Update shadow styling and include icon
* Update docs/sources/panels-visualizations/visualizations/stat/index.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Stat: Add Percent Change Option (refactor and color exploration) (#79504)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* some missed cleanup :D
* update percent change to show to not be tied to text value; update docs accordingly
* initial start for fixing scaling of % change for no text mode
* Fix styling for case where textmode is none
* Tweak styling a bit for icon and minimum padding
* Apply flex wrap to container styles
* Update gdev for stat panel tests
* attempt at fixing horizontal percent change styling / placement
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Drop from API response
* Drop from swagger docs
* Drop from integration tests
* regenerate public swagger docs
* Drop from frontend
* Drop asserts for namespaceID field
* Move moving average and cumulative sum to private preview
* update docs
* move formatString to private preview
* rebuild docs
* undo changes that don't belong to this commit
* undo cumulative/window featureflag
* fix case
* refactor out DataSourcesListCard
* add skeleton
* increase gap between buttons on skeleton to match real component
* lineHeight: 1 instead of 0
* refactor out ternary
* bidirectional shared crosshair table WIP
* add shared crosshair to table panel
* lower around point threshold
* add feature toggle
* add index based verification
* add adaptive threshold
* switch to debounceTime
* lower debounce to 100
* raise debounce back to 200
* revert azure dashboard
* re-render only rows list on data hover event
* further break down table component
* refactor
* raise debounce time
* fix build
* Add export for all muteTimings and a single muteTiming
* Add test
* Fix snapshot
* Fix test
* Add mute timing name in file name when exporting single mute timing
* Added missing alt text
* Rebuilt markdown file
q
wq
* baldm0mma/081223-missing-alt-text-2/ add alt image content to images and build markdown
* baldmomma/081223-missing-alt-text-2/update alt text and build
* baldm0mma/081223-missing-alt-text-2/ make altText required
---------
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
* WIP first pass
* Change to toolbarbutton/buttonselect pattern
* Move to two toolbarbuttons with dropdown
* Justify text to the right of icons
* Fix betterer
* Fix styling and tests
* Add to docs
* Perist last clicked, add translations
* move styling to core component
* use label for tooltip, let parser combine panes in multiple params
* Explore: Panes encoding suggestions (#78210)
panes encoding suggestions
* WIP-add menu groups
* Get group actions working
* add icons and non-local last selected state
* Fix translations after merge
* Add categories to translation, tweak the verbiage
* Fix translation extraction
* Fix tests
* fix translation conflict
* Log if time is absolute
---------
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* apply styles globally to skeleton
* use abstraction everywhere
* just use withSkeleton
* add comment
* update docs
* use it in News as well
* rename withSkeleton to attachSkeleton
* move to @grafana/ui/src/unstable
* rename skeletonProps to rootProps
* Fix heatmap null options migration
Some dashboard generation libraries, such as grafanalib, may produce
heatmaps with a null 'options' attribute. This condition triggers a
panic during migration, resulting in a blank heatmap panel.
This commit addresses the issue by returning default options if a panel has
a null 'options'.
Signed-off-by: Neil Shen <overvenus@gmail.com>
* Nullish coalescing panel.options
Signed-off-by: Neil Shen <overvenus@gmail.com>
---------
Signed-off-by: Neil Shen <overvenus@gmail.com>
* Update basicsettings for datasource
* Change aria-label for data-testid
* Update more tests
* Update betterer
* Remove unnecessary data-testid
* Put back aria label for some datasource selectors
* Try to use data-testid with alerts
* Update betterer
* initial start
* more progress
* behaviour working?
* only use media query when docked local storage state is true
* close menu when undocking
* remove unneeded animation code and fix focus when toggling between docked/undocked
* better feature toggle handling (can go back and forth)
* remove restoreFocus (for now)
* PromQail: update prompt and model
- Split up system and user prompt
- Use latest gpt-3.5-turbo-1106 model
- Add metric type to user prompt
- Simpler formatting for templates
* PromQail: fix fetching all available labels
Previously we were rendering the user selected templates. The prompt is expecting all available label keys for a given metric.
* use fetchSeriesLabels instead
* user prompt: fix trailing newline
* Send sanitized selectors to the Pyroscope backend for LabelNames and LabelValues
* Clean LabelNames response to remove already used labels
* Improve performance after major changes
* Fix import order
* Further improve rendering performance
* Fix frontend tests
* Fix fake pyroscope client signature
* Bump pyroscope/api dependency to include start/end in LabelNames/LabelValues
* Fix issue with old queries running when using the run button
* Add generated file
* Make code more readable, add a few comments
* Format with prettier
* Fix error when assigning data
* Revert "Add generated file"
This reverts commit c4f33727b8.
* Remove leftover code
* Simplify query editor internal state objects
* Move label selector validation up, improve label filtering
* Simplify query editor state, switch to debounce to reduce rerenders
* Revert cosmetic change
* fix: stop displaying error alerts when plugins cannot be loaded
* fix: only hide the error if it is a 403 error
* fix: revert unnecessary object spreading
fix: ability to (de)serialize parents and current index
- refactored so only history stores parent relations and current index
- rounded indirect parent links
* 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