* fix: disable orgrolepicker if externaluser is synced
* add disable to role picker
* just took me 2 hours to center the icon
* wip
* fix: check externallySyncedUser for API call
* remove check from store
* add: tests
* refactor authproxy and made tests run
* add: feature toggle
* set feature toggle for tests
* add: IsProviderEnabled
* refactor: featuretoggle name
* IsProviderEnabled tests
* add specific tests for isProviderEnabled
* fix: org_user tests
* add: owner to featuretoggle
* add missing authlabels
* remove fmt
* feature toggle
* change config
* add test for a different authmodule
* test refactor
* gen feature toggle again
* fix basic auth user able to change the org role
* test for basic auth role
* make err.base to error
* lowered lvl of log and input mesg
* Improve showing nextEvaluationDate for rules
Co-Authored-By: Konrad Lalik <konradlalik@gmail.com>
* Improve imports and comments
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
Logs sample: use the selected time range in sample request
There are parts of the query, such as label values, that could only be present during the current selected time interval. If we request using a time range other than the selected one, we are not providing builder suggestions based on the same data that the user is seeing.
* Support having a datasources array in the rules filter
* Fix tests
* Display a MultiplePicker for filtering datasources
* Fix tests
* Refactor as MultipleDataSourcePicker as FC
* Make select box wider
* Remove FC from component definition
* Display ds options in groups based on whether they manage/don't manage rules
* Change dropdown texts and add help info
* Push values with every map call to avoid hitting the maximum call stack size.
* Add test and refactor to for of
* Use native fill instead of lodash
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* bring in source from database
* bring in transformations from database
* add regex transformations to scopevar
* Consolidate types, add better example, cleanup
* Add var only if match
* Change ScopedVar to not require text, do not leak transformation-made variables between links
* Add mappings and start implementing logfmt
* Add mappings and start implementing logfmt
* Remove mappings, turn off global regex
* Add example yaml and omit transformations if empty
* Fix the yaml
* Add logfmt transformation
* Cleanup transformations and yaml
* add transformation field to FE types and use it, safeStringify logfmt values
* Add tests, only safe stringify if non-string, fix bug with safe stringify where it would return empty string with false value
* Add test for transformation field
* Do not add null transformations object
* Add provisioning (to be removed) and show log lines with links
* Only display links if change to query was made
* Break out transformation logic, add tests to backend code
* Fix lint errors I understand 😅
* Fix the backend lint error
* Remove unnecessary code and mark new Transformations object as internal
* Add support for named capture groups
* Remove type assertion
* Remove variable name from transformation
* Add test for overriding regexes
* Add back variable name field, but change to mapValue
* fix go api test
* Change transformation types to enum, add better provisioning checks for bad type name and format
* Change transformation types to enum, add better provisioning checks for bad type name and format
* Check for expression with regex transformations
* Remove isInterpolated variable, add option to always use format function
* Add template variable check to links
* Use new functions
* Filter log line at render, remove extra createSpanLink imports
* Add scrollable to long log messages
* Remove test that is no longer accurate
* Remove test correlation
* Add tests, fix duplicate key issue
* WIP: show log line links key/value pairs
* Some not great style changes
* Change LogDetailsRow for better multi value formatting
* Cleanup
* Add additional information around variable regex, implement PR feedback
* Display name with fieldPath if applicable
* Add variables with fieldPaths to test
* Count empty string as undefined variable
* Add better commented version of function, fix tests by removing new variable
* Modify when links show
* Remove sample yaml
* If a link has no variables, set value to field name, and some formatting issues
* Add comments and change variable names to be more clear, add back logic where needed, add test coverage for new scenario
* Fix formatting of replaceInVariableRegex comment
* Remove changes from Grafana-data, move logic into explore
* Rename function and property to match similar format
* Move types to type files and consolidate definitions, rename functions, change field definitions to accept arrays of keys/values, move function to parser, hide actions on multi key/value rows
* Add tests to logParser’s new function
* Create RecordingRuleEditor component
It reuses QueryEditor and propagates a few properties to allow to filter the visible datasources and customize what's shown in the editor header
* Set recording rules queries as a new state prop
Otherwise it would get mixed up with the alert rules queries when switching back and forth from this option. This also allows me to initialize these queries with the right datasource
* Show CloudRulesSourcePicker only for Loki/Mimir rules
As now we use the query editor for recording rules which already includes a datasource picker within
* Fix lint and tests
* Fix saving a recording rule
* Show expression when editing the recording rule
* Show query editor back for cloud rules
* Fix duplicated import
* Tweak after rebase
* Remove ts-ignore
* Refactor to use queries state instead of recordingRuleQueries
* Refacrtor RecordingRuleEditor to use ds QueryEditor
* Revert extra properties previously added to QueryEditor components
* Remove console.log
* Fix saving/editing a recording rule
* Fix tests
* Add margin to vizwrapper component
* Added scope to filter
* Intrinsic fields don't have scope
* Consistent plus button placement next to the last tag. Changed All Scopes to "unscoped"
* Added validation to duration fields
* Disable options load when dropdown is opened
* Use focused list of operators when all values are of type string or int/float
* Fixed and added tests
* Fix another test
* Better way to prevent duplicate and redundant backend requests when a filter updates
* Rename splitting files to chunking
* Rename time chunking functions
* Move response functions to response utils
* Remove some blank spaces
* Add an extra test case for frame refIds and names
* Prometheus: Run query explicitly instead of onblur in panel edit, and highlight Run qqueries when query changed
* Update loki to do the same
* Cleanup unused prop
* Remove test
* add `lokiQueryChunkingOption` feature flag
* be safe and also rely on `config.featureToggles.lokiQuerySplitting`
* renamed to `lokiQuerySplittingConfig`
* fix typo
* add table results to metric encyclopedia
* remove extra tests
* add class to top align text in td elements
* add secondary style to use metric button and remove unused styles
* Prometheus: Make metrics encyclopedia more responsive for smaller screens (#64909)
* improvements
* remove comments
* feat: exclude all mertics with no metadata
* remove comment
* convert from InlineSwitch to Switch components
* fix bug, enter a fuzzy search sentence, switch to fullMetaSearch, perform fuzzysearch function
---------
Co-authored-by: Gareth Dawson <gareth.dawson@grafana.com>
* Scenes: Progress on demo app
* Argh
* Fixing breadcrumbs
* Added spacer
* Conditional scene objects
* Quick and dirty test for drilldown link via panel title
* Changed the toggle
* Add url state syncing for most links
* Add url state syncing for most links
* Fix instance in url params
* Quick and dirty tabs on the handler page
* fixing breadcrumbs
* Hide footer
* Updates
* new table styles
* Update table cell link styles
* Added search box
* Scene app demo: dynamic data link (#60398)
* Dynamically build data links
* Add field override tests
* Updates
* Updated
* Updates
* before nesting routing
* Something is working
* Caching and nested routes working
* Simplify model
* Use app components from grafana/scenes
* Make the monitoring app work with section nav
* Fixing
* Update scenes
* Remove unused route
* Updates
* remove file
* Update scenes version and use new features
* Remove semicolon
* removed unused thing
* Add refresh pickers
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* add `correlationId` to queries
* trace correlation id in backend
* add correlation id to loki's span
* add correlation id to query chunks
* fix test
* fix DataSourceWithBackend test
* change to `queryGroupId`
* remove empty line
* fix test in `DataSourceWithBackend`
* feat(pluginextensions): move panel menu links into an extensions submenu
* refactor(pluginextensions): move extensions submenu above more... submenu
* test(panelmenu): fix failing tests after moving extensions out of more
* fix: fix rebase issues
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* fix: refresh query stats on timerange change
* partial fix: request stats update on type in code mode
* complete fix: request stats update on type in code mode
* fix: update failing tests and props
* refactor: pass only essential query string to getQueryStats
* refactor: remove unused variables
* test: fix datasource.getTimeRange is not a function
* refactor: use lodash debounce instead of setTimeout
* refactor: add suggestions from code review
* test: shouldUpdateStats and makeStatsRequest
* refactor: use more appropriate variable names
* refactor: make setQueryStats required instead of optional
* refactor: move setQueryStats into LokiQueryEditor
* fix: add missing props to LokiQueryField
* revert changes
* refactor: use inversion of control to request stats
* refactor: remove unnecessary code
* extract kindsys
* reinstate kindsys report
This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)
I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.
Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.
* kindsysreport in codeowners
* Fix#56189 add auth source for users synced via external authentication
* update change role display logic based on user authentication method
* fix display for licensed ac
---------
Co-authored-by: Lokeswaran Aruljothi <74011196+a-loke@users.noreply.github.com>
* Display last & next rule eval date plus eval duration
* Show next evaluation date in a humanized format
Full date still visible on hover
* Only show next evaluation column is group has an interval
* add filtered results
* add feedback link
* correctly debounce fuzzy search thank you leon
* reduce calls to filterMetrics()in letter search
* clean up the alphabet type
* bug fix, filter type should be subtractive
* each filter is don;t explicitly, subtracting from the results of each
* Revert "each filter is don;t explicitly, subtracting from the results of each"
This reverts commit 5648788451.
* each filter is filtered explicitly, one after the other, subtracting from the results of each
* baldm0mma/feature/solidOption/ update cue and ts types
* baldm0mma/feature/solidOption/ update data structures
* baldm0mma/feature/solidOption/ vizrepeater investigation
* baldm0mma/feature/solidOption/ add buildGradientBackground
* baldm0mma/feature/solidOption/ remove conlogs from fieldDisplay.ts
* baldm0mma/feature/solidOption/ rem destruct in fielddisplay.ts
* baldm0mma/feature/solidOption/ rem conlogs from bivaluelayout.tsx
* baldm0mma/feature/solidOption/ rem conlogs in visrepeater
* baldm0mma/feature/solidOption/ rem conlogs from statpanel.tsx
* baldm0mma/feature/solidOption/ add annotations in BigValue.tsx
* baldm0mma/feature/solidOption/ update cue
* baldm0mma/feature/solidOption/ remove unused anno
* baldm0mma/feature/solidOption/ update with toggle conditinal
* Update module.tsx
update anno
* baldm0mma/feature/solidOption/ update annos
* baldm0mma/feature/solidOption/ undo change
* baldm0mma/featurew/solidOption/ add anno for boolean toggle in stat module
* baldm0mma/featurew/solidOption/ update anno in BigValue.tsx for hasGradient
* baldm0mma/featurew/solidOption/ updart default logic in bigValueLayout.tsx
* Range splitting: allow splits larger than 30 days while keeping the fail safe
* Remove limit
* Fix test
* Remove unnecessary try/catch
* Remove unused export
* BarGauge: New value options
* Fix typings for cell options, add new value mode option for bar gauge cells
* Add BarGauge panel option, tests, and update test dashboard
* Updated
* Added default
* Goodbye trusty console.log
* Update
* Merge changes from main
* Update docs
* Add valuemode doc changes
* Update gdev dashboard
* Update valueMode symbol name to valueDisplayMode
* Use Enums as Opposed to literals, don't calculate values when hidden
* Remove double import
* Fix tests
* One more test fix
* Remove erroneous targets field, fix type of maxDataPoints
* Strip nulls and add index field to Thresholds
* Gen cue
* remove bad targets again
* Fixes
---------
Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
* only redirect to /login when anonymous access is disabled
* only search for dashboards when not logged in if anon access is enabled
* fix go logic
* add unit tests
* Add basic fuzzy search
* Add fuzzy search to rule name, group and namespace filters
* Add tests
* Apply sort order when filtering
* Filter rules on Enter instead of onChange
* Add minor rule stats performance improvements
* Fix tests
* Remove unused code, add ufuzzy inline docs
* Use form submit to set query string, add debounce docs
* Elasticsearch: Add highlight for logs
* Fix running of queries trough backend only when shouldRunTroughBackend
* Fix incorrect json in test string
* Address feedback
* Keep order of words same
* PanelChrome: Improve error state design
* Simplify logic for hoverHeader
* padding for the title only for the title, not the whole header
* Review fixes
* missed saving file
---------
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
* feat(plugins): introduce dashboard panel menu placement for adding menu items
* test: add test for getPanelMenu()
* added an unique identifier for each extension.
* added context to getPluginExtensions.
* wip
* Wip
* wiwip
* Wip
* feat: WWWIIIIPPPP 🧨
* Wip
* Renamed some of the types to align a bit better.
* added limit to how many extensions a plugin can register per placement.
* decreased number of items to 2
* will trim the lenght of titles to max 25 chars.
* wrapping configure function with error handling.
* added error handling for all scenarios.
* moved extension menu items to the bottom of the more sub menu.
* added tests for configuring the title.
* minor refactorings.
* changed so you need to specify the full path in package.json.
* wip
* removed unused type.
* big refactor to make things simpler and to centralize all configure error/validation handling.
* added missing import.
* fixed failing tests.
* fixed tests.
* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs
* removed the compose that didn't work for some reason.
* added tests just to verify that validation and error handling is tied together in configuration function.
* adding some more values to the context.
* draft validation.
* added missing tests for getPanelMenu.
* added more tests.
* refactor(extensions): move logic for validating extension link config to function
* Fixed ts errors.
* Started to add structure for supporting commands.
* fixed tests.
* adding commands to the registry
* tests: group test cases in describe blocks
* tests: add a little bit more refactoring to the tests
* tests: add a test case for checking correct placements
* feat: first version of the command handler
* feat: register panel menu items with commands
* refactor: make the 'configure' function not optional on `PluginExtensionRegistryItem`
* Wip
* Wip
* Wip
* added test to verify the default configure function.
* added some more tests to verify that commands have the proper error handling for its configure function.
* tests: fix TS errors in tests
* tests: add auxiliary functions
* refactor: small refactoring in tests
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* draft of wrapping command handler with error handling.
* refactor: refactoring tests for registryFactory
* added test for edge case.
* replaced the registry item with a configure function.
* renamed the configure function type.
* refactoring of the registryfactory.
* added tests for handler error handling.
* fixed issue with assert function.
* added comment about the limited type.
* Update public/app/features/plugins/extensions/errorHandling.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update public/app/features/plugins/extensions/errorHandling.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update public/app/features/plugins/extensions/errorHandling.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* added missing tests.
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>