-
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
[POC] SO Metadata events streams #130976
[POC] SO Metadata events streams #130976
Conversation
@@ -10,6 +10,7 @@ | |||
|
|||
import { i18n } from '@kbn/i18n'; | |||
import { SavedObject } from '@kbn/core/server'; | |||
import { defaultUserContentAttributes } from '@kbn/user-content-plugin/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.
Instead of having the home
plugin knowing about the user_content
plugin and do this import we probably want to put an extension point in place where plugins can add modifiers to the sample data before it is loaded.
In this case the user_content
plugin would register a modifier in the home
plugin to add the defaultUserContentAttributes
.
@@ -98,6 +100,7 @@ export function createSavedDashboardClass( | |||
panelsJSON: { type: 'text' }, | |||
}, | |||
}, | |||
...userContentCommonMappings, |
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.
I am not sure why we have duplicate mappings definition with the server. This would probably need to be refactored to have a single mappings declaration
@@ -35,13 +38,14 @@ export class DashboardPlugin | |||
public setup(core: CoreSetup, plugins: SetupDeps) { | |||
this.logger.debug('dashboard: Setup'); | |||
|
|||
core.savedObjects.registerType( | |||
createDashboardSavedObjectType({ | |||
plugins.userContent.registerContent({ |
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.
Swap savedObjects.registerType
with userContent.registerContent
and we start gathering metadata information for this saved object type.
router: IRouter, | ||
{ metadataEventsService }: RouteDependencies | ||
) => { | ||
router.post( |
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 route is used for dev purpose. This logic should be called daily by a Cron Job to update the counters.
f9b9314
to
76a4849
Compare
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Any counts in public APIs
Async chunks
Public APIs missing exports
Page load bundle
Saved Objects .kibana field count
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Closing in favor of #133022 |
POC for the content management "metadata events".
Issue related: #9202