diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/activemq.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/activemq.svg
index 20694ba6e62c7..8d525c23e6801 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/activemq.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/activemq.svg
@@ -1,31 +1 @@
-
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/azure.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/azure.svg
index f8df12ba05c50..a93c83b4b4ae0 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/azure.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/azure.svg
@@ -1,17 +1 @@
-
-
-
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cisco.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cisco.svg
new file mode 100644
index 0000000000000..20ebebf19741e
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cisco.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cockroachdb.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cockroachdb.svg
index 72f0958f52824..08a4bdabb380f 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cockroachdb.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/cockroachdb.svg
@@ -1,666 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/consul.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/consul.svg
index 28bbadd24c8a6..5ef8feaded689 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/consul.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/consul.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/coredns.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/coredns.svg
index 863a81e0f40e7..e38616a15a11c 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/coredns.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/coredns.svg
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/couchdb.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/couchdb.svg
index 2512c2eb2a011..3c3ecb66d8c87 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/couchdb.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/couchdb.svg
@@ -1,86 +1 @@
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg
index 45c995b19603b..a22132d415c40 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/envoyproxy.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ibmmq.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ibmmq.svg
index e474d93359beb..396d5a67a20eb 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ibmmq.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ibmmq.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/iis.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/iis.svg
new file mode 100644
index 0000000000000..99964448d33c5
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/iis.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/mssql.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/mssql.svg
new file mode 100644
index 0000000000000..738507c5809c0
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/mssql.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/munin.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/munin.svg
new file mode 100644
index 0000000000000..b35a39498c9ec
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/munin.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/nats.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/nats.svg
index f7593c51a4c42..5a1d6e9a52f17 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/nats.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/nats.svg
@@ -1,102 +1 @@
-
-
-
-
-
- image/svg+xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/openmetrics.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/openmetrics.svg
index feccb88a3f34b..1a00be6ab30a2 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/openmetrics.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/openmetrics.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg
index f4458439fceb4..a745cd71efafe 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg
@@ -1,41 +1 @@
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/suricata.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/suricata.svg
new file mode 100644
index 0000000000000..06e627a7e4ba7
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/suricata.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/system.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/system.svg
new file mode 100644
index 0000000000000..0aba96275e24e
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/system.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/traefik.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/traefik.svg
index 8ee3448f5626e..10b38261eca5e 100644
--- a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/traefik.svg
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/traefik.svg
@@ -1,342 +1 @@
-
-
-
-image/svg+xml
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ubiquiti.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ubiquiti.svg
new file mode 100644
index 0000000000000..99a911e32863e
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/ubiquiti.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/uwsgi.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/uwsgi.svg
new file mode 100644
index 0000000000000..43818ab211ee3
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/uwsgi.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/vsphere.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/vsphere.svg
new file mode 100644
index 0000000000000..2a04026e46432
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/vsphere.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/zeek.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/zeek.svg
new file mode 100644
index 0000000000000..0e346f98c7238
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/zeek.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/zookeeper.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/zookeeper.svg
new file mode 100644
index 0000000000000..80db65f670d1d
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/zookeeper.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/plugins/home/server/tutorials/cisco_logs/index.ts b/src/plugins/home/server/tutorials/cisco_logs/index.ts
index 303dbd9a9d856..a694802663171 100644
--- a/src/plugins/home/server/tutorials/cisco_logs/index.ts
+++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts
@@ -50,7 +50,7 @@ supports the "asa" fileset for Cisco ASA firewall logs received over syslog or r
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-cisco.html',
},
}),
- // euiIconType: 'logoCisco',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/cisco.svg',
artifacts: {
dashboards: [],
application: {
diff --git a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
index ac2db66dff6b6..53803a9358a14 100644
--- a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
+++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
@@ -50,7 +50,7 @@ It supports both standalone deployment and Envoy proxy deployment in Kubernetes.
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-envoyproxy.html',
},
}),
- // euiIconType: 'logoCisco',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/envoyproxy.svg',
artifacts: {
dashboards: [],
application: {
diff --git a/src/plugins/home/server/tutorials/iis_logs/index.ts b/src/plugins/home/server/tutorials/iis_logs/index.ts
index ff9996c1b0187..82ce098018e0b 100644
--- a/src/plugins/home/server/tutorials/iis_logs/index.ts
+++ b/src/plugins/home/server/tutorials/iis_logs/index.ts
@@ -49,7 +49,7 @@ export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema {
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-iis.html',
},
}),
- // euiIconType: 'logoIIS',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/iis.svg',
artifacts: {
dashboards: [
{
diff --git a/src/plugins/home/server/tutorials/iptables_logs/index.ts b/src/plugins/home/server/tutorials/iptables_logs/index.ts
index e3f2124347b6b..b29ab20cb6653 100644
--- a/src/plugins/home/server/tutorials/iptables_logs/index.ts
+++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts
@@ -52,7 +52,7 @@ number and the action performed on the traffic (allow/deny).. \
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-iptables.html',
},
}),
- // euiIconType: 'logoUbiquiti',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/ubiquiti.svg',
artifacts: {
dashboards: [],
application: {
diff --git a/src/plugins/home/server/tutorials/mssql_metrics/index.ts b/src/plugins/home/server/tutorials/mssql_metrics/index.ts
index cea46c3220d5a..a1c994d670a3d 100644
--- a/src/plugins/home/server/tutorials/mssql_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mssql_metrics/index.ts
@@ -48,7 +48,7 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-mssql.html',
},
}),
- // euiIconType: 'logoMSSQL',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/mssql.svg',
isBeta: false,
artifacts: {
dashboards: [
diff --git a/src/plugins/home/server/tutorials/munin_metrics/index.ts b/src/plugins/home/server/tutorials/munin_metrics/index.ts
index e438d3015c77c..90e4ac6026dad 100644
--- a/src/plugins/home/server/tutorials/munin_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/munin_metrics/index.ts
@@ -36,6 +36,7 @@ export function muninMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.muninMetrics.nameTitle', {
defaultMessage: 'Munin metrics',
}),
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/munin.svg',
isBeta: true,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.muninMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/suricata_logs/index.ts b/src/plugins/home/server/tutorials/suricata_logs/index.ts
index ac19cf0987b84..a3812fda147f5 100644
--- a/src/plugins/home/server/tutorials/suricata_logs/index.ts
+++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts
@@ -50,7 +50,7 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-suricata.html',
},
}),
- // euiIconType: 'logoSuricata',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/suricata.svg',
artifacts: {
dashboards: [
{
diff --git a/src/plugins/home/server/tutorials/system_logs/index.ts b/src/plugins/home/server/tutorials/system_logs/index.ts
index fc2fa4f49fd5f..ab8184c1b3249 100644
--- a/src/plugins/home/server/tutorials/system_logs/index.ts
+++ b/src/plugins/home/server/tutorials/system_logs/index.ts
@@ -50,6 +50,7 @@ Unix/Linux based distributions. This module is not available on Windows. \
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-system.html',
},
}),
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/system.svg',
artifacts: {
dashboards: [
{
diff --git a/src/plugins/home/server/tutorials/system_metrics/index.ts b/src/plugins/home/server/tutorials/system_metrics/index.ts
index b0355e1118a96..456804c51f838 100644
--- a/src/plugins/home/server/tutorials/system_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/system_metrics/index.ts
@@ -49,6 +49,7 @@ It collects system wide statistics and statistics per process and filesystem. \
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-system.html',
},
}),
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/system.svg',
artifacts: {
dashboards: [
{
diff --git a/src/plugins/home/server/tutorials/traefik_logs/index.ts b/src/plugins/home/server/tutorials/traefik_logs/index.ts
index 423023a3902e5..56f1d56ea0123 100644
--- a/src/plugins/home/server/tutorials/traefik_logs/index.ts
+++ b/src/plugins/home/server/tutorials/traefik_logs/index.ts
@@ -49,7 +49,7 @@ export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchem
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-traefik.html',
},
}),
- // euiIconType: 'logoTraefik',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/traefik.svg',
artifacts: {
dashboards: [
{
diff --git a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
index fc36cfe869867..a1dfbc64ec244 100644
--- a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
@@ -48,7 +48,7 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-uwsgi.html',
},
}),
- // euiIconType: 'logouWSGI',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/uwsgi.svg',
isBeta: false,
artifacts: {
dashboards: [
diff --git a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts
index 3ea57cdbc0e44..908b6440f88c6 100644
--- a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts
@@ -48,7 +48,7 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-vsphere.html',
},
}),
- // euiIconType: 'logoVSphere',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/vsphere.svg',
isBeta: true,
artifacts: {
application: {
diff --git a/src/plugins/home/server/tutorials/zeek_logs/index.ts b/src/plugins/home/server/tutorials/zeek_logs/index.ts
index c015545046c99..251825147ded1 100644
--- a/src/plugins/home/server/tutorials/zeek_logs/index.ts
+++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts
@@ -50,7 +50,7 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema {
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-zeek.html',
},
}),
- // TODO: euiIconType: 'logoZeek',
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/zeek.svg',
artifacts: {
dashboards: [
{
diff --git a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts
index dcecbb6d4a812..581b4a14a2f38 100644
--- a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts
@@ -36,6 +36,7 @@ export function zookeeperMetricsSpecProvider(context: TutorialContext): Tutorial
name: i18n.translate('home.tutorials.zookeeperMetrics.nameTitle', {
defaultMessage: 'Zookeeper metrics',
}),
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/zookeeper.svg',
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.zookeeperMetrics.shortDescription', {
diff --git a/x-pack/legacy/plugins/maps/public/connected_components/map/features_tooltip/__snapshots__/feature_properties.test.js.snap b/x-pack/legacy/plugins/maps/public/connected_components/map/features_tooltip/__snapshots__/feature_properties.test.js.snap
index a52c118bca8cd..3b3d82c92fbb7 100644
--- a/x-pack/legacy/plugins/maps/public/connected_components/map/features_tooltip/__snapshots__/feature_properties.test.js.snap
+++ b/x-pack/legacy/plugins/maps/public/connected_components/map/features_tooltip/__snapshots__/feature_properties.test.js.snap
@@ -2,7 +2,7 @@
exports[`FeatureProperties should not show filter button 1`] = `
(this._node = node)}>
+ (this._node = node)}
+ >
{rows}
);
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/api.ts b/x-pack/legacy/plugins/siem/public/containers/case/api.ts
index e98c258690486..7d5ae53b78ff8 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/api.ts
+++ b/x-pack/legacy/plugins/siem/public/containers/case/api.ts
@@ -19,7 +19,9 @@ import {
ServiceConnectorCaseResponse,
ActionTypeExecutorResult,
} from '../../../../../../plugins/case/common/api';
+
import { KibanaServices } from '../../lib/kibana';
+
import {
ActionLicense,
AllCases,
@@ -30,7 +32,9 @@ import {
SortFieldCase,
CaseUserActions,
} from './types';
+
import { CASES_URL } from './constants';
+
import {
convertToCamelCase,
convertAllCasesToCamel,
@@ -43,12 +47,17 @@ import {
decodeServiceConnectorCaseResponse,
} from './utils';
-export const getCase = async (caseId: string, includeComments: boolean = true): Promise => {
+export const getCase = async (
+ caseId: string,
+ includeComments: boolean = true,
+ signal: AbortSignal
+): Promise => {
const response = await KibanaServices.get().http.fetch(`${CASES_URL}/${caseId}`, {
method: 'GET',
query: {
includeComments,
},
+ signal,
});
return convertToCamelCase(decodeCaseResponse(response));
};
@@ -64,9 +73,10 @@ export const getCasesStatus = async (signal: AbortSignal): Promise
return convertToCamelCase(decodeCasesStatusResponse(response));
};
-export const getTags = async (): Promise => {
+export const getTags = async (signal: AbortSignal): Promise => {
const response = await KibanaServices.get().http.fetch(`${CASES_URL}/tags`, {
method: 'GET',
+ signal,
});
return response ?? [];
};
@@ -106,6 +116,7 @@ export const getCases = async ({
sortField: SortFieldCase.createdAt,
sortOrder: 'desc',
},
+ signal,
}: FetchCasesProps): Promise => {
const query = {
reporters: filterOptions.reporters.map(r => r.username),
@@ -117,14 +128,16 @@ export const getCases = async ({
const response = await KibanaServices.get().http.fetch(`${CASES_URL}/_find`, {
method: 'GET',
query,
+ signal,
});
return convertAllCasesToCamel(decodeCasesFindResponse(response));
};
-export const postCase = async (newCase: CasePostRequest): Promise => {
+export const postCase = async (newCase: CasePostRequest, signal: AbortSignal): Promise => {
const response = await KibanaServices.get().http.fetch(CASES_URL, {
method: 'POST',
body: JSON.stringify(newCase),
+ signal,
});
return convertToCamelCase(decodeCaseResponse(response));
};
@@ -132,29 +145,40 @@ export const postCase = async (newCase: CasePostRequest): Promise => {
export const patchCase = async (
caseId: string,
updatedCase: Pick,
- version: string
+ version: string,
+ signal: AbortSignal
): Promise => {
const response = await KibanaServices.get().http.fetch(CASES_URL, {
method: 'PATCH',
body: JSON.stringify({ cases: [{ ...updatedCase, id: caseId, version }] }),
+ signal,
});
return convertToCamelCase(decodeCasesResponse(response));
};
-export const patchCasesStatus = async (cases: BulkUpdateStatus[]): Promise => {
+export const patchCasesStatus = async (
+ cases: BulkUpdateStatus[],
+ signal: AbortSignal
+): Promise => {
const response = await KibanaServices.get().http.fetch(CASES_URL, {
method: 'PATCH',
body: JSON.stringify({ cases }),
+ signal,
});
return convertToCamelCase(decodeCasesResponse(response));
};
-export const postComment = async (newComment: CommentRequest, caseId: string): Promise => {
+export const postComment = async (
+ newComment: CommentRequest,
+ caseId: string,
+ signal: AbortSignal
+): Promise => {
const response = await KibanaServices.get().http.fetch(
`${CASES_URL}/${caseId}/comments`,
{
method: 'POST',
body: JSON.stringify(newComment),
+ signal,
}
);
return convertToCamelCase(decodeCaseResponse(response));
@@ -164,22 +188,25 @@ export const patchComment = async (
caseId: string,
commentId: string,
commentUpdate: string,
- version: string
+ version: string,
+ signal: AbortSignal
): Promise => {
const response = await KibanaServices.get().http.fetch(
`${CASES_URL}/${caseId}/comments`,
{
method: 'PATCH',
body: JSON.stringify({ comment: commentUpdate, id: commentId, version }),
+ signal,
}
);
return convertToCamelCase(decodeCaseResponse(response));
};
-export const deleteCases = async (caseIds: string[]): Promise => {
+export const deleteCases = async (caseIds: string[], signal: AbortSignal): Promise => {
const response = await KibanaServices.get().http.fetch(CASES_URL, {
method: 'DELETE',
query: { ids: JSON.stringify(caseIds) },
+ signal,
});
return response === 'true' ? true : false;
};
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/types.ts b/x-pack/legacy/plugins/siem/public/containers/case/types.ts
index bbbb13788d53a..bb215d6ac271c 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/types.ts
+++ b/x-pack/legacy/plugins/siem/public/containers/case/types.ts
@@ -93,7 +93,7 @@ export interface ElasticUser {
readonly username: string;
}
-export interface FetchCasesProps {
+export interface FetchCasesProps extends ApiProps {
queryParams?: QueryParams;
filterOptions?: FilterOptions;
}
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.tsx
index 77d779ab906cf..f1129bae9f537 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.tsx
@@ -66,10 +66,12 @@ export const useUpdateCases = (): UseUpdateCase => {
const dispatchUpdateCases = useCallback((cases: BulkUpdateStatus[]) => {
let cancel = false;
+ const abortCtrl = new AbortController();
+
const patchData = async () => {
try {
dispatch({ type: 'FETCH_INIT' });
- await patchCasesStatus(cases);
+ await patchCasesStatus(cases, abortCtrl.signal);
if (!cancel) {
dispatch({ type: 'FETCH_SUCCESS', payload: true });
}
@@ -87,6 +89,7 @@ export const useUpdateCases = (): UseUpdateCase => {
patchData();
return () => {
cancel = true;
+ abortCtrl.abort();
};
}, []);
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.tsx
index d5a3b3cf9314c..b44e01d06acaf 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.tsx
@@ -74,10 +74,12 @@ export const useDeleteCases = (): UseDeleteCase => {
const dispatchDeleteCases = useCallback((caseIds: string[]) => {
let cancel = false;
+ const abortCtrl = new AbortController();
+
const deleteData = async () => {
try {
dispatch({ type: 'FETCH_INIT' });
- await deleteCases(caseIds);
+ await deleteCases(caseIds, abortCtrl.signal);
if (!cancel) {
dispatch({ type: 'FETCH_SUCCESS', payload: true });
}
@@ -94,6 +96,7 @@ export const useDeleteCases = (): UseDeleteCase => {
};
deleteData();
return () => {
+ abortCtrl.abort();
cancel = true;
};
}, []);
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx
index 506be62614c14..835fb7153dc95 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx
@@ -92,10 +92,12 @@ export const useGetCase = (caseId: string): UseGetCase => {
const callFetch = useCallback(async () => {
let didCancel = false;
+ const abortCtrl = new AbortController();
+
const fetchData = async () => {
dispatch({ type: 'FETCH_INIT' });
try {
- const response = await getCase(caseId);
+ const response = await getCase(caseId, true, abortCtrl.signal);
if (!didCancel) {
dispatch({ type: 'FETCH_SUCCESS', payload: response });
}
@@ -113,6 +115,7 @@ export const useGetCase = (caseId: string): UseGetCase => {
fetchData();
return () => {
didCancel = true;
+ abortCtrl.abort();
};
}, [caseId]);
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx
index ae7b8f3c043fa..323dc23e1b24e 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx
@@ -149,12 +149,15 @@ export const useGetCases = (initialQueryParams?: QueryParams): UseGetCases => {
const fetchCases = useCallback((filterOptions: FilterOptions, queryParams: QueryParams) => {
let didCancel = false;
+ const abortCtrl = new AbortController();
+
const fetchData = async () => {
dispatch({ type: 'FETCH_INIT', payload: 'cases' });
try {
const response = await getCases({
filterOptions,
queryParams,
+ signal: abortCtrl.signal,
});
if (!didCancel) {
dispatch({
@@ -175,6 +178,7 @@ export const useGetCases = (initialQueryParams?: QueryParams): UseGetCases => {
};
fetchData();
return () => {
+ abortCtrl.abort();
didCancel = true;
};
}, []);
@@ -187,13 +191,17 @@ export const useGetCases = (initialQueryParams?: QueryParams): UseGetCases => {
const dispatchUpdateCaseProperty = useCallback(
({ updateKey, updateValue, caseId, refetchCasesStatus, version }: UpdateCase) => {
let didCancel = false;
+ const abortCtrl = new AbortController();
+
const fetchData = async () => {
dispatch({ type: 'FETCH_INIT', payload: 'caseUpdate' });
try {
await patchCase(
caseId,
{ [updateKey]: updateValue },
- version ?? '' // saved object versions are typed as string | undefined, hope that's not true
+ // saved object versions are typed as string | undefined, hope that's not true
+ version ?? '',
+ abortCtrl.signal
);
if (!didCancel) {
dispatch({ type: 'FETCH_UPDATE_CASE_SUCCESS' });
@@ -209,6 +217,7 @@ export const useGetCases = (initialQueryParams?: QueryParams): UseGetCases => {
};
fetchData();
return () => {
+ abortCtrl.abort();
didCancel = true;
};
},
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx
index e3657f5b09da9..b41d5aab5c07a 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx
@@ -57,10 +57,12 @@ export const useGetTags = (): TagsState => {
useEffect(() => {
let didCancel = false;
+ const abortCtrl = new AbortController();
+
const fetchData = async () => {
dispatch({ type: 'FETCH_INIT' });
try {
- const response = await getTags();
+ const response = await getTags(abortCtrl.signal);
if (!didCancel) {
dispatch({ type: 'FETCH_SUCCESS', payload: response });
}
@@ -77,6 +79,7 @@ export const useGetTags = (): TagsState => {
};
fetchData();
return () => {
+ abortCtrl.abort();
didCancel = true;
};
}, []);
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx
index 2ad7a08473200..0e01364721dc5 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx
@@ -61,9 +61,11 @@ export const usePostCase = (): UsePostCase => {
const postMyCase = useCallback(async (data: CasePostRequest) => {
let cancel = false;
+ const abortCtrl = new AbortController();
+
try {
dispatch({ type: 'FETCH_INIT' });
- const response = await postCase(data);
+ const response = await postCase(data, abortCtrl.signal);
if (!cancel) {
dispatch({
type: 'FETCH_SUCCESS',
@@ -81,6 +83,7 @@ export const usePostCase = (): UsePostCase => {
}
}
return () => {
+ abortCtrl.abort();
cancel = true;
};
}, []);
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx
index 86b7f92ace5ad..207b05814717f 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx
@@ -55,9 +55,11 @@ export const usePostComment = (caseId: string): UsePostComment => {
const postMyComment = useCallback(
async (data: CommentRequest, updateCase: (newCase: Case) => void) => {
let cancel = false;
+ const abortCtrl = new AbortController();
+
try {
dispatch({ type: 'FETCH_INIT' });
- const response = await postComment(data, caseId);
+ const response = await postComment(data, caseId, abortCtrl.signal);
if (!cancel) {
dispatch({ type: 'FETCH_SUCCESS' });
updateCase(response);
@@ -73,6 +75,7 @@ export const usePostComment = (caseId: string): UsePostComment => {
}
}
return () => {
+ abortCtrl.abort();
cancel = true;
};
},
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx
index d00755a9f2426..03e10249317ee 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx
@@ -87,7 +87,7 @@ export const usePostPushToService = (): UsePostPushToService => {
const abortCtrl = new AbortController();
try {
dispatch({ type: 'FETCH_INIT' });
- const casePushData = await getCase(caseId);
+ const casePushData = await getCase(caseId, true, abortCtrl.signal);
const responseService = await pushToService(
connectorId,
formatServiceRequestData(casePushData),
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx
index d1015d3f74250..85ad4fd3fc47a 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx
@@ -76,9 +76,16 @@ export const useUpdateCase = ({ caseId }: { caseId: string }): UseUpdateCase =>
const dispatchUpdateCaseProperty = useCallback(
async ({ fetchCaseUserActions, updateKey, updateValue, updateCase, version }: UpdateByKey) => {
let cancel = false;
+ const abortCtrl = new AbortController();
+
try {
dispatch({ type: 'FETCH_INIT', payload: updateKey });
- const response = await patchCase(caseId, { [updateKey]: updateValue }, version);
+ const response = await patchCase(
+ caseId,
+ { [updateKey]: updateValue },
+ version,
+ abortCtrl.signal
+ );
if (!cancel) {
if (fetchCaseUserActions != null) {
fetchCaseUserActions(caseId);
@@ -100,6 +107,7 @@ export const useUpdateCase = ({ caseId }: { caseId: string }): UseUpdateCase =>
}
return () => {
cancel = true;
+ abortCtrl.abort();
};
},
[]
diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx
index b83ed2c01708a..faf9649a705c5 100644
--- a/x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx
@@ -81,9 +81,16 @@ export const useUpdateComment = (): UseUpdateComment => {
version,
}: UpdateComment) => {
let cancel = false;
+ const abortCtrl = new AbortController();
try {
dispatch({ type: 'FETCH_INIT', payload: commentId });
- const response = await patchComment(caseId, commentId, commentUpdate, version);
+ const response = await patchComment(
+ caseId,
+ commentId,
+ commentUpdate,
+ version,
+ abortCtrl.signal
+ );
if (!cancel) {
updateCase(response);
fetchUserActions();
@@ -101,6 +108,7 @@ export const useUpdateComment = (): UseUpdateComment => {
}
return () => {
cancel = true;
+ abortCtrl.abort();
};
},
[]
diff --git a/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.test.ts b/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.test.ts
index 01d6a2e2e81bc..572d73e368c7a 100644
--- a/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.test.ts
+++ b/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.test.ts
@@ -140,4 +140,21 @@ describe('dedupeConnections', () => {
// @ts-ignore
expect(nodejsNode?.data[SPAN_SUBTYPE]).toBe('aa');
});
+
+ it('processes connections without a matching "service" aggregation', () => {
+ const response: ServiceMapResponse = {
+ services: [javaService],
+ discoveredServices: [],
+ connections: [
+ {
+ source: javaService,
+ destination: nodejsService
+ }
+ ]
+ };
+
+ const { elements } = dedupeConnections(response);
+
+ expect(elements.length).toBe(3);
+ });
});
diff --git a/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.ts b/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.ts
index 6a433367d8217..e5d7c0b2de10c 100644
--- a/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.ts
+++ b/x-pack/plugins/apm/server/lib/service_map/dedupe_connections/index.ts
@@ -88,7 +88,7 @@ export function dedupeConnections(response: ServiceMapResponse) {
serviceName = node[SERVICE_NAME];
}
- const matchedServiceNodes = services.filter(
+ const matchedServiceNodes = serviceNodes.filter(
serviceNode => serviceNode[SERVICE_NAME] === serviceName
);
diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts b/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts
index 941ac90f2e90e..1dfab165eccd7 100644
--- a/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts
+++ b/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts
@@ -53,7 +53,7 @@ export function initDeleteAllCommentsApi({ caseService, router, userActionServic
),
});
- return response.ok({ body: 'true' });
+ return response.noContent();
} catch (error) {
return response.customError(wrapError(error));
}
diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.test.ts b/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.test.ts
index 8f05fbce391f8..b2022e6dec26d 100644
--- a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.test.ts
+++ b/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.test.ts
@@ -21,7 +21,7 @@ describe('DELETE comment', () => {
beforeAll(async () => {
routeHandler = await createRoute(initDeleteCommentApi, 'delete');
});
- it(`deletes the comment. responds with 200`, async () => {
+ it(`deletes the comment. responds with 204`, async () => {
const request = httpServerMock.createKibanaRequest({
path: '/api/cases/{case_id}/comments/{comment_id}',
method: 'delete',
@@ -39,7 +39,7 @@ describe('DELETE comment', () => {
);
const response = await routeHandler(theContext, request, kibanaResponseFactory);
- expect(response.status).toEqual(200);
+ expect(response.status).toEqual(204);
});
it(`returns an error when thrown from deleteComment service`, async () => {
const request = httpServerMock.createKibanaRequest({
diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts b/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts
index 44e57fc809e04..ff0729afed96a 100644
--- a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts
+++ b/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts
@@ -64,7 +64,7 @@ export function initDeleteCommentApi({ caseService, router, userActionService }:
],
});
- return response.ok({ body: 'true' });
+ return response.noContent();
} catch (error) {
return response.customError(wrapError(error));
}
diff --git a/x-pack/plugins/case/server/routes/api/cases/delete_cases.test.ts b/x-pack/plugins/case/server/routes/api/cases/delete_cases.test.ts
index cee705694f21d..c5be6f78a1570 100644
--- a/x-pack/plugins/case/server/routes/api/cases/delete_cases.test.ts
+++ b/x-pack/plugins/case/server/routes/api/cases/delete_cases.test.ts
@@ -22,7 +22,7 @@ describe('DELETE case', () => {
beforeAll(async () => {
routeHandler = await createRoute(initDeleteCasesApi, 'delete');
});
- it(`deletes the case. responds with 200`, async () => {
+ it(`deletes the case. responds with 204`, async () => {
const request = httpServerMock.createKibanaRequest({
path: '/api/cases',
method: 'delete',
@@ -39,7 +39,7 @@ describe('DELETE case', () => {
);
const response = await routeHandler(theContext, request, kibanaResponseFactory);
- expect(response.status).toEqual(200);
+ expect(response.status).toEqual(204);
});
it(`returns an error when thrown from deleteCase service`, async () => {
const request = httpServerMock.createKibanaRequest({
diff --git a/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts b/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts
index 8b0384c12edce..0214017ae5c29 100644
--- a/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts
+++ b/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts
@@ -70,7 +70,7 @@ export function initDeleteCasesApi({ caseService, router, userActionService }: R
),
});
- return response.ok({ body: 'true' });
+ return response.noContent();
} catch (error) {
return response.customError(wrapError(error));
}
diff --git a/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.test.ts b/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.test.ts
index 7fd8b4a894989..a204bd44901b7 100644
--- a/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.test.ts
+++ b/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.test.ts
@@ -112,6 +112,40 @@ describe('cluster_serialization', () => {
},
'localhost:9300'
)
+ ).toEqual({
+ name: 'test_cluster',
+ proxyAddress: 'localhost:9300',
+ mode: 'proxy',
+ hasDeprecatedProxySetting: true,
+ isConnected: true,
+ connectedNodesCount: 1,
+ maxConnectionsPerCluster: 3,
+ initialConnectTimeout: '30s',
+ skipUnavailable: false,
+ transportPingSchedule: '-1',
+ transportCompress: false,
+ });
+ });
+
+ it('should deserialize a cluster that contains a deprecated proxy address and is in cloud', () => {
+ expect(
+ deserializeCluster(
+ 'test_cluster',
+ {
+ seeds: ['localhost:9300'],
+ connected: true,
+ num_nodes_connected: 1,
+ max_connections_per_cluster: 3,
+ initial_connect_timeout: '30s',
+ skip_unavailable: false,
+ transport: {
+ ping_schedule: '-1',
+ compress: false,
+ },
+ },
+ 'localhost:9300',
+ true
+ )
).toEqual({
name: 'test_cluster',
proxyAddress: 'localhost:9300',
diff --git a/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.ts b/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.ts
index 3d8ffa13b8218..07dbe8da28d8a 100644
--- a/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.ts
+++ b/x-pack/plugins/remote_clusters/common/lib/cluster_serialization.ts
@@ -68,7 +68,8 @@ export interface ClusterSettingsPayloadEs {
export function deserializeCluster(
name: string,
esClusterObject: ClusterInfoEs,
- deprecatedProxyAddress?: string | undefined
+ deprecatedProxyAddress?: string | undefined,
+ isCloudEnabled?: boolean | undefined
): Cluster {
if (!name || !esClusterObject || typeof esClusterObject !== 'object') {
throw new Error('Unable to deserialize cluster');
@@ -117,7 +118,7 @@ export function deserializeCluster(
// If a user has a remote cluster with the deprecated proxy setting,
// we transform the data to support the new implementation and also flag the deprecation
if (deprecatedProxyAddress) {
- // Create server name (address, without port), since field doesn't exist in deprecated implementation
+ // Cloud-specific logic: Create default server name, since field doesn't exist in deprecated implementation
const defaultServerName = deprecatedProxyAddress.split(':')[0];
deserializedClusterObject = {
@@ -126,7 +127,7 @@ export function deserializeCluster(
seeds: undefined,
hasDeprecatedProxySetting: true,
mode: PROXY_MODE,
- serverName: defaultServerName,
+ serverName: isCloudEnabled ? defaultServerName : undefined,
};
}
diff --git a/x-pack/plugins/remote_clusters/kibana.json b/x-pack/plugins/remote_clusters/kibana.json
index 8922bf621aa03..f1b9d20f762d3 100644
--- a/x-pack/plugins/remote_clusters/kibana.json
+++ b/x-pack/plugins/remote_clusters/kibana.json
@@ -11,7 +11,8 @@
"indexManagement"
],
"optionalPlugins": [
- "usageCollection"
+ "usageCollection",
+ "cloud"
],
"server": true,
"ui": true
diff --git a/x-pack/plugins/remote_clusters/public/application/app_context.tsx b/x-pack/plugins/remote_clusters/public/application/app_context.tsx
new file mode 100644
index 0000000000000..86c0b401d416d
--- /dev/null
+++ b/x-pack/plugins/remote_clusters/public/application/app_context.tsx
@@ -0,0 +1,22 @@
+/*
+ * 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 React, { createContext } from 'react';
+
+export interface Context {
+ isCloudEnabled: boolean;
+}
+
+export const AppContext = createContext({} as any);
+
+export const AppContextProvider = ({
+ children,
+ context,
+}: {
+ children: React.ReactNode;
+ context: Context;
+}) => {
+ return {children};
+};
diff --git a/x-pack/plugins/remote_clusters/public/application/index.d.ts b/x-pack/plugins/remote_clusters/public/application/index.d.ts
index b5c5ad5522134..b021dca51bacd 100644
--- a/x-pack/plugins/remote_clusters/public/application/index.d.ts
+++ b/x-pack/plugins/remote_clusters/public/application/index.d.ts
@@ -8,5 +8,8 @@ import { RegisterManagementAppArgs, I18nStart } from '../types';
export declare const renderApp: (
elem: HTMLElement | null,
- I18nContext: I18nStart['Context']
+ I18nContext: I18nStart['Context'],
+ appDependencies: {
+ isCloudEnabled?: boolean;
+ }
) => ReturnType;
diff --git a/x-pack/plugins/remote_clusters/public/application/index.js b/x-pack/plugins/remote_clusters/public/application/index.js
index 0b8b26ace5daa..f2d788c741342 100644
--- a/x-pack/plugins/remote_clusters/public/application/index.js
+++ b/x-pack/plugins/remote_clusters/public/application/index.js
@@ -11,14 +11,17 @@ import { Provider } from 'react-redux';
import { App } from './app';
import { remoteClustersStore } from './store';
+import { AppContextProvider } from './app_context';
-export const renderApp = (elem, I18nContext) => {
+export const renderApp = (elem, I18nContext, appDependencies) => {
render(
-
-
-
+
+
+
+
+
,
elem
diff --git a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap
index 6ff8c538ca89c..4c109c557fdb0 100644
--- a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap
+++ b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap
@@ -5,7 +5,6 @@ exports[`RemoteClusterForm proxy mode renders correct connection settings when u
disabledFields={Object {}}
fields={
Object {
- "mode": "sniff",
"name": "",
"nodeConnections": 3,
"proxyAddress": "",
@@ -805,6 +804,7 @@ exports[`RemoteClusterForm proxy mode renders correct connection settings when u
data-test-subj="remoteClusterFormServerNameFormRow"
describedByIds={Array []}
display="row"
+ error={null}
fullWidth={true}
hasChildLabel={true}
hasEmptyLabelSpace={false}
@@ -827,10 +827,11 @@ exports[`RemoteClusterForm proxy mode renders correct connection settings when u
}
/>
}
+ isInvalid={false}
label={
}
@@ -845,18 +846,21 @@ exports[`RemoteClusterForm proxy mode renders correct connection settings when u
className="euiFormRow__labelWrapper"
>