Skip to content

Commit

Permalink
create the xpackLegacy plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Sep 1, 2020
1 parent ee06663 commit 5c5ada7
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"xpack.licenseMgmt": "plugins/license_management",
"xpack.licensing": "plugins/licensing",
"xpack.logstash": ["plugins/logstash", "legacy/plugins/logstash"],
"xpack.main": "legacy/plugins/xpack_main",
"xpack.main": ["legacy/plugins/xpack_main", "plugins/xpack_legacy"],
"xpack.maps": ["plugins/maps", "legacy/plugins/maps"],
"xpack.ml": ["plugins/ml", "legacy/plugins/ml"],
"xpack.monitoring": ["plugins/monitoring"],
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -10196,6 +10196,9 @@
"xpack.logstash.upgradeFailureActions.goBackButtonLabel": "戻る",
"xpack.logstash.upstreamPipelineArgumentMustContainAnIdPropertyErrorMessage": "upstreamPipeline 引数には id プロパティを含める必要があります",
"xpack.logstash.workersTooltip": "パイプラインのフィルターとアウトプットステージを同時に実行するワーカーの数です。イベントが詰まってしまう場合や CPU が飽和状態ではない場合は、マシンの処理能力をより有効に活用するため、この数字を上げてみてください。\n\nデフォルト値:ホストの CPU コア数です",
"xpack.main.uiSettings.adminEmailDeprecation": "この設定はサポートが終了し、Kibana 8.0ではサポートされません。kibana.yml設定で、「monitoring.cluster_alerts.email_notifications.email_address」を構成してください。",
"xpack.main.uiSettings.adminEmailDescription": "監視からのクラスターアラートメール通知など、X-Pack管理オペレーションの送信先のメールアドレスです。",
"xpack.main.uiSettings.adminEmailTitle": "管理者メール",
"xpack.maps.addLayerPanel.addLayer": "レイヤーを追加",
"xpack.maps.addLayerPanel.changeDataSourceButtonLabel": "レイヤーを変更",
"xpack.maps.addLayerPanel.footer.cancelButtonLabel": "キャンセル",
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -10198,6 +10198,9 @@
"xpack.logstash.upgradeFailureActions.goBackButtonLabel": "返回",
"xpack.logstash.upstreamPipelineArgumentMustContainAnIdPropertyErrorMessage": "upstreamPipeline 参数必须包含 id 属性",
"xpack.logstash.workersTooltip": "并行执行管道的筛选和输出阶段的工作线程数目。如果您发现事件出现积压或 CPU 未饱和,请考虑增大此数值,以更好地利用机器处理能力。\n\n默认值:主机的 CPU 核心数",
"xpack.main.uiSettings.adminEmailDeprecation": "此设置已过时,在 Kibana 8.0 中将不受支持。请在 kibana.yml 设置中配置 `monitoring.cluster_alerts.email_notifications.email_address`。",
"xpack.main.uiSettings.adminEmailDescription": "X-Pack 管理操作的接收人电子邮件地址,例如来自 Monitoring 的集群告警通知。",
"xpack.main.uiSettings.adminEmailTitle": "管理电子邮件",
"xpack.maps.addLayerPanel.addLayer": "添加图层",
"xpack.maps.addLayerPanel.changeDataSourceButtonLabel": "更改图层",
"xpack.maps.addLayerPanel.footer.cancelButtonLabel": "鍙栨秷",
Expand Down
8 changes: 8 additions & 0 deletions x-pack/plugins/xpack_legacy/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "xpackLegacy",
"version": "8.0.0",
"kibanaVersion": "kibana",
"server": true,
"ui": false,
"requiredPlugins": []
}
11 changes: 11 additions & 0 deletions x-pack/plugins/xpack_legacy/server/index.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;
* you may not use this file except in compliance with the Elastic License.
*/

import { PluginInitializerContext } from '../../../../src/core/server';
import { XpackLegacyPlugin } from './plugin';

export const plugin = (initializerContext: PluginInitializerContext) =>
new XpackLegacyPlugin(initializerContext);
46 changes: 46 additions & 0 deletions x-pack/plugins/xpack_legacy/server/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { schema } from '@kbn/config-schema';
import { i18n } from '@kbn/i18n';
import {
PluginInitializerContext,
CoreStart,
CoreSetup,
Plugin,
} from '../../../../src/core/server';

export class XpackLegacyPlugin implements Plugin {
constructor(_initializerContext: PluginInitializerContext) {}

public setup(core: CoreSetup) {
core.uiSettings.register({
'xPack:defaultAdminEmail': {
name: i18n.translate('xpack.main.uiSettings.adminEmailTitle', {
defaultMessage: 'Admin email',
}),
description: i18n.translate('xpack.main.uiSettings.adminEmailDescription', {
defaultMessage:
'Recipient email address for X-Pack admin operations, such as Cluster Alert email notifications from Monitoring.',
}),
deprecation: {
message: i18n.translate('xpack.main.uiSettings.adminEmailDeprecation', {
defaultMessage:
'This setting is deprecated and will not be supported in Kibana 8.0. Please configure `monitoring.cluster_alerts.email_notifications.email_address` in your kibana.yml settings.',
}),
docLinksKey: 'kibanaGeneralSettings',
},
type: 'string',
value: null,
schema: schema.string(),
},
});
}

public start(core: CoreStart) {}

public stop() {}
}

0 comments on commit 5c5ada7

Please sign in to comment.