[Content management] Setup plugin (#149813)

This commit is contained in:
Sébastien Loix 2023-01-30 14:26:23 +00:00 committed by GitHub
parent 86b38a824d
commit 24765997bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 192 additions and 0 deletions

View file

@ -40,6 +40,10 @@ as uiSettings within the code.
|Console provides the user with tools for storing and executing requests against Elasticsearch.
|{kib-repo}blob/{branch}/src/plugins/content_management/README.md[contentManagement]
|The content management plugin provides functionality to manage content in Kibana.
|{kib-repo}blob/{branch}/src/plugins/controls/README.mdx[controls]
|The Controls plugin contains Embeddables which can be used to add user-friendly interactivity to apps.

View file

@ -19,6 +19,7 @@ pageLoadAssetSize:
cloudLinks: 17629
cloudSecurityPosture: 19109
console: 46091
contentManagement: 16254
controls: 40000
core: 435325
crossClusterReplication: 65408

View file

@ -0,0 +1,3 @@
# Content management
The content management plugin provides functionality to manage content in Kibana.

View file

@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export const PLUGIN_ID = 'contentManagement';
export const API_ENDPOINT = '/api/content_management';

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export { PLUGIN_ID, API_ENDPOINT } from './constants';

View file

@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/src/plugins/content_management'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/src/plugins/content_management',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/src/plugins/content_management/{common,public,server}/**/*.{js,ts,tsx}',
],
};

View file

@ -0,0 +1,14 @@
{
"id": "contentManagement",
"version": "kibana",
"server": true,
"ui": true,
"requiredPlugins": [],
"requiredBundles": [],
"optionalPlugins": [],
"owner": {
"name": "@elastic/kibana-global-experience",
"githubTeam": "@elastic/kibana-global-experience"
},
"description": "Content management app"
}

View file

@ -0,0 +1,15 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ContentManagementPlugin } from './plugin';
export function plugin() {
return new ContentManagementPlugin();
}
export type { ContentManagementPublicStart } from './types';

View file

@ -0,0 +1,26 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import type { CoreSetup, Plugin } from '@kbn/core/public';
import {
ContentManagementPublicStart,
ContentManagementPublicSetup,
SetupDependencies,
} from './types';
export class ContentManagementPlugin
implements Plugin<ContentManagementPublicSetup, ContentManagementPublicStart, SetupDependencies>
{
public setup(core: CoreSetup, deps: SetupDependencies) {
return {};
}
public start() {
return {};
}
}

View file

@ -0,0 +1,16 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface SetupDependencies {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ContentManagementPublicSetup {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ContentManagementPublicStart {}

View file

@ -0,0 +1,16 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import type { PluginInitializerContext } from '@kbn/core/server';
import { ContentManagementPlugin } from './plugin';
export function plugin(initializerContext: PluginInitializerContext) {
return new ContentManagementPlugin(initializerContext);
}
export type { ContentManagementServerSetup, ContentManagementServerStart } from './types';

View file

@ -0,0 +1,28 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server';
import {
ContentManagementServerSetup,
ContentManagementServerStart,
SetupDependencies,
} from './types';
export class ContentManagementPlugin
implements Plugin<ContentManagementServerSetup, ContentManagementServerStart, SetupDependencies>
{
constructor(initializerContext: PluginInitializerContext) {}
public setup(core: CoreSetup) {
return {};
}
public start(core: CoreStart) {
return {};
}
}

View file

@ -0,0 +1,16 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface SetupDependencies {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ContentManagementServerSetup {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ContentManagementServerStart {}

View file

@ -0,0 +1,13 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": ["common/**/*", "public/**/*", "server/**/*", ".storybook/**/*"],
"kbn_references": [
"@kbn/core",
],
"exclude": [
"target/**/*",
]
}

View file

@ -140,6 +140,8 @@
"@kbn/console-plugin/*": ["src/plugins/console/*"],
"@kbn/content-management-content-editor": ["packages/content-management/content_editor"],
"@kbn/content-management-content-editor/*": ["packages/content-management/content_editor/*"],
"@kbn/content-management-plugin": ["src/plugins/content_management"],
"@kbn/content-management-plugin/*": ["src/plugins/content_management/*"],
"@kbn/content-management-table-list": ["packages/content-management/table_list"],
"@kbn/content-management-table-list/*": ["packages/content-management/table_list/*"],
"@kbn/controls-example-plugin": ["examples/controls_example"],