-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Removes duplicated service code used in Single Metric Viewer #178566
[ML] Removes duplicated service code used in Single Metric Viewer #178566
Conversation
...l/public/application/timeseriesexplorer/timeseriesexplorer_utils/timeseriesexplorer_utils.js
Outdated
Show resolved
Hide resolved
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.
Overall nice reduction of duplicated code! 🥳 Just added some naming suggestions and one about withKibana/context
. To play it safe, maybe let's do a PR first with functional tests of the Single Metric Viewer embedding and then get this one in afterwards?
x-pack/plugins/ml/public/application/services/forecast_service_provider.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/services/forecast_service_provider.ts
Outdated
Show resolved
Hide resolved
...s/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasting_modal.js
Outdated
Show resolved
Hide resolved
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.
Overall looks good. Manual testing of the chart inside ML and Dashboard as an embeddable all working as expected.
Thanks for taking a look @walterra - added functional tests here: #178768 |
Updated with suggested changes. Also removed Ready for another test/look when you get a chance cc @peteharverson, @walterra |
@elasticmachine merge upstream |
Pinging @elastic/ml-ui (:ml) |
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.
Latest changes LGTM! 🚀
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.
Latest changes LGTM
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.
Added some small comments, but on the whole LGTM.
@@ -546,4 +557,4 @@ export class ForecastingModalUI extends Component { | |||
} | |||
} | |||
|
|||
export const ForecastingModal = withKibana(ForecastingModalUI); | |||
export const ForecastingModal = ForecastingModalUI; |
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.
ForecastingModalUI
isn't needed anymore now. The class can just called ForecastingModal
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.
Updated in 70a4278
@@ -21,12 +21,12 @@ import { | |||
|
|||
import { i18n } from '@kbn/i18n'; | |||
import { FormattedMessage } from '@kbn/i18n-react'; | |||
import { withKibana } from '@kbn/kibana-react-plugin/public'; | |||
import { withKibana, context } from '@kbn/kibana-react-plugin/public'; |
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.
Looks like the same can be done here, we can remove withKibana
as we now use context
.
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.
Updated in 70a4278
expression: string; | ||
} | ||
|
||
export interface ChartDataPoint { |
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.
Nit, these don't need to be exported anymore as they are only used inside this file.
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.
Updated in 70a4278
@elasticmachine merge upstream |
/ci |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
Related meta issue: #176651
This PR removes duplicates created in the initial PR for adding SMV as an embeddable in dashboards:
ml/public/application/services/forecast_service_provider.ts
replacesml/public/application/services/forecast_service.js
ml/public/application/timeseriesexplorer/timeseriesexplorer_utils/time_series_search_service.ts
replacesml/public/application/timeseriesexplorer/timeseries_search_service.ts
removes
ml/public/application/timeseriesexplorer/timeseriesexplorer_utils/timeseriesexplorer_utils.js
Checklist
Delete any items that are not applicable to this PR.