Skip to content

Commit

Permalink
[Content management] Setup plugin (elastic#149813)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga authored and darnautov committed Feb 7, 2023
1 parent ae9e6d2 commit b1434ea
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pageLoadAssetSize:
cloudLinks: 17629
cloudSecurityPosture: 19109
console: 46091
contentManagement: 16254
controls: 40000
core: 435325
crossClusterReplication: 65408
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/content_management/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Content management

The content management plugin provides functionality to manage content in Kibana.
11 changes: 11 additions & 0 deletions src/plugins/content_management/common/constants.ts
Original file line number Diff line number Diff line change
@@ -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';
9 changes: 9 additions & 0 deletions src/plugins/content_management/common/index.ts
Original file line number Diff line number Diff line change
@@ -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';
18 changes: 18 additions & 0 deletions src/plugins/content_management/jest.config.js
Original file line number Diff line number Diff line change
@@ -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}',
],
};
14 changes: 14 additions & 0 deletions src/plugins/content_management/kibana.json
Original file line number Diff line number Diff line change
@@ -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"
}
15 changes: 15 additions & 0 deletions src/plugins/content_management/public/index.ts
Original file line number Diff line number Diff line change
@@ -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';
26 changes: 26 additions & 0 deletions src/plugins/content_management/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -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 {};
}
}
16 changes: 16 additions & 0 deletions src/plugins/content_management/public/types.ts
Original file line number Diff line number Diff line change
@@ -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 {}
16 changes: 16 additions & 0 deletions src/plugins/content_management/server/index.ts
Original file line number Diff line number Diff line change
@@ -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';
28 changes: 28 additions & 0 deletions src/plugins/content_management/server/plugin.ts
Original file line number Diff line number Diff line change
@@ -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 {};
}
}
16 changes: 16 additions & 0 deletions src/plugins/content_management/server/types.ts
Original file line number Diff line number Diff line change
@@ -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 {}
13 changes: 13 additions & 0 deletions src/plugins/content_management/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": ["common/**/*", "public/**/*", "server/**/*", ".storybook/**/*"],
"kbn_references": [
"@kbn/core",
],
"exclude": [
"target/**/*",
]
}
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit b1434ea

Please sign in to comment.