* FeatureToggle: Add toggle to use a new way of rotating tokens
* API: Add endpoints to perform token rotation, one endpoint for api request and one endpoint for redirectsd
* Auth: Aling not authorized handling between auth middleware and access
control middleware
* API: add utility function to get redirect for login
* API: Handle token rotation redirect for login page
* Frontend: Add job scheduling for token rotation and make call to token rotation as fallback in retry request
* ContextHandler: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated
* AuthN: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated
* Cookies: Add option NotHttpOnly
* AuthToken: Add helper function to get next rotation time and another function to check if token need to be rotated
* AuthN: Add function to delete session cookie and set expiry cookie
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* dirty dirty code for showing nested folders in folder view
refactor to NestedFolderItem
Update dashboard grid view to new types
update tests
REBASE OUT OF THIS BRANCH - joshhunt/star-by-uid merged into this
Squashed commit of the following:
commit d0f046ccd3
Author: joshhunt <josh@trtr.co>
Date: Wed Feb 8 18:35:56 2023 +0000
undo async
commit abe2777a1f
Author: joshhunt <josh@trtr.co>
Date: Wed Feb 8 18:34:11 2023 +0000
Dashboards: Star dashboards by UID
add type for dashboard search dto
clean DashboardSearchItem type
simplify DashboardSearchHit type
remove unused properties from DashboardSearchHit
make uid non-optional
rename + move NestedFolderItem type to DashboardViewItem
clean up
* wip
* fix checkbox selection of nested folders
* show folder's parent correctly
* Add dashboard result kind
* don't render folder empty view in SearchView
* call nested folders api only if feature flag enabled
* remove unused import
* un-rename variable to reduce PR diff
* fix typo in comment
* fix order of pseudoFolders
* Fix General folder not showing in browse
* rename folder view tests
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Create simple Wizard for Correlations editor
* Allow using custom navigation in the wizard
* Update types
* Add more info
* Add comments
* Update comments
* Remove main info box to avoid having too many info boxes
* Fix CorrelationsPage.test.tsx
* Add Wizard test
* Simplify Correlations wizard
* Make expected typing error more explicit
* Don't use meaningless defaults
* 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>