-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create and integrate the clientside resource client factory #9574
create and integrate the clientside resource client factory #9574
Conversation
Signed-off-by: Daniel Rowe <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/prometheus #9574 +/- ##
=====================================================
Coverage ? 61.68%
=====================================================
Files ? 3829
Lines ? 92052
Branches ? 14590
=====================================================
Hits ? 56778
Misses ? 31617
Partials ? 3657
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
@@ -13,10 +13,13 @@ import { OpenSearchSearchHit } from '../../../../doc_views/doc_views_types'; | |||
import { IndexPattern } from '../../../../../../../data/public'; | |||
import { DiscoverViewServices } from '../../../../../build_services'; | |||
|
|||
type Source = Record<string, number | string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for tossing some vega formatting/type improvements in this unrelated PR
|
||
type DataConnectionType = 'prometheus'; | ||
|
||
export class ResourceClientFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ik just feature branch but would this be essentially be accomplished with a route on the server side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this hits the data_enhancements
resource API route in OSD server which proxies the request to the sql plugin in OS.
const yAxisParam = { | ||
field: columns[i].name, | ||
type: 'quantitative', | ||
scale: { zero: false }, | ||
axis: { titleColor: color, title: columns[i].name }, | ||
axis: { title: '' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this be breaking change? or just for demo purposes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is only used by the demo
|
||
import { HttpSetup } from 'opensearch-dashboards/public'; | ||
|
||
const BASE_API = 'api/enhancements'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prolly for feature branch purposes but data plugin doesn't depend on the enhancements plugin so might have to invert it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I felt bad about this tbh. I'd like to move the query enhancement languages (sql
, ppl
, promql
) autocompletion definitions to the query enhancement to avoid having this coupling in the data plugin. Once those are moved over I can define this resource client in data enhancements. Thoughts?
80bf24e
into
opensearch-project:feature/prometheus
Description
This is to create a clientside API to surface data connection resources. With this PR I've implemented the prometheus resource API which will be used for dynamic query suggestions.
Changelog
Check List
yarn test:jest
yarn test:jest_integration