* 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>
* Copy over most of coremodel from intent-api branch
* Fix import paths
* Fix incorrect provider name
* Add root compgen file, fixup componentroot.yaml
* go mod tidy
* Remove compgen for now
* Add dashboard coremodel
* Remove datasource coremodel, for now
* Tweak comments on dashboard struct model
* devenv: add dashboard testing directly
* Fixup dashboard schema for openness, heatmap
* Update Thema to tip
* Fix wire/registry references
* Fix hclog version
* user essentials mob! 🔱
* user essentials mob! 🔱
* WIP: Mob session work 🚧🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* mob next [ci-skip] [ci skip] [skip ci]
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* 🚧: Mob session work 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
* Move repeats suite under dashboard suite
* remove these generated files
* move repeats-suite into dashboards-suite
* Reexport dashboard jsons from play and update them
* 🚧: Mob session work 🔱
* 🚧: Mob session work 🔱
* Rename dashboards to work with stripnulls
* Run stripnulls
* Add repeat to row schema
* Clean up the rest of the repeating dashboards
* Fix tooltip sorting
* Update older dashboards
* Update golden files so tests pass
* format this to ensure consistent tabs/spaces
* undo whitespace changes
* Update scripts/stripnulls.sh
Co-authored-by: sam boyer <sam.boyer@grafana.com>
* update schema versions and test
Co-authored-by: thisisobate <obasiuche62@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: sam boyer <sam.boyer@grafana.com>
* TimeSeries panel: Add support for sorting series in the tooltip
* Fix cue tests
* Make sortValues work with string values
* Sort values in DatHoverView and remove sort index from TooltipPlugin
* Rename sortOrder prop to sort
* DataHoverView - use raw values for sorting
* Fixed VAr unit casing
* Fixed VAr unit casing
* Fixed VAr unit casing
* Fixed categories.ts file extension
* Fixed VA and kVA capitalization
* Fixed VA, kVA and kVAr capitalization.
* Solving two of the code scanning fails
Removes new lines from user input that is logged. Fixes CWE-117 from CodeQL
* remove newlines from request headers
* mask cookie value in header
* comment out logging of headers to solve CWE-117
Instructions added on uncommenting the log statement and on rebuilding the docker container
* use fixed_interval in date_histogram
* Add 8.0 to available versions in datasource settings
* Remove moving_avg from available metric aggregations
* Add ES8 devenv
* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/MetricAggregationsEditor/utils.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add FE tests
* Add BE test
* fix FE test
* fix BE test
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add a dashboard with all panels
* Remove nulls from exported JSON
* Remove link, add orientation
* Open base panel structure for unknown panel types
* Fix all panels dashboard
* Update
Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Update to golang 1.17
* Further updates
* Run go mod tidy on go 1.17
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Use build-container:1.4.2
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Skipping TestDevenvDashboardValidity test for now to resolve broken
test-backend step in main/branches. Did also run scripts/stripnulls.sh
hence the devenv dashboard changes.
* Strip nulls (again)
* Add stripnulls script
* Add transformations field
* Close FieldConfig struct; proper plugin validating
* s/graph/viz/ field in histogram dashboard
* Use ui.GraphFieldConfig in histogram model
* Add models for stat, gauge, barguage panel plugins
Also toss necessary shared types into cue/ui/gen.cue, with TODOs to move
them appropriately later.
* Add required license headers
* Heap of updates to cue UI components
* Fix barchart types and one old devenv input
* Use the GraphFieldConfig directly for timeseries
* Add models.cue for a few panel plugins
Barchart, state-timeline, and status-history
* Enable the test validating all devenv dashboards!!
* Fix effects of not checking after making comments
* Update packages/grafana-ui/src/options/models.gen.ts
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Realign and unalign cue with ts types
* Update devenv test to sniff for null errors
Best option we have right now for helping people to know they need to
strip nulls from devenv dashboards.
* Add speculative default for barchart stacking
* Fixup some dated devenv dashboards
timeline-modes needed to be regenerated with the appropriate tooltip
values included, per typing requirements, and timeline-demo needed to
have the `mode` field removed, as it is not intended to be persisted.
* Add necessary missing options for various panels
* Regenerate devenv dashboards
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* GraphNG: account for top canvas padding in gradient gen for color scheme/thresholds-by-value
* Updated test dashboard
* Added fix for issue when scaleMin was same as threshold
* fixed firefox issue
* revert docs changes
* update gdev dash for easier comparisons & regression spotting
* refactor
* optimize gradient re-gen/re-use and color more tinycolor.setAlpha() -> alpha(). update uPlot to dev build.
* fix percentage steps
* implement % threshold region rendering
* crisp threshold line rendering
* simplify
* WIP: hoverpoint dynamic color interpolation
* fix hover point color interp
* re-use gradient gen to draw threshold areas
* re-implement by-value color scales
* tweak comment
* mimic tinycolor behavior in colorManipulator.alpha() for empty colors
* explicitly disable hover points for BarChart and Histogram
* reduce test failures and required changes to tests
* fix barchart tests
* uPlot 1.6.15
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* complete the data model of graph panel
* fix histogram graph
* fix timeseries panel type
* Update cue/ui/gen.cue
Co-authored-by: sam boyer <sam.boyer@grafana.com>
* fix graph/viz and gradientMode enum
* add the changes into cue component and remove fields for graph panel
Co-authored-by: sam boyer <sam.boyer@grafana.com>
* initial steps for config from data
* Moving to core and separate transforms
* Progress
* Rows to fields are starting to work
* Config from query transform working
* UI progress
* More scenarios working
* Update public/app/core/components/TransformersUI/rowsToFields/rowsToFields.ts
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* transform all
* Refactor
* UI starting to work
* Add matcher UI to transform
* Apply to self
* Adding a reducer option
* Value mapping via new all values reducer
* value mappings workg add -A
* Minor changes
* Improving UI and adding test dashboards
* RowsToFieldsTransformerEditor tests
* Added tests for FieldToConfigMapping Editor
* Added test for ConfigFromQueryTransformerEditor
* Minor UI tweaks
* Added missing test
* Added label extraction
* unified mapping
* Progress refactoring
* Updates
* UI tweaks
* Rename
* Updates
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* TimeSeries: Adds support for color scheme series and line colors
* Updates
* fixed device issue
* Evaluate series color in legend
* two fixes
* It works with points
* Added test dashboard
* Minor fix
* Reset color mode to palette when switching to panel that supports by series mode
* Add support for relative thresholds
* Updated snapshots
* Refactor OpenTSDB using backend SDK
* Adjust tests to the SDK refactor
* Remove openTSDB from service
* Rename OpenTASDB service to Service, use AuthPassword from DecryptedSecureJson
* Devenv: Add opentsdb v2.3 data source and dashboard
* Letting http client provider to set basic auth,
renaming,
casting datasource direclty to pointer
* Update pkg/tsdb/opentsdb/opentsdb.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update pkg/tsdb/opentsdb/opentsdb.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Format struct
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Elasticsearch: add first version of rate aggregation
* Add test for rate aggreation settings editor
* Fix unit
* Add default value for mode for rate agg
* Add todo
* Revert "Add default value for mode for rate agg"
This reverts commit a44c985d8b.
* Fix width when select is empty
* Add rate aggregation to elasticsearch models
* Remove rate aggregation from extended stats
* Move elastic2 docker block & add elastic (latest)
* Add versionRange to rate aggregation
* add 7.10 elasticsearch version option
* Set supportsInlineScript to true for rate aggregation
* Remove fixed width from select
* Change seconds label for rate aggregation unit options dropdown
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Elfo404 <me@giordanoricci.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Uses new httpclient package from grafana-plugin-sdk-go introduced
via grafana/grafana-plugin-sdk-go#328.
Replaces the GetHTTPClient, GetTransport, GetTLSConfig methods defined
on DataSource model.
Longer-term the goal is to migrate core HTTP backend data sources to use the
SDK contracts and using httpclient.Provider for creating HTTP clients and such.
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Bar chart label positioning and sizing
* Dev dashbard
* Improve autosizing
* Remove sync option
* Unify text sizing options between stat-ish visualizations and bar chart
* Add simple categorical data scenario and update dev dashboard
* Remove unused options builder
* Add docs annotations
* Fix go lint
* remove text alignment, per-box hover for grid, fix mergeValues
* unconditionally set spanNulls = -1
* fix stroke width offset math
* split multi-hover, so only single mark overlays in grid mode
* restore alignValue in state-timeline
* better descriptions, maybe
* init field.config.custom if necessary
* don't show last out-of-view value
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Devenv: add block for es 5.0, provisioned datasource & dashboard
* Trasnsform script property based on running ES version
* Handle different scripts format in BE
* Unify tooltip options across visualizations
* Update tests
* use addTooltipOptions in piechart
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* Initial work
* WIP add cursor in debug panel
* shared cursor.sync filter
* explicit uplot events
* explicit uplot events
* uplot events
* uplot events
* depend on master uplot
* sync sync sync
* Fix merge
* Get rid of PlotSyncContext and sync tooltip positions
* make sync optional
* Improve shared tooltip positioning
* Plugins: add level and signature badges to plugin details page (#33553)
* feat(grafana-ui): badge can accept react node for text, add shield-exclamation to icons
* feat(plugins): add PluginSignatureType type
* feat(pluginpage): introduce PluginSignatureDetailsBadge. Fix sidebar icon margin
* feat(pluginlistpage): update filterinput placeholder, introduce filter by plugin type
* Variables: Removes the never refresh option (#33533)
* Variables: Removes the never refresh option
* Tests: fixes DashboardModel repeat tests
* Tests: fixs snapshots
* Tests: fixes processVariable test
* Tests: fixes DashboardModel tests
* PageLayout: Fixes max-width breakpoint so that it triggers only when there is room for margin+ (#33558)
* Alerting: Remove datasource (name) from migration (#33544)
no longer needed as of https://github.com/grafana/grafana/pull/33416
for https://github.com/grafana/alerting-squad/issues/126
* Library panels: Adds description to library panels tab (#33428)
* CodeOwners: Set owners of unified alerting migration (#33571)
* ButtonSelect: updates component with the new theme model (#33565)
* EmptySearchResult: updates component with the new theme model (#33573)
* DashboardSettings: Slight design tweak to fix page toolbar padding and align design (#33575)
* DashboardSettings: Slight design tweak to fix page toolbar padding and align design
* Fixed font weight
* Removed comment
* Update
* gitignore: Ignore files for accesscontrol provisioning (#33577)
* Alerting/metrics (#33547)
* moves alerting metrics to their own pkg
* adds grafana_alerting_alerts (by state) metric
* alerts_received_{total,invalid}
* embed alertmanager alerting struct in ng metrics & remove duplicated notification metrics (already embed alertmanager notifier metrics)
* use silence metrics from alertmanager lib
* fix - manager has metrics
* updates ngalert tests
* comment lint
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
* cleaner prom registry code
* removes ngalert global metrics
* new registry use in all tests
* ngalert metrics impl service, hack testinfra code to prevent duplicate metric registrations
* nilmetrics unexported
* Add note to Snapshot API doc to specify that user has to provide the entire dashboard model (#33572)
* Added note as suggested by Macus E.
* Update docs/sources/http_api/snapshot.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
* Alerting: backend "ng" code cleanup (#33578)
* AlertMigration: remove alert_rule UID db check (#33568)
do not believe this is needed due to uniqueness promised by shortid lib
since there is no provisioning yet. https://github.com/teris-io/shortid
* Live: persisting last message in cache for broadcast scope (#32938)
* Alerting: Load annotations from rule into State cache (#33542)
for https://github.com/grafana/alerting-squad/issues/127
* add template for dashboard url parameters (#33549)
* Update dashboard-links.md
parameters with plain text like `var-something=value` can make confusion.
template it to clarify .
* describe way for template link.
* AlertingMigration: Create alert_rule_version entry (#33585)
Create the alert rule version entry during the migration so it is consistent with rules created via api.
for https://github.com/grafana/alerting-squad/issues/123
* Build: Fix with cleanup call maybe? (#33590)
* add selector for code editor (#33554)
* broadcast over eventBus
* broadcasting to eventbus (but not useing it yet)
* merge master
* moved to context
* fix yarn.lock
* update snapshot
* Fix direct state mutation
* Persist location state on partial updates
* GraphNG- use getStream rather than subscribe
* Sync LegacyGraphHoverEvent with GraphNG
* Chenge plotRef signature
* use subscription
* subscription
* one fewer file
* Update types
* Remove unnecessary filtering
* Disable cursor sync when in edit mode
* GraphNG - bring back logging
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
Co-authored-by: gamab <gamab@users.noreply.github.com>
Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
Co-authored-by: Nagle Zhang <nagle.zhang@sap.com>
Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
* TimeSeries: First take on uplot thresholds rendering
* Updating theme for color picker and fixing issues
* Updating theme for color picker and fixing issues
* Minor progress
* Added test dashboard
* Adding transparent and text colors to color picker and making them visible
* Good progress on migrations
* Fixed selected issue in color picker
* Fixes
* migration fix
* Fixed test
* Fixing line rendering and refactoring
* Minor ordering fix
* fixed test
* Draw thresholds before axes & series and other tweaks
* Update packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* First iteration
* Dev dash
* Re-use StackingMode type
* Fix ts and api issues
* Stacking work resurected
* Fix overrides
* Correct values in tooltip and updated test dashboard
* Update dev dashboard
* Apply correct bands for stacking
* Merge fix
* Update snapshot
* Revert go.sum
* Handle null values correctyl and make filleBelowTo and stacking mutual exclusive
* Snapshots update
* Graph->Time series stacking migration
* Review comments
* Indicate overrides in StandardEditorContext
* Change stacking UI editor, migrate stacking to object option
* Small refactor, fix for hiding series and dev dashboard
* Remove singlestat panel from the codebase
* Automatically migrate deprecated panels
* Migrate singlestat to stat when initializing panel
* Singlestat -> gauge detection
* Missing await
* Throw error when panel plugin not found and allow new panels to take names of the deprecated ones
* Make it pretty
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus
* FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus
* Fix naming
* change to histogram
* Fixed go lint
Fix encoded characters in URL path should be proxied as encoded in the data proxy.
Fixes#26870Fixes#31438
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Bring back clickable Stat, Gauge and BarGauge panels
* Demo dashboard
* Add DataLinksContextMenu tests
* Only use new UI for data links, revert panel links logic
* Add percent of total to piechart legend
* Remove defaults
* Add label selector
* Fix multiselect option ui
* Add percent of total to piechart legend
* Add label selector
* add multiselect options ui
* change how pie chart labels are displayed
* Fixed right aligned values in legend
* added titles to display values so they show in table mode
* Move legend display value options to below other options
* Add addMultiSelect method to ui builder
* Use addMultiSelect on builder
* Use multiselect for the legend columns and update the panel test dashboard
* Remove explicit typing on addMultiselect and remove non existing properties from piechart story
* Add release tag
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
* Remove very old-versioned loki blocks
* Update prometheus block from 2.7.2 to latest
* Remove data sources in Grafana
* Fix e2e test not to intercept the whole url
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Add basic legend to the PieChart
* Remove console log
* Remove PieChartWithLegend and refactor PieChart a bit
* Use FALLBACK_COLOR
* Refactor PieChart
* Change back to [function]
* Add dev env block for influx2
* Add http settings to influx config
* Update devenv/docker/blocks/influxdb2/docker-compose.yaml
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>