* Docs: Docs for new transformations rows to fields and config from query results
* Added config from query docs
* refinement
* Same lists everywhere
* minor tweak
* Added beta and version notices
* adding transformer that will stretch a data frame from wide to long.
* added a UI for the stretch frames transformer.
* refactored according to feedback.
* removed unused dep.
* making sure it is being displayed.
* minor adjustments.
* move stretch to prepare
* improved readability of tests.
* refactored to use a function component syntax.
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Explore: quick fix for page title
* Explore: update page title in componentDidUpdate with info about the current datasources
* Explore: change tests to incorporate the new page title
* Explore: remove updatePageDocumentTitle since the recent changes replace it
* 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>
This would result in a `Dashboard init failed` error when migrating
dashboards with a folded panel that has a `fieldConfig` but has not
defined `fieldConfig.defaults`.
* Adding plugin state feature to transforms
* initial help box
* New HelpBox component
* More progress
* Testing
* Removing HelpBox, simple new design, new active state for OperationRowAction
* Updated tests
* Fixed typing issue
* Removed AlphaNotice
* Made focus and enter key trigger OnClick and sorted transformations
* Fixed e2e tests
* Tracing: add way to configure trace to logs start and end time
* Use the span's time by default
* Update docs
* Update time inputs to use strings instead of number
* Support negative values as well
* Add info about using negative value
* Don't round up Loki range
* Update docs/sources/datasources/jaeger.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Wording for doc
* Round adjusted start and end time
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* displaying enterprise plugins in the list.
* added place holder for tests and removed unused code.
* added test for the browse page.
* added empty test file.
* added some more tests.
* TablePanel: Adds minimum column width field
The table panel uses virtual rendering of rows, which prevents resizing
based on the contents of a column. A minimum column width field
simulates this ability.
* Fixed indentation issue
* Updates the table panel documentation
Added the "Minimum column width" option to table panel docs and updated
the information for the "Column width" option in the docs.
* Replace analytics service with Echo backend
* Add Rudderstack integration and general pageview and interaction Echo events
* Update conf/defaults.ini
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update packages/grafana-runtime/src/types/analytics.ts
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update conf/defaults.ini
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update tests
* Force cla check
Co-authored-by: Dan Cech <dcech@grafana.com>
* moved the plugins admin to core and used the plugins toggle to decide which version to use.
* reverted change.
* changed so the library tab is the default one.
* fixing navigation.
#
* fixed so we have the proper header.
* including the core plugins
* fixed so we display logos for local plugins.
* fixed so we have a working version of plugin catalog.
* removed console logs.
* reverted changes.
* fixing failed test.
* Improve error handling for error messages
The error message will be read from error object from the following properties in the following order:
- message
- data.message
- statusText
* Convert api/ds/query errors to TestingStatus
SQL datasources (mysql, mssql, postgres) and CloudWatch use api/ds/query to test the data source, but previously didn't handle errors returned by this endpoint. If the error cannot be handled it's re-thrown to be handled in public/app/features/datasources/state/actions.ts
* Use async/await instead of Promises
* Remove incorrect type import
TestingStatus is in app/types. Should be pulled down to grafana/data but it depends on HealthCheckResultDetails that is public and lives in grafana/runtime. Ideally TestingStatus should live in grafana/data but I'm not sure if HealthCheckResultDetails can be move there too (?)
* Update packages/grafana-data/src/types/datasource.ts
Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
* Handle errors with no details in toTestingStatus instead of re-throwing
* Update packages/grafana-data/src/types/datasource.ts
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* First stab on UI for adding annotations in time series panel
* Extend panel context with annotations api
* Annotations editor UI & CRUD
* Prevent annotation markers to overflow uPlot canvas
* Do not overflow graphing area with region annotations
* Align annotation id type
* Fix exemplar markers positioning
* Use clipping region rather than adjusting annotation region bounds
* Smaller icons
* Improve annotation tooltip and editor auto positioning, reorg code
* Renames
* Enable annotations ctx menu only when adding annotations is allowed
* Wrap setSelect hooks diring init hook
* Use TagFilter instead of TagsInput
* Add id to annotation events
* Add support for cmd+click for adding point annotations
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Add alertmanager notifications tab
* Link to silences page from am alert
* Include summary for alertmanager group
* Fix colors for am state
* Add horizontal dividing line
* PR feedback
* Add basic unit test for alert notificaitons
* Rename Notificaitons component file
* Polling interval to groups
* Add alertmanager notifications tab
* Link to silences page from am alert
* Include summary for alertmanager group
* PR feedback
* Add basic unit test for alert notificaitons
* Rename Notificaitons component file
* Alerting: make alertmanager notifications view responsive (#36067)
* refac DynamicTableWithGuidelines
* more responsiveness fixes
* Add more to tests
* Add loading and alert state for notifications
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* DashboardPage: Refactoring state handling to improve performance and fix bugs with state out of sync
* Fixed exit panel editor timing issues
* New tests in RTL
* Updated comment
* Removed unused imports
* 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
* Transformation: show message if not applied on single frame
* Use FieldValidationMessage component instead
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Annotations: create React component, naive attempt at hooking together
* Annotations: Use query object instead of passing annotation
* Annotations: Hook up the new api to get annotation tags
* Annotations: Use InlineFieldRow instead of gf-form-inline
* Annotations: Use InlineSwitch instead of gf-form-switch
* TagFilter: Add support for allowCustomValue
* Annotations: Update to match backend api
* Annotations: Add basic tests, expose inputId on `TagFilter`
* Annotations: Fix test name and reorder tests slightly
* Annotations: Use FieldSet instead of gf-form-group
* Refactor: fixes annotation queries
* Annotations: Everything working, just types to fix...
* Annotations: Fix types?
* Revert "Annotations: Fix types?"
This reverts commit 6df0cae0c9.
* Annotations: Fix types again?
* Annotations: Remove old angular code
* Annotations: Fix unit tests for AnnotationQueryEditor
* Annotations: Check if it's an annotation query immediately
* Annotations: Prevent TagFilter overflowing container when there are a large number of tags
* Change to new form styles
* Annotations: Add id's + fix unit tests
* Updated wording
* Annotations: Allow custom value to preserve being able to use template variables
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Dashboard: invert invalid date ranges from URL
* Dashboard: discard invalid date ranges from inputs
* Dashboard: move time range reset
* Dashboard: simplify undefined dashboard verification
* Dashboard: show form error on invalid date range
* Dashboard: rename function to isRangeInvalid
* Dashboard: refactor invalid check functions
* Dashboard: different error messages for date picker
* Dashboard: add date tests to TimeRangeForm
* Improve title and documentation for share shortened link in Explore
* Update docs/sources/explore/_index.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* add fixed role for datasource read operations
* Add action for datasource explore
* add authorize middleware to explore index route
* add fgac support for explore navlink
* update hasAccessToExplore to check if accesscontrol is enable and evalute action if it is
* add getExploreRoles to evalute roles based onaccesscontrol, viewersCanEdit and default
* create function to evaluate permissions or using fallback if accesscontrol is disabled
* change hasAccess to prop and derive the value in mapStateToProps
* add test case to ensure buttons is not rendered when user does not have access
* Only hide return with changes button
* remove internal links if user does not have access to explorer
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* added tests for changePassword and forgotPassword component
* added tests for ChangePassword screen in user profile section
* addressed review changes
* changed panels to TimeSeries
* Change panels to time series in Prometheus Stats dashboards
* Change Grafana metrics panels to time series
* Change name of datasource
* Add common labels to Logs panel
* Clean up and add tests
* Update documentation
* Update public/app/plugins/panel/logs/LogsPanel.tsx
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* Fix type error
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* add page and basic things
* quick annotations
* added so we can run queries on the view rule page.
* wip.
* merge
* cleaned up the combined rule hook.
* readd queries
* fixing so you can run queries.
* renamed variable.
* fix rerenders and visualizing
* minor fixes.
* work in progress.
* wip
* a working version that can be tested.
* changing check if we have data.
* removed unused styling.
* removed unused dep.
* removed another dep.
* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* refactored and changed UI according to figma.
* resseting menu item.
* removing unused external link.
* refactor according to feedback.
* changed so we always fetch the rule.
* fixing so datasource only is displayed once. Also changed so we only navigate to alert list when rule has been deleted.
* removed unused dep.
* Will display query as json if we can't find data source.
* changed to a function instead of the React.FC.
* refactoring of id generation and added support to generate ids for native prometheus alerts without ruler.
* set max width on page content
* added page where you can easily link to a rule in grafana.
* listing rules with same name.
* fixing error cases.
* updates after pr feedback
* more pr feedback
* use 1h-now as timerange
* remove unused import
* start on test
* add test for cloud case
* add ruleview render test
* add render tests for grafana and cloud alerts
* add mock for backendsrv
* add rendering test for the find route
* check if cards are rendered
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* added tests for SignupPage component
* added tests for VerifyEmailPage component
* addressed review changes
* removed id for button and followed consistent id naming pattern
* Elasticsearch: make interval select handle case-sensitive input
* Elasticsearch: Allow case sensitive custom options in date_histogram interval
* asd is not a good input id
* 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>
* Remove some props since they are already inferred from mapStateToProps
* Remove empty interface
* Refactor TableContainer component
* Did some small re-namings
* Dashboard: Allow more than 26 queries per panel.
Fixes#4978
* Chore: Remove underscores from helper function names
Co-authored-by: Danyal Fairburn <danyal.fairburn@bt.com>
* add back only re-render dashboard first time on layout change
* remove panel refs
* Updates
* Improved is in view logic
* Updates
* Remove unnessary auto sizer
* Found another approach that works with resize as well
* Updates
* fixing test
* Fixing ref issues
* Fixed mobile size handling, and view panel handling, removed now unnessary logic
* Updated snapshot
* Explore: props automatically inferred from mapStateToProps
* Remove props that that wasn't removed in last commit
* Remove unused imports
* Add correct properties to test function
* Remove final props from ExploreProps
* Explore: refactor ExploreQueryInspector.tsx to inferr props via mapStateToProps
* Explore: refactor ExploreToolbar.tsx to infere props from mapStateToProps
* feat(dashboard): introduce selector with fallback for unknown plugin
* refactor(dashboard): replace redux connect with redux hooks
* fix(dashboard): add a fallback for vizpicker when a panel plugin cannot be found
* feat(dashboard): add an icon for fallback plugins for vizpicker
* refactor(dashboard): prefer HOF selector
* migrate previous fieldConfig when changing panel type
* TimeSeries: ensure a color series override is migrated correctly
* TimeSeries: update test description to be more accurate
* TimeSeries: update snapshot
* Protect against missing overrides section
We are using grafonnet-lib to generate dashboards. These dashboards do
not contain any `override` keys in `fieldConfig` by default and that is
causing this DashboardMigrator script to blow up when trying to import
the dashboards, see [1]. In Grafana v7, an empty overrides is
automatically added but using grafonnet-lib, it isn't possible to set an
empty overrides attribute e.g. [2] requires matcher/properties to be
set. Setting to null ends up giving me [3], which causes the panel to
not be displayed.
[1]
```
initDashboard.ts:137 TypeError: t.overrides is not iterable
at v.w (DashboardMigrator.ts:960)
at v.updateSchema (DashboardMigrator.ts:672)
at D.updateSchema (DashboardModel.ts:993)
at new D (DashboardModel.ts:156)
at initDashboard.ts:134
```
[2]
https://github.com/grafana/grafonnet-lib/blob/master/grafonnet/stat_panel.libsonnet#L150-L164
[3]
```
"fieldConfig": {
"defaults": {
"links": [ ],
"mappings": [ ],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": 0
},
{
"color": "orange",
"value": 1
},
{
"color": "green",
"value": 3
}
]
},
"unit": "none"
},
"overrides": [
{ }
]
},
```
* Update public/app/features/dashboard/state/DashboardMigrator.ts
Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
* Update the mobile view. Change login wrapper justify-content to flex-start. Make the logo and title smaller. Prevent alert-list from overflowing the screen. Increase the footer items line-height.
* Use already existed media-query and set mobile styles as default
* Update changes based on V8 changes
* Revert footer bottom spacer.
* Trigger DashboardPanelsChangedEvent from InspectJSONTab if the panel.gridPos changed and if the dashboard needs to re-render, if yes we will that will update the positioning
* Minor cleanup
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Add Panel: fixes No gap between rows in safari
* removes extra margin from bottom and far right
* fixes frontend test
* make add panel actions accessible and rewrite test using RTL
* Migrate singlestat value mappings to new value mappings
* Update public/app/features/dashboard/state/DashboardMigrator.ts
* Update migration to produce single value map
* Changed font-family to monospace
Added an inline style attribute to the input field for the graphite query editor which changes the font-family to monospace
* Change graphite query editor font-family to monospace
Added an inline style attribute to the input field for the graphite query editor which changes the font-family to monospace
* handle the case where refresh_intervals === null + add unit test
* have a clean _dashboard for each test
* modify check to see if refresh_intervals is an array
* fix sql annotation parsing for empty responses
* fix backend when no data returned
* add back frontend changes
Co-authored-by: Ying WANG <ying.wang@grafana.com>
Fixes a problem with query variables where SQL query returning for example only
numeric values didn't populate the query variables with values.
Fixes#35391
* fix(card): defend against invalid elements types passed to BaseActions
* test(card): add test to support conditional buttons being passed in
* fix(playlistpage): remove disabled prop from LinkButton for editors
* chore(playlistpage): remove title from edit button
* Annotations: Fix for update/save/delete annotation not appearing/disappearing
* Annotations: Fix so adds, updates and deletes are shown correctly
* Chore: updates after PR comments
* Timeline/Status grid tooltip support first pass
* Tooltips workin
* Use getValueFormat to get the duration
* Separate boxes highlight from tooltip interpolation
* Separate state timeline tooltip component, rely on field display color to retrieve color of series
* create an onHover/onLeave API and optimize implementation
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>