From 148d9d2aea4c095f0eda687ad0d03600c723ec8a Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Tue, 3 Mar 2020 15:17:08 -0800 Subject: [PATCH 1/2] Change remote_clusters ID to remoteClusters and use human readable name for license check. --- x-pack/plugins/remote_clusters/common/constants.ts | 1 - x-pack/plugins/remote_clusters/kibana.json | 2 +- x-pack/plugins/remote_clusters/server/plugin.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/remote_clusters/common/constants.ts b/x-pack/plugins/remote_clusters/common/constants.ts index 3521b7f662fc9..353160de8bf4a 100644 --- a/x-pack/plugins/remote_clusters/common/constants.ts +++ b/x-pack/plugins/remote_clusters/common/constants.ts @@ -10,7 +10,6 @@ import { LicenseType } from '../../licensing/common/types'; const basicLicense: LicenseType = 'basic'; export const PLUGIN = { - id: 'remote_clusters', // Remote Clusters are used in both CCS and CCR, and CCS is available for all licenses. minimumLicenseType: basicLicense, getI18nName: (): string => { diff --git a/x-pack/plugins/remote_clusters/kibana.json b/x-pack/plugins/remote_clusters/kibana.json index 609d0f67f2c7b..8922bf621aa03 100644 --- a/x-pack/plugins/remote_clusters/kibana.json +++ b/x-pack/plugins/remote_clusters/kibana.json @@ -1,5 +1,5 @@ { - "id": "remote_clusters", + "id": "remoteClusters", "version": "kibana", "configPath": [ "xpack", diff --git a/x-pack/plugins/remote_clusters/server/plugin.ts b/x-pack/plugins/remote_clusters/server/plugin.ts index d15ae44c8d5db..9461503a59c70 100644 --- a/x-pack/plugins/remote_clusters/server/plugin.ts +++ b/x-pack/plugins/remote_clusters/server/plugin.ts @@ -50,7 +50,7 @@ export class RemoteClustersServerPlugin implements Plugin registerDeleteRoute(routeDependencies); licensing.license$.subscribe(license => { - const { state, message } = license.check(PLUGIN.id, PLUGIN.minimumLicenseType); + const { state, message } = license.check(PLUGIN.getI18nName(), PLUGIN.minimumLicenseType); const hasRequiredLicense = state === LICENSE_CHECK_STATE.Valid; if (hasRequiredLicense) { this.licenseStatus = { valid: true }; From 58a0fc3ad00acf23aadb66ee6b4150d94a4e53e9 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 4 Mar 2020 12:15:13 -0800 Subject: [PATCH 2/2] Camelcase legacy plugin ID. --- x-pack/legacy/plugins/cross_cluster_replication/index.js | 2 +- x-pack/legacy/plugins/remote_clusters/common/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/legacy/plugins/cross_cluster_replication/index.js b/x-pack/legacy/plugins/cross_cluster_replication/index.js index 1b3aafcad5c0f..cdb867972fcf5 100644 --- a/x-pack/legacy/plugins/cross_cluster_replication/index.js +++ b/x-pack/legacy/plugins/cross_cluster_replication/index.js @@ -15,7 +15,7 @@ export function crossClusterReplication(kibana) { id: PLUGIN.ID, configPrefix: 'xpack.ccr', publicDir: resolve(__dirname, 'public'), - require: ['kibana', 'elasticsearch', 'xpack_main', 'remote_clusters', 'index_management'], + require: ['kibana', 'elasticsearch', 'xpack_main', 'remoteClusters', 'index_management'], uiExports: { styleSheetPaths: resolve(__dirname, 'public/index.scss'), managementSections: ['plugins/cross_cluster_replication'], diff --git a/x-pack/legacy/plugins/remote_clusters/common/index.ts b/x-pack/legacy/plugins/remote_clusters/common/index.ts index c643f549cbfe1..baad348d7a136 100644 --- a/x-pack/legacy/plugins/remote_clusters/common/index.ts +++ b/x-pack/legacy/plugins/remote_clusters/common/index.ts @@ -5,5 +5,5 @@ */ export const PLUGIN = { - ID: 'remote_clusters', + ID: 'remoteClusters', };