mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Add userSetup
plugin skeleton. (#101610)
This commit is contained in:
parent
f6fc6c1a3d
commit
2d48f7fb11
13 changed files with 166 additions and 0 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -252,6 +252,7 @@
|
|||
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core
|
||||
/src/plugins/security_oss/ @elastic/kibana-security
|
||||
/src/plugins/spaces_oss/ @elastic/kibana-security
|
||||
/src/plugins/user_setup/ @elastic/kibana-security
|
||||
/test/security_functional/ @elastic/kibana-security
|
||||
/x-pack/plugins/spaces/ @elastic/kibana-security
|
||||
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
|
||||
|
|
|
@ -256,6 +256,10 @@ In general this plugin provides:
|
|||
|The Usage Collection Service defines a set of APIs for other plugins to report the usage of their features. At the same time, it provides necessary the APIs for other services (i.e.: telemetry, monitoring, ...) to consume that usage data.
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/src/plugins/user_setup/README.md[userSetup]
|
||||
|The plugin provides UI and APIs for the interactive setup mode.
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/src/plugins/vis_default_editor/README.md[visDefaultEditor]
|
||||
|The default editor is used in most primary visualizations, e.x. Area, Data table, Pie, etc.
|
||||
It acts as a container for a particular visualization and options tabs. Contains the default "Data" tab in public/components/sidebar/data_tab.tsx.
|
||||
|
|
|
@ -112,3 +112,4 @@ pageLoadAssetSize:
|
|||
visTypePie: 35583
|
||||
expressionRevealImage: 25675
|
||||
cases: 144442
|
||||
userSetup: 18532
|
||||
|
|
3
src/plugins/user_setup/README.md
Normal file
3
src/plugins/user_setup/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# `userSetup` plugin
|
||||
|
||||
The plugin provides UI and APIs for the interactive setup mode.
|
13
src/plugins/user_setup/jest.config.js
Normal file
13
src/plugins/user_setup/jest.config.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* 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/user_setup'],
|
||||
};
|
13
src/plugins/user_setup/kibana.json
Normal file
13
src/plugins/user_setup/kibana.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"id": "userSetup",
|
||||
"owner": {
|
||||
"name": "Platform Security",
|
||||
"githubTeam": "kibana-security"
|
||||
},
|
||||
"description": "This plugin provides UI and APIs for the interactive setup mode.",
|
||||
"version": "8.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["userSetup"],
|
||||
"server": true,
|
||||
"ui": true
|
||||
}
|
27
src/plugins/user_setup/public/app.tsx
Normal file
27
src/plugins/user_setup/public/app.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* 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 { EuiPageTemplate, EuiPanel, EuiText } from '@elastic/eui';
|
||||
import React from 'react';
|
||||
|
||||
export const App = () => {
|
||||
return (
|
||||
<EuiPageTemplate
|
||||
restrictWidth={false}
|
||||
template="empty"
|
||||
pageHeader={{
|
||||
iconType: 'logoElastic',
|
||||
pageTitle: 'Welcome to Elastic',
|
||||
}}
|
||||
>
|
||||
<EuiPanel>
|
||||
<EuiText>Kibana server is not ready yet.</EuiText>
|
||||
</EuiPanel>
|
||||
</EuiPageTemplate>
|
||||
);
|
||||
};
|
11
src/plugins/user_setup/public/index.ts
Normal file
11
src/plugins/user_setup/public/index.ts
Normal 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.
|
||||
*/
|
||||
|
||||
import { UserSetupPlugin } from './plugin';
|
||||
|
||||
export const plugin = () => new UserSetupPlugin();
|
29
src/plugins/user_setup/public/plugin.tsx
Normal file
29
src/plugins/user_setup/public/plugin.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* 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 React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import type { CoreSetup, CoreStart, Plugin } from 'src/core/public';
|
||||
import { App } from './app';
|
||||
|
||||
export class UserSetupPlugin implements Plugin {
|
||||
public setup(core: CoreSetup) {
|
||||
core.application.register({
|
||||
id: 'userSetup',
|
||||
title: 'User Setup',
|
||||
chromeless: true,
|
||||
mount: (params) => {
|
||||
ReactDOM.render(<App />, params.element);
|
||||
return () => ReactDOM.unmountComponentAtNode(params.element);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public start(core: CoreStart) {}
|
||||
}
|
16
src/plugins/user_setup/server/config.ts
Normal file
16
src/plugins/user_setup/server/config.ts
Normal 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 { TypeOf } from '@kbn/config-schema';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
|
||||
export type ConfigType = TypeOf<typeof ConfigSchema>;
|
||||
|
||||
export const ConfigSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
});
|
19
src/plugins/user_setup/server/index.ts
Normal file
19
src/plugins/user_setup/server/index.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* 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 { TypeOf } from '@kbn/config-schema';
|
||||
import type { PluginConfigDescriptor } from 'src/core/server';
|
||||
|
||||
import { ConfigSchema } from './config';
|
||||
import { UserSetupPlugin } from './plugin';
|
||||
|
||||
export const config: PluginConfigDescriptor<TypeOf<typeof ConfigSchema>> = {
|
||||
schema: ConfigSchema,
|
||||
};
|
||||
|
||||
export const plugin = () => new UserSetupPlugin();
|
17
src/plugins/user_setup/server/plugin.ts
Normal file
17
src/plugins/user_setup/server/plugin.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* 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 } from 'src/core/server';
|
||||
|
||||
export class UserSetupPlugin implements Plugin {
|
||||
public setup(core: CoreSetup) {}
|
||||
|
||||
public start(core: CoreStart) {}
|
||||
|
||||
public stop() {}
|
||||
}
|
12
src/plugins/user_setup/tsconfig.json
Normal file
12
src/plugins/user_setup/tsconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true
|
||||
},
|
||||
"include": ["public/**/*", "server/**/*"],
|
||||
"references": [{ "path": "../../core/tsconfig.json" }]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue