Check for legacy imports in vis types and fix problems#56763
Check for legacy imports in vis types and fix problems#56763flash1293 merged 10 commits intoelastic:masterfrom
Conversation
| 'src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js', | ||
| 'src/fixtures/config_upgrade_from_4.0.0_to_4.0.1-snapshot.json', | ||
| 'src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_seriesMultiple.js', | ||
| 'src/legacy/ui/public/angular-bootstrap/bindHtml/bindHtml.js', |
There was a problem hiding this comment.
angular-bootstrap got moved into kibana_legacy - while doing this, I adjusted the naming conventions to our code where necessary.
| * needs to render, so in the end the current 'kibana' angular module is no longer necessary | ||
| */ | ||
| export function getInnerAngularModule(name: string, core: CoreStart, deps: DiscoverStartPlugins) { | ||
| initAngularBootstrap(); |
There was a problem hiding this comment.
This is the new way how to load angular-bootstrap modules. They still have to be listed as dependencies in the angular app modules.
| import ngMock from 'ng_mock'; | ||
| import expect from '@kbn/expect'; | ||
|
|
||
| // eslint-disable-next-line @kbn/eslint/no-restricted-paths |
There was a problem hiding this comment.
Leaving in unallowed import here because these tests won't be migrated to the new platform anyway
| const indexId = await this._findIndex(index); | ||
| const filter = esFilters.buildQueryFilter(query, indexId); | ||
|
|
||
| // This is a workaround for the https://github.com/elastic/kibana/issues/18863 |
There was a problem hiding this comment.
I checked and the filter gets removed and the chart gets re-rendered correctly. However there are several other things broken around vega and its filter management that makes it practically impossible to use the feature right now. I'll open a separate issue for those.
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
kertal
left a comment
There was a problem hiding this comment.
Code LGTM 👍 tested locally in chrome. welcome to another citizen of kibana_legacy!
mistic
left a comment
There was a problem hiding this comment.
The changes to files under operations team code owners LGTM
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
This PR turns on the
ui/import checks on allvis_type_*legacy plugins. Those should be completely shimmed already and no legacy utilities should be imported directly anymore.However there were some validations, this PR fixes those as well. I'll leave some comments in the diff why certain things happened