* Public dashboard query API
* Create new API on service for building metric request
* Flesh out testing, implement BuildPublicDashboardMetricRequest
* Test for errors and missing panels
* WIP: Test for multiple datasources
* Refactor tests, add supporting code for multiple datasources
* Gets the panel data from the pubdash query api
* Adds tests to make sure we get the correct api url from retrieving panel data
* Public dashboard query API
* Create new API on service for building metric request
* Flesh out testing, implement BuildPublicDashboardMetricRequest
* Test for errors and missing panels
* WIP: Test for multiple datasources
* Refactor tests, add supporting code for multiple datasources
* Handle queries from multiple datasources
* Replace dashboard time range with pubdash time range settings
* Fix comments from review, build failure
* removes changes to DataSourceWithBackend.ts regarding getting the pubdash panel query url. Going to do this in a new class, PublicDashboardDataSource.ts
* Include pubdash Uid in dashboard meta
* Creates new PublicDashboardDataSource.ts and adds test
* Passes pubdash uid down to PanelQueryRunner.ts to a PublicDashboardDatasource can be chosen when were looking at a public dashboard
* removes comment
* checks for error when unmarshalling json
* Only replace dashboard time settings with pubdash time settings when pubdash time settings exist
* formatting and added comment
Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
Co-authored-by: Jeff Levin <jeff@levinology.com>
This PR adds endpoints for public dashboards to retrieve data from the backend (trusted) query engine. It works by executing queries defined on the backend without any user input and does not support template variables.
* Public dashboard query API
* Create new API on service for building metric request
* Flesh out testing, implement BuildPublicDashboardMetricRequest
* Test for errors and missing panels
* Refactor tests, add supporting code for multiple datasources
* Handle queries from multiple datasources
* Explicitly pass no user for querying public dashboard
Co-authored-by: Jeff Levin <jeff@levinology.com>
* rename function to requireEditPermissionsOnFolder
* Require only viewer permissions on a folder when connecting a library panel from it
* update tests
* require edit permissions on the dashboard
* revert my change to the tests - these tests test something different
* revert changes to a test file???
* Query history: Add swagger definitions
* Update
* Remove changes in generated files
* Generate api files
* Add query history into api docs
* Add examples for commands
* Add missing parameters
* Generate api-spec and api-merged
* Fix linting
* Fix showing of example of queries
* Revert "Fix showing of example of queries"
This reverts commit b1eb073fbe.
* Update
* Update
* Chore: Exclude integration tests from running on test-backend step
* Remove -v from go test command
* Add check to skip integration tests before each integration test
* Try to restart pipeline
* Retrying to make pipeline run
* Make inheritance permission migration more robust
* Better fix
* Add more tests to the migration
* Add removed test case
* Add test case for empty role in empty org
* Handling the role.ID 0 case with a log
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Feature Flags: introduce a flag for enabling the Data Connections page
* Feature Flags: generate schemas
* Navigation: add navigation weight for the Data Connections page
* NavLink: add a comment pointing out where icon names can be looked up
* NavTree: add a new page called Data Connections
* fix(Api): prefix the navigation IDs with the parent ("data-connections")
* feat(Frontend): add a basic page with four tabs
* feat(Plugins): add a hook for importing an app plugin
* feat(Plugins): add a component for loading app plugins anywhere
* feat(Data Connections): load the cloud-onboarding app under the "Cloud onboarding" tab
* feat(Data Connections): generate a proper nav model to highlight active tabs
* test(Data Connections): add tests
* refactor(Data Connections): update temporary text content
This is only used as a placeholder until the tabs are under development.
* refactor(Data Cnnnections): move /pages to /tabs
* refactor(Data Connections): remove the `types.ts` file as it is not referenced by any module
* feat(Data Connections): only register routes if feature is enabled
* AzureMonitor: tweak experimental-ui after UX discussions.
- move metrics up to resource row
- allow resources field to take an inlineField prop and a labelWidth prop. Eventually once the feature toggle is removed
the inlineField prop will be the only code branch in Field.tsx.
* AzureMonitor: remove devmode req for azureMonitorExperimentalUI flag
* refactor: consolidate logic branch for inline Field
* Add protobuf config and generated code, and client wrapper
* wire up loading of secretsmanager plugin, using renderer plugin as a model
* update kvstore provider to check if we should use the grpc plugin. return false always in OSS
* add OSS remote plugin check
* refactor wire gen file
* log which secrets manager is being used
* Fix argument types for remote checker
* Turns out if err != nil, then the result is always nil. Return empty values if there is an error.
* remove duplicate import
* Update pkg/services/secrets/kvstore/kvstore.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update pkg/services/secrets/kvstore/kvstore.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* refactor RemotePluginCheck interface to just return the Plugin client directly
* rename struct to something less silly
* Update pkg/plugins/backendplugin/secretsmanagerplugin/secretsmanager.proto
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* APM table
* Remove unnecessary changes in Explore.tsx
* Enhancements
* Show empty table if filter returns no results for table
* Error checking
* Combine extra filter options
* Convert service map query to apm query for apm requests
* Simplify links
* Better query building
* Extract method and clean up
* Upgrade filter
* Self review
* Export method
* Update test
* Switch area-chart to lcd-gauge
* Remove AreaChartCell
* Colors, units and other UI upgrades
* Remove 2 queries and reuse existing queries
* Nested observables
* rate/error rate/duration links: open new pane with range query and exemplars turned on
* Align error rate values to rate values col according to span_name
* Rearrange code
* Several improvements
* Filter by span_name
* align the table col values to the same row name (rateName) across the table
* On click tempo link filter by span_name
* Filtering updates
* Ensure serviceQuery null is ok
* Update link expr
* Update duration p90 unit
* Tempo links case
* Update tests
* Self review
* Tests
* Empty state
* Remove some code
* Test: should build expr correctly
* Test: should build link expr correctly
* Test: should get rate aligned values correctly
* Test: should make apm request correctly
* Test: should make tempo link correctly
* Move apm table tests to its own describe
* Feature toggle
* Added to docs for APM table
* Add screenshot to APM table section in docs
* Add feature toggle to test
* Split queries and make method names clearer
* Doc changes
* Add back in config import removed by merge
* Update tempo link and tests
* Update filter
* Set field filterable: false
* Updated doc
* Remove @end from queries
* Add back in tempo link
* Updates to all except alert rules
* Return 400 when rules fail to validate, add testinfra
* More sane package aliases
* More package alias renames
* One more bug in contact point validation
* remove unused function
Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
* Alerting: Fix force_migration when alerting is disabled
This commit fixes a bug where force_migration must be set to true
when both unified and legacy alerting is disabled.
* Update comment
* Fix typo in comment
Co-authored-by: Armand Grillet <armand.grillet@outlook.com>
* Alerting: move group update to alert rule service
* rename validateAlertRuleInterval to validateRuleGroupInterval
* init baseinterval correctly
* add seconds suffix
* extract validation function for reusability
* add context to err message
After migrating to unified alerting, users must explicitly allow rolling
back to legacy alerting by setting force_migration = true in config.
This updates the panic message to clarify why that's required and what
the consequences of rolling back will be.
Fixes#50469
The ng_alert_notification email template did not include templating for
linked or embedded images. This change updates that.
Additionally, this change supports embedding an image for each alert in
an email batch.
Fixes#50315
* optional custom description for OpsGenie
* custom title and message, tests
* update changelog
* check for empty / whitespace only strings
* truncate the title to 130 characters if needed
* unnecessary validation removed
* truncate title to 127 characters and add three dots
* Remove dashbpard version from models
* Fix lint
* Fix api & sqlstore tests
* Remove integration tags
* Fix lint again
* Add integration test to correct namespace
* Lont fix 2
* Change Id to ID in dashVersionMeta
This PR renames the configuration key enabled to capture. This is needed as we already have a configuration key with the name enabled.
Fixes#50328
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>