* Revert "Chore: Bump terser to fix security vulnerability (#53052)"
This reverts commit 7ae74d2a18.
* feat: use tsc and rollup directly with esbuild and publishConfig, files props
* refactor(grafana-data): fix isolatedModules re-export type error
* refactor(grafana-data): import paths from src not package name
* refactor(rollup): fix dts output.file
* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules
* refactor(grafana-e2e-selectors): fix export types isolatedModules error
* refactor(grafana-runtime): fix isolatedModules re-export type error
* refactor(grafana-ui): fix isolatedModules re-export type error
* feat(grafana-ui): use named imports for treeshaking
* refactor(grafana-ui): use named imports for treeshaking
* feat: react and react-dom as peerDeps for packages
* feat(grafana-ui): emotion packages as peerDeps
* feat(grafana-e2e): use tsc, rollup, esbuild for bundling
* chore(packages): clean up redundant dependencies
* chore(toolkit): deprecate unused package:build task
* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error
* docs(packages): update readme
* chore(storybook): disable isolatedModules for builds
* chore: relax peerDeps for emotion and react
* revert(grafana-ui): put @emotion dependencies back
* refactor: replace relative package imports with package name
* build(packages): set emitDeclaration false for typecheck scripts to work
* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods
* chore(storybook): override ts-node config for storybook compilation
* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types
* chore(toolkit): prefer files and publishConfig package.json props over copying
* build(npm): remove --contents dist arg from publishing commands
* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken
* chore(packages): remove redundant index.js files
* feat(packages): set publishConfig.access to public
* feat(packages): use yarn berry and npm for packaging and publishing
* refactor(packages): simplify rollup configs
* chore(schema): add comment explaining need to exclude dashboard_experimental
* revert(toolkit): put back clean to prevent cli failures
* ci(packages): run packages:pack before a canary publish
* chore(gitignore): add npm-artifacts directory to ignore list
* test(publicdashboarddatasource): fix module mocking
* chore(packages): delete package.tgz when running clean
* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
* wip
* make diff easier to read
* Update template_srv getVariables to return new TypedVariableModel
* update VariableType to use the type from TypedVariableModel
* tidy things up
* Annotations: replaced dashboardId with dashboardUID when fetching annotations
* Annotations: Replaced dashboardID with dashboardUID when adding and updating annotations
* Annotations: Used dashboardUID for PanelChrome related methods
* Annotations: Used dashboarduid in annolistpanel
* Annotations: Used dashboardUID in graph plugin
* used boolean in canEditDashboard
* Toggle on the mixed mode option
* Ensure switching to mixed gives existing query prev datasource
* WIP - Populate datasource when switching between mixed and not
* WIP - handle change from mixed
* Remove preimport filter, refine filter to work for queries
* WIP debugging datasource transition
* Ensure creating a new query gets target data source if switching with no matches between
* Add mixed datasource to rich history display
* Cleanup console logs, add relevant comments
* Add feature toggle for mixed datasource
* Fix Wrapper tests
* Fix tests!
* Fix test types and add feature tracking
* Remove unnecessary default, remove explore/mixed workarounds for D2E
* Move display text logic to mixed datasource file
* Add in the default query parameters to a generated empty query
* Condense some code
* Apply suggestions from code review
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Fix comment lines
* Introduce graphite variable editor
* Render results differently based on queryType
* Add comments and fallback values
* Unit tests for different type of graphite queries
* Use metrics/expand endpoint to retrieve metric names
* First pass at using datasource UID when appropriate
* Fix tests
* be more lenient with lookup to accomodate different URLs
* Make test setup get mock work like real datasource get
* Fix the typing issue and remaining tests
* Fix PR feedback
* Update dependency moment to v2.29.4 [SECURITY]
* chore(moment): make sure nested moment deps resolve to moment@2.29.4
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* move sanitize test to its own test file
* add a test for renderTextPanelMarkdown to always sanitize
* setup TextPanel tests
* add tests to always sanitize Text Panel contents and always convert correctly to html/markdown
* Initial work on new toolbar button
* Minor step
* Small progress
* Minor progress
* Minor fix
* removed console.log
* Removing stuff we don't need yet
* feat: make azure experimental the default
* feat: combine metrics query editor rows
fix: linter errors
* chore: remove test loop for DimensionFields test
* Implement disableSecretsCompatibility flag
* Allow secret deletion right after migration
* Use dialect.Quote for secure_json_data on secret deletion
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Set secure_json_data to NULL instead of empty json
* Run toggles_gen_test and use generated flag variable
* Add ID to delete data source secrets command on function call
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Remove extra query to get datasource on secret deletion
* Fix linting issues with CHANGELOG.md
* Use empty json string when deleting secure json data
* Implement secret migration as a background process
* Refactor secret migration as a background service
* Refactor migration to be inside secret store
* Re-add secret deletion function removed on merge
* Try using transaction to fix db lock during tests
* Disable migration for pipeline debugging
* Try adding sleep to fix database lock
* Remove unecessary time sleep from migration
* Fix merge issue, replace models with datasources
* Try event listener approach
* Fix merge issue, replace models with datasources
* Fix linting issues with unchecked error
* Remove unecessary trainling new line
* Increase wait interval on background secret migration
* Rename secret store migration folder for consistency
* Convert background migration to blocking
* Fix number of arguments on server tests
* Check error value of secret migration provider
* Fix linting issue with method varaible
* Revert unintended change on background services
* Move secret migration service provider to wire.go
* Remove unecessary else from datasource service
* Move transaction inside loop on secret migration
* Remove unecessary GetServices function
* Remove unecessary interface after method removal
* Rename Run to Migrate on secret migration interface
* Rename secret migrations service variable on server
* Use MustBool on datasource secret migration
* Revert changes to GetDataSources
* Implement GetAllDataSources function
* Remove DeleteDataSourceSecrets function
* Move datasource secret migration to datasource service
* Remove unecessary properties from datasource secret migration
* Make DecryptLegacySecrets a private method
* Remove context canceled check on secret migrator
* Log error when fail to unmarshal datasource secret
* Add necessary fields to update command on migration
* Handle high availability on secret migration
* Use kvstore for datasource secret migration status
* Add error check for migration status set on kvstore
* Remove NewSecretMigrationService from server tests
* Use const for strings on datasource secrets migration
* Test all cases for datasources secret migrations
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Playing around
* This is getting interesting
* Updates
* Updated
* Observable experiments
* This is tricky
* VizPanel panel renderer
* New model progress
* Maybe this could be something
* Updated
* Rename
* updates
* Updated
* Query runners? not sure
* Updated
* updates
* flex box layout starting to work
* Testing
* Tested an action
* Parent context sort of working
* Progress
* Progress
* Updated
* Starting to work
* Things are working
* Scene list, nested scene demo
* Progress on repeats
* Moving things
* Pretty big progress
* More things working
* Great progress
* Progress
* Name changing
* Minor tweaks
* Simplified sizing
* Move toggleDirection to SceneFlexLayout
* add feature flag (#50990)
* removed new useObservable hook
* Rename folder and feature toggle to scenes
* Caching scenes so you can go back to another scene without having to re-query data
* Fix issue with subs on re-mount
* Fixing test
* Added SceneCanvasText to play around with layout elements with size based on content
* Scene: Edit mode and component edit wrapper that handles selection (#51078)
* First step for scene variables
* Started playing around with a scene edit mode
* Better way to set component
* Progress on edit mode
* Update
* Progress on edit mode
* Progress on editor
* Progress on editor
* Updates
* More working
* Progress
* Minor update
* removed unnessary file
* Moving things around
* Updated
* Making time range separate from time picker
* minor rename of methods
* The most basic variable start
* Minor renames
* Fixed interpolate issue if not found at closest level
* An embryo of event model and url sync handling
* Update url sync types
* Removed unnessary any type arg
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* passes id and uid to PublicDashboardDatasource
* betterer results
* If for a public dashboard, return the PublicDashboardDataSource first or else getDatasourceSrv.get() will fail bc of no authed user.
Added some unit tests for resolving the uid from the many possible datasource types.
* updates betterer
* Exports DashboardService. Adds method to DashboardService to build anonymous user for use with public dashboards where there is no authed user. Adds method on dashboard_queries to get all dashboard uids from a dashboard.
* refactors to get unique datasource uids
* Adds tests for getting all unique datasource uids off a dashboard
* adds test for building anonymous user with read and query actions that are scoped to each datasource uid in the dashboard
* updates casing of DashboardService
* updates test case to have additional panel with a different datasource
* gives default interval to public dashboard data source
* First stab at new page layouts behind feature toggle
* Simplifying PageHeader
* Progress on a new model that can more easily support new and old page layouts
* Progress
* rename folder
* Progress
* Minor change
* fixes
* Fixing tests
* Make breadcrumbs work
* Add tests for old Page component
* Adding tests for new Page component and behavior
* fixing page header test
* Fixed test
* AppChrome outside route
* Renaming folder
* Minor fix
* Updated
* Fixing StoragePage
* Fix for banners
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not
* show disabled badge in front end if the plugin is not enabled
* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")
* refactor to make use of fields already available in the DTO
* fix typo
* if there is no error returned for the plugin, just show 'disabled'
* fix typo
* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update frontendsettings.go
add clarifying comment
* fix unit test
* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled
* Update helpers.test.ts
revert test change
* fix unit test
* bogus commit to trigger precommit
* undo commit
* run precommit manually
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* remove feature toggle, add empty state and fix bug with initial starring
* Extract empty message into lingui
* remove full stop
* add empty message in the backend
* remove unused import
* translate starred + empty starred states
* betterer changes
This PR completes public dashboards v1 functionality and simplifies public dashboard conventions. It exists as a large PR so that we are not making constant changes to the database schema.
models.PublicDashboardConfig model replaced with models.PublicDashboard directly
dashboard_public_config table renamed to dashboard_public
models.Dashboard.IsPublic removed from the dashboard and replaced with models.PublicDashboard.isEnabled
Routing now uses a uuid v4 as an access token for viewing a public dashboard anonymously, PublicDashboard.Uid only used as database identifier
Frontend utilizes uuid for auth'd operations and access token for anonymous access
Default to time range defined on dashboard when viewing public dashboard
Add audit fields to public dashboard
Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>, Ezequiel Victorero <ezequiel.victorero@grafana.com>, Jesse Weaver <jesse.weaver@grafana.com>
* rename yZeroDisplay -> yMinDisplay
* remove heatmap-cells-sparse frame type
* parse x bucket size to millis
* take into account hideLE & hideGE filters to auto-range color scale
* extract cell value range scanning to heatmapData
* make it possible to set default query
* set default query in cloudwatch ds
* remove cloudwatch example code
* apply feedback
* Update public/app/features/explore/state/query.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Update public/app/features/query/components/QueryGroup.tsx
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* add alpha tag to method definiton
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* 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>
* GeomapPanel: Add base types to data layer options
Removed isBaseMap check from data layer filter, which used to remove
base layer types from data layer options. For layer editor, slider to
control opacity is added.
* GeomapPanel: Reorder data layer options
For data layer selection, present user with data layer types first,
before base map layer types. Refactored to consolidate layer options
into a single exported function in registry with a base map boolean.
* GeomapPanel: Add descriptions to base map types
* GeomapPanel: add hideOpacity and apply to markers
* GeomapPanel: update descriptions for map types
Closes#47812
* 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
* 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
* Fix random typo I found
* add 'useDataFrame' boolean to each layer type to determine whether the layer queues off of query data
* Add data frame picker to options layout depending on layer type
* change layer update logic to render features from a specific data frame. Lift data frame selection up a level in order to add some more complex error handling.
* add a todo to the MapLayerRegistryItem interface
* update optional arg in function signature for consistency
* move dataframe filtering to paneldata, revert layers to prior state
* commit refactor, need to clean up still
* pull copy-pasted code into its own function
* clean up comments
* Update layer.ts
* remove unused types
* fix spacing
* improve dropdown
* need to add dependency to this callback function, otherwise it will always use the context of the last layer
* add data query recovery logic to handle query renames
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Update dependency @types/jest to v28
* modern is now default!
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add isPublic to dashboard
* refactor routes to use route group and add placeholder method for sharing apii
* add sharing pane and utils for public dashboard config to sharing modal
* Sharing modal now persists data through the api
* moves ShareDashboard endpoint to new file and starts adding tests
* generates mocks. Adds tests for public dashboard feature flag
* Adds ability to pass in array of features to enable for the test
* test to update public flag on dashboard WIP
* Adds mock for SaveDashboardSharingConfig
* Fixes tests. Had to use FakeDashboardService
* Adds React tests for public dashboards toggle
* removes semicolons
* refactors SharePublic component to use hooks
* rename from `share publicly` to `public dashboard config`
* checkpoint. debugging tests. need to verify name changes
* checkpoint. test bugs fixed. need to finish returning proper response codes
* finish renaming. fix test
* Update pkg/api/api.go
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* update backend url
* rename internal objects and commands. fix configuration modal labels
* add endpoint for retrieving public dashboard configuration and populate the frontend state from it
* add test for dashboardCanBePublic
* adds backend routes
* copy DashboardPage component into component for public dashboards. WIP
* adds react routes, and doesnt render main nav bar when viewing a public route
* removes extra react route from testing
* updates component name
* Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc
* Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed.
* removes commented out code from exploratory work
* Makes public dashboard routes require no auth
* extracts helper to own util file to check if were viewing a public page
* Hides panel dropdown when its being viewed publicly
* formatting
* use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette.
* adds unit tests for util function used to see if page is being viewed publicly
* cant added annotations to panel when being publicly viewed
* removes useless comment
* hides backend and frontend pubdash routes behind feature flag
* consider feature flag when checking url path to see if on public dashboard
* renames function
* still render app notifications when in public view
* Extract pubdash route logic into own file
* fixes failing tests
* Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests.
* renames pubdash web route to be more understandable
* rename route
* fixes failing test
* fixes failing test. Needed to update pubdash urls
* sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url
* fixes failing tests. Uses config to determine if viewing public dashboard
* renders the blue panel timeInfo on public dashboard panel
* Extracts conditional logic for rendering components out into their own functions
* removes publicDashboardView check, and uses dashboard meta instead
* the timeInfo is always displayed on the panel
* After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader.
* Fixes failing test. Needed to add isPublic flag to dashboard meta.
Co-authored-by: Jeff Levin <jeff@levinology.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* bump packages to jest 28
* changes needed for jest 28
* map react-colorful as well
* use customResolver and fix last test
* don't need react-colorful installed if we're using a custom resolver
* return correct thing in mock
* remove watchPathIgnorePatterns since we don't have node_modules anymore
* chore(typescript): remove sanitize_url.d.ts in favour of npm package types
* chore(toolkit): bump all webpack related deps inline with grafana core
* refactor(toolkit): prefer webpack types and use from imports for bundling
* feat(toolkit): bundle plugins using webpack 5 and babel
* chore(toolkit): but all eslint deps inline with grafana core
* refactor(toolkit): rewrite linting step to use new eslint node api
* chore(toolkit): bump jest dependencies inline with grafana core
* refactor(toolkit): update jest config for jest 27
* fix(toolkit): resolve toolkit if using yarn berry
* docs(toolkit): update instructions for developing with yarn berry
* chore(toolkit): remove yarnlink code as won't work with yarn berry
* chore(toolkit): bump remaining dependencies
* chore(toolkit): remove unused core.start task
* feat(toolkit): use browserlist when building plugins
* chore(toolkit): add browserslist dependency
* refactor(toolkit): resolve style loaders, update postcss options for webpack5
* chore(toolkit): put back grafana/data and grafana/ui
* docs(toolkit): improve instructions for developing toolkit locally
* chore(toolkit): clean up webpack debug and warnings
* chore(input-datasource): remove pnpwebpack plugin and update browserslist to solve failing build
* chore(renovatebot): remove toolkit package.json from ignorePaths
* revert(renovate): put back toolkit package.json in ignorePaths
* feat(toolkit): introduce babel plugins
* refactor(toolkit): remove runtime automatic from preset-react for earlier versions of react
* refactor(toolkit): add missing fallbacks to webpack config
* fix(toolkit): remove spaces from copy webpack glob so files are copied
* refactor(toolkit): fix up babel typescript support and copy browserlist on build
* chore(yarn): refresh lock file
* revert(toolkit): remove browsers list so plugins compile to ES5
* revert(toolkit): remove copying .browserslistrc
* Modify the annotation support api
* Migrate annotation editor component
* Update public/app/features/annotations/standardAnnotationSupport.ts
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Move the escape hatches out of the public API
* Fix props transforms
* Break import cycle
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* switch saved items to starred items
* hook up redux properly
* Better query + hook up DashList
* update initial state so it's never undefined
* update GetDashboard call
* use new star service
* add scroll + maxwidth to navbar hover menu, sort starred items alphabetically
* increase height, revert changes to CustomScrollbar
* ellipsis!
* update starred dashboard name in navtree
* sort after renaming
* limit to first 50 starred dashboards found
* Add coremodelValidation feature flag
* coremodels: use stubs when feature flag is off
* api: validate dashboards on save
* Need pointer receiver for FeatureManager
* Update dashboard Go model
* Align doc comments
* Include CoremodelRegistry in test
* Wedge coremodel in on all test cases, ugh
* Ugh fix comment again
* Update pkg/framework/coremodel/staticregistry/provide.go
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Update Thema (and its deps) for better errs
* omg whitespace
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Change default of style to dark
* Separate cursor into standalone def
* Docs on timepicker and templating fields
Also add what appear to be timepicker-related fields
* Separate out AnnotationQuery definition
* Add memberNames for DashboardCursorSync
* Add sketch of VariableModel for templating field
Also changes label field from frontend from null to optional.
* Use constraints to enforce non-empty panel type
Negation (!="") was breaking openapi exporter
* Add types and fields for links
* Remove panelVersion fields
These weren't right anyway, and they revealed a bug in the CUE openapi
generator
* Remove null label value from test
* Narrow type and set bounds on month field
* Adapt Go dashboard schema to lineage changes
* Add RBAC section to settings
* Default to RBAC enabled settings to true
* Update tests to respect RBAC
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Transformation: Added variance and standard deviation for sample and population. Modified mean calculation approach
* Transformation: Removed existing mean calculation
* Transformation: Added testcases for variance and Standard deviation
* Update docs/sources/panels/calculation-types.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* feat: add feature toggle azureMonitorExperimentalUI
Add QueryHeader which adds an experimental header to AzureMonitor. This work is documented in #44432.
* feature toggles
* return HTTP 207 from ds/query
* add ft check
* add API test
* add 207 check for qr
* change to OR
* revert check
* add explicit toggle check for cloudwatch
* remove unused import
* remove from defaults.ini
* add status codes to md and update swagger
* new fangled http api tests pattern
* update swagger
* Update docs/sources/http_api/data_source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* add missing word and reformat
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Logs: Add pagination range to prevent pagination from skipping entries
* Revert "Logs: Add pagination range to prevent pagination from skipping entries"
This reverts commit 2e7a6b3870.
* Refactor
* Update
* Fix: Render unitless strings as strings from displayProcessor
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
* update tests
* Rename none unit
* rename none unit to Number
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
* CloudWatch: prevent log groups from being removed on query change.
Previously when a query was changed the existing log groups for that query were "dropped". The fix is to combine the
new query with the existing query object in memory to preserve the log groups.
fixes#33626
* CloudWatch: fix typos in runWithRetry documentation
* chore: fix eslint issue
* Move tab height and horizontal drawer height to themable variables so they can be referred to. Add a default height to tabbed container so it can set an explicit height. Add overflow: scroll to inspector content
* Use height variable that changes on resize
* Use css to set height
* Add feature flag and scaffodling
* start adding actions
* WIP
* move action files
* Start adding styles
* Fix implementation based on feedback
* Add more hackathon code back to command palette
* Cleanup
* Cleanup unused service files for simple MVP pass
* Move type def to library
* WIP
* Move provider to proper place to pick up other routes’ actions
* Build actions off navbar, add explore actions
* Work around undefined typescript stuff
* Fix based on feedback
* close palette on ESC
* Fix based on PR feedback pt 1
* Move styles to classes
* Move another inline style to a class
* Enable command palette by default
* change around async hook structure
* Add simple feature tracking
* Code cleanup, and be sure the command is accurate
* Change to only render if there are actions, and only add actions once past login
* Updates queryResponse tests to include new cachedResponse bool
* Adds cachedResponse bool to QueryResponse
* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests
* Adds totalQueries and cachedQueries counts to the data-request events
* Adds new metrics and their descriptions to docs
* uses more descriptive variable name
* changes naming
* removes hyphen in docs
* extracts calculations to own lines prior to assignment
* Update dependency @testing-library/user-event to v14.1.1
* make this test more consistent
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Update dependency @testing-library/user-event to v14
* everything is async...
* everything is async pt.2
* Fix cascader tests
* hack the yarn.lock file to remove the old version of @testing-library/dom
* some more fixes!
* MOAR FIXES
* more fixes
* remove a bunch of places where we're wrapping in act()
* down to 7 failing tests...
* Fix arrow tests
* Fix rest of NavBarItem tests
* Fix last tests
* Use {Enter} instead of {enter}
* Revert "Use {Enter} instead of {enter}"
This reverts commit e72453bb52.
* remove some unused act imports
* Fix LibraryPanelsSearch tests
* more stable test
* More consistent test...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* Show query errors under each query row
* Testing a more plain error box
* Font size
* Make it green
* Nit UI
* Slight simplification of condition
* New design
* Update
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Nav: Show overlay icons based on allowed list
* user essentials mob! 🔱
* Navigation: clean up and use new backend prop to show plus icons and
improve visual styling
* Nav: Fix top padding
* refactor to not use showIconInNavbar in NavBarMenuItem
* remove a missed bit
* refactor icon into const
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
FilterInput escapes all input strings for special characters that might
be used in a RegExp by calling escapeStringForRegex, and using
unEscapeStringFromRegex for display. Both of these functions used
string.prototype.replace() for escaping. replace() only replaces the
first occurence of a search string unless called with a global RegExp.
The output of these functions was not necessarily safe to compile into a
RegExp literal.
This change creates RegExps for escapeStringForRegex and
unEscapeStringFromRegex to match all occurrences of the special
characters instead of just their first occurrence. This makes a variety
of strings safe for RegExp compilation.
* AccessControl: Add a feature flag for the builtin role simplification
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Update standardDeatureFlags instead
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Expose option to disable help menu
* Expose option to disable profile menu
* Add Profile FeatureTogglePage
* Update public/app/features/profile/FeatureTogglePage.tsx
Uptake PR wording suggestion.
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Fix front end lint issue
* Fix back end lint issue
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Add history listener to update titleHref/parentHref when location changes
* Convert to functional component and use useLocation
* Wrap component in React.memo
* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
* PanelEdit: Change the meaning of default data source to be just that the default for new panels
* Added migration, and also migration for annotation datasource prop to data source refs
* fix
* Fixing tests
* Fixes to annotation
* Fixing unit test
* fix: make it possible to use both class and functional components for plugins
* fix: accept both class and functional components as plugin root pages
* refactor: import types by name
* refactor: use `ComponentType`