-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[TSVB] Type public code. Step 1 #93231
Conversation
…ade_removal # Conflicts: # src/plugins/vis_type_timeseries/server/lib/get_fields.ts # src/plugins/vis_type_timeseries/server/lib/get_vis_data.ts # src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts # src/plugins/vis_type_timeseries/server/lib/vis_data/annotations/get_request_params.js # src/plugins/vis_type_timeseries/server/lib/vis_data/series/get_request_params.js
…blic # Conflicts: # api_docs/core.json # api_docs/vis_type_timeseries.json # packages/kbn-pm/src/utils/bazel/ensure_yarn_integrity_exists.ts # src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/index.ts # src/plugins/vis_type_timelion/common/parser_async.ts # src/plugins/vis_type_timeseries/server/lib/vis_data/annotations/build_request_body.ts # src/plugins/vis_type_timeseries/server/lib/vis_data/annotations/get_request_params.ts # src/plugins/vis_type_timeseries/server/lib/vis_data/series/get_request_params.ts
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
@@ -123,7 +123,9 @@ export const IndexPattern = ({ | |||
); | |||
const isTimeSeries = model.type === PANEL_TYPES.TIMESERIES; | |||
|
|||
updateControlValidity(intervalName, intervalValidation.isValid); | |||
useEffect(() => { | |||
updateControlValidity(intervalName, intervalValidation.isValid); |
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 is wrapped into effect since it changes a parent component state
const [visData, setVisData] = useState({}); | ||
|
||
useEffect(() => { | ||
model.isModelInvalid = !checkModelValidity(formValidationResults); |
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.
it is not allowed to modify props, so this was converted to the callback
// these are not typed yet | ||
// @ts-expect-error | ||
import { TimeseriesPanelConfig as timeseries } from './timeseries'; | ||
// @ts-expect-error | ||
import { MetricPanelConfig as metric } from './metric'; | ||
// @ts-expect-error | ||
import { TopNPanelConfig as topN } from './top_n'; | ||
// @ts-expect-error | ||
import { TablePanelConfig as table } from './table'; | ||
// @ts-expect-error | ||
import { GaugePanelConfig as gauge } from './gauge'; | ||
// @ts-expect-error | ||
import { MarkdownPanelConfig as markdown } from './markdown'; |
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.
Each panel config is typed in a follow up PR
this.visDataSubject.next(visData); | ||
}; | ||
|
||
render() { | ||
const { model } = this.state; | ||
|
||
if (model) { |
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 check was simply replaced with if (!visFields)
, since render is only waiting for fields fetched.
@elasticmachine run elasticsearch-ci/docs |
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.
It seems fine my dear @sulemanof, thank you so much!
* Remove request facade and update search strategies * Use typescript * Type files * Update structure * Update tests * Type annotations * Fix type for infra * Type editor_controller * Type vis_editor * Type vis_picker * Fix types * Type panel_config * Fix vis data type * Enhance types * Remove generics * Use constant * Update docs * Use empty object as default data * Fix merge conflict
…-action * 'master' of github.com:elastic/kibana: (43 commits) [Console] Update copy when showing warnings in response headers (#94270) [TSVB] Type public code. Step 1 (#93231) [ML] Functional tests - stabilize slider value selection (#94313) skip another suite blocking es promotion (#94367) [Security Solution] Eliminates a redundant external link icon (#94194) skip another suite blocking es promotion (#94367) [App Search] Role mappings migration part 1 (#94346) [Security Solution][Detections] Fix flaky indicator enrichment tests (#94241) [Workplace Search] Deduplicate icons (#94359) [ML] Add latest transform to intro text (#94039) skip test failing es promotion (#94367) [Maps] convert elasticsearch_utils to TS (#93984) [Security_Solution][Telemetry] - Update endpoint usage to use agentService (#93829) [Security Solution][Exceptions] Fixes OS adding method for exception enrichment (#94343) [ILM] Add support for frozen phase (#93068) [App Search] Fixed 2 relevance tuning bugs (#94312) remove `try` auth mode (#94287) Removing resolver functional tests (#94331) migrate warning mixin to core (#94273) [App Search] Add routes for Role Mappings (#94221) ... # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/cold_phase/cold_phase.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/phase/phase.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/searchable_snapshot_field/searchable_snapshot_field.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/configuration_issues_context.tsx
* Remove request facade and update search strategies * Use typescript * Type files * Update structure * Update tests * Type annotations * Fix type for infra * Type editor_controller * Type vis_editor * Type vis_picker * Fix types * Type panel_config * Fix vis data type * Enhance types * Remove generics * Use constant * Update docs * Use empty object as default data * Fix merge conflict
Summary
Part of #63593
This PR converts files from
vis_type_timeseries/public
folder to TypeScript. These are:application/editor_controller.js
application/components/vis_editor.js
application/components/panel_config.js
application/components/vis_picker.js
Other changes mostly consists of export/import changes.