* Update all core kinds to flattened lineages
* Regen Go types, without any
* Regen Go types, s/interface{}/any/
* Update generated core typescript
* Update generate docs
* Fix defaults gen in veneer index jenny
* Flatten plugindef lineage
* Convert all plugin kinds to flattened form
* Switch back to interface{} for now
* Switch to fs.Sub in plugin DeclParser
* Mostly undesirable codegen changes, to be fixed
* Update mod and sum
* Update pfs tests to flattened lineages
* Update thema to latest, regen docs
* Wip
* remove name input from page body
* render title & subTitle in datasource page in connections and remove unused prop - uid
* styling on actions button group
* remove unused props in edit datasource page
* set gap as 8px between buttons
* move editable datasourcename to the header
* add subTitle component
* remove useRef and use autoFocus prop
* pass false to isDefault when dataSource is undefined
* change button text
* remove suffix icon
* remove unused import - Icon
* consolidate duplicate useDataSourceSettingsNav into datasrouces hook
* move dataSource context to useDataSourceSettingsNav
* remove Explore button in the footer
* remove unused props
* fix failing test on button group
* fix typo on file naming
* remove disabled prop
* fix param
* add test
* add test files
* disable editing title in readOnly provision datasource
* update name should save dataSource
* prevent swith toggle change from label clicking and change margin
* update tooltip message
* use datasource update on header instead of state update
* remvoe subTitle component and move subTitle component next to page Info component
* Added title
* remove subTitle in buildNavModel
* replace Button with Badge
* make datasourceheader as a component
* horizontal gap of 24px between pageInfo and actions components
* align page Info value items
* accept react node as page info label and add tooltip to Default item
* update navId for edit datasource page in connections
* update unit testing for Title
* fix gen_que
* betterer
* prettier fix
* fix e2e test
* add data-testid to nameEditIcon selector
* fix tooltip text
* fix navId for connections datasources edit page
* fix e2e selector: change autoSizeInput to Input
* adding ellipsis to EditDataSourceTitle
* override grafana-ui titleContainer h1 styles
* UI cleanup and apply readOnly to default datasource switch
* add period
* datasource name validation
* title and page info alignment
* add feature toggle - dataSourcePageHeader
* restore basicSettings component and apply feature toggle
* go lint
* Revert "title and page info alignment"
This reverts commit 681ac51f11.
* remove editable fields from page Header - name, default datasource switch
* fix go test: toggle generator
* remove test id
* remove alerting badge in BasicSettings component
* Revert "remove alerting badge in BasicSettings component"
This reverts commit fb33ff9028.
* feature toggle on alerting badge
* rename component & filename
* move DataSourceInfo type
* change button to link in test
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Miguel Palau Zarza <mpalauzarza@gmail.com>
* Themes: Unify secondary button and ToolbarButton
* Update
* Update light theme
* fix test
* fix toolbar button border
* fix disabled outline button style
* Use transparent color instead of dynamic computed color for hover bg for text/outline versions. this is what figma components do
* Center align cell items
* Change empty folder message + style
* Use new Text components in TypeCell
* Use new components in Move and Delete modals
* fix test
* Change spinner in DescendantsCount to the same font size as the text to prevent layout shift
* Updates for new datasource picker
* Correct typing to ensure datasource selection
* Remove unused import
* Update labels
* Update labels and fix test
* Fix another test
* refactor: remove unnecessary styling and adjust to button styling
* refactor: improve story
* refactor: use new default styling for border radius
* refactor: add missing pseudo classes and clean up
* refactor: repair disabled styling and add to story
* refactor: clean up and apply styles defined in figma
* refactor: set hover background in a pseudo-element
* refactor: unify large sizes
* refactor: add information for further use
* refactor: add comment
* refactor: comments and clean up import
* refactor: add changes after code review
* refactor: replace some bad example code in documentation
* refactor: update comment
Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
* refactor: add changes requested in review
* refactor: move deprecation warning
* refactor: replace padding
* refactor: remove local styling
* refactor: create separate stories for different examples
* refactor: change style of story
* refactor: replace absolute value by variable
* Update toggles_gen.go
---------
Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
* Plugins: Pass panel data in plugin extension context
Similar to https://github.com/grafana/grafana/pull/65861, this passes
the panel's data as part of the context object used when configuring
extension links.
This is useful if the plugin wants to conditionally show the link
depending on the presence or absence of certain features in the
data. For example in the ML plugin we only want to offer Outlier
Detection links for a query if the query returned more than 3 series.
* Update getPanelMenu extension test to include data object
* chore(grafana-ui): begin migration to storybook7
* refactor(storybook): begin cleanup of storybook and addon configs
* chore(storybook): add storybook/blocks to keep yarn berry happy
* chore(storybook): rename intro story for storybook 7
* chore(stories): rename internal stories to support SB7 story name mapper
* chore(betterer): update glob to support internal story renaming
* chore(stories): silence TS errors for subcomponents in SB7
* fix(clickoutsidewrapper): window | document can be undefined not null
* chore(storybook): remove patch for 6.5.16
* revert(storybook): put back story globs
* docs(storybook): replace removed <Props /> with <ArgsTypes /> in mdx files
* docs(storybook): use ArgTypes instead of ArgsTable
* chore(storybook): use correct ArgTypes import name in mdx files
* chore(storybook): patch blocks to expose Preview component for docs
* chore(storybook): rename deprecated ComponentStory and ComponentMeta for v7
* feat(storybook): add STORY env var to customise which stories storybook should load
* chore(storybook): bump to 7.0.4
* fix(storybook): set esbuild minify target to fix erroring docs in production builds
* fix(toolbarbuttonrow): fix import path to prevent error in storybook doc
* docs(storybook): fix up some more stories
* chore(storybook): more config updates to match storybook documentation
* chore(storybook): bump to 7.0.5
* Apply suggestions from code review
Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
* chore(storybook): fix broken merge causing types issues
* chore(storybook): mimic broken alphabetical storySort and docs overview ordering
* docs(storybook): fix button docs adding p tags due to mdx2
* chore(storybook): bump to 7.0.10
* chore(storybook): apply patch on yarn install
* chore(text): update stories for storybook 7
* fix(storybook): make sure globs don't include internal stories in production
---------
Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
* Exposes the scoped vars to UI extensions via context.
* reverted the interpolation when running a query via the query runner.
* adding scoped vars to test.#
* Drawer: Introduce drawer size that sets width and min-width
* media queries
* Change large drawer to 75%
* Change news drawer to medium as the news items have better layout then with images on the side
* Tweaks and fixed inline drawer issue
* review fixes
* Deprecate inline, update mdx docs
* remove inline var
* - initial work on data source config page
* - add links to test status box
- add tracking function
* - add test for the DataSourceConfigAlert component
* - fix flicker of the alert box
* - fix the build
* - small improvements
* - fix failing build
* - fix failing unit tests
* - prettier and betterer fixes
* - fix failing e2e tests
* - fix build again
* - rewrite solution according to the PR comments
* - cleanup
* - fix failing e2e
* - use absolute path in link
* Minor fixes
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Update behavior of defaults in connection limits
* Refactor to use config object instead
* Refactor remove unneeded function
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Build out barebones Traces editor
- Add Traces query type and operation ID prop to query type
- Add necessary header types
- Update resource picker to appropriately work with traces query type
- Build out TracesQueryEditor component
- Include logic to retrieve operationId's for AI Workspaces
- Add backend route mapping
- Update macro to use timestamp as default time field for traces
* AzureMonitor: Traces - Response parsing (#65442)
* Update FormatAsField component
- Add trace ResultFormat type
- Generalise FormatAsField component
- Add component to TracesQueryEditor
- Remove duplicate code in setQueryValue
* Add custom filter function to improve performance
* Add basic conversion for logs to trace
- Add serviceTags converter
- Pass through required parameters (queryType and resultFormat)
- Appropriately set visualisation
* Update parsing to also fill trace tags
- Add constant values for each table schema (include legacy mapping for now if needed)
- Add constant for list of table tags
- Set the foundation for dynamic query building
- Update query to build tags value
- Appropriately set operationName
- Update tagsConverter to filter empty values
* Fix lint and test issues
* AzureMonitor: Traces - Data links (#65566)
* Add portal link for traces
- Pull out necessary values (itemId and itemType)
- Appropriately construct
- Fix ordering
* Set default format as value
- Also set default visualisation
* Fix event schema
* Set default formatAsField value
* Include logs link on traces results
- Adapt config links to allow custom title to be set
* Correctly set operationId for query
* Update backend types
- Include OperationID in query
- Pass forward datasource name and UID
* Ensure setTime doesn't consistently get called if operationID is defined
* Add explore link
- Update util functions to allow setting custom datalinks
* Fix tests
* AzureMonitor: Traces - Query and Editor updates (#66076)
* Add initial query
- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building
* Add entirely separate traces query property
- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query
* Update FormatAsField to be entirely generic
* Update query building to be done in backend
- Add required mappings in backend
- Update frontend querying
* Fix query and explore data link
* Add trace type selection
* Better method for setting explore link
* Fix operationId updating
* Run go mod tidy
* Unnecessary changes
* Fix tests
* AzureMonitor: Traces - Add correlation API support (#65855)
Add correlation API support
- Add necessary types
- Add correlation API request when conditions are met
- Update query
* Fix property from merge
* AzureMonitor: Traces - Filtering (#66303)
* Add initial query
- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building
* Add entirely separate traces query property
- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query
* Update FormatAsField to be entirely generic
* Update query building to be done in backend
- Add required mappings in backend
- Update frontend querying
* Fix query and explore data link
* Add trace type selection
* Better method for setting explore link
* Fix operationId updating
* Run go mod tidy
* Unnecessary changes
* Fix tests
* Start building out Filters component
- Configure component to query for Filter property values when a filter property is set
- Add setFilters function
- Add typing to tablesSchema
- Use component in TracesQueryEditor
* Update Filters
- Asynchronously pull property options
- Setup list of Filter components
* Update filters component
- Remove unused imports
- Have local filters state and query filters
- Correctly set filters values
- Don't update query every time a filter property changes (not performant)
* Update properties query
- Use current timeRange
- Get count to provide informative labels
* Reset map when time changes
* Add operation selection
* Reset filters when property changes
* Appropriate label name for empty values
* Add filtering to query
* Update filter components
- Fix rendering issue
- Correctly compare and update timeRange
- Split out files for simplicity
* Add checkbox option to multiselect
- Add custom option component
- Correctly call onChange
- Add variableOptionGroup for template variable selection
* Fix adding template vars
* Improve labels and refresh labels on query prop changes
* AzureMonitor: Traces - Testing (#66474)
* Select ds for template variable interpolation
* Update az logs ds tests
- Add templateVariables test
- Add filter test
- Update mock
- Remove anys
* Update QueryEditor test
- Update mocks with timeSrv for log analytics datasource
- Fix query mock
- Use appropriate and consistent selectors
* Add TracesQueryEditor test
- Update resourcePickerRows mock to include app insights resources
- Remove comments and extra new line
* Add FormatAsField test
- Remove unneeded condition
* Update resourcePicker utils test
* Don't hide selected options in filters
* Fix multi-selection on filters
* Add TraceTypeField test
- Add test file
- Update selectors (remove copy/paste mistake)
- Update placeholder text for select and add label
* Add basic filters test
* Begin filters test
* Update filters test
* Add final tests and simplify/generalise addFilter helper
* Minor update to datasource test
* Update macros test
* Update selectors in tests
* Add response-table-frame tests
* Add datasource tests
- Use sorting where JSON models are inconsistent
- Update filters clause
- Dedupe tags
- Correct operationId conditions
* Don't set a default value for blurInputOnSelect
* Simplify datasource test
* Update to use CheckGoldenJSON utils
- Update with generated frame files
- Remove redundant expected frame code
- Update all usages
* Fix lint
* AzureMonitor: Traces feedback (#67292)
* Filter traces if the visualisation is set to trace
- Update build query logic
- Added additional test cases
- Return an error if the traces type is set by itself with the trace visualisation
- Add descriptions to event types
- Update tests
* Fix bug for error displaying traces
* Update mappings and add error field
- Update tests
- Remove unnecessary comments
* Switch location of Operation ID field
* Re-order fields
* Update link title
* Update label for event type selection
* Update correct link title
* Update logs datalink to link to Azure Logs in explore
* Fix lint
* Draft: Feature: Trusted Types support
* remove trusted-types package
* Create policy before jQuery and Angular is loaded and add feature flag
* Add trustedTypePolicies
* Sanitize scriptURL
* Add TT meta tag for test env
* Move trusted types into core
* Add DOMParser support for TrustedHTML
* Seperate RSS sanitization and add better TrustedHTML support
* Get test CSP header from config
* Remove dompurify dep from core
* Add documentation for trusted types
* Apply suggestions from code review
Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com>
* Add comment about Github discussion thread and things breaking
* Remove changes from News panel
* Remove TT feature toggle
* Expose TT and CSPReportOnly to frontend
* Log errors in console when CSP report only is enabled
* Log error for reporting and remove test mode
* Only insert CSP header in HTML for dev env
* Update docs
---------
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* organize layout, make design uniform, add doc link
* fix e2e test
* move overhauled config parts into prometheus code
* update tooltips with doc links
* clean component styles for section padding, top and bottom 32px
* make additional settings subsection headers h6
* use secondary gray for section descriptions
* fix merge issues
* change inlineswitch to switch only in prom settings because the other components are shared
* remove legacy formfield and input, replace with inlinefield and input from grafana-ui
* find more formfield and UI design fixes like changing inlineformlabel to inlinefield
* remove unused inline form label
* replace legacy duration validations with <FieldValidationMessage>
* fix styles secondary gray from theme
* change language, headings and datasource -> data source
* update alert setting styles with new component
* update prom url heading and tooltip
* update default editor tooltip and set builder as default editor
* update interval tooltip
* update prom type tooltip
* update custom query params tooltip
* update exemplar internal link tooltip
* fix inline form styling inconsistency
* allow for using the DataSourceHTTPSettings component without the connection string
* remove overhaul component, re-use dshtttps comp, and use connection input in config editor
* make tooltips interactive to click links
* consistent label width across the elements we can control for now, fix exemplar switch
* make connection url a component
* refactor onBlur validation
* remove unused component
* add tests for config validations
* add more meaningful health check
* fix e2e test
* fix e2e test
* fix e2e test
* add error handling for more url errors
* remove unnecessary conversion
* health check tests
* Clean up the health check
* health check unit tests
* health check unit tests improved
* make pretty for drone
* lint check go
* lint check go
* add required attr to connection component
* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* fix read only issue for provisioned datasources
* validate multiple durations for incremental query setting
* use sentence case for headers
* use className consistently for styles
* add tests for url regex
* remove console logs
* only use query as healthcheck as the healthy api is not supported by Mimir
* fix exemplar e2e test
* remove overhaul prop from custom headers setting component
* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip
* add spaces back
* spaces
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* add modal scaffolding
* add some unit tests
* remove dummy api, add some TODO comments
* small test refactor
* another small test refactor
* fix unit tests due to aria-label/data-testid change
* adds alertstatehistory backend config to grafanaBootData
* add alertStateHistory api
* show different ASH modal when using loki implementation
* group log lines by instance (unique set of labels)
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>
* render log lines for each instance
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>
* Add visual improvements to the log record of state changes
* Add values to log records
* compute common labels and show unique labels
* Add state changes visualization
* fix common labels extraction
* Code cleanup
* Add timespan-based log record view
* WIP
* scroll to timestamp - poc
* Use SortedVector for timestamp field
* add conditional accessor for frames
* update some of the log formats and styles
* Timestamp-based visualization with scrolling
* minor improvements
* Split Loki's state history viewer into multiple files
* Add memoization to prevent graph rerender on filter updates
* make chart size shrink when fewer instances
* style updates
* show warning when instances are hidden
* Add basic label-based filtering
* Improve label-based filtering
* Add regex validation
* Improve no instances message when everything was filtered out
* Update warning message
* Move timeline viewer to a separate file, refactor handling timeline pointer changes
* Remove unused component, add comments
* Fix test snapshot, fix type error
* adds tests for common.ts
* Add tests for converting log records into data frames
* Add basic component test, fix type guards
* Use a constant for timeseries limit
* Improve a11y, update component test
* Memoize AlertStateTag, migrate from deprecated ArrayVector
* Update public/app/features/alerting/unified/components/rules/state-history/common.ts
* Move helper hook into a separate file. Add Search input component
* Change the limit of visible time series on the timeline
* Add LogRecordViewer perf improvements, refactor timeline cursor events tracking
* Use callback to pass timeline refs
* Add grouping tests for the log record viewer
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* add show context button
* improve type definition
* change to default `maxLines`
* remove context query
* add provider to tests
* add test for split view button
* improve documentation
* add tests for `getLogRowContextQuery`
* refactor LogsContainer functions
* fix spelling
* add `contextQuery` as state
* fix tests
* fix lint
* do not use callIfDefined
* make button secondary
* NestedFolders: Item selection state
* Select children in state
* Unselect parents when children are unselected
* remove unneeded comment
* tests
* tidy test a little bit
* tidy test a little bit
* tidy test a little bit
* tidy test a little bit
* tidy test a little bit
* Add a wrapper to switch between the previous and new DS picker depending on the feature toggle advancedDataSourcePicker.
* Add a new component to represent the modal DS picker, which we will refer as advanced DS picker
Integrate this into the Edit panel, for now, until we're ready to replace everywhere the grafana-runtime DS picker by the wrapper.
* Replace Drawer component with the dropdown
* Adjust the first version of the styles to fit into this Figma design
* Adjust the design of the FileDropzoneDefaultChildren to match with the new DS modal but everywhere else is used nowadays.
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* fix logrowcontext scrolling behavior
* Loki: Update loki context ui menu
* Update
* Add test, update
* Use escapeLabelValueInSelector when displaying labels
* Update test for new appliedContextFilters
---------
Co-authored-by: Sven Grossmann <svennergr@gmail.com>
* There was an attempt
* Change disabled state based on transformation type
* Add validation to transformation type
* Revert "Add validation to transformation type"
This reverts commit 2188a3d9a93aec5eeafcdd40510391ba1a53671a.
* Add validation to transformation type
* Move transformations editor to a separate file
* Make name more descriptive
* Ensure type dropdown has always the same width
* Add tooltips around transformation options
* Slight style changes
* Remove autofocus on append, integrate read only to transformationeditor, save values that disappear so they come back
* Remove yaml changes
* Have variable background color work with alternating colors on different themes
* Make expression required for regular expressions
* Remove unused empty form object
* Fix bug about transformation’s values saved in memory
* Better validation formatting for expression
* Add labels and (for now) non working test, attempt to fix saved transformation delete/add bug
* Fix datalink comment
* Remove fancy CSS due to background change
* Fix deleting saved transformation bug, finish tests
* Consolidate transformation types
* Double check aria labels
* Change aria labels, fix tests
* Add a transformation with the create correlation test
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* fix(packages): remove double trailing slash from npmrc credentials
* chore(packages): add new line to storybook config to trigger an npm canary release
* Update e2e package
- Ensure health request is monitored for addDatasource flow
- Add custom timeout to configurePanel flow
* Make health check optional