-
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
[Reporting] Move "common" types and constants into common #83198
Conversation
b232cd2
to
d6e6b14
Compare
import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server'; | ||
import { LicensingPluginSetup } from '../../licensing/server'; | ||
import { AuthenticatedUser, SecurityPluginSetup } from '../../security/server'; | ||
import { SpacesPluginSetup } from '../../spaces/server'; |
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.
VS Code auto-import rules have definitely changed 😿
Hopefully this type of noise can be disregarded.
Pinging @elastic/kibana-app-arch (Team:AppArch) |
fdc135c
to
7a59edb
Compare
f1a97f2
to
3456f60
Compare
a918db6
to
9e83e9a
Compare
cfe7c1e
to
daba279
Compare
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.
Ready for review
import { ReportingAPIClient } from './lib/reporting_api_client'; | ||
import { ReportingNotifierStreamHandler as StreamHandler } from './lib/stream_handler'; | ||
import { GetCsvReportPanelAction } from './panel_actions/get_csv_panel_action'; | ||
import { csvReportingProvider } from './share_context_menu/register_csv_reporting'; | ||
import { reportingPDFPNGProvider } from './share_context_menu/register_pdf_png_reporting'; | ||
|
||
export interface ClientConfigType { | ||
poll: ReportingConfigType['poll']; |
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 type comes from the server code, and can not easily be moved to common
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
Code changes LGTM.
…ntegration (elastic#83198) # Conflicts: # x-pack/plugins/reporting/server/export_types/printable_pdf/create_job/index.ts # x-pack/plugins/reporting/server/types.ts
* master: [Ingest Manager] Lift up registry/{stream,extract} functions (elastic#83239) [Reporting] Move "common" types and constants to allow cross-plugin integration (elastic#83198) [Lens] Add suffix formatter (elastic#82852) [App Search] Version documentation links (elastic#83245) Use saved object references for dashboard drilldowns (elastic#82602) Btsymbala/registered av (elastic#81910) [APM] Errors table for service overview (elastic#83065)
Summary
This code has been pulled from PR: #82091 to make 1 large PR into 2 atomic PRs.
See https://github.com/tsullivan/kibana/blob/reporting/feature-control-example/examples/reporting_example/public/components/app.tsx#L35 for an example of how an outside plugin can use the Reporting contract.
Problem addressed by this PR: Applications and plugins that require Reporting integration should be able to list the
reporting
dependency, and access modules from the Reporting Service via their start/stop methods of the Kibana Platform. Unfortunately, not all the modules they would want are accessible in UI code: they're useful, but they are:reporting/index
,reporting/public
, orreporting/common
server/lib
codeThis PR moves a lot of the constants and types that were originally defined in "server" into "common". It also makes a few constants, and helper functions available on the "public" contract. Those are needed in a followup PR to implement an example plugin for Reporting.
List of Changes
ReportingStart
andReportingSetup
interfaces for plugin contractreporting/constants.ts
(ambiguous purpose) and put declarations inreporting/common/constants.ts
reporting/public/index.ts
toreporting/common/types.ts
reporting/server/lib/layouts
andreporting/server/lib/store
intoreporting/common/types
@kbn/eslint/no-restricted-paths
related to hacky exporting in previous codeChecklist
Delete any items that are not applicable to this PR.
For maintainers