diff --git a/.ci/Jenkinsfile_coverage b/.ci/Jenkinsfile_coverage index 3f4732f15f334..650ef94e1d3da 100644 --- a/.ci/Jenkinsfile_coverage +++ b/.ci/Jenkinsfile_coverage @@ -11,8 +11,11 @@ kibanaPipeline(timeoutMinutes: 240) { 'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc. ]) { workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) { - kibanaCoverage.runTests() - handleIngestion(TIME_STAMP) + catchError { + kibanaCoverage.runTests() + handleIngestion(TIME_STAMP) + } + handleFail() } } kibanaPipeline.sendMail() @@ -29,4 +32,13 @@ def handleIngestion(timestamp) { kibanaCoverage.uploadCoverageStaticSite(timestamp) } +def handleFail() { + def buildStatus = buildUtils.getBuildStatus() + if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED') { + slackNotifications.sendFailedBuild( + channel: '#kibana-qa', + username: 'Kibana QA' + ) + } +} diff --git a/.eslintrc.js b/.eslintrc.js index ec5916c9a3ac7..f0b7d6864bef0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -225,7 +225,7 @@ module.exports = { '!src/core/server/index.ts', // relative import '!src/core/server/mocks{,.ts}', '!src/core/server/types{,.ts}', - '!src/core/server/test_utils', + '!src/core/server/test_utils{,.ts}', // for absolute imports until fixed in // https://github.com/elastic/kibana/issues/36096 '!src/core/server/*.test.mocks{,.ts}', @@ -587,11 +587,11 @@ module.exports = { }, /** - * SIEM overrides + * Security Solution overrides */ { // front end typescript and javascript files only - files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'], + files: ['x-pack/plugins/security_solution/public/**/*.{js,ts,tsx}'], rules: { 'import/no-nodejs-modules': 'error', 'no-restricted-imports': [ @@ -605,7 +605,7 @@ module.exports = { }, { // typescript only for front and back end - files: ['x-pack/{,legacy/}plugins/siem/**/*.{ts,tsx}'], + files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{ts,tsx}'], rules: { // This will be turned on after bug fixes are complete // '@typescript-eslint/explicit-member-accessibility': 'warn', @@ -640,7 +640,7 @@ module.exports = { // { // // will introduced after the other warns are fixed // // typescript and javascript for front end react performance - // files: ['x-pack/plugins/siem/public/**/!(*.test).{js,ts,tsx}'], + // files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,ts,tsx}'], // plugins: ['react-perf'], // rules: { // // 'react-perf/jsx-no-new-object-as-prop': 'error', @@ -651,7 +651,7 @@ module.exports = { // }, { // typescript and javascript for front and back end - files: ['x-pack/{,legacy/}plugins/siem/**/*.{js,ts,tsx}'], + files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,ts,tsx}'], plugins: ['eslint-plugin-node', 'react'], env: { mocha: true, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 83f4f90b9204d..48d70910f9bf1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,6 +37,7 @@ /examples/url_generators_examples/ @elastic/kibana-app-arch /examples/url_generators_explorer/ @elastic/kibana-app-arch /packages/kbn-interpreter/ @elastic/kibana-app-arch +/packages/elastic-datemath/ @elastic/kibana-app-arch /src/legacy/core_plugins/embeddable_api/ @elastic/kibana-app-arch /src/legacy/core_plugins/interpreter/ @elastic/kibana-app-arch /src/legacy/core_plugins/kibana_react/ @elastic/kibana-app-arch @@ -139,6 +140,7 @@ /config/kibana.yml @elastic/kibana-platform /x-pack/plugins/features/ @elastic/kibana-platform /x-pack/plugins/licensing/ @elastic/kibana-platform +/x-pack/plugins/global_search/ @elastic/kibana-platform /x-pack/plugins/cloud/ @elastic/kibana-platform /packages/kbn-config-schema/ @elastic/kibana-platform /src/legacy/server/config/ @elastic/kibana-platform @@ -225,12 +227,12 @@ /x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem /x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem -# SIEM -/x-pack/plugins/siem/ @elastic/siem @elastic/endpoint-app-team +# Security Solution +/x-pack/plugins/security_solution/ @elastic/siem @elastic/endpoint-app-team /x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team -/x-pack/test/api_integration/apis/siem @elastic/siem @elastic/endpoint-app-team +/x-pack/test/api_integration/apis/security_solution @elastic/siem @elastic/endpoint-app-team /x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team /x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team # Security Intelligence And Analytics -/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics +/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics diff --git a/.node-version b/.node-version index 5b7269c0a98f3..b61c07ffddbd1 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -10.19.0 +10.21.0 diff --git a/.nvmrc b/.nvmrc index 5b7269c0a98f3..b61c07ffddbd1 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10.19.0 +10.21.0 diff --git a/.sass-lint.yml b/.sass-lint.yml index db895583eb8a7..eb43af293c670 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -4,7 +4,6 @@ files: - 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss' - 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss' - 'src/plugins/vis_type_xy/**/*.s+(a|c)ss' - - 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss' - 'x-pack/plugins/canvas/**/*.s+(a|c)ss' - 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss' - 'x-pack/plugins/lens/**/*.s+(a|c)ss' @@ -12,6 +11,7 @@ files: - 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss' - 'x-pack/plugins/maps/**/*.s+(a|c)ss' - 'x-pack/plugins/spaces/**/*.s+(a|c)ss' + - 'x-pack/plugins/security/**/*.s+(a|c)ss' ignore: - 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss' rules: diff --git a/Jenkinsfile b/Jenkinsfile index f435b18c6d824..b6a36c79f877d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,9 +41,10 @@ kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true) { 'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9), 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10), 'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'), - 'xpack-siemCypress': { processNumber -> - whenChanged(['x-pack/plugins/siem/', 'x-pack/test/siem_cypress/']) { - kibanaPipeline.functionalTestProcess('xpack-siemCypress', './test/scripts/jenkins_siem_cypress.sh')(processNumber) + 'xpack-pageLoadMetrics': kibanaPipeline.functionalTestProcess('xpack-pageLoadMetrics', './test/scripts/jenkins_xpack_page_load_metrics.sh'), + 'xpack-securitySolutionCypress': { processNumber -> + whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/']) { + kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber) } }, diff --git a/docs/apm/advanced-queries.asciidoc b/docs/apm/advanced-queries.asciidoc index f89f994e59e57..7b771eb662616 100644 --- a/docs/apm/advanced-queries.asciidoc +++ b/docs/apm/advanced-queries.asciidoc @@ -11,7 +11,7 @@ or, to only show transactions that are slower than a specified time threshold. ==== Example APM app queries * Exclude response times slower than 2000 ms: `transaction.duration.us > 2000000` -* Filter by response status code: `context.response.status_code >= 400` +* Filter by response status code: `context.response.status_code ≥ 400` * Filter by single user ID: `context.user.id : 12` When querying in the APM app, you're merely searching and selecting data from fields in Elasticsearch documents. diff --git a/docs/apm/service-maps.asciidoc b/docs/apm/service-maps.asciidoc index 3a6a96fca9d09..db2f85c54c762 100644 --- a/docs/apm/service-maps.asciidoc +++ b/docs/apm/service-maps.asciidoc @@ -62,9 +62,9 @@ Machine learning jobs can be created to calculate anomaly scores on APM transact When these jobs are active, service maps will display a color-coded anomaly indicator based on the detected anomaly score: [horizontal] -image:apm/images/green-service.png[APM green service]:: Max anomaly score **<=25**. Service is healthy. +image:apm/images/green-service.png[APM green service]:: Max anomaly score **≤25**. Service is healthy. image:apm/images/yellow-service.png[APM yellow service]:: Max anomaly score **26-74**. Anomalous activity detected. Service may be degraded. -image:apm/images/red-service.png[APM red service]:: Max anomaly score **>=75**. Anomalous activity detected. Service is unhealthy. +image:apm/images/red-service.png[APM red service]:: Max anomaly score **≥75**. Anomalous activity detected. Service is unhealthy. [role="screenshot"] image::apm/images/apm-service-map-anomaly.png[Example view of anomaly scores on service maps in the APM app] @@ -92,10 +92,10 @@ Type and subtype are based on `span.type`, and `span.subtype`. Service maps are supported for the following Agent versions: [horizontal] -Go Agent:: >= v1.7.0 -Java Agent:: >= v1.13.0 -.NET Agent:: >= v1.3.0 -Node.js Agent:: >= v3.6.0 -Python Agent:: >= v5.5.0 -Ruby Agent:: >= v3.6.0 -Real User Monitoring (RUM) Agent:: >= v4.7.0 +Go Agent:: ≥ v1.7.0 +Java Agent:: ≥ v1.13.0 +.NET Agent:: ≥ v1.3.0 +Node.js Agent:: ≥ v3.6.0 +Python Agent:: ≥ v5.5.0 +Ruby Agent:: ≥ v3.6.0 +Real User Monitoring (RUM) Agent:: ≥ v4.7.0 diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md index 02cc34baf7c45..75d3abefc74b9 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md @@ -114,6 +114,7 @@ | [SearchBar](./kibana-plugin-plugins-data-public.searchbar.md) | | | [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.sync_search_strategy.md) | | | [syncQueryStateWithUrl](./kibana-plugin-plugins-data-public.syncquerystatewithurl.md) | Helper to setup syncing of global data with the URL | +| [UI\_SETTINGS](./kibana-plugin-plugins-data-public.ui_settings.md) | | ## Type Aliases diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md new file mode 100644 index 0000000000000..a48f4920b3d26 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md @@ -0,0 +1,39 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [UI\_SETTINGS](./kibana-plugin-plugins-data-public.ui_settings.md) + +## UI\_SETTINGS variable + +Signature: + +```typescript +UI_SETTINGS: { + META_FIELDS: string; + DOC_HIGHLIGHT: string; + QUERY_STRING_OPTIONS: string; + QUERY_ALLOW_LEADING_WILDCARDS: string; + SEARCH_QUERY_LANGUAGE: string; + SORT_OPTIONS: string; + COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string; + COURIER_SET_REQUEST_PREFERENCE: string; + COURIER_CUSTOM_REQUEST_PREFERENCE: string; + COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string; + COURIER_BATCH_SEARCHES: string; + SEARCH_INCLUDE_FROZEN: string; + HISTOGRAM_BAR_TARGET: string; + HISTOGRAM_MAX_BARS: string; + HISTORY_LIMIT: string; + SHORT_DOTS_ENABLE: string; + FORMAT_DEFAULT_TYPE_MAP: string; + FORMAT_NUMBER_DEFAULT_PATTERN: string; + FORMAT_PERCENT_DEFAULT_PATTERN: string; + FORMAT_BYTES_DEFAULT_PATTERN: string; + FORMAT_CURRENCY_DEFAULT_PATTERN: string; + FORMAT_NUMBER_DEFAULT_LOCALE: string; + TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string; + TIMEPICKER_QUICK_RANGES: string; + INDEXPATTERN_PLACEHOLDER: string; + FILTERS_PINNED_BY_DEFAULT: string; + FILTERS_EDITOR_SUGGEST_VALUES: string; +} +``` diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md index 5f4bb8742c1d1..0efbe8ed4ed64 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md @@ -62,6 +62,7 @@ | [fieldFormats](./kibana-plugin-plugins-data-server.fieldformats.md) | | | [indexPatterns](./kibana-plugin-plugins-data-server.indexpatterns.md) | | | [search](./kibana-plugin-plugins-data-server.search.md) | | +| [UI\_SETTINGS](./kibana-plugin-plugins-data-server.ui_settings.md) | | ## Type Aliases diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md new file mode 100644 index 0000000000000..855cfd11d00ea --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md @@ -0,0 +1,39 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [UI\_SETTINGS](./kibana-plugin-plugins-data-server.ui_settings.md) + +## UI\_SETTINGS variable + +Signature: + +```typescript +UI_SETTINGS: { + META_FIELDS: string; + DOC_HIGHLIGHT: string; + QUERY_STRING_OPTIONS: string; + QUERY_ALLOW_LEADING_WILDCARDS: string; + SEARCH_QUERY_LANGUAGE: string; + SORT_OPTIONS: string; + COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string; + COURIER_SET_REQUEST_PREFERENCE: string; + COURIER_CUSTOM_REQUEST_PREFERENCE: string; + COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string; + COURIER_BATCH_SEARCHES: string; + SEARCH_INCLUDE_FROZEN: string; + HISTOGRAM_BAR_TARGET: string; + HISTOGRAM_MAX_BARS: string; + HISTORY_LIMIT: string; + SHORT_DOTS_ENABLE: string; + FORMAT_DEFAULT_TYPE_MAP: string; + FORMAT_NUMBER_DEFAULT_PATTERN: string; + FORMAT_PERCENT_DEFAULT_PATTERN: string; + FORMAT_BYTES_DEFAULT_PATTERN: string; + FORMAT_CURRENCY_DEFAULT_PATTERN: string; + FORMAT_NUMBER_DEFAULT_LOCALE: string; + TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string; + TIMEPICKER_QUICK_RANGES: string; + INDEXPATTERN_PLACEHOLDER: string; + FILTERS_PINNED_BY_DEFAULT: string; + FILTERS_EDITOR_SUGGEST_VALUES: string; +} +``` diff --git a/docs/images/add-data-fv.png b/docs/images/add-data-fv.png new file mode 100755 index 0000000000000..45313d133822c Binary files /dev/null and b/docs/images/add-data-fv.png differ diff --git a/docs/images/add-data-tutorials.png b/docs/images/add-data-tutorials.png new file mode 100644 index 0000000000000..74deedc57b42e Binary files /dev/null and b/docs/images/add-data-tutorials.png differ diff --git a/docs/infrastructure/infra-ui.asciidoc b/docs/infrastructure/infra-ui.asciidoc index 120a22541717c..96550b4ed5758 100644 --- a/docs/infrastructure/infra-ui.asciidoc +++ b/docs/infrastructure/infra-ui.asciidoc @@ -109,5 +109,5 @@ Depending on the features you have installed and configured, you may also be abl * Select *View APM* to <> in the *APM* app. -* Select *View Uptime* to <> in the *Uptime* app. +* Select *View Uptime* to {uptime-guide}/uptime-app-overview.html[view uptime information] in the *Uptime* app. diff --git a/docs/logs/using.asciidoc b/docs/logs/using.asciidoc index 4f5992f945c7a..eb3025f88ce1b 100644 --- a/docs/logs/using.asciidoc +++ b/docs/logs/using.asciidoc @@ -96,5 +96,5 @@ When the machine learning anomaly detection features are enabled, click *Log rat To see other actions related to the event, click *Actions* in the log event details. Depending on the event and the features you have configured, you may also be able to: -* Select *View status in Uptime* to <> in the *Uptime* app. +* Select *View status in Uptime* to {uptime-guide}/uptime-app-overview.html[view related uptime information] in the *Uptime* app. * Select *View in APM* to <> in the *APM* app. diff --git a/docs/management/managing-remote-clusters.asciidoc b/docs/management/managing-remote-clusters.asciidoc index 00ec5c7d2ddea..51d9f42a0b83e 100644 --- a/docs/management/managing-remote-clusters.asciidoc +++ b/docs/management/managing-remote-clusters.asciidoc @@ -31,6 +31,10 @@ to reproduce indices in the remote cluster on a local cluster. [role="screenshot"] image::images/add_remote_cluster.png[][UI for adding a remote cluster] +To create an index pattern to search across clusters, +use the same syntax that you’d use in a raw cross-cluster search request in {es}: :. +See <> for examples. + [float] [[manage-remote-clusters]] === Manage remote clusters diff --git a/docs/maps/images/fu_gs_select_source_file_upload.png b/docs/maps/images/fu_gs_select_source_file_upload.png index 6939f6a82b297..4fe1162acb29c 100644 Binary files a/docs/maps/images/fu_gs_select_source_file_upload.png and b/docs/maps/images/fu_gs_select_source_file_upload.png differ diff --git a/docs/setup/connect-to-elasticsearch.asciidoc b/docs/setup/connect-to-elasticsearch.asciidoc index 00acb73bd276f..6137e028db3fd 100644 --- a/docs/setup/connect-to-elasticsearch.asciidoc +++ b/docs/setup/connect-to-elasticsearch.asciidoc @@ -1,44 +1,105 @@ [[connect-to-elasticsearch]] -== Connect Kibana with Elasticsearch +== Adding data -Before you can start using Kibana, you need to tell it which Elasticsearch indices you want to explore. -The first time you access Kibana, you are prompted to define an _index pattern_ that matches the name of -one or more of your indices. That's it. That's all you need to configure to start using Kibana. You can -add index patterns at any time from the <>. +To start working with your data in {kib}, you can: -TIP: By default, Kibana connects to the Elasticsearch instance running on `localhost`. To connect to a -different Elasticsearch instance, modify the Elasticsearch URL in the `kibana.yml` configuration file and -restart Kibana. For information about using Kibana with your production nodes, see <>. +* Upload a CSV, JSON, or log file with the File Data Visualizer. -To configure the Elasticsearch indices you want to access with Kibana: +* Upload geospatial data with the GeoJSON Upload feature. -. Point your browser at port 5601 to access the Kibana UI. For example, `localhost:5601` or -`http://YOURDOMAIN.com:5601`. -+ -image:images/Start-Page.png[Kibana start page] -+ -. Specify an index pattern that matches the name of one or more of your Elasticsearch indices. The pattern -can include an asterisk (*) to matches zero or more characters in an index's name. When filling out your -index pattern, any matched indices will be displayed. -. Click *Next Step* to select the index field that contains the timestamp you want to use to perform time-based -comparisons. Kibana reads the index mapping to list all of the fields that contain a timestamp. If your -index doesn't have time-based data, choose *I don't want to use the Time Filter* option. -+ -. Click *Create index pattern* to add the index pattern. This first pattern is automatically configured as the default. -When you have more than one index pattern, you can designate which one to use as the default by clicking -on the star icon above the index pattern title from *Management > Index Patterns*. +* Index logs, metrics, events, or application data by setting up a Beats module. + +* Connect {kib} with existing {es} indices. + +If you're not ready to use your own data, you can add a <> +to see all that you can do in {kib}. + +[float] +[[upload-data-kibana]] +=== Upload a CSV, JSON, or log file + +To visualize data in a CSV, JSON, or log file, you can +upload it using the File Data Visualizer. On the home page, +click *Import a CSV, NDSON, or log file*, and then drag your file into the +File Data Visualizer. + +You can upload a file up to 100 MB. This value is configurable up to 1 GB in +<>. + +[role="screenshot"] +image::images/add-data-fv.png[File Data Visualizer] + +The File Data Visualizer uses the {ref}/ml-find-file-structure.html[find_file_structure API] to analyze +the uploaded file and to suggest ingest pipelines and mappings for your data. + +NOTE: This feature is not intended for use as part of a +repeated production process, but rather for the initial exploration of your data. + +[float] +[[upload-geoipdata-kibana]] +=== Upload geospatial data + +To visualize geospatial data in a point or shape file, you can upload it using the <> +feature in *Elastic Maps*, and then use that data as a layer in a map. +The data is also available for use in the broader Kibana ecosystem, for example, +in visualizations and Canvas workpads. +With GeoJSON Upload, you can upload a file up to 50 MB. + +[role="screenshot"] +image::images/fu_gs_select_source_file_upload.png[] -All done! Kibana is now connected to your Elasticsearch data. Kibana displays a read-only list of fields -configured for the matching index. [float] -[[explore]] -=== Start Exploring your Data! -You're ready to dive in to your data: +[[add-data-tutorial-kibana]] +=== Index metrics, log, security, and application data -* Search and browse your data interactively from the <> page. -* Chart and map your data from the <> page. -* Create and view custom dashboards from the <> page. +The built-in data tutorials can help you quickly get up and running with +metrics data, log analytics, security events, and application data. +These tutorials walk you through installing and configuring a +Beats data shipper to periodically collect and send data to {es}. +You can then use the pre-built dashboards to explore and analyze the data. -For a step-by-step introduction to these core Kibana concepts, see the <> tutorial. +You access the tutorials from the home page. +If a tutorial doesn’t exist for your data, go to the {beats-ref}/beats-reference.html[Beats overview] +to learn about other data shippers in the Beats family. + +[role="screenshot"] +image::images/add-data-tutorials.png[Add Data tutorials] + + +[float] +[[connect-to-es]] +=== Connect with {es} indices + +To visualize data in existing {es} indices, you must +create an index pattern that matches the names of the indices that you want to explore. +When you add data with the File Data Visualizer, GeoJSON Upload feature, +or built-in tutorial, an index pattern is created for you. + +. Go to *Stack Management*, and then click *Index Patterns*. + +. Click *Create index pattern*. + +. Specify an index pattern that matches the name of one or more of your Elasticsearch indices. ++ +For example, an index pattern can point to your Apache data from yesterday, +`filebeat-apache-4-3-2022`, or any index that matches the pattern, `filebeat-*`. +Using a wildcard is the more popular approach. + + +. Click *Next Step*, and then select the index field that contains the timestamp you want to use to perform time-based +comparisons. ++ +Kibana reads the index mapping and lists all fields that contain a timestamp. If your +index doesn't have time-based data, choose *I don't want to use the Time Filter*. ++ +You must select a time field to use global time filters on your dashboards. + +. Click *Create index pattern*. ++ +{kib} is now configured to access your {es} indices. +You’ll see a list of fields configured for the matching index. +You can designate your index pattern as the default by clicking the star icon on this page. ++ +When searching in *Discover* and creating visualizations, you choose a pattern +from the index pattern menu to specify the {es} indices that contain the data you want to explore. diff --git a/docs/uptime/alerting.asciidoc b/docs/uptime-guide/alerting.asciidoc similarity index 71% rename from docs/uptime/alerting.asciidoc rename to docs/uptime-guide/alerting.asciidoc index 24f7628e960f9..bf9e7693fc7a5 100644 --- a/docs/uptime/alerting.asciidoc +++ b/docs/uptime-guide/alerting.asciidoc @@ -1,14 +1,17 @@ [role="xpack"] [[uptime-alerting]] -== Uptime alerting +=== Uptime alerting The Uptime app integrates with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] feature. It provides a set of built-in actions and Uptime specific threshold alerts for you to use -and enables central management of all alerts from <>. +and enables central management of all alerts from {kibana-ref}/management.html[Kibana Management]. + +[role="screenshot"] +image::images/create-alert.png[Create alert] [float] -=== Monitor status alerts +==== Monitor status alerts To receive alerts when a monitor goes down, use the alerting menu at the top of the overview page. Use a query in the alert flyout to determine which monitors to check @@ -16,10 +19,10 @@ with your alert. If you already have a query in the overview page search bar it be carried over into this box. [role="screenshot"] -image::uptime/images/monitor-status-alert-flyout.png[Create monitor status alert flyout] +image::images/monitor-status-alert.png[Create monitor status alert flyout] [float] -=== TLS alerts +==== TLS alerts Uptime also provides the ability to create an alert that will notify you when one or more of your monitors have a TLS certificate that will expire within some threshold, @@ -27,4 +30,4 @@ or when its age exceeds a limit. The values for these thresholds are configurabl the <>. [role="screenshot"] -image::uptime/images/tls-alert-flyout.png[Create TLS alert flyout] +image::images/tls-alert.png[Create TLS alert flyout] diff --git a/docs/uptime-guide/app-overview.asciidoc b/docs/uptime-guide/app-overview.asciidoc new file mode 100644 index 0000000000000..692489a7ad311 --- /dev/null +++ b/docs/uptime-guide/app-overview.asciidoc @@ -0,0 +1,70 @@ +[role="xpack"] +[[uptime-app]] +== Uptime app + +The Uptime app in {kib} enables you to monitor the status of network endpoints via HTTP/S, TCP, and ICMP. +You can explore endpoint status over time, drill down into specific monitors, +and view a high-level snapshot of your environment at any point in time. + +[role="screenshot"] +image::images/uptime-overview.png[Uptime app overview] + +[role="xpack"] +[[uptime-app-overview]] +=== Overview + +The Uptime overview helps you quickly identify and diagnose outages and +other connectivity issues within your network or environment. You can use the date range +selection that is global to the Uptime app, to highlight +an absolute date range, or a relative one, similar to other areas of {kib}. + +[float] +=== Filter bar + +The Filter bar enables you to quickly view specific groups of monitors, or even +an individual monitor if you have defined many. + +This control allows you to use automated filter options, as well as input custom filter +text to select specific monitors by field, URL, ID, and other attributes. + +[role="screenshot"] +image::images/filter-bar.png[Filter bar] + +[float] +=== Snapshot panel + +The Snapshot panel displays the overall +status of the environment you're monitoring or a subset of those monitors. +You can see the total number of detected monitors within the selected +Uptime date range, along with the number of monitors +in an `up` or `down` state, which is based on the last check reported by Heartbeat +for each monitor. + +Next to the counts, there is a histogram displaying the change over time throughout the +selected date range. + +[role="screenshot"] +image::images/snapshot-view.png[Snapshot view] + +[float] +=== Monitor list + +Information about individual monitors is displayed in the monitor list and provides a quick +way to navigate to a more in-depth visualization for interesting hosts or endpoints. + +The information displayed includes the recent status of a host or endpoint, when the monitor was last checked, its +ID and URL, and its IP address. There is also sparkline showing its check status over time. + +[role="screenshot"] +image::images/monitor-list.png[Monitor list] + +[float] +=== Observability integrations + +The Monitor list also contains a menu of available integrations. When Uptime detects Kubernetes or +Docker related host information, it provides links to open the Metrics app or Logs app pre-filtered +for this host. Additionally, to help you quickly determine if these solutions contain data relevant to you, +this feature contains links to filter the other views on the host's IP address. + +[role="screenshot"] +image::images/observability_integrations.png[Observability integrations] diff --git a/docs/uptime/certificates.asciidoc b/docs/uptime-guide/certificates.asciidoc similarity index 59% rename from docs/uptime/certificates.asciidoc rename to docs/uptime-guide/certificates.asciidoc index cc604d7196648..58db91aa080eb 100644 --- a/docs/uptime/certificates.asciidoc +++ b/docs/uptime-guide/certificates.asciidoc @@ -1,15 +1,15 @@ [role="xpack"] [[uptime-certificates]] -== Certificates +=== Certificates -[role="screenshot"] -image::uptime/images/certificates-page.png[Certificates] - -The certificates page allows you to visualize TLS certificate data in your indices. In addition to the +The certificates page enables you to visualize TLS certificate data in your indices. In addition to the common name, associated monitors, issuer information, and SHA fingerprints, Uptime also assigns a status derived from the threshold values in the <>. Several of the columns on this page are sortable. You can use the search bar at the top of the view -to find values in most of the TLS-related fields in your Uptime indices. Additionally, you can -create a TLS alert using the `Alerts` dropdown at the top of the page. +to find values in most of the TLS-related fields in your Uptime indices. Additionally, using the `Alerts` +dropdown at the top of the page you can create a TLS alert. + +[role="screenshot"] +image::images/certificates-page.png[Certificates] diff --git a/docs/uptime-guide/deployment-arch.asciidoc b/docs/uptime-guide/deployment-arch.asciidoc index d8edf290b9a5e..c1b2f596c6665 100644 --- a/docs/uptime-guide/deployment-arch.asciidoc +++ b/docs/uptime-guide/deployment-arch.asciidoc @@ -4,22 +4,24 @@ There are multiple ways to deploy Uptime and Heartbeat. Use the information in this section to determine the best deployment for you. -A guiding principle is that an outage that takes down the service being monitored should not also take down Heartbeat. -You want Heartbeat to be functioning even when your service is not, so the guidelines here help you maximise this possibility. +A guiding principle is that when an outage takes down the service being monitored it should not also take down Heartbeat. +You want Heartbeat to be functioning even when your service is not, so the guidelines here help you maximize this possibility. -Heartbeat is generally run as a centralized service within a data center. +Heartbeat is commonly run as a centralized service within a data center. While it is possible to run it as a separate "sidecar" process paired with each process/container, we recommend against it. Running Heartbeat centrally ensures you will still be able to see monitoring data in the event of an overloaded, disconnected, or otherwise malfunctioning server. -For further redundancy, you may want to deploy multiple Heartbeats across geographic and/or network boundaries to provide more data. - Specify Heartbeat's observer {heartbeat-ref}/configuration-observer-options.html[geo options] to do so. Some examples might be: +For further redundancy, you may want to deploy multiple Heartbeats across geographic and network boundaries to provide more data. +To do so, specify Heartbeat's observer {heartbeat-ref}/configuration-observer-options.html[geo options]. + +Some examples might be: * **A site served from a content delivery network (CDN) with points of presence (POPs) around the globe:** -In this case you may want to have multiple Heartbeat instances at different data centers around the world checking to see if your site is reachable via local CDN POPs. +To check if your site is reachable via CDN POPS, you may want to have multiple Heartbeat instances at different data centers around the world. * **A service within a single data center that is accessed across multiple VPNs:** Set up one Heartbeat instance within the VPN the service operates from, and another within an additional VPN that users access the service from. -Having both instances will help pinpoint network errors in the event of an outage. +Having both instances helps pinpoint network errors in the event of an outage. * **A single service running primarily in a US east coast data center, with a hot failover located in a US west coast data center:** In each data center, run a Heartbeat instance that checks both the local copy of the service and its counterpart across the country. Set up two monitors in each region, one for the local service and one for the remote service. -In the event of a data center failure it will be immediately obvious if the service had a connectivity issue to the outside world or if the failure was only internal. +In the event of a data center failure it will be immediately apparent if the service had a connectivity issue to the outside world or if the failure was only internal. diff --git a/docs/uptime-guide/images/cert-exp.png b/docs/uptime-guide/images/cert-exp.png new file mode 100644 index 0000000000000..cd87668db96dd Binary files /dev/null and b/docs/uptime-guide/images/cert-exp.png differ diff --git a/docs/uptime/images/certificates-page.png b/docs/uptime-guide/images/certificates-page.png similarity index 100% rename from docs/uptime/images/certificates-page.png rename to docs/uptime-guide/images/certificates-page.png diff --git a/docs/uptime/images/check-history.png b/docs/uptime-guide/images/check-history.png similarity index 100% rename from docs/uptime/images/check-history.png rename to docs/uptime-guide/images/check-history.png diff --git a/docs/uptime-guide/images/create-alert.png b/docs/uptime-guide/images/create-alert.png new file mode 100644 index 0000000000000..54a0c400cad4c Binary files /dev/null and b/docs/uptime-guide/images/create-alert.png differ diff --git a/docs/uptime/images/crosshair-example.png b/docs/uptime-guide/images/crosshair-example.png similarity index 100% rename from docs/uptime/images/crosshair-example.png rename to docs/uptime-guide/images/crosshair-example.png diff --git a/docs/uptime/images/filter-bar.png b/docs/uptime-guide/images/filter-bar.png similarity index 100% rename from docs/uptime/images/filter-bar.png rename to docs/uptime-guide/images/filter-bar.png diff --git a/docs/uptime-guide/images/indices.png b/docs/uptime-guide/images/indices.png new file mode 100644 index 0000000000000..4090747b6726c Binary files /dev/null and b/docs/uptime-guide/images/indices.png differ diff --git a/docs/uptime/images/monitor-charts.png b/docs/uptime-guide/images/monitor-charts.png similarity index 100% rename from docs/uptime/images/monitor-charts.png rename to docs/uptime-guide/images/monitor-charts.png diff --git a/docs/uptime/images/monitor-list.png b/docs/uptime-guide/images/monitor-list.png similarity index 100% rename from docs/uptime/images/monitor-list.png rename to docs/uptime-guide/images/monitor-list.png diff --git a/docs/uptime-guide/images/monitor-status-alert.png b/docs/uptime-guide/images/monitor-status-alert.png new file mode 100644 index 0000000000000..847a0f58f02ce Binary files /dev/null and b/docs/uptime-guide/images/monitor-status-alert.png differ diff --git a/docs/uptime/images/observability_integrations.png b/docs/uptime-guide/images/observability_integrations.png similarity index 100% rename from docs/uptime/images/observability_integrations.png rename to docs/uptime-guide/images/observability_integrations.png diff --git a/docs/uptime/images/settings.png b/docs/uptime-guide/images/settings.png similarity index 100% rename from docs/uptime/images/settings.png rename to docs/uptime-guide/images/settings.png diff --git a/docs/uptime/images/snapshot-view.png b/docs/uptime-guide/images/snapshot-view.png similarity index 100% rename from docs/uptime/images/snapshot-view.png rename to docs/uptime-guide/images/snapshot-view.png diff --git a/docs/uptime/images/status-bar.png b/docs/uptime-guide/images/status-bar.png similarity index 100% rename from docs/uptime/images/status-bar.png rename to docs/uptime-guide/images/status-bar.png diff --git a/docs/uptime-guide/images/tls-alert.png b/docs/uptime-guide/images/tls-alert.png new file mode 100644 index 0000000000000..19efe07838903 Binary files /dev/null and b/docs/uptime-guide/images/tls-alert.png differ diff --git a/docs/uptime-guide/images/uptime-overview.png b/docs/uptime-guide/images/uptime-overview.png new file mode 100644 index 0000000000000..25c88b2d14287 Binary files /dev/null and b/docs/uptime-guide/images/uptime-overview.png differ diff --git a/docs/uptime-guide/index.asciidoc b/docs/uptime-guide/index.asciidoc index 09763182fa88f..01a93cb454ea9 100644 --- a/docs/uptime-guide/index.asciidoc +++ b/docs/uptime-guide/index.asciidoc @@ -1,5 +1,3 @@ -// short-version can be: 8, 7, 6, etc. -:short-version: 8 include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] include::{asciidoc-dir}/../../shared/attributes.asciidoc[] @@ -12,3 +10,13 @@ include::install.asciidoc[] include::deployment-arch.asciidoc[] +include::app-overview.asciidoc[] + +include::monitor.asciidoc[] + +include::settings.asciidoc[] + +include::certificates.asciidoc[] + +include::alerting.asciidoc[] + diff --git a/docs/uptime-guide/install.asciidoc b/docs/uptime-guide/install.asciidoc index 0ed1270ca92ce..05b9c6665562f 100644 --- a/docs/uptime-guide/install.asciidoc +++ b/docs/uptime-guide/install.asciidoc @@ -29,7 +29,7 @@ first see the https://www.elastic.co/support/matrix[Elastic Support Matrix] for [[install-elasticsearch]] === Step 1: Install Elasticsearch -Install an Elasticsearch cluster, start it up, and make sure it's running. +Install an {es} cluster, start it up, and make sure it's running. . Verify that your system meets the https://www.elastic.co/support/matrix#matrix_jvm[minimum JVM requirements] for {es}. @@ -39,7 +39,7 @@ https://www.elastic.co/support/matrix#matrix_jvm[minimum JVM requirements] for { [[install-kibana]] === Step 2: Install Kibana -Install Kibana, start it up, and open up the web interface: +Install {kib}, start it up, and open up the web interface: . {stack-gs}/get-started-elastic-stack.html#install-kibana[Install Kibana]. . {stack-gs}/get-started-elastic-stack.html#_launch_the_kibana_web_interface[Launch the Kibana Web Interface]. @@ -48,27 +48,27 @@ Install Kibana, start it up, and open up the web interface: === Step 3: Install and configure Heartbeat Uptime requires the setup of monitors in Heartbeat. -These monitors provide the data you'll be visualizing in the {kibana-ref}/xpack-uptime.html[Uptime UI]. +These monitors provide the data you'll be visualizing in the {kibana-ref}/xpack-uptime.html[Uptime app]. -See the *Setup Instructions* in Kibana for instructions on installing and configuring Heartbeat. +For instructions on installing and configuring Heartbeat, see the *Setup Instructions* in {kib}. Additional information is available in {heartbeat-ref}/heartbeat-configuration.html[Configure Heartbeat]. [role="screenshot"] image::images/uptime-setup.png[Installation instructions on the Uptime page in Kibana] [[setup-security]] -=== Step 4: Setup Security +=== Step 4: Set up Security Secure your installation by following the {heartbeat-ref}/securing-heartbeat.html[Secure Heartbeat] documentation. [float] ==== Important considerations -* Make sure you're using the same major versions of Heartbeat and Kibana. +* Make sure you're using the same major versions of Heartbeat and {kib}. -* Index patterns tell Kibana which Elasticsearch indices you want to explore. -The Uptime UI requires a +heartbeat-{short-version}*+ index pattern. -If you have configured a different index pattern, you can use {ref}/indices-aliases.html[index aliases] to ensure data is recognized by the UI. +* Index patterns tell {kib} which {es} indices you want to explore. +The Uptime app requires a +heartbeat-{major-version-only}*+ index pattern. +If you have configured a different index pattern, you can use {ref}/indices-aliases.html[index aliases] to ensure data is recognized by the Uptime app. After you install and configure Heartbeat, -the {kibana-ref}/xpack-uptime.html[Uptime UI] will automatically populate with the Heartbeat monitors. +the {kibana-ref}/xpack-uptime.html[Uptime app] is automatically populated with the Heartbeat monitors. diff --git a/docs/uptime-guide/monitor.asciidoc b/docs/uptime-guide/monitor.asciidoc new file mode 100644 index 0000000000000..bb5d315cf63eb --- /dev/null +++ b/docs/uptime-guide/monitor.asciidoc @@ -0,0 +1,59 @@ +[role="xpack"] +[[uptime-monitor]] +=== Monitor + +The Monitor page helps you gain insights into the performance +of a specific network endpoint. A detailed visualization of +the monitor's request duration over time, as well as the `up`/`down` +status over time, is displayed. By configuring Machine Learning jobs +on this page, you can also also detect anomalies in response time data. + + +==== Status panel + +The Status panel displays a quick summary of the latest information +regarding your monitor. You can view its latest status, click a link to +visit the targeted URL, see its most recent request duration, and determine the +amount of time that has elapsed since the last check. + +When two Heartbeat instances are configured in different geographic locations +the map will show each location as a pinpoint on the map, along with the +amount of time elapsed since data was last received from that location. + +[role="screenshot"] +image::images/status-bar.png[Status bar] + + +[float] +==== Monitor charts + +The Monitor charts visualize information over the time specified in the +date range. These charts help you gain insights into how quickly requests are being resolved +by the targeted endpoint, and give you a sense of how frequently a host or endpoint +was down in your selected timespan. + +[role="screenshot"] +image::images/monitor-charts.png[Monitor charts] + +The Monitor duration chart displays request duration information for your monitor. +The area surrounding the line is the range of request time for the corresponding +bucket. The line is the average time. In the upper right hand of this panel +you can enable Anomaly detection using Machine Learning. When response times change +in an unexpected way the time range in which they occurred are highlighted with a color. + +The pings over time chart is a graphical representation of the check statuses over time. +Hover over the charts to display crosshairs with specific numeric data. + +[role="screenshot"] +image::images/crosshair-example.png[Chart crosshair] + +[float] +==== Check history + +The Check history table lists the total count of this monitor's checks for the selected +date range. To help find recent problems on a per-check basis, you can filter the checks +by status and location. This table can help you gain some insight into more granular details +about recent individual data points that Heartbeat is logging about your host or endpoint. + +[role="screenshot"] +image::images/check-history.png[Check history view] diff --git a/docs/uptime-guide/overview.asciidoc b/docs/uptime-guide/overview.asciidoc index c6bd71b1f5574..ab230b27f8cda 100644 --- a/docs/uptime-guide/overview.asciidoc +++ b/docs/uptime-guide/overview.asciidoc @@ -2,10 +2,14 @@ [[uptime-overview]] == Elastic Uptime overview -Elastic Uptime allows you to monitor the availability and response times of applications and services in real time and to detect problems before they affect users. +++++ +Overview +++++ -Elastic Uptime can help you to understand uptime and response time characteristics for your services and applications. -It can be deployed both inside and outside your organization's network, so you can analyze problems from multiple vantage points. +Elastic Uptime enables you to monitor the availability and response times of applications and services in real time and to detect problems before they affect users. + +Elastic Uptime helps you to understand uptime and response time characteristics for your services and applications. +It can be deployed both inside and outside your organization's network, so that you can analyze problems from multiple vantage points. Elastic Uptime uses these components: *Heartbeat*, *Elasticsearch* and *Kibana*. @@ -37,13 +41,11 @@ The {kibana-ref}/xpack-uptime.html[Elasticsearch Uptime app] in Kibana provides // ++ In diagram, should be Uptime app, not Uptime UI, possibly even Elastic Uptime? Also applies to Metrics/Logging/APM. // ++ Need more whitespace around components. -image::images/uptime-simple-deployment.png[Uptime simple deployment] - In this simple deployment, a single instance of Heartbeat is deployed at a single monitoring location to monitor a single service. The Heartbeat instance sends the monitoring data to Elasticsearch. Then you can use the Uptime app in Kibana to view the data from Heartbeat and determine the status of the service. -image::images/uptime-multi-deployment.png[Uptime multiple server deployment] +image::images/uptime-simple-deployment.png[Uptime simple deployment] In this deployment, two instances of Heartbeat are deployed at two different monitoring locations. Both instances monitor the same service. @@ -51,3 +53,5 @@ The Heartbeat instances send the monitoring data to Elasticsearch. As before, you can use the Uptime app in Kibana to view the Heartbeat data and determine the status of the service. When a failure occurs, the multiple monitoring locations enable you to pinpoint the area in which the failure has occurred. +image::images/uptime-multi-deployment.png[Uptime multiple server deployment] + diff --git a/docs/uptime/settings.asciidoc b/docs/uptime-guide/settings.asciidoc similarity index 66% rename from docs/uptime/settings.asciidoc rename to docs/uptime-guide/settings.asciidoc index 131772609cb59..59f9af631bfa7 100644 --- a/docs/uptime/settings.asciidoc +++ b/docs/uptime-guide/settings.asciidoc @@ -1,40 +1,40 @@ [role="xpack"] [[uptime-settings]] -== Settings - -[role="screenshot"] -image::uptime/images/settings.png[Settings page] - -=== Indices +=== Settings The Uptime settings page lets you change which Heartbeat indices are displayed by the uptime app. Users must have the 'all' permission to modify items on this page. Uptime settings apply to the current space only. Use different settings in different spaces to segment different uptime use cases and domains. -As an example, imagine your organization has one team for internal IT services, and another +==== Indices + +Imagine your organization has one team for internal IT services, and another for public services. Each team operates independently and is only responsible for its own services. In this scenario, you might set up separate Heartbeat instances for each team, writing out to index patterns named `it-heartbeat-\*`, and `external-heartbeat-\*`. You would create separate roles and users for each in Elasticsearch, each with access to their own spaces, named `it` and `external` respectively. Within each space you would navigate to the settings page -and set the correct index pattern to match only the indices that space is allowed to access. +and set the correct index pattern to match only the indices that space is allowed to access. -Note that the pattern set here only restricts what the Uptime app shows. Users may still be able -to manually query Elasticsearch for data outside this pattern! +Note: The pattern set here only restricts what the Uptime app shows. Users may still be able +to manually query Elasticsearch for data outside this pattern. -See the <> -and {heartbeat-ref}/securing-heartbeat.html[Heartbeat security] +[role="screenshot"] +image::images/indices.png[Heartbeat indices] + +See the {kibana-ref}/uptime-security.html[Uptime security] and {heartbeat-ref}/securing-heartbeat.html[Heartbeat security] docs for more information. -=== Certificate thresholds +==== Certificate thresholds -You can modify settings in this section to control how Uptime will visualize your TLS values in the Certificates page. -These settings also determine which certificates will be selected by any TLS alert you define. +You can modify settings in this section to control how Uptime will visualize your TLS values in +the <>. These settings also determine which certificates will be +selected by any TLS alert you define. There are two fields, `age` and `expiration`. Use the `age` threshold to specify when Uptime should warn -you about certificates that have been valid for too long. Use the `expiration` threshold to make Uptime warn you +you about certificates that have been valid for too long. Use the `expiration` threshold to specify when Uptime should warn you about certificates that have approaching expiration dates. For example, a common security requirement is to make sure that none of your organization's TLS certificates have been @@ -43,6 +43,9 @@ certificates you may want to refresh. Likewise, to see which of your TLS certificates are close to expiring ahead of time, specify an `Expiration threshold` on this page. When the count of a certificate's remaining valid days falls -below this threshold, Uptime will consider it in a warning state. If you have defined a TLS alert, you will -receive a notification from Uptime about the certificate. +below this threshold, Uptime will consider it in a warning state. When you define a TLS alert, you receive a +notification from Uptime about the certificate. + +[role="screenshot"] +image::images/cert-exp.png[Certification expiration thresholds] diff --git a/docs/uptime/images/monitor-status-alert-flyout.png b/docs/uptime/images/monitor-status-alert-flyout.png deleted file mode 100644 index 407e69fc5e86e..0000000000000 Binary files a/docs/uptime/images/monitor-status-alert-flyout.png and /dev/null differ diff --git a/docs/uptime/images/tls-alert-flyout.png b/docs/uptime/images/tls-alert-flyout.png deleted file mode 100644 index 07c725c858a00..0000000000000 Binary files a/docs/uptime/images/tls-alert-flyout.png and /dev/null differ diff --git a/docs/uptime/images/uptime-overview.png b/docs/uptime/images/uptime-overview.png new file mode 100644 index 0000000000000..25c88b2d14287 Binary files /dev/null and b/docs/uptime/images/uptime-overview.png differ diff --git a/docs/uptime/index.asciidoc b/docs/uptime/index.asciidoc index c44ef366eaaa4..66c9e9357420f 100644 --- a/docs/uptime/index.asciidoc +++ b/docs/uptime/index.asciidoc @@ -1,25 +1,19 @@ +[chapter] [role="xpack"] [[xpack-uptime]] = Uptime -[partintro] --- -Uptime allows you to monitor the status of network endpoints via HTTP/S, TCP, and ICMP. +The Uptime app in {kib} enables you to monitor the status of network endpoints via HTTP/S, TCP, and ICMP. You can explore endpoint status over time, drill down into specific monitors, -and easily view a high-level snapshot of your environment at any point in time. +and view a high-level snapshot of your environment at any point in time. + +[role="screenshot"] +image::images/uptime-overview.png[Uptime app overview] + +[float] +=== Get started To get started with Elastic Uptime, refer to {uptime-guide}/install-uptime.html[Install Uptime]. -* <> -* <> -* <> -* <> -* <> --- -include::overview.asciidoc[] -include::monitor.asciidoc[] -include::settings.asciidoc[] -include::certificates.asciidoc[] -include::alerting.asciidoc[] diff --git a/docs/uptime/monitor.asciidoc b/docs/uptime/monitor.asciidoc deleted file mode 100644 index 8a4be1f11a721..0000000000000 --- a/docs/uptime/monitor.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[role="xpack"] -[[uptime-monitor]] -== Monitor - -The Monitor page will help you get further insight into the performance -of a specific network endpoint. You'll see a detailed visualization of -the monitor's request duration over time, as well as the `up`/`down` -status over time. You can also also detect anomalies in response time data -by configuring Machine Learning jobs on this page. - -[float] -=== Status panel - -[role="screenshot"] -image::uptime/images/status-bar.png[Status bar] - -The Status panel displays a quick summary of the latest information -regarding your monitor. You can view its latest status, click a link to -visit the targeted URL, see its most recent request duration, and determine the -amount of time that has elapsed since the last check. - -When two Heartbeat instances are configured in different geographic locations -the map will show each location as a pinpoint on the map, along with the -amount of time elapsed since data was last received from that location. - - -[float] -=== Monitor charts - -[role="screenshot"] -image::uptime/images/monitor-charts.png[Monitor charts] - -The Monitor charts visualize information over the time specified in the -date range. These charts can help you gain insight into how quickly requests are being resolved -by the targeted endpoint, and give you a sense of how frequently a host or endpoint -was down in your selected timespan. - -The Monitor duration chart displays request duration information for your monitor. -The area surrounding the line is the range of request time for the corresponding -bucket. The line is the average time. Anomaly detection using Machine Learning -can be configured in the upper right hand of this panel. When response times change -in an unexpected way the time range in which they occurred will be given filled with a color. - -The pings over time chart is a graphical representation of the check statuses over time. -Hover over the charts to display crosshairs with more specific numeric data. - -[role="screenshot"] -image::uptime/images/crosshair-example.png[Chart crosshair] - -[float] -=== Check history - -[role="screenshot"] -image::uptime/images/check-history.png[Check history view] - -The Check history displays the total count of this monitor's checks for the selected -date range. You can additionally filter the checks by status and location to help find recent problems -on a per-check basis. This table can help you gain some insight into more granular details -about recent individual data points Heartbeat is logging about your host or endpoint. diff --git a/docs/uptime/overview.asciidoc b/docs/uptime/overview.asciidoc deleted file mode 100644 index b449beddd240c..0000000000000 --- a/docs/uptime/overview.asciidoc +++ /dev/null @@ -1,62 +0,0 @@ -[role="xpack"] -[[uptime-overview]] - -== Overview - -The Uptime overview is intended to help you quickly identify and diagnose outages and -other connectivity issues within your network or environment. There is a date range -selection that is global to the Uptime UI; you can use this selection to highlight -an absolute date range, or a relative one, similar to other areas of Kibana. - -[float] -=== Filter bar - -[role="screenshot"] -image::uptime/images/filter-bar.png[Filter bar] - -The filter bar is designed to let you quickly view specific groups of monitors, or even -an individual monitor, if you have defined many. - -This control allows you to use automated filter options, as well as input custom filter -text to select specific monitors by field, URL, ID, and other attributes. - -[float] -=== Snapshot panel - -[role="screenshot"] -image::uptime/images/snapshot-view.png[Snapshot view] - -This panel is intended to quickly give you a sense of the overall -status of the environment you're monitoring, or a subset of those monitors. -Here, you can see the total number of detected monitors within the selected -Uptime date range. In addition to the total, the counts for the number of monitors -in an `up` or `down` state are displayed, based on the last check reported by Heartbeat -for each monitor. - -Next to the counts, there is a histogram displaying the change over time throughout the -selected date range. - -[float] -=== Monitor list - -[role="screenshot"] -image::uptime/images/monitor-list.png[Monitor list] - -The Monitor list displays information at the level of individual monitors. -The data shown here will flesh out your individual monitors, and provide a quick -way to navigate to a more in-depth visualization for interesting hosts or endpoints. - -This table includes information like the most recent status, when the monitor was last checked, its -ID and URL, its IP address, and a dedicated sparkline showing its check status over time. - -[float] -=== Observability integrations - -[role="screenshot"] -image::uptime/images/observability_integrations.png[Observability integrations] - -The Monitor list also contains a menu of possible integrations. If Uptime detects Kubernetes or -Docker related host information, it will provide links to open the Metrics app or Logs app pre-filtered -for this host. Additionally, this feature supplies links to simply filter the other views on the host's -IP address, to help you quickly determine if these other solutions contain data relevant to your current -interest. diff --git a/package.json b/package.json index 1201a1773e6cd..0873ab8c158e1 100644 --- a/package.json +++ b/package.json @@ -429,7 +429,7 @@ "eslint-plugin-prefer-object-spread": "^1.2.1", "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-react": "^7.17.0", - "eslint-plugin-react-hooks": "^2.3.0", + "eslint-plugin-react-hooks": "^4.0.4", "eslint-plugin-react-perf": "^3.2.3", "exit-hook": "^2.2.0", "faker": "1.1.0", @@ -504,7 +504,7 @@ "zlib": "^1.0.5" }, "engines": { - "node": "10.19.0", + "node": "10.21.0", "yarn": "^1.21.1" } } diff --git a/packages/eslint-config-kibana/.eslintrc.js b/packages/eslint-config-kibana/.eslintrc.js index 747c2c14ab25e..c0f8bf0ecb508 100644 --- a/packages/eslint-config-kibana/.eslintrc.js +++ b/packages/eslint-config-kibana/.eslintrc.js @@ -56,6 +56,15 @@ module.exports = { from: 'react-router', to: 'react-router-dom', }, + { + from: '@kbn/ui-shared-deps/monaco', + to: '@kbn/monaco', + }, + { + from: 'monaco-editor', + to: false, + disallowedMessage: `Don't import monaco directly, use or add exports to @kbn/monaco` + }, ], ], }, diff --git a/packages/kbn-config-schema/package.json b/packages/kbn-config-schema/package.json index 71c0ae4bff1f9..06342127b0d89 100644 --- a/packages/kbn-config-schema/package.json +++ b/packages/kbn-config-schema/package.json @@ -10,7 +10,8 @@ "kbn:bootstrap": "yarn build" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.7.2", + "tsd": "^0.7.4" }, "peerDependencies": { "joi": "^13.5.2", diff --git a/packages/kbn-config-schema/src/index.ts b/packages/kbn-config-schema/src/index.ts index 5d387f327e58f..2319fe4395e3f 100644 --- a/packages/kbn-config-schema/src/index.ts +++ b/packages/kbn-config-schema/src/index.ts @@ -44,6 +44,7 @@ import { ObjectType, ObjectTypeOptions, Props, + NullableProps, RecordOfOptions, RecordOfType, StringOptions, @@ -57,7 +58,7 @@ import { StreamType, } from './types'; -export { ObjectType, TypeOf, Type }; +export { ObjectType, TypeOf, Type, Props, NullableProps }; export { ByteSizeValue } from './byte_size_value'; export { SchemaTypeError, ValidationError } from './errors'; export { isConfigSchema } from './typeguards'; diff --git a/packages/kbn-config-schema/src/types/index.ts b/packages/kbn-config-schema/src/types/index.ts index 9db79b8bf9e00..c7900e1923e78 100644 --- a/packages/kbn-config-schema/src/types/index.ts +++ b/packages/kbn-config-schema/src/types/index.ts @@ -29,7 +29,7 @@ export { LiteralType } from './literal_type'; export { MaybeType } from './maybe_type'; export { MapOfOptions, MapOfType } from './map_type'; export { NumberOptions, NumberType } from './number_type'; -export { ObjectType, ObjectTypeOptions, Props, TypeOf } from './object_type'; +export { ObjectType, ObjectTypeOptions, Props, NullableProps, TypeOf } from './object_type'; export { RecordOfOptions, RecordOfType } from './record_type'; export { StreamType } from './stream_type'; export { StringOptions, StringType } from './string_type'; diff --git a/packages/kbn-config-schema/src/types/object_type.test.ts b/packages/kbn-config-schema/src/types/object_type.test.ts index 5ab59d1c02077..334e814aa52e4 100644 --- a/packages/kbn-config-schema/src/types/object_type.test.ts +++ b/packages/kbn-config-schema/src/types/object_type.test.ts @@ -17,6 +17,7 @@ * under the License. */ +import { expectType } from 'tsd'; import { schema } from '..'; import { TypeOf } from './object_type'; @@ -360,17 +361,142 @@ test('handles optional properties', () => { type SchemaType = TypeOf; - let foo: SchemaType = { + expectType({ required: 'foo', - }; - foo = { + }); + expectType({ required: 'hello', optional: undefined, - }; - foo = { + }); + expectType({ required: 'hello', optional: 'bar', - }; + }); +}); + +describe('#extends', () => { + it('allows to extend an existing schema by adding new properties', () => { + const origin = schema.object({ + initial: schema.string(), + }); + + const extended = origin.extends({ + added: schema.number(), + }); + + expect(() => { + extended.validate({ initial: 'foo' }); + }).toThrowErrorMatchingInlineSnapshot( + `"[added]: expected value of type [number] but got [undefined]"` + ); + + expect(() => { + extended.validate({ initial: 'foo', added: 42 }); + }).not.toThrowError(); - expect(foo).toBeDefined(); + expectType>({ + added: 12, + initial: 'foo', + }); + }); + + it('allows to extend an existing schema by removing properties', () => { + const origin = schema.object({ + string: schema.string(), + number: schema.number(), + }); + + const extended = origin.extends({ number: undefined }); + + expect(() => { + extended.validate({ string: 'foo', number: 12 }); + }).toThrowErrorMatchingInlineSnapshot(`"[number]: definition for this key is missing"`); + + expect(() => { + extended.validate({ string: 'foo' }); + }).not.toThrowError(); + + expectType>({ + string: 'foo', + }); + }); + + it('allows to extend an existing schema by overriding an existing properties', () => { + const origin = schema.object({ + string: schema.string(), + mutated: schema.number(), + }); + + const extended = origin.extends({ + mutated: schema.string(), + }); + + expect(() => { + extended.validate({ string: 'foo', mutated: 12 }); + }).toThrowErrorMatchingInlineSnapshot( + `"[mutated]: expected value of type [string] but got [number]"` + ); + + expect(() => { + extended.validate({ string: 'foo', mutated: 'bar' }); + }).not.toThrowError(); + + expectType>({ + string: 'foo', + mutated: 'bar', + }); + }); + + it('properly infer the type from optional properties', () => { + const origin = schema.object({ + original: schema.maybe(schema.string()), + mutated: schema.maybe(schema.number()), + removed: schema.maybe(schema.string()), + }); + + const extended = origin.extends({ + removed: undefined, + mutated: schema.string(), + }); + + expect(() => { + extended.validate({ original: 'foo' }); + }).toThrowErrorMatchingInlineSnapshot( + `"[mutated]: expected value of type [string] but got [undefined]"` + ); + expect(() => { + extended.validate({ original: 'foo' }); + }).toThrowErrorMatchingInlineSnapshot( + `"[mutated]: expected value of type [string] but got [undefined]"` + ); + expect(() => { + extended.validate({ original: 'foo', mutated: 'bar' }); + }).not.toThrowError(); + + expectType>({ + original: 'foo', + mutated: 'bar', + }); + expectType>({ + mutated: 'bar', + }); + }); + + it(`allows to override the original schema's options`, () => { + const origin = schema.object( + { + initial: schema.string(), + }, + { defaultValue: { initial: 'foo' } } + ); + + const extended = origin.extends( + { + added: schema.number(), + }, + { defaultValue: { initial: 'bar', added: 42 } } + ); + + expect(extended.validate(undefined)).toEqual({ initial: 'bar', added: 42 }); + }); }); diff --git a/packages/kbn-config-schema/src/types/object_type.ts b/packages/kbn-config-schema/src/types/object_type.ts index fee2d02c1bfb9..431b6e905bcd4 100644 --- a/packages/kbn-config-schema/src/types/object_type.ts +++ b/packages/kbn-config-schema/src/types/object_type.ts @@ -24,6 +24,8 @@ import { ValidationError } from '../errors'; export type Props = Record>; +export type NullableProps = Record | undefined | null>; + export type TypeOf> = RT['type']; type OptionalProperties = Pick< @@ -47,6 +49,24 @@ export type ObjectResultType

= Readonly< { [K in keyof RequiredProperties

]: TypeOf } >; +type DefinedProperties = Pick< + Base, + { + [Key in keyof Base]: undefined extends Base[Key] ? never : null extends Base[Key] ? never : Key; + }[keyof Base] +>; + +type ExtendedProps

= Omit & + { [K in keyof DefinedProperties]: NP[K] }; + +type ExtendedObjectType

= ObjectType< + ExtendedProps +>; + +type ExtendedObjectTypeOptions

= ObjectTypeOptions< + ExtendedProps +>; + interface UnknownOptions { /** * Options for dealing with unknown keys: @@ -61,10 +81,13 @@ export type ObjectTypeOptions

= TypeOptions extends Type> { - private props: Record; + private props: P; + private options: ObjectTypeOptions

; + private propSchemas: Record; - constructor(props: P, { unknowns = 'forbid', ...typeOptions }: ObjectTypeOptions

= {}) { + constructor(props: P, options: ObjectTypeOptions

= {}) { const schemaKeys = {} as Record; + const { unknowns = 'forbid', ...typeOptions } = options; for (const [key, value] of Object.entries(props)) { schemaKeys[key] = value.getSchema(); } @@ -77,7 +100,93 @@ export class ObjectType

extends Type> .options({ stripUnknown: { objects: unknowns === 'ignore' } }); super(schema, typeOptions); - this.props = schemaKeys; + this.props = props; + this.propSchemas = schemaKeys; + this.options = options; + } + + /** + * Return a new `ObjectType` instance extended with given `newProps` properties. + * Original properties can be deleted from the copy by passing a `null` or `undefined` value for the key. + * + * @example + * How to add a new key to an object schema + * ```ts + * const origin = schema.object({ + * initial: schema.string(), + * }); + * + * const extended = origin.extends({ + * added: schema.number(), + * }); + * ``` + * + * How to remove an existing key from an object schema + * ```ts + * const origin = schema.object({ + * initial: schema.string(), + * toRemove: schema.number(), + * }); + * + * const extended = origin.extends({ + * toRemove: undefined, + * }); + * ``` + * + * How to override the schema's options + * ```ts + * const origin = schema.object({ + * initial: schema.string(), + * }, { defaultValue: { initial: 'foo' }}); + * + * const extended = origin.extends({ + * added: schema.number(), + * }, { defaultValue: { initial: 'foo', added: 'bar' }}); + * + * @remarks + * `extends` only support extending first-level properties. It's currently not possible to perform deep/nested extensions. + * + * ```ts + * const origin = schema.object({ + * foo: schema.string(), + * nested: schema.object({ + * a: schema.string(), + * b: schema.string(), + * }), + * }); + * + * const extended = origin.extends({ + * nested: schema.object({ + * c: schema.string(), + * }), + * }); + * + * // TypeOf is `{ foo: string; nested: { c: string } }` + * ``` + */ + public extends( + newProps: NP, + newOptions?: ExtendedObjectTypeOptions + ): ExtendedObjectType { + const extendedProps = Object.entries({ + ...this.props, + ...newProps, + }).reduce((memo, [key, value]) => { + if (value !== null && value !== undefined) { + return { + ...memo, + [key]: value, + }; + } + return memo; + }, {} as ExtendedProps); + + const extendedOptions = { + ...this.options, + ...newOptions, + } as ExtendedObjectTypeOptions; + + return new ObjectType(extendedProps, extendedOptions); } protected handleError(type: string, { reason, value }: Record) { @@ -95,10 +204,10 @@ export class ObjectType

extends Type> } validateKey(key: string, value: any) { - if (!this.props[key]) { + if (!this.propSchemas[key]) { throw new Error(`${key} is not a valid part of this schema`); } - const { value: validatedValue, error } = this.props[key].validate(value); + const { value: validatedValue, error } = this.propSchemas[key].validate(value); if (error) { throw new ValidationError(error as any, key); } diff --git a/packages/kbn-monaco/README.md b/packages/kbn-monaco/README.md new file mode 100644 index 0000000000000..c5d7dd7dbfed5 --- /dev/null +++ b/packages/kbn-monaco/README.md @@ -0,0 +1,5 @@ +# @kbn/monaco + +A customized version of monaco that is automatically configured the way we want it to be when imported as `@kbn/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@kbn/ui-shared-deps`. + +Includes custom xjson language support. The `es_ui_shared` plugin has an example of how to use it, in the future we will likely expose helpers from this package to make using it everywhere a little more seamless. \ No newline at end of file diff --git a/packages/kbn-monaco/package.json b/packages/kbn-monaco/package.json new file mode 100644 index 0000000000000..170c014e6e326 --- /dev/null +++ b/packages/kbn-monaco/package.json @@ -0,0 +1,27 @@ +{ + "name": "@kbn/monaco", + "version": "1.0.0", + "private": true, + "main": "./target/index.js", + "license": "Apache-2.0", + "scripts": { + "build": "node ./scripts/build.js", + "kbn:bootstrap": "yarn build --dev" + }, + "dependencies": { + "regenerator-runtime": "^0.13.3", + "monaco-editor": "~0.17.0" + }, + "devDependencies": { + "@kbn/babel-preset": "1.0.0", + "@kbn/dev-utils": "1.0.0", + "babel-loader": "^8.0.6", + "css-loader": "^3.4.2", + "del": "^5.1.0", + "raw-loader": "3.1.0", + "supports-color": "^7.0.0", + "typescript": "3.7.2", + "webpack": "^4.41.5", + "webpack-cli": "^3.3.10" + } +} diff --git a/packages/kbn-monaco/scripts/build.js b/packages/kbn-monaco/scripts/build.js new file mode 100644 index 0000000000000..c5540e3c956c8 --- /dev/null +++ b/packages/kbn-monaco/scripts/build.js @@ -0,0 +1,64 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const path = require('path'); +const del = require('del'); +const supportsColor = require('supports-color'); +const { run } = require('@kbn/dev-utils'); + +const TARGET_BUILD_DIR = path.resolve(__dirname, '../target'); +const ROOT_DIR = path.resolve(__dirname, '../'); +const WEBPACK_CONFIG_PATH = path.resolve(ROOT_DIR, 'webpack.config.js'); + +run( + async ({ procRunner, log, flags }) => { + log.info('Deleting old output'); + + await del(TARGET_BUILD_DIR); + + const cwd = ROOT_DIR; + const env = { ...process.env }; + if (supportsColor.stdout) { + env.FORCE_COLOR = 'true'; + } + + await procRunner.run('worker', { + cmd: 'webpack', + args: ['--config', WEBPACK_CONFIG_PATH, flags.dev ? '--env.dev' : '--env.prod'], + wait: true, + env, + cwd, + }); + + await procRunner.run('tsc ', { + cmd: 'tsc', + args: [], + wait: true, + env, + cwd, + }); + + log.success('Complete'); + }, + { + flags: { + boolean: ['dev'], + }, + } +); diff --git a/packages/kbn-monaco/src/index.ts b/packages/kbn-monaco/src/index.ts new file mode 100644 index 0000000000000..9213a1bfe1327 --- /dev/null +++ b/packages/kbn-monaco/src/index.ts @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { monaco } from './monaco'; +export { XJsonLang } from './xjson'; + +/* eslint-disable-next-line @kbn/eslint/module_migration */ +import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api'; +export { BarePluginApi }; diff --git a/packages/kbn-ui-shared-deps/monaco.ts b/packages/kbn-monaco/src/monaco.ts similarity index 96% rename from packages/kbn-ui-shared-deps/monaco.ts rename to packages/kbn-monaco/src/monaco.ts index 42801c69a3e2c..a40b2212ef0e2 100644 --- a/packages/kbn-ui-shared-deps/monaco.ts +++ b/packages/kbn-monaco/src/monaco.ts @@ -17,6 +17,8 @@ * under the License. */ +/* eslint-disable @kbn/eslint/module_migration */ + import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; import 'monaco-editor/esm/vs/base/common/worker/simpleWorker'; diff --git a/packages/kbn-monaco/src/xjson/README.md b/packages/kbn-monaco/src/xjson/README.md new file mode 100644 index 0000000000000..8652d0bd776d2 --- /dev/null +++ b/packages/kbn-monaco/src/xjson/README.md @@ -0,0 +1,28 @@ +# README + +This folder contains the language definitions for XJSON used by the Monaco editor. + +## Summary of contents + +Note: All source code. + +### ./worker + +The worker proxy and worker instantiation code used in both the main thread and the worker thread. + +### ./lexer_rules + +Contains the Monarch-specific language tokenization rules for XJSON. Each set of rules registers itself against monaco. + +### ./constants.ts + +Contains the unique language ID. + +### ./language + +Takes care of global setup steps for the language (like registering it against Monaco) and exports a way to load up +the grammar parser. + +### ./worker_proxy_service + +A stateful mechanism for holding a reference to the Monaco-provided proxy getter. diff --git a/packages/kbn-monaco/src/xjson/constants.ts b/packages/kbn-monaco/src/xjson/constants.ts new file mode 100644 index 0000000000000..dc107abff4ffe --- /dev/null +++ b/packages/kbn-monaco/src/xjson/constants.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const ID = 'xjson'; diff --git a/packages/kbn-monaco/src/xjson/grammar.ts b/packages/kbn-monaco/src/xjson/grammar.ts new file mode 100644 index 0000000000000..e95059f9ece2d --- /dev/null +++ b/packages/kbn-monaco/src/xjson/grammar.ts @@ -0,0 +1,213 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export enum AnnoTypes { + error = 'error', + warning = 'warning', +} + +/* eslint-disable */ + +export const createParser = () => { + 'use strict'; + let at: any, + annos: any[], // annotations + ch: any, + text: any, + value: any, + escapee: any = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: ' ', + }, + error = function (m: string) { + throw { + at: at, + text: m, + message: m, + }; + }, + warning = function (m: string, idx: number) { + annos.push({ + type: AnnoTypes.warning, + at: idx, + text: m, + }); + }, + reset = function (newAt: number) { + ch = text.charAt(newAt); + at = newAt + 1; + }, + next = function (c?: string) { + return ( + c && c !== ch && error("Expected '" + c + "' instead of '" + ch + "'"), + (ch = text.charAt(at)), + (at += 1), + ch + ); + }, + nextUpTo = function (upTo: any, errorMessage: string) { + let currentAt = at, + i = text.indexOf(upTo, currentAt); + if (i < 0) { + error(errorMessage || "Expected '" + upTo + "'"); + } + reset(i + upTo.length); + return text.substring(currentAt, i); + }, + peek = function (c: string) { + return text.substr(at, c.length) === c; // nocommit - double check + }, + number = function () { + var number, + string = ''; + for ('-' === ch && ((string = '-'), next('-')); ch >= '0' && '9' >= ch; ) + (string += ch), next(); + if ('.' === ch) for (string += '.'; next() && ch >= '0' && '9' >= ch; ) string += ch; + if ('e' === ch || 'E' === ch) + for ( + string += ch, next(), ('-' === ch || '+' === ch) && ((string += ch), next()); + ch >= '0' && '9' >= ch; + + ) + (string += ch), next(); + return (number = +string), isNaN(number) ? (error('Bad number'), void 0) : number; + }, + string = function () { + let hex: any, + i: any, + uffff: any, + string = ''; + if ('"' === ch) { + if (peek('""')) { + // literal + next('"'); + next('"'); + return nextUpTo('"""', 'failed to find closing \'"""\''); + } else { + for (; next(); ) { + if ('"' === ch) return next(), string; + if ('\\' === ch) + if ((next(), 'u' === ch)) { + for ( + uffff = 0, i = 0; + 4 > i && ((hex = parseInt(next(), 16)), isFinite(hex)); + i += 1 + ) + uffff = 16 * uffff + hex; + string += String.fromCharCode(uffff); + } else { + if ('string' != typeof escapee[ch]) break; + string += escapee[ch]; + } + else string += ch; + } + } + } + error('Bad string'); + }, + white = function () { + for (; ch && ' ' >= ch; ) next(); + }, + word = function () { + switch (ch) { + case 't': + return next('t'), next('r'), next('u'), next('e'), !0; + case 'f': + return next('f'), next('a'), next('l'), next('s'), next('e'), !1; + case 'n': + return next('n'), next('u'), next('l'), next('l'), null; + } + error("Unexpected '" + ch + "'"); + }, + array = function () { + var array: any[] = []; + if ('[' === ch) { + if ((next('['), white(), ']' === ch)) return next(']'), array; + for (; ch; ) { + if ((array.push(value()), white(), ']' === ch)) return next(']'), array; + next(','), white(); + } + } + error('Bad array'); + }, + object = function () { + var key, + object: any = {}; + if ('{' === ch) { + if ((next('{'), white(), '}' === ch)) return next('}'), object; + for (; ch; ) { + let latchKeyStart = at; + if ( + ((key = string()), + white(), + next(':'), + Object.hasOwnProperty.call(object, key) && + warning('Duplicate key "' + key + '"', latchKeyStart), + (object[key] = value()), + white(), + '}' === ch) + ) + return next('}'), object; + next(','), white(); + } + } + error('Bad object'); + }; + return ( + (value = function () { + switch ((white(), ch)) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && '9' >= ch ? number() : word(); + } + }), + function (source: string) { + annos = []; + let errored = false; + text = source; + at = 0; + ch = ' '; + white(); + + try { + value(); + } catch (e) { + errored = true; + annos.push({ type: AnnoTypes.error, at: e.at - 1, text: e.message }); + } + if (!errored && ch) { + error('Syntax error'); + } + return { annotations: annos }; + } + ); +}; diff --git a/packages/kbn-monaco/src/xjson/index.ts b/packages/kbn-monaco/src/xjson/index.ts new file mode 100644 index 0000000000000..35fd35887bc56 --- /dev/null +++ b/packages/kbn-monaco/src/xjson/index.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { registerGrammarChecker } from './language'; + +import { ID } from './constants'; + +export const XJsonLang = { registerGrammarChecker, ID }; diff --git a/packages/kbn-monaco/src/xjson/language.ts b/packages/kbn-monaco/src/xjson/language.ts new file mode 100644 index 0000000000000..fe505818d3c9a --- /dev/null +++ b/packages/kbn-monaco/src/xjson/language.ts @@ -0,0 +1,89 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// This file contains a lot of single setup logic for registering a language globally + +import { monaco } from '../monaco'; +import { WorkerProxyService } from './worker_proxy_service'; +import { registerLexerRules } from './lexer_rules'; +import { ID } from './constants'; +// @ts-ignore +import workerSrc from '!!raw-loader!../../target/public/xjson.editor.worker.js'; + +const wps = new WorkerProxyService(); + +// Register rules against shared monaco instance. +registerLexerRules(monaco); + +// In future we will need to make this map languages to workers using "id" and/or "label" values +// that get passed in. +// @ts-ignore +window.MonacoEnvironment = { + getWorker: (id: any, label: any) => { + // In kibana we will probably build this once and then load with raw-loader + const blob = new Blob([workerSrc], { type: 'application/javascript' }); + return new Worker(URL.createObjectURL(blob)); + }, +}; + +monaco.languages.onLanguage(ID, async () => { + return wps.setup(); +}); + +const OWNER = 'XJSON_GRAMMAR_CHECKER'; +export const registerGrammarChecker = (editor: monaco.editor.IEditor) => { + const allDisposables: monaco.IDisposable[] = []; + + const updateAnnos = async () => { + const { annotations } = await wps.getAnnos(); + const model = editor.getModel() as monaco.editor.ITextModel; + monaco.editor.setModelMarkers( + model, + OWNER, + annotations.map(({ at, text, type }) => { + const { column, lineNumber } = model.getPositionAt(at); + return { + startLineNumber: lineNumber, + startColumn: column, + endLineNumber: lineNumber, + endColumn: column, + message: text, + severity: type === 'error' ? monaco.MarkerSeverity.Error : monaco.MarkerSeverity.Warning, + }; + }) + ); + }; + + const onModelAdd = (model: monaco.editor.IModel) => { + allDisposables.push( + model.onDidChangeContent(async () => { + updateAnnos(); + }) + ); + + updateAnnos(); + }; + + allDisposables.push(monaco.editor.onDidCreateModel(onModelAdd)); + monaco.editor.getModels().forEach(onModelAdd); + return () => { + wps.stop(); + allDisposables.forEach((d) => d.dispose()); + }; +}; diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/esql.ts b/packages/kbn-monaco/src/xjson/lexer_rules/esql.ts new file mode 100644 index 0000000000000..e75b1013d3727 --- /dev/null +++ b/packages/kbn-monaco/src/xjson/lexer_rules/esql.ts @@ -0,0 +1,270 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { monaco } from '../../monaco'; + +export const ID = 'esql'; + +const brackets = [ + { open: '[', close: ']', token: 'delimiter.square' }, + { open: '(', close: ')', token: 'delimiter.parenthesis' }, +]; + +const keywords = [ + 'describe', + 'between', + 'in', + 'like', + 'not', + 'and', + 'or', + 'desc', + 'select', + 'from', + 'where', + 'having', + 'group', + 'by', + 'order', + 'asc', + 'desc', + 'pivot', + 'for', + 'in', + 'as', + 'show', + 'columns', + 'include', + 'frozen', + 'tables', + 'escape', + 'limit', + 'rlike', + 'all', + 'distinct', + 'is', +]; +const builtinFunctions = [ + 'avg', + 'count', + 'first', + 'first_value', + 'last', + 'last_value', + 'max', + 'min', + 'sum', + 'kurtosis', + 'mad', + 'percentile', + 'percentile_rank', + 'skewness', + 'stddev_pop', + 'sum_of_squares', + 'var_pop', + 'histogram', + 'case', + 'coalesce', + 'greatest', + 'ifnull', + 'iif', + 'isnull', + 'least', + 'nullif', + 'nvl', + 'curdate', + 'current_date', + 'current_time', + 'current_timestamp', + 'curtime', + 'dateadd', + 'datediff', + 'datepart', + 'datetrunc', + 'date_add', + 'date_diff', + 'date_part', + 'date_trunc', + 'day', + 'dayname', + 'dayofmonth', + 'dayofweek', + 'dayofyear', + 'day_name', + 'day_of_month', + 'day_of_week', + 'day_of_year', + 'dom', + 'dow', + 'doy', + 'hour', + 'hour_of_day', + 'idow', + 'isodayofweek', + 'isodow', + 'isoweek', + 'isoweekofyear', + 'iso_day_of_week', + 'iso_week_of_year', + 'iw', + 'iwoy', + 'minute', + 'minute_of_day', + 'minute_of_hour', + 'month', + 'monthname', + 'month_name', + 'month_of_year', + 'now', + 'quarter', + 'second', + 'second_of_minute', + 'timestampadd', + 'timestampdiff', + 'timestamp_add', + 'timestamp_diff', + 'today', + 'week', + 'week_of_year', + 'year', + 'abs', + 'acos', + 'asin', + 'atan', + 'atan2', + 'cbrt', + 'ceil', + 'ceiling', + 'cos', + 'cosh', + 'cot', + 'degrees', + 'e', + 'exp', + 'expm1', + 'floor', + 'log', + 'log10', + 'mod', + 'pi', + 'power', + 'radians', + 'rand', + 'random', + 'round', + 'sign', + 'signum|sin', + 'sinh', + 'sqrt', + 'tan', + 'truncate', + 'ascii', + 'bit_length', + 'char', + 'character_length', + 'char_length', + 'concat', + 'insert', + 'lcase', + 'left', + 'length', + 'locate', + 'ltrim', + 'octet_length', + 'position', + 'repeat', + 'replace', + 'right', + 'rtrim', + 'space', + 'substring', + 'ucase', + 'cast', + 'convert', + 'database', + 'user', + 'st_astext', + 'st_aswkt', + 'st_distance', + 'st_geometrytype', + 'st_geomfromtext', + 'st_wkttosql', + 'st_x', + 'st_y', + 'st_z', + 'score', +]; + +export const lexerRules = { + defaultToken: 'invalid', + ignoreCase: true, + tokenPostfix: '', + keywords, + builtinFunctions, + brackets, + tokenizer: { + root: [ + [ + /[a-zA-Z_$][a-zA-Z0-9_$]*\b/, + { + cases: { + '@keywords': 'keyword', + '@builtinFunctions': 'identifier', + '@default': 'identifier', + }, + }, + ], + [/[()]/, '@brackets'], + [/--.*$/, 'comment'], + [/\/\*/, 'comment', '@comment'], + [/\/.*$/, 'comment'], + + [/".*?"/, 'string'], + + [/'.*?'/, 'constant'], + [/`.*?`/, 'string'], + // whitespace + [/[ \t\r\n]+/, { token: '@whitespace' }], + [/[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b/, 'entity.name.function'], + [/⇐|<⇒|\*|\.|\:\:|\+|\-|\/|\/\/|%|&|\^|~|<|>|<=|=>|==|!=|<>|=/, 'keyword.operator'], + [/[\(]/, 'paren.lparen'], + [/[\)]/, 'paren.rparen'], + [/\s+/, 'text'], + ], + numbers: [ + [/0[xX][0-9a-fA-F]*/, 'number'], + [/[$][+-]*\d*(\.\d*)?/, 'number'], + [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number'], + ], + strings: [ + [/N'/, { token: 'string', next: '@string' }], + [/'/, { token: 'string', next: '@string' }], + ], + string: [ + [/[^']+/, 'string'], + [/''/, 'string'], + [/'/, { token: 'string', next: '@pop' }], + ], + comment: [ + [/[^\/*]+/, 'comment'], + [/\*\//, 'comment', '@pop'], + [/[\/*]/, 'comment'], + ], + }, +} as monaco.languages.IMonarchLanguage; diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/index.ts b/packages/kbn-monaco/src/xjson/lexer_rules/index.ts new file mode 100644 index 0000000000000..515de09510a61 --- /dev/null +++ b/packages/kbn-monaco/src/xjson/lexer_rules/index.ts @@ -0,0 +1,33 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* eslint-disable-next-line @kbn/eslint/module_migration */ +import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; +import * as xJson from './xjson'; +import * as esql from './esql'; +import * as painless from './painless'; + +export const registerLexerRules = (m: typeof monaco) => { + m.languages.register({ id: xJson.ID }); + m.languages.setMonarchTokensProvider(xJson.ID, xJson.lexerRules); + m.languages.register({ id: painless.ID }); + m.languages.setMonarchTokensProvider(painless.ID, painless.lexerRules); + m.languages.register({ id: esql.ID }); + m.languages.setMonarchTokensProvider(esql.ID, esql.lexerRules); +}; diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/painless.ts b/packages/kbn-monaco/src/xjson/lexer_rules/painless.ts new file mode 100644 index 0000000000000..676eb3134026a --- /dev/null +++ b/packages/kbn-monaco/src/xjson/lexer_rules/painless.ts @@ -0,0 +1,194 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { monaco } from '../../monaco'; + +export const ID = 'painless'; + +/** + * Extends the default type for a Monarch language so we can use + * attribute references (like @keywords to reference the keywords list) + * in the defined tokenizer + */ +interface Language extends monaco.languages.IMonarchLanguage { + default: string; + brackets: any; + keywords: string[]; + symbols: RegExp; + escapes: RegExp; + digits: RegExp; + primitives: string[]; + octaldigits: RegExp; + binarydigits: RegExp; + constants: string[]; + operators: string[]; +} + +export const lexerRules = { + default: 'invalid', + tokenPostfix: '', + // painless does not use < >, so we define our own + brackets: [ + ['{', '}', 'delimiter.curly'], + ['[', ']', 'delimiter.square'], + ['(', ')', 'delimiter.parenthesis'], + ], + keywords: [ + 'if', + 'in', + 'else', + 'while', + 'do', + 'for', + 'continue', + 'break', + 'return', + 'new', + 'try', + 'catch', + 'throw', + 'this', + 'instanceof', + ], + primitives: ['void', 'boolean', 'byte', 'short', 'char', 'int', 'long', 'float', 'double', 'def'], + constants: ['true', 'false'], + operators: [ + '=', + '>', + '<', + '!', + '~', + '?', + '?:', + '?.', + ':', + '==', + '===', + '<=', + '>=', + '!=', + '!==', + '&&', + '||', + '++', + '--', + '+', + '-', + '*', + '/', + '&', + '|', + '^', + '%', + '<<', + '>>', + '>>>', + '+=', + '-=', + '*=', + '/=', + '&=', + '|=', + '^=', + '%=', + '<<=', + '>>=', + '>>>=', + '->', + '::', + '=~', + '==~', + ], + symbols: /[=> { + worker.initialize((ctx: any, createData: any) => { + return new XJsonWorker(ctx); + }); +}; diff --git a/packages/kbn-monaco/src/xjson/worker/xjson_worker.ts b/packages/kbn-monaco/src/xjson/worker/xjson_worker.ts new file mode 100644 index 0000000000000..501adcacb6990 --- /dev/null +++ b/packages/kbn-monaco/src/xjson/worker/xjson_worker.ts @@ -0,0 +1,35 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* eslint-disable-next-line @kbn/eslint/module_migration */ +import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; +import { createParser } from '../grammar'; + +export class XJsonWorker { + constructor(private ctx: monaco.worker.IWorkerContext) {} + private parser: any; + + async parse() { + if (!this.parser) { + this.parser = createParser(); + } + const [model] = this.ctx.getMirrorModels(); + return this.parser(model.getValue()); + } +} diff --git a/packages/kbn-monaco/src/xjson/worker_proxy_service.ts b/packages/kbn-monaco/src/xjson/worker_proxy_service.ts new file mode 100644 index 0000000000000..17d6d56e51e59 --- /dev/null +++ b/packages/kbn-monaco/src/xjson/worker_proxy_service.ts @@ -0,0 +1,55 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { AnnoTypes } from './grammar'; +import { monaco } from '../monaco'; +import { XJsonWorker } from './worker'; +import { ID } from './constants'; + +export interface Annotation { + name?: string; + type: AnnoTypes; + text: string; + at: number; +} + +export interface AnnotationsResponse { + annotations: Annotation[]; +} + +export class WorkerProxyService { + private worker: monaco.editor.MonacoWebWorker | undefined; + + public async getAnnos(): Promise { + if (!this.worker) { + throw new Error('Worker Proxy Service has not been setup!'); + } + await this.worker.withSyncedResources(monaco.editor.getModels().map(({ uri }) => uri)); + const proxy = await this.worker.getProxy(); + return proxy.parse(); + } + + public setup() { + this.worker = monaco.editor.createWebWorker({ label: ID, moduleId: '' }); + } + + public stop() { + if (this.worker) this.worker.dispose(); + } +} diff --git a/packages/kbn-monaco/tsconfig.json b/packages/kbn-monaco/tsconfig.json new file mode 100644 index 0000000000000..95acfd32b24dd --- /dev/null +++ b/packages/kbn-monaco/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./target", + "declaration": true, + "sourceMap": true, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/kbn-monaco/webpack.config.js b/packages/kbn-monaco/webpack.config.js new file mode 100644 index 0000000000000..1a7d8c031670c --- /dev/null +++ b/packages/kbn-monaco/webpack.config.js @@ -0,0 +1,51 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const path = require('path'); + +const createLangWorkerConfig = (lang) => ({ + mode: 'production', + entry: path.resolve(__dirname, 'src', lang, 'worker', `${lang}.worker.ts`), + output: { + path: path.resolve(__dirname, 'target/public'), + filename: `${lang}.editor.worker.js`, + }, + resolve: { + modules: ['node_modules'], + extensions: ['.js', '.ts', '.tsx'], + }, + stats: 'errors-only', + module: { + rules: [ + { + test: /\.(js|ts)$/, + exclude: /node_modules/, + use: { + loader: 'babel-loader', + options: { + babelrc: false, + presets: [require.resolve('@kbn/babel-preset/webpack_preset')], + }, + }, + }, + ], + }, +}); + +module.exports = [createLangWorkerConfig('xjson')]; diff --git a/packages/kbn-monaco/yarn.lock b/packages/kbn-monaco/yarn.lock new file mode 120000 index 0000000000000..3f82ebc9cdbae --- /dev/null +++ b/packages/kbn-monaco/yarn.lock @@ -0,0 +1 @@ +../../yarn.lock \ No newline at end of file diff --git a/packages/kbn-test/package.json b/packages/kbn-test/package.json index 0ab0048619358..8e2fd1c9182ff 100644 --- a/packages/kbn-test/package.json +++ b/packages/kbn-test/package.json @@ -14,6 +14,7 @@ "@kbn/babel-preset": "1.0.0", "@kbn/dev-utils": "1.0.0", "@types/parse-link-header": "^1.0.0", + "@types/puppeteer": "^3.0.0", "@types/strip-ansi": "^5.2.1", "@types/xml2js": "^0.4.5", "diff": "^4.0.1" @@ -25,6 +26,7 @@ "getopts": "^2.2.4", "glob": "^7.1.2", "parse-link-header": "^1.0.1", + "puppeteer": "^3.3.0", "strip-ansi": "^5.2.0", "rxjs": "^6.5.3", "tar-fs": "^1.16.3", diff --git a/packages/kbn-test/src/index.ts b/packages/kbn-test/src/index.ts index 585ce8181df5f..0bc7cc664df68 100644 --- a/packages/kbn-test/src/index.ts +++ b/packages/kbn-test/src/index.ts @@ -58,3 +58,5 @@ export { runFailedTestsReporterCli } from './failed_tests_reporter'; export { makeJunitReportPath } from './junit_report_path'; export { CI_PARALLEL_PROCESS_PREFIX } from './ci_parallel_process_prefix'; + +export * from './page_load_metrics'; diff --git a/packages/kbn-test/src/page_load_metrics/capture_page_load_metrics.ts b/packages/kbn-test/src/page_load_metrics/capture_page_load_metrics.ts new file mode 100644 index 0000000000000..013d49a29a51c --- /dev/null +++ b/packages/kbn-test/src/page_load_metrics/capture_page_load_metrics.ts @@ -0,0 +1,81 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ToolingLog } from '@kbn/dev-utils'; +import { NavigationOptions, createUrl, navigateToApps } from './navigation'; + +export async function capturePageLoadMetrics(log: ToolingLog, options: NavigationOptions) { + const responsesByPageView = await navigateToApps(log, options); + + const assetSizeMeasurements = new Map(); + + const numberOfPagesVisited = responsesByPageView.size; + + for (const [, frameResponses] of responsesByPageView) { + for (const [, { url, dataLength }] of frameResponses) { + if (url.length === 0) { + throw new Error('navigateToApps(); failed to identify the url of the request'); + } + if (assetSizeMeasurements.has(url)) { + assetSizeMeasurements.set(url, [dataLength].concat(assetSizeMeasurements.get(url) || [])); + } else { + assetSizeMeasurements.set(url, [dataLength]); + } + } + } + + return Array.from(assetSizeMeasurements.entries()) + .map(([url, measurements]) => { + const baseUrl = createUrl('/', options.appConfig.url); + const relativeUrl = url + // remove the baseUrl (expect the trailing slash) to make url relative + .replace(baseUrl.slice(0, -1), '') + // strip the build number from asset urls + .replace(/^\/\d+\//, '/'); + return [relativeUrl, measurements] as const; + }) + .filter(([url, measurements]) => { + if (measurements.length !== numberOfPagesVisited) { + // ignore urls seen only on some pages + return false; + } + + if (url.startsWith('data:')) { + // ignore data urls since they are already counted by other assets + return false; + } + + if (url.startsWith('/api/') || url.startsWith('/internal/')) { + // ignore api requests since they don't have deterministic sizes + return false; + } + + const allMetricsAreEqual = measurements.every((x, i) => + i === 0 ? true : x === measurements[i - 1] + ); + if (!allMetricsAreEqual) { + throw new Error(`measurements for url [${url}] are not equal [${measurements.join(',')}]`); + } + + return true; + }) + .map(([url, measurements]) => { + return { group: 'page load asset size', id: url, value: measurements[0] }; + }); +} diff --git a/packages/kbn-test/src/page_load_metrics/cli.ts b/packages/kbn-test/src/page_load_metrics/cli.ts new file mode 100644 index 0000000000000..95421384c79cb --- /dev/null +++ b/packages/kbn-test/src/page_load_metrics/cli.ts @@ -0,0 +1,90 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import Url from 'url'; + +import { run, createFlagError } from '@kbn/dev-utils'; +import { resolve, basename } from 'path'; +import { capturePageLoadMetrics } from './capture_page_load_metrics'; + +const defaultScreenshotsDir = resolve(__dirname, 'screenshots'); + +export function runPageLoadMetricsCli() { + run( + async ({ flags, log }) => { + const kibanaUrl = flags['kibana-url']; + if (!kibanaUrl || typeof kibanaUrl !== 'string') { + throw createFlagError('Expect --kibana-url to be a string'); + } + + const parsedUrl = Url.parse(kibanaUrl); + + const [username, password] = parsedUrl.auth + ? parsedUrl.auth.split(':') + : [flags.username, flags.password]; + + if (typeof username !== 'string' || typeof password !== 'string') { + throw createFlagError( + 'Mising username and/or password, either specify in --kibana-url or pass --username and --password' + ); + } + + const headless = !flags.head; + + const screenshotsDir = flags.screenshotsDir || defaultScreenshotsDir; + + if (typeof screenshotsDir !== 'string' || screenshotsDir === basename(screenshotsDir)) { + throw createFlagError('Expect screenshotsDir to be valid path string'); + } + + const metrics = await capturePageLoadMetrics(log, { + headless, + appConfig: { + url: kibanaUrl, + username, + password, + }, + screenshotsDir, + }); + for (const metric of metrics) { + log.info(`${metric.id}: ${metric.value}`); + } + }, + { + description: `Loads several pages with Puppeteer to capture the size of assets`, + flags: { + string: ['kibana-url', 'username', 'password', 'screenshotsDir'], + boolean: ['head'], + default: { + username: 'elastic', + password: 'changeme', + debug: true, + screenshotsDir: defaultScreenshotsDir, + }, + help: ` + --kibana-url Url for Kibana we should connect to, can include login info + --head Run puppeteer with graphical user interface + --username Set username, defaults to 'elastic' + --password Set password, defaults to 'changeme' + --screenshotsDir Set screenshots directory, defaults to '${defaultScreenshotsDir}' + `, + }, + } + ); +} diff --git a/packages/kbn-test/src/page_load_metrics/event.ts b/packages/kbn-test/src/page_load_metrics/event.ts new file mode 100644 index 0000000000000..481954bbf672e --- /dev/null +++ b/packages/kbn-test/src/page_load_metrics/event.ts @@ -0,0 +1,34 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export interface ResponseReceivedEvent { + frameId: string; + loaderId: string; + requestId: string; + response: Record; + timestamp: number; + type: string; +} + +export interface DataReceivedEvent { + encodedDataLength: number; + dataLength: number; + requestId: string; + timestamp: number; +} diff --git a/packages/kbn-test/src/page_load_metrics/index.ts b/packages/kbn-test/src/page_load_metrics/index.ts new file mode 100644 index 0000000000000..4309d558518a6 --- /dev/null +++ b/packages/kbn-test/src/page_load_metrics/index.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export * from './cli'; +export { capturePageLoadMetrics } from './capture_page_load_metrics'; diff --git a/packages/kbn-test/src/page_load_metrics/navigation.ts b/packages/kbn-test/src/page_load_metrics/navigation.ts new file mode 100644 index 0000000000000..21dc681951b21 --- /dev/null +++ b/packages/kbn-test/src/page_load_metrics/navigation.ts @@ -0,0 +1,165 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import Fs from 'fs'; +import Url from 'url'; +import _ from 'lodash'; +import puppeteer from 'puppeteer'; +import { resolve } from 'path'; +import { ToolingLog } from '@kbn/dev-utils'; +import { ResponseReceivedEvent, DataReceivedEvent } from './event'; + +export interface NavigationOptions { + headless: boolean; + appConfig: { url: string; username: string; password: string }; + screenshotsDir: string; +} + +export type NavigationResults = Map>; + +interface FrameResponse { + url: string; + dataLength: number; +} + +function joinPath(pathA: string, pathB: string) { + return `${pathA.endsWith('/') ? pathA.slice(0, -1) : pathA}/${ + pathB.startsWith('/') ? pathB.slice(1) : pathB + }`; +} + +export function createUrl(path: string, url: string) { + const baseUrl = Url.parse(url); + return Url.format({ + protocol: baseUrl.protocol, + hostname: baseUrl.hostname, + port: baseUrl.port, + pathname: joinPath(baseUrl.pathname || '', path), + }); +} + +async function loginToKibana( + log: ToolingLog, + browser: puppeteer.Browser, + options: NavigationOptions +) { + log.debug(`log in to the app..`); + const page = await browser.newPage(); + const loginUrl = createUrl('/login', options.appConfig.url); + await page.goto(loginUrl, { + waitUntil: 'networkidle0', + }); + await page.type('[data-test-subj="loginUsername"]', options.appConfig.username); + await page.type('[data-test-subj="loginPassword"]', options.appConfig.password); + await page.click('[data-test-subj="loginSubmit"]'); + await page.waitForNavigation({ waitUntil: 'networkidle0' }); + await page.close(); +} + +export async function navigateToApps(log: ToolingLog, options: NavigationOptions) { + const browser = await puppeteer.launch({ headless: options.headless, args: ['--no-sandbox'] }); + const devToolsResponses: NavigationResults = new Map(); + const apps = [ + { path: '/app/discover', locator: '[data-test-subj="discover-sidebar"]' }, + { path: '/app/home', locator: '[data-test-subj="homeApp"]' }, + { path: '/app/canvas', locator: '[data-test-subj="create-workpad-button"]' }, + { path: '/app/maps', locator: '[title="Maps"]' }, + { path: '/app/apm', locator: '[data-test-subj="apmMainContainer"]' }, + ]; + + await loginToKibana(log, browser, options); + + await Promise.all( + apps.map(async (app) => { + const page = await browser.newPage(); + page.setCacheEnabled(false); + page.setDefaultNavigationTimeout(0); + const frameResponses = new Map(); + devToolsResponses.set(app.path, frameResponses); + + const client = await page.target().createCDPSession(); + await client.send('Network.enable'); + + function getRequestData(requestId: string) { + if (!frameResponses.has(requestId)) { + frameResponses.set(requestId, { url: '', dataLength: 0 }); + } + + return frameResponses.get(requestId)!; + } + + client.on('Network.responseReceived', (event: ResponseReceivedEvent) => { + getRequestData(event.requestId).url = event.response.url; + }); + + client.on('Network.dataReceived', (event: DataReceivedEvent) => { + getRequestData(event.requestId).dataLength += event.dataLength; + }); + + const url = createUrl(app.path, options.appConfig.url); + log.debug(`goto ${url}`); + await page.goto(url, { + waitUntil: 'networkidle0', + }); + + let readyAttempt = 0; + let selectorFound = false; + while (!selectorFound) { + readyAttempt += 1; + try { + await page.waitForSelector(app.locator, { timeout: 5000 }); + selectorFound = true; + } catch (error) { + log.error( + `Page '${app.path}' was not loaded properly, unable to find '${ + app.locator + }', url: ${page.url()}` + ); + + if (readyAttempt < 6) { + continue; + } + + const failureDir = resolve(options.screenshotsDir, 'failure'); + const screenshotPath = resolve( + failureDir, + `${app.path.slice(1).split('/').join('_')}_navigation.png` + ); + Fs.mkdirSync(failureDir, { recursive: true }); + + await page.bringToFront(); + await page.screenshot({ + path: screenshotPath, + type: 'png', + fullPage: true, + }); + log.debug(`Saving screenshot to ${screenshotPath}`); + + throw new Error(`Page load timeout: ${app.path} not loaded after 30 seconds`); + } + } + + await page.close(); + }) + ); + + await browser.close(); + + return devToolsResponses; +} diff --git a/packages/kbn-ui-shared-deps/entry.js b/packages/kbn-ui-shared-deps/entry.js index ab044a6723da7..88e84fc87ae53 100644 --- a/packages/kbn-ui-shared-deps/entry.js +++ b/packages/kbn-ui-shared-deps/entry.js @@ -30,8 +30,8 @@ export const KbnI18nReact = require('@kbn/i18n/react'); export const Angular = require('angular'); export const Moment = require('moment'); export const MomentTimezone = require('moment-timezone/moment-timezone'); -export const Monaco = require('./monaco.ts'); -export const MonacoBare = require('monaco-editor/esm/vs/editor/editor.api'); +export const KbnMonaco = require('@kbn/monaco'); +export const MonacoBarePluginApi = require('@kbn/monaco').BarePluginApi; export const React = require('react'); export const ReactDom = require('react-dom'); export const ReactDomServer = require('react-dom/server'); diff --git a/packages/kbn-ui-shared-deps/index.js b/packages/kbn-ui-shared-deps/index.js index eb3add68e2866..301d176555847 100644 --- a/packages/kbn-ui-shared-deps/index.js +++ b/packages/kbn-ui-shared-deps/index.js @@ -42,9 +42,9 @@ exports.externals = { 'react-intl': '__kbnSharedDeps__.ReactIntl', 'react-router': '__kbnSharedDeps__.ReactRouter', 'react-router-dom': '__kbnSharedDeps__.ReactRouterDom', - '@kbn/ui-shared-deps/monaco': '__kbnSharedDeps__.Monaco', + '@kbn/monaco': '__kbnSharedDeps__.KbnMonaco', // this is how plugins/consumers from npm load monaco - 'monaco-editor/esm/vs/editor/editor.api': '__kbnSharedDeps__.MonacoBare', + 'monaco-editor/esm/vs/editor/editor.api': '__kbnSharedDeps__.MonacoBarePluginApi', /** * big deps which are locked to a single version diff --git a/packages/kbn-ui-shared-deps/package.json b/packages/kbn-ui-shared-deps/package.json index 93afa303c8cad..744a656c54a7f 100644 --- a/packages/kbn-ui-shared-deps/package.json +++ b/packages/kbn-ui-shared-deps/package.json @@ -13,6 +13,7 @@ "@elastic/eui": "23.3.1", "@elastic/numeral": "^2.5.0", "@kbn/i18n": "1.0.0", + "@kbn/monaco": "1.0.0", "abortcontroller-polyfill": "^1.4.0", "angular": "^1.7.9", "compression-webpack-plugin": "^3.1.0", @@ -22,7 +23,6 @@ "jquery": "^3.5.0", "moment": "^2.24.0", "moment-timezone": "^0.5.27", - "monaco-editor": "~0.17.0", "react": "^16.12.0", "react-dom": "^16.12.0", "react-intl": "^2.8.0", diff --git a/packages/kbn-ui-shared-deps/tsconfig.json b/packages/kbn-ui-shared-deps/tsconfig.json index 5d981c73f1d21..5aa0f45e4100d 100644 --- a/packages/kbn-ui-shared-deps/tsconfig.json +++ b/packages/kbn-ui-shared-deps/tsconfig.json @@ -1,7 +1,4 @@ { "extends": "../../tsconfig.json", - "include": [ - "index.d.ts", - "monaco.ts" - ] + "include": ["index.d.ts", "./monaco"] } diff --git a/packages/kbn-ui-shared-deps/webpack.config.js b/packages/kbn-ui-shared-deps/webpack.config.js index 7295f2e88c530..523927bd64a20 100644 --- a/packages/kbn-ui-shared-deps/webpack.config.js +++ b/packages/kbn-ui-shared-deps/webpack.config.js @@ -78,17 +78,6 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({ test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'], }, - { - include: [require.resolve('./monaco.ts')], - use: [ - { - loader: 'babel-loader', - options: { - presets: [require.resolve('@kbn/babel-preset/webpack_preset')], - }, - }, - ], - }, ], }, @@ -96,6 +85,7 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({ alias: { moment: MOMENT_SRC, }, + extensions: ['.js', '.ts'], }, optimization: { diff --git a/rfcs/text/0011_global_search.md b/rfcs/text/0011_global_search.md index 5ec368a1c2f02..3b2120283d06a 100644 --- a/rfcs/text/0011_global_search.md +++ b/rfcs/text/0011_global_search.md @@ -194,7 +194,7 @@ Notes: ### Plugin API -#### server API +#### Common types ```ts /** @@ -208,6 +208,21 @@ type GlobalSearchResult = Omit & { url: string; }; + +/** + * Response returned from the {@link GlobalSearchServiceStart | global search service}'s `find` API + */ +type GlobalSearchBatchedResults = { + /** + * Results for this batch + */ + results: GlobalSearchResult[]; +}; +``` + +#### server API + +```ts /** * Options for the server-side {@link GlobalSearchServiceStart.find | find API} */ @@ -226,16 +241,6 @@ interface GlobalSearchFindOptions { aborted$?: Observable; } -/** - * Response returned from the server-side {@link GlobalSearchServiceStart | global search service}'s `find` API - */ -type GlobalSearchBatchedResults = { - /** - * Results for this batch - */ - results: GlobalSearchResult[]; -}; - /** @public */ interface GlobalSearchPluginSetup { registerResultProvider(provider: GlobalSearchResultProvider); @@ -265,28 +270,6 @@ interface GlobalSearchFindOptions { aborted$?: Observable; } -/** - * Enhanced {@link GlobalSearchResult | result type} for the client-side, - * to allow navigating to a given result. - */ -interface NavigableGlobalSearchResult extends GlobalSearchResult { - /** - * Navigate to this result's associated url. If the result is on this kibana instance, user will be redirected to it - * in a SPA friendly way using `application.navigateToApp`, else, a full page refresh will be performed. - */ - navigate: () => Promise; -} - -/** - * Response returned from the client-side {@link GlobalSearchServiceStart | global search service}'s `find` API - */ -type GlobalSearchBatchedResults = { - /** - * Results for this batch - */ - results: NavigableGlobalSearchResult[]; -}; - /** @public */ interface GlobalSearchPluginSetup { registerResultProvider(provider: GlobalSearchResultProvider); @@ -304,9 +287,6 @@ Notes: - The `registerResultProvider` setup APIs share the same signature, however the input `GlobalSearchResultProvider` types are different on the client and server. - The `find` start API signature got a `KibanaRequest` for `server`, when this parameter is not present for `public`. -- The `find` API returns a observable of `NavigableGlobalSearchResult` instead of plain `GlobalSearchResult`. This type - is here to enhance results with a `navigate` method to let the `GlobalSearch` plugin handle the navigation logic, which is - non-trivial. See the [Redirecting to a result](#redirecting-to-a-result) section for more info. #### http API @@ -395,14 +375,11 @@ In current specification, the only conversion step is to transform the `result.u #### redirecting to a result -Parsing a relative or absolute result url to perform SPA navigation can be non trivial, and should remains the responsibility -of the GlobalSearch plugin API. - -This is why `NavigableGlobalSearchResult.navigate` has been introduced on the client-side version of the `find` API +Parsing a relative or absolute result url to perform SPA navigation can be non trivial. This is why `ApplicationService.navigateToUrl` has been introduced on the client-side core API -When using `navigate` from a result instance, the following logic will be executed: +When using `navigateToUrl` with the url of a result instance, the following logic will be executed: -If all these criteria are true for `result.url`: +If all these criteria are true for `url`: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space) diff --git a/scripts/page_load_metrics.js b/scripts/page_load_metrics.js new file mode 100644 index 0000000000000..37500c26e0b20 --- /dev/null +++ b/scripts/page_load_metrics.js @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +require('../src/setup_node_env'); +require('@kbn/test').runPageLoadMetricsCli(); diff --git a/src/cli/cluster/cluster_manager.ts b/src/cli/cluster/cluster_manager.ts index dec16b63d78f0..09f9bb2333dbe 100644 --- a/src/cli/cluster/cluster_manager.ts +++ b/src/cli/cluster/cluster_manager.ts @@ -262,7 +262,7 @@ export class ClusterManager { ...pluginInternalDirsIgnore, fromRoot('src/legacy/server/sass/__tmp__'), fromRoot('x-pack/plugins/reporting/.chromium'), - fromRoot('x-pack/plugins/siem/cypress'), + fromRoot('x-pack/plugins/security_solution/cypress'), fromRoot('x-pack/plugins/apm/e2e'), fromRoot('x-pack/plugins/apm/scripts'), fromRoot('x-pack/plugins/canvas/canvas_plugin_src'), // prevents server from restarting twice for Canvas plugin changes, diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index 7afb607192cae..f0db3a25e313d 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -17,7 +17,7 @@ * under the License. */ -import { map } from 'rxjs/operators'; +import { map, shareReplay } from 'rxjs/operators'; import { combineLatest } from 'rxjs'; import { CoreContext } from '../core_context'; import { PluginWrapper } from './plugin'; @@ -107,8 +107,8 @@ export function createPluginInitializerContext( * @param ConfigClass A class (not an instance of a class) that contains a * static `schema` that we validate the config at the given `path` against. */ - create() { - return coreContext.configService.atPath(pluginManifest.configPath); + create() { + return coreContext.configService.atPath(pluginManifest.configPath).pipe(shareReplay(1)); }, createIfExists() { return coreContext.configService.optionalAtPath(pluginManifest.configPath); diff --git a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts index 4f69d45c192e9..69b57a498936e 100644 --- a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts +++ b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts @@ -74,6 +74,7 @@ export class KibanaMigrator { private readonly status$ = new BehaviorSubject({ status: 'waiting', }); + private readonly activeMappings: IndexMapping; /** * Creates an instance of KibanaMigrator. @@ -100,6 +101,9 @@ export class KibanaMigrator { validateDoc: docValidator(savedObjectValidations || {}), log: this.log, }); + // Building the active mappings (and associated md5sums) is an expensive + // operation so we cache the result + this.activeMappings = buildActiveMappings(this.mappingProperties); } /** @@ -172,7 +176,7 @@ export class KibanaMigrator { * */ public getActiveMappings(): IndexMapping { - return buildActiveMappings(this.mappingProperties); + return this.activeMappings; } /** diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts b/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts index 5b52665b6268e..28afdefe1413f 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerBulkCreateRoute } from '../bulk_create'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts b/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts index 845bae47b41f2..521e62e16b1d8 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerBulkGetRoute } from '../bulk_get'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts b/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts index 6356fc787a8d8..9c888406b0c96 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerBulkUpdateRoute } from '../bulk_update'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/create.test.ts b/src/core/server/saved_objects/routes/integration_tests/create.test.ts index 5a53a30209281..ba3d620f8fdb5 100644 --- a/src/core/server/saved_objects/routes/integration_tests/create.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/create.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerCreateRoute } from '../create'; import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/delete.test.ts b/src/core/server/saved_objects/routes/integration_tests/delete.test.ts index d4ce4d421dde1..652d267f08fe7 100644 --- a/src/core/server/saved_objects/routes/integration_tests/delete.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/delete.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerDeleteRoute } from '../delete'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/export.test.ts b/src/core/server/saved_objects/routes/integration_tests/export.test.ts index bdb2e23f0826d..7b342dde2febe 100644 --- a/src/core/server/saved_objects/routes/integration_tests/export.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/export.test.ts @@ -27,7 +27,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { SavedObjectConfig } from '../../saved_objects_config'; import { registerExportRoute } from '../export'; -import { setupServer, createExportableType } from './test_utils'; +import { setupServer, createExportableType } from '../test_utils'; type setupServerReturn = UnwrapPromise>; const exportSavedObjectsToStream = exportMock.exportSavedObjectsToStream as jest.Mock; diff --git a/src/core/server/saved_objects/routes/integration_tests/find.test.ts b/src/core/server/saved_objects/routes/integration_tests/find.test.ts index 7916100e46831..31bda1d6b9cbd 100644 --- a/src/core/server/saved_objects/routes/integration_tests/find.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/find.test.ts @@ -23,7 +23,7 @@ import querystring from 'querystring'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerFindRoute } from '../find'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/import.test.ts b/src/core/server/saved_objects/routes/integration_tests/import.test.ts index c4a03a0e2e7d2..c4e304a3f892f 100644 --- a/src/core/server/saved_objects/routes/integration_tests/import.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/import.test.ts @@ -22,7 +22,7 @@ import { UnwrapPromise } from '@kbn/utility-types'; import { registerImportRoute } from '../import'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { SavedObjectConfig } from '../../saved_objects_config'; -import { setupServer, createExportableType } from './test_utils'; +import { setupServer, createExportableType } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts b/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts index 4bbe3271e0232..0fe07245dda20 100644 --- a/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerLogLegacyImportRoute } from '../log_legacy_import'; import { loggingServiceMock } from '../../../logging/logging_service.mock'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts b/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts index a36f246f9dbc5..27750ec692e5a 100644 --- a/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerResolveImportErrorsRoute } from '../resolve_import_errors'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer, createExportableType } from './test_utils'; +import { setupServer, createExportableType } from '../test_utils'; import { SavedObjectConfig } from '../../saved_objects_config'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/update.test.ts b/src/core/server/saved_objects/routes/integration_tests/update.test.ts index b0c3d68090db6..eb6eb1cdb6bd9 100644 --- a/src/core/server/saved_objects/routes/integration_tests/update.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/update.test.ts @@ -21,7 +21,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; import { registerUpdateRoute } from '../update'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; -import { setupServer } from './test_utils'; +import { setupServer } from '../test_utils'; type setupServerReturn = UnwrapPromise>; diff --git a/src/core/server/saved_objects/routes/integration_tests/test_utils.ts b/src/core/server/saved_objects/routes/test_utils.ts similarity index 83% rename from src/core/server/saved_objects/routes/integration_tests/test_utils.ts rename to src/core/server/saved_objects/routes/test_utils.ts index 23e0285201dc7..a2227a8033dbd 100644 --- a/src/core/server/saved_objects/routes/integration_tests/test_utils.ts +++ b/src/core/server/saved_objects/routes/test_utils.ts @@ -17,14 +17,14 @@ * under the License. */ -import { ContextService } from '../../../context'; -import { createHttpServer, createCoreContext } from '../../../http/test_utils'; -import { coreMock } from '../../../mocks'; -import { SavedObjectsType } from '../../types'; +import { ContextService } from '../../context'; +import { createHttpServer, createCoreContext } from '../../http/test_utils'; +import { coreMock } from '../../mocks'; +import { SavedObjectsType } from '../types'; -const coreId = Symbol('core'); +const defaultCoreId = Symbol('core'); -export const setupServer = async () => { +export const setupServer = async (coreId: symbol = defaultCoreId) => { const coreContext = createCoreContext({ coreId }); const contextService = new ContextService(coreContext); diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index e23f8dec5927c..b093fe779cab7 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -136,7 +136,7 @@ export class SavedObjectsRepository { injectedConstructor: any = SavedObjectsRepository ): ISavedObjectsRepository { const mappings = migrator.getActiveMappings(); - const allTypes = Object.keys(getRootPropertiesObjects(mappings)); + const allTypes = typeRegistry.getAllTypes().map((t) => t.name); const serializer = new SavedObjectsSerializer(typeRegistry); const visibleTypes = allTypes.filter((type) => !typeRegistry.isHidden(type)); diff --git a/src/core/server/test_utils.ts b/src/core/server/test_utils.ts index f7e6fbcd0c131..6b16fe3bdef61 100644 --- a/src/core/server/test_utils.ts +++ b/src/core/server/test_utils.ts @@ -19,3 +19,4 @@ export { createHttpServer } from './http/test_utils'; export { ServiceStatusLevelSnapshotSerializer } from './status/test_utils'; +export { setupServer } from './saved_objects/routes/test_utils'; diff --git a/src/core/types/index.ts b/src/core/types/index.ts index 346b4cfce70c1..07d7789d235ec 100644 --- a/src/core/types/index.ts +++ b/src/core/types/index.ts @@ -26,3 +26,4 @@ export * from './capabilities'; export * from './app_category'; export * from './ui_settings'; export * from './saved_objects'; +export * from './serializable'; diff --git a/src/core/types/serializable.ts b/src/core/types/serializable.ts new file mode 100644 index 0000000000000..9e8ea123bea91 --- /dev/null +++ b/src/core/types/serializable.ts @@ -0,0 +1,32 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export type Serializable = + | string + | number + | boolean + | null + | SerializableArray + | SerializableRecord; + +// we need interfaces instead of types here to allow cyclic references +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface SerializableArray extends Array {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface SerializableRecord extends Record {} diff --git a/src/dev/build/build_distributables.js b/src/dev/build/build_distributables.js index 3a8709893565d..66f0c0355c2d9 100644 --- a/src/dev/build/build_distributables.js +++ b/src/dev/build/build_distributables.js @@ -30,6 +30,7 @@ import { CleanTypescriptTask, CleanNodeBuildsTask, CleanTask, + CopyBinScriptsTask, CopySourceTask, CreateArchivesSourcesTask, CreateArchivesTask, @@ -110,6 +111,7 @@ export async function buildDistributables(options) { * run platform-generic build tasks */ await run(CopySourceTask); + await run(CopyBinScriptsTask); await run(CreateEmptyDirsAndFilesTask); await run(CreateReadmeTask); await run(TranspileBabelTask); diff --git a/src/dev/build/tasks/bin/copy_bin_scripts_task.js b/src/dev/build/tasks/bin/copy_bin_scripts_task.js new file mode 100644 index 0000000000000..f620f12b17d88 --- /dev/null +++ b/src/dev/build/tasks/bin/copy_bin_scripts_task.js @@ -0,0 +1,31 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { copyAll } from '../../lib'; + +export const CopyBinScriptsTask = { + description: 'Copying bin scripts into platform-generic build directory', + + async run(config, log, build) { + await copyAll( + config.resolveFromRepo('src/dev/build/tasks/bin/scripts'), + build.resolvePath('bin') + ); + }, +}; diff --git a/src/dev/build/tasks/bin/index.js b/src/dev/build/tasks/bin/index.js new file mode 100644 index 0000000000000..e970ac5ec044b --- /dev/null +++ b/src/dev/build/tasks/bin/index.js @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { CopyBinScriptsTask } from './copy_bin_scripts_task'; diff --git a/bin/kibana b/src/dev/build/tasks/bin/scripts/kibana similarity index 100% rename from bin/kibana rename to src/dev/build/tasks/bin/scripts/kibana diff --git a/bin/kibana-keystore b/src/dev/build/tasks/bin/scripts/kibana-keystore similarity index 100% rename from bin/kibana-keystore rename to src/dev/build/tasks/bin/scripts/kibana-keystore diff --git a/bin/kibana-keystore.bat b/src/dev/build/tasks/bin/scripts/kibana-keystore.bat similarity index 100% rename from bin/kibana-keystore.bat rename to src/dev/build/tasks/bin/scripts/kibana-keystore.bat diff --git a/bin/kibana-plugin b/src/dev/build/tasks/bin/scripts/kibana-plugin similarity index 100% rename from bin/kibana-plugin rename to src/dev/build/tasks/bin/scripts/kibana-plugin diff --git a/bin/kibana-plugin.bat b/src/dev/build/tasks/bin/scripts/kibana-plugin.bat similarity index 100% rename from bin/kibana-plugin.bat rename to src/dev/build/tasks/bin/scripts/kibana-plugin.bat diff --git a/bin/kibana.bat b/src/dev/build/tasks/bin/scripts/kibana.bat similarity index 100% rename from bin/kibana.bat rename to src/dev/build/tasks/bin/scripts/kibana.bat diff --git a/src/dev/build/tasks/copy_source_task.js b/src/dev/build/tasks/copy_source_task.js index ee9dc159de47f..ddc6d000bca19 100644 --- a/src/dev/build/tasks/copy_source_task.js +++ b/src/dev/build/tasks/copy_source_task.js @@ -42,7 +42,6 @@ export const CopySourceTask = { '!src/es_archiver/**', '!src/functional_test_runner/**', '!src/dev/**', - 'bin/**', 'typings/**', 'webpackShims/**', 'config/kibana.yml', diff --git a/src/dev/build/tasks/index.js b/src/dev/build/tasks/index.js index 8105fa8a7d5d4..bafb5a2fe115e 100644 --- a/src/dev/build/tasks/index.js +++ b/src/dev/build/tasks/index.js @@ -17,6 +17,7 @@ * under the License. */ +export * from './bin'; export * from './build_packages_task'; export * from './clean_tasks'; export * from './copy_source_task'; diff --git a/src/dev/code_coverage/nyc_config/nyc.functional.config.js b/src/dev/code_coverage/nyc_config/nyc.functional.config.js new file mode 100644 index 0000000000000..20d266ab9e2c3 --- /dev/null +++ b/src/dev/code_coverage/nyc_config/nyc.functional.config.js @@ -0,0 +1,31 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const defaultExclude = require('@istanbuljs/schema/default-exclude'); +const extraExclude = ['data/optimize/**', 'src/core/server/**', '**/test/**']; +const path = require('path'); + +module.exports = { + 'temp-dir': process.env.COVERAGE_TEMP_DIR + ? path.resolve(process.env.COVERAGE_TEMP_DIR, 'functional') + : 'target/kibana-coverage/functional', + 'report-dir': 'target/kibana-coverage/functional-combined', + reporter: ['html', 'json-summary'], + exclude: extraExclude.concat(defaultExclude), +}; diff --git a/src/dev/code_coverage/nyc_config/nyc.jest.config.js b/src/dev/code_coverage/nyc_config/nyc.jest.config.js new file mode 100644 index 0000000000000..1f73347837ab3 --- /dev/null +++ b/src/dev/code_coverage/nyc_config/nyc.jest.config.js @@ -0,0 +1,28 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const path = require('path'); + +module.exports = { + 'temp-dir': process.env.COVERAGE_TEMP_DIR + ? path.resolve(process.env.COVERAGE_TEMP_DIR, 'jest') + : 'target/kibana-coverage/jest', + 'report-dir': 'target/kibana-coverage/jest-combined', + reporter: ['html', 'json-summary'], +}; diff --git a/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh b/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh index ff9cb36c894f8..707c6de3f88a0 100644 --- a/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh +++ b/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh @@ -1,10 +1,9 @@ #!/bin/bash -EXTRACT_START_DIR=tmp/extracted_coverage -EXTRACT_END_DIR=target/kibana-coverage -COMBINED_EXTRACT_DIR=/${EXTRACT_START_DIR}/${EXTRACT_END_DIR} +COVERAGE_TEMP_DIR=/tmp/extracted_coverage/target/kibana-coverage/ +export COVERAGE_TEMP_DIR echo "### Merge coverage reports" for x in jest functional; do - yarn nyc report --temp-dir $COMBINED_EXTRACT_DIR/${x} --report-dir $EXTRACT_END_DIR/${x}-combined --reporter=html --reporter=json-summary + yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.${x}.config.js done diff --git a/src/dev/jest/config.js b/src/dev/jest/config.js index 497a639ecab56..64db131f5219a 100644 --- a/src/dev/jest/config.js +++ b/src/dev/jest/config.js @@ -64,7 +64,8 @@ export default { '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/src/dev/jest/mocks/file_mock.js', '\\.(css|less|scss)$': '/src/dev/jest/mocks/style_mock.js', - '\\.ace\\.worker.js$': '/src/dev/jest/mocks/ace_worker_module_mock.js', + '\\.ace\\.worker.js$': '/src/dev/jest/mocks/worker_module_mock.js', + '\\.editor\\.worker.js$': '/src/dev/jest/mocks/worker_module_mock.js', '^(!!)?file-loader!': '/src/dev/jest/mocks/file_mock.js', }, setupFiles: [ diff --git a/src/dev/jest/mocks/ace_worker_module_mock.js b/src/dev/jest/mocks/worker_module_mock.js similarity index 100% rename from src/dev/jest/mocks/ace_worker_module_mock.js rename to src/dev/jest/mocks/worker_module_mock.js diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 416702c56d852..2f785896da8d5 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -18,7 +18,6 @@ */ export const storybookAliases = { - advanced_ui_actions: 'x-pack/plugins/advanced_ui_actions/scripts/storybook.js', apm: 'x-pack/plugins/apm/scripts/storybook.js', canvas: 'x-pack/plugins/canvas/scripts/storybook_new.js', codeeditor: 'src/plugins/kibana_react/public/code_editor/scripts/storybook.ts', @@ -26,5 +25,6 @@ export const storybookAliases = { drilldowns: 'x-pack/plugins/drilldowns/scripts/storybook.js', embeddable: 'src/plugins/embeddable/scripts/storybook.js', infra: 'x-pack/legacy/plugins/infra/scripts/storybook.js', - siem: 'x-pack/plugins/siem/scripts/storybook.js', + security_solution: 'x-pack/plugins/security_solution/scripts/storybook.js', + ui_actions_enhanced: 'x-pack/plugins/ui_actions_enhanced/scripts/storybook.js', }; diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index b368949cc33e1..1e0b631308d9e 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -27,8 +27,8 @@ export const PROJECTS = [ new Project(resolve(REPO_ROOT, 'test/tsconfig.json'), { name: 'kibana/test' }), new Project(resolve(REPO_ROOT, 'x-pack/tsconfig.json')), new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), { name: 'x-pack/test' }), - new Project(resolve(REPO_ROOT, 'x-pack/plugins/siem/cypress/tsconfig.json'), { - name: 'siem/cypress', + new Project(resolve(REPO_ROOT, 'x-pack/plugins/security_solution/cypress/tsconfig.json'), { + name: 'security_solution/cypress', }), new Project(resolve(REPO_ROOT, 'x-pack/plugins/apm/e2e/tsconfig.json'), { name: 'apm/cypress', diff --git a/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js b/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js index 0d1b69778263c..b7af6a73e1bc1 100644 --- a/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js +++ b/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js @@ -18,53 +18,32 @@ */ import moment from 'moment-timezone'; -import numeralLanguages from '@elastic/numeral/languages'; import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; import { isRelativeUrl } from '../../../../core/server'; -import { DEFAULT_QUERY_LANGUAGE } from '../../../../plugins/data/common'; export function getUiSettingDefaults() { const weekdays = moment.weekdays().slice(); const [defaultWeekday] = weekdays; - // We add the `en` key manually here, since that's not a real numeral locale, but the - // default fallback in case the locale is not found. - const numeralLanguageIds = [ - 'en', - ...numeralLanguages.map(function (numeralLanguage) { - return numeralLanguage.id; - }), - ]; - - const luceneQueryLanguageLabel = i18n.translate( - 'kbn.advancedSettings.searchQueryLanguageLucene', - { - defaultMessage: 'Lucene', - } - ); - - const queryLanguageSettingName = i18n.translate('kbn.advancedSettings.searchQueryLanguageTitle', { - defaultMessage: 'Query language', - }); - - const requestPreferenceOptionLabels = { - sessionId: i18n.translate('kbn.advancedSettings.courier.requestPreferenceSessionId', { - defaultMessage: 'Session ID', - }), - custom: i18n.translate('kbn.advancedSettings.courier.requestPreferenceCustom', { - defaultMessage: 'Custom', - }), - none: i18n.translate('kbn.advancedSettings.courier.requestPreferenceNone', { - defaultMessage: 'None', - }), - }; // wrapped in provider so that a new instance is given to each app/test return { buildNum: { readonly: true, }, + 'state:storeInSessionStorage': { + name: i18n.translate('kbn.advancedSettings.storeUrlTitle', { + defaultMessage: 'Store URLs in session storage', + }), + value: false, + description: i18n.translate('kbn.advancedSettings.storeUrlText', { + defaultMessage: + 'The URL can sometimes grow to be too large for some browsers to handle. ' + + 'To counter-act this we are testing if storing parts of the URL in session storage could help. ' + + 'Please let us know how it goes!', + }), + }, defaultRoute: { name: i18n.translate('kbn.advancedSettings.defaultRoute.defaultRouteTitle', { defaultMessage: 'Default route', @@ -89,83 +68,6 @@ export function getUiSettingDefaults() { 'The route must be a relative URL.', }), }, - 'query:queryString:options': { - name: i18n.translate('kbn.advancedSettings.query.queryStringOptionsTitle', { - defaultMessage: 'Query string options', - }), - value: '{ "analyze_wildcard": true }', - description: i18n.translate('kbn.advancedSettings.query.queryStringOptionsText', { - defaultMessage: - '{optionsLink} for the lucene query string parser. Is only used when "{queryLanguage}" is set ' + - 'to {luceneLanguage}.', - description: - 'Part of composite text: kbn.advancedSettings.query.queryStringOptions.optionsLinkText + ' + - 'kbn.advancedSettings.query.queryStringOptionsText', - values: { - optionsLink: - '' + - i18n.translate('kbn.advancedSettings.query.queryStringOptions.optionsLinkText', { - defaultMessage: 'Options', - }) + - '', - luceneLanguage: luceneQueryLanguageLabel, - queryLanguage: queryLanguageSettingName, - }, - }), - type: 'json', - }, - 'query:allowLeadingWildcards': { - name: i18n.translate('kbn.advancedSettings.query.allowWildcardsTitle', { - defaultMessage: 'Allow leading wildcards in query', - }), - value: true, - description: i18n.translate('kbn.advancedSettings.query.allowWildcardsText', { - defaultMessage: - 'When set, * is allowed as the first character in a query clause. ' + - 'Currently only applies when experimental query features are enabled in the query bar. ' + - 'To disallow leading wildcards in basic lucene queries, use {queryStringOptionsPattern}.', - values: { - queryStringOptionsPattern: 'query:queryString:options', - }, - }), - }, - 'search:queryLanguage': { - name: queryLanguageSettingName, - value: DEFAULT_QUERY_LANGUAGE, - description: i18n.translate('kbn.advancedSettings.searchQueryLanguageText', { - defaultMessage: - 'Query language used by the query bar. KQL is a new language built specifically for Kibana.', - }), - type: 'select', - options: ['lucene', 'kuery'], - optionLabels: { - lucene: luceneQueryLanguageLabel, - kuery: i18n.translate('kbn.advancedSettings.searchQueryLanguageKql', { - defaultMessage: 'KQL', - }), - }, - }, - 'sort:options': { - name: i18n.translate('kbn.advancedSettings.sortOptionsTitle', { - defaultMessage: 'Sort options', - }), - value: '{ "unmapped_type": "boolean" }', - description: i18n.translate('kbn.advancedSettings.sortOptionsText', { - defaultMessage: '{optionsLink} for the Elasticsearch sort parameter', - description: - 'Part of composite text: kbn.advancedSettings.sortOptions.optionsLinkText + ' + - 'kbn.advancedSettings.sortOptionsText', - values: { - optionsLink: - '' + - i18n.translate('kbn.advancedSettings.sortOptions.optionsLinkText', { - defaultMessage: 'Options', - }) + - '', - }, - }), - type: 'json', - }, dateFormat: { name: i18n.translate('kbn.advancedSettings.dateFormatTitle', { defaultMessage: 'Date format', @@ -261,160 +163,6 @@ export function getUiSettingDefaults() { }, }), }, - defaultIndex: { - name: i18n.translate('kbn.advancedSettings.defaultIndexTitle', { - defaultMessage: 'Default index', - }), - value: null, - type: 'string', - description: i18n.translate('kbn.advancedSettings.defaultIndexText', { - defaultMessage: 'The index to access if no index is set', - }), - }, - 'courier:ignoreFilterIfFieldNotInIndex': { - name: i18n.translate('kbn.advancedSettings.courier.ignoreFilterTitle', { - defaultMessage: 'Ignore filter(s)', - }), - value: false, - description: i18n.translate('kbn.advancedSettings.courier.ignoreFilterText', { - defaultMessage: - 'This configuration enhances support for dashboards containing visualizations accessing dissimilar indexes. ' + - 'When disabled, all filters are applied to all visualizations. ' + - 'When enabled, filter(s) will be ignored for a visualization ' + - `when the visualization's index does not contain the filtering field.`, - }), - category: ['search'], - }, - 'courier:setRequestPreference': { - name: i18n.translate('kbn.advancedSettings.courier.requestPreferenceTitle', { - defaultMessage: 'Request preference', - }), - value: 'sessionId', - options: ['sessionId', 'custom', 'none'], - optionLabels: requestPreferenceOptionLabels, - type: 'select', - description: i18n.translate('kbn.advancedSettings.courier.requestPreferenceText', { - defaultMessage: `Allows you to set which shards handle your search requests. -

    -
  • {sessionId}: restricts operations to execute all search requests on the same shards. - This has the benefit of reusing shard caches across requests.
  • -
  • {custom}: allows you to define a your own preference. - Use courier:customRequestPreference to customize your preference value.
  • -
  • {none}: means do not set a preference. - This might provide better performance because requests can be spread across all shard copies. - However, results might be inconsistent because different shards might be in different refresh states.
  • -
`, - values: { - sessionId: requestPreferenceOptionLabels.sessionId, - custom: requestPreferenceOptionLabels.custom, - none: requestPreferenceOptionLabels.none, - }, - }), - category: ['search'], - }, - 'courier:customRequestPreference': { - name: i18n.translate('kbn.advancedSettings.courier.customRequestPreferenceTitle', { - defaultMessage: 'Custom request preference', - }), - value: '_local', - type: 'string', - description: i18n.translate('kbn.advancedSettings.courier.customRequestPreferenceText', { - defaultMessage: - '{requestPreferenceLink} used when {setRequestReferenceSetting} is set to {customSettingValue}.', - description: - 'Part of composite text: kbn.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText + ' + - 'kbn.advancedSettings.courier.customRequestPreferenceText', - values: { - setRequestReferenceSetting: 'courier:setRequestPreference', - customSettingValue: '"custom"', - requestPreferenceLink: - '' + - i18n.translate( - 'kbn.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText', - { - defaultMessage: 'Request Preference', - } - ) + - '', - }, - }), - category: ['search'], - }, - 'courier:maxConcurrentShardRequests': { - name: i18n.translate('kbn.advancedSettings.courier.maxRequestsTitle', { - defaultMessage: 'Max Concurrent Shard Requests', - }), - value: 0, - type: 'number', - description: i18n.translate('kbn.advancedSettings.courier.maxRequestsText', { - defaultMessage: - 'Controls the {maxRequestsLink} setting used for _msearch requests sent by Kibana. ' + - 'Set to 0 to disable this config and use the Elasticsearch default.', - values: { - maxRequestsLink: `max_concurrent_shard_requests`, - }, - }), - category: ['search'], - }, - 'courier:batchSearches': { - name: i18n.translate('kbn.advancedSettings.courier.batchSearchesTitle', { - defaultMessage: 'Batch concurrent searches', - }), - value: false, - type: 'boolean', - description: i18n.translate('kbn.advancedSettings.courier.batchSearchesText', { - defaultMessage: `When disabled, dashboard panels will load individually, and search requests will terminate when users navigate - away or update the query. When enabled, dashboard panels will load together when all of the data is loaded, and - searches will not terminate.`, - }), - deprecation: { - message: i18n.translate('kbn.advancedSettings.courier.batchSearchesTextDeprecation', { - defaultMessage: 'This setting is deprecated and will be removed in Kibana 8.0.', - }), - docLinksKey: 'kibanaSearchSettings', - }, - category: ['search'], - }, - 'search:includeFrozen': { - name: 'Search in frozen indices', - description: `Will include frozen indices in results if enabled. Searching through frozen indices - might increase the search time.`, - value: false, - category: ['search'], - }, - 'histogram:barTarget': { - name: i18n.translate('kbn.advancedSettings.histogram.barTargetTitle', { - defaultMessage: 'Target bars', - }), - value: 50, - description: i18n.translate('kbn.advancedSettings.histogram.barTargetText', { - defaultMessage: - 'Attempt to generate around this many bars when using "auto" interval in date histograms', - }), - }, - 'histogram:maxBars': { - name: i18n.translate('kbn.advancedSettings.histogram.maxBarsTitle', { - defaultMessage: 'Maximum bars', - }), - value: 100, - description: i18n.translate('kbn.advancedSettings.histogram.maxBarsText', { - defaultMessage: - 'Never show more than this many bars in date histograms, scale values if needed', - }), - }, - 'visualize:enableLabs': { - name: i18n.translate('kbn.advancedSettings.visualizeEnableLabsTitle', { - defaultMessage: 'Enable experimental visualizations', - }), - value: true, - description: i18n.translate('kbn.advancedSettings.visualizeEnableLabsText', { - defaultMessage: `Allows users to create, view, and edit experimental visualizations. If disabled, - only visualizations that are considered production-ready are available to the user.`, - }), - category: ['visualization'], - }, 'visualization:tileMap:maxPrecision': { name: i18n.translate('kbn.advancedSettings.visualization.tileMap.maxPrecisionTitle', { defaultMessage: 'Maximum tile map precision', @@ -493,43 +241,6 @@ export function getUiSettingDefaults() { }), category: ['visualization'], }, - 'csv:separator': { - name: i18n.translate('kbn.advancedSettings.csv.separatorTitle', { - defaultMessage: 'CSV separator', - }), - value: ',', - description: i18n.translate('kbn.advancedSettings.csv.separatorText', { - defaultMessage: 'Separate exported values with this string', - }), - }, - 'csv:quoteValues': { - name: i18n.translate('kbn.advancedSettings.csv.quoteValuesTitle', { - defaultMessage: 'Quote CSV values', - }), - value: true, - description: i18n.translate('kbn.advancedSettings.csv.quoteValuesText', { - defaultMessage: 'Should values be quoted in csv exports?', - }), - }, - 'history:limit': { - name: i18n.translate('kbn.advancedSettings.historyLimitTitle', { - defaultMessage: 'History limit', - }), - value: 10, - description: i18n.translate('kbn.advancedSettings.historyLimitText', { - defaultMessage: - 'In fields that have history (e.g. query inputs), show this many recent values', - }), - }, - 'shortDots:enable': { - name: i18n.translate('kbn.advancedSettings.shortenFieldsTitle', { - defaultMessage: 'Shorten fields', - }), - value: false, - description: i18n.translate('kbn.advancedSettings.shortenFieldsText', { - defaultMessage: 'Shorten long fields, for example, instead of foo.bar.baz, show f.b.baz', - }), - }, 'truncate:maxHeight': { name: i18n.translate('kbn.advancedSettings.maxCellHeightTitle', { defaultMessage: 'Maximum table cell height', @@ -540,138 +251,6 @@ export function getUiSettingDefaults() { 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation', }), }, - 'format:defaultTypeMap': { - name: i18n.translate('kbn.advancedSettings.format.defaultTypeMapTitle', { - defaultMessage: 'Field type format name', - }), - value: `{ - "ip": { "id": "ip", "params": {} }, - "date": { "id": "date", "params": {} }, - "date_nanos": { "id": "date_nanos", "params": {}, "es": true }, - "number": { "id": "number", "params": {} }, - "boolean": { "id": "boolean", "params": {} }, - "_source": { "id": "_source", "params": {} }, - "_default_": { "id": "string", "params": {} } -}`, - type: 'json', - description: i18n.translate('kbn.advancedSettings.format.defaultTypeMapText', { - defaultMessage: - 'Map of the format name to use by default for each field type. ' + - '{defaultFormat} is used if the field type is not mentioned explicitly', - values: { - defaultFormat: '"_default_"', - }, - }), - }, - 'format:number:defaultPattern': { - name: i18n.translate('kbn.advancedSettings.format.numberFormatTitle', { - defaultMessage: 'Number format', - }), - value: '0,0.[000]', - type: 'string', - description: i18n.translate('kbn.advancedSettings.format.numberFormatText', { - defaultMessage: 'Default {numeralFormatLink} for the "number" format', - description: - 'Part of composite text: kbn.advancedSettings.format.numberFormatText + ' + - 'kbn.advancedSettings.format.numberFormat.numeralFormatLinkText', - values: { - numeralFormatLink: - '' + - i18n.translate('kbn.advancedSettings.format.numberFormat.numeralFormatLinkText', { - defaultMessage: 'numeral format', - }) + - '', - }, - }), - }, - 'format:bytes:defaultPattern': { - name: i18n.translate('kbn.advancedSettings.format.bytesFormatTitle', { - defaultMessage: 'Bytes format', - }), - value: '0,0.[0]b', - type: 'string', - description: i18n.translate('kbn.advancedSettings.format.bytesFormatText', { - defaultMessage: 'Default {numeralFormatLink} for the "bytes" format', - description: - 'Part of composite text: kbn.advancedSettings.format.bytesFormatText + ' + - 'kbn.advancedSettings.format.bytesFormat.numeralFormatLinkText', - values: { - numeralFormatLink: - '' + - i18n.translate('kbn.advancedSettings.format.bytesFormat.numeralFormatLinkText', { - defaultMessage: 'numeral format', - }) + - '', - }, - }), - }, - 'format:percent:defaultPattern': { - name: i18n.translate('kbn.advancedSettings.format.percentFormatTitle', { - defaultMessage: 'Percent format', - }), - value: '0,0.[000]%', - type: 'string', - description: i18n.translate('kbn.advancedSettings.format.percentFormatText', { - defaultMessage: 'Default {numeralFormatLink} for the "percent" format', - description: - 'Part of composite text: kbn.advancedSettings.format.percentFormatText + ' + - 'kbn.advancedSettings.format.percentFormat.numeralFormatLinkText', - values: { - numeralFormatLink: - '' + - i18n.translate('kbn.advancedSettings.format.percentFormat.numeralFormatLinkText', { - defaultMessage: 'numeral format', - }) + - '', - }, - }), - }, - 'format:currency:defaultPattern': { - name: i18n.translate('kbn.advancedSettings.format.currencyFormatTitle', { - defaultMessage: 'Currency format', - }), - value: '($0,0.[00])', - type: 'string', - description: i18n.translate('kbn.advancedSettings.format.currencyFormatText', { - defaultMessage: 'Default {numeralFormatLink} for the "currency" format', - description: - 'Part of composite text: kbn.advancedSettings.format.currencyFormatText + ' + - 'kbn.advancedSettings.format.currencyFormat.numeralFormatLinkText', - values: { - numeralFormatLink: - '' + - i18n.translate('kbn.advancedSettings.format.currencyFormat.numeralFormatLinkText', { - defaultMessage: 'numeral format', - }) + - '', - }, - }), - }, - 'format:number:defaultLocale': { - name: i18n.translate('kbn.advancedSettings.format.formattingLocaleTitle', { - defaultMessage: 'Formatting locale', - }), - value: 'en', - type: 'select', - options: numeralLanguageIds, - optionLabels: Object.fromEntries( - numeralLanguages.map((language) => [language.id, language.name]) - ), - description: i18n.translate('kbn.advancedSettings.format.formattingLocaleText', { - defaultMessage: `{numeralLanguageLink} locale`, - description: - 'Part of composite text: kbn.advancedSettings.format.formattingLocale.numeralLanguageLinkText + ' + - 'kbn.advancedSettings.format.formattingLocaleText', - values: { - numeralLanguageLink: - '' + - i18n.translate('kbn.advancedSettings.format.formattingLocale.numeralLanguageLinkText', { - defaultMessage: 'Numeral language', - }) + - '', - }, - }), - }, 'timepicker:timeDefaults': { name: i18n.translate('kbn.advancedSettings.timepicker.timeDefaultsTitle', { defaultMessage: 'Time filter defaults', @@ -686,120 +265,6 @@ export function getUiSettingDefaults() { }), requiresPageReload: true, }, - 'timepicker:refreshIntervalDefaults': { - name: i18n.translate('kbn.advancedSettings.timepicker.refreshIntervalDefaultsTitle', { - defaultMessage: 'Time filter refresh interval', - }), - value: `{ - "pause": false, - "value": 0 -}`, - type: 'json', - description: i18n.translate('kbn.advancedSettings.timepicker.refreshIntervalDefaultsText', { - defaultMessage: `The timefilter's default refresh interval`, - }), - requiresPageReload: true, - }, - 'timepicker:quickRanges': { - name: i18n.translate('kbn.advancedSettings.timepicker.quickRangesTitle', { - defaultMessage: 'Time filter quick ranges', - }), - value: JSON.stringify( - [ - { - from: 'now/d', - to: 'now/d', - display: i18n.translate('kbn.advancedSettings.timepicker.today', { - defaultMessage: 'Today', - }), - }, - { - from: 'now/w', - to: 'now/w', - display: i18n.translate('kbn.advancedSettings.timepicker.thisWeek', { - defaultMessage: 'This week', - }), - }, - { - from: 'now-15m', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last15Minutes', { - defaultMessage: 'Last 15 minutes', - }), - }, - { - from: 'now-30m', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last30Minutes', { - defaultMessage: 'Last 30 minutes', - }), - }, - { - from: 'now-1h', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last1Hour', { - defaultMessage: 'Last 1 hour', - }), - }, - { - from: 'now-24h', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last24Hours', { - defaultMessage: 'Last 24 hours', - }), - }, - { - from: 'now-7d', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last7Days', { - defaultMessage: 'Last 7 days', - }), - }, - { - from: 'now-30d', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last30Days', { - defaultMessage: 'Last 30 days', - }), - }, - { - from: 'now-90d', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last90Days', { - defaultMessage: 'Last 90 days', - }), - }, - { - from: 'now-1y', - to: 'now', - display: i18n.translate('kbn.advancedSettings.timepicker.last1Year', { - defaultMessage: 'Last 1 year', - }), - }, - ], - null, - 2 - ), - type: 'json', - description: i18n.translate('kbn.advancedSettings.timepicker.quickRangesText', { - defaultMessage: - 'The list of ranges to show in the Quick section of the time filter. This should be an array of objects, ' + - 'with each object containing "from", "to" (see {acceptedFormatsLink}), and ' + - '"display" (the title to be displayed).', - description: - 'Part of composite text: kbn.advancedSettings.timepicker.quickRangesText + ' + - 'kbn.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', - values: { - acceptedFormatsLink: - `` + - i18n.translate('kbn.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', { - defaultMessage: 'accepted formats', - }) + - '', - }, - }), - }, 'theme:darkMode': { name: i18n.translate('kbn.advancedSettings.darkModeTitle', { defaultMessage: 'Dark mode', @@ -822,26 +287,6 @@ export function getUiSettingDefaults() { }), requiresPageReload: true, }, - 'filters:pinnedByDefault': { - name: i18n.translate('kbn.advancedSettings.pinFiltersTitle', { - defaultMessage: 'Pin filters by default', - }), - value: false, - description: i18n.translate('kbn.advancedSettings.pinFiltersText', { - defaultMessage: 'Whether the filters should have a global state (be pinned) by default', - }), - }, - 'filterEditor:suggestValues': { - name: i18n.translate('kbn.advancedSettings.suggestFilterValuesTitle', { - defaultMessage: 'Filter editor suggest values', - description: '"Filter editor" refers to the UI you create filters in.', - }), - value: true, - description: i18n.translate('kbn.advancedSettings.suggestFilterValuesText', { - defaultMessage: - 'Set this property to false to prevent the filter editor from suggesting values for fields.', - }), - }, 'notifications:banner': { name: i18n.translate('kbn.advancedSettings.notifications.bannerTitle', { defaultMessage: 'Custom banner notification', @@ -930,28 +375,6 @@ export function getUiSettingDefaults() { type: 'number', category: ['notifications'], }, - 'state:storeInSessionStorage': { - name: i18n.translate('kbn.advancedSettings.storeUrlTitle', { - defaultMessage: 'Store URLs in session storage', - }), - value: false, - description: i18n.translate('kbn.advancedSettings.storeUrlText', { - defaultMessage: - 'The URL can sometimes grow to be too large for some browsers to handle. ' + - 'To counter-act this we are testing if storing parts of the URL in session storage could help. ' + - 'Please let us know how it goes!', - }), - }, - 'indexPattern:placeholder': { - name: i18n.translate('kbn.advancedSettings.indexPatternPlaceholderTitle', { - defaultMessage: 'Index pattern placeholder', - }), - value: '', - description: i18n.translate('kbn.advancedSettings.indexPatternPlaceholderText', { - defaultMessage: - 'The placeholder for the "Index pattern name" field in "Management > Index Patterns > Create Index Pattern".', - }), - }, 'accessibility:disableAnimations': { name: i18n.translate('kbn.advancedSettings.disableAnimationsTitle', { defaultMessage: 'Disable Animations', diff --git a/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js b/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js index 08a347fbf7295..879fab206b99d 100644 --- a/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js +++ b/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js @@ -29,6 +29,7 @@ import { PaginateDirectiveProvider, } from '../../../../../plugins/kibana_legacy/public'; import { PER_PAGE_SETTING } from '../../../../../plugins/saved_objects/common'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../../../../plugins/visualizations/public'; const module = uiModules.get('kibana'); @@ -294,7 +295,7 @@ module prevSearch = filter; - const isLabsEnabled = config.get('visualize:enableLabs'); + const isLabsEnabled = config.get(VISUALIZE_ENABLE_LABS_SETTING); self.service.find(filter).then(function (hits) { hits.hits = hits.hits.filter( (hit) => isLabsEnabled || _.get(hit, 'type.stage') !== 'experimental' diff --git a/src/legacy/server/saved_objects/saved_objects_mixin.js b/src/legacy/server/saved_objects/saved_objects_mixin.js index 7d84c27bd1ef0..63839b9d0f1d7 100644 --- a/src/legacy/server/saved_objects/saved_objects_mixin.js +++ b/src/legacy/server/saved_objects/saved_objects_mixin.js @@ -27,14 +27,13 @@ import { importSavedObjectsFromStream, resolveSavedObjectsImportErrors, } from '../../../core/server/saved_objects'; -import { getRootPropertiesObjects } from '../../../core/server/saved_objects/mappings'; import { convertTypesToLegacySchema } from '../../../core/server/saved_objects/utils'; export function savedObjectsMixin(kbnServer, server) { const migrator = kbnServer.newPlatform.__internals.kibanaMigrator; const typeRegistry = kbnServer.newPlatform.start.core.savedObjects.getTypeRegistry(); const mappings = migrator.getActiveMappings(); - const allTypes = Object.keys(getRootPropertiesObjects(mappings)); + const allTypes = typeRegistry.getAllTypes().map((t) => t.name); const schema = new SavedObjectsSchema(convertTypesToLegacySchema(typeRegistry.getAllTypes())); const visibleTypes = allTypes.filter((type) => !schema.isHiddenType(type)); diff --git a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js index 229bfb1978a4e..d98770842a0f0 100644 --- a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js +++ b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js @@ -28,6 +28,11 @@ import { // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '../../../../../src/plugins/data/public/search/aggs'; import { ComponentRegistry } from '../../../../../src/plugins/advanced_settings/public/'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/public/'; +import { + CSV_SEPARATOR_SETTING, + CSV_QUOTE_VALUES_SETTING, +} from '../../../../../src/plugins/share/public'; const mockObservable = () => { return { @@ -49,18 +54,31 @@ let isTimeRangeSelectorEnabled = true; let isAutoRefreshSelectorEnabled = true; export const mockUiSettings = { - get: (item) => { - return mockUiSettings[item]; + get: (item, defaultValue) => { + const defaultValues = { + dateFormat: 'MMM D, YYYY @ HH:mm:ss.SSS', + 'dateFormat:tz': 'UTC', + [UI_SETTINGS.SHORT_DOTS_ENABLE]: true, + [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: true, + [UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS]: true, + [UI_SETTINGS.QUERY_STRING_OPTIONS]: {}, + [UI_SETTINGS.FORMAT_CURRENCY_DEFAULT_PATTERN]: '($0,0.[00])', + [UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN]: '0,0.[000]', + [UI_SETTINGS.FORMAT_PERCENT_DEFAULT_PATTERN]: '0,0.[000]%', + [UI_SETTINGS.FORMAT_NUMBER_DEFAULT_LOCALE]: 'en', + [UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP]: {}, + [CSV_SEPARATOR_SETTING]: ',', + [CSV_QUOTE_VALUES_SETTING]: true, + [UI_SETTINGS.SEARCH_QUERY_LANGUAGE]: 'kuery', + 'state:storeInSessionStorage': false, + }; + + return defaultValues[item] || defaultValue; }, getUpdate$: () => ({ subscribe: sinon.fake(), }), isDefault: sinon.fake(), - 'query:allowLeadingWildcards': true, - 'query:queryString:options': {}, - 'courier:ignoreFilterIfFieldNotInIndex': true, - 'dateFormat:tz': 'Browser', - 'format:defaultTypeMap': {}, }; const mockCoreSetup = { @@ -236,6 +254,9 @@ export const npSetup = { }, share: { register: () => {}, + urlGenerators: { + registerUrlGenerator: () => {}, + }, }, devTools: { register: () => {}, @@ -524,6 +545,8 @@ export function __setup__(coreSetup) { // bootstrap an LP plugin outside of tests) npSetup.core.application.register = () => {}; + npSetup.core.uiSettings.get = mockUiSettings.get; + // Services that need to be set in the legacy platform since the legacy data // & vis plugins which previously provided them have been removed. setSetupServices(npSetup); @@ -532,6 +555,8 @@ export function __setup__(coreSetup) { export function __start__(coreStart) { npStart.core = coreStart; + npStart.core.uiSettings.get = mockUiSettings.get; + // Services that need to be set in the legacy platform since the legacy data // & vis plugins which previously provided them have been removed. setStartServices(npStart); diff --git a/src/legacy/ui/public/new_platform/set_services.ts b/src/legacy/ui/public/new_platform/set_services.ts index 9d02ad67b3937..ee92eda064aa8 100644 --- a/src/legacy/ui/public/new_platform/set_services.ts +++ b/src/legacy/ui/public/new_platform/set_services.ts @@ -65,6 +65,7 @@ export function setStartServices(npStart: NpStart) { visualizationsServices.setCapabilities(npStart.core.application.capabilities); visualizationsServices.setHttp(npStart.core.http); visualizationsServices.setApplication(npStart.core.application); + visualizationsServices.setEmbeddable(npStart.plugins.embeddable); visualizationsServices.setSavedObjects(npStart.core.savedObjects); visualizationsServices.setIndexPatterns(npStart.plugins.data.indexPatterns); visualizationsServices.setFilterManager(npStart.plugins.data.query.filterManager); diff --git a/src/legacy/ui/public/styles/_legacy/_base.scss b/src/legacy/ui/public/styles/_legacy/_base.scss index fd0a1335f9685..877ae033ae584 100644 --- a/src/legacy/ui/public/styles/_legacy/_base.scss +++ b/src/legacy/ui/public/styles/_legacy/_base.scss @@ -64,10 +64,6 @@ input[type='checkbox'], padding-bottom: $euiSizeS; } - .globalQueryBar { - padding: 0px $euiSizeS $euiSizeS $euiSizeS; - } - > nav, > navbar { z-index: 2 !important; diff --git a/src/legacy/ui/public/timefilter/setup_router.ts b/src/legacy/ui/public/timefilter/setup_router.ts index a7492e538b3af..7c25c6aa3166e 100644 --- a/src/legacy/ui/public/timefilter/setup_router.ts +++ b/src/legacy/ui/public/timefilter/setup_router.ts @@ -21,10 +21,15 @@ import _ from 'lodash'; import { IScope } from 'angular'; import moment from 'moment'; import chrome from 'ui/chrome'; -import { RefreshInterval, TimeRange, TimefilterContract } from 'src/plugins/data/public'; import { Subscription } from 'rxjs'; import { fatalError } from 'ui/notify/fatal_error'; import { subscribeWithScope } from '../../../../plugins/kibana_legacy/public'; +import { + RefreshInterval, + TimeRange, + TimefilterContract, + UI_SETTINGS, +} from '../../../../plugins/data/public'; // TODO // remove everything underneath once globalState is no longer an angular service @@ -38,7 +43,7 @@ export function getTimefilterConfig() { const settings = chrome.getUiSettingsClient(); return { timeDefaults: settings.get('timepicker:timeDefaults'), - refreshIntervalDefaults: settings.get('timepicker:refreshIntervalDefaults'), + refreshIntervalDefaults: settings.get(UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS), }; } diff --git a/src/plugins/advanced_settings/public/management_app/lib/get_category_name.ts b/src/plugins/advanced_settings/public/management_app/lib/get_category_name.ts index bf3ac9628754a..31df6875c97d9 100644 --- a/src/plugins/advanced_settings/public/management_app/lib/get_category_name.ts +++ b/src/plugins/advanced_settings/public/management_app/lib/get_category_name.ts @@ -46,8 +46,8 @@ const names: Record = { search: i18n.translate('advancedSettings.categoryNames.searchLabel', { defaultMessage: 'Search', }), - siem: i18n.translate('advancedSettings.categoryNames.siemLabel', { - defaultMessage: 'SIEM', + securitySolution: i18n.translate('advancedSettings.categoryNames.securitySolutionLabel', { + defaultMessage: 'Security Solution', }), }; diff --git a/src/plugins/charts/public/services/theme/theme.ts b/src/plugins/charts/public/services/theme/theme.ts index 166e1c539688a..e1e71573caa3a 100644 --- a/src/plugins/charts/public/services/theme/theme.ts +++ b/src/plugins/charts/public/services/theme/theme.ts @@ -42,8 +42,10 @@ export class ThemeService { /** A React hook for consuming the charts theme */ public useChartsTheme = () => { + /* eslint-disable-next-line react-hooks/rules-of-hooks */ const [value, update] = useState(this.chartsDefaultTheme); + /* eslint-disable-next-line react-hooks/rules-of-hooks */ useEffect(() => { const s = this.chartsTheme$.subscribe(update); return () => s.unsubscribe(); diff --git a/src/plugins/console/public/application/containers/editor/editor.tsx b/src/plugins/console/public/application/containers/editor/editor.tsx index 0bfe837f2cd90..66d3cbab20ac5 100644 --- a/src/plugins/console/public/application/containers/editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/editor.tsx @@ -47,6 +47,7 @@ export const Editor = memo(({ loading }: Props) => { INITIAL_PANEL_WIDTH, ]); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const onPanelWidthChange = useCallback( debounce((widths: number[]) => { storage.set(StorageKeys.WIDTH, widths); diff --git a/src/plugins/console/public/application/hooks/use_save_current_text_object.ts b/src/plugins/console/public/application/hooks/use_save_current_text_object.ts index ab517ba1bfdd1..1bd1a7fb09bd1 100644 --- a/src/plugins/console/public/application/hooks/use_save_current_text_object.ts +++ b/src/plugins/console/public/application/hooks/use_save_current_text_object.ts @@ -32,6 +32,7 @@ export const useSaveCurrentTextObject = () => { const { currentTextObject } = useEditorReadContext(); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ return useCallback( throttle( (text: string) => { diff --git a/src/plugins/console/server/lib/spec_definitions/js/filter.ts b/src/plugins/console/server/lib/spec_definitions/js/filter.ts index 27e02f7cf1837..b5e99e610b8ba 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/filter.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/filter.ts @@ -58,13 +58,6 @@ filters.limit = { value: 100, }; -filters.type = { - __template: { - value: 'TYPE', - }, - value: '{type}', -}; - filters.geo_bounding_box = { __template: { FIELD: { diff --git a/src/plugins/dashboard/public/application/dashboard_app_controller.tsx b/src/plugins/dashboard/public/application/dashboard_app_controller.tsx index 8dd0a766da97b..206ef4f3d4313 100644 --- a/src/plugins/dashboard/public/application/dashboard_app_controller.tsx +++ b/src/plugins/dashboard/public/application/dashboard_app_controller.tsx @@ -19,8 +19,9 @@ import _, { uniq } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { EUI_MODAL_CANCEL_BUTTON } from '@elastic/eui'; -import React from 'react'; +import { EUI_MODAL_CANCEL_BUTTON, EuiCheckboxGroup } from '@elastic/eui'; +import { EuiCheckboxGroupIdToSelectedMap } from '@elastic/eui/src/components/form/checkbox/checkbox_group'; +import React, { useState, ReactElement } from 'react'; import ReactDOM from 'react-dom'; import angular from 'angular'; @@ -41,6 +42,7 @@ import { QueryState, SavedQuery, syncQueryStateWithUrl, + UI_SETTINGS, } from '../../../data/public'; import { getSavedObjectFinder, SaveResult, showSaveModal } from '../../../saved_objects/public'; @@ -93,6 +95,25 @@ export interface DashboardAppControllerDependencies extends RenderDeps { navigation: NavigationStart; } +enum UrlParams { + SHOW_TOP_MENU = 'show-top-menu', + SHOW_QUERY_INPUT = 'show-query-input', + SHOW_TIME_FILTER = 'show-time-filter', + SHOW_FILTER_BAR = 'show-filter-bar', + HIDE_FILTER_BAR = 'hide-filter-bar', +} + +interface UrlParamsSelectedMap { + [UrlParams.SHOW_TOP_MENU]: boolean; + [UrlParams.SHOW_QUERY_INPUT]: boolean; + [UrlParams.SHOW_TIME_FILTER]: boolean; + [UrlParams.SHOW_FILTER_BAR]: boolean; +} + +interface UrlParamValues extends Omit { + [UrlParams.HIDE_FILTER_BAR]: boolean; +} + export class DashboardAppController { // Part of the exposed plugin API - do not remove without careful consideration. appStatus: { @@ -132,8 +153,16 @@ export class DashboardAppController { const filterManager = queryService.filterManager; const queryFilter = filterManager; const timefilter = queryService.timefilter.timefilter; - let showSearchBar = true; - let showQueryBar = true; + const isEmbeddedExternally = Boolean($routeParams.embed); + + // url param rules should only apply when embedded (e.g. url?embed=true) + const shouldForceDisplay = (param: string): boolean => + isEmbeddedExternally && Boolean($routeParams[param]); + + const forceShowTopNavMenu = shouldForceDisplay(UrlParams.SHOW_TOP_MENU); + const forceShowQueryInput = shouldForceDisplay(UrlParams.SHOW_QUERY_INPUT); + const forceShowDatePicker = shouldForceDisplay(UrlParams.SHOW_TIME_FILTER); + const forceHideFilterBar = shouldForceDisplay(UrlParams.HIDE_FILTER_BAR); let lastReloadRequestTime = 0; const dash = ($scope.dash = $route.current.locals.dash); @@ -250,9 +279,6 @@ export class DashboardAppController { } }; - const showFilterBar = () => - $scope.model.filters.length > 0 || !dashboardStateManager.getFullScreenMode(); - const getEmptyScreenProps = ( shouldShowEditHelp: boolean, isEmptyInReadOnlyMode: boolean @@ -298,6 +324,7 @@ export class DashboardAppController { viewMode: dashboardStateManager.getViewMode(), panels: embeddablesMap, isFullScreenMode: dashboardStateManager.getFullScreenMode(), + isEmbeddedExternally, isEmptyState: shouldShowEditHelp || shouldShowViewHelp || isEmptyInReadonlyMode, useMargins: dashboardStateManager.getUseMargins(), lastReloadRequestTime, @@ -430,7 +457,8 @@ export class DashboardAppController { dashboardStateManager.getQuery() || { query: '', language: - localStorage.get('kibana.userQueryLanguage') || uiSettings.get('search:queryLanguage'), + localStorage.get('kibana.userQueryLanguage') || + uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), }, queryFilter.getFilters() ); @@ -588,17 +616,33 @@ export class DashboardAppController { dashboardStateManager.setSavedQueryId(savedQueryId); }; + const shouldShowFilterBar = (forceHide: boolean): boolean => + !forceHide && ($scope.model.filters.length > 0 || !dashboardStateManager.getFullScreenMode()); + + const shouldShowNavBarComponent = (forceShow: boolean): boolean => + (forceShow || $scope.isVisible) && !dashboardStateManager.getFullScreenMode(); + const getNavBarProps = () => { const isFullScreenMode = dashboardStateManager.getFullScreenMode(); const screenTitle = dashboardStateManager.getTitle(); + const showTopNavMenu = shouldShowNavBarComponent(forceShowTopNavMenu); + const showQueryInput = shouldShowNavBarComponent(forceShowQueryInput); + const showDatePicker = shouldShowNavBarComponent(forceShowDatePicker); + const showQueryBar = showQueryInput || showDatePicker; + const showFilterBar = shouldShowFilterBar(forceHideFilterBar); + const showSearchBar = showQueryBar || showFilterBar; + return { appName: 'dashboard', - config: $scope.isVisible ? $scope.topNavMenu : undefined, + config: showTopNavMenu ? $scope.topNavMenu : undefined, className: isFullScreenMode ? 'kbnTopNavMenu-isFullScreen' : undefined, screenTitle, + showTopNavMenu, showSearchBar, showQueryBar, - showFilterBar: showFilterBar(), + showQueryInput, + showDatePicker, + showFilterBar, indexPatterns: $scope.indexPatterns, showSaveQuery: $scope.showSaveQuery, query: $scope.model.query, @@ -796,7 +840,6 @@ export class DashboardAppController { } = {}; navActions[TopNavIds.FULL_SCREEN] = () => { dashboardStateManager.setFullScreenMode(true); - showQueryBar = false; updateNavBar(); }; navActions[TopNavIds.EXIT_EDIT_MODE] = () => onChangeViewMode(ViewMode.VIEW); @@ -921,6 +964,80 @@ export class DashboardAppController { if (share) { // the share button is only availabale if "share" plugin contract enabled navActions[TopNavIds.SHARE] = (anchorElement) => { + const EmbedUrlParamExtension = ({ + setParamValue, + }: { + setParamValue: (paramUpdate: UrlParamValues) => void; + }): ReactElement => { + const [urlParamsSelectedMap, setUrlParamsSelectedMap] = useState({ + [UrlParams.SHOW_TOP_MENU]: false, + [UrlParams.SHOW_QUERY_INPUT]: false, + [UrlParams.SHOW_TIME_FILTER]: false, + [UrlParams.SHOW_FILTER_BAR]: true, + }); + + const checkboxes = [ + { + id: UrlParams.SHOW_TOP_MENU, + label: i18n.translate('dashboard.embedUrlParamExtension.topMenu', { + defaultMessage: 'Top menu', + }), + }, + { + id: UrlParams.SHOW_QUERY_INPUT, + label: i18n.translate('dashboard.embedUrlParamExtension.query', { + defaultMessage: 'Query', + }), + }, + { + id: UrlParams.SHOW_TIME_FILTER, + label: i18n.translate('dashboard.embedUrlParamExtension.timeFilter', { + defaultMessage: 'Time filter', + }), + }, + { + id: UrlParams.SHOW_FILTER_BAR, + label: i18n.translate('dashboard.embedUrlParamExtension.filterBar', { + defaultMessage: 'Filter bar', + }), + }, + ]; + + const handleChange = (param: string): void => { + const urlParamsSelectedMapUpdate = { + ...urlParamsSelectedMap, + [param]: !urlParamsSelectedMap[param as keyof UrlParamsSelectedMap], + }; + setUrlParamsSelectedMap(urlParamsSelectedMapUpdate); + + const urlParamValues = { + [UrlParams.SHOW_TOP_MENU]: urlParamsSelectedMap[UrlParams.SHOW_TOP_MENU], + [UrlParams.SHOW_QUERY_INPUT]: urlParamsSelectedMap[UrlParams.SHOW_QUERY_INPUT], + [UrlParams.SHOW_TIME_FILTER]: urlParamsSelectedMap[UrlParams.SHOW_TIME_FILTER], + [UrlParams.HIDE_FILTER_BAR]: !urlParamsSelectedMap[UrlParams.SHOW_FILTER_BAR], + [param === UrlParams.SHOW_FILTER_BAR ? UrlParams.HIDE_FILTER_BAR : param]: + param === UrlParams.SHOW_FILTER_BAR + ? urlParamsSelectedMap[UrlParams.SHOW_FILTER_BAR] + : !urlParamsSelectedMap[param as keyof UrlParamsSelectedMap], + }; + setParamValue(urlParamValues); + }; + + return ( + + ); + }; + share.toggleShareContextMenu({ anchorElement, allowEmbed: true, @@ -933,6 +1050,12 @@ export class DashboardAppController { title: dash.title, }, isDirty: dashboardStateManager.getIsDirty(), + embedUrlParamExtensions: [ + { + paramName: 'embed', + component: EmbedUrlParamExtension, + }, + ], }); }; } @@ -953,8 +1076,6 @@ export class DashboardAppController { const visibleSubscription = chrome.getIsVisible$().subscribe((isVisible) => { $scope.$evalAsync(() => { $scope.isVisible = isVisible; - showSearchBar = isVisible || showFilterBar(); - showQueryBar = !dashboardStateManager.getFullScreenMode() && isVisible; updateNavBar(); }); }); diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx index 7e25d80c9d619..2121ca4c784bd 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx @@ -57,6 +57,7 @@ export interface DashboardContainerInput extends ContainerInput { useMargins: boolean; title: string; description?: string; + isEmbeddedExternally: boolean; isFullScreenMode: boolean; panels: { [panelId: string]: DashboardPanelState; @@ -105,6 +106,7 @@ export class DashboardContainer extends Container - + , dom diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx index a20ba148115a0..22e18ddbf22d5 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx @@ -65,6 +65,7 @@ export class DashboardContainerFactory public getDefaultInput(): Partial { return { panels: {}, + isEmbeddedExternally: false, isFullScreenMode: false, useMargins: true, }; diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx index 9b7cec2f182ba..9a2610a82b97d 100644 --- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx +++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx @@ -80,6 +80,7 @@ function prepare(props?: Partial) { dashboardContainer = new DashboardContainer(initialInput, options); const defaultTestProps: DashboardGridProps = { container: dashboardContainer, + PanelComponent: () =>
, kibana: null as any, intl: null as any, }; diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx index 19d9ad34e729c..dcd07fe394c7d 100644 --- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx +++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx @@ -30,7 +30,7 @@ import React from 'react'; import { Subscription } from 'rxjs'; import ReactGridLayout, { Layout } from 'react-grid-layout'; import { GridData } from '../../../../common'; -import { ViewMode, EmbeddableChildPanel } from '../../../embeddable_plugin'; +import { ViewMode, EmbeddableChildPanel, EmbeddableStart } from '../../../embeddable_plugin'; import { DASHBOARD_GRID_COLUMN_COUNT, DASHBOARD_GRID_HEIGHT } from '../dashboard_constants'; import { DashboardPanelState } from '../types'; import { withKibana } from '../../../../../kibana_react/public'; @@ -115,6 +115,7 @@ const ResponsiveSizedGrid = sizeMe(config)(ResponsiveGrid); export interface DashboardGridProps extends ReactIntl.InjectedIntlProps { kibana: DashboardReactContextValue; + PanelComponent: EmbeddableStart['EmbeddablePanel']; container: DashboardContainer; } @@ -271,14 +272,7 @@ class DashboardGridUi extends React.Component {
); diff --git a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts index 62a39ee898d3a..1b060c186db97 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts @@ -108,16 +108,32 @@ interface IplacementDirection { fits: boolean; } +/** + * Compare grid data by an ending y coordinate. Grid data with a smaller ending y coordinate + * comes first. + * @param a + * @param b + */ +function comparePanels(a: GridData, b: GridData): number { + if (a.y + a.h < b.y + b.h) { + return -1; + } + if (a.y + a.h > b.y + b.h) { + return 1; + } + // a.y === b.y + if (a.x + a.w <= b.x + b.w) { + return -1; + } + return 1; +} + export function placePanelBeside({ width, height, currentPanels, placeBesideId, }: IPanelPlacementBesideArgs): Omit { - // const clonedPanels = _.cloneDeep(currentPanels); - if (!placeBesideId) { - throw new Error('Place beside method called without placeBesideId'); - } const panelToPlaceBeside = currentPanels[placeBesideId]; if (!panelToPlaceBeside) { throw new PanelNotFoundError(); @@ -130,10 +146,11 @@ export function placePanelBeside({ const possiblePlacementDirections: IplacementDirection[] = [ { grid: { x: beside.x + beside.w, y: beside.y, w: width, h: height }, fits: true }, // right - { grid: { x: beside.x - width, y: beside.y, w: width, h: height }, fits: true }, // left + { grid: { x: 0, y: beside.y + beside.h, w: width, h: height }, fits: true }, // left side of next row { grid: { x: beside.x, y: beside.y + beside.h, w: width, h: height }, fits: true }, // bottom ]; + // first, we check if there is place around the current panel for (const direction of possiblePlacementDirections) { if ( direction.grid.x >= 0 && @@ -156,13 +173,32 @@ export function placePanelBeside({ } } // if we get here that means there is no blank space around the panel we are placing beside. This means it's time to mess up the dashboard's groove. Fun! - const [, , bottomPlacement] = possiblePlacementDirections; - for (const currentPanelGrid of otherPanels) { - if (bottomPlacement.grid.y <= currentPanelGrid.y) { - const movedPanel = _.cloneDeep(currentPanels[currentPanelGrid.i]); - movedPanel.gridData.y = movedPanel.gridData.y + bottomPlacement.grid.h; - currentPanels[currentPanelGrid.i] = movedPanel; + /** + * 1. sort the panels in the grid + * 2. place the cloned panel to the bottom + * 3. reposition the panels after the cloned panel in the grid + */ + const grid = otherPanels.sort(comparePanels); + + let position = 0; + for (position; position < grid.length; position++) { + if (beside.i === grid[position].i) { + break; } } + const bottomPlacement = possiblePlacementDirections[2]; + // place to the bottom and move all other panels + let originalPositionInTheGrid = grid[position + 1].i; + const diff = + bottomPlacement.grid.y + + bottomPlacement.grid.h - + currentPanels[originalPositionInTheGrid].gridData.y; + + for (let j = position + 1; j < grid.length; j++) { + originalPositionInTheGrid = grid[j].i; + const movedPanel = _.cloneDeep(currentPanels[originalPositionInTheGrid]); + movedPanel.gridData.y = movedPanel.gridData.y + diff; + currentPanels[originalPositionInTheGrid] = movedPanel; + } return bottomPlacement.grid; } diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx index 1b257880b9401..25e451dc7f793 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx @@ -87,6 +87,7 @@ function getProps( dashboardContainer = new DashboardContainer(input, options); const defaultTestProps: DashboardViewportProps = { container: dashboardContainer, + PanelComponent: () =>
, }; return { diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx index ae239bc27fdba..9ee50426b19bb 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { Subscription } from 'rxjs'; -import { PanelState } from '../../../embeddable_plugin'; +import { PanelState, EmbeddableStart } from '../../../embeddable_plugin'; import { DashboardContainer, DashboardReactContextValue } from '../dashboard_container'; import { DashboardGrid } from '../grid'; import { context } from '../../../../../kibana_react/public'; @@ -27,6 +27,7 @@ import { context } from '../../../../../kibana_react/public'; export interface DashboardViewportProps { container: DashboardContainer; renderEmpty?: () => React.ReactNode; + PanelComponent: EmbeddableStart['EmbeddablePanel']; } interface State { @@ -35,6 +36,7 @@ interface State { title: string; description?: string; panels: { [key: string]: PanelState }; + isEmbeddedExternally?: boolean; isEmptyState?: boolean; } @@ -51,6 +53,7 @@ export class DashboardViewport extends React.Component {isFullScreenMode && ( )} {renderEmpty && renderEmpty()} @@ -114,8 +121,15 @@ export class DashboardViewport extends React.Component )} - +
); } diff --git a/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts b/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts index 4ceac90672cb3..825a69155ba22 100644 --- a/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts +++ b/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts @@ -27,6 +27,7 @@ export function getSampleDashboardInput( id: '123', filters: [], useMargins: false, + isEmbeddedExternally: false, isFullScreenMode: false, title: 'My Dashboard', query: { diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 0de3982039928..a3338ab3bbcbb 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -167,15 +167,26 @@ export class DashboardPlugin const getStartServices = async () => { const [coreStart, deps] = await core.getStartServices(); - const useHideChrome = () => { + const useHideChrome = ({ toggleChrome } = { toggleChrome: true }) => { React.useEffect(() => { - coreStart.chrome.setIsVisible(false); - return () => coreStart.chrome.setIsVisible(true); - }, []); + if (toggleChrome) { + coreStart.chrome.setIsVisible(false); + } + + return () => { + if (toggleChrome) { + coreStart.chrome.setIsVisible(true); + } + }; + }, [toggleChrome]); }; - const ExitFullScreenButton: React.FC = (props) => { - useHideChrome(); + const ExitFullScreenButton: React.FC< + ExitFullScreenButtonProps & { + toggleChrome: boolean; + } + > = ({ toggleChrome, ...props }) => { + useHideChrome({ toggleChrome }); return ; }; return { diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index 66a96e3e6e129..8ec72dc1f9a74 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -18,5 +18,33 @@ */ export const DEFAULT_QUERY_LANGUAGE = 'kuery'; -export const META_FIELDS_SETTING = 'metaFields'; -export const DOC_HIGHLIGHT_SETTING = 'doc_table:highlight'; + +export const UI_SETTINGS = { + META_FIELDS: 'metaFields', + DOC_HIGHLIGHT: 'doc_table:highlight', + QUERY_STRING_OPTIONS: 'query:queryString:options', + QUERY_ALLOW_LEADING_WILDCARDS: 'query:allowLeadingWildcards', + SEARCH_QUERY_LANGUAGE: 'search:queryLanguage', + SORT_OPTIONS: 'sort:options', + COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: 'courier:ignoreFilterIfFieldNotInIndex', + COURIER_SET_REQUEST_PREFERENCE: 'courier:setRequestPreference', + COURIER_CUSTOM_REQUEST_PREFERENCE: 'courier:customRequestPreference', + COURIER_MAX_CONCURRENT_SHARD_REQUESTS: 'courier:maxConcurrentShardRequests', + COURIER_BATCH_SEARCHES: 'courier:batchSearches', + SEARCH_INCLUDE_FROZEN: 'search:includeFrozen', + HISTOGRAM_BAR_TARGET: 'histogram:barTarget', + HISTOGRAM_MAX_BARS: 'histogram:maxBars', + HISTORY_LIMIT: 'history:limit', + SHORT_DOTS_ENABLE: 'shortDots:enable', + FORMAT_DEFAULT_TYPE_MAP: 'format:defaultTypeMap', + FORMAT_NUMBER_DEFAULT_PATTERN: 'format:number:defaultPattern', + FORMAT_PERCENT_DEFAULT_PATTERN: 'format:percent:defaultPattern', + FORMAT_BYTES_DEFAULT_PATTERN: 'format:bytes:defaultPattern', + FORMAT_CURRENCY_DEFAULT_PATTERN: 'format:currency:defaultPattern', + FORMAT_NUMBER_DEFAULT_LOCALE: 'format:number:defaultLocale', + TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: 'timepicker:refreshIntervalDefaults', + TIMEPICKER_QUICK_RANGES: 'timepicker:quickRanges', + INDEXPATTERN_PLACEHOLDER: 'indexPattern:placeholder', + FILTERS_PINNED_BY_DEFAULT: 'filters:pinnedByDefault', + FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues', +}; diff --git a/src/plugins/data/common/es_query/es_query/get_es_query_config.test.ts b/src/plugins/data/common/es_query/es_query/get_es_query_config.test.ts index d146d81973d0d..5fa3c67dea400 100644 --- a/src/plugins/data/common/es_query/es_query/get_es_query_config.test.ts +++ b/src/plugins/data/common/es_query/es_query/get_es_query_config.test.ts @@ -19,18 +19,19 @@ import { get } from 'lodash'; import { getEsQueryConfig } from './get_es_query_config'; import { IUiSettingsClient } from 'kibana/public'; +import { UI_SETTINGS } from '../../'; const config = ({ get(item: string) { return get(config, item); }, - 'query:allowLeadingWildcards': { + [UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS]: { allowLeadingWildcards: true, }, - 'query:queryString:options': { + [UI_SETTINGS.QUERY_STRING_OPTIONS]: { queryStringOptions: {}, }, - 'courier:ignoreFilterIfFieldNotInIndex': { + [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: { ignoreFilterIfFieldNotInIndex: true, }, 'dateFormat:tz': { diff --git a/src/plugins/data/common/es_query/es_query/get_es_query_config.ts b/src/plugins/data/common/es_query/es_query/get_es_query_config.ts index 0a82cf03bdb44..ff8fc5b11b26e 100644 --- a/src/plugins/data/common/es_query/es_query/get_es_query_config.ts +++ b/src/plugins/data/common/es_query/es_query/get_es_query_config.ts @@ -18,15 +18,18 @@ */ import { EsQueryConfig } from './build_es_query'; +import { UI_SETTINGS } from '../../'; interface KibanaConfig { get(key: string): T; } export function getEsQueryConfig(config: KibanaConfig) { - const allowLeadingWildcards = config.get('query:allowLeadingWildcards'); - const queryStringOptions = config.get('query:queryString:options'); - const ignoreFilterIfFieldNotInIndex = config.get('courier:ignoreFilterIfFieldNotInIndex'); + const allowLeadingWildcards = config.get(UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS); + const queryStringOptions = config.get(UI_SETTINGS.QUERY_STRING_OPTIONS); + const ignoreFilterIfFieldNotInIndex = config.get( + UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX + ); const dateFormatTZ = config.get('dateFormat:tz'); return { diff --git a/src/plugins/data/common/field_formats/converters/bytes.test.ts b/src/plugins/data/common/field_formats/converters/bytes.test.ts index 8dad9fc206e72..e0c26170c2907 100644 --- a/src/plugins/data/common/field_formats/converters/bytes.test.ts +++ b/src/plugins/data/common/field_formats/converters/bytes.test.ts @@ -18,11 +18,12 @@ */ import { BytesFormat } from './bytes'; +import { UI_SETTINGS } from '../../constants'; describe('BytesFormat', () => { const config: Record = {}; - config['format:bytes:defaultPattern'] = '0,0.[000]b'; + config[UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN] = '0,0.[000]b'; const getConfig = (key: string) => config[key]; diff --git a/src/plugins/data/common/field_formats/converters/number.test.ts b/src/plugins/data/common/field_formats/converters/number.test.ts index fe36d5b12e873..31c5ea41bf5af 100644 --- a/src/plugins/data/common/field_formats/converters/number.test.ts +++ b/src/plugins/data/common/field_formats/converters/number.test.ts @@ -18,11 +18,12 @@ */ import { NumberFormat } from './number'; +import { UI_SETTINGS } from '../../constants'; describe('NumberFormat', () => { const config: Record = {}; - config['format:number:defaultPattern'] = '0,0.[000]'; + config[UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN] = '0,0.[000]'; const getConfig = (key: string) => config[key]; diff --git a/src/plugins/data/common/field_formats/converters/numeral.ts b/src/plugins/data/common/field_formats/converters/numeral.ts index a483b5a1e4f99..1d844bca3f89a 100644 --- a/src/plugins/data/common/field_formats/converters/numeral.ts +++ b/src/plugins/data/common/field_formats/converters/numeral.ts @@ -24,6 +24,7 @@ import numeralLanguages from '@elastic/numeral/languages'; import { KBN_FIELD_TYPES } from '../../kbn_field_types/types'; import { FieldFormat } from '../field_format'; import { TextContextTypeConvert } from '../types'; +import { UI_SETTINGS } from '../../constants'; const numeralInst = numeral(); @@ -51,7 +52,8 @@ export abstract class NumeralFormat extends FieldFormat { if (isNaN(val)) return ''; const previousLocale = numeral.language(); - const defaultLocale = (this.getConfig && this.getConfig('format:number:defaultLocale')) || 'en'; + const defaultLocale = + (this.getConfig && this.getConfig(UI_SETTINGS.FORMAT_NUMBER_DEFAULT_LOCALE)) || 'en'; numeral.language(defaultLocale); const formatted = numeralInst.set(val).format(this.param('pattern')); diff --git a/src/plugins/data/common/field_formats/converters/percent.test.ts b/src/plugins/data/common/field_formats/converters/percent.test.ts index 8b26564814af3..754234bdeb78b 100644 --- a/src/plugins/data/common/field_formats/converters/percent.test.ts +++ b/src/plugins/data/common/field_formats/converters/percent.test.ts @@ -18,11 +18,12 @@ */ import { PercentFormat } from './percent'; +import { UI_SETTINGS } from '../../constants'; describe('PercentFormat', () => { const config: Record = {}; - config['format:percent:defaultPattern'] = '0,0.[000]%'; + config[UI_SETTINGS.FORMAT_PERCENT_DEFAULT_PATTERN] = '0,0.[000]%'; const getConfig = (key: string) => config[key]; diff --git a/src/plugins/data/common/field_formats/converters/percent.ts b/src/plugins/data/common/field_formats/converters/percent.ts index ef3b0a1503a98..ecf9c7d19108d 100644 --- a/src/plugins/data/common/field_formats/converters/percent.ts +++ b/src/plugins/data/common/field_formats/converters/percent.ts @@ -20,6 +20,7 @@ import { i18n } from '@kbn/i18n'; import { NumeralFormat } from './numeral'; import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types'; +import { UI_SETTINGS } from '../../constants'; export class PercentFormat extends NumeralFormat { static id = FIELD_FORMAT_IDS.PERCENT; @@ -32,7 +33,7 @@ export class PercentFormat extends NumeralFormat { allowsNumericalAggregations = true; getParamDefaults = () => ({ - pattern: this.getConfig!('format:percent:defaultPattern'), + pattern: this.getConfig!(UI_SETTINGS.FORMAT_PERCENT_DEFAULT_PATTERN), fractional: true, }); diff --git a/src/plugins/data/common/field_formats/converters/source.ts b/src/plugins/data/common/field_formats/converters/source.ts index 9e50d47bb2624..f00261e00971a 100644 --- a/src/plugins/data/common/field_formats/converters/source.ts +++ b/src/plugins/data/common/field_formats/converters/source.ts @@ -22,6 +22,7 @@ import { shortenDottedString } from '../../utils'; import { KBN_FIELD_TYPES } from '../../kbn_field_types/types'; import { FieldFormat } from '../field_format'; import { TextContextTypeConvert, HtmlContextTypeConvert, FIELD_FORMAT_IDS } from '../types'; +import { UI_SETTINGS } from '../../'; /** * Remove all of the whitespace between html tags @@ -71,7 +72,7 @@ export class SourceFormat extends FieldFormat { const formatted = field.indexPattern.formatHit(hit); const highlightPairs: any[] = []; const sourcePairs: any[] = []; - const isShortDots = this.getConfig!('shortDots:enable'); + const isShortDots = this.getConfig!(UI_SETTINGS.SHORT_DOTS_ENABLE); keys(formatted).forEach((key) => { const pairs = highlights[key] ? highlightPairs : sourcePairs; diff --git a/src/plugins/data/common/field_formats/field_formats_registry.ts b/src/plugins/data/common/field_formats/field_formats_registry.ts index c04a371066de3..9325485bce75d 100644 --- a/src/plugins/data/common/field_formats/field_formats_registry.ts +++ b/src/plugins/data/common/field_formats/field_formats_registry.ts @@ -33,6 +33,7 @@ import { baseFormatters } from './constants/base_formatters'; import { FieldFormat } from './field_format'; import { SerializedFieldFormat } from '../../../expressions/common/types'; import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '../types'; +import { UI_SETTINGS } from '../'; export class FieldFormatsRegistry { protected fieldFormats: Map = new Map(); @@ -49,7 +50,7 @@ export class FieldFormatsRegistry { metaParamsOptions: Record = {}, defaultFieldConverters: FieldFormatInstanceType[] = baseFormatters ) { - const defaultTypeMap = getConfig('format:defaultTypeMap'); + const defaultTypeMap = getConfig(UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP); this.register(defaultFieldConverters); this.parseDefaultTypeMap(defaultTypeMap); this.getConfig = getConfig; diff --git a/src/plugins/data/public/autocomplete/providers/value_suggestion_provider.ts b/src/plugins/data/public/autocomplete/providers/value_suggestion_provider.ts index ef7a0e8c3a5ad..a6a45a26f06b3 100644 --- a/src/plugins/data/public/autocomplete/providers/value_suggestion_provider.ts +++ b/src/plugins/data/public/autocomplete/providers/value_suggestion_provider.ts @@ -19,7 +19,7 @@ import { memoize } from 'lodash'; import { CoreSetup } from 'src/core/public'; -import { IIndexPattern, IFieldType } from '../../../common'; +import { IIndexPattern, IFieldType, UI_SETTINGS } from '../../../common'; function resolver(title: string, field: IFieldType, query: string, boolFilter: any) { // Only cache results for a minute @@ -58,7 +58,9 @@ export const setupValueSuggestionProvider = (core: CoreSetup): ValueSuggestionsG boolFilter, signal, }: ValueSuggestionsGetFnArgs): Promise => { - const shouldSuggestValues = core!.uiSettings.get('filterEditor:suggestValues'); + const shouldSuggestValues = core!.uiSettings.get( + UI_SETTINGS.FILTERS_EDITOR_SUGGEST_VALUES + ); const { title } = indexPattern; if (field.type === 'boolean') { diff --git a/src/plugins/data/public/field_formats/field_formats_service.ts b/src/plugins/data/public/field_formats/field_formats_service.ts index 22c7e90c06130..3ddc8d0b68a5b 100644 --- a/src/plugins/data/public/field_formats/field_formats_service.ts +++ b/src/plugins/data/public/field_formats/field_formats_service.ts @@ -18,7 +18,7 @@ */ import { CoreSetup } from 'src/core/public'; -import { FieldFormatsRegistry } from '../../common'; +import { FieldFormatsRegistry, UI_SETTINGS } from '../../common'; import { deserializeFieldFormat } from './utils/deserialize'; import { FormatFactory } from '../../common/field_formats/utils'; import { baseFormattersPublic } from './constants'; @@ -28,7 +28,7 @@ export class FieldFormatsService { public setup(core: CoreSetup) { core.uiSettings.getUpdate$().subscribe(({ key, newValue }) => { - if (key === 'format:defaultTypeMap') { + if (key === UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP) { this.fieldFormatsRegistry.parseDefaultTypeMap(newValue); } }); diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index 0c946fc6e1858..5540039323756 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -17,8 +17,6 @@ * under the License. */ -import './index.scss'; - import { PluginInitializerContext } from '../../../core/public'; import { ConfigSchema } from '../config'; @@ -267,6 +265,7 @@ export { ES_FIELD_TYPES, KBN_FIELD_TYPES, IndexPatternAttributes, + UI_SETTINGS, } from '../common'; /* diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts index 43404c32cb3d4..3d54009d0fdca 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts @@ -33,7 +33,7 @@ import { KBN_FIELD_TYPES, IIndexPattern, IFieldType, - META_FIELDS_SETTING, + UI_SETTINGS, } from '../../../common'; import { findByTitle } from '../utils'; import { IndexPatternMissingIndices } from '../lib'; @@ -108,8 +108,8 @@ export class IndexPattern implements IIndexPattern { // which cause problems when being consumed from angular this.getConfig = getConfig; - this.shortDotsEnable = this.getConfig('shortDots:enable'); - this.metaFields = this.getConfig(META_FIELDS_SETTING); + this.shortDotsEnable = this.getConfig(UI_SETTINGS.SHORT_DOTS_ENABLE); + this.metaFields = this.getConfig(UI_SETTINGS.META_FIELDS); this.createFieldList = getIndexPatternFieldListCreator({ fieldFormats: getFieldFormats(), @@ -117,8 +117,12 @@ export class IndexPattern implements IIndexPattern { }); this.fields = this.createFieldList(this, [], this.shortDotsEnable); - this.fieldsFetcher = createFieldsFetcher(this, apiClient, this.getConfig(META_FIELDS_SETTING)); - this.flattenHit = flattenHitWrapper(this, this.getConfig(META_FIELDS_SETTING)); + this.fieldsFetcher = createFieldsFetcher( + this, + apiClient, + this.getConfig(UI_SETTINGS.META_FIELDS) + ); + this.flattenHit = flattenHitWrapper(this, this.getConfig(UI_SETTINGS.META_FIELDS)); this.formatHit = formatHitProvider( this, getFieldFormats().getDefaultInstance(KBN_FIELD_TYPES.STRING) diff --git a/src/plugins/data/public/plugin.ts b/src/plugins/data/public/plugin.ts index 66e8d5a6e739a..06b5cbdfdfdfb 100644 --- a/src/plugins/data/public/plugin.ts +++ b/src/plugins/data/public/plugin.ts @@ -17,6 +17,8 @@ * under the License. */ +import './index.scss'; + import { PluginInitializerContext, CoreSetup, diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index ebb4e9d583bc0..dcdb528ac8b7d 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -1792,6 +1792,39 @@ export interface TimeRange { // @public export type TSearchStrategyProvider = (context: ISearchContext) => ISearchStrategy; +// Warning: (ae-missing-release-tag) "UI_SETTINGS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const UI_SETTINGS: { + META_FIELDS: string; + DOC_HIGHLIGHT: string; + QUERY_STRING_OPTIONS: string; + QUERY_ALLOW_LEADING_WILDCARDS: string; + SEARCH_QUERY_LANGUAGE: string; + SORT_OPTIONS: string; + COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string; + COURIER_SET_REQUEST_PREFERENCE: string; + COURIER_CUSTOM_REQUEST_PREFERENCE: string; + COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string; + COURIER_BATCH_SEARCHES: string; + SEARCH_INCLUDE_FROZEN: string; + HISTOGRAM_BAR_TARGET: string; + HISTOGRAM_MAX_BARS: string; + HISTORY_LIMIT: string; + SHORT_DOTS_ENABLE: string; + FORMAT_DEFAULT_TYPE_MAP: string; + FORMAT_NUMBER_DEFAULT_PATTERN: string; + FORMAT_PERCENT_DEFAULT_PATTERN: string; + FORMAT_BYTES_DEFAULT_PATTERN: string; + FORMAT_CURRENCY_DEFAULT_PATTERN: string; + FORMAT_NUMBER_DEFAULT_LOCALE: string; + TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string; + TIMEPICKER_QUICK_RANGES: string; + INDEXPATTERN_PLACEHOLDER: string; + FILTERS_PINNED_BY_DEFAULT: string; + FILTERS_EDITOR_SUGGEST_VALUES: string; +}; + // Warnings were encountered during analysis: // @@ -1800,52 +1833,52 @@ export type TSearchStrategyProvider = (context: ISearc // src/plugins/data/common/es_query/filters/match_all_filter.ts:28:3 - (ae-forgotten-export) The symbol "MatchAllFilterMeta" needs to be exported by the entry point index.d.ts // src/plugins/data/common/es_query/filters/phrase_filter.ts:33:3 - (ae-forgotten-export) The symbol "PhraseFilterMeta" needs to be exported by the entry point index.d.ts // src/plugins/data/common/es_query/filters/phrases_filter.ts:31:3 - (ae-forgotten-export) The symbol "PhrasesFilterMeta" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "FilterLabel" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "FILTERS" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "getDisplayValueFromFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "generateFilters" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "changeTimeFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "convertRangeFilterToTimeRangeString" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:67:23 - (ae-forgotten-export) The symbol "extractTimeFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:138:21 - (ae-forgotten-export) The symbol "buildEsQuery" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:138:21 - (ae-forgotten-export) The symbol "getEsQueryConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:138:21 - (ae-forgotten-export) The symbol "luceneStringToDsl" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:138:21 - (ae-forgotten-export) The symbol "decorateQuery" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "ColorFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "DateNanosFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "DurationFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "IpFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "NumberFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "PercentFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "RelativeDateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "SourceFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "StaticLookupFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:180:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:380:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:381:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:392:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:397:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:401:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:404:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "FilterLabel" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "FILTERS" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "getDisplayValueFromFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "generateFilters" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "changeTimeFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "convertRangeFilterToTimeRangeString" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:65:23 - (ae-forgotten-export) The symbol "extractTimeFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:136:21 - (ae-forgotten-export) The symbol "buildEsQuery" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:136:21 - (ae-forgotten-export) The symbol "getEsQueryConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:136:21 - (ae-forgotten-export) The symbol "luceneStringToDsl" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:136:21 - (ae-forgotten-export) The symbol "decorateQuery" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "ColorFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "DateNanosFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "DurationFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "IpFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "NumberFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "PercentFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "RelativeDateFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "SourceFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "StaticLookupFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:178:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:379:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:380:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:389:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:395:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:399:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:403:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:33:33 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:37:1 - (ae-forgotten-export) The symbol "QueryStateChange" needs to be exported by the entry point index.d.ts // src/plugins/data/public/types.ts:52:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/public/query/filter_manager/filter_manager.test.ts b/src/plugins/data/public/query/filter_manager/filter_manager.test.ts index 3c69a498e74cd..878142906f54b 100644 --- a/src/plugins/data/public/query/filter_manager/filter_manager.test.ts +++ b/src/plugins/data/public/query/filter_manager/filter_manager.test.ts @@ -24,14 +24,14 @@ import { Subscription } from 'rxjs'; import { FilterManager } from './filter_manager'; import { getFilter } from './test_helpers/get_stub_filter'; import { getFiltersArray } from './test_helpers/get_filters_array'; -import { Filter, FilterStateStore } from '../../../common'; +import { Filter, FilterStateStore, UI_SETTINGS } from '../../../common'; import { coreMock } from '../../../../../core/public/mocks'; const setupMock = coreMock.createSetup(); const uiSettingsMock = (pinnedByDefault: boolean) => (key: string) => { switch (key) { - case 'filters:pinnedByDefault': + case UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT: return pinnedByDefault; default: throw new Error(`Unexpected uiSettings key in FilterManager mock: ${key}`); diff --git a/src/plugins/data/public/query/filter_manager/filter_manager.ts b/src/plugins/data/public/query/filter_manager/filter_manager.ts index d58a0eb45c04f..60a49a4bd50f4 100644 --- a/src/plugins/data/public/query/filter_manager/filter_manager.ts +++ b/src/plugins/data/public/query/filter_manager/filter_manager.ts @@ -34,6 +34,7 @@ import { isFilterPinned, compareFilters, COMPARE_ALL_OPTIONS, + UI_SETTINGS, } from '../../../common'; export class FilterManager { @@ -129,7 +130,7 @@ export class FilterManager { public addFilters( filters: Filter[] | Filter, - pinFilterStatus: boolean = this.uiSettings.get('filters:pinnedByDefault') + pinFilterStatus: boolean = this.uiSettings.get(UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT) ) { if (!Array.isArray(filters)) { filters = [filters]; @@ -157,7 +158,7 @@ export class FilterManager { public setFilters( newFilters: Filter[], - pinFilterStatus: boolean = this.uiSettings.get('filters:pinnedByDefault') + pinFilterStatus: boolean = this.uiSettings.get(UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT) ) { const store = pinFilterStatus ? FilterStateStore.GLOBAL_STATE : FilterStateStore.APP_STATE; diff --git a/src/plugins/data/public/query/lib/get_query_log.ts b/src/plugins/data/public/query/lib/get_query_log.ts index a71eb7580cf07..b7827d2c8de02 100644 --- a/src/plugins/data/public/query/lib/get_query_log.ts +++ b/src/plugins/data/public/query/lib/get_query_log.ts @@ -20,6 +20,7 @@ import { IUiSettingsClient } from 'src/core/public'; import { IStorageWrapper } from 'src/plugins/kibana_utils/public'; import { PersistedLog } from '../persisted_log'; +import { UI_SETTINGS } from '../../../common'; export function getQueryLog( uiSettings: IUiSettingsClient, @@ -30,7 +31,7 @@ export function getQueryLog( return new PersistedLog( `typeahead:${appName}-${language}`, { - maxLength: uiSettings.get('history:limit'), + maxLength: uiSettings.get(UI_SETTINGS.HISTORY_LIMIT), filterDuplicates: true, }, storage diff --git a/src/plugins/data/public/query/state_sync/connect_to_query_state.test.ts b/src/plugins/data/public/query/state_sync/connect_to_query_state.test.ts index 06e4c1c8be6d5..4e394445b75ae 100644 --- a/src/plugins/data/public/query/state_sync/connect_to_query_state.test.ts +++ b/src/plugins/data/public/query/state_sync/connect_to_query_state.test.ts @@ -20,7 +20,7 @@ import { Subscription } from 'rxjs'; import { FilterManager } from '../filter_manager'; import { getFilter } from '../filter_manager/test_helpers/get_stub_filter'; -import { Filter, FilterStateStore } from '../../../common'; +import { Filter, FilterStateStore, UI_SETTINGS } from '../../../common'; import { coreMock } from '../../../../../core/public/mocks'; import { BaseStateContainer, createStateContainer, Storage } from '../../../../kibana_utils/public'; import { QueryService, QueryStart } from '../query_service'; @@ -46,11 +46,11 @@ const startMock = coreMock.createStart(); setupMock.uiSettings.get.mockImplementation((key: string) => { switch (key) { - case 'filters:pinnedByDefault': + case UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT: return true; case 'timepicker:timeDefaults': return { from: 'now-15m', to: 'now' }; - case 'timepicker:refreshIntervalDefaults': + case UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: return { pause: false, value: 0 }; default: throw new Error(`sync_query test: not mocked uiSetting: ${key}`); diff --git a/src/plugins/data/public/query/state_sync/sync_state_with_url.test.ts b/src/plugins/data/public/query/state_sync/sync_state_with_url.test.ts index 50dc35ea955ee..7727153537257 100644 --- a/src/plugins/data/public/query/state_sync/sync_state_with_url.test.ts +++ b/src/plugins/data/public/query/state_sync/sync_state_with_url.test.ts @@ -21,7 +21,7 @@ import { Subscription } from 'rxjs'; import { createBrowserHistory, History } from 'history'; import { FilterManager } from '../filter_manager'; import { getFilter } from '../filter_manager/test_helpers/get_stub_filter'; -import { Filter, FilterStateStore } from '../../../common'; +import { Filter, FilterStateStore, UI_SETTINGS } from '../../../common'; import { coreMock } from '../../../../../core/public/mocks'; import { createKbnUrlStateStorage, @@ -39,11 +39,11 @@ const startMock = coreMock.createStart(); setupMock.uiSettings.get.mockImplementation((key: string) => { switch (key) { - case 'filters:pinnedByDefault': + case UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT: return true; case 'timepicker:timeDefaults': return { from: 'now-15m', to: 'now' }; - case 'timepicker:refreshIntervalDefaults': + case UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: return { pause: false, value: 0 }; default: throw new Error(`sync_query test: not mocked uiSetting: ${key}`); diff --git a/src/plugins/data/public/query/timefilter/timefilter_service.ts b/src/plugins/data/public/query/timefilter/timefilter_service.ts index 413163ed059ad..df2fbc8e5a8f3 100644 --- a/src/plugins/data/public/query/timefilter/timefilter_service.ts +++ b/src/plugins/data/public/query/timefilter/timefilter_service.ts @@ -20,6 +20,7 @@ import { IUiSettingsClient } from 'src/core/public'; import { IStorageWrapper } from 'src/plugins/kibana_utils/public'; import { TimeHistory, Timefilter, TimeHistoryContract, TimefilterContract } from './index'; +import { UI_SETTINGS } from '../../../common'; /** * Filter Service @@ -35,7 +36,7 @@ export class TimefilterService { public setup({ uiSettings, storage }: TimeFilterServiceDependencies): TimefilterSetup { const timefilterConfig = { timeDefaults: uiSettings.get('timepicker:timeDefaults'), - refreshIntervalDefaults: uiSettings.get('timepicker:refreshIntervalDefaults'), + refreshIntervalDefaults: uiSettings.get(UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS), }; const history = new TimeHistory(storage); const timefilter = new Timefilter(timefilterConfig, history); diff --git a/src/plugins/data/public/search/aggs/buckets/date_histogram.ts b/src/plugins/data/public/search/aggs/buckets/date_histogram.ts index d5c97d0c95c5c..8a5596f669cb7 100644 --- a/src/plugins/data/public/search/aggs/buckets/date_histogram.ts +++ b/src/plugins/data/public/search/aggs/buckets/date_histogram.ts @@ -31,7 +31,7 @@ import { dateHistogramInterval, TimeRange } from '../../../../common'; import { writeParams } from '../agg_params'; import { isMetricAggType } from '../metrics/metric_agg_type'; -import { FIELD_FORMAT_IDS, KBN_FIELD_TYPES } from '../../../../common'; +import { FIELD_FORMAT_IDS, KBN_FIELD_TYPES, UI_SETTINGS } from '../../../../common'; import { TimefilterContract } from '../../../query'; import { QuerySetup } from '../../../query/query_service'; import { GetInternalStartServicesFn } from '../../../types'; @@ -125,8 +125,8 @@ export const getDateHistogramBucketAgg = ({ const { timefilter } = query.timefilter; buckets = new TimeBuckets({ - 'histogram:maxBars': uiSettings.get('histogram:maxBars'), - 'histogram:barTarget': uiSettings.get('histogram:barTarget'), + 'histogram:maxBars': uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS), + 'histogram:barTarget': uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET), dateFormat: uiSettings.get('dateFormat'), 'dateFormat:scaled': uiSettings.get('dateFormat:scaled'), }); diff --git a/src/plugins/data/public/search/aggs/buckets/filters.ts b/src/plugins/data/public/search/aggs/buckets/filters.ts index 3f3f13bb955c1..4052c0b390155 100644 --- a/src/plugins/data/public/search/aggs/buckets/filters.ts +++ b/src/plugins/data/public/search/aggs/buckets/filters.ts @@ -26,7 +26,7 @@ import { toAngularJSON } from '../utils'; import { BucketAggType } from './bucket_agg_type'; import { BUCKET_TYPES } from './bucket_agg_types'; import { Storage } from '../../../../../../plugins/kibana_utils/public'; -import { getEsQueryConfig, buildEsQuery, Query } from '../../../../common'; +import { getEsQueryConfig, buildEsQuery, Query, UI_SETTINGS } from '../../../../common'; import { getQueryLog } from '../../../query'; import { GetInternalStartServicesFn } from '../../../types'; import { BaseAggParams } from '../types'; @@ -69,7 +69,10 @@ export const getFiltersBucketAgg = ({ { name: 'filters', default: [ - { input: { query: '', language: uiSettings.get('search:queryLanguage') }, label: '' }, + { + input: { query: '', language: uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE) }, + label: '', + }, ], write(aggConfig, output) { const inFilters: FilterValue[] = aggConfig.params.filters; diff --git a/src/plugins/data/public/search/aggs/buckets/histogram.ts b/src/plugins/data/public/search/aggs/buckets/histogram.ts index d04df4f8aac6b..c1fad17f488db 100644 --- a/src/plugins/data/public/search/aggs/buckets/histogram.ts +++ b/src/plugins/data/public/search/aggs/buckets/histogram.ts @@ -24,7 +24,7 @@ import { IUiSettingsClient } from 'src/core/public'; import { BucketAggType, IBucketAggConfig } from './bucket_agg_type'; import { createFilterHistogram } from './create_filter/histogram'; import { BUCKET_TYPES } from './bucket_agg_types'; -import { KBN_FIELD_TYPES } from '../../../../common'; +import { KBN_FIELD_TYPES, UI_SETTINGS } from '../../../../common'; import { GetInternalStartServicesFn } from '../../../types'; import { BaseAggParams } from '../types'; import { ExtendedBounds } from './lib/extended_bounds'; @@ -155,8 +155,8 @@ export const getHistogramBucketAgg = ({ const range = autoBounds.max - autoBounds.min; const bars = range / interval; - if (bars > uiSettings.get('histogram:maxBars')) { - const minInterval = range / uiSettings.get('histogram:maxBars'); + if (bars > uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS)) { + const minInterval = range / uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS); // Round interval by order of magnitude to provide clean intervals // Always round interval up so there will always be less buckets than histogram:maxBars diff --git a/src/plugins/data/public/search/aggs/utils/calculate_auto_time_expression.ts b/src/plugins/data/public/search/aggs/utils/calculate_auto_time_expression.ts index 9d976784329cc..30fcdd9d83a38 100644 --- a/src/plugins/data/public/search/aggs/utils/calculate_auto_time_expression.ts +++ b/src/plugins/data/public/search/aggs/utils/calculate_auto_time_expression.ts @@ -19,7 +19,7 @@ import moment from 'moment'; import { IUiSettingsClient } from 'src/core/public'; import { TimeBuckets } from '../buckets/lib/time_buckets'; -import { toAbsoluteDates, TimeRange } from '../../../../common'; +import { toAbsoluteDates, TimeRange, UI_SETTINGS } from '../../../../common'; export function getCalculateAutoTimeExpression(uiSettings: IUiSettingsClient) { return function calculateAutoTimeExpression(range: TimeRange) { @@ -29,8 +29,8 @@ export function getCalculateAutoTimeExpression(uiSettings: IUiSettingsClient) { } const buckets = new TimeBuckets({ - 'histogram:maxBars': uiSettings.get('histogram:maxBars'), - 'histogram:barTarget': uiSettings.get('histogram:barTarget'), + 'histogram:maxBars': uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS), + 'histogram:barTarget': uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET), dateFormat: uiSettings.get('dateFormat'), 'dateFormat:scaled': uiSettings.get('dateFormat:scaled'), }); diff --git a/src/plugins/data/public/search/es_search/get_es_preference.test.ts b/src/plugins/data/public/search/es_search/get_es_preference.test.ts index 8b8156b4519d6..05a74b3e6205a 100644 --- a/src/plugins/data/public/search/es_search/get_es_preference.test.ts +++ b/src/plugins/data/public/search/es_search/get_es_preference.test.ts @@ -20,6 +20,7 @@ import { getEsPreference } from './get_es_preference'; import { CoreStart } from '../../../../../core/public'; import { coreMock } from '../../../../../core/public/mocks'; +import { UI_SETTINGS } from '../../../common'; describe('Get ES preference', () => { let mockCoreStart: MockedKeys; @@ -30,8 +31,8 @@ describe('Get ES preference', () => { test('returns the session ID if set to sessionId', () => { mockCoreStart.uiSettings.get.mockImplementation((key: string) => { - if (key === 'courier:setRequestPreference') return 'sessionId'; - if (key === 'courier:customRequestPreference') return 'foobar'; + if (key === UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE) return 'sessionId'; + if (key === UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE) return 'foobar'; }); const preference = getEsPreference(mockCoreStart.uiSettings, 'my_session_id'); expect(preference).toBe('my_session_id'); @@ -39,8 +40,8 @@ describe('Get ES preference', () => { test('returns the custom preference if set to custom', () => { mockCoreStart.uiSettings.get.mockImplementation((key: string) => { - if (key === 'courier:setRequestPreference') return 'custom'; - if (key === 'courier:customRequestPreference') return 'foobar'; + if (key === UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE) return 'custom'; + if (key === UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE) return 'foobar'; }); const preference = getEsPreference(mockCoreStart.uiSettings); expect(preference).toBe('foobar'); @@ -48,8 +49,8 @@ describe('Get ES preference', () => { test('returns undefined if set to none', () => { mockCoreStart.uiSettings.get.mockImplementation((key: string) => { - if (key === 'courier:setRequestPreference') return 'none'; - if (key === 'courier:customRequestPreference') return 'foobar'; + if (key === UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE) return 'none'; + if (key === UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE) return 'foobar'; }); const preference = getEsPreference(mockCoreStart.uiSettings); expect(preference).toBe(undefined); diff --git a/src/plugins/data/public/search/es_search/get_es_preference.ts b/src/plugins/data/public/search/es_search/get_es_preference.ts index 3f1c2b9b3b736..5e40712067bb0 100644 --- a/src/plugins/data/public/search/es_search/get_es_preference.ts +++ b/src/plugins/data/public/search/es_search/get_es_preference.ts @@ -18,12 +18,13 @@ */ import { IUiSettingsClient } from '../../../../../core/public'; +import { UI_SETTINGS } from '../../../common'; const defaultSessionId = `${Date.now()}`; export function getEsPreference(uiSettings: IUiSettingsClient, sessionId = defaultSessionId) { - const setPreference = uiSettings.get('courier:setRequestPreference'); + const setPreference = uiSettings.get(UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE); if (setPreference === 'sessionId') return `${sessionId}`; - const customPreference = uiSettings.get('courier:customRequestPreference'); + const customPreference = uiSettings.get(UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE); return setPreference === 'custom' ? customPreference : undefined; } diff --git a/src/plugins/data/public/search/fetch/get_search_params.test.ts b/src/plugins/data/public/search/fetch/get_search_params.test.ts index 4809d76a46f59..f9b62fdd4fc61 100644 --- a/src/plugins/data/public/search/fetch/get_search_params.test.ts +++ b/src/plugins/data/public/search/fetch/get_search_params.test.ts @@ -19,6 +19,7 @@ import { getSearchParams } from './get_search_params'; import { IUiSettingsClient } from 'kibana/public'; +import { UI_SETTINGS } from '../../../common'; function getConfigStub(config: any = {}) { return { @@ -40,21 +41,21 @@ describe('getSearchParams', () => { }); test('includes ignore_throttled according to search:includeFrozen', () => { - let config = getConfigStub({ 'search:includeFrozen': true }); + let config = getConfigStub({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: true }); let searchParams = getSearchParams(config); expect(searchParams.ignore_throttled).toBe(false); - config = getConfigStub({ 'search:includeFrozen': false }); + config = getConfigStub({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false }); searchParams = getSearchParams(config); expect(searchParams.ignore_throttled).toBe(true); }); test('includes max_concurrent_shard_requests according to courier:maxConcurrentShardRequests', () => { - let config = getConfigStub({ 'courier:maxConcurrentShardRequests': 0 }); + let config = getConfigStub({ [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: 0 }); let searchParams = getSearchParams(config); expect(searchParams.max_concurrent_shard_requests).toBe(undefined); - config = getConfigStub({ 'courier:maxConcurrentShardRequests': 5 }); + config = getConfigStub({ [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: 5 }); searchParams = getSearchParams(config); expect(searchParams.max_concurrent_shard_requests).toBe(5); }); diff --git a/src/plugins/data/public/search/fetch/get_search_params.ts b/src/plugins/data/public/search/fetch/get_search_params.ts index f0c43bd2e74cd..60bdc9ed6473a 100644 --- a/src/plugins/data/public/search/fetch/get_search_params.ts +++ b/src/plugins/data/public/search/fetch/get_search_params.ts @@ -18,6 +18,7 @@ */ import { IUiSettingsClient } from 'kibana/public'; +import { UI_SETTINGS } from '../../../common'; const sessionId = Date.now(); @@ -33,19 +34,19 @@ export function getSearchParams(config: IUiSettingsClient, esShardTimeout: numbe } export function getIgnoreThrottled(config: IUiSettingsClient) { - return !config.get('search:includeFrozen'); + return !config.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); } export function getMaxConcurrentShardRequests(config: IUiSettingsClient) { - const maxConcurrentShardRequests = config.get('courier:maxConcurrentShardRequests'); + const maxConcurrentShardRequests = config.get(UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS); return maxConcurrentShardRequests > 0 ? maxConcurrentShardRequests : undefined; } export function getPreference(config: IUiSettingsClient) { - const setRequestPreference = config.get('courier:setRequestPreference'); + const setRequestPreference = config.get(UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE); if (setRequestPreference === 'sessionId') return sessionId; return setRequestPreference === 'custom' - ? config.get('courier:customRequestPreference') + ? config.get(UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE) : undefined; } diff --git a/src/plugins/data/public/search/legacy/default_search_strategy.test.ts b/src/plugins/data/public/search/legacy/default_search_strategy.test.ts index c619c9b17d9a8..436b522744622 100644 --- a/src/plugins/data/public/search/legacy/default_search_strategy.test.ts +++ b/src/plugins/data/public/search/legacy/default_search_strategy.test.ts @@ -21,6 +21,7 @@ import { IUiSettingsClient } from 'kibana/public'; import { defaultSearchStrategy } from './default_search_strategy'; import { searchStartMock } from '../mocks'; import { SearchStrategySearchParams } from './types'; +import { UI_SETTINGS } from '../../../common'; const { search } = defaultSearchStrategy; @@ -69,30 +70,30 @@ describe('defaultSearchStrategy', function () { }); test('does not send max_concurrent_shard_requests by default', async () => { - const config = getConfigStub({ 'courier:batchSearches': true }); + const config = getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true }); await search({ ...searchArgs, config }); expect(es.msearch.mock.calls[0][0].max_concurrent_shard_requests).toBe(undefined); }); test('allows configuration of max_concurrent_shard_requests', async () => { const config = getConfigStub({ - 'courier:batchSearches': true, - 'courier:maxConcurrentShardRequests': 42, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, + [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: 42, }); await search({ ...searchArgs, config }); expect(es.msearch.mock.calls[0][0].max_concurrent_shard_requests).toBe(42); }); test('should set rest_total_hits_as_int to true on a request', async () => { - const config = getConfigStub({ 'courier:batchSearches': true }); + const config = getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true }); await search({ ...searchArgs, config }); expect(es.msearch.mock.calls[0][0]).toHaveProperty('rest_total_hits_as_int', true); }); test('should set ignore_throttled=false when including frozen indices', async () => { const config = getConfigStub({ - 'courier:batchSearches': true, - 'search:includeFrozen': true, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, + [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: true, }); await search({ ...searchArgs, config }); expect(es.msearch.mock.calls[0][0]).toHaveProperty('ignore_throttled', false); @@ -100,7 +101,7 @@ describe('defaultSearchStrategy', function () { test('should properly call abort with msearch', () => { const config = getConfigStub({ - 'courier:batchSearches': true, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, }); search({ ...searchArgs, config }).abort(); expect(msearchMockResponse.abort).toHaveBeenCalled(); diff --git a/src/plugins/data/public/search/legacy/fetch_soon.test.ts b/src/plugins/data/public/search/legacy/fetch_soon.test.ts index e99e13ba33d1a..61d3568350b6b 100644 --- a/src/plugins/data/public/search/legacy/fetch_soon.test.ts +++ b/src/plugins/data/public/search/legacy/fetch_soon.test.ts @@ -22,6 +22,7 @@ import { callClient } from './call_client'; import { IUiSettingsClient } from 'kibana/public'; import { FetchHandlers, FetchOptions } from '../fetch/types'; import { SearchRequest, SearchResponse } from '../index'; +import { UI_SETTINGS } from '../../../common'; function getConfigStub(config: any = {}) { return { @@ -60,7 +61,7 @@ describe('fetchSoon', () => { test('should execute asap if config is set to not batch searches', () => { const config = getConfigStub({ - 'courier:batchSearches': false, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: false, }); const request = {}; const options = {}; @@ -72,7 +73,7 @@ describe('fetchSoon', () => { test('should delay by 50ms if config is set to batch searches', () => { const config = getConfigStub({ - 'courier:batchSearches': true, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, }); const request = {}; const options = {}; @@ -88,7 +89,7 @@ describe('fetchSoon', () => { test('should send a batch of requests to callClient', () => { const config = getConfigStub({ - 'courier:batchSearches': true, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, }); const requests = [{ foo: 1 }, { foo: 2 }]; const options = [{ bar: 1 }, { bar: 2 }]; @@ -105,7 +106,7 @@ describe('fetchSoon', () => { test('should return the response to the corresponding call for multiple batched requests', async () => { const config = getConfigStub({ - 'courier:batchSearches': true, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, }); const requests = [{ _mockResponseId: 'foo' }, { _mockResponseId: 'bar' }]; @@ -120,7 +121,7 @@ describe('fetchSoon', () => { test('should wait for the previous batch to start before starting a new batch', () => { const config = getConfigStub({ - 'courier:batchSearches': true, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true, }); const firstBatch = [{ foo: 1 }, { foo: 2 }]; const secondBatch = [{ bar: 1 }, { bar: 2 }]; diff --git a/src/plugins/data/public/search/legacy/fetch_soon.ts b/src/plugins/data/public/search/legacy/fetch_soon.ts index 304c1c4d63f5b..fed2c52bc491f 100644 --- a/src/plugins/data/public/search/legacy/fetch_soon.ts +++ b/src/plugins/data/public/search/legacy/fetch_soon.ts @@ -20,6 +20,7 @@ import { callClient } from './call_client'; import { FetchHandlers, FetchOptions } from '../fetch/types'; import { SearchRequest, SearchResponse } from '../index'; +import { UI_SETTINGS } from '../../../common'; /** * This function introduces a slight delay in the request process to allow multiple requests to queue @@ -30,7 +31,7 @@ export async function fetchSoon( options: FetchOptions, fetchHandlers: FetchHandlers ) { - const msToDelay = fetchHandlers.config.get('courier:batchSearches') ? 50 : 0; + const msToDelay = fetchHandlers.config.get(UI_SETTINGS.COURIER_BATCH_SEARCHES) ? 50 : 0; return delayedFetch(request, options, fetchHandlers, msToDelay); } diff --git a/src/plugins/data/public/search/legacy/get_msearch_params.test.ts b/src/plugins/data/public/search/legacy/get_msearch_params.test.ts index ce98f6ab2a7bb..dc61e19406631 100644 --- a/src/plugins/data/public/search/legacy/get_msearch_params.test.ts +++ b/src/plugins/data/public/search/legacy/get_msearch_params.test.ts @@ -19,6 +19,7 @@ import { getMSearchParams } from './get_msearch_params'; import { IUiSettingsClient } from '../../../../../core/public'; +import { UI_SETTINGS } from '../../../common'; function getConfigStub(config: any = {}) { return { @@ -34,29 +35,29 @@ describe('getMSearchParams', () => { }); test('includes ignore_throttled according to search:includeFrozen', () => { - let config = getConfigStub({ 'search:includeFrozen': true }); + let config = getConfigStub({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: true }); let msearchParams = getMSearchParams(config); expect(msearchParams.ignore_throttled).toBe(false); - config = getConfigStub({ 'search:includeFrozen': false }); + config = getConfigStub({ [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false }); msearchParams = getMSearchParams(config); expect(msearchParams.ignore_throttled).toBe(true); }); test('includes max_concurrent_shard_requests according to courier:maxConcurrentShardRequests if greater than 0', () => { - let config = getConfigStub({ 'courier:maxConcurrentShardRequests': 0 }); + let config = getConfigStub({ [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: 0 }); let msearchParams = getMSearchParams(config); expect(msearchParams.max_concurrent_shard_requests).toBe(undefined); - config = getConfigStub({ 'courier:maxConcurrentShardRequests': 5 }); + config = getConfigStub({ [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: 5 }); msearchParams = getMSearchParams(config); expect(msearchParams.max_concurrent_shard_requests).toBe(5); }); test('does not include other search params that are included in the msearch header or body', () => { const config = getConfigStub({ - 'search:includeFrozen': false, - 'courier:maxConcurrentShardRequests': 5, + [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: false, + [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: 5, }); const msearchParams = getMSearchParams(config); expect(msearchParams.hasOwnProperty('ignore_unavailable')).toBe(false); diff --git a/src/plugins/data/public/search/search_source/search_source.ts b/src/plugins/data/public/search/search_source/search_source.ts index 38f4ce73713c8..b926739112e0e 100644 --- a/src/plugins/data/public/search/search_source/search_source.ts +++ b/src/plugins/data/public/search/search_source/search_source.ts @@ -75,12 +75,11 @@ import { CoreStart } from 'kibana/public'; import { normalizeSortRequest } from './normalize_sort_request'; import { filterDocvalueFields } from './filter_docvalue_fields'; import { fieldWildcardFilter } from '../../../../kibana_utils/public'; -import { META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING } from '../../../common'; import { IIndexPattern, ISearchGeneric, SearchRequest } from '../..'; import { SearchSourceOptions, SearchSourceFields } from './types'; import { FetchOptions, RequestFailure, getSearchParams, handleResponse } from '../fetch'; -import { getEsQueryConfig, buildEsQuery, Filter } from '../../../common'; +import { getEsQueryConfig, buildEsQuery, Filter, UI_SETTINGS } from '../../../common'; import { getHighlightRequest } from '../../../common/field_formats'; import { fetchSoon } from '../legacy'; import { extractReferences } from './extract_references'; @@ -251,7 +250,7 @@ export class SearchSource { this.history = [searchRequest]; let response; - if (uiSettings.get('courier:batchSearches')) { + if (uiSettings.get(UI_SETTINGS.COURIER_BATCH_SEARCHES)) { response = await this.legacyFetch(searchRequest, options); } else { response = this.fetch$(searchRequest, options.abortSignal).toPromise(); @@ -365,7 +364,7 @@ export class SearchSource { const sort = normalizeSortRequest( val, this.getField('index'), - uiSettings.get('sort:options') + uiSettings.get(UI_SETTINGS.SORT_OPTIONS) ); return addToBody(key, sort); default: @@ -425,7 +424,7 @@ export class SearchSource { // exclude source fields for this index pattern specified by the user const filter = fieldWildcardFilter( body._source.excludes, - uiSettings.get(META_FIELDS_SETTING) + uiSettings.get(UI_SETTINGS.META_FIELDS) ); body.docvalue_fields = body.docvalue_fields.filter((docvalueField: any) => filter(docvalueField.field) @@ -448,7 +447,7 @@ export class SearchSource { body.query = buildEsQuery(index, query, filters, esQueryConfigs); if (highlightAll && body.query) { - body.highlight = getHighlightRequest(body.query, uiSettings.get(DOC_HIGHLIGHT_SETTING)); + body.highlight = getHighlightRequest(body.query, uiSettings.get(UI_SETTINGS.DOC_HIGHLIGHT)); delete searchRequest.highlightAll; } diff --git a/src/plugins/data/public/ui/filter_bar/_global_filter_group.scss b/src/plugins/data/public/ui/filter_bar/_global_filter_group.scss index 1c47c28097454..731c9f4d7f18d 100644 --- a/src/plugins/data/public/ui/filter_bar/_global_filter_group.scss +++ b/src/plugins/data/public/ui/filter_bar/_global_filter_group.scss @@ -3,6 +3,10 @@ padding: 0px $euiSizeS $euiSizeS $euiSizeS; } +.globalQueryBar:first-child { + padding-top: $euiSizeS; +} + .globalQueryBar:not(:empty) { padding-bottom: $euiSizeS; } diff --git a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx index a54a25acc5913..43dba150bf8d4 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx @@ -36,6 +36,7 @@ import { toggleFilterDisabled, toggleFilterNegated, unpinFilter, + UI_SETTINGS, } from '../../../common'; interface Props { @@ -76,7 +77,7 @@ function FilterBarUI(props: Props) { } function renderAddFilter() { - const isPinned = uiSettings!.get('filters:pinnedByDefault'); + const isPinned = uiSettings!.get(UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT); const [indexPattern] = props.indexPatterns; const index = indexPattern && indexPattern.id; const newFilter = buildEmptyFilter(isPinned, index); diff --git a/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_suggestor.tsx b/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_suggestor.tsx index 546365b89d9be..94138f60b52b1 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_suggestor.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_suggestor.tsx @@ -22,6 +22,7 @@ import { debounce } from 'lodash'; import { withKibana, KibanaReactContextValue } from '../../../../../kibana_react/public'; import { IDataPluginServices, IIndexPattern, IFieldType } from '../../..'; +import { UI_SETTINGS } from '../../../../common'; export interface PhraseSuggestorProps { kibana: KibanaReactContextValue; @@ -54,7 +55,9 @@ export class PhraseSuggestorUI extends React.Com } protected isSuggestingValues() { - const shouldSuggestValues = this.services.uiSettings.get('filterEditor:suggestValues'); + const shouldSuggestValues = this.services.uiSettings.get( + UI_SETTINGS.FILTERS_EDITOR_SUGGEST_VALUES + ); const { field } = this.props; return shouldSuggestValues && field && field.aggregatable && field.type === 'string'; } diff --git a/src/plugins/data/public/ui/filter_bar/filter_item.tsx b/src/plugins/data/public/ui/filter_bar/filter_item.tsx index c44e1faeb8e7f..053fca7d5773b 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_item.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_item.tsx @@ -74,7 +74,8 @@ export function FilterItem(props: Props) { setIndexPatternExists(false); }); } else { - setIndexPatternExists(false); + // Allow filters without an index pattern and don't validate them. + setIndexPatternExists(true); } }, [props.filter.meta.index]); @@ -244,6 +245,9 @@ export function FilterItem(props: Props) { * This function makes this behavior explicit, but it needs to be revised. */ function isFilterApplicable() { + // Any filter is applicable if no index patterns were provided to FilterBar. + if (!props.indexPatterns.length) return true; + const ip = getIndexPatternFromFilter(filter, indexPatterns); if (ip) return true; diff --git a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.test.tsx b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.test.tsx index f579adbc0c7e2..5f2d4c00cd6b6 100644 --- a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.test.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.test.tsx @@ -28,6 +28,7 @@ import { dataPluginMock } from '../../mocks'; import { KibanaContextProvider } from 'src/plugins/kibana_react/public'; import { I18nProvider } from '@kbn/i18n/react'; import { stubIndexPatternWithFields } from '../../stubs'; +import { UI_SETTINGS } from '../../../common'; const startMock = coreMock.createStart(); const mockTimeHistory = { @@ -38,7 +39,7 @@ const mockTimeHistory = { startMock.uiSettings.get.mockImplementation((key: string) => { switch (key) { - case 'timepicker:quickRanges': + case UI_SETTINGS.TIMEPICKER_QUICK_RANGES: return [ { from: 'now/d', @@ -48,7 +49,7 @@ startMock.uiSettings.get.mockImplementation((key: string) => { ]; case 'dateFormat': return 'MMM D, YYYY @ HH:mm:ss.SSS'; - case 'history:limit': + case UI_SETTINGS.HISTORY_LIMIT: return 10; case 'timepicker:timeDefaults': return { diff --git a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx index 433cb652ee5ce..f65bf97e391e2 100644 --- a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx @@ -38,7 +38,7 @@ import { Toast } from 'src/core/public'; import { IDataPluginServices, IIndexPattern, TimeRange, TimeHistoryContract, Query } from '../..'; import { useKibana, toMountPoint } from '../../../../kibana_react/public'; import { QueryStringInput } from './query_string_input'; -import { doesKueryExpressionHaveLuceneSyntaxError } from '../../../common'; +import { doesKueryExpressionHaveLuceneSyntaxError, UI_SETTINGS } from '../../../common'; import { PersistedLog, getQueryLog } from '../../query'; interface Props { @@ -255,7 +255,7 @@ export function QueryBarTopRow(props: Props) { } const commonlyUsedRanges = uiSettings! - .get('timepicker:quickRanges') + .get(UI_SETTINGS.TIMEPICKER_QUICK_RANGES) .map(({ from, to, display }: { from: string; to: string; display: string }) => { return { start: from, diff --git a/src/plugins/data/public/ui/search_bar/create_search_bar.tsx b/src/plugins/data/public/ui/search_bar/create_search_bar.tsx index 7723254f3aa51..81e84e3198072 100644 --- a/src/plugins/data/public/ui/search_bar/create_search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/create_search_bar.tsx @@ -27,7 +27,7 @@ import { useFilterManager } from './lib/use_filter_manager'; import { useTimefilter } from './lib/use_timefilter'; import { useSavedQuery } from './lib/use_saved_query'; import { DataPublicPluginStart } from '../../types'; -import { Filter, Query, TimeRange } from '../../../common'; +import { Filter, Query, TimeRange, UI_SETTINGS } from '../../../common'; interface StatefulSearchBarDeps { core: CoreStart; @@ -125,7 +125,8 @@ export function createSearchBar({ core, storage, data }: StatefulSearchBarDeps) const defaultQuery = { query: '', language: - storage.get('kibana.userQueryLanguage') || core.uiSettings.get('search:queryLanguage'), + storage.get('kibana.userQueryLanguage') || + core.uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), }; const [query, setQuery] = useState(props.query || defaultQuery); @@ -134,12 +135,14 @@ export function createSearchBar({ core, storage, data }: StatefulSearchBarDeps) queryRef.current = props.query; setQuery(props.query || defaultQuery); } + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [defaultQuery, props.query]); useEffect(() => { if (props.onQuerySubmit !== onQuerySubmitRef.current) { onQuerySubmitRef.current = props.onQuerySubmit; } + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [props.onQuerySubmit]); // handle service state updates. diff --git a/src/plugins/data/server/index.ts b/src/plugins/data/server/index.ts index 72a29e377ac54..831d23864d228 100644 --- a/src/plugins/data/server/index.ts +++ b/src/plugins/data/server/index.ts @@ -146,6 +146,7 @@ export { ES_FIELD_TYPES, KBN_FIELD_TYPES, IndexPatternAttributes, + UI_SETTINGS, } from '../common'; /** diff --git a/src/plugins/data/server/kql_telemetry/usage_collector/fetch.test.ts b/src/plugins/data/server/kql_telemetry/usage_collector/fetch.test.ts index 446320b09757a..81e352fea51b2 100644 --- a/src/plugins/data/server/kql_telemetry/usage_collector/fetch.test.ts +++ b/src/plugins/data/server/kql_telemetry/usage_collector/fetch.test.ts @@ -22,6 +22,9 @@ import { APICaller } from 'kibana/server'; jest.mock('../../../common', () => ({ DEFAULT_QUERY_LANGUAGE: 'lucene', + UI_SETTINGS: { + SEARCH_QUERY_LANGUAGE: 'search:queryLanguage', + }, })); let fetch: ReturnType; diff --git a/src/plugins/data/server/kql_telemetry/usage_collector/fetch.ts b/src/plugins/data/server/kql_telemetry/usage_collector/fetch.ts index 9f3437161541f..157716b38f523 100644 --- a/src/plugins/data/server/kql_telemetry/usage_collector/fetch.ts +++ b/src/plugins/data/server/kql_telemetry/usage_collector/fetch.ts @@ -19,7 +19,7 @@ import { get } from 'lodash'; import { APICaller } from 'kibana/server'; -import { DEFAULT_QUERY_LANGUAGE } from '../../../common'; +import { DEFAULT_QUERY_LANGUAGE, UI_SETTINGS } from '../../../common'; const defaultSearchQueryLanguageSetting = DEFAULT_QUERY_LANGUAGE; @@ -40,7 +40,7 @@ export function fetchProvider(index: string) { const queryLanguageConfigValue = get( config, - 'hits.hits[0]._source.config.search:queryLanguage' + `hits.hits[0]._source.config.${UI_SETTINGS.SEARCH_QUERY_LANGUAGE}` ); // search:queryLanguage can potentially be in four states in the .kibana index: diff --git a/src/plugins/data/server/plugin.ts b/src/plugins/data/server/plugin.ts index df7a7b9cf4d01..8c9d0df2ed894 100644 --- a/src/plugins/data/server/plugin.ts +++ b/src/plugins/data/server/plugin.ts @@ -28,7 +28,7 @@ import { KqlTelemetryService } from './kql_telemetry'; import { UsageCollectionSetup } from '../../usage_collection/server'; import { AutocompleteService } from './autocomplete'; import { FieldFormatsService, FieldFormatsSetup, FieldFormatsStart } from './field_formats'; -import { uiSettings } from './ui_settings'; +import { getUiSettings } from './ui_settings'; export interface DataPluginSetup { search: ISearchSetup; @@ -65,7 +65,8 @@ export class DataServerPlugin implements Plugin = (context: ISearchContext, caller: APICaller_2, search: ISearchGeneric) => ISearchStrategy; +// Warning: (ae-missing-release-tag) "UI_SETTINGS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const UI_SETTINGS: { + META_FIELDS: string; + DOC_HIGHLIGHT: string; + QUERY_STRING_OPTIONS: string; + QUERY_ALLOW_LEADING_WILDCARDS: string; + SEARCH_QUERY_LANGUAGE: string; + SORT_OPTIONS: string; + COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string; + COURIER_SET_REQUEST_PREFERENCE: string; + COURIER_CUSTOM_REQUEST_PREFERENCE: string; + COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string; + COURIER_BATCH_SEARCHES: string; + SEARCH_INCLUDE_FROZEN: string; + HISTOGRAM_BAR_TARGET: string; + HISTOGRAM_MAX_BARS: string; + HISTORY_LIMIT: string; + SHORT_DOTS_ENABLE: string; + FORMAT_DEFAULT_TYPE_MAP: string; + FORMAT_NUMBER_DEFAULT_PATTERN: string; + FORMAT_PERCENT_DEFAULT_PATTERN: string; + FORMAT_BYTES_DEFAULT_PATTERN: string; + FORMAT_CURRENCY_DEFAULT_PATTERN: string; + FORMAT_NUMBER_DEFAULT_LOCALE: string; + TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string; + TIMEPICKER_QUICK_RANGES: string; + INDEXPATTERN_PLACEHOLDER: string; + FILTERS_PINNED_BY_DEFAULT: string; + FILTERS_EDITOR_SUGGEST_VALUES: string; +}; + // Warnings were encountered during analysis: // @@ -745,12 +778,12 @@ export type TSearchStrategyProvider = (context: ISearc // src/plugins/data/server/index.ts:103:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts // src/plugins/data/server/index.ts:131:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts // src/plugins/data/server/index.ts:131:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:183:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:184:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:185:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:186:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:187:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:190:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:184:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:185:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:186:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:187:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:188:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:191:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/server/plugin.ts:66:14 - (ae-forgotten-export) The symbol "ISearchSetup" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 5af62be295201..de978c7968aee 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -19,33 +19,652 @@ import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; - import { UiSettingsParams } from 'kibana/server'; -import { META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING } from '../common'; +// @ts-ignore untyped module +import numeralLanguages from '@elastic/numeral/languages'; +import { DEFAULT_QUERY_LANGUAGE, UI_SETTINGS } from '../common'; + +const luceneQueryLanguageLabel = i18n.translate('data.advancedSettings.searchQueryLanguageLucene', { + defaultMessage: 'Lucene', +}); + +const queryLanguageSettingName = i18n.translate('data.advancedSettings.searchQueryLanguageTitle', { + defaultMessage: 'Query language', +}); -export const uiSettings: Record = { - [META_FIELDS_SETTING]: { - name: i18n.translate('data.advancedSettings.metaFieldsTitle', { - defaultMessage: 'Meta fields', - }), - value: ['_source', '_id', '_type', '_index', '_score'], - description: i18n.translate('data.advancedSettings.metaFieldsText', { - defaultMessage: - 'Fields that exist outside of _source to merge into our document when displaying it', - }), - schema: schema.arrayOf(schema.string()), - }, - [DOC_HIGHLIGHT_SETTING]: { - name: i18n.translate('data.advancedSettings.docTableHighlightTitle', { - defaultMessage: 'Highlight results', - }), - value: true, - description: i18n.translate('data.advancedSettings.docTableHighlightText', { - defaultMessage: - 'Highlight results in Discover and Saved Searches Dashboard. ' + - 'Highlighting makes requests slow when working on big documents.', - }), - category: ['discover'], - schema: schema.boolean(), - }, +const requestPreferenceOptionLabels = { + sessionId: i18n.translate('data.advancedSettings.courier.requestPreferenceSessionId', { + defaultMessage: 'Session ID', + }), + custom: i18n.translate('data.advancedSettings.courier.requestPreferenceCustom', { + defaultMessage: 'Custom', + }), + none: i18n.translate('data.advancedSettings.courier.requestPreferenceNone', { + defaultMessage: 'None', + }), }; + +// We add the `en` key manually here, since that's not a real numeral locale, but the +// default fallback in case the locale is not found. +const numeralLanguageIds = [ + 'en', + ...numeralLanguages.map((numeralLanguage: any) => { + return numeralLanguage.id; + }), +]; + +export function getUiSettings(): Record> { + return { + [UI_SETTINGS.META_FIELDS]: { + name: i18n.translate('data.advancedSettings.metaFieldsTitle', { + defaultMessage: 'Meta fields', + }), + value: ['_source', '_id', '_type', '_index', '_score'], + description: i18n.translate('data.advancedSettings.metaFieldsText', { + defaultMessage: + 'Fields that exist outside of _source to merge into our document when displaying it', + }), + schema: schema.arrayOf(schema.string()), + }, + [UI_SETTINGS.DOC_HIGHLIGHT]: { + name: i18n.translate('data.advancedSettings.docTableHighlightTitle', { + defaultMessage: 'Highlight results', + }), + value: true, + description: i18n.translate('data.advancedSettings.docTableHighlightText', { + defaultMessage: + 'Highlight results in Discover and Saved Searches Dashboard. ' + + 'Highlighting makes requests slow when working on big documents.', + }), + category: ['discover'], + schema: schema.boolean(), + }, + [UI_SETTINGS.QUERY_STRING_OPTIONS]: { + name: i18n.translate('data.advancedSettings.query.queryStringOptionsTitle', { + defaultMessage: 'Query string options', + }), + value: '{ "analyze_wildcard": true }', + description: i18n.translate('data.advancedSettings.query.queryStringOptionsText', { + defaultMessage: + '{optionsLink} for the lucene query string parser. Is only used when "{queryLanguage}" is set ' + + 'to {luceneLanguage}.', + description: + 'Part of composite text: data.advancedSettings.query.queryStringOptions.optionsLinkText + ' + + 'data.advancedSettings.query.queryStringOptionsText', + values: { + optionsLink: + '' + + i18n.translate('data.advancedSettings.query.queryStringOptions.optionsLinkText', { + defaultMessage: 'Options', + }) + + '', + luceneLanguage: luceneQueryLanguageLabel, + queryLanguage: queryLanguageSettingName, + }, + }), + type: 'json', + schema: schema.object({ + analyze_wildcard: schema.boolean(), + }), + }, + [UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS]: { + name: i18n.translate('data.advancedSettings.query.allowWildcardsTitle', { + defaultMessage: 'Allow leading wildcards in query', + }), + value: true, + description: i18n.translate('data.advancedSettings.query.allowWildcardsText', { + defaultMessage: + 'When set, * is allowed as the first character in a query clause. ' + + 'Currently only applies when experimental query features are enabled in the query bar. ' + + 'To disallow leading wildcards in basic lucene queries, use {queryStringOptionsPattern}.', + values: { + queryStringOptionsPattern: UI_SETTINGS.QUERY_STRING_OPTIONS, + }, + }), + schema: schema.boolean(), + }, + [UI_SETTINGS.SEARCH_QUERY_LANGUAGE]: { + name: queryLanguageSettingName, + value: DEFAULT_QUERY_LANGUAGE, + description: i18n.translate('data.advancedSettings.searchQueryLanguageText', { + defaultMessage: + 'Query language used by the query bar. KQL is a new language built specifically for Kibana.', + }), + type: 'select', + options: ['lucene', 'kuery'], + optionLabels: { + lucene: luceneQueryLanguageLabel, + kuery: i18n.translate('data.advancedSettings.searchQueryLanguageKql', { + defaultMessage: 'KQL', + }), + }, + schema: schema.string(), + }, + [UI_SETTINGS.SORT_OPTIONS]: { + name: i18n.translate('data.advancedSettings.sortOptionsTitle', { + defaultMessage: 'Sort options', + }), + value: '{ "unmapped_type": "boolean" }', + description: i18n.translate('data.advancedSettings.sortOptionsText', { + defaultMessage: '{optionsLink} for the Elasticsearch sort parameter', + description: + 'Part of composite text: data.advancedSettings.sortOptions.optionsLinkText + ' + + 'data.advancedSettings.sortOptionsText', + values: { + optionsLink: + '' + + i18n.translate('data.advancedSettings.sortOptions.optionsLinkText', { + defaultMessage: 'Options', + }) + + '', + }, + }), + type: 'json', + schema: schema.object({ + unmapped_type: schema.string(), + }), + }, + defaultIndex: { + name: i18n.translate('data.advancedSettings.defaultIndexTitle', { + defaultMessage: 'Default index', + }), + value: null, + type: 'string', + description: i18n.translate('data.advancedSettings.defaultIndexText', { + defaultMessage: 'The index to access if no index is set', + }), + schema: schema.nullable(schema.string()), + }, + [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: { + name: i18n.translate('data.advancedSettings.courier.ignoreFilterTitle', { + defaultMessage: 'Ignore filter(s)', + }), + value: false, + description: i18n.translate('data.advancedSettings.courier.ignoreFilterText', { + defaultMessage: + 'This configuration enhances support for dashboards containing visualizations accessing dissimilar indexes. ' + + 'When disabled, all filters are applied to all visualizations. ' + + 'When enabled, filter(s) will be ignored for a visualization ' + + `when the visualization's index does not contain the filtering field.`, + }), + category: ['search'], + schema: schema.boolean(), + }, + [UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE]: { + name: i18n.translate('data.advancedSettings.courier.requestPreferenceTitle', { + defaultMessage: 'Request preference', + }), + value: 'sessionId', + options: ['sessionId', 'custom', 'none'], + optionLabels: requestPreferenceOptionLabels, + type: 'select', + description: i18n.translate('data.advancedSettings.courier.requestPreferenceText', { + defaultMessage: `Allows you to set which shards handle your search requests. +
    +
  • {sessionId}: restricts operations to execute all search requests on the same shards. + This has the benefit of reusing shard caches across requests.
  • +
  • {custom}: allows you to define a your own preference. + Use 'courier:customRequestPreference' to customize your preference value.
  • +
  • {none}: means do not set a preference. + This might provide better performance because requests can be spread across all shard copies. + However, results might be inconsistent because different shards might be in different refresh states.
  • +
`, + values: { + sessionId: requestPreferenceOptionLabels.sessionId, + custom: requestPreferenceOptionLabels.custom, + none: requestPreferenceOptionLabels.none, + }, + }), + category: ['search'], + schema: schema.string(), + }, + [UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE]: { + name: i18n.translate('data.advancedSettings.courier.customRequestPreferenceTitle', { + defaultMessage: 'Custom request preference', + }), + value: '_local', + type: 'string', + description: i18n.translate('data.advancedSettings.courier.customRequestPreferenceText', { + defaultMessage: + '{requestPreferenceLink} used when {setRequestReferenceSetting} is set to {customSettingValue}.', + description: + 'Part of composite text: data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText + ' + + 'data.advancedSettings.courier.customRequestPreferenceText', + values: { + setRequestReferenceSetting: `${UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE}`, + customSettingValue: '"custom"', + requestPreferenceLink: + '' + + i18n.translate( + 'data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText', + { + defaultMessage: 'Request Preference', + } + ) + + '', + }, + }), + category: ['search'], + schema: schema.string(), + }, + [UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS]: { + name: i18n.translate('data.advancedSettings.courier.maxRequestsTitle', { + defaultMessage: 'Max Concurrent Shard Requests', + }), + value: 0, + type: 'number', + description: i18n.translate('data.advancedSettings.courier.maxRequestsText', { + defaultMessage: + 'Controls the {maxRequestsLink} setting used for _msearch requests sent by Kibana. ' + + 'Set to 0 to disable this config and use the Elasticsearch default.', + values: { + maxRequestsLink: `max_concurrent_shard_requests`, + }, + }), + category: ['search'], + schema: schema.number(), + }, + [UI_SETTINGS.COURIER_BATCH_SEARCHES]: { + name: i18n.translate('data.advancedSettings.courier.batchSearchesTitle', { + defaultMessage: 'Batch concurrent searches', + }), + value: false, + type: 'boolean', + description: i18n.translate('data.advancedSettings.courier.batchSearchesText', { + defaultMessage: `When disabled, dashboard panels will load individually, and search requests will terminate when users navigate + away or update the query. When enabled, dashboard panels will load together when all of the data is loaded, and + searches will not terminate.`, + }), + deprecation: { + message: i18n.translate('data.advancedSettings.courier.batchSearchesTextDeprecation', { + defaultMessage: 'This setting is deprecated and will be removed in Kibana 8.0.', + }), + docLinksKey: 'kibanaSearchSettings', + }, + category: ['search'], + schema: schema.boolean(), + }, + [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: { + name: 'Search in frozen indices', + description: `Will include frozen indices in results if enabled. Searching through frozen indices + might increase the search time.`, + value: false, + category: ['search'], + schema: schema.boolean(), + }, + [UI_SETTINGS.HISTOGRAM_BAR_TARGET]: { + name: i18n.translate('data.advancedSettings.histogram.barTargetTitle', { + defaultMessage: 'Target bars', + }), + value: 50, + description: i18n.translate('data.advancedSettings.histogram.barTargetText', { + defaultMessage: + 'Attempt to generate around this many bars when using "auto" interval in date histograms', + }), + schema: schema.number(), + }, + [UI_SETTINGS.HISTOGRAM_MAX_BARS]: { + name: i18n.translate('data.advancedSettings.histogram.maxBarsTitle', { + defaultMessage: 'Maximum bars', + }), + value: 100, + description: i18n.translate('data.advancedSettings.histogram.maxBarsText', { + defaultMessage: + 'Never show more than this many bars in date histograms, scale values if needed', + }), + schema: schema.number(), + }, + [UI_SETTINGS.HISTORY_LIMIT]: { + name: i18n.translate('data.advancedSettings.historyLimitTitle', { + defaultMessage: 'History limit', + }), + value: 10, + description: i18n.translate('data.advancedSettings.historyLimitText', { + defaultMessage: + 'In fields that have history (e.g. query inputs), show this many recent values', + }), + schema: schema.number(), + }, + [UI_SETTINGS.SHORT_DOTS_ENABLE]: { + name: i18n.translate('data.advancedSettings.shortenFieldsTitle', { + defaultMessage: 'Shorten fields', + }), + value: false, + description: i18n.translate('data.advancedSettings.shortenFieldsText', { + defaultMessage: 'Shorten long fields, for example, instead of foo.bar.baz, show f.b.baz', + }), + schema: schema.boolean(), + }, + [UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP]: { + name: i18n.translate('data.advancedSettings.format.defaultTypeMapTitle', { + defaultMessage: 'Field type format name', + }), + value: `{ + "ip": { "id": "ip", "params": {} }, + "date": { "id": "date", "params": {} }, + "date_nanos": { "id": "date_nanos", "params": {}, "es": true }, + "number": { "id": "number", "params": {} }, + "boolean": { "id": "boolean", "params": {} }, + "_source": { "id": "_source", "params": {} }, + "_default_": { "id": "string", "params": {} } +}`, + type: 'json', + description: i18n.translate('data.advancedSettings.format.defaultTypeMapText', { + defaultMessage: + 'Map of the format name to use by default for each field type. ' + + '{defaultFormat} is used if the field type is not mentioned explicitly', + values: { + defaultFormat: '"_default_"', + }, + }), + schema: schema.object({ + ip: schema.object({ + id: schema.string(), + params: schema.object({}), + }), + date: schema.object({ + id: schema.string(), + params: schema.object({}), + }), + date_nanos: schema.object({ + id: schema.string(), + params: schema.object({}), + es: schema.boolean(), + }), + number: schema.object({ + id: schema.string(), + params: schema.object({}), + }), + boolean: schema.object({ + id: schema.string(), + params: schema.object({}), + }), + _source: schema.object({ + id: schema.string(), + params: schema.object({}), + }), + _default_: schema.object({ + id: schema.string(), + params: schema.object({}), + }), + }), + }, + [UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN]: { + name: i18n.translate('data.advancedSettings.format.numberFormatTitle', { + defaultMessage: 'Number format', + }), + value: '0,0.[000]', + type: 'string', + description: i18n.translate('data.advancedSettings.format.numberFormatText', { + defaultMessage: 'Default {numeralFormatLink} for the "number" format', + description: + 'Part of composite text: data.advancedSettings.format.numberFormatText + ' + + 'data.advancedSettings.format.numberFormat.numeralFormatLinkText', + values: { + numeralFormatLink: + '' + + i18n.translate('data.advancedSettings.format.numberFormat.numeralFormatLinkText', { + defaultMessage: 'numeral format', + }) + + '', + }, + }), + schema: schema.string(), + }, + [UI_SETTINGS.FORMAT_PERCENT_DEFAULT_PATTERN]: { + name: i18n.translate('data.advancedSettings.format.percentFormatTitle', { + defaultMessage: 'Percent format', + }), + value: '0,0.[000]%', + type: 'string', + description: i18n.translate('data.advancedSettings.format.percentFormatText', { + defaultMessage: 'Default {numeralFormatLink} for the "percent" format', + description: + 'Part of composite text: data.advancedSettings.format.percentFormatText + ' + + 'data.advancedSettings.format.percentFormat.numeralFormatLinkText', + values: { + numeralFormatLink: + '' + + i18n.translate('data.advancedSettings.format.percentFormat.numeralFormatLinkText', { + defaultMessage: 'numeral format', + }) + + '', + }, + }), + schema: schema.string(), + }, + [UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: { + name: i18n.translate('data.advancedSettings.format.bytesFormatTitle', { + defaultMessage: 'Bytes format', + }), + value: '0,0.[0]b', + type: 'string', + description: i18n.translate('data.advancedSettings.format.bytesFormatText', { + defaultMessage: 'Default {numeralFormatLink} for the "bytes" format', + description: + 'Part of composite text: data.advancedSettings.format.bytesFormatText + ' + + 'data.advancedSettings.format.bytesFormat.numeralFormatLinkText', + values: { + numeralFormatLink: + '' + + i18n.translate('data.advancedSettings.format.bytesFormat.numeralFormatLinkText', { + defaultMessage: 'numeral format', + }) + + '', + }, + }), + schema: schema.string(), + }, + [UI_SETTINGS.FORMAT_CURRENCY_DEFAULT_PATTERN]: { + name: i18n.translate('data.advancedSettings.format.currencyFormatTitle', { + defaultMessage: 'Currency format', + }), + value: '($0,0.[00])', + type: 'string', + description: i18n.translate('data.advancedSettings.format.currencyFormatText', { + defaultMessage: 'Default {numeralFormatLink} for the "currency" format', + description: + 'Part of composite text: data.advancedSettings.format.currencyFormatText + ' + + 'data.advancedSettings.format.currencyFormat.numeralFormatLinkText', + values: { + numeralFormatLink: + '' + + i18n.translate('data.advancedSettings.format.currencyFormat.numeralFormatLinkText', { + defaultMessage: 'numeral format', + }) + + '', + }, + }), + schema: schema.string(), + }, + [UI_SETTINGS.FORMAT_NUMBER_DEFAULT_LOCALE]: { + name: i18n.translate('data.advancedSettings.format.formattingLocaleTitle', { + defaultMessage: 'Formatting locale', + }), + value: 'en', + type: 'select', + options: numeralLanguageIds, + optionLabels: Object.fromEntries( + numeralLanguages.map((language: Record) => [language.id, language.name]) + ), + description: i18n.translate('data.advancedSettings.format.formattingLocaleText', { + defaultMessage: `{numeralLanguageLink} locale`, + description: + 'Part of composite text: data.advancedSettings.format.formattingLocale.numeralLanguageLinkText + ' + + 'data.advancedSettings.format.formattingLocaleText', + values: { + numeralLanguageLink: + '' + + i18n.translate( + 'data.advancedSettings.format.formattingLocale.numeralLanguageLinkText', + { + defaultMessage: 'Numeral language', + } + ) + + '', + }, + }), + schema: schema.string(), + }, + [UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS]: { + name: i18n.translate('data.advancedSettings.timepicker.refreshIntervalDefaultsTitle', { + defaultMessage: 'Time filter refresh interval', + }), + value: `{ + "pause": false, + "value": 0 +}`, + type: 'json', + description: i18n.translate('data.advancedSettings.timepicker.refreshIntervalDefaultsText', { + defaultMessage: `The timefilter's default refresh interval`, + }), + requiresPageReload: true, + schema: schema.object({ + pause: schema.boolean(), + value: schema.number(), + }), + }, + [UI_SETTINGS.TIMEPICKER_QUICK_RANGES]: { + name: i18n.translate('data.advancedSettings.timepicker.quickRangesTitle', { + defaultMessage: 'Time filter quick ranges', + }), + value: JSON.stringify( + [ + { + from: 'now/d', + to: 'now/d', + display: i18n.translate('data.advancedSettings.timepicker.today', { + defaultMessage: 'Today', + }), + }, + { + from: 'now/w', + to: 'now/w', + display: i18n.translate('data.advancedSettings.timepicker.thisWeek', { + defaultMessage: 'This week', + }), + }, + { + from: 'now-15m', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last15Minutes', { + defaultMessage: 'Last 15 minutes', + }), + }, + { + from: 'now-30m', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last30Minutes', { + defaultMessage: 'Last 30 minutes', + }), + }, + { + from: 'now-1h', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last1Hour', { + defaultMessage: 'Last 1 hour', + }), + }, + { + from: 'now-24h', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last24Hours', { + defaultMessage: 'Last 24 hours', + }), + }, + { + from: 'now-7d', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last7Days', { + defaultMessage: 'Last 7 days', + }), + }, + { + from: 'now-30d', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last30Days', { + defaultMessage: 'Last 30 days', + }), + }, + { + from: 'now-90d', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last90Days', { + defaultMessage: 'Last 90 days', + }), + }, + { + from: 'now-1y', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last1Year', { + defaultMessage: 'Last 1 year', + }), + }, + ], + null, + 2 + ), + type: 'json', + description: i18n.translate('data.advancedSettings.timepicker.quickRangesText', { + defaultMessage: + 'The list of ranges to show in the Quick section of the time filter. This should be an array of objects, ' + + 'with each object containing "from", "to" (see {acceptedFormatsLink}), and ' + + '"display" (the title to be displayed).', + description: + 'Part of composite text: data.advancedSettings.timepicker.quickRangesText + ' + + 'data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', + values: { + acceptedFormatsLink: + `` + + i18n.translate('data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', { + defaultMessage: 'accepted formats', + }) + + '', + }, + }), + schema: schema.arrayOf( + schema.object({ + from: schema.string(), + to: schema.string(), + display: schema.string(), + }) + ), + }, + [UI_SETTINGS.INDEXPATTERN_PLACEHOLDER]: { + name: i18n.translate('data.advancedSettings.indexPatternPlaceholderTitle', { + defaultMessage: 'Index pattern placeholder', + }), + value: '', + description: i18n.translate('data.advancedSettings.indexPatternPlaceholderText', { + defaultMessage: + 'The placeholder for the "Index pattern name" field in "Management > Index Patterns > Create Index Pattern".', + }), + schema: schema.string(), + }, + [UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT]: { + name: i18n.translate('data.advancedSettings.pinFiltersTitle', { + defaultMessage: 'Pin filters by default', + }), + value: false, + description: i18n.translate('data.advancedSettings.pinFiltersText', { + defaultMessage: 'Whether the filters should have a global state (be pinned) by default', + }), + schema: schema.boolean(), + }, + [UI_SETTINGS.FILTERS_EDITOR_SUGGEST_VALUES]: { + name: i18n.translate('data.advancedSettings.suggestFilterValuesTitle', { + defaultMessage: 'Filter editor suggest values', + description: '"Filter editor" refers to the UI you create filters in.', + }), + value: true, + description: i18n.translate('data.advancedSettings.suggestFilterValuesText', { + defaultMessage: + 'Set this property to false to prevent the filter editor from suggesting values for fields.', + }), + schema: schema.boolean(), + }, + }; +} diff --git a/src/plugins/discover/kibana.json b/src/plugins/discover/kibana.json index 0b3a07e98624e..14dd399697b56 100644 --- a/src/plugins/discover/kibana.json +++ b/src/plugins/discover/kibana.json @@ -1,6 +1,7 @@ { "id": "discover", "version": "kibana", + "optionalPlugins": ["share"], "server": true, "ui": true, "requiredPlugins": [ diff --git a/src/plugins/discover/public/application/angular/discover.js b/src/plugins/discover/public/application/angular/discover.js index 1a2bff8211db5..88885b3eb211b 100644 --- a/src/plugins/discover/public/application/angular/discover.js +++ b/src/plugins/discover/public/application/angular/discover.js @@ -72,6 +72,7 @@ import { syncQueryStateWithUrl, getDefaultQuery, search, + UI_SETTINGS, } from '../../../../data/public'; import { getIndexPatternId } from '../helpers/get_index_pattern_id'; import { addFatalError } from '../../../../kibana_legacy/public'; @@ -592,7 +593,8 @@ function discoverController( const query = $scope.searchSource.getField('query') || getDefaultQuery( - localStorage.get('kibana.userQueryLanguage') || config.get('search:queryLanguage') + localStorage.get('kibana.userQueryLanguage') || + config.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE) ); return { query, @@ -750,6 +752,13 @@ function discoverController( // Update defaults so that "reload saved query" functions correctly setAppState(getStateDefaults()); chrome.docTitle.change(savedSearch.lastSavedTitle); + chrome.setBreadcrumbs([ + { + text: discoverBreadcrumbsTitle, + href: '#/', + }, + { text: savedSearch.title }, + ]); } } }); diff --git a/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts index 60dfb69e85e74..82bfcc8bc42f9 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts +++ b/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts @@ -19,6 +19,7 @@ import { TableHeader } from './table_header/table_header'; import { getServices } from '../../../../kibana_services'; import { SORT_DEFAULT_ORDER_SETTING, DOC_HIDE_TIME_COLUMN_SETTING } from '../../../../../common'; +import { UI_SETTINGS } from '../../../../../../data/public'; export function createTableHeaderDirective(reactDirective: any) { const { uiSettings: config } = getServices(); @@ -38,7 +39,7 @@ export function createTableHeaderDirective(reactDirective: any) { { restrict: 'A' }, { hideTimeColumn: config.get(DOC_HIDE_TIME_COLUMN_SETTING, false), - isShortDots: config.get('shortDots:enable'), + isShortDots: config.get(UI_SETTINGS.SHORT_DOTS_ENABLE), defaultSortOrder: config.get(SORT_DEFAULT_ORDER_SETTING, 'desc'), } ); diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx index 99a5547ed0760..5a319d30b2515 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx +++ b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx @@ -33,6 +33,7 @@ import { IIndexPatternFieldList, IndexPatternField, IndexPattern, + UI_SETTINGS, } from '../../../../../data/public'; import { AppState } from '../../angular/discover_state'; import { getDetails } from './lib/get_details'; @@ -133,7 +134,7 @@ export function DiscoverSidebar({ ); const popularLimit = services.uiSettings.get(FIELDS_LIMIT_SETTING); - const useShortDots = services.uiSettings.get('shortDots:enable'); + const useShortDots = services.uiSettings.get(UI_SETTINGS.SHORT_DOTS_ENABLE); const { selected: selectedFields, diff --git a/src/plugins/discover/public/index.ts b/src/plugins/discover/public/index.ts index 359d91325f064..4154fdfeb3ff4 100644 --- a/src/plugins/discover/public/index.ts +++ b/src/plugins/discover/public/index.ts @@ -27,3 +27,4 @@ export function plugin(initializerContext: PluginInitializerContext) { export { SavedSearch, SavedSearchLoader, createSavedSearchesLoader } from './saved_searches'; export { ISearchEmbeddable, SEARCH_EMBEDDABLE_TYPE, SearchInput } from './application/embeddable'; +export { DISCOVER_APP_URL_GENERATOR } from './url_generator'; diff --git a/src/plugins/discover/public/mocks.ts b/src/plugins/discover/public/mocks.ts index c394fe2c11a71..e4314426bfce5 100644 --- a/src/plugins/discover/public/mocks.ts +++ b/src/plugins/discover/public/mocks.ts @@ -34,6 +34,9 @@ const createSetupContract = (): Setup => { const createStartContract = (): Start => { const startContract: Start = { savedSearchLoader: {} as any, + urlGenerator: { + createUrl: jest.fn(), + } as any, }; return startContract; }; diff --git a/src/plugins/discover/public/plugin.ts b/src/plugins/discover/public/plugin.ts index 4323e3d8deda4..091288e3e65aa 100644 --- a/src/plugins/discover/public/plugin.ts +++ b/src/plugins/discover/public/plugin.ts @@ -34,7 +34,7 @@ import { UiActionsStart, UiActionsSetup } from 'src/plugins/ui_actions/public'; import { EmbeddableStart, EmbeddableSetup } from 'src/plugins/embeddable/public'; import { ChartsPluginStart } from 'src/plugins/charts/public'; import { NavigationPublicPluginStart as NavigationStart } from 'src/plugins/navigation/public'; -import { SharePluginStart } from 'src/plugins/share/public'; +import { SharePluginStart, SharePluginSetup, UrlGeneratorContract } from 'src/plugins/share/public'; import { VisualizationsStart, VisualizationsSetup } from 'src/plugins/visualizations/public'; import { KibanaLegacySetup } from 'src/plugins/kibana_legacy/public'; import { HomePublicPluginSetup } from 'src/plugins/home/public'; @@ -43,7 +43,7 @@ import { DataPublicPluginStart, DataPublicPluginSetup, esFilters } from '../../d import { SavedObjectLoader } from '../../saved_objects/public'; import { createKbnUrlTracker } from '../../kibana_utils/public'; import { DEFAULT_APP_CATEGORIES } from '../../../core/public'; - +import { UrlGeneratorState } from '../../share/public'; import { DocViewInput, DocViewInputFn } from './application/doc_views/doc_views_types'; import { DocViewsRegistry } from './application/doc_views/doc_views_registry'; import { DocViewTable } from './application/components/table/table'; @@ -59,6 +59,17 @@ import { import { createSavedSearchesLoader } from './saved_searches'; import { registerFeature } from './register_feature'; import { buildServices } from './build_services'; +import { + DiscoverUrlGeneratorState, + DISCOVER_APP_URL_GENERATOR, + DiscoverUrlGenerator, +} from './url_generator'; + +declare module '../../share/public' { + export interface UrlGeneratorStateMapping { + [DISCOVER_APP_URL_GENERATOR]: UrlGeneratorState; + } +} /** * @public @@ -76,12 +87,31 @@ export interface DiscoverSetup { export interface DiscoverStart { savedSearchLoader: SavedObjectLoader; + + /** + * `share` plugin URL generator for Discover app. Use it to generate links into + * Discover application, example: + * + * ```ts + * const url = await plugins.discover.urlGenerator.createUrl({ + * savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d', + * indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002', + * timeRange: { + * to: 'now', + * from: 'now-15m', + * mode: 'relative', + * }, + * }); + * ``` + */ + readonly urlGenerator: undefined | UrlGeneratorContract<'DISCOVER_APP_URL_GENERATOR'>; } /** * @internal */ export interface DiscoverSetupPlugins { + share?: SharePluginSetup; uiActions: UiActionsSetup; embeddable: EmbeddableSetup; kibanaLegacy: KibanaLegacySetup; @@ -122,6 +152,7 @@ export class DiscoverPlugin private stopUrlTracking: (() => void) | undefined = undefined; private servicesInitialized: boolean = false; private innerAngularInitialized: boolean = false; + private urlGenerator?: DiscoverStart['urlGenerator']; /** * why are those functions public? they are needed for some mocha tests @@ -131,6 +162,17 @@ export class DiscoverPlugin public initializeServices?: () => Promise<{ core: CoreStart; plugins: DiscoverStartPlugins }>; setup(core: CoreSetup, plugins: DiscoverSetupPlugins) { + const baseUrl = core.http.basePath.prepend('/app/discover'); + + if (plugins.share) { + this.urlGenerator = plugins.share.urlGenerators.registerUrlGenerator( + new DiscoverUrlGenerator({ + appBasePath: baseUrl, + useHash: core.uiSettings.get('state:storeInSessionStorage'), + }) + ); + } + this.docViewsRegistry = new DocViewsRegistry(); setDocViewsRegistry(this.docViewsRegistry); this.docViewsRegistry.addDocView({ @@ -158,7 +200,7 @@ export class DiscoverPlugin // so history is lazily created (when app is mounted) // this prevents redundant `#` when not in discover app getHistory: getScopedHistory, - baseUrl: core.http.basePath.prepend('/app/discover'), + baseUrl, defaultSubUrl: '#/', storageKey: `lastUrl:${core.http.basePath.get()}:discover`, navLinkUpdater$: this.appStateUpdater, @@ -266,6 +308,7 @@ export class DiscoverPlugin }; return { + urlGenerator: this.urlGenerator, savedSearchLoader: createSavedSearchesLoader({ savedObjectsClient: core.savedObjects.client, indexPatterns: plugins.data.indexPatterns, diff --git a/src/plugins/discover/public/url_generator.test.ts b/src/plugins/discover/public/url_generator.test.ts new file mode 100644 index 0000000000000..cf9beb246fea2 --- /dev/null +++ b/src/plugins/discover/public/url_generator.test.ts @@ -0,0 +1,259 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { DiscoverUrlGenerator } from './url_generator'; +import { hashedItemStore, getStatesFromKbnUrl } from '../../kibana_utils/public'; +// eslint-disable-next-line +import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock'; +import { FilterStateStore } from '../../data/common'; + +const appBasePath: string = 'xyz/app/discover'; +const indexPatternId: string = 'c367b774-a4c2-11ea-bb37-0242ac130002'; +const savedSearchId: string = '571aaf70-4c88-11e8-b3d7-01146121b73d'; + +interface SetupParams { + useHash?: boolean; +} + +const setup = async ({ useHash = false }: SetupParams = {}) => { + const generator = new DiscoverUrlGenerator({ + appBasePath, + useHash, + }); + + return { + generator, + }; +}; + +beforeEach(() => { + // @ts-ignore + hashedItemStore.storage = mockStorage; +}); + +describe('Discover url generator', () => { + test('can create a link to Discover with no state and no saved search', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({}); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(url.startsWith(appBasePath)).toBe(true); + expect(_a).toEqual({}); + expect(_g).toEqual({}); + }); + + test('can create a link to a saved search in Discover', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ savedSearchId }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(url.startsWith(`${appBasePath}#/${savedSearchId}`)).toBe(true); + expect(_a).toEqual({}); + expect(_g).toEqual({}); + }); + + test('can specify specific index pattern', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + indexPatternId, + }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(_a).toEqual({ + index: indexPatternId, + }); + expect(_g).toEqual({}); + }); + + test('can specify specific time range', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + timeRange: { to: 'now', from: 'now-15m', mode: 'relative' }, + }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(_a).toEqual({}); + expect(_g).toEqual({ + time: { + from: 'now-15m', + mode: 'relative', + to: 'now', + }, + }); + }); + + test('can specify query', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + query: { + language: 'kuery', + query: 'foo', + }, + }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(_a).toEqual({ + query: { + language: 'kuery', + query: 'foo', + }, + }); + expect(_g).toEqual({}); + }); + + test('can specify local and global filters', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + filters: [ + { + meta: { + alias: 'foo', + disabled: false, + negate: false, + }, + $state: { + store: FilterStateStore.APP_STATE, + }, + }, + { + meta: { + alias: 'bar', + disabled: false, + negate: false, + }, + $state: { + store: FilterStateStore.GLOBAL_STATE, + }, + }, + ], + }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(_a).toEqual({ + filters: [ + { + $state: { + store: 'appState', + }, + meta: { + alias: 'foo', + disabled: false, + negate: false, + }, + }, + ], + }); + expect(_g).toEqual({ + filters: [ + { + $state: { + store: 'globalState', + }, + meta: { + alias: 'bar', + disabled: false, + negate: false, + }, + }, + ], + }); + }); + + test('can set refresh interval', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + refreshInterval: { + pause: false, + value: 666, + }, + }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(_a).toEqual({}); + expect(_g).toEqual({ + refreshInterval: { + pause: false, + value: 666, + }, + }); + }); + + test('can set time range', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + timeRange: { + from: 'now-3h', + to: 'now', + }, + }); + const { _a, _g } = getStatesFromKbnUrl(url, ['_a', '_g']); + + expect(_a).toEqual({}); + expect(_g).toEqual({ + time: { + from: 'now-3h', + to: 'now', + }, + }); + }); + + describe('useHash property', () => { + describe('when default useHash is set to false', () => { + test('when using default, sets index pattern ID in the generated URL', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + indexPatternId, + }); + + expect(url.indexOf(indexPatternId) > -1).toBe(true); + }); + + test('when enabling useHash, does not set index pattern ID in the generated URL', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + useHash: true, + indexPatternId, + }); + + expect(url.indexOf(indexPatternId) > -1).toBe(false); + }); + }); + + describe('when default useHash is set to true', () => { + test('when using default, does not set index pattern ID in the generated URL', async () => { + const { generator } = await setup({ useHash: true }); + const url = await generator.createUrl({ + indexPatternId, + }); + + expect(url.indexOf(indexPatternId) > -1).toBe(false); + }); + + test('when disabling useHash, sets index pattern ID in the generated URL', async () => { + const { generator } = await setup(); + const url = await generator.createUrl({ + useHash: false, + indexPatternId, + }); + + expect(url.indexOf(indexPatternId) > -1).toBe(true); + }); + }); + }); +}); diff --git a/src/plugins/discover/public/url_generator.ts b/src/plugins/discover/public/url_generator.ts new file mode 100644 index 0000000000000..42d689050d5ad --- /dev/null +++ b/src/plugins/discover/public/url_generator.ts @@ -0,0 +1,114 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + TimeRange, + Filter, + Query, + esFilters, + QueryState, + RefreshInterval, +} from '../../data/public'; +import { setStateToKbnUrl } from '../../kibana_utils/public'; +import { UrlGeneratorsDefinition } from '../../share/public'; + +export const DISCOVER_APP_URL_GENERATOR = 'DISCOVER_APP_URL_GENERATOR'; + +export interface DiscoverUrlGeneratorState { + /** + * Optionally set saved search ID. + */ + savedSearchId?: string; + + /** + * Optionally set index pattern ID. + */ + indexPatternId?: string; + + /** + * Optionally set the time range in the time picker. + */ + timeRange?: TimeRange; + + /** + * Optionally set the refresh interval. + */ + refreshInterval?: RefreshInterval; + + /** + * Optionally apply filers. + */ + filters?: Filter[]; + + /** + * Optionally set a query. NOTE: if given and used in conjunction with `dashboardId`, and the + * saved dashboard has a query saved with it, this will _replace_ that query. + */ + query?: Query; + + /** + * If not given, will use the uiSettings configuration for `storeInSessionStorage`. useHash determines + * whether to hash the data in the url to avoid url length issues. + */ + useHash?: boolean; +} + +interface Params { + appBasePath: string; + useHash: boolean; +} + +export class DiscoverUrlGenerator + implements UrlGeneratorsDefinition { + constructor(private readonly params: Params) {} + + public readonly id = DISCOVER_APP_URL_GENERATOR; + + public readonly createUrl = async ({ + filters, + indexPatternId, + query, + refreshInterval, + savedSearchId, + timeRange, + useHash = this.params.useHash, + }: DiscoverUrlGeneratorState): Promise => { + const savedSearchPath = savedSearchId ? encodeURIComponent(savedSearchId) : ''; + const appState: { + query?: Query; + filters?: Filter[]; + index?: string; + } = {}; + const queryState: QueryState = {}; + + if (query) appState.query = query; + if (filters) appState.filters = filters?.filter((f) => !esFilters.isFilterPinned(f)); + if (indexPatternId) appState.index = indexPatternId; + + if (timeRange) queryState.time = timeRange; + if (filters) queryState.filters = filters?.filter((f) => esFilters.isFilterPinned(f)); + if (refreshInterval) queryState.refreshInterval = refreshInterval; + + let url = `${this.params.appBasePath}#/${savedSearchPath}`; + url = setStateToKbnUrl('_g', queryState, { useHash }, url); + url = setStateToKbnUrl('_a', appState, { useHash }, url); + + return url; + }; +} diff --git a/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx b/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx index b046376a304ae..e29e941e898fb 100644 --- a/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx +++ b/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx @@ -31,7 +31,7 @@ import { // eslint-disable-next-line import { inspectorPluginMock } from '../../../../inspector/public/mocks'; import { mount } from 'enzyme'; -import { embeddablePluginMock } from '../../mocks'; +import { embeddablePluginMock, createEmbeddablePanelMock } from '../../mocks'; test('EmbeddableChildPanel renders an embeddable when it is done loading', async () => { const inspector = inspectorPluginMock.createStartContract(); @@ -58,18 +58,17 @@ test('EmbeddableChildPanel renders an embeddable when it is done loading', async expect(newEmbeddable.id).toBeDefined(); + const testPanel = createEmbeddablePanelMock({ + getAllEmbeddableFactories: start.getEmbeddableFactories, + getEmbeddableFactory, + inspector, + }); + const component = mount( Promise.resolve([])} - getAllEmbeddableFactories={start.getEmbeddableFactories} - getEmbeddableFactory={getEmbeddableFactory} - notifications={{} as any} - application={{} as any} - overlays={{} as any} - inspector={inspector} - SavedObjectFinder={() => null} + PanelComponent={testPanel} /> ); @@ -97,19 +96,9 @@ test(`EmbeddableChildPanel renders an error message if the factory doesn't exist { getEmbeddableFactory } as any ); + const testPanel = createEmbeddablePanelMock({ inspector }); const component = mount( - Promise.resolve([])} - getAllEmbeddableFactories={(() => []) as any} - getEmbeddableFactory={(() => undefined) as any} - notifications={{} as any} - overlays={{} as any} - application={{} as any} - inspector={inspector} - SavedObjectFinder={() => null} - /> + ); await nextTick(); diff --git a/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx b/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx index 70628665e6e8c..be8ff2c95fe09 100644 --- a/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx +++ b/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx @@ -22,12 +22,7 @@ import React from 'react'; import { EuiLoadingChart } from '@elastic/eui'; import { Subscription } from 'rxjs'; -import { CoreStart } from 'src/core/public'; -import { UiActionsService } from 'src/plugins/ui_actions/public'; - -import { Start as InspectorStartContract } from 'src/plugins/inspector/public'; import { ErrorEmbeddable, IEmbeddable } from '../embeddables'; -import { EmbeddablePanel } from '../panel'; import { IContainer } from './i_container'; import { EmbeddableStart } from '../../plugin'; @@ -35,14 +30,7 @@ export interface EmbeddableChildPanelProps { embeddableId: string; className?: string; container: IContainer; - getActions: UiActionsService['getTriggerCompatibleActions']; - getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory']; - getAllEmbeddableFactories: EmbeddableStart['getEmbeddableFactories']; - overlays: CoreStart['overlays']; - notifications: CoreStart['notifications']; - application: CoreStart['application']; - inspector: InspectorStartContract; - SavedObjectFinder: React.ComponentType; + PanelComponent: EmbeddableStart['EmbeddablePanel']; } interface State { @@ -87,6 +75,7 @@ export class EmbeddableChildPanel extends React.Component ) : ( - + )} ); diff --git a/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container.tsx b/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container.tsx index 31e14a0af59d7..913c3a0b30826 100644 --- a/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container.tsx +++ b/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container.tsx @@ -19,9 +19,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { I18nProvider } from '@kbn/i18n/react'; -import { CoreStart } from 'src/core/public'; -import { UiActionsService } from 'src/plugins/ui_actions/public'; -import { Start as InspectorStartContract } from 'src/plugins/inspector/public'; import { Container, ViewMode, ContainerInput } from '../..'; import { HelloWorldContainerComponent } from './hello_world_container_component'; import { EmbeddableStart } from '../../../plugin'; @@ -45,14 +42,8 @@ interface HelloWorldContainerInput extends ContainerInput { } interface HelloWorldContainerOptions { - getActions: UiActionsService['getTriggerCompatibleActions']; getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory']; - getAllEmbeddableFactories: EmbeddableStart['getEmbeddableFactories']; - overlays: CoreStart['overlays']; - application: CoreStart['application']; - notifications: CoreStart['notifications']; - inspector: InspectorStartContract; - SavedObjectFinder: React.ComponentType; + panelComponent: EmbeddableStart['EmbeddablePanel']; } export class HelloWorldContainer extends Container { @@ -78,14 +69,7 @@ export class HelloWorldContainer extends Container , node diff --git a/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container_component.tsx b/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container_component.tsx index 6453046b86e20..5fefa1fc90720 100644 --- a/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container_component.tsx +++ b/src/plugins/embeddable/public/lib/test_samples/embeddables/hello_world_container_component.tsx @@ -20,22 +20,12 @@ import React, { Component, RefObject } from 'react'; import { Subscription } from 'rxjs'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import { CoreStart } from 'src/core/public'; -import { UiActionsService } from 'src/plugins/ui_actions/public'; -import { Start as InspectorStartContract } from 'src/plugins/inspector/public'; import { IContainer, PanelState, EmbeddableChildPanel } from '../..'; import { EmbeddableStart } from '../../../plugin'; interface Props { container: IContainer; - getActions: UiActionsService['getTriggerCompatibleActions']; - getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory']; - getAllEmbeddableFactories: EmbeddableStart['getEmbeddableFactories']; - overlays: CoreStart['overlays']; - application: CoreStart['application']; - notifications: CoreStart['notifications']; - inspector: InspectorStartContract; - SavedObjectFinder: React.ComponentType; + panelComponent: EmbeddableStart['EmbeddablePanel']; } interface State { @@ -108,14 +98,7 @@ export class HelloWorldContainerComponent extends Component { ); diff --git a/src/plugins/embeddable/public/mocks.ts b/src/plugins/embeddable/public/mocks.tsx similarity index 62% rename from src/plugins/embeddable/public/mocks.ts rename to src/plugins/embeddable/public/mocks.tsx index f5487c381cfcb..9da0b7602c4f8 100644 --- a/src/plugins/embeddable/public/mocks.ts +++ b/src/plugins/embeddable/public/mocks.tsx @@ -16,14 +16,20 @@ * specific language governing permissions and limitations * under the License. */ +import React from 'react'; import { EmbeddableStart, EmbeddableSetup, EmbeddableSetupDependencies, EmbeddableStartDependencies, + IEmbeddable, + EmbeddablePanel, } from '.'; import { EmbeddablePublicPlugin } from './plugin'; import { coreMock } from '../../../core/public/mocks'; +import { UiActionsService } from './lib/ui_actions'; +import { CoreStart } from '../../../core/public'; +import { Start as InspectorStart } from '../../inspector/public'; // eslint-disable-next-line import { inspectorPluginMock } from '../../inspector/public/mocks'; @@ -33,6 +39,42 @@ import { uiActionsPluginMock } from '../../ui_actions/public/mocks'; export type Setup = jest.Mocked; export type Start = jest.Mocked; +interface CreateEmbeddablePanelMockArgs { + getActions: UiActionsService['getTriggerCompatibleActions']; + getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory']; + getAllEmbeddableFactories: EmbeddableStart['getEmbeddableFactories']; + overlays: CoreStart['overlays']; + notifications: CoreStart['notifications']; + application: CoreStart['application']; + inspector: InspectorStart; + SavedObjectFinder: React.ComponentType; +} + +export const createEmbeddablePanelMock = ({ + getActions, + getEmbeddableFactory, + getAllEmbeddableFactories, + overlays, + notifications, + application, + inspector, + SavedObjectFinder, +}: Partial) => { + return ({ embeddable }: { embeddable: IEmbeddable }) => ( + Promise.resolve([]))} + getAllEmbeddableFactories={getAllEmbeddableFactories || ((() => []) as any)} + getEmbeddableFactory={getEmbeddableFactory || ((() => undefined) as any)} + notifications={notifications || ({} as any)} + application={application || ({} as any)} + overlays={overlays || ({} as any)} + inspector={inspector || ({} as any)} + SavedObjectFinder={SavedObjectFinder || (() => null)} + /> + ); +}; + const createSetupContract = (): Setup => { const setupContract: Setup = { registerEmbeddableFactory: jest.fn(), diff --git a/src/plugins/embeddable/public/tests/apply_filter_action.test.ts b/src/plugins/embeddable/public/tests/apply_filter_action.test.ts index ebb76c743393b..ec92f334267f5 100644 --- a/src/plugins/embeddable/public/tests/apply_filter_action.test.ts +++ b/src/plugins/embeddable/public/tests/apply_filter_action.test.ts @@ -31,8 +31,7 @@ import { FilterableEmbeddableInput, } from '../lib/test_samples'; // eslint-disable-next-line -import { inspectorPluginMock } from '../../../../plugins/inspector/public/mocks'; -import { esFilters } from '../../../../plugins/data/public'; +import { esFilters } from '../../../data/public'; test('ApplyFilterAction applies the filter to the root of the container tree', async () => { const { doStart, setup } = testPlugin(); @@ -95,26 +94,16 @@ test('ApplyFilterAction applies the filter to the root of the container tree', a }); test('ApplyFilterAction is incompatible if the root container does not accept a filter as input', async () => { - const { doStart, coreStart, setup } = testPlugin(); - const inspector = inspectorPluginMock.createStartContract(); + const { doStart, setup } = testPlugin(); const factory = new FilterableEmbeddableFactory(); setup.registerEmbeddableFactory(factory.type, factory); const api = doStart(); const applyFilterAction = createFilterAction(); - const parent = new HelloWorldContainer( - { id: 'root', panels: {} }, - { - getActions: () => Promise.resolve([]), - getEmbeddableFactory: api.getEmbeddableFactory, - getAllEmbeddableFactories: api.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector, - SavedObjectFinder: () => null, - } - ); + + const parent = new HelloWorldContainer({ id: 'root', panels: {} }, { + getEmbeddableFactory: api.getEmbeddableFactory, + } as any); const embeddable = await parent.addNewEmbeddable< FilterableContainerInput, EmbeddableOutput, @@ -130,27 +119,17 @@ test('ApplyFilterAction is incompatible if the root container does not accept a }); test('trying to execute on incompatible context throws an error ', async () => { - const { doStart, coreStart, setup } = testPlugin(); - const inspector = inspectorPluginMock.createStartContract(); + const { doStart, setup } = testPlugin(); const factory = new FilterableEmbeddableFactory(); setup.registerEmbeddableFactory(factory.type, factory); const api = doStart(); const applyFilterAction = createFilterAction(); - const parent = new HelloWorldContainer( - { id: 'root', panels: {} }, - { - getActions: () => Promise.resolve([]), - getEmbeddableFactory: api.getEmbeddableFactory, - getAllEmbeddableFactories: api.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector, - SavedObjectFinder: () => null, - } - ); + + const parent = new HelloWorldContainer({ id: 'root', panels: {} }, { + getEmbeddableFactory: api.getEmbeddableFactory, + } as any); const embeddable = await parent.addNewEmbeddable< FilterableContainerInput, diff --git a/src/plugins/embeddable/public/tests/container.test.ts b/src/plugins/embeddable/public/tests/container.test.ts index 4cd01abaf7995..490f0c00c7c4d 100644 --- a/src/plugins/embeddable/public/tests/container.test.ts +++ b/src/plugins/embeddable/public/tests/container.test.ts @@ -48,6 +48,7 @@ import { coreMock } from '../../../../core/public/mocks'; import { testPlugin } from './test_plugin'; import { of } from './helpers'; import { esFilters, Filter } from '../../../../plugins/data/public'; +import { createEmbeddablePanelMock } from '../mocks'; async function creatHelloWorldContainerAndEmbeddable( containerInput: ContainerInput = { id: 'hello', panels: {} }, @@ -68,15 +69,18 @@ async function creatHelloWorldContainerAndEmbeddable( const start = doStart(); - const container = new HelloWorldContainer(containerInput, { + const testPanel = createEmbeddablePanelMock({ getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, getAllEmbeddableFactories: start.getEmbeddableFactories, overlays: coreStart.overlays, notifications: coreStart.notifications, application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + }); + + const container = new HelloWorldContainer(containerInput, { + getEmbeddableFactory: start.getEmbeddableFactory, + panelComponent: testPanel, }); const embeddable = await container.addNewEmbeddable< ContactCardEmbeddableInput, @@ -88,7 +92,7 @@ async function creatHelloWorldContainerAndEmbeddable( throw new Error('Error adding embeddable'); } - return { container, embeddable, coreSetup, coreStart, setup, start, uiActions }; + return { container, embeddable, coreSetup, coreStart, setup, start, uiActions, testPanel }; } test('Container initializes embeddables', async (done) => { @@ -131,7 +135,8 @@ test('Container.addNewEmbeddable', async () => { }); test('Container.removeEmbeddable removes and cleans up', async (done) => { - const { start, coreStart, uiActions } = await creatHelloWorldContainerAndEmbeddable(); + const { start, testPanel } = await creatHelloWorldContainerAndEmbeddable(); + const container = new HelloWorldContainer( { id: 'hello', @@ -143,14 +148,8 @@ test('Container.removeEmbeddable removes and cleans up', async (done) => { }, }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, - getAllEmbeddableFactories: start.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); const embeddable = await container.addNewEmbeddable< @@ -323,15 +322,17 @@ test(`Container updates its state when a child's input is updated`, async (done) // Make sure a brand new container built off the output of container also creates an embeddable // with "Dr.", not the default the embeddable was first added with. Makes sure changed input // is preserved with the container. - const containerClone = new HelloWorldContainer(container.getInput(), { + const testPanel = createEmbeddablePanelMock({ getActions: uiActions.getTriggerCompatibleActions, - getAllEmbeddableFactories: start.getEmbeddableFactories, getEmbeddableFactory: start.getEmbeddableFactory, - notifications: coreStart.notifications, + getAllEmbeddableFactories: start.getEmbeddableFactories, overlays: coreStart.overlays, + notifications: coreStart.notifications, application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + }); + const containerClone = new HelloWorldContainer(container.getInput(), { + getEmbeddableFactory: start.getEmbeddableFactory, + panelComponent: testPanel, }); const cloneSubscription = Rx.merge( containerClone.getOutput$(), @@ -575,6 +576,14 @@ test('Container changes made directly after adding a new embeddable are propagat const start = doStart(); + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', @@ -582,14 +591,8 @@ test('Container changes made directly after adding a new embeddable are propagat viewMode: ViewMode.EDIT, }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, - getAllEmbeddableFactories: start.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); @@ -701,20 +704,22 @@ test('untilEmbeddableLoaded() throws an error if there is no such child panel in coreMock.createStart() ); const start = doStart(); + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', panels: {}, }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, - getAllEmbeddableFactories: start.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); @@ -731,6 +736,14 @@ test('untilEmbeddableLoaded() resolves if child is loaded in the container', asy const factory = new HelloWorldEmbeddableFactory(); setup.registerEmbeddableFactory(factory.type, factory); const start = doStart(); + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', @@ -742,14 +755,8 @@ test('untilEmbeddableLoaded() resolves if child is loaded in the container', asy }, }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, - getAllEmbeddableFactories: start.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); @@ -771,6 +778,14 @@ test('untilEmbeddableLoaded resolves with undefined if child is subsequently rem setup.registerEmbeddableFactory(factory.type, factory); const start = doStart(); + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', @@ -782,14 +797,8 @@ test('untilEmbeddableLoaded resolves with undefined if child is subsequently rem }, }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, - getAllEmbeddableFactories: start.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); @@ -812,6 +821,14 @@ test('adding a panel then subsequently removing it before its loaded removes the }); setup.registerEmbeddableFactory(factory.type, factory); const start = doStart(); + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', @@ -823,14 +840,8 @@ test('adding a panel then subsequently removing it before its loaded removes the }, }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: start.getEmbeddableFactory, - getAllEmbeddableFactories: start.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); diff --git a/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx b/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx index a9cb83504d958..311efae49f735 100644 --- a/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx +++ b/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx @@ -37,6 +37,7 @@ import { testPlugin } from './test_plugin'; import { CustomizePanelModal } from '../lib/panel/panel_header/panel_actions/customize_title/customize_panel_modal'; import { mount } from 'enzyme'; import { EmbeddableStart } from '../plugin'; +import { createEmbeddablePanelMock } from '../mocks'; let api: EmbeddableStart; let container: Container; @@ -55,17 +56,20 @@ beforeEach(async () => { setup.registerEmbeddableFactory(contactCardFactory.type, contactCardFactory); api = doStart(); + + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: api.getEmbeddableFactory, + getAllEmbeddableFactories: api.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); container = new HelloWorldContainer( { id: '123', panels: {} }, { - getActions: uiActions.getTriggerCompatibleActions, getEmbeddableFactory: api.getEmbeddableFactory, - getAllEmbeddableFactories: api.getEmbeddableFactories, - overlays: coreStart.overlays, - notifications: coreStart.notifications, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); const contactCardEmbeddable = await container.addNewEmbeddable< diff --git a/src/plugins/embeddable/public/tests/explicit_input.test.ts b/src/plugins/embeddable/public/tests/explicit_input.test.ts index 6bea4fe46a497..d64ff94d71800 100644 --- a/src/plugins/embeddable/public/tests/explicit_input.test.ts +++ b/src/plugins/embeddable/public/tests/explicit_input.test.ts @@ -36,6 +36,7 @@ import { HelloWorldContainer } from '../lib/test_samples/embeddables/hello_world // eslint-disable-next-line import { coreMock } from '../../../../core/public/mocks'; import { esFilters, Filter } from '../../../../plugins/data/public'; +import { createEmbeddablePanelMock } from '../mocks'; const { setup, doStart, coreStart, uiActions } = testPlugin( coreMock.createSetup(), @@ -80,17 +81,19 @@ test('Explicit embeddable input mapped to undefined will default to inherited', }); test('Explicit embeddable input mapped to undefined with no inherited value will get passed to embeddable', async (done) => { + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', panels: {} }, { - getActions: uiActions.getTriggerCompatibleActions, - getAllEmbeddableFactories: start.getEmbeddableFactories, getEmbeddableFactory: start.getEmbeddableFactory, - notifications: coreStart.notifications, - overlays: coreStart.overlays, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); @@ -121,6 +124,14 @@ test('Explicit embeddable input mapped to undefined with no inherited value will // but before the embeddable factory returns the embeddable, that the `inheritedChildInput` and // embeddable input comparisons won't cause explicit input to be set when it shouldn't. test('Explicit input tests in async situations', (done: () => void) => { + const testPanel = createEmbeddablePanelMock({ + getActions: uiActions.getTriggerCompatibleActions, + getEmbeddableFactory: start.getEmbeddableFactory, + getAllEmbeddableFactories: start.getEmbeddableFactories, + overlays: coreStart.overlays, + notifications: coreStart.notifications, + application: coreStart.application, + }); const container = new HelloWorldContainer( { id: 'hello', @@ -132,14 +143,8 @@ test('Explicit input tests in async situations', (done: () => void) => { }, }, { - getActions: uiActions.getTriggerCompatibleActions, - getAllEmbeddableFactories: start.getEmbeddableFactories, getEmbeddableFactory: start.getEmbeddableFactory, - notifications: coreStart.notifications, - overlays: coreStart.overlays, - application: coreStart.application, - inspector: {} as any, - SavedObjectFinder: () => null, + panelComponent: testPanel, } ); diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/monaco/index.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/monaco/index.ts new file mode 100644 index 0000000000000..a9c6ea1e01d54 --- /dev/null +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/monaco/index.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { useXJsonMode } from './use_xjson_mode'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/monaco/use_xjson_mode.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/monaco/use_xjson_mode.ts new file mode 100644 index 0000000000000..b783045492f05 --- /dev/null +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/monaco/use_xjson_mode.ts @@ -0,0 +1,32 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { XJsonLang } from '@kbn/monaco'; +import { useXJsonMode as useBaseXJsonMode } from '../xjson'; + +interface ReturnValue extends ReturnType { + XJsonLang: typeof XJsonLang; +} + +export const useXJsonMode = (json: Parameters[0]): ReturnValue => { + return { + ...useBaseXJsonMode(json), + XJsonLang, + }; +}; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/index.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/index.ts new file mode 100644 index 0000000000000..a9c6ea1e01d54 --- /dev/null +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/index.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { useXJsonMode } from './use_xjson_mode'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/use_xjson_mode.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/use_xjson_mode.ts new file mode 100644 index 0000000000000..7dcc7c9ed83bc --- /dev/null +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/xjson/use_xjson_mode.ts @@ -0,0 +1,41 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { useState, Dispatch } from 'react'; +import { collapseLiteralStrings, expandLiteralStrings } from '../../public'; + +interface ReturnValue { + xJson: string; + setXJson: Dispatch; + convertToJson: typeof collapseLiteralStrings; +} + +export const useXJsonMode = (json: Record | string | null): ReturnValue => { + const [xJson, setXJson] = useState(() => + json === null + ? '' + : expandLiteralStrings(typeof json === 'string' ? json : JSON.stringify(json, null, 2)) + ); + + return { + xJson, + setXJson, + convertToJson: collapseLiteralStrings, + }; +}; diff --git a/src/plugins/es_ui_shared/public/index.ts b/src/plugins/es_ui_shared/public/index.ts index 7e5510d7c9c65..4ab791289dd88 100644 --- a/src/plugins/es_ui_shared/public/index.ts +++ b/src/plugins/es_ui_shared/public/index.ts @@ -47,6 +47,10 @@ export { expandLiteralStrings, } from './console_lang'; +import * as Monaco from './monaco'; + +export { Monaco }; + export { AuthorizationContext, AuthorizationProvider, diff --git a/src/plugins/es_ui_shared/public/monaco/index.ts b/src/plugins/es_ui_shared/public/monaco/index.ts new file mode 100644 index 0000000000000..23ba93e913234 --- /dev/null +++ b/src/plugins/es_ui_shared/public/monaco/index.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { useXJsonMode } from '../../__packages_do_not_import__/monaco'; diff --git a/src/plugins/es_ui_shared/static/ace_x_json/hooks/use_x_json.ts b/src/plugins/es_ui_shared/static/ace_x_json/hooks/use_x_json.ts index 2b0bf0c8a3a7c..3a093ac6869d0 100644 --- a/src/plugins/es_ui_shared/static/ace_x_json/hooks/use_x_json.ts +++ b/src/plugins/es_ui_shared/static/ace_x_json/hooks/use_x_json.ts @@ -16,23 +16,18 @@ * specific language governing permissions and limitations * under the License. */ - -import { useState } from 'react'; -import { XJsonMode, collapseLiteralStrings, expandLiteralStrings } from '../../../public'; +import { XJsonMode } from '../../../public'; +import { useXJsonMode as useBaseXJsonMode } from '../../../__packages_do_not_import__/xjson'; const xJsonMode = new XJsonMode(); -export const useXJsonMode = (json: Record | string | null) => { - const [xJson, setXJson] = useState(() => - json === null - ? '' - : expandLiteralStrings(typeof json === 'string' ? json : JSON.stringify(json, null, 2)) - ); +interface ReturnValue extends ReturnType { + xJsonMode: typeof xJsonMode; +} +export const useXJsonMode = (json: Parameters[0]): ReturnValue => { return { - xJson, - setXJson, + ...useBaseXJsonMode(json), xJsonMode, - convertToJson: collapseLiteralStrings, }; }; diff --git a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap index 3b3f86e579f1a..2545bbcb5114d 100644 --- a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap +++ b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap @@ -202,17 +202,17 @@ exports[`apmUiEnabled 1`] = ` } textAlign="left" - title="SIEM" + title="Security" titleSize="xs" /> @@ -468,17 +468,17 @@ exports[`isNewKibanaInstance 1`] = ` } textAlign="left" - title="SIEM" + title="Security" titleSize="xs" /> @@ -765,17 +765,17 @@ exports[`mlEnabled 1`] = ` } textAlign="left" - title="SIEM" + title="Security" titleSize="xs" /> @@ -1067,17 +1067,17 @@ exports[`render 1`] = ` } textAlign="left" - title="SIEM" + title="Security" titleSize="xs" /> diff --git a/src/plugins/home/public/application/components/add_data.js b/src/plugins/home/public/application/components/add_data.js index 2f7f07a0e4549..fa1327b3fcd08 100644 --- a/src/plugins/home/public/application/components/add_data.js +++ b/src/plugins/home/public/application/components/add_data.js @@ -80,11 +80,11 @@ const AddDataUi = ({ apmUiEnabled, isNewKibanaInstance, intl, mlEnabled }) => { }; const siemData = { title: intl.formatMessage({ - id: 'home.addData.siem.nameTitle', - defaultMessage: 'SIEM', + id: 'home.addData.securitySolution.nameTitle', + defaultMessage: 'Security', }), description: intl.formatMessage({ - id: 'home.addData.siem.nameDescription', + id: 'home.addData.securitySolution.nameDescription', defaultMessage: 'Centralize security events for interactive investigation in ready-to-go visualizations.', }), @@ -221,11 +221,11 @@ const AddDataUi = ({ apmUiEnabled, isNewKibanaInstance, intl, mlEnabled }) => { footer={ diff --git a/src/plugins/home/public/application/components/tutorial_directory.js b/src/plugins/home/public/application/components/tutorial_directory.js index 4d2cec158f63e..774b23af11ac8 100644 --- a/src/plugins/home/public/application/components/tutorial_directory.js +++ b/src/plugins/home/public/application/components/tutorial_directory.js @@ -75,10 +75,10 @@ class TutorialDirectoryUi extends React.Component { }), }, { - id: 'siem', + id: 'security', name: this.props.intl.formatMessage({ - id: 'home.tutorial.tabs.siemTitle', - defaultMessage: 'SIEM', + id: 'home.tutorial.tabs.securitySolutionTitle', + defaultMessage: 'Security', }), }, { diff --git a/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts b/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts index 24f5a39feb4c5..32e5483b8b070 100644 --- a/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts +++ b/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts @@ -26,7 +26,7 @@ const PARAM_TYPES = { const TUTORIAL_CATEGORY = { LOGGING: 'logging', - SIEM: 'siem', + SECURITY_SOLUTION: 'security solution', METRICS: 'metrics', OTHER: 'other', }; diff --git a/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts index 80849513a3fad..3325240147640 100644 --- a/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts +++ b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts @@ -22,7 +22,7 @@ import { KibanaRequest } from 'src/core/server'; /** @public */ export enum TutorialsCategory { LOGGING = 'logging', - SIEM = 'siem', + SECURITY_SOLUTION = 'security', METRICS = 'metrics', OTHER = 'other', } diff --git a/src/plugins/home/server/tutorials/auditbeat/index.ts b/src/plugins/home/server/tutorials/auditbeat/index.ts index dadbf913d5ed5..214fda5a7cc53 100644 --- a/src/plugins/home/server/tutorials/auditbeat/index.ts +++ b/src/plugins/home/server/tutorials/auditbeat/index.ts @@ -36,7 +36,7 @@ export function auditbeatSpecProvider(context: TutorialContext): TutorialSchema name: i18n.translate('home.tutorials.auditbeat.nameTitle', { defaultMessage: 'Auditbeat', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.auditbeat.shortDescription', { defaultMessage: 'Collect audit data from your hosts.', }), @@ -53,9 +53,9 @@ processes, users, logins, sockets information, file accesses, and more. \ artifacts: { dashboards: [], application: { - path: '/app/siem', + path: '/app/security', label: i18n.translate('home.tutorials.auditbeat.artifacts.dashboards.linkLabel', { - defaultMessage: 'SIEM App', + defaultMessage: 'Security App', }), }, exportedFields: { diff --git a/src/plugins/home/server/tutorials/cisco_logs/index.ts b/src/plugins/home/server/tutorials/cisco_logs/index.ts index 4514b61570b07..2322f503b80ce 100644 --- a/src/plugins/home/server/tutorials/cisco_logs/index.ts +++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts @@ -37,7 +37,7 @@ export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema name: i18n.translate('home.tutorials.ciscoLogs.nameTitle', { defaultMessage: 'Cisco', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.ciscoLogs.shortDescription', { defaultMessage: 'Collect and parse logs received from Cisco ASA firewalls.', }), @@ -54,9 +54,9 @@ supports the "asa" fileset for Cisco ASA firewall logs received over syslog or r artifacts: { dashboards: [], application: { - path: '/app/siem', + path: '/app/security', label: i18n.translate('home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel', { - defaultMessage: 'SIEM App', + defaultMessage: 'Security App', }), }, exportedFields: { diff --git a/src/plugins/home/server/tutorials/coredns_logs/index.ts b/src/plugins/home/server/tutorials/coredns_logs/index.ts index 1c62366251661..4304fb7acb907 100644 --- a/src/plugins/home/server/tutorials/coredns_logs/index.ts +++ b/src/plugins/home/server/tutorials/coredns_logs/index.ts @@ -37,7 +37,7 @@ export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchem name: i18n.translate('home.tutorials.corednsLogs.nameTitle', { defaultMessage: 'CoreDNS logs', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.corednsLogs.shortDescription', { defaultMessage: 'Collect the logs created by Coredns.', }), diff --git a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts index 3d88cce36d752..a9b9c33d61bdf 100644 --- a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts +++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts @@ -37,7 +37,7 @@ export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('home.tutorials.envoyproxyLogs.nameTitle', { defaultMessage: 'Envoyproxy', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.envoyproxyLogs.shortDescription', { defaultMessage: 'Collect and parse logs received from the Envoy proxy.', }), @@ -54,9 +54,9 @@ It supports both standalone deployment and Envoy proxy deployment in Kubernetes. artifacts: { dashboards: [], application: { - path: '/app/siem', + path: '/app/security', label: i18n.translate('home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel', { - defaultMessage: 'SIEM App', + defaultMessage: 'Security App', }), }, exportedFields: { diff --git a/src/plugins/home/server/tutorials/iptables_logs/index.ts b/src/plugins/home/server/tutorials/iptables_logs/index.ts index e72e0ef300e04..fd84894dae850 100644 --- a/src/plugins/home/server/tutorials/iptables_logs/index.ts +++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts @@ -37,7 +37,7 @@ export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('home.tutorials.iptablesLogs.nameTitle', { defaultMessage: 'Iptables / Ubiquiti', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.iptablesLogs.shortDescription', { defaultMessage: 'Collect and parse iptables and ip6tables logs or from Ubiqiti firewalls.', }), @@ -56,9 +56,9 @@ number and the action performed on the traffic (allow/deny).. \ artifacts: { dashboards: [], application: { - path: '/app/siem', + path: '/app/security', label: i18n.translate('home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel', { - defaultMessage: 'SIEM App', + defaultMessage: 'Security App', }), }, exportedFields: { diff --git a/src/plugins/home/server/tutorials/netflow/index.ts b/src/plugins/home/server/tutorials/netflow/index.ts index 7c6fcadcff625..ec0aa8953b146 100644 --- a/src/plugins/home/server/tutorials/netflow/index.ts +++ b/src/plugins/home/server/tutorials/netflow/index.ts @@ -28,7 +28,7 @@ export function netflowSpecProvider() { return { id: 'netflow', name: 'Netflow', - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.netflow.tutorialShortDescription', { defaultMessage: 'Collect Netflow records sent by a Netflow exporter.', }), diff --git a/src/plugins/home/server/tutorials/osquery_logs/index.ts b/src/plugins/home/server/tutorials/osquery_logs/index.ts index 34a1b9e7f619d..8781d6201a771 100644 --- a/src/plugins/home/server/tutorials/osquery_logs/index.ts +++ b/src/plugins/home/server/tutorials/osquery_logs/index.ts @@ -37,7 +37,7 @@ export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchem name: i18n.translate('home.tutorials.osqueryLogs.nameTitle', { defaultMessage: 'Osquery logs', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.osqueryLogs.shortDescription', { defaultMessage: 'Collect the result logs created by osqueryd.', }), diff --git a/src/plugins/home/server/tutorials/suricata_logs/index.ts b/src/plugins/home/server/tutorials/suricata_logs/index.ts index c02cb05889ebb..6bcfc1d43a250 100644 --- a/src/plugins/home/server/tutorials/suricata_logs/index.ts +++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts @@ -37,7 +37,7 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('home.tutorials.suricataLogs.nameTitle', { defaultMessage: 'Suricata logs', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.suricataLogs.shortDescription', { defaultMessage: 'Collect the result logs created by Suricata IDS/IPS/NSM.', }), diff --git a/src/plugins/home/server/tutorials/windows_event_logs/index.ts b/src/plugins/home/server/tutorials/windows_event_logs/index.ts index 5349bedb21279..c2ea9ff3015e4 100644 --- a/src/plugins/home/server/tutorials/windows_event_logs/index.ts +++ b/src/plugins/home/server/tutorials/windows_event_logs/index.ts @@ -36,7 +36,7 @@ export function windowsEventLogsSpecProvider(context: TutorialContext): Tutorial defaultMessage: 'Windows Event Log', }), isBeta: false, - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.windowsEventLogs.shortDescription', { defaultMessage: 'Fetch logs from the Windows Event Log.', }), diff --git a/src/plugins/home/server/tutorials/zeek_logs/index.ts b/src/plugins/home/server/tutorials/zeek_logs/index.ts index 4bd54c96481b6..c273a93b1b0d5 100644 --- a/src/plugins/home/server/tutorials/zeek_logs/index.ts +++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts @@ -37,7 +37,7 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema { name: i18n.translate('home.tutorials.zeekLogs.nameTitle', { defaultMessage: 'Zeek logs', }), - category: TutorialsCategory.SIEM, + category: TutorialsCategory.SECURITY_SOLUTION, shortDescription: i18n.translate('home.tutorials.zeekLogs.shortDescription', { defaultMessage: 'Collect the logs created by Zeek/Bro.', }), diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx index edb96f119385e..b6205a8731dfa 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx @@ -21,7 +21,11 @@ import React, { Component } from 'react'; import { EuiPanel, EuiSpacer, EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { indexPatterns, IndexPatternAttributes } from '../../../../../../../plugins/data/public'; +import { + indexPatterns, + IndexPatternAttributes, + UI_SETTINGS, +} from '../../../../../../../plugins/data/public'; import { MAX_SEARCH_SIZE } from '../../constants'; import { getIndices, @@ -82,7 +86,8 @@ export class StepIndexPattern extends Component fieldWildcardMatcher(filters, uiSettings.get('metaFields')), + (filters: string[]) => fieldWildcardMatcher(filters, uiSettings.get(UI_SETTINGS.META_FIELDS)), [uiSettings] ); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx index a1b7289efee21..c97f19f59d340 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx @@ -35,7 +35,12 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { esQuery, IndexPattern, Query } from '../../../../../../../plugins/data/public'; +import { + esQuery, + IndexPattern, + Query, + UI_SETTINGS, +} from '../../../../../../../plugins/data/public'; import { context as contextType } from '../../../../../../kibana_react/public'; import { IndexPatternManagmentContextValue } from '../../../../types'; import { ExecuteScript } from '../../types'; @@ -244,7 +249,7 @@ export class TestScript extends Component { showDatePicker={false} showQueryInput={true} query={{ - language: this.context.services.uiSettings.get('search:queryLanguage'), + language: this.context.services.uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), query: '', }} onQuerySubmit={this.previewScript} diff --git a/src/plugins/inspector/public/views/data/components/data_table.tsx b/src/plugins/inspector/public/views/data/components/data_table.tsx index 69be069272f79..0fdf3d9b13e33 100644 --- a/src/plugins/inspector/public/views/data/components/data_table.tsx +++ b/src/plugins/inspector/public/views/data/components/data_table.tsx @@ -37,6 +37,7 @@ import { DataDownloadOptions } from './download_options'; import { DataViewRow, DataViewColumn } from '../types'; import { TabularData } from '../../../../common/adapters/data/types'; import { IUiSettingsClient } from '../../../../../../core/public'; +import { CSV_SEPARATOR_SETTING, CSV_QUOTE_VALUES_SETTING } from '../../../../../share/public'; interface DataTableFormatState { columns: DataViewColumn[]; @@ -58,8 +59,8 @@ export class DataTableFormat extends Component (reactDirective) => { // All modifiers default to true. // Set to false to hide subcomponents. 'showSearchBar', - 'showFilterBar', 'showQueryBar', 'showQueryInput', - 'showDatePicker', 'showSaveQuery', + 'showDatePicker', + 'showFilterBar', 'appName', 'screenTitle', diff --git a/src/plugins/kibana_react/public/code_editor/code_editor.examples.tsx b/src/plugins/kibana_react/public/code_editor/code_editor.examples.tsx index b6d5f2c5460f6..892c97e0ffae0 100644 --- a/src/plugins/kibana_react/public/code_editor/code_editor.examples.tsx +++ b/src/plugins/kibana_react/public/code_editor/code_editor.examples.tsx @@ -20,7 +20,7 @@ import { action } from '@storybook/addon-actions'; import { storiesOf } from '@storybook/react'; import React from 'react'; -import { monaco as monacoEditor } from '@kbn/ui-shared-deps/monaco'; +import { monaco as monacoEditor } from '@kbn/monaco'; import { CodeEditor } from './code_editor'; // A sample language definition with a few example tokens diff --git a/src/plugins/kibana_react/public/code_editor/code_editor.test.tsx b/src/plugins/kibana_react/public/code_editor/code_editor.test.tsx index bcb46fac36856..2f0670226cf46 100644 --- a/src/plugins/kibana_react/public/code_editor/code_editor.test.tsx +++ b/src/plugins/kibana_react/public/code_editor/code_editor.test.tsx @@ -19,9 +19,11 @@ import React from 'react'; import { CodeEditor } from './code_editor'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { shallow } from 'enzyme'; +// disabled because this is a test, but also it seems we shouldn't need this? +/* eslint-disable-next-line @kbn/eslint/module_migration */ import 'monaco-editor/esm/vs/basic-languages/html/html.contribution.js'; // A sample language definition with a few example tokens diff --git a/src/plugins/kibana_react/public/code_editor/code_editor.tsx b/src/plugins/kibana_react/public/code_editor/code_editor.tsx index e8b118b804347..f049085ccff61 100644 --- a/src/plugins/kibana_react/public/code_editor/code_editor.tsx +++ b/src/plugins/kibana_react/public/code_editor/code_editor.tsx @@ -21,7 +21,7 @@ import React from 'react'; import ReactResizeDetector from 'react-resize-detector'; import MonacoEditor from 'react-monaco-editor'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { LIGHT_THEME, DARK_THEME } from './editor_theme'; diff --git a/src/plugins/kibana_react/public/code_editor/editor_theme.ts b/src/plugins/kibana_react/public/code_editor/editor_theme.ts index 586b4a568c348..91d66ce8cbf81 100644 --- a/src/plugins/kibana_react/public/code_editor/editor_theme.ts +++ b/src/plugins/kibana_react/public/code_editor/editor_theme.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; diff --git a/src/plugins/kibana_utils/public/core/create_start_service_getter.ts b/src/plugins/kibana_utils/public/core/create_start_service_getter.ts index 14e2588a0a9cf..5e4a0f2bc7aeb 100644 --- a/src/plugins/kibana_utils/public/core/create_start_service_getter.ts +++ b/src/plugins/kibana_utils/public/core/create_start_service_getter.ts @@ -19,16 +19,17 @@ import { CoreStart, StartServicesAccessor } from '../../../../core/public'; -export interface StartServices { +export interface StartServices { plugins: Plugins; self: OwnContract; - core: CoreStart; + core: Core; } -export type StartServicesGetter = () => StartServices< - Plugins, - OwnContract ->; +export type StartServicesGetter< + Plugins = unknown, + OwnContract = unknown, + Core = CoreStart +> = () => StartServices; /** * Use this utility to create a synchronous *start* service getter in *setup* diff --git a/src/plugins/navigation/public/top_nav_menu/top_nav_menu.test.tsx b/src/plugins/navigation/public/top_nav_menu/top_nav_menu.test.tsx index 74cfd125c2e3a..46384fb3f27d5 100644 --- a/src/plugins/navigation/public/top_nav_menu/top_nav_menu.test.tsx +++ b/src/plugins/navigation/public/top_nav_menu/top_nav_menu.test.tsx @@ -29,6 +29,7 @@ const dataShim = { }; describe('TopNavMenu', () => { + const WRAPPER_SELECTOR = '.kbnTopNavMenu__wrapper'; const TOP_NAV_ITEM_SELECTOR = 'TopNavMenuItem'; const SEARCH_BAR_SELECTOR = 'SearchBar'; const menuItems: TopNavMenuData[] = [ @@ -51,18 +52,28 @@ describe('TopNavMenu', () => { it('Should render nothing when no config is provided', () => { const component = shallowWithIntl(); + expect(component.find(WRAPPER_SELECTOR).length).toBe(0); + expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(0); + expect(component.find(SEARCH_BAR_SELECTOR).length).toBe(0); + }); + + it('Should not render menu items when config is empty', () => { + const component = shallowWithIntl(); + expect(component.find(WRAPPER_SELECTOR).length).toBe(0); expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(0); expect(component.find(SEARCH_BAR_SELECTOR).length).toBe(0); }); it('Should render 1 menu item', () => { const component = shallowWithIntl(); + expect(component.find(WRAPPER_SELECTOR).length).toBe(1); expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(1); expect(component.find(SEARCH_BAR_SELECTOR).length).toBe(0); }); it('Should render multiple menu items', () => { const component = shallowWithIntl(); + expect(component.find(WRAPPER_SELECTOR).length).toBe(1); expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(menuItems.length); expect(component.find(SEARCH_BAR_SELECTOR).length).toBe(0); }); @@ -71,15 +82,25 @@ describe('TopNavMenu', () => { const component = shallowWithIntl( ); - + expect(component.find(WRAPPER_SELECTOR).length).toBe(1); expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(0); expect(component.find(SEARCH_BAR_SELECTOR).length).toBe(1); }); + it('Should render menu items and search bar', () => { + const component = shallowWithIntl( + + ); + expect(component.find(WRAPPER_SELECTOR).length).toBe(1); + expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(menuItems.length); + expect(component.find(SEARCH_BAR_SELECTOR).length).toBe(1); + }); + it('Should render with a class name', () => { const component = shallowWithIntl( { return ( + {renderItems()} + + ); + } + + function renderSearchBar(): ReactElement | null { // Validate presense of all required fields - if (!showSearchBar || !props.data) return; + if (!showSearchBar || !props.data) return null; const { SearchBar } = props.data.ui; return ; } @@ -70,16 +95,7 @@ export function TopNavMenu(props: TopNavMenuProps) { const className = classNames('kbnTopNavMenu', props.className); return ( - - {renderItems()} - + {renderMenu(className)} {renderSearchBar()} ); diff --git a/src/plugins/share/common/constants.ts b/src/plugins/share/common/constants.ts new file mode 100644 index 0000000000000..7ad8e39c279d3 --- /dev/null +++ b/src/plugins/share/common/constants.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const CSV_SEPARATOR_SETTING = 'csv:separator'; +export const CSV_QUOTE_VALUES_SETTING = 'csv:quoteValues'; diff --git a/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap b/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap index 8787e0c027375..cae7aa96a7c0e 100644 --- a/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap +++ b/src/plugins/share/public/components/__snapshots__/url_panel_content.test.tsx.snap @@ -44,7 +44,9 @@ exports[`share url panel content render 1`] = ` gutterSize="none" responsive={false} > - + - + - + - + - + - + - + - + `; + +exports[`should show url param extensions 1`] = ` + + + + } + labelType="label" + > + + + + + + + } + position="bottom" + /> + + , + }, + Object { + "data-test-subj": "exportAsSavedObject", + "disabled": false, + "id": "savedObject", + "label": + + + + + + } + position="bottom" + /> + + , + }, + ] + } + /> + + + + + + + + + } + onChange={[Function]} + /> + + + + } + position="bottom" + /> + + + + + + + + + +`; diff --git a/src/plugins/share/public/components/share_context_menu.tsx b/src/plugins/share/public/components/share_context_menu.tsx index c12e9dabd1938..26426853ddabe 100644 --- a/src/plugins/share/public/components/share_context_menu.tsx +++ b/src/plugins/share/public/components/share_context_menu.tsx @@ -26,7 +26,7 @@ import { EuiContextMenu, EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { HttpStart } from 'kibana/public'; import { UrlPanelContent } from './url_panel_content'; -import { ShareMenuItem, ShareContextMenuPanelItem } from '../types'; +import { ShareMenuItem, ShareContextMenuPanelItem, UrlParamExtension } from '../types'; interface Props { allowEmbed: boolean; @@ -39,6 +39,7 @@ interface Props { onClose: () => void; basePath: string; post: HttpStart['post']; + embedUrlParamExtensions?: UrlParamExtension[]; } export class ShareContextMenu extends Component { @@ -100,6 +101,7 @@ export class ShareContextMenu extends Component { basePath={this.props.basePath} post={this.props.post} shareableUrl={this.props.shareableUrl} + urlParamExtensions={this.props.embedUrlParamExtensions} /> ), }; diff --git a/src/plugins/share/public/components/url_panel_content.test.tsx b/src/plugins/share/public/components/url_panel_content.test.tsx index bd30dbf002df8..481f8312f4262 100644 --- a/src/plugins/share/public/components/url_panel_content.test.tsx +++ b/src/plugins/share/public/components/url_panel_content.test.tsx @@ -202,3 +202,13 @@ describe('share url panel content', () => { }); }); }); + +test('should show url param extensions', () => { + const TestExtension = () =>
; + const extensions = [{ paramName: 'testExtension', component: TestExtension }]; + const component = shallow( + + ); + expect(component.find('TestExtension').length).toBe(1); + expect(component).toMatchSnapshot(); +}); diff --git a/src/plugins/share/public/components/url_panel_content.tsx b/src/plugins/share/public/components/url_panel_content.tsx index 2ece2052c4b95..65a8538693a49 100644 --- a/src/plugins/share/public/components/url_panel_content.tsx +++ b/src/plugins/share/public/components/url_panel_content.tsx @@ -17,7 +17,7 @@ * under the License. */ -import React, { Component } from 'react'; +import React, { Component, ReactElement } from 'react'; import { EuiButton, @@ -41,6 +41,7 @@ import { HttpStart } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import { shortenUrl } from '../lib/url_shortener'; +import { UrlParamExtension } from '../types'; interface Props { allowShortUrl: boolean; @@ -50,6 +51,7 @@ interface Props { shareableUrl?: string; basePath: string; post: HttpStart['post']; + urlParamExtensions?: UrlParamExtension[]; } export enum ExportUrlAsType { @@ -57,12 +59,19 @@ export enum ExportUrlAsType { EXPORT_URL_AS_SNAPSHOT = 'snapshot', } +interface UrlParams { + [extensionName: string]: { + [queryParam: string]: boolean; + }; +} + interface State { exportUrlAs: ExportUrlAsType; useShortUrl: boolean; isCreatingShortUrl: boolean; url?: string; shortUrlErrorMsg?: string; + urlParams?: UrlParams; } export class UrlPanelContent extends Component { @@ -100,7 +109,7 @@ export class UrlPanelContent extends Component { {this.renderExportAsRadioGroup()} - + {this.renderUrlParamExtensions()} {this.renderShortUrlSwitch()} @@ -151,6 +160,13 @@ export class UrlPanelContent extends Component { } }; + private updateUrlParams = (url: string) => { + const embedUrl = this.props.isEmbedded ? this.makeUrlEmbeddable(url) : url; + const extendUrl = this.state.urlParams ? this.getUrlParamExtensions(embedUrl) : embedUrl; + + return extendUrl; + }; + private getSavedObjectUrl = () => { if (this.isNotSaved()) { return; @@ -166,7 +182,7 @@ export class UrlPanelContent extends Component { // Get the application route, after the hash, and remove the #. const parsedAppUrl = parseUrl(parsedUrl.hash.slice(1), true); - let formattedUrl = formatUrl({ + const formattedUrl = formatUrl({ protocol: parsedUrl.protocol, auth: parsedUrl.auth, host: parsedUrl.host, @@ -180,28 +196,42 @@ export class UrlPanelContent extends Component { }, }), }); - if (this.props.isEmbedded) { - formattedUrl = this.makeUrlEmbeddable(formattedUrl); - } - return formattedUrl; + return this.updateUrlParams(formattedUrl); }; private getSnapshotUrl = () => { - let url = this.props.shareableUrl || window.location.href; - if (this.props.isEmbedded) { - url = this.makeUrlEmbeddable(url); - } - return url; + const url = this.props.shareableUrl || window.location.href; + + return this.updateUrlParams(url); }; - private makeUrlEmbeddable = (url: string) => { - const embedQueryParam = '?embed=true'; + private makeUrlEmbeddable = (url: string): string => { + const embedParam = '?embed=true'; const urlHasQueryString = url.indexOf('?') !== -1; + if (urlHasQueryString) { - return url.replace('?', `${embedQueryParam}&`); + return url.replace('?', `${embedParam}&`); } - return `${url}${embedQueryParam}`; + + return `${url}${embedParam}`; + }; + + private getUrlParamExtensions = (url: string): string => { + const { urlParams } = this.state; + return urlParams + ? Object.keys(urlParams).reduce((urlAccumulator, key) => { + const urlParam = urlParams[key]; + return urlParam + ? Object.keys(urlParam).reduce((queryAccumulator, queryParam) => { + const isQueryParamEnabled = urlParam[queryParam]; + return isQueryParamEnabled + ? queryAccumulator + `&${queryParam}=true` + : queryAccumulator; + }, urlAccumulator) + : urlAccumulator; + }, url) + : url; }; private makeIframeTag = (url?: string) => { @@ -247,6 +277,10 @@ export class UrlPanelContent extends Component { } // "Use short URL" is checked but shortUrl has not been generated yet so one needs to be created. + this.createShortUrl(); + }; + + private createShortUrl = async () => { this.setState({ isCreatingShortUrl: true, shortUrlErrorMsg: undefined, @@ -262,7 +296,7 @@ export class UrlPanelContent extends Component { this.setState( { isCreatingShortUrl: false, - useShortUrl: isChecked, + useShortUrl: true, }, this.setUrl ); @@ -321,7 +355,7 @@ export class UrlPanelContent extends Component { private renderWithIconTip = (child: React.ReactNode, tipContent: React.ReactNode) => { return ( - {child} + {child} @@ -397,4 +431,34 @@ export class UrlPanelContent extends Component { ); }; + + private renderUrlParamExtensions = (): ReactElement | void => { + if (!this.props.urlParamExtensions) { + return; + } + + const setParamValue = (paramName: string) => ( + values: { [queryParam: string]: boolean } = {} + ): void => { + const stateUpdate = { + urlParams: { + ...this.state.urlParams, + [paramName]: { + ...values, + }, + }, + }; + this.setState(stateUpdate, this.state.useShortUrl ? this.createShortUrl : this.setUrl); + }; + + return ( + + {this.props.urlParamExtensions.map(({ paramName, component: UrlParamComponent }) => ( + + + + ))} + + ); + }; } diff --git a/src/plugins/share/public/index.ts b/src/plugins/share/public/index.ts index 183219645467e..e3d6c41a278cd 100644 --- a/src/plugins/share/public/index.ts +++ b/src/plugins/share/public/index.ts @@ -17,6 +17,8 @@ * under the License. */ +export { CSV_QUOTE_VALUES_SETTING, CSV_SEPARATOR_SETTING } from '../common/constants'; + export { UrlGeneratorStateMapping } from './url_generators/url_generator_definition'; export { SharePluginSetup, SharePluginStart } from './plugin'; diff --git a/src/plugins/share/public/services/share_menu_manager.tsx b/src/plugins/share/public/services/share_menu_manager.tsx index 35116efa85961..3325c5503fe89 100644 --- a/src/plugins/share/public/services/share_menu_manager.tsx +++ b/src/plugins/share/public/services/share_menu_manager.tsx @@ -67,6 +67,7 @@ export class ShareMenuManager { shareableUrl, post, basePath, + embedUrlParamExtensions, }: ShowShareMenuOptions & { menuItems: ShareMenuItem[]; post: HttpStart['post']; @@ -102,6 +103,7 @@ export class ShareMenuManager { onClose={this.onClose} post={post} basePath={basePath} + embedUrlParamExtensions={embedUrlParamExtensions} /> diff --git a/src/plugins/share/public/types.ts b/src/plugins/share/public/types.ts index 6b20f1f53a28c..8dda9f1195a39 100644 --- a/src/plugins/share/public/types.ts +++ b/src/plugins/share/public/types.ts @@ -17,6 +17,7 @@ * under the License. */ +import { ComponentType } from 'react'; import { EuiContextMenuPanelDescriptor, EuiContextMenuPanelItemDescriptor } from '@elastic/eui'; /** @@ -80,9 +81,19 @@ export interface ShareMenuProvider { getShareMenuItems: (context: ShareContext) => ShareMenuItem[]; } +interface UrlParamExtensionProps { + setParamValue: (values: {}) => void; +} + +export interface UrlParamExtension { + paramName: string; + component: ComponentType; +} + /** @public */ export interface ShowShareMenuOptions extends Omit { anchorElement: HTMLElement; allowEmbed: boolean; allowShortUrl: boolean; + embedUrlParamExtensions?: UrlParamExtension[]; } diff --git a/src/plugins/share/public/url_generators/url_generator_service.ts b/src/plugins/share/public/url_generators/url_generator_service.ts index 13c1b94acdd07..b63e2a45d6812 100644 --- a/src/plugins/share/public/url_generators/url_generator_service.ts +++ b/src/plugins/share/public/url_generators/url_generator_service.ts @@ -24,7 +24,7 @@ import { UrlGeneratorInternal } from './url_generator_internal'; import { UrlGeneratorContract } from './url_generator_contract'; export interface UrlGeneratorsStart { - getUrlGenerator: (urlGeneratorId: UrlGeneratorId) => UrlGeneratorContract; + getUrlGenerator: (urlGeneratorId: T) => UrlGeneratorContract; } export interface UrlGeneratorsSetup { diff --git a/src/plugins/share/server/index.ts b/src/plugins/share/server/index.ts index 9e574314f8000..ff419ce68d46b 100644 --- a/src/plugins/share/server/index.ts +++ b/src/plugins/share/server/index.ts @@ -20,6 +20,8 @@ import { PluginInitializerContext } from '../../../core/server'; import { SharePlugin } from './plugin'; +export { CSV_QUOTE_VALUES_SETTING, CSV_SEPARATOR_SETTING } from '../common/constants'; + export function plugin(initializerContext: PluginInitializerContext) { return new SharePlugin(initializerContext); } diff --git a/src/plugins/share/server/plugin.ts b/src/plugins/share/server/plugin.ts index 0d9f183d13404..e444cb1658d95 100644 --- a/src/plugins/share/server/plugin.ts +++ b/src/plugins/share/server/plugin.ts @@ -17,9 +17,12 @@ * under the License. */ +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; import { CoreSetup, Plugin, PluginInitializerContext } from 'kibana/server'; import { createRoutes } from './routes/create_routes'; import { url } from './saved_objects'; +import { CSV_SEPARATOR_SETTING, CSV_QUOTE_VALUES_SETTING } from '../common/constants'; export class SharePlugin implements Plugin { constructor(private readonly initializerContext: PluginInitializerContext) {} @@ -27,6 +30,28 @@ export class SharePlugin implements Plugin { public async setup(core: CoreSetup) { createRoutes(core, this.initializerContext.logger.get()); core.savedObjects.registerType(url); + core.uiSettings.register({ + [CSV_SEPARATOR_SETTING]: { + name: i18n.translate('share.advancedSettings.csv.separatorTitle', { + defaultMessage: 'CSV separator', + }), + value: ',', + description: i18n.translate('share.advancedSettings.csv.separatorText', { + defaultMessage: 'Separate exported values with this string', + }), + schema: schema.string(), + }, + [CSV_QUOTE_VALUES_SETTING]: { + name: i18n.translate('share.advancedSettings.csv.quoteValuesTitle', { + defaultMessage: 'Quote CSV values', + }), + value: true, + description: i18n.translate('share.advancedSettings.csv.quoteValuesText', { + defaultMessage: 'Should values be quoted in csv exports?', + }), + schema: schema.boolean(), + }, + }); } public start() { diff --git a/src/plugins/vis_default_editor/public/components/controls/filters.tsx b/src/plugins/vis_default_editor/public/components/controls/filters.tsx index 7a655b935a45e..9a9933b5e1e83 100644 --- a/src/plugins/vis_default_editor/public/components/controls/filters.tsx +++ b/src/plugins/vis_default_editor/public/components/controls/filters.tsx @@ -23,7 +23,7 @@ import { htmlIdGenerator, EuiButton, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { useMount } from 'react-use'; -import { Query } from 'src/plugins/data/public'; +import { Query, UI_SETTINGS } from '../../../../data/public'; import { useKibana } from '../../../../kibana_react/public'; import { FilterRow } from './filter'; import { AggParamEditorProps } from '../agg_param_props'; @@ -68,7 +68,7 @@ function FiltersParamEditor({ agg, value = [], setValue }: AggParamEditorProps) { setValue(value && agg.params.min_doc_count); } + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [agg.params.min_doc_count, setValue, value]); return ( diff --git a/src/plugins/vis_default_editor/public/components/controls/number_interval.tsx b/src/plugins/vis_default_editor/public/components/controls/number_interval.tsx index 02bf680734526..0d21eb04c12b2 100644 --- a/src/plugins/vis_default_editor/public/components/controls/number_interval.tsx +++ b/src/plugins/vis_default_editor/public/components/controls/number_interval.tsx @@ -23,6 +23,7 @@ import React, { useEffect, useCallback } from 'react'; import { EuiFieldNumber, EuiFormRow, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { UI_SETTINGS } from '../../../../data/public'; import { AggParamEditorProps } from '../agg_param_props'; @@ -38,7 +39,7 @@ const label = ( } type="questionInCircle" diff --git a/src/plugins/vis_default_editor/public/components/controls/utils/agg_utils.ts b/src/plugins/vis_default_editor/public/components/controls/utils/agg_utils.ts index ee24e2b42113d..950c856349230 100644 --- a/src/plugins/vis_default_editor/public/components/controls/utils/agg_utils.ts +++ b/src/plugins/vis_default_editor/public/components/controls/utils/agg_utils.ts @@ -33,6 +33,7 @@ const CUSTOM_METRIC = { }; function useCompatibleAggCallback(aggFilter: AggFilter) { + /* eslint-disable-next-line react-hooks/exhaustive-deps */ return useCallback(isCompatibleAggregation(aggFilter), [aggFilter]); } diff --git a/src/plugins/vis_type_table/public/agg_table/agg_table.js b/src/plugins/vis_type_table/public/agg_table/agg_table.js index f67dcf42adff6..bd7626a493338 100644 --- a/src/plugins/vis_type_table/public/agg_table/agg_table.js +++ b/src/plugins/vis_type_table/public/agg_table/agg_table.js @@ -17,6 +17,7 @@ * under the License. */ import _ from 'lodash'; +import { CSV_SEPARATOR_SETTING, CSV_QUOTE_VALUES_SETTING } from '../../../share/public'; import aggTableTemplate from './agg_table.html'; import { getFormatService } from '../services'; import { i18n } from '@kbn/i18n'; @@ -47,8 +48,8 @@ export function KbnAggTable(config, RecursionHelper) { self._saveAs = require('@elastic/filesaver').saveAs; self.csv = { - separator: config.get('csv:separator'), - quoteValues: config.get('csv:quoteValues'), + separator: config.get(CSV_SEPARATOR_SETTING), + quoteValues: config.get(CSV_QUOTE_VALUES_SETTING), }; self.exportAsCsv = function (formatted) { diff --git a/src/plugins/vis_type_timelion/public/components/panel.tsx b/src/plugins/vis_type_timelion/public/components/panel.tsx index 4c28e4e5a18ab..99c5532c04832 100644 --- a/src/plugins/vis_type_timelion/public/components/panel.tsx +++ b/src/plugins/vis_type_timelion/public/components/panel.tsx @@ -102,6 +102,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { [chartElem] ); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const highlightSeries = useCallback( debounce(({ currentTarget }: JQuery.TriggeredEvent) => { const id = Number(currentTarget.getAttribute(SERIES_ID_ATTR)); @@ -295,6 +296,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { [plot, legendValueNumbers, unhighlightSeries, legendCaption] ); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const debouncedSetLegendNumbers = useCallback( debounce(setLegendNumbers, DEBOUNCE_DELAY, { maxWait: DEBOUNCE_DELAY, diff --git a/src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx b/src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx index 8c76b41df0ced..8258b92b096c1 100644 --- a/src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx +++ b/src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx @@ -20,7 +20,7 @@ import React, { useEffect, useCallback, useRef, useMemo } from 'react'; import { EuiFormLabel } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { CodeEditor, useKibana } from '../../../kibana_react/public'; import { suggest, getSuggestion } from './timelion_expression_input_helpers'; diff --git a/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts b/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts index f7b3433105b76..8db057cdb3cc5 100644 --- a/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts +++ b/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts @@ -19,7 +19,7 @@ import { get, startsWith } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { Parser } from 'pegjs'; diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js b/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js index 1bc979399b1b1..a624ff72ead69 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js +++ b/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js @@ -30,6 +30,7 @@ import _ from 'lodash'; import { expect } from 'chai'; import sinon from 'sinon'; import invoke from '../helpers/invoke_series_fn.js'; +import { UI_SETTINGS } from '../../../../data/server'; function stubRequestAndServer(response, indexPatternSavedObjects = []) { return { @@ -216,14 +217,14 @@ describe('es', () => { it('sets ignore_throttled=true on the request', () => { config.index = 'beer'; - tlConfig.settings['search:includeFrozen'] = false; + tlConfig.settings[UI_SETTINGS.SEARCH_INCLUDE_FROZEN] = false; const request = fn(config, tlConfig, emptyScriptedFields); expect(request.ignore_throttled).to.equal(true); }); it('sets no timeout if elasticsearch.shardTimeout is set to 0', () => { - tlConfig.settings['search:includeFrozen'] = true; + tlConfig.settings[UI_SETTINGS.SEARCH_INCLUDE_FROZEN] = true; config.index = 'beer'; const request = fn(config, tlConfig, emptyScriptedFields); diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js b/src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js index 65b28fb833279..bc0e368fbdab1 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js +++ b/src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js @@ -21,6 +21,7 @@ import _ from 'lodash'; import moment from 'moment'; import { buildAggBody } from './agg_body'; import createDateAgg from './create_date_agg'; +import { UI_SETTINGS } from '../../../../../data/server'; export default function buildRequest(config, tlConfig, scriptedFields, timeout) { const bool = { must: [] }; @@ -78,7 +79,7 @@ export default function buildRequest(config, tlConfig, scriptedFields, timeout) const request = { index: config.index, - ignore_throttled: !tlConfig.settings['search:includeFrozen'], + ignore_throttled: !tlConfig.settings[UI_SETTINGS.SEARCH_INCLUDE_FROZEN], body: { query: { bool: bool, diff --git a/src/plugins/vis_type_timeseries/public/application/components/lib/get_default_query_language.js b/src/plugins/vis_type_timeseries/public/application/components/lib/get_default_query_language.js index 972f937ad109d..84da28718e323 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/lib/get_default_query_language.js +++ b/src/plugins/vis_type_timeseries/public/application/components/lib/get_default_query_language.js @@ -18,7 +18,8 @@ */ import { getUISettings } from '../../../services'; +import { UI_SETTINGS } from '../../../../../data/public'; export function getDefaultQueryLanguage() { - return getUISettings().get('search:queryLanguage'); + return getUISettings().get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE); } diff --git a/src/plugins/vis_type_timeseries/public/application/components/lib/tick_formatter.test.js b/src/plugins/vis_type_timeseries/public/application/components/lib/tick_formatter.test.js index 71e82770bfa03..308579126eeb1 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/lib/tick_formatter.test.js +++ b/src/plugins/vis_type_timeseries/public/application/components/lib/tick_formatter.test.js @@ -20,6 +20,7 @@ import { createTickFormatter } from './tick_formatter'; import { getFieldFormatsRegistry } from '../../../../../../test_utils/public/stub_field_formats'; import { setFieldFormats } from '../../../services'; +import { UI_SETTINGS } from '../../../../../data/public'; const mockUiSettings = { get: (item) => { @@ -28,11 +29,11 @@ const mockUiSettings = { getUpdate$: () => ({ subscribe: jest.fn(), }), - 'query:allowLeadingWildcards': true, - 'query:queryString:options': {}, - 'courier:ignoreFilterIfFieldNotInIndex': true, + [UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS]: true, + [UI_SETTINGS.QUERY_STRING_OPTIONS]: {}, + [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: true, 'dateFormat:tz': 'Browser', - 'format:defaultTypeMap': {}, + [UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP]: {}, }; const mockCore = { @@ -55,7 +56,7 @@ describe('createTickFormatter(format, template)', () => { test('returns a percent with percent formatter', () => { const config = { - 'format:percent:defaultPattern': '0.[00]%', + [UI_SETTINGS.FORMAT_PERCENT_DEFAULT_PATTERN]: '0.[00]%', }; const fn = createTickFormatter('percent', null, (key) => config[key]); expect(fn(0.5556)).toEqual('55.56%'); @@ -63,7 +64,7 @@ describe('createTickFormatter(format, template)', () => { test('returns a byte formatted string with byte formatter', () => { const config = { - 'format:bytes:defaultPattern': '0.0b', + [UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0.0b', }; const fn = createTickFormatter('bytes', null, (key) => config[key]); expect(fn(1500 ^ 10)).toEqual('1.5KB'); @@ -76,7 +77,7 @@ describe('createTickFormatter(format, template)', () => { test('returns a located string with custom locale setting', () => { const config = { - 'format:number:defaultLocale': 'fr', + [UI_SETTINGS.FORMAT_NUMBER_DEFAULT_LOCALE]: 'fr', }; const fn = createTickFormatter('0,0.0', null, (key) => config[key]); expect(fn(1500)).toEqual('1 500,0'); @@ -99,7 +100,7 @@ describe('createTickFormatter(format, template)', () => { test('returns formatted value if passed a bad template', () => { const config = { - 'format:number:defaultPattern': '0,0.[00]', + [UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN]: '0,0.[00]', }; const fn = createTickFormatter('number', '{{value', (key) => config[key]); expect(fn(1.5556)).toEqual('1.56'); diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js b/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js index 0c53ddd3f0ba8..a96890d4d1502 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js @@ -29,7 +29,7 @@ import { PanelConfig } from './panel_config'; import { createBrushHandler } from '../lib/create_brush_handler'; import { fetchFields } from '../lib/fetch_fields'; import { extractIndexPatterns } from '../../../../../plugins/vis_type_timeseries/common/extract_index_patterns'; -import { esKuery } from '../../../../../plugins/data/public'; +import { esKuery, UI_SETTINGS } from '../../../../../plugins/data/public'; import { getSavedObjectsClient, getUISettings, getDataStart, getCoreStart } from '../../services'; import { CoreStartContextProvider } from '../contexts/query_input_bar_context'; @@ -89,7 +89,9 @@ export class VisEditor extends Component { isValidKueryQuery = (filterQuery) => { if (filterQuery && filterQuery.language === 'kuery') { try { - const queryOptions = this.coreContext.uiSettings.get('query:allowLeadingWildcards'); + const queryOptions = this.coreContext.uiSettings.get( + UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS + ); esKuery.fromKueryExpression(filterQuery.query, { allowLeadingWildcards: queryOptions }); } catch (error) { return false; diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.js b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.js index 93a4eaba4ad9e..9ada39e359589 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.js +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.js @@ -17,12 +17,15 @@ * under the License. */ import { AbstractSearchRequest } from './abstract_request'; +import { UI_SETTINGS } from '../../../../../data/server'; const SEARCH_METHOD = 'msearch'; export class MultiSearchRequest extends AbstractSearchRequest { async search(searches) { - const includeFrozen = await this.req.getUiSettingsService().get('search:includeFrozen'); + const includeFrozen = await this.req + .getUiSettingsService() + .get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); const multiSearchBody = searches.reduce( (acc, { body, index }) => [ ...acc, diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.test.js b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.test.js index 1e28965a35793..c113db76332b7 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.test.js +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/multi_search_request.test.js @@ -17,6 +17,7 @@ * under the License. */ import { MultiSearchRequest } from './multi_search_request'; +import { UI_SETTINGS } from '../../../../../data/server'; describe('MultiSearchRequest', () => { let searchRequest; @@ -51,7 +52,7 @@ describe('MultiSearchRequest', () => { expect(responses).toEqual([]); expect(req.getUiSettingsService).toHaveBeenCalled(); - expect(getServiceMock).toHaveBeenCalledWith('search:includeFrozen'); + expect(getServiceMock).toHaveBeenCalledWith(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); expect(callWithRequest).toHaveBeenCalledWith(req, 'msearch', { body: [ { ignoreUnavailable: true, index: 'index' }, diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.js b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.js index 110deb6a9bc1b..7d8b60a7e4595 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.js +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.js @@ -17,12 +17,15 @@ * under the License. */ import { AbstractSearchRequest } from './abstract_request'; +import { UI_SETTINGS } from '../../../../../data/server'; const SEARCH_METHOD = 'search'; export class SingleSearchRequest extends AbstractSearchRequest { async search([{ body, index }]) { - const includeFrozen = await this.req.getUiSettingsService().get('search:includeFrozen'); + const includeFrozen = await this.req + .getUiSettingsService() + .get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); const resp = await this.callWithRequest(this.req, SEARCH_METHOD, { ignore_throttled: !includeFrozen, body, diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.test.js b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.test.js index 043bd52d87aad..b899814f2fe13 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.test.js +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/search_requests/single_search_request.test.js @@ -17,6 +17,7 @@ * under the License. */ import { SingleSearchRequest } from './single_search_request'; +import { UI_SETTINGS } from '../../../../../data/server'; describe('SingleSearchRequest', () => { let searchRequest; @@ -48,7 +49,7 @@ describe('SingleSearchRequest', () => { expect(responses).toEqual([{}]); expect(req.getUiSettingsService).toHaveBeenCalled(); - expect(getServiceMock).toHaveBeenCalledWith('search:includeFrozen'); + expect(getServiceMock).toHaveBeenCalledWith(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); expect(callWithRequest).toHaveBeenCalledWith(req, 'search', { body: 'body', index: 'index', diff --git a/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/get_es_query_uisettings.js b/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/get_es_query_uisettings.js index 42b8681f142e0..b427e5f12cadc 100644 --- a/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/get_es_query_uisettings.js +++ b/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/get_es_query_uisettings.js @@ -17,12 +17,14 @@ * under the License. */ +import { UI_SETTINGS } from '../../../../../data/server'; + export async function getEsQueryConfig(req) { const uiSettings = req.getUiSettingsService(); - const allowLeadingWildcards = await uiSettings.get('query:allowLeadingWildcards'); - const queryStringOptions = await uiSettings.get('query:queryString:options'); + const allowLeadingWildcards = await uiSettings.get(UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS); + const queryStringOptions = await uiSettings.get(UI_SETTINGS.QUERY_STRING_OPTIONS); const ignoreFilterIfFieldNotInIndex = await uiSettings.get( - 'courier:ignoreFilterIfFieldNotInIndex' + UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX ); return { allowLeadingWildcards, diff --git a/src/plugins/visualizations/common/constants.ts b/src/plugins/visualizations/common/constants.ts new file mode 100644 index 0000000000000..9129f060c5eef --- /dev/null +++ b/src/plugins/visualizations/common/constants.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const VISUALIZE_ENABLE_LABS_SETTING = 'visualize:enableLabs'; diff --git a/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts b/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts index 81794c31527ad..45c750de05ae1 100644 --- a/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts +++ b/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts @@ -29,6 +29,7 @@ import { getCapabilities, } from '../services'; import { VisualizeEmbeddableFactoryDeps } from './visualize_embeddable_factory'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../common/constants'; export const createVisEmbeddableFromObject = (deps: VisualizeEmbeddableFactoryDeps) => async ( vis: Vis, @@ -44,7 +45,7 @@ export const createVisEmbeddableFromObject = (deps: VisualizeEmbeddableFactoryDe const editUrl = visId ? getHttp().basePath.prepend(`/app/visualize${savedVisualizations.urlFor(visId)}`) : ''; - const isLabsEnabled = getUISettings().get('visualize:enableLabs'); + const isLabsEnabled = getUISettings().get(VISUALIZE_ENABLE_LABS_SETTING); if (!isLabsEnabled && vis.type.stage === 'experimental') { return new DisabledLabEmbeddable(vis.title, input); diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx index c4aa4c262edb0..c4267c9a36f78 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx @@ -43,6 +43,7 @@ import { convertToSerializedVis } from '../saved_visualizations/_saved_vis'; import { createVisEmbeddableFromObject } from './create_vis_embeddable_from_object'; import { StartServicesGetter } from '../../../kibana_utils/public'; import { VisualizationsStartDeps } from '../plugin'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../common/constants'; interface VisualizationAttributes extends SavedObjectAttributes { visState: string; @@ -82,7 +83,7 @@ export class VisualizeEmbeddableFactory if (!visType) { return false; } - if (getUISettings().get('visualize:enableLabs')) { + if (getUISettings().get(VISUALIZE_ENABLE_LABS_SETTING)) { return true; } return visType.stage !== 'experimental'; diff --git a/src/plugins/visualizations/public/index.ts b/src/plugins/visualizations/public/index.ts index e475684ed5934..0bbf862216ed5 100644 --- a/src/plugins/visualizations/public/index.ts +++ b/src/plugins/visualizations/public/index.ts @@ -17,8 +17,6 @@ * under the License. */ -import './index.scss'; - import { PublicContract } from '@kbn/utility-types'; import { PluginInitializerContext } from 'src/core/public'; import { VisualizationsPlugin, VisualizationsSetup, VisualizationsStart } from './plugin'; @@ -53,3 +51,4 @@ export { VisSavedObject, VisResponseValue, } from './types'; +export { VISUALIZE_ENABLE_LABS_SETTING } from '../common/constants'; diff --git a/src/plugins/visualizations/public/mocks.ts b/src/plugins/visualizations/public/mocks.ts index 70c3bc2c1ed05..05644eddc5fca 100644 --- a/src/plugins/visualizations/public/mocks.ts +++ b/src/plugins/visualizations/public/mocks.ts @@ -66,6 +66,7 @@ const createInstance = async () => { inspector: inspectorPluginMock.createStartContract(), uiActions: uiActionsPluginMock.createStartContract(), application: applicationServiceMock.createStartContract(), + embeddable: embeddablePluginMock.createStartContract(), }); return { diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index ef64eccfea31f..3546fa4056491 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -17,6 +17,8 @@ * under the License. */ +import './index.scss'; + import { PluginInitializerContext, CoreSetup, @@ -45,6 +47,7 @@ import { setChrome, setOverlays, setSavedSearchLoader, + setEmbeddable, } from './services'; import { VISUALIZE_EMBEDDABLE_TYPE, @@ -52,7 +55,7 @@ import { createVisEmbeddableFromObject, } from './embeddable'; import { ExpressionsSetup, ExpressionsStart } from '../../expressions/public'; -import { EmbeddableSetup } from '../../embeddable/public'; +import { EmbeddableSetup, EmbeddableStart } from '../../embeddable/public'; import { visualization as visualizationFunction } from './expressions/visualization_function'; import { visualization as visualizationRenderer } from './expressions/visualization_renderer'; import { range as rangeExpressionFunction } from './expression_functions/range'; @@ -102,6 +105,7 @@ export interface VisualizationsSetupDeps { export interface VisualizationsStartDeps { data: DataPublicPluginStart; expressions: ExpressionsStart; + embeddable: EmbeddableStart; inspector: InspectorStart; uiActions: UiActionsStart; application: ApplicationStart; @@ -151,11 +155,12 @@ export class VisualizationsPlugin public start( core: CoreStart, - { data, expressions, uiActions }: VisualizationsStartDeps + { data, expressions, uiActions, embeddable }: VisualizationsStartDeps ): VisualizationsStart { const types = this.types.start(); setI18n(core.i18n); setTypes(types); + setEmbeddable(embeddable); setApplication(core.application); setCapabilities(core.application.capabilities); setHttp(core.http); diff --git a/src/plugins/visualizations/public/services.ts b/src/plugins/visualizations/public/services.ts index 15055022af8aa..0761b8862e8e3 100644 --- a/src/plugins/visualizations/public/services.ts +++ b/src/plugins/visualizations/public/services.ts @@ -40,6 +40,7 @@ import { ExpressionsStart } from '../../../plugins/expressions/public'; import { UiActionsStart } from '../../../plugins/ui_actions/public'; import { SavedVisualizationsLoader } from './saved_visualizations'; import { SavedObjectLoader } from '../../saved_objects/public'; +import { EmbeddableStart } from '../../embeddable/public'; export const [getUISettings, setUISettings] = createGetterSetter('UISettings'); @@ -49,6 +50,8 @@ export const [getHttp, setHttp] = createGetterSetter('Http'); export const [getApplication, setApplication] = createGetterSetter('Application'); +export const [getEmbeddable, setEmbeddable] = createGetterSetter('Embeddable'); + export const [getSavedObjects, setSavedObjects] = createGetterSetter( 'SavedObjects' ); diff --git a/src/plugins/visualizations/public/wizard/new_vis_modal.tsx b/src/plugins/visualizations/public/wizard/new_vis_modal.tsx index cea92b1db93aa..1a970e505b7c7 100644 --- a/src/plugins/visualizations/public/wizard/new_vis_modal.tsx +++ b/src/plugins/visualizations/public/wizard/new_vis_modal.tsx @@ -29,6 +29,7 @@ import { TypeSelection } from './type_selection'; import { TypesStart, VisType, VisTypeAlias } from '../vis_types'; import { UsageCollectionSetup } from '../../../../plugins/usage_collection/public'; import { EMBEDDABLE_ORIGINATING_APP_PARAM } from '../../../embeddable/public'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../common/constants'; interface TypeSelectionProps { isOpen: boolean; @@ -65,7 +66,7 @@ class NewVisModal extends React.Component originatingApp; const visStateToEditorState = () => { diff --git a/src/plugins/visualize/public/application/listing/visualize_listing.js b/src/plugins/visualize/public/application/listing/visualize_listing.js index 228cfa1e9e492..e8e8d92034113 100644 --- a/src/plugins/visualize/public/application/listing/visualize_listing.js +++ b/src/plugins/visualize/public/application/listing/visualize_listing.js @@ -25,6 +25,8 @@ import { i18n } from '@kbn/i18n'; import { getServices } from '../../kibana_services'; import { syncQueryStateWithUrl } from '../../../../data/public'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../../../visualizations/public'; + import { EuiLink } from '@elastic/eui'; import React from 'react'; @@ -120,7 +122,7 @@ export function VisualizeListingController($scope, createNewVis, kbnUrlStateStor } this.fetchItems = (filter) => { - const isLabsEnabled = uiSettings.get('visualize:enableLabs'); + const isLabsEnabled = uiSettings.get(VISUALIZE_ENABLE_LABS_SETTING); return savedVisualizations .findListItems(filter, savedObjectsPublic.settings.getListingLimit()) .then((result) => { diff --git a/test/functional/apps/bundles/index.js b/test/functional/apps/bundles/index.js index 503517a98c69e..ead6412564751 100644 --- a/test/functional/apps/bundles/index.js +++ b/test/functional/apps/bundles/index.js @@ -25,7 +25,7 @@ export default function ({ getService }) { const supertest = getService('supertest'); describe('bundle compression', function () { - this.tags('ciGroup12'); + this.tags(['ciGroup12', 'skipCoverage']); let buildNum; before(async () => { diff --git a/test/functional/apps/context/_filters.js b/test/functional/apps/context/_filters.js index 470ef462b9d9d..66888d441954e 100644 --- a/test/functional/apps/context/_filters.js +++ b/test/functional/apps/context/_filters.js @@ -17,8 +17,6 @@ * under the License. */ -import expect from '@kbn/expect'; - const TEST_INDEX_PATTERN = 'logstash-*'; const TEST_ANCHOR_ID = 'AU_x3_BrGFA8no6QjjaI'; const TEST_ANCHOR_FILTER_FIELD = 'geo.src'; @@ -40,20 +38,19 @@ export default function ({ getService, getPageObjects }) { }); it('inclusive filter should be addable via expanded doc table rows', async function () { - await docTable.toggleRowExpanded({ isAnchorRow: true }); - - await retry.try(async () => { + await retry.waitFor(`filter ${TEST_ANCHOR_FILTER_FIELD} in filterbar`, async () => { + await docTable.toggleRowExpanded({ isAnchorRow: true }); const anchorDetailsRow = await docTable.getAnchorDetailsRow(); await docTable.addInclusiveFilter(anchorDetailsRow, TEST_ANCHOR_FILTER_FIELD); await PageObjects.context.waitUntilContextLoadingHasFinished(); - expect( - await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, true) - ).to.be(true); + + return await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, true); + }); + await retry.waitFor(`filter matching docs in docTable`, async () => { const fields = await docTable.getFields(); - const hasOnlyFilteredRows = fields + return fields .map((row) => row[2]) .every((fieldContent) => fieldContent === TEST_ANCHOR_FILTER_VALUE); - expect(hasOnlyFilteredRows).to.be(true); }); }); @@ -64,26 +61,27 @@ export default function ({ getService, getPageObjects }) { await filterBar.toggleFilterEnabled(TEST_ANCHOR_FILTER_FIELD); await PageObjects.context.waitUntilContextLoadingHasFinished(); - await retry.try(async () => { - expect( - await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, false) - ).to.be(true); + await retry.waitFor(`a disabled filter in filterbar`, async () => { + return await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, false); + }); + + await retry.waitFor('filters are disabled', async () => { const fields = await docTable.getFields(); const hasOnlyFilteredRows = fields .map((row) => row[2]) .every((fieldContent) => fieldContent === TEST_ANCHOR_FILTER_VALUE); - expect(hasOnlyFilteredRows).to.be(false); + return hasOnlyFilteredRows === false; }); }); it('filter for presence should be addable via expanded doc table rows', async function () { await docTable.toggleRowExpanded({ isAnchorRow: true }); - await retry.try(async () => { + await retry.waitFor('an exists filter in the filterbar', async () => { const anchorDetailsRow = await docTable.getAnchorDetailsRow(); await docTable.addExistsFilter(anchorDetailsRow, TEST_ANCHOR_FILTER_FIELD); await PageObjects.context.waitUntilContextLoadingHasFinished(); - expect(await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, 'exists', true)).to.be(true); + return await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, 'exists', true); }); }); }); diff --git a/test/functional/apps/context/_size.js b/test/functional/apps/context/_size.js index 3beb070b50deb..067a23daacb4a 100644 --- a/test/functional/apps/context/_size.js +++ b/test/functional/apps/context/_size.js @@ -16,69 +16,69 @@ * specific language governing permissions and limitations * under the License. */ - -import expect from '@kbn/expect'; - const TEST_INDEX_PATTERN = 'logstash-*'; const TEST_ANCHOR_ID = 'AU_x3_BrGFA8no6QjjaI'; -const TEST_DEFAULT_CONTEXT_SIZE = 7; -const TEST_STEP_SIZE = 3; +const TEST_DEFAULT_CONTEXT_SIZE = 2; +const TEST_STEP_SIZE = 2; export default function ({ getService, getPageObjects }) { const kibanaServer = getService('kibanaServer'); const retry = getService('retry'); const docTable = getService('docTable'); const PageObjects = getPageObjects(['context']); + let expectedRowLength = 2 * TEST_DEFAULT_CONTEXT_SIZE + 1; - // FLAKY: https://github.com/elastic/kibana/issues/53888 - describe.skip('context size', function contextSize() { + describe('context size', function contextSize() { before(async function () { await kibanaServer.uiSettings.update({ 'context:defaultSize': `${TEST_DEFAULT_CONTEXT_SIZE}`, 'context:step': `${TEST_STEP_SIZE}`, }); + await PageObjects.context.navigateTo(TEST_INDEX_PATTERN, TEST_ANCHOR_ID); }); it('should default to the `context:defaultSize` setting', async function () { - await PageObjects.context.navigateTo(TEST_INDEX_PATTERN, TEST_ANCHOR_ID); - - await retry.try(async function () { - expect(await docTable.getRowsText()).to.have.length(2 * TEST_DEFAULT_CONTEXT_SIZE + 1); - }); - await retry.try(async function () { - const predecessorCountPicker = await PageObjects.context.getPredecessorCountPicker(); - expect(await predecessorCountPicker.getAttribute('value')).to.equal( - `${TEST_DEFAULT_CONTEXT_SIZE}` - ); - }); - await retry.try(async function () { - const successorCountPicker = await PageObjects.context.getSuccessorCountPicker(); - expect(await successorCountPicker.getAttribute('value')).to.equal( - `${TEST_DEFAULT_CONTEXT_SIZE}` - ); - }); + await retry.waitFor( + `number of rows displayed initially is ${expectedRowLength}`, + async function () { + const rows = await docTable.getRowsText(); + return rows.length === expectedRowLength; + } + ); + await retry.waitFor( + `predecessor count picker is set to ${TEST_DEFAULT_CONTEXT_SIZE}`, + async function () { + const predecessorCountPicker = await PageObjects.context.getPredecessorCountPicker(); + const value = await predecessorCountPicker.getAttribute('value'); + return value === String(TEST_DEFAULT_CONTEXT_SIZE); + } + ); }); it('should increase according to the `context:step` setting when clicking the `load newer` button', async function () { - await PageObjects.context.navigateTo(TEST_INDEX_PATTERN, TEST_ANCHOR_ID); await PageObjects.context.clickPredecessorLoadMoreButton(); + expectedRowLength += TEST_STEP_SIZE; - await retry.try(async function () { - expect(await docTable.getRowsText()).to.have.length( - 2 * TEST_DEFAULT_CONTEXT_SIZE + TEST_STEP_SIZE + 1 - ); - }); + await retry.waitFor( + `number of rows displayed after clicking load more predecessors is ${expectedRowLength}`, + async function () { + const rows = await docTable.getRowsText(); + return rows.length === expectedRowLength; + } + ); }); it('should increase according to the `context:step` setting when clicking the `load older` button', async function () { - await PageObjects.context.navigateTo(TEST_INDEX_PATTERN, TEST_ANCHOR_ID); await PageObjects.context.clickSuccessorLoadMoreButton(); + expectedRowLength += TEST_STEP_SIZE; - await retry.try(async function () { - expect(await docTable.getRowsText()).to.have.length( - 2 * TEST_DEFAULT_CONTEXT_SIZE + TEST_STEP_SIZE + 1 - ); - }); + await retry.waitFor( + `number of rows displayed after clicking load more successors is ${expectedRowLength}`, + async function () { + const rows = await docTable.getRowsText(); + return rows.length === expectedRowLength; + } + ); }); }); } diff --git a/test/functional/apps/dashboard/create_and_add_embeddables.js b/test/functional/apps/dashboard/create_and_add_embeddables.js index ba715f3472b98..f5c2496a9a5aa 100644 --- a/test/functional/apps/dashboard/create_and_add_embeddables.js +++ b/test/functional/apps/dashboard/create_and_add_embeddables.js @@ -20,6 +20,7 @@ import expect from '@kbn/expect'; import { VisualizeConstants } from '../../../../src/plugins/visualize/public/application/visualize_constants'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../../../src/plugins/visualizations/common/constants'; export default function ({ getService, getPageObjects }) { const retry = getService('retry'); @@ -102,7 +103,7 @@ export default function ({ getService, getPageObjects }) { before(async () => { await PageObjects.header.clickStackManagement(); await PageObjects.settings.clickKibanaSettings(); - await PageObjects.settings.toggleAdvancedSettingCheckbox('visualize:enableLabs'); + await PageObjects.settings.toggleAdvancedSettingCheckbox(VISUALIZE_ENABLE_LABS_SETTING); }); it('should not display lab visualizations in add panel', async () => { @@ -117,7 +118,7 @@ export default function ({ getService, getPageObjects }) { after(async () => { await PageObjects.header.clickStackManagement(); await PageObjects.settings.clickKibanaSettings(); - await PageObjects.settings.clearAdvancedSettings('visualize:enableLabs'); + await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING); await PageObjects.header.clickDashboard(); }); }); diff --git a/test/functional/apps/dashboard/dashboard_filter_bar.js b/test/functional/apps/dashboard/dashboard_filter_bar.js index 6bc34a8b998a4..c931e6763f483 100644 --- a/test/functional/apps/dashboard/dashboard_filter_bar.js +++ b/test/functional/apps/dashboard/dashboard_filter_bar.js @@ -217,6 +217,11 @@ export default function ({ getService, getPageObjects }) { const hasWarningFieldFilter = await filterBar.hasFilter('extension', 'warn', true); expect(hasWarningFieldFilter).to.be(true); }); + + it('filter without an index pattern is rendred as a warning, if the dashboard has an index pattern', async function () { + const noIndexPatternFilter = await filterBar.hasFilter('banana', 'warn', true); + expect(noIndexPatternFilter).to.be(true); + }); }); }); } diff --git a/test/functional/apps/dashboard/embed_mode.js b/test/functional/apps/dashboard/embed_mode.js index 65ef75f3f65e1..a1828143555b0 100644 --- a/test/functional/apps/dashboard/embed_mode.js +++ b/test/functional/apps/dashboard/embed_mode.js @@ -20,6 +20,7 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { + const testSubjects = getService('testSubjects'); const retry = getService('retry'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); @@ -28,6 +29,13 @@ export default function ({ getService, getPageObjects }) { const globalNav = getService('globalNav'); describe('embed mode', () => { + const urlParamExtensions = [ + 'show-top-menu=true', + 'show-query-input=true', + 'show-time-filter=true', + 'hide-filter-bar=true', + ]; + before(async () => { await esArchiver.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ @@ -54,9 +62,28 @@ export default function ({ getService, getPageObjects }) { }); }); + it('shows or hides elements based on URL params', async () => { + await testSubjects.missingOrFail('top-nav'); + await testSubjects.missingOrFail('queryInput'); + await testSubjects.missingOrFail('superDatePickerToggleQuickMenuButton'); + await testSubjects.existOrFail('showFilterActions'); + + const currentUrl = await browser.getCurrentUrl(); + const newUrl = [currentUrl].concat(urlParamExtensions).join('&'); + // Embed parameter only works on a hard refresh. + const useTimeStamp = true; + await browser.get(newUrl.toString(), useTimeStamp); + + await testSubjects.existOrFail('top-nav'); + await testSubjects.existOrFail('queryInput'); + await testSubjects.existOrFail('superDatePickerToggleQuickMenuButton'); + await testSubjects.missingOrFail('showFilterActions'); + }); + after(async function () { const currentUrl = await browser.getCurrentUrl(); - const newUrl = currentUrl.replace('&embed=true', ''); + const replaceParams = ['', 'embed=true'].concat(urlParamExtensions).join('&'); + const newUrl = currentUrl.replace(replaceParams, ''); // First use the timestamp to cause a hard refresh so the new embed parameter works correctly. let useTimeStamp = true; await browser.get(newUrl.toString(), useTimeStamp); diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js index 9f3ce667d64b5..ecaa5aa2da97f 100644 --- a/test/functional/apps/discover/_discover.js +++ b/test/functional/apps/discover/_discover.js @@ -69,6 +69,16 @@ export default function ({ getService, getPageObjects }) { }); }); + it('renaming a saved query should modify name in breadcrumb', async function () { + const queryName2 = 'Modified Query # 1'; + await PageObjects.discover.loadSavedSearch(queryName1); + await PageObjects.discover.saveSearch(queryName2); + + await retry.try(async function () { + expect(await PageObjects.discover.getCurrentQueryName()).to.be(queryName2); + }); + }); + it('should show the correct hit count', async function () { const expectedHitCount = '14,004'; await retry.try(async function () { diff --git a/test/functional/apps/visualize/_lab_mode.js b/test/functional/apps/visualize/_lab_mode.js index b356d01cdb63b..27c149b9e0e0a 100644 --- a/test/functional/apps/visualize/_lab_mode.js +++ b/test/functional/apps/visualize/_lab_mode.js @@ -18,6 +18,7 @@ */ import expect from '@kbn/expect'; +import { VISUALIZE_ENABLE_LABS_SETTING } from '../../../../src/plugins/visualizations/common/constants'; export default function ({ getService, getPageObjects }) { const log = getService('log'); @@ -37,7 +38,7 @@ export default function ({ getService, getPageObjects }) { // Navigate to advanced setting and disable lab mode await PageObjects.header.clickStackManagement(); await PageObjects.settings.clickKibanaSettings(); - await PageObjects.settings.toggleAdvancedSettingCheckbox('visualize:enableLabs'); + await PageObjects.settings.toggleAdvancedSettingCheckbox(VISUALIZE_ENABLE_LABS_SETTING); // Expect the discover still to list that saved visualization in the open list await PageObjects.header.clickDiscover(); @@ -51,7 +52,7 @@ export default function ({ getService, getPageObjects }) { await PageObjects.discover.closeLoadSaveSearchPanel(); await PageObjects.header.clickStackManagement(); await PageObjects.settings.clickKibanaSettings(); - await PageObjects.settings.clearAdvancedSettings('visualize:enableLabs'); + await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING); }); }); } diff --git a/test/functional/apps/visualize/index.ts b/test/functional/apps/visualize/index.ts index bd427577cd787..42b82486dc13f 100644 --- a/test/functional/apps/visualize/index.ts +++ b/test/functional/apps/visualize/index.ts @@ -18,6 +18,7 @@ */ import { FtrProviderContext } from '../../ftr_provider_context.d'; +import { UI_SETTINGS } from '../../../../src/plugins/data/common'; // eslint-disable-next-line @typescript-eslint/no-namespace, import/no-default-export export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) { @@ -37,7 +38,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid await esArchiver.load('visualize'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', - 'format:bytes:defaultPattern': '0,0.[000]b', + [UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b', }); isOss = await PageObjects.common.isOss(); }); diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz index a052aad9450f5..ae78761fef0d3 100644 Binary files a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz and b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz differ diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts index 91e9c020a0e7c..fe5694efc35da 100644 --- a/test/functional/page_objects/common_page.ts +++ b/test/functional/page_objects/common_page.ts @@ -67,17 +67,17 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo * @param appUrl Kibana URL */ private async loginIfPrompted(appUrl: string, insertTimestamp: boolean) { + // Disable the welcome screen. This is relevant for environments + // which don't allow to use the yml setting, e.g. cloud production. + // It is done here so it applies to logins but also to a login re-use. + await browser.setLocalStorageItem('home:welcome:show', 'false'); + let currentUrl = await browser.getCurrentUrl(); log.debug(`currentUrl = ${currentUrl}\n appUrl = ${appUrl}`); await testSubjects.find('kibanaChrome', 6 * defaultFindTimeout); // 60 sec waiting const loginPage = currentUrl.includes('/login'); const wantedLoginPage = appUrl.includes('/login') || appUrl.includes('/logout'); - // Disable the welcome screen. This is relevant for environments - // which don't allow to use the yml setting, e.g. cloud production. - // It is done here so it applies to logins but also to a login re-use. - await browser.setLocalStorageItem('home:welcome:show', 'false'); - if (loginPage && !wantedLoginPage) { log.debug('Found login page'); if (config.get('security.disableTestUser')) { diff --git a/test/plugin_functional/plugins/core_provider_plugin/kibana.json b/test/plugin_functional/plugins/core_provider_plugin/kibana.json index 1d5c5824d6b97..8d9b30acab893 100644 --- a/test/plugin_functional/plugins/core_provider_plugin/kibana.json +++ b/test/plugin_functional/plugins/core_provider_plugin/kibana.json @@ -2,7 +2,7 @@ "id": "core_provider_plugin", "version": "0.0.1", "kibanaVersion": "kibana", - "optionalPlugins": ["core_plugin_a", "core_plugin_b", "licensing"], + "optionalPlugins": ["core_plugin_a", "core_plugin_b", "licensing", "globalSearchTest"], "server": false, "ui": true } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/public/app/dashboard_input.ts b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/public/app/dashboard_input.ts index 6f4e1f052f5e0..21b12e2134767 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/public/app/dashboard_input.ts +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/public/app/dashboard_input.ts @@ -92,6 +92,7 @@ export const dashboardInput: DashboardContainerInput = { }, }, }, + isEmbeddedExternally: false, isFullScreenMode: false, filters: [], useMargins: true, diff --git a/test/scripts/jenkins_ci_group.sh b/test/scripts/jenkins_ci_group.sh index 778142d95e4b4..60d7f0406f4c9 100755 --- a/test/scripts/jenkins_ci_group.sh +++ b/test/scripts/jenkins_ci_group.sh @@ -31,4 +31,12 @@ else mkdir -p ../kibana/target/kibana-coverage/functional mv target/kibana-coverage/functional/* ../kibana/target/kibana-coverage/functional/ fi + + echo " -> moving junit output, silently fail in case of no report" + mkdir -p ../kibana/target/junit + mv target/junit/* ../kibana/target/junit/ || echo "copying junit failed" + + echo " -> copying screenshots and html for failures" + cp -r test/functional/screenshots/* ../kibana/test/functional/screenshots/ || echo "copying screenshots failed" + cp -r test/functional/failure_debug ../kibana/test/functional/ || echo "copying html failed" fi diff --git a/test/scripts/jenkins_siem_cypress.sh b/test/scripts/jenkins_security_solution_cypress.sh similarity index 67% rename from test/scripts/jenkins_siem_cypress.sh rename to test/scripts/jenkins_security_solution_cypress.sh index c7157e97b36cc..23b83cf946d49 100644 --- a/test/scripts/jenkins_siem_cypress.sh +++ b/test/scripts/jenkins_security_solution_cypress.sh @@ -8,14 +8,14 @@ cp -R "$installDir" "$destDir" export KIBANA_INSTALL_DIR="$destDir" -echo " -> Running SIEM cypress tests" +echo " -> Running security solution cypress tests" cd "$XPACK_DIR" -checks-reporter-with-killswitch "SIEM Cypress Tests" \ +checks-reporter-with-killswitch "Security solution Cypress Tests" \ node scripts/functional_tests \ --debug --bail \ --kibana-install-dir "$KIBANA_INSTALL_DIR" \ - --config test/siem_cypress/config.ts + --config test/security_solution_cypress/config.ts echo "" echo "" diff --git a/test/scripts/jenkins_xpack.sh b/test/scripts/jenkins_xpack.sh index 50a92a41e3932..067ed213c49f5 100755 --- a/test/scripts/jenkins_xpack.sh +++ b/test/scripts/jenkins_xpack.sh @@ -17,7 +17,7 @@ if [[ -z "$CODE_COVERAGE" ]] ; then echo " -> Running SIEM cyclic dependency test" cd "$XPACK_DIR" - checks-reporter-with-killswitch "X-Pack SIEM cyclic dependency test" node plugins/siem/scripts/check_circular_deps + checks-reporter-with-killswitch "X-Pack SIEM cyclic dependency test" node plugins/security_solution/scripts/check_circular_deps echo "" echo "" diff --git a/test/scripts/jenkins_xpack_ci_group.sh b/test/scripts/jenkins_xpack_ci_group.sh index a6e600630364e..648605135b359 100755 --- a/test/scripts/jenkins_xpack_ci_group.sh +++ b/test/scripts/jenkins_xpack_ci_group.sh @@ -32,4 +32,12 @@ else mkdir -p ../../kibana/target/kibana-coverage/functional mv ../target/kibana-coverage/functional/* ../../kibana/target/kibana-coverage/functional/ fi + + echo " -> moving junit output, silently fail in case of no report" + mkdir -p ../../kibana/target/junit + mv ../target/junit/* ../../kibana/target/junit/ || echo "copying junit failed" + + echo " -> copying screenshots and html for failures" + cp -r test/functional/screenshots/* ../../kibana/x-pack/test/functional/screenshots/ || echo "copying screenshots failed" + cp -r test/functional/failure_debug ../../kibana/x-pack/test/functional/ || echo "copying html failed" fi \ No newline at end of file diff --git a/test/scripts/jenkins_xpack_page_load_metrics.sh b/test/scripts/jenkins_xpack_page_load_metrics.sh new file mode 100644 index 0000000000000..679f0b8d2ddc5 --- /dev/null +++ b/test/scripts/jenkins_xpack_page_load_metrics.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source test/scripts/jenkins_test_setup_xpack.sh + +checks-reporter-with-killswitch "Capture Kibana page load metrics" \ + node scripts/functional_tests \ + --debug --bail \ + --kibana-install-dir "$installDir" \ + --config test/page_load_metrics/config.ts; diff --git a/vars/kibanaCoverage.groovy b/vars/kibanaCoverage.groovy index 0305f86475a9a..66b16566418b5 100644 --- a/vars/kibanaCoverage.groovy +++ b/vars/kibanaCoverage.groovy @@ -98,7 +98,7 @@ def collectVcsInfo(title) { def generateReports(title) { kibanaPipeline.bash(""" - source src/dev/ci_setup/setup_env.sh + source src/dev/ci_setup/setup_env.sh true # bootstrap from x-pack folder cd x-pack yarn kbn bootstrap --prefer-offline diff --git a/x-pack/.gitignore b/x-pack/.gitignore index 5245e8a2e95c4..68262c4bf734b 100644 --- a/x-pack/.gitignore +++ b/x-pack/.gitignore @@ -3,8 +3,11 @@ /target /test/functional/failure_debug /test/functional/screenshots +/test/page_load_metrics/screenshots /test/functional/apps/reporting/reports/session /test/reporting/configs/failure_debug/ +/legacy/plugins/reporting/.chromium/ +/legacy/plugins/reporting/.phantom/ /plugins/reporting/.chromium/ /plugins/reporting/.phantom/ /.aws-config.json @@ -12,4 +15,4 @@ /.kibana-plugin-helpers.dev.* !/legacy/plugins/infra/**/target .cache -!/legacy/plugins/siem/**/target +!/legacy/plugins/security_solution/**/target diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 48dfa341f6385..85b40d33c4089 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -2,8 +2,7 @@ "prefix": "xpack", "paths": { "xpack.actions": "plugins/actions", - "xpack.advancedUiActions": "plugins/advanced_ui_actions", - "xpack.uiActionsEnhanced": "examples/ui_actions_enhanced_examples", + "xpack.uiActionsEnhanced": ["plugins/ui_actions_enhanced", "examples/ui_actions_enhanced_examples"], "xpack.alerts": "plugins/alerts", "xpack.alertingBuiltins": "plugins/alerting_builtins", "xpack.apm": ["legacy/plugins/apm", "plugins/apm"], @@ -18,6 +17,7 @@ "xpack.endpoint": "plugins/endpoint", "xpack.features": "plugins/features", "xpack.fileUpload": "plugins/file_upload", + "xpack.globalSearch": ["plugins/global_search"], "xpack.graph": ["plugins/graph"], "xpack.grokDebugger": "plugins/grokdebugger", "xpack.idxMgmt": "plugins/index_management", @@ -38,9 +38,9 @@ "xpack.reporting": ["plugins/reporting"], "xpack.rollupJobs": ["legacy/plugins/rollup", "plugins/rollup"], "xpack.searchProfiler": "plugins/searchprofiler", - "xpack.security": ["legacy/plugins/security", "plugins/security"], + "xpack.security": "plugins/security", "xpack.server": "legacy/server", - "xpack.siem": "plugins/siem", + "xpack.securitySolution": "plugins/security_solution", "xpack.snapshotRestore": "plugins/snapshot_restore", "xpack.spaces": ["legacy/plugins/spaces", "plugins/spaces"], "xpack.taskManager": "legacy/plugins/task_manager", @@ -48,7 +48,8 @@ "xpack.triggersActionsUI": "plugins/triggers_actions_ui", "xpack.upgradeAssistant": "plugins/upgrade_assistant", "xpack.uptime": ["plugins/uptime"], - "xpack.watcher": "plugins/watcher" + "xpack.watcher": "plugins/watcher", + "xpack.observability": "plugins/observability" }, "translations": [ "plugins/translations/translations/zh-CN.json", diff --git a/x-pack/README.md b/x-pack/README.md index 744d97ca02c75..03d2e3287c0f0 100644 --- a/x-pack/README.md +++ b/x-pack/README.md @@ -25,8 +25,8 @@ Examples: - Run the jest test case whose description matches 'filtering should skip values of null': `cd x-pack && yarn test:jest -t 'filtering should skip values of null' plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.test.js` - Run the x-pack api integration test case whose description matches the given string: - `node scripts/functional_tests_server --config x-pack/test/api_integration/config.js` - `node scripts/functional_test_runner --config x-pack/test/api_integration/config.js --grep='apis Monitoring Beats list with restarted beat instance should load multiple clusters'` + `node scripts/functional_tests_server --config x-pack/test/api_integration/config.ts` + `node scripts/functional_test_runner --config x-pack/test/api_integration/config.ts --grep='apis Monitoring Beats list with restarted beat instance should load multiple clusters'` In addition to to providing a regular expression argument, specific tests can also be run by appeding `.only` to an `it` or `describe` function block. E.g. `describe(` to `describe.only(`. @@ -63,7 +63,7 @@ yarn test:mocha For more info, see [the Elastic functional test development guide](https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html). -The functional UI tests, the API integration tests, and the SAML API integration tests are all run against a live browser, Kibana, and Elasticsearch install. Each set of tests is specified with a unique config that describes how to start the Elasticsearch server, the Kibana server, and what tests to run against them. The sets of tests that exist today are *functional UI tests* ([specified by this config](test/functional/config.js)), *API integration tests* ([specified by this config](test/api_integration/config.js)), and *SAML API integration tests* ([specified by this config](test/saml_api_integration/config.js)). +The functional UI tests, the API integration tests, and the SAML API integration tests are all run against a live browser, Kibana, and Elasticsearch install. Each set of tests is specified with a unique config that describes how to start the Elasticsearch server, the Kibana server, and what tests to run against them. The sets of tests that exist today are *functional UI tests* ([specified by this config](test/functional/config.js)), *API integration tests* ([specified by this config](test/api_integration/config.ts)), and *SAML API integration tests* ([specified by this config](test/saml_api_integration/config.ts)). The script runs all sets of tests sequentially like so: * builds Elasticsearch and X-Pack diff --git a/x-pack/dev-tools/jest/create_jest_config.js b/x-pack/dev-tools/jest/create_jest_config.js index a222e11d28f4a..74553bbde0cd6 100644 --- a/x-pack/dev-tools/jest/create_jest_config.js +++ b/x-pack/dev-tools/jest/create_jest_config.js @@ -24,7 +24,8 @@ export function createJestConfig({ kibanaDirectory, rootDir, xPackKibanaDirector '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': fileMockPath, '\\.module.(css|scss)$': `${kibanaDirectory}/src/dev/jest/mocks/css_module_mock.js`, '\\.(css|less|scss)$': `${kibanaDirectory}/src/dev/jest/mocks/style_mock.js`, - '\\.ace\\.worker.js$': `${kibanaDirectory}/src/dev/jest/mocks/ace_worker_module_mock.js`, + '\\.ace\\.worker.js$': `${kibanaDirectory}/src/dev/jest/mocks/worker_module_mock.js`, + '\\.editor\\.worker.js$': `${kibanaDirectory}/src/dev/jest/mocks/worker_module_mock.js`, '^test_utils/enzyme_helpers': `${xPackKibanaDirectory}/test_utils/enzyme_helpers.tsx`, '^test_utils/find_test_subject': `${xPackKibanaDirectory}/test_utils/find_test_subject.ts`, '^test_utils/stub_web_worker': `${xPackKibanaDirectory}/test_utils/stub_web_worker.ts`, @@ -42,6 +43,7 @@ export function createJestConfig({ kibanaDirectory, rootDir, xPackKibanaDirector '!**/scripts/**', '!**/mocks/**', '!**/plugins/apm/e2e/**', + '!**/plugins/siem/cypress/**', ], coveragePathIgnorePatterns: ['.*\\.d\\.ts'], coverageDirectory: `${kibanaDirectory}/target/kibana-coverage/jest`, diff --git a/x-pack/examples/ui_actions_enhanced_examples/kibana.json b/x-pack/examples/ui_actions_enhanced_examples/kibana.json index e220cdd5cd297..a1cd895bb3cd6 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/kibana.json +++ b/x-pack/examples/ui_actions_enhanced_examples/kibana.json @@ -5,6 +5,6 @@ "configPath": ["ui_actions_enhanced_examples"], "server": false, "ui": true, - "requiredPlugins": ["advancedUiActions", "data"], + "requiredPlugins": ["uiActionsEnhanced", "data", "discover"], "optionalPlugins": [] } diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_hello_world_drilldown/index.tsx b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_hello_world_drilldown/index.tsx index 847035403da02..bfe853241ae1d 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_hello_world_drilldown/index.tsx +++ b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_hello_world_drilldown/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiFormRow, EuiFieldText } from '@elastic/eui'; import { reactToUiComponent } from '../../../../../src/plugins/kibana_react/public'; -import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../plugins/advanced_ui_actions/public'; +import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../plugins/ui_actions_enhanced/public'; import { RangeSelectTriggerContext, ValueClickTriggerContext, diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/components/discover_drilldown_config/discover_drilldown_config.tsx b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/components/discover_drilldown_config/discover_drilldown_config.tsx index 0237e128c5a2f..da9b0e921fb1c 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/components/discover_drilldown_config/discover_drilldown_config.tsx +++ b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/components/discover_drilldown_config/discover_drilldown_config.tsx @@ -31,9 +31,7 @@ export const DiscoverDrilldownConfig: React.FC = ( onIndexPatternSelect, customIndexPattern, onCustomIndexPatternToggle, - carryFiltersAndQuery, onCarryFiltersAndQueryToggle, - carryTimeRange, onCarryTimeRangeToggle, }) => { return ( @@ -82,9 +80,10 @@ export const DiscoverDrilldownConfig: React.FC = ( {!!onCarryFiltersAndQueryToggle && ( @@ -92,9 +91,10 @@ export const DiscoverDrilldownConfig: React.FC = ( {!!onCarryTimeRangeToggle && ( diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/drilldown.tsx b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/drilldown.tsx index fef01c9640f0d..ba88f49861ffe 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/drilldown.tsx +++ b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_discover_drilldown/drilldown.tsx @@ -11,7 +11,7 @@ import { StartServicesGetter } from '../../../../../src/plugins/kibana_utils/pub import { ActionContext, Config, CollectConfigProps } from './types'; import { CollectConfigContainer } from './collect_config_container'; import { SAMPLE_DASHBOARD_TO_DISCOVER_DRILLDOWN } from './constants'; -import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../plugins/advanced_ui_actions/public'; +import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../plugins/ui_actions_enhanced/public'; import { txtGoToDiscover } from './i18n'; const isOutputWithIndexPatterns = ( @@ -22,7 +22,7 @@ const isOutputWithIndexPatterns = ( }; export interface Params { - start: StartServicesGetter>; + start: StartServicesGetter>; } export class DashboardToDiscoverDrilldown implements Drilldown { @@ -54,6 +54,10 @@ export class DashboardToDiscoverDrilldown implements Drilldown => { + const { urlGenerator } = this.params.start().plugins.discover; + + if (!urlGenerator) throw new Error('Discover URL generator not available.'); + let indexPatternId = !!config.customIndexPattern && !!config.indexPatternId ? config.indexPatternId : ''; @@ -64,8 +68,9 @@ export class DashboardToDiscoverDrilldown implements Drilldown => { diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_url_drilldown/index.tsx b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_url_drilldown/index.tsx index 20267a8b7292b..4810fb2d6ad8d 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_url_drilldown/index.tsx +++ b/x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_url_drilldown/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiFormRow, EuiSwitch, EuiFieldText, EuiCallOut, EuiSpacer } from '@elastic/eui'; import { reactToUiComponent } from '../../../../../src/plugins/kibana_react/public'; -import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../plugins/advanced_ui_actions/public'; +import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../plugins/ui_actions_enhanced/public'; import { RangeSelectTriggerContext, ValueClickTriggerContext, diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/plugin.ts b/x-pack/examples/ui_actions_enhanced_examples/public/plugin.ts index 0d4f274caf57f..8034c378cc64f 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/plugin.ts +++ b/x-pack/examples/ui_actions_enhanced_examples/public/plugin.ts @@ -9,27 +9,30 @@ import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../../src/pl import { AdvancedUiActionsSetup, AdvancedUiActionsStart, -} from '../../../../x-pack/plugins/advanced_ui_actions/public'; +} from '../../../../x-pack/plugins/ui_actions_enhanced/public'; import { DashboardHelloWorldDrilldown } from './dashboard_hello_world_drilldown'; import { DashboardToUrlDrilldown } from './dashboard_to_url_drilldown'; import { DashboardToDiscoverDrilldown } from './dashboard_to_discover_drilldown'; import { createStartServicesGetter } from '../../../../src/plugins/kibana_utils/public'; +import { DiscoverSetup, DiscoverStart } from '../../../../src/plugins/discover/public'; export interface SetupDependencies { data: DataPublicPluginSetup; - advancedUiActions: AdvancedUiActionsSetup; + discover: DiscoverSetup; + uiActionsEnhanced: AdvancedUiActionsSetup; } export interface StartDependencies { data: DataPublicPluginStart; - advancedUiActions: AdvancedUiActionsStart; + discover: DiscoverStart; + uiActionsEnhanced: AdvancedUiActionsStart; } export class UiActionsEnhancedExamplesPlugin implements Plugin { public setup( core: CoreSetup, - { advancedUiActions: uiActions }: SetupDependencies + { uiActionsEnhanced: uiActions }: SetupDependencies ) { const start = createStartServicesGetter(core.getStartServices); diff --git a/x-pack/legacy/plugins/beats_management/readme.md b/x-pack/legacy/plugins/beats_management/readme.md index 301caad683dd5..3414f09deed46 100644 --- a/x-pack/legacy/plugins/beats_management/readme.md +++ b/x-pack/legacy/plugins/beats_management/readme.md @@ -15,7 +15,7 @@ In one shell, from **~/kibana/x-pack**: `node scripts/functional_tests-server.js` In another shell, from **~kibana/x-pack**: -`node ../scripts/functional_test_runner.js --config test/api_integration/config.js`. +`node ../scripts/functional_test_runner.js --config test/api_integration/config.ts`. ### Manual e2e testing diff --git a/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts b/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts index bb1f68e1c03b3..80599f38d982a 100644 --- a/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts @@ -8,6 +8,7 @@ import { Lifecycle, ResponseToolkit } from 'hapi'; import * as t from 'io-ts'; +import { SecurityPluginSetup } from '../../../../../../../plugins/security/server'; import { LicenseType } from '../../../../common/constants/security'; export const internalAuthData = Symbol('internalAuthData'); @@ -39,6 +40,11 @@ export interface BackendFrameworkAdapter { } export interface KibanaLegacyServer { + newPlatform: { + setup: { + plugins: { security: SecurityPluginSetup }; + }; + }; plugins: { xpack_main: { status: { @@ -53,9 +59,6 @@ export interface KibanaLegacyServer { }; }; }; - security: { - getUser: (request: KibanaServerRequest) => any; - }; elasticsearch: { status: { on: (status: 'green' | 'yellow' | 'red', callback: () => void) => void; diff --git a/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.ts index 589f34ac74601..1bf9bbb22b352 100644 --- a/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -8,6 +8,7 @@ import { ResponseToolkit } from 'hapi'; import { PathReporter } from 'io-ts/lib/PathReporter'; import { get } from 'lodash'; import { isLeft } from 'fp-ts/lib/Either'; +import { KibanaRequest, LegacyRequest } from '../../../../../../../../src/core/server'; // @ts-ignore import { mirrorPluginStatus } from '../../../../../../server/lib/mirror_plugin_status'; import { @@ -128,13 +129,10 @@ export class KibanaBackendFrameworkAdapter implements BackendFrameworkAdapter { } private async getUser(request: KibanaServerRequest): Promise { - let user; - try { - user = await this.server.plugins.security.getUser(request); - } catch (e) { - return null; - } - if (user === null) { + const user = this.server.newPlatform.setup.plugins.security?.authc.getCurrentUser( + KibanaRequest.from((request as unknown) as LegacyRequest) + ); + if (!user) { return null; } const assertKibanaUser = RuntimeKibanaUser.decode(user); diff --git a/x-pack/legacy/plugins/security/index.ts b/x-pack/legacy/plugins/security/index.ts index 41371fcbc4c65..addeef34f63bf 100644 --- a/x-pack/legacy/plugins/security/index.ts +++ b/x-pack/legacy/plugins/security/index.ts @@ -6,64 +6,17 @@ import { Root } from 'joi'; import { resolve } from 'path'; -import { Server } from 'src/legacy/server/kbn_server'; -import { KibanaRequest, LegacyRequest } from '../../../../src/core/server'; -// @ts-ignore -import { watchStatusAndLicenseToInitialize } from '../../server/lib/watch_status_and_license_to_initialize'; -import { AuthenticatedUser, SecurityPluginSetup } from '../../../plugins/security/server'; - -/** - * Public interface of the security plugin. - */ -export interface SecurityPlugin { - getUser: (request: LegacyRequest) => Promise; -} - -function getSecurityPluginSetup(server: Server) { - const securityPlugin = server.newPlatform.setup.plugins.security as SecurityPluginSetup; - if (!securityPlugin) { - throw new Error('Kibana Platform Security plugin is not available.'); - } - - return securityPlugin; -} export const security = (kibana: Record) => new kibana.Plugin({ id: 'security', publicDir: resolve(__dirname, 'public'), - require: ['kibana', 'xpack_main'], + require: ['kibana'], configPrefix: 'xpack.security', - uiExports: { - hacks: ['plugins/security/hacks/legacy'], - injectDefaultVars: (server: Server) => { - return { enableSpaceAwarePrivileges: server.config().get('xpack.spaces.enabled') }; - }, - }, - - config(Joi: Root) { - return Joi.object({ - enabled: Joi.boolean().default(true), - }) + uiExports: { hacks: ['plugins/security/hacks/legacy'] }, + config: (Joi: Root) => + Joi.object({ enabled: Joi.boolean().default(true) }) .unknown() - .default(); - }, - - async postInit(server: Server) { - watchStatusAndLicenseToInitialize(server.plugins.xpack_main, this, async () => { - const xpackInfo = server.plugins.xpack_main.info; - if (xpackInfo.isAvailable() && xpackInfo.feature('security').isEnabled()) { - await getSecurityPluginSetup(server).__legacyCompat.registerPrivilegesWithCluster(); - } - }); - }, - - async init(server: Server) { - const securityPlugin = getSecurityPluginSetup(server); - - server.expose({ - getUser: async (request: LegacyRequest) => - securityPlugin.authc.getCurrentUser(KibanaRequest.from(request)), - }); - }, + .default(), + init() {}, }); diff --git a/x-pack/plugins/actions/server/builtin_action_types/case/types.ts b/x-pack/plugins/actions/server/builtin_action_types/case/types.ts index 459e9d2b03f92..992b2cb16fb06 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/case/types.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/case/types.ts @@ -21,6 +21,7 @@ import { ExecutorSubActionGetIncidentParamsSchema, ExecutorSubActionHandshakeParamsSchema, } from './schema'; +import { LicenseType } from '../../../../../legacy/common/constants'; export interface AnyParams { [index: string]: string | number | object | undefined | null; @@ -51,6 +52,7 @@ export type Comment = TypeOf; export interface ExternalServiceConfiguration { id: string; name: string; + minimumLicenseRequired: LicenseType; } export interface ExternalServiceCredentials { diff --git a/x-pack/plugins/actions/server/builtin_action_types/case/utils.ts b/x-pack/plugins/actions/server/builtin_action_types/case/utils.ts index 315d13b5aa773..dd8d971b7df44 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/case/utils.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/case/utils.ts @@ -120,9 +120,7 @@ export const createConnector = ({ configurationUtilities, executor = createConnectorExecutor({ api, createExternalService }), }: CreateActionTypeArgs): ActionType => ({ - id: config.id, - name: config.name, - minimumLicenseRequired: 'platinum', + ...config, validate: { config: schema.object(validationSchema.config, { validate: curry(validate.config)(configurationUtilities), diff --git a/x-pack/plugins/actions/server/builtin_action_types/jira/config.ts b/x-pack/plugins/actions/server/builtin_action_types/jira/config.ts index 7e415109f1bd9..54f28e447010a 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/jira/config.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/jira/config.ts @@ -10,4 +10,5 @@ import * as i18n from './translations'; export const config: ExternalServiceConfiguration = { id: '.jira', name: i18n.NAME, + minimumLicenseRequired: 'gold', }; diff --git a/x-pack/plugins/actions/server/builtin_action_types/servicenow/config.ts b/x-pack/plugins/actions/server/builtin_action_types/servicenow/config.ts index 4ad8108c3b137..70d53ab79f631 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/servicenow/config.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/servicenow/config.ts @@ -10,4 +10,5 @@ import * as i18n from './translations'; export const config: ExternalServiceConfiguration = { id: '.servicenow', name: i18n.NAME, + minimumLicenseRequired: 'platinum', }; diff --git a/x-pack/plugins/apm/public/application/index.tsx b/x-pack/plugins/apm/public/application/index.tsx index cb8600ed2c214..56c427e67ad4c 100644 --- a/x-pack/plugins/apm/public/application/index.tsx +++ b/x-pack/plugins/apm/public/application/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { Route, Router, Switch } from 'react-router-dom'; import styled from 'styled-components'; +import { EuiThemeProvider } from '../../../observability/public'; import { CoreStart, AppMountParameters } from '../../../../../src/core/public'; import { ApmPluginSetupDeps } from '../plugin'; import { ApmPluginContext } from '../context/ApmPluginContext'; @@ -18,7 +19,10 @@ import { LocationProvider } from '../context/LocationContext'; import { MatchedRouteProvider } from '../context/MatchedRouteContext'; import { UrlParamsProvider } from '../context/UrlParamsContext'; import { AlertsContextProvider } from '../../../triggers_actions_ui/public'; -import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public'; +import { + KibanaContextProvider, + useUiSetting$, +} from '../../../../../src/plugins/kibana_react/public'; import { px, unit, units } from '../style/variables'; import { UpdateBreadcrumbs } from '../components/app/Main/UpdateBreadcrumbs'; import { APMIndicesPermission } from '../components/app/APMIndicesPermission'; @@ -35,18 +39,22 @@ const MainContainer = styled.div` `; const App = () => { + const [darkMode] = useUiSetting$('theme:darkMode'); + return ( - - - - - - {routes.map((route, i) => ( - - ))} - - - + + + + + + + {routes.map((route, i) => ( + + ))} + + + + ); }; diff --git a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx index 5bb678d1c08af..50eb85715969a 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx @@ -79,6 +79,7 @@ export function AgentConfigurationCreateEdit({ ..._newConfig, settings: existingConfig?.settings || {}, })); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [existingConfig]); // update newConfig when existingConfig has loaded diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Distribution/index.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Distribution/index.tsx index d39ad530c1b4c..1244dd01a3b43 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Distribution/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Distribution/index.tsx @@ -109,10 +109,12 @@ export const TransactionDistribution: FunctionComponent = ( bucketIndex, } = props; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const formatYShort = useCallback(getFormatYShort(transactionType), [ transactionType, ]); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const formatYLong = useCallback(getFormatYLong(transactionType), [ transactionType, ]); diff --git a/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx b/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx index 988edb197a230..2507eca9ff663 100644 --- a/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx +++ b/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx @@ -66,6 +66,7 @@ export const TransactionActionMenu: FunctionComponent = ({ { key: 'transaction.name', value: transaction?.transaction.name }, { key: 'transaction.type', value: transaction?.transaction.type }, ].filter((filter): filter is Filter => typeof filter.value === 'string'), + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [transaction] ); diff --git a/x-pack/plugins/apm/public/hooks/useFetcher.test.tsx b/x-pack/plugins/apm/public/hooks/useFetcher.test.tsx index 28b836cd2c650..2db4659c83603 100644 --- a/x-pack/plugins/apm/public/hooks/useFetcher.test.tsx +++ b/x-pack/plugins/apm/public/hooks/useFetcher.test.tsx @@ -106,6 +106,7 @@ describe('useFetcher', () => { jest.useFakeTimers(); const hook = renderHook( + /* eslint-disable-next-line react-hooks/exhaustive-deps */ ({ callback, args }) => useFetcher(callback, args), { initialProps: { @@ -165,6 +166,7 @@ describe('useFetcher', () => { it('should return the same object reference when data is unchanged between rerenders', async () => { const hook = renderHook( + /* eslint-disable-next-line react-hooks/exhaustive-deps */ ({ callback, args }) => useFetcher(callback, args), { initialProps: { diff --git a/x-pack/plugins/apm/public/plugin.ts b/x-pack/plugins/apm/public/plugin.ts index 76320efe617ea..0939c51b16605 100644 --- a/x-pack/plugins/apm/public/plugin.ts +++ b/x-pack/plugins/apm/public/plugin.ts @@ -75,7 +75,7 @@ export class ApmPlugin implements Plugin { core.application.register({ id: 'apm', title: 'APM', - order: 8100, + order: 8300, euiIconType: 'apmApp', appRoute: '/app/apm', icon: 'plugins/apm/public/icon.svg', diff --git a/x-pack/plugins/apm/readme.md b/x-pack/plugins/apm/readme.md index ceed5e6c39716..cb694712d7c97 100644 --- a/x-pack/plugins/apm/readme.md +++ b/x-pack/plugins/apm/readme.md @@ -83,13 +83,13 @@ For debugging access Elasticsearch on http://localhost:9220` (elastic/changeme) **Start server** ``` -node scripts/functional_tests_server --config x-pack/test/api_integration/config.js +node scripts/functional_tests_server --config x-pack/test/api_integration/config.ts ``` **Run tests** ``` -node scripts/functional_test_runner --config x-pack/test/api_integration/config.js --grep='APM specs' +node scripts/functional_test_runner --config x-pack/test/api_integration/config.ts --grep='APM specs' ``` APM tests are located in `x-pack/test/api_integration/apis/apm`. diff --git a/x-pack/plugins/apm/server/lib/helpers/es_client.ts b/x-pack/plugins/apm/server/lib/helpers/es_client.ts index c7a17197ca778..892f8f0ddd105 100644 --- a/x-pack/plugins/apm/server/lib/helpers/es_client.ts +++ b/x-pack/plugins/apm/server/lib/helpers/es_client.ts @@ -19,6 +19,7 @@ import { ESSearchRequest, ESSearchResponse, } from '../../../typings/elasticsearch'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/server'; import { OBSERVER_VERSION_MAJOR } from '../../../common/elasticsearch_fieldnames'; import { pickKeys } from '../../../common/utils/pick_keys'; import { APMRequestHandlerContext } from '../../routes/typings'; @@ -95,7 +96,7 @@ async function getParamsForSearchRequest( savedObjectsClient: context.core.savedObjects.client, config: context.config, }), - uiSettings.client.get('search:includeFrozen'), + uiSettings.client.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN), ]); // Get indices for legacy data filter (only those which apply) diff --git a/x-pack/plugins/canvas/canvas_plugin_src/elements/metric/index.ts b/x-pack/plugins/canvas/canvas_plugin_src/elements/metric/index.ts index 7256657903aab..14409ae166a84 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/elements/metric/index.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/elements/metric/index.ts @@ -7,6 +7,7 @@ import { openSans } from '../../../common/lib/fonts'; import { ElementFactory } from '../../../types'; import { SetupInitializer } from '../../plugin'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/public'; export const metricElementInitializer: SetupInitializer = (core, setup) => { return () => ({ @@ -23,7 +24,7 @@ export const metricElementInitializer: SetupInitializer = (core, | metric "Countries" metricFont={font size=48 family="${openSans.value}" color="#000000" align="center" lHeight=48} labelFont={font size=14 family="${openSans.value}" color="#000000" align="center"} - metricFormat="${core.uiSettings.get('format:number:defaultPattern')}" + metricFormat="${core.uiSettings.get(UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN)}" | render`, }); }; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx index 2dd116d5ada08..ad368a912cd8c 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx @@ -11,12 +11,10 @@ import { StartDeps } from '../../plugin'; import { IEmbeddable, EmbeddableFactory, - EmbeddablePanel, EmbeddableFactoryNotFoundError, } from '../../../../../../src/plugins/embeddable/public'; import { EmbeddableExpression } from '../../expression_types/embeddable'; import { RendererStrings } from '../../../i18n'; -import { getSavedObjectFinder } from '../../../../../../src/plugins/saved_objects/public'; import { embeddableInputToExpression } from './embeddable_input_to_expression'; import { EmbeddableInput } from '../../expression_types'; import { RendererHandlers } from '../../../types'; @@ -38,17 +36,7 @@ const renderEmbeddableFactory = (core: CoreStart, plugins: StartDeps) => { style={{ width: domNode.offsetWidth, height: domNode.offsetHeight, cursor: 'auto' }} > - +
); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/time_filter/index.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/time_filter/index.tsx index ef5bfb70d4b3d..25278adcf4529 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/time_filter/index.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/time_filter/index.tsx @@ -7,6 +7,7 @@ import ReactDOM from 'react-dom'; import React from 'react'; import { toExpression } from '@kbn/interpreter/common'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/public'; import { syncFilterExpression } from '../../../public/lib/sync_filter_expression'; import { RendererStrings } from '../../../i18n'; import { TimeFilter } from './components'; @@ -20,7 +21,7 @@ const { timeFilter: strings } = RendererStrings; export const timeFilterFactory: StartInitializer> = (core, plugins) => { const { uiSettings } = core; - const customQuickRanges = (uiSettings.get('timepicker:quickRanges') || []).map( + const customQuickRanges = (uiSettings.get(UI_SETTINGS.TIMEPICKER_QUICK_RANGES) || []).map( ({ from, to, display }: { from: string; to: string; display: string }) => ({ start: from, end: to, diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts index 4025d4deaf997..5a3e3904f4f23 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts @@ -11,6 +11,7 @@ import { templateFromReactComponent } from '../../../../public/lib/template_from import { ArgumentFactory } from '../../../../types/arguments'; import { ArgumentStrings } from '../../../../i18n'; import { SetupInitializer } from '../../../plugin'; +import { UI_SETTINGS } from '../../../../../../../src/plugins/data/public'; const { NumberFormat: strings } = ArgumentStrings; @@ -19,11 +20,11 @@ export const numberFormatInitializer: SetupInitializer { const formatMap = { - NUMBER: core.uiSettings.get('format:number:defaultPattern'), - PERCENT: core.uiSettings.get('format:percent:defaultPattern'), - CURRENCY: core.uiSettings.get('format:currency:defaultPattern'), + NUMBER: core.uiSettings.get(UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN), + PERCENT: core.uiSettings.get(UI_SETTINGS.FORMAT_PERCENT_DEFAULT_PATTERN), + CURRENCY: core.uiSettings.get(UI_SETTINGS.FORMAT_CURRENCY_DEFAULT_PATTERN), DURATION: '00:00:00', - BYTES: core.uiSettings.get('format:bytes:defaultPattern'), + BYTES: core.uiSettings.get(UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN), }; const numberFormats = [ diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/views/metric.ts b/x-pack/plugins/canvas/canvas_plugin_src/uis/views/metric.ts index 93912b7b0517f..11bee46088576 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/views/metric.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/views/metric.ts @@ -7,6 +7,7 @@ import { openSans } from '../../../common/lib/fonts'; import { ViewStrings } from '../../../i18n'; import { SetupInitializer } from '../../plugin'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/public'; const { Metric: strings } = ViewStrings; @@ -22,7 +23,7 @@ export const metricInitializer: SetupInitializer = (core, plugin) => { displayName: strings.getMetricFormatDisplayName(), help: strings.getMetricFormatHelp(), argType: 'numberFormat', - default: `"${core.uiSettings.get('format:number:defaultPattern')}"`, + default: `"${core.uiSettings.get(UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN)}"`, }, { name: '_', diff --git a/x-pack/plugins/canvas/public/components/expression_input/__examples__/expression_input.examples.tsx b/x-pack/plugins/canvas/public/components/expression_input/__examples__/expression_input.examples.tsx index 51caf1db196bc..d010f4a554b87 100644 --- a/x-pack/plugins/canvas/public/components/expression_input/__examples__/expression_input.examples.tsx +++ b/x-pack/plugins/canvas/public/components/expression_input/__examples__/expression_input.examples.tsx @@ -7,7 +7,7 @@ import { action } from '@storybook/addon-actions'; import { storiesOf } from '@storybook/react'; import React from 'react'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { ExpressionInput } from '../expression_input'; import { language, LANGUAGE_ID } from '../../../lib/monaco_language_def'; diff --git a/x-pack/plugins/canvas/public/components/expression_input/expression_input.tsx b/x-pack/plugins/canvas/public/components/expression_input/expression_input.tsx index 99e12b14104be..5ada495208fba 100644 --- a/x-pack/plugins/canvas/public/components/expression_input/expression_input.tsx +++ b/x-pack/plugins/canvas/public/components/expression_input/expression_input.tsx @@ -8,7 +8,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { EuiFormRow } from '@elastic/eui'; import { debounce } from 'lodash'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { ExpressionFunction } from '../../../types'; import { CodeEditor } from '../../../../../../src/plugins/kibana_react/public'; import { diff --git a/x-pack/plugins/canvas/public/lib/monaco_language_def.ts b/x-pack/plugins/canvas/public/lib/monaco_language_def.ts index 7bd9ea7b6ef9a..5b88658ddcd63 100644 --- a/x-pack/plugins/canvas/public/lib/monaco_language_def.ts +++ b/x-pack/plugins/canvas/public/lib/monaco_language_def.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { ExpressionFunction } from '../../types'; export const LANGUAGE_ID = 'canvas-expression'; diff --git a/x-pack/plugins/dashboard_enhanced/kibana.json b/x-pack/plugins/dashboard_enhanced/kibana.json index f416ca97f7110..37211ea537179 100644 --- a/x-pack/plugins/dashboard_enhanced/kibana.json +++ b/x-pack/plugins/dashboard_enhanced/kibana.json @@ -3,6 +3,6 @@ "version": "kibana", "server": false, "ui": true, - "requiredPlugins": ["data", "advancedUiActions", "drilldowns", "embeddable", "dashboard", "share"], + "requiredPlugins": ["data", "uiActionsEnhanced", "drilldowns", "embeddable", "dashboard", "share"], "configPath": ["xpack", "dashboardEnhanced"] } diff --git a/x-pack/plugins/dashboard_enhanced/public/plugin.ts b/x-pack/plugins/dashboard_enhanced/public/plugin.ts index c258a4148f84a..413f5a7afe356 100644 --- a/x-pack/plugins/dashboard_enhanced/public/plugin.ts +++ b/x-pack/plugins/dashboard_enhanced/public/plugin.ts @@ -9,19 +9,19 @@ import { SharePluginStart, SharePluginSetup } from '../../../../src/plugins/shar import { EmbeddableSetup, EmbeddableStart } from '../../../../src/plugins/embeddable/public'; import { DashboardDrilldownsService } from './services'; import { DataPublicPluginStart } from '../../../../src/plugins/data/public'; -import { AdvancedUiActionsSetup, AdvancedUiActionsStart } from '../../advanced_ui_actions/public'; +import { AdvancedUiActionsSetup, AdvancedUiActionsStart } from '../../ui_actions_enhanced/public'; import { DrilldownsSetup, DrilldownsStart } from '../../drilldowns/public'; import { DashboardStart } from '../../../../src/plugins/dashboard/public'; export interface SetupDependencies { - advancedUiActions: AdvancedUiActionsSetup; + uiActionsEnhanced: AdvancedUiActionsSetup; drilldowns: DrilldownsSetup; embeddable: EmbeddableSetup; share: SharePluginSetup; } export interface StartDependencies { - advancedUiActions: AdvancedUiActionsStart; + uiActionsEnhanced: AdvancedUiActionsStart; data: DataPublicPluginStart; drilldowns: DrilldownsStart; embeddable: EmbeddableStart; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx index 555acf1fca5ff..309e6cbf53a3d 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.test.tsx @@ -8,7 +8,7 @@ import { FlyoutEditDrilldownAction, FlyoutEditDrilldownParams } from './flyout_e import { coreMock } from '../../../../../../../../src/core/public/mocks'; import { drilldownsPluginMock } from '../../../../../../drilldowns/public/mocks'; import { ViewMode } from '../../../../../../../../src/plugins/embeddable/public'; -import { uiActionsEnhancedPluginMock } from '../../../../../../advanced_ui_actions/public/mocks'; +import { uiActionsEnhancedPluginMock } from '../../../../../../ui_actions_enhanced/public/mocks'; import { EnhancedEmbeddable } from '../../../../../../embeddable_enhanced/public'; import { MockEmbeddable, enhanceEmbeddable } from '../test_helpers'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx index ec3a78e97eae4..9a4ecb2d4bfb0 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/menu_item.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { render, cleanup, act } from '@testing-library/react/pure'; import { MenuItem } from './menu_item'; import { createStateContainer } from '../../../../../../../../src/plugins/kibana_utils/public'; -import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '../../../../../../advanced_ui_actions/public'; +import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '../../../../../../ui_actions_enhanced/public'; import { EnhancedEmbeddable } from '../../../../../../embeddable_enhanced/public'; import '@testing-library/jest-dom'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/test_helpers.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/test_helpers.ts index cccacf701a9ad..e831f87baa11c 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/test_helpers.ts +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/test_helpers.ts @@ -10,9 +10,9 @@ import { UiActionsEnhancedMemoryActionStorage as MemoryActionStorage, UiActionsEnhancedDynamicActionManager as DynamicActionManager, AdvancedUiActionsStart, -} from '../../../../../advanced_ui_actions/public'; +} from '../../../../../ui_actions_enhanced/public'; import { TriggerContextMapping } from '../../../../../../../src/plugins/ui_actions/public'; -import { uiActionsEnhancedPluginMock } from '../../../../../advanced_ui_actions/public/mocks'; +import { uiActionsEnhancedPluginMock } from '../../../../../ui_actions_enhanced/public/mocks'; export class MockEmbeddable extends Embeddable { public rootType = 'dashboard'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts index f5926cd6961c2..4325e3309b898 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_drilldowns_services.ts @@ -41,7 +41,7 @@ export class DashboardDrilldownsService { setupDrilldowns( core: CoreSetup, - { advancedUiActions: uiActions }: SetupDependencies + { uiActionsEnhanced: uiActions }: SetupDependencies ) { const start = createStartServicesGetter(core.getStartServices); const getDashboardUrlGenerator = () => { diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx index c94d19d28e6da..6ce7dccd3a3ec 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx @@ -101,13 +101,13 @@ describe('.execute() & getHref', () => { }, }, plugins: { - advancedUiActions: {}, + uiActionsEnhanced: {}, data: { actions: dataPluginActions, }, }, self: {}, - })) as unknown) as StartServicesGetter>, + })) as unknown) as StartServicesGetter>, getDashboardUrlGenerator: () => new UrlGeneratorsService().setup(coreMock.createSetup()).registerUrlGenerator( createDashboardUrlGenerator(() => diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx index 7ff84a75dd52c..26a69132cffb1 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx @@ -10,7 +10,7 @@ import { DashboardUrlGenerator } from '../../../../../../../src/plugins/dashboar import { ActionContext, Config } from './types'; import { CollectConfigContainer } from './components'; import { DASHBOARD_TO_DASHBOARD_DRILLDOWN } from './constants'; -import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../../advanced_ui_actions/public'; +import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../../ui_actions_enhanced/public'; import { txtGoToDashboard } from './i18n'; import { esFilters } from '../../../../../../../src/plugins/data/public'; import { VisualizeEmbeddableContract } from '../../../../../../../src/plugins/visualizations/public'; @@ -22,7 +22,7 @@ import { StartServicesGetter } from '../../../../../../../src/plugins/kibana_uti import { StartDependencies } from '../../../plugin'; export interface Params { - start: StartServicesGetter>; + start: StartServicesGetter>; getDashboardUrlGenerator: () => DashboardUrlGenerator; } diff --git a/x-pack/plugins/data_enhanced/public/search/es_search_strategy.ts b/x-pack/plugins/data_enhanced/public/search/es_search_strategy.ts index c493e8ce86781..3a511c7b5a176 100644 --- a/x-pack/plugins/data_enhanced/public/search/es_search_strategy.ts +++ b/x-pack/plugins/data_enhanced/public/search/es_search_strategy.ts @@ -11,6 +11,7 @@ import { ISearchContext, ISearch, getEsPreference, + UI_SETTINGS, } from '../../../../../src/plugins/data/public'; import { IEnhancedEsSearchRequest, EnhancedSearchParams } from '../../common'; import { ASYNC_SEARCH_STRATEGY } from './async_search_strategy'; @@ -27,7 +28,7 @@ export const enhancedEsSearchStrategyProvider: TSearchStrategyProvider { const params: EnhancedSearchParams = { - ignoreThrottled: !context.core.uiSettings.get('search:includeFrozen'), + ignoreThrottled: !context.core.uiSettings.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN), preference: getEsPreference(context.core.uiSettings), ...request.params, }; diff --git a/x-pack/plugins/drilldowns/kibana.json b/x-pack/plugins/drilldowns/kibana.json index 678c054aa322c..1614f94b488fd 100644 --- a/x-pack/plugins/drilldowns/kibana.json +++ b/x-pack/plugins/drilldowns/kibana.json @@ -3,6 +3,6 @@ "version": "kibana", "server": false, "ui": true, - "requiredPlugins": ["uiActions", "embeddable", "advancedUiActions"], + "requiredPlugins": ["uiActions", "embeddable", "uiActionsEnhanced"], "configPath": ["xpack", "drilldowns"] } diff --git a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx index a186feec33924..5fde4fc79e433 100644 --- a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx +++ b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx @@ -12,13 +12,13 @@ import { dashboardFactory, urlFactory, // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../../advanced_ui_actions/public/components/action_wizard/test_data'; +} from '../../../../ui_actions_enhanced/public/components/action_wizard/test_data'; import { Storage } from '../../../../../../src/plugins/kibana_utils/public'; import { StubBrowserStorage } from '../../../../../../src/test_utils/public/stub_browser_storage'; import { mockDynamicActionManager } from './test_data'; const FlyoutManageDrilldowns = createFlyoutManageDrilldowns({ - advancedUiActions: { + uiActionsEnhanced: { getActionFactories() { return [dashboardFactory, urlFactory]; }, diff --git a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.test.tsx b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.test.tsx index 0f7f0cb22760b..32cbec795d092 100644 --- a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.test.tsx +++ b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.test.tsx @@ -11,7 +11,7 @@ import { createFlyoutManageDrilldowns } from './connected_flyout_manage_drilldow import { dashboardFactory, urlFactory, -} from '../../../../advanced_ui_actions/public/components/action_wizard/test_data'; +} from '../../../../ui_actions_enhanced/public/components/action_wizard/test_data'; import { StubBrowserStorage } from '../../../../../../src/test_utils/public/stub_browser_storage'; import { Storage } from '../../../../../../src/plugins/kibana_utils/public'; import { mockDynamicActionManager } from './test_data'; @@ -24,7 +24,7 @@ import { toastDrilldownsCRUDError } from './i18n'; const storage = new Storage(new StubBrowserStorage()); const notifications = coreMock.createStart().notifications; const FlyoutManageDrilldowns = createFlyoutManageDrilldowns({ - advancedUiActions: { + uiActionsEnhanced: { getActionFactories() { return [dashboardFactory, urlFactory]; }, diff --git a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx index 3c9d2d2a86fb1..45cf7365ebd91 100644 --- a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx +++ b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.tsx @@ -7,12 +7,12 @@ import React, { useEffect, useState } from 'react'; import useMountedState from 'react-use/lib/useMountedState'; import { - AdvancedUiActionsActionFactory as ActionFactory, + UiActionsEnhancedActionFactory as ActionFactory, AdvancedUiActionsStart, UiActionsEnhancedDynamicActionManager as DynamicActionManager, UiActionsEnhancedSerializedAction, UiActionsEnhancedSerializedEvent, -} from '../../../../advanced_ui_actions/public'; +} from '../../../../ui_actions_enhanced/public'; import { NotificationsStart } from '../../../../../../src/core/public'; import { DrilldownWizardConfig, FlyoutDrilldownWizard } from '../flyout_drilldown_wizard'; import { FlyoutListManageDrilldowns } from '../flyout_list_manage_drilldowns'; @@ -48,17 +48,17 @@ enum Routes { } export function createFlyoutManageDrilldowns({ - advancedUiActions, + uiActionsEnhanced, storage, notifications, }: { - advancedUiActions: AdvancedUiActionsStart; + uiActionsEnhanced: AdvancedUiActionsStart; storage: IStorageWrapper; notifications: NotificationsStart; }) { // fine to assume this is static, // because all action factories should be registered in setup phase - const allActionFactories = advancedUiActions.getActionFactories(); + const allActionFactories = uiActionsEnhanced.getActionFactories(); const allActionFactoriesById = allActionFactories.reduce((acc, next) => { acc[next.id] = next; return acc; diff --git a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/test_data.ts b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/test_data.ts index c9cb0b0eb1cb3..d585fa0692e8c 100644 --- a/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/test_data.ts +++ b/x-pack/plugins/drilldowns/public/components/connected_flyout_manage_drilldowns/test_data.ts @@ -9,7 +9,7 @@ import { UiActionsEnhancedDynamicActionManager as DynamicActionManager, UiActionsEnhancedDynamicActionManagerState as DynamicActionManagerState, UiActionsEnhancedSerializedAction, -} from '../../../../advanced_ui_actions/public'; +} from '../../../../ui_actions_enhanced/public'; import { TriggerContextMapping } from '../../../../../../src/plugins/ui_actions/public'; import { createStateContainer } from '../../../../../../src/plugins/kibana_utils/common'; diff --git a/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx b/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx index add8b748afee9..be048bf920602 100644 --- a/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx +++ b/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx @@ -14,8 +14,8 @@ import { dashboardFactory, urlFactory, // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../../advanced_ui_actions/public/components/action_wizard/test_data'; -import { AdvancedUiActionsActionFactory as ActionFactory } from '../../../../advanced_ui_actions/public/'; +} from '../../../../ui_actions_enhanced/public/components/action_wizard/test_data'; +import { UiActionsEnhancedActionFactory as ActionFactory } from '../../../../ui_actions_enhanced/public/'; storiesOf('components/FlyoutDrilldownWizard', module) .add('default', () => { diff --git a/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.tsx b/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.tsx index 84c1a04a71d15..87f886817517f 100644 --- a/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.tsx +++ b/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.tsx @@ -16,7 +16,7 @@ import { txtEditDrilldownTitle, } from './i18n'; import { DrilldownHelloBar } from '../drilldown_hello_bar'; -import { AdvancedUiActionsActionFactory as ActionFactory } from '../../../../advanced_ui_actions/public'; +import { UiActionsEnhancedActionFactory as ActionFactory } from '../../../../ui_actions_enhanced/public'; export interface DrilldownWizardConfig { name: string; diff --git a/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx b/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx index 38168377b02bd..1813851d728db 100644 --- a/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx +++ b/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { EuiFieldText, EuiForm, EuiFormRow, EuiSpacer } from '@elastic/eui'; import { txtDrilldownAction, txtNameOfDrilldown, txtUntitledDrilldown } from './i18n'; import { - AdvancedUiActionsActionFactory as ActionFactory, + UiActionsEnhancedActionFactory as ActionFactory, ActionWizard, -} from '../../../../advanced_ui_actions/public'; +} from '../../../../ui_actions_enhanced/public'; const noopFn = () => {}; diff --git a/x-pack/plugins/drilldowns/public/plugin.ts b/x-pack/plugins/drilldowns/public/plugin.ts index 0108e04df9c99..32176241c102f 100644 --- a/x-pack/plugins/drilldowns/public/plugin.ts +++ b/x-pack/plugins/drilldowns/public/plugin.ts @@ -6,18 +6,18 @@ import { CoreStart, CoreSetup, Plugin } from 'src/core/public'; import { UiActionsSetup, UiActionsStart } from '../../../../src/plugins/ui_actions/public'; -import { AdvancedUiActionsSetup, AdvancedUiActionsStart } from '../../advanced_ui_actions/public'; +import { AdvancedUiActionsSetup, AdvancedUiActionsStart } from '../../ui_actions_enhanced/public'; import { createFlyoutManageDrilldowns } from './components/connected_flyout_manage_drilldowns'; import { Storage } from '../../../../src/plugins/kibana_utils/public'; export interface SetupDependencies { uiActions: UiActionsSetup; - advancedUiActions: AdvancedUiActionsSetup; + uiActionsEnhanced: AdvancedUiActionsSetup; } export interface StartDependencies { uiActions: UiActionsStart; - advancedUiActions: AdvancedUiActionsStart; + uiActionsEnhanced: AdvancedUiActionsStart; } // eslint-disable-next-line @@ -36,7 +36,7 @@ export class DrilldownsPlugin public start(core: CoreStart, plugins: StartDependencies): StartContract { return { FlyoutManageDrilldowns: createFlyoutManageDrilldowns({ - advancedUiActions: plugins.advancedUiActions, + uiActionsEnhanced: plugins.uiActionsEnhanced, storage: new Storage(localStorage), notifications: core.notifications, }), diff --git a/x-pack/plugins/embeddable_enhanced/kibana.json b/x-pack/plugins/embeddable_enhanced/kibana.json index 780a1d5d89870..5663671de7bd9 100644 --- a/x-pack/plugins/embeddable_enhanced/kibana.json +++ b/x-pack/plugins/embeddable_enhanced/kibana.json @@ -3,5 +3,5 @@ "version": "kibana", "server": false, "ui": true, - "requiredPlugins": ["embeddable", "advancedUiActions"] + "requiredPlugins": ["embeddable", "uiActionsEnhanced"] } diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts index f8b3a9dfb92d0..5c5d98d75295d 100644 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts +++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.test.ts @@ -9,7 +9,7 @@ import { EmbeddableActionStorage, EmbeddableWithDynamicActionsInput, } from './embeddable_action_storage'; -import { UiActionsEnhancedSerializedEvent } from '../../../advanced_ui_actions/public'; +import { UiActionsEnhancedSerializedEvent } from '../../../ui_actions_enhanced/public'; import { of } from '../../../../../src/plugins/kibana_utils/public'; class TestEmbeddable extends Embeddable { diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts index e93674ba650a7..fdc42585a80ce 100644 --- a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts +++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts @@ -7,7 +7,7 @@ import { UiActionsEnhancedAbstractActionStorage as AbstractActionStorage, UiActionsEnhancedSerializedEvent as SerializedEvent, -} from '../../../advanced_ui_actions/public'; +} from '../../../ui_actions_enhanced/public'; import { EmbeddableInput, EmbeddableOutput, diff --git a/x-pack/plugins/embeddable_enhanced/public/plugin.ts b/x-pack/plugins/embeddable_enhanced/public/plugin.ts index d26acb4459a71..e6413ac03aeae 100644 --- a/x-pack/plugins/embeddable_enhanced/public/plugin.ts +++ b/x-pack/plugins/embeddable_enhanced/public/plugin.ts @@ -27,7 +27,7 @@ import { UiActionsEnhancedDynamicActionManager as DynamicActionManager, AdvancedUiActionsSetup, AdvancedUiActionsStart, -} from '../../advanced_ui_actions/public'; +} from '../../ui_actions_enhanced/public'; import { PanelNotificationsAction, ACTION_PANEL_NOTIFICATIONS } from './actions'; declare module '../../../../src/plugins/ui_actions/public' { @@ -38,12 +38,12 @@ declare module '../../../../src/plugins/ui_actions/public' { export interface SetupDependencies { embeddable: EmbeddableSetup; - advancedUiActions: AdvancedUiActionsSetup; + uiActionsEnhanced: AdvancedUiActionsSetup; } export interface StartDependencies { embeddable: EmbeddableStart; - advancedUiActions: AdvancedUiActionsStart; + uiActionsEnhanced: AdvancedUiActionsStart; } // eslint-disable-next-line @@ -56,20 +56,20 @@ export class EmbeddableEnhancedPlugin implements Plugin { constructor(protected readonly context: PluginInitializerContext) {} - private uiActions?: StartDependencies['advancedUiActions']; + private uiActions?: StartDependencies['uiActionsEnhanced']; public setup(core: CoreSetup, plugins: SetupDependencies): SetupContract { this.setCustomEmbeddableFactoryProvider(plugins); const panelNotificationAction = new PanelNotificationsAction(); - plugins.advancedUiActions.registerAction(panelNotificationAction); - plugins.advancedUiActions.attachAction(PANEL_NOTIFICATION_TRIGGER, panelNotificationAction.id); + plugins.uiActionsEnhanced.registerAction(panelNotificationAction); + plugins.uiActionsEnhanced.attachAction(PANEL_NOTIFICATION_TRIGGER, panelNotificationAction.id); return {}; } public start(core: CoreStart, plugins: StartDependencies): StartContract { - this.uiActions = plugins.advancedUiActions; + this.uiActions = plugins.uiActionsEnhanced; return {}; } diff --git a/x-pack/plugins/embeddable_enhanced/public/types.ts b/x-pack/plugins/embeddable_enhanced/public/types.ts index 924605be332b2..4f5c316f2fc17 100644 --- a/x-pack/plugins/embeddable_enhanced/public/types.ts +++ b/x-pack/plugins/embeddable_enhanced/public/types.ts @@ -5,7 +5,7 @@ */ import { IEmbeddable } from '../../../../src/plugins/embeddable/public'; -import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '../../advanced_ui_actions/public'; +import { UiActionsEnhancedDynamicActionManager as DynamicActionManager } from '../../ui_actions_enhanced/public'; export type EnhancedEmbeddable = E & { enhancements: { diff --git a/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts b/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts index 0144e573fc146..ada86adf84cfd 100644 --- a/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts +++ b/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts @@ -51,7 +51,7 @@ describe('doesIlmPolicyExist', () => { await clusterClientAdapter.doesIlmPolicyExist('foo'); expect(clusterClient.callAsInternalUser).toHaveBeenCalledWith('transport.request', { method: 'GET', - path: '_ilm/policy/foo', + path: '/_ilm/policy/foo', }); }); @@ -78,7 +78,7 @@ describe('createIlmPolicy', () => { await clusterClientAdapter.createIlmPolicy('foo', { args: true }); expect(clusterClient.callAsInternalUser).toHaveBeenCalledWith('transport.request', { method: 'PUT', - path: '_ilm/policy/foo', + path: '/_ilm/policy/foo', body: { args: true }, }); }); diff --git a/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts b/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts index 7fd239ca49369..a036bfb74e408 100644 --- a/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts +++ b/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts @@ -41,7 +41,7 @@ export class ClusterClientAdapter { public async doesIlmPolicyExist(policyName: string): Promise { const request = { method: 'GET', - path: `_ilm/policy/${policyName}`, + path: `/_ilm/policy/${policyName}`, }; try { await this.callEs('transport.request', request); @@ -55,7 +55,7 @@ export class ClusterClientAdapter { public async createIlmPolicy(policyName: string, policy: unknown): Promise { const request = { method: 'PUT', - path: `_ilm/policy/${policyName}`, + path: `/_ilm/policy/${policyName}`, body: policy, }; try { diff --git a/x-pack/plugins/global_search/README.md b/x-pack/plugins/global_search/README.md new file mode 100644 index 0000000000000..d47e0bd696fd8 --- /dev/null +++ b/x-pack/plugins/global_search/README.md @@ -0,0 +1,49 @@ +# Kibana GlobalSearch plugin + +The GlobalSearch plugin provides an easy way to search for various objects, such as applications +or dashboards from the Kibana instance, from both server and client-side plugins + +## Consuming the globalSearch API + +```ts +startDeps.globalSearch.find('some term').subscribe({ + next: ({ results }) => { + addNewResultsToList(results); + }, + error: () => {}, + complete: () => { + showAsyncSearchIndicator(false); + } +}); +``` + +## Registering custom result providers + +The GlobalSearch API allows to extend provided results by registering your own provider. + +```ts +setupDeps.globalSearch.registerResultProvider({ + id: 'my_provider', + find: (term, options, context) => { + const resultPromise = myService.search(term, context.core.savedObjects.client); + return from(resultPromise).pipe(takeUntil(options.aborted$); + }, +}); +``` + +## Known limitations + +### Client-side registered providers + +Results from providers registered from the client-side `registerResultProvider` API will +not be available when performing a search from the server-side. For this reason, prefer +registering providers using the server-side API when possible. + +Refer to the [RFC](rfcs/text/0011_global_search.md#result_provider_registration) for more details + +### Search completion cause + +There is currently no way to identify `globalSearch.find` observable completion cause: +searches completing because all providers returned all their results and searches +completing because the consumer aborted the search using the `aborted$` option or because +the internal timout period has been reaches will both complete the same way. diff --git a/x-pack/plugins/global_search/common/errors.test.ts b/x-pack/plugins/global_search/common/errors.test.ts new file mode 100644 index 0000000000000..949795abd701a --- /dev/null +++ b/x-pack/plugins/global_search/common/errors.test.ts @@ -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 { GlobalSearchFindError } from './errors'; + +describe('GlobalSearchFindError', () => { + describe('#invalidLicense', () => { + it('create an error with the correct `type`', () => { + const error = GlobalSearchFindError.invalidLicense('foobar'); + expect(error.message).toBe('foobar'); + expect(error.type).toBe('invalid-license'); + }); + + it('can be identified via instanceof', () => { + const error = GlobalSearchFindError.invalidLicense('foo'); + expect(error instanceof GlobalSearchFindError).toBe(true); + }); + }); +}); diff --git a/x-pack/plugins/global_search/common/errors.ts b/x-pack/plugins/global_search/common/errors.ts new file mode 100644 index 0000000000000..15bc0958cb8aa --- /dev/null +++ b/x-pack/plugins/global_search/common/errors.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +// only one type for now, but already present for future-proof reasons +export type GlobalSearchFindErrorType = 'invalid-license'; + +/** + * Error thrown from the {@link GlobalSearchPluginStart.find | GlobalSearch find API}'s result observable + * + * @public + */ +export class GlobalSearchFindError extends Error { + public static invalidLicense(message: string) { + return new GlobalSearchFindError('invalid-license', message); + } + + private constructor(public readonly type: GlobalSearchFindErrorType, message: string) { + super(message); + + // Set the prototype explicitly, see: + // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work + Object.setPrototypeOf(this, GlobalSearchFindError.prototype); + } +} diff --git a/x-pack/plugins/global_search/common/license_checker.mock.ts b/x-pack/plugins/global_search/common/license_checker.mock.ts new file mode 100644 index 0000000000000..e19a2562e53d8 --- /dev/null +++ b/x-pack/plugins/global_search/common/license_checker.mock.ts @@ -0,0 +1,24 @@ +/* + * 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 { ILicenseChecker } from './license_checker'; + +const createLicenseCheckerMock = (): jest.Mocked => { + const mock = { + getState: jest.fn(), + getLicense: jest.fn(), + clean: jest.fn(), + }; + + mock.getLicense.mockReturnValue(undefined); + mock.getState.mockReturnValue({ valid: true }); + + return mock; +}; + +export const licenseCheckerMock = { + create: createLicenseCheckerMock, +}; diff --git a/x-pack/plugins/global_search/common/license_checker.test.ts b/x-pack/plugins/global_search/common/license_checker.test.ts new file mode 100644 index 0000000000000..47a0d41016d71 --- /dev/null +++ b/x-pack/plugins/global_search/common/license_checker.test.ts @@ -0,0 +1,63 @@ +/* + * 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 { Observable, of, BehaviorSubject } from 'rxjs'; +import { licenseMock } from '../../licensing/common/licensing.mock'; +import { ILicense, LicenseCheck } from '../../licensing/common/types'; +import { LicenseChecker } from './license_checker'; + +describe('LicenseChecker', () => { + const createLicense = (check: LicenseCheck): ILicense => { + const license = licenseMock.createLicenseMock(); + license.check.mockReturnValue(check); + return license; + }; + + const createLicense$ = (check: LicenseCheck): Observable => of(createLicense(check)); + + it('returns the correct state of the license', () => { + let checker = new LicenseChecker(createLicense$({ state: 'valid' })); + expect(checker.getState()).toEqual({ valid: true }); + + checker = new LicenseChecker(createLicense$({ state: 'expired' })); + expect(checker.getState()).toEqual({ valid: false, message: 'expired' }); + + checker = new LicenseChecker(createLicense$({ state: 'invalid' })); + expect(checker.getState()).toEqual({ valid: false, message: 'invalid' }); + + checker = new LicenseChecker(createLicense$({ state: 'unavailable' })); + expect(checker.getState()).toEqual({ valid: false, message: 'unavailable' }); + }); + + it('updates the state when the license changes', () => { + const license$ = new BehaviorSubject(createLicense({ state: 'valid' })); + + const checker = new LicenseChecker(license$); + expect(checker.getState()).toEqual({ valid: true }); + + license$.next(createLicense({ state: 'expired' })); + expect(checker.getState()).toEqual({ valid: false, message: 'expired' }); + + license$.next(createLicense({ state: 'valid' })); + expect(checker.getState()).toEqual({ valid: true }); + }); + + it('removes the subscription when calling `clean`', () => { + const mockUnsubscribe = jest.fn(); + const mockObs = { + subscribe: jest.fn().mockReturnValue({ unsubscribe: mockUnsubscribe }), + }; + + const checker = new LicenseChecker(mockObs as any); + + expect(mockObs.subscribe).toHaveBeenCalledTimes(1); + expect(mockUnsubscribe).not.toHaveBeenCalled(); + + checker.clean(); + + expect(mockUnsubscribe).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/plugins/global_search/common/license_checker.ts b/x-pack/plugins/global_search/common/license_checker.ts new file mode 100644 index 0000000000000..d201b31802b32 --- /dev/null +++ b/x-pack/plugins/global_search/common/license_checker.ts @@ -0,0 +1,49 @@ +/* + * 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 { Observable, Subscription } from 'rxjs'; +import { ILicense } from '../../licensing/common/types'; + +export type LicenseState = { valid: false; message: string } | { valid: true }; + +export type CheckLicense = (license: ILicense) => LicenseState; + +const checkLicense: CheckLicense = (license) => { + const check = license.check('globalSearch', 'basic'); + switch (check.state) { + case 'expired': + return { valid: false, message: 'expired' }; + case 'invalid': + return { valid: false, message: 'invalid' }; + case 'unavailable': + return { valid: false, message: 'unavailable' }; + case 'valid': + return { valid: true }; + default: + throw new Error(`Invalid license state: ${check.state}`); + } +}; + +export type ILicenseChecker = PublicMethodsOf; + +export class LicenseChecker { + private subscription: Subscription; + private state: LicenseState = { valid: false, message: 'unknown' }; + + constructor(license$: Observable) { + this.subscription = license$.subscribe((license) => { + this.state = checkLicense(license); + }); + } + + public getState() { + return this.state; + } + + public clean() { + this.subscription.unsubscribe(); + } +} diff --git a/x-pack/plugins/index_management/public/application/store/middlewares/index.ts b/x-pack/plugins/global_search/common/operators/index.ts similarity index 77% rename from x-pack/plugins/index_management/public/application/store/middlewares/index.ts rename to x-pack/plugins/global_search/common/operators/index.ts index 06d77a9c3d348..2a0cf066a04aa 100644 --- a/x-pack/plugins/index_management/public/application/store/middlewares/index.ts +++ b/x-pack/plugins/global_search/common/operators/index.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { syncUrlHashQueryParam } from './sync_url_hash_query_param.js'; +export { takeInArray } from './take_in_array'; diff --git a/x-pack/plugins/global_search/common/operators/take_in_array.test.ts b/x-pack/plugins/global_search/common/operators/take_in_array.test.ts new file mode 100644 index 0000000000000..b73ee20c9889a --- /dev/null +++ b/x-pack/plugins/global_search/common/operators/take_in_array.test.ts @@ -0,0 +1,62 @@ +/* + * 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 { TestScheduler } from 'rxjs/testing'; +import { takeInArray } from './take_in_array'; + +const getTestScheduler = () => + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); + +describe('takeInArray', () => { + it('only emits a given `count` of items from an array observable', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const source = hot('a-b-c', { a: [1], b: [2], c: [3] }); + const expected = 'a-(b|)'; + + expectObservable(source.pipe(takeInArray(2))).toBe(expected, { + a: [1], + b: [2], + }); + }); + }); + + it('completes if the source completes before reaching the given `count`', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const source = hot('a-b-c-|', { a: [1, 2], b: [3, 4], c: [5] }); + const expected = 'a-b-c-|'; + + expectObservable(source.pipe(takeInArray(10))).toBe(expected, { + a: [1, 2], + b: [3, 4], + c: [5], + }); + }); + }); + + it('split the emission if `count` is reached in a given emission', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const source = hot('a-b-c', { a: [1, 2, 3], b: [4, 5, 6], c: [7, 8] }); + const expected = 'a-(b|)'; + + expectObservable(source.pipe(takeInArray(5))).toBe(expected, { + a: [1, 2, 3], + b: [4, 5], + }); + }); + }); + + it('throws when trying to take a negative number of items', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const source = hot('a-b-c', { a: [1, 2, 3], b: [4, 5, 6], c: [7, 8] }); + + expect(() => { + source.pipe(takeInArray(-4)).subscribe(() => undefined); + }).toThrowErrorMatchingInlineSnapshot(`"Cannot take a negative number of items"`); + }); + }); +}); diff --git a/x-pack/plugins/global_search/common/operators/take_in_array.ts b/x-pack/plugins/global_search/common/operators/take_in_array.ts new file mode 100644 index 0000000000000..7d041d3c2bab0 --- /dev/null +++ b/x-pack/plugins/global_search/common/operators/take_in_array.ts @@ -0,0 +1,74 @@ +/* + * 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. + */ + +// eslint-disable-next-line max-classes-per-file +import { + EMPTY, + MonoTypeOperatorFunction, + Observable, + Operator, + Subscriber, + TeardownLogic, +} from 'rxjs'; + +/** + * Emits only the first `count` items from the arrays emitted by the source Observable. The limit + * is global to all emitted values, and not per emission. + * + * @example + * ```ts + * const source = of([1, 2], [3, 4], [5, 6]); + * const takeThreeInArray = source.pipe(takeInArray(3)); + * takeThreeInArray.subscribe(x => console.log(x)); + * + * // Logs: + * // [1,2] + * // [3] + * ``` + * + * @param count The total maximum number of value to keep from the emitted arrays + */ +export function takeInArray(count: number): MonoTypeOperatorFunction { + return function takeLastOperatorFunction(source: Observable): Observable { + if (count === 0) { + return EMPTY; + } else { + return source.lift(new TakeInArray(count)); + } + }; +} + +class TakeInArray implements Operator { + constructor(private total: number) { + if (this.total < 0) { + throw new Error('Cannot take a negative number of items'); + } + } + + call(subscriber: Subscriber, source: any): TeardownLogic { + return source.subscribe(new TakeInArraySubscriber(subscriber, this.total)); + } +} + +class TakeInArraySubscriber extends Subscriber { + private current: number = 0; + + constructor(destination: Subscriber, private total: number) { + super(destination); + } + + protected _next(value: T[]): void { + const remaining = this.total - this.current; + if (remaining > value.length) { + this.destination.next!(value); + this.current += value.length; + } else { + this.destination.next!(value.slice(0, remaining)); + this.destination.complete!(); + this.unsubscribe(); + } + } +} diff --git a/x-pack/plugins/global_search/common/process_result.test.mocks.ts b/x-pack/plugins/global_search/common/process_result.test.mocks.ts new file mode 100644 index 0000000000000..718ac7a1a6a52 --- /dev/null +++ b/x-pack/plugins/global_search/common/process_result.test.mocks.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export const convertResultUrlMock = jest.fn().mockReturnValue('converted-url'); +jest.doMock('./utils', () => ({ + convertResultUrl: convertResultUrlMock, +})); diff --git a/x-pack/plugins/global_search/common/process_result.test.ts b/x-pack/plugins/global_search/common/process_result.test.ts new file mode 100644 index 0000000000000..723f21a24f552 --- /dev/null +++ b/x-pack/plugins/global_search/common/process_result.test.ts @@ -0,0 +1,73 @@ +/* + * 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 { convertResultUrlMock } from './process_result.test.mocks'; + +import { IBasePath } from './utils'; +import { GlobalSearchProviderResult } from './types'; +import { processProviderResult } from './process_result'; + +const createResult = (parts: Partial): GlobalSearchProviderResult => ({ + id: 'id', + title: 'title', + type: 'type', + icon: 'icon', + url: '/foo/bar', + score: 42, + meta: { foo: 'bar' }, + ...parts, +}); + +describe('processProviderResult', () => { + let basePath: jest.Mocked; + + beforeEach(() => { + basePath = { + prepend: jest.fn(), + }; + + convertResultUrlMock.mockClear(); + }); + + it('returns all properties unchanged except `url`', () => { + const r1 = createResult({ + id: '1', + type: 'test', + url: '/url-1', + title: 'title 1', + icon: 'foo', + score: 69, + meta: { hello: 'dolly' }, + }); + + expect(processProviderResult(r1, basePath)).toEqual({ + ...r1, + url: expect.any(String), + }); + }); + + it('converts the url using `convertResultUrl`', () => { + const r1 = createResult({ id: '1', url: '/url-1' }); + const r2 = createResult({ id: '2', url: '/url-2' }); + + convertResultUrlMock.mockReturnValueOnce('/url-A'); + convertResultUrlMock.mockReturnValueOnce('/url-B'); + + expect(convertResultUrlMock).not.toHaveBeenCalled(); + + const g1 = processProviderResult(r1, basePath); + + expect(g1.url).toEqual('/url-A'); + expect(convertResultUrlMock).toHaveBeenCalledTimes(1); + expect(convertResultUrlMock).toHaveBeenCalledWith(r1.url, basePath); + + const g2 = processProviderResult(r2, basePath); + + expect(g2.url).toEqual('/url-B'); + expect(convertResultUrlMock).toHaveBeenCalledTimes(2); + expect(convertResultUrlMock).toHaveBeenCalledWith(r2.url, basePath); + }); +}); diff --git a/x-pack/plugins/global_search/common/process_result.ts b/x-pack/plugins/global_search/common/process_result.ts new file mode 100644 index 0000000000000..fed6dc14f066b --- /dev/null +++ b/x-pack/plugins/global_search/common/process_result.ts @@ -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 { GlobalSearchProviderResult, GlobalSearchResult } from './types'; +import { convertResultUrl, IBasePath } from './utils'; + +/** + * Convert a {@link GlobalSearchProviderResult | provider result} + * to a {@link GlobalSearchResult | service result} + */ +export const processProviderResult = ( + result: GlobalSearchProviderResult, + basePath: IBasePath +): GlobalSearchResult => { + return { + ...result, + url: convertResultUrl(result.url, basePath), + }; +}; diff --git a/x-pack/plugins/global_search/common/types.ts b/x-pack/plugins/global_search/common/types.ts new file mode 100644 index 0000000000000..26940806a4ecd --- /dev/null +++ b/x-pack/plugins/global_search/common/types.ts @@ -0,0 +1,89 @@ +/* + * 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 { Observable } from 'rxjs'; +import { Serializable } from 'src/core/types'; + +/** + * Options provided to {@link GlobalSearchResultProvider | a result provider}'s `find` method. + */ +export interface GlobalSearchProviderFindOptions { + /** + * A custom preference token associated with a search 'session' that should be used to get consistent scoring + * when performing calls to ES. Can also be used as a 'session' token for providers returning data from elsewhere + * than an elasticsearch cluster. + */ + preference: string; + /** + * Observable that emits once if and when the `find` call has been aborted, either manually by the consumer, + * or when the internal timeout period as been reached. + * + * When a `find` request is effectively aborted, the service will stop emitting any new result to the consumer anyway, but + * this can (and should) be used to cancel any pending asynchronous task and complete the result observable from within the provider. + */ + aborted$: Observable; + /** + * The total maximum number of results (including all batches, not per emission) that should be returned by the provider for a given `find` request. + * Any result emitted exceeding this quota will be ignored by the service and not emitted to the consumer. + */ + maxResults: number; +} + +/** + * Structured type for the {@link GlobalSearchProviderResult.url | provider result's url property} + */ +export type GlobalSearchProviderResultUrl = string | { path: string; prependBasePath: boolean }; + +/** + * Representation of a result returned by a {@link GlobalSearchResultProvider | result provider} + */ +export interface GlobalSearchProviderResult { + /** an id that should be unique for an individual provider's results */ + id: string; + /** the title/label of the result */ + title: string; + /** the type of result */ + type: string; + /** an optional EUI icon name to associate with the search result */ + icon?: string; + /** + * The url associated with this result. + * This can be either an absolute url, a path relative to the basePath, or a structure specifying if the basePath should be prepended. + * + * @example + * `result.url = 'https://kibana-instance:8080/base-path/app/my-app/my-result-type/id';` + * `result.url = '/app/my-app/my-result-type/id';` + * `result.url = { path: '/base-path/app/my-app/my-result-type/id', prependBasePath: false };` + */ + url: GlobalSearchProviderResultUrl; + /** the score of the result, from 1 (lowest) to 100 (highest) */ + score: number; + /** an optional record of metadata for this result */ + meta?: Record; +} + +/** + * Representation of a result returned by the {@link GlobalSearchPluginStart.find | `find` API} + */ +export type GlobalSearchResult = Omit & { + /** + * The url associated with this result. + * This can be either an absolute url, or a relative path including the basePath + */ + url: string; +}; + +/** + * Response returned from the {@link GlobalSearchPluginStart | global search service}'s `find` API + * + * @public + */ +export interface GlobalSearchBatchedResults { + /** + * Results for this batch + */ + results: GlobalSearchResult[]; +} diff --git a/x-pack/plugins/global_search/common/utils.test.ts b/x-pack/plugins/global_search/common/utils.test.ts new file mode 100644 index 0000000000000..27f1ce99a58cc --- /dev/null +++ b/x-pack/plugins/global_search/common/utils.test.ts @@ -0,0 +1,67 @@ +/* + * 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 { convertResultUrl } from './utils'; + +const createBasePath = () => ({ + prepend: jest.fn(), +}); + +describe('convertResultUrl', () => { + let basePath: ReturnType; + + beforeEach(() => { + basePath = createBasePath(); + basePath.prepend.mockImplementation((path) => `/base-path${path}`); + }); + + describe('when the url is a string', () => { + it('does not convert absolute urls', () => { + expect(convertResultUrl('http://kibana:8080/foo/bar', basePath)).toEqual( + 'http://kibana:8080/foo/bar' + ); + expect(convertResultUrl('https://localhost/path/to/thing', basePath)).toEqual( + 'https://localhost/path/to/thing' + ); + expect(basePath.prepend).toHaveBeenCalledTimes(0); + }); + + it('prepends the base path to relative urls', () => { + expect(convertResultUrl('/app/my-app/foo', basePath)).toEqual('/base-path/app/my-app/foo'); + expect(basePath.prepend).toHaveBeenCalledTimes(1); + expect(basePath.prepend).toHaveBeenCalledWith('/app/my-app/foo'); + + expect(convertResultUrl('/some-path', basePath)).toEqual('/base-path/some-path'); + expect(basePath.prepend).toHaveBeenCalledTimes(2); + expect(basePath.prepend).toHaveBeenCalledWith('/some-path'); + }); + }); + + describe('when the url is an object', () => { + it('converts the path if `prependBasePath` is true', () => { + expect(convertResultUrl({ path: '/app/my-app', prependBasePath: true }, basePath)).toEqual( + '/base-path/app/my-app' + ); + expect(basePath.prepend).toHaveBeenCalledTimes(1); + expect(basePath.prepend).toHaveBeenCalledWith('/app/my-app'); + + expect(convertResultUrl({ path: '/some-path', prependBasePath: true }, basePath)).toEqual( + '/base-path/some-path' + ); + expect(basePath.prepend).toHaveBeenCalledTimes(2); + expect(basePath.prepend).toHaveBeenCalledWith('/some-path'); + }); + it('does not convert the path if `prependBasePath` is false', () => { + expect(convertResultUrl({ path: '/app/my-app', prependBasePath: false }, basePath)).toEqual( + '/app/my-app' + ); + expect(convertResultUrl({ path: '/some-path', prependBasePath: false }, basePath)).toEqual( + '/some-path' + ); + expect(basePath.prepend).toHaveBeenCalledTimes(0); + }); + }); +}); diff --git a/x-pack/plugins/global_search/common/utils.ts b/x-pack/plugins/global_search/common/utils.ts new file mode 100644 index 0000000000000..46648319458de --- /dev/null +++ b/x-pack/plugins/global_search/common/utils.ts @@ -0,0 +1,35 @@ +/* + * 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 { GlobalSearchProviderResultUrl } from './types'; + +// interface matching both the server and client-side implementation of IBasePath for our needs +// used to avoid duplicating `convertResultUrl` in server and client code due to different signatures. +export interface IBasePath { + prepend(path: string): string; +} + +/** + * Convert a {@link GlobalSearchProviderResultUrl | provider result's url} to an absolute or relative url + * usable in {@link GlobalSearchResult | service results} + */ +export const convertResultUrl = ( + url: GlobalSearchProviderResultUrl, + basePath: IBasePath +): string => { + if (typeof url === 'string') { + // relative path + if (url.startsWith('/')) { + return basePath.prepend(url); + } + // absolute url + return url; + } + if (url.prependBasePath) { + return basePath.prepend(url.path); + } + return url.path; +}; diff --git a/x-pack/plugins/global_search/kibana.json b/x-pack/plugins/global_search/kibana.json new file mode 100644 index 0000000000000..c94e080a8c589 --- /dev/null +++ b/x-pack/plugins/global_search/kibana.json @@ -0,0 +1,10 @@ +{ + "id": "globalSearch", + "version": "8.0.0", + "kibanaVersion": "kibana", + "server": true, + "ui": true, + "requiredPlugins": ["licensing"], + "optionalPlugins": [], + "configPath": ["xpack", "global_search"] +} diff --git a/x-pack/plugins/global_search/public/config.ts b/x-pack/plugins/global_search/public/config.ts new file mode 100644 index 0000000000000..a3969bef287b2 --- /dev/null +++ b/x-pack/plugins/global_search/public/config.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export interface GlobalSearchClientConfigType { + // is a string because the server-side counterpart is a duration + // which is serialized to string when sent to the client + // should be parsed using moment.duration(config.search_timeout) + search_timeout: string; +} diff --git a/x-pack/plugins/global_search/public/index.ts b/x-pack/plugins/global_search/public/index.ts new file mode 100644 index 0000000000000..18483cea72540 --- /dev/null +++ b/x-pack/plugins/global_search/public/index.ts @@ -0,0 +1,34 @@ +/* + * 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 { PluginInitializer } from 'src/core/public'; +import { + GlobalSearchPlugin, + GlobalSearchPluginSetupDeps, + GlobalSearchPluginStartDeps, +} from './plugin'; +import { GlobalSearchPluginSetup, GlobalSearchPluginStart } from './types'; + +export const plugin: PluginInitializer< + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + GlobalSearchPluginSetupDeps, + GlobalSearchPluginStartDeps +> = (context) => new GlobalSearchPlugin(context); + +export { + GlobalSearchBatchedResults, + GlobalSearchProviderFindOptions, + GlobalSearchProviderResult, + GlobalSearchProviderResultUrl, + GlobalSearchResult, +} from '../common/types'; +export { + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + GlobalSearchResultProvider, +} from './types'; +export { GlobalSearchFindOptions } from './services/types'; diff --git a/x-pack/plugins/global_search/public/mocks.ts b/x-pack/plugins/global_search/public/mocks.ts new file mode 100644 index 0000000000000..97dc01e92dbfe --- /dev/null +++ b/x-pack/plugins/global_search/public/mocks.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { GlobalSearchPluginSetup, GlobalSearchPluginStart } from './types'; +import { searchServiceMock } from './services/search_service.mock'; + +const createSetupMock = (): jest.Mocked => { + const searchMock = searchServiceMock.createSetupContract(); + + return { + registerResultProvider: searchMock.registerResultProvider, + }; +}; + +const createStartMock = (): jest.Mocked => { + const searchMock = searchServiceMock.createStartContract(); + + return { + find: searchMock.find, + }; +}; + +export const globalSearchPluginMock = { + createSetupContract: createSetupMock, + createStartContract: createStartMock, +}; diff --git a/x-pack/plugins/global_search/public/plugin.ts b/x-pack/plugins/global_search/public/plugin.ts new file mode 100644 index 0000000000000..6af8ec32a581d --- /dev/null +++ b/x-pack/plugins/global_search/public/plugin.ts @@ -0,0 +1,63 @@ +/* + * 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 { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'src/core/public'; +import { LicensingPluginStart } from '../../licensing/public'; +import { LicenseChecker, ILicenseChecker } from '../common/license_checker'; +import { GlobalSearchPluginSetup, GlobalSearchPluginStart } from './types'; +import { GlobalSearchClientConfigType } from './config'; +import { SearchService } from './services'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface GlobalSearchPluginSetupDeps {} +export interface GlobalSearchPluginStartDeps { + licensing: LicensingPluginStart; +} + +export class GlobalSearchPlugin + implements + Plugin< + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + GlobalSearchPluginSetupDeps, + GlobalSearchPluginStartDeps + > { + private readonly config: GlobalSearchClientConfigType; + private licenseChecker?: ILicenseChecker; + private readonly searchService = new SearchService(); + + constructor(context: PluginInitializerContext) { + this.config = context.config.get(); + } + + setup(core: CoreSetup<{}, GlobalSearchPluginStart>) { + const { registerResultProvider } = this.searchService.setup({ + config: this.config, + }); + + return { + registerResultProvider, + }; + } + + start({ http }: CoreStart, { licensing }: GlobalSearchPluginStartDeps) { + this.licenseChecker = new LicenseChecker(licensing.license$); + const { find } = this.searchService.start({ + http, + licenseChecker: this.licenseChecker, + }); + + return { + find, + }; + } + + public stop() { + if (this.licenseChecker) { + this.licenseChecker.clean(); + } + } +} diff --git a/x-pack/plugins/global_search/public/services/fetch_server_results.test.ts b/x-pack/plugins/global_search/public/services/fetch_server_results.test.ts new file mode 100644 index 0000000000000..f62acd08633ff --- /dev/null +++ b/x-pack/plugins/global_search/public/services/fetch_server_results.test.ts @@ -0,0 +1,88 @@ +/* + * 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 { TestScheduler } from 'rxjs/testing'; +import { httpServiceMock } from '../../../../../src/core/public/mocks'; +import { GlobalSearchResult } from '../../common/types'; +import { fetchServerResults } from './fetch_server_results'; + +const getTestScheduler = () => + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); + +const createResult = (id: string, parts: Partial = {}): GlobalSearchResult => ({ + id, + title: id, + type: 'type', + url: `/path/to/${id}`, + score: 100, + ...parts, +}); + +describe('fetchServerResults', () => { + let http: ReturnType; + + beforeEach(() => { + http = httpServiceMock.createStartContract(); + }); + + it('perform a POST request to the endpoint with valid options', () => { + http.post.mockResolvedValue({ results: [] }); + + fetchServerResults(http, 'some term', { preference: 'pref' }); + + expect(http.post).toHaveBeenCalledTimes(1); + expect(http.post).toHaveBeenCalledWith('/internal/global_search/find', { + body: JSON.stringify({ term: 'some term', options: { preference: 'pref' } }), + }); + }); + + it('returns the results from the server', async () => { + const resultA = createResult('A'); + const resultB = createResult('B'); + + http.post.mockResolvedValue({ results: [resultA, resultB] }); + + const results = await fetchServerResults(http, 'some term', { preference: 'pref' }).toPromise(); + + expect(http.post).toHaveBeenCalledTimes(1); + expect(results).toHaveLength(2); + expect(results[0]).toEqual(resultA); + expect(results[1]).toEqual(resultB); + }); + + describe('returns an observable that', () => { + // NOTE: test scheduler do not properly work with promises because of their asynchronous nature. + // we are cheating here by having `http.post` return an observable instead of a promise. + // this still allows more finely grained testing about timing, and asserting that the method + // works properly when `post` returns a real promise is handled in other tests of this suite + + it('emits when the response is received', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + http.post.mockReturnValue(hot('---(a|)', { a: { results: [] } }) as any); + + const results = fetchServerResults(http, 'term', {}); + + expectObservable(results).toBe('---(a|)', { + a: [], + }); + }); + }); + + it('completes without returning results if aborted$ emits before the response', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + http.post.mockReturnValue(hot('---(a|)', { a: { results: [] } }) as any); + const aborted$ = hot('-(a|)', { a: undefined }); + const results = fetchServerResults(http, 'term', { aborted$ }); + + expectObservable(results).toBe('-|', { + a: [], + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/global_search/public/services/fetch_server_results.ts b/x-pack/plugins/global_search/public/services/fetch_server_results.ts new file mode 100644 index 0000000000000..3c06dfab9f50e --- /dev/null +++ b/x-pack/plugins/global_search/public/services/fetch_server_results.ts @@ -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 { Observable, from, EMPTY } from 'rxjs'; +import { map, takeUntil } from 'rxjs/operators'; +import { HttpStart } from 'src/core/public'; +import { GlobalSearchResult } from '../../common/types'; +import { GlobalSearchFindOptions } from './types'; + +interface ServerFetchResponse { + results: GlobalSearchResult[]; +} + +/** + * Fetch the server-side results from the GS internal HTTP API. + * + * @remarks + * Though this function returns an Observable, the current implementation is not streaming + * results from the server. All results will be returned in a single batch when + * all server-side providers are completed. + */ +export const fetchServerResults = ( + http: HttpStart, + term: string, + { preference, aborted$ }: GlobalSearchFindOptions +): Observable => { + let controller: AbortController | undefined; + if (aborted$) { + controller = new AbortController(); + aborted$.subscribe(() => { + controller!.abort(); + }); + } + return from( + http.post('/internal/global_search/find', { + body: JSON.stringify({ term, options: { preference } }), + signal: controller?.signal, + }) + ).pipe( + takeUntil(aborted$ ?? EMPTY), + map((response) => response.results) + ); +}; diff --git a/x-pack/plugins/global_search/public/services/index.ts b/x-pack/plugins/global_search/public/services/index.ts new file mode 100644 index 0000000000000..8d3cb86043432 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { SearchService, SearchServiceSetup, SearchServiceStart } from './search_service'; +export { GlobalSearchFindOptions } from './types'; diff --git a/x-pack/plugins/global_search/public/services/search_service.mock.ts b/x-pack/plugins/global_search/public/services/search_service.mock.ts new file mode 100644 index 0000000000000..eca69148288b9 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/search_service.mock.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { SearchServiceSetup, SearchServiceStart } from './search_service'; +import { of } from 'rxjs'; + +const createSetupMock = (): jest.Mocked => { + return { + registerResultProvider: jest.fn(), + }; +}; + +const createStartMock = (): jest.Mocked => { + const mock = { + find: jest.fn(), + }; + mock.find.mockReturnValue(of({ results: [] })); + + return mock; +}; + +export const searchServiceMock = { + createSetupContract: createSetupMock, + createStartContract: createStartMock, +}; diff --git a/x-pack/plugins/global_search/public/services/search_service.test.mocks.ts b/x-pack/plugins/global_search/public/services/search_service.test.mocks.ts new file mode 100644 index 0000000000000..ce406e27c4a72 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/search_service.test.mocks.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +export const fetchServerResultsMock = jest.fn(); +jest.doMock('./fetch_server_results', () => ({ + fetchServerResults: fetchServerResultsMock, +})); + +export const getDefaultPreferenceMock = jest.fn(); +jest.doMock('./utils', () => ({ + ...jest.requireActual('./utils'), + getDefaultPreference: getDefaultPreferenceMock, +})); diff --git a/x-pack/plugins/global_search/public/services/search_service.test.ts b/x-pack/plugins/global_search/public/services/search_service.test.ts new file mode 100644 index 0000000000000..350547a928fe4 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/search_service.test.ts @@ -0,0 +1,436 @@ +/* + * 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 { fetchServerResultsMock, getDefaultPreferenceMock } from './search_service.test.mocks'; + +import { Observable, of } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { TestScheduler } from 'rxjs/testing'; +import { duration } from 'moment'; +import { httpServiceMock } from '../../../../../src/core/public/mocks'; +import { licenseCheckerMock } from '../../common/license_checker.mock'; +import { GlobalSearchProviderResult, GlobalSearchResult } from '../../common/types'; +import { GlobalSearchFindError } from '../../common/errors'; +import { GlobalSearchClientConfigType } from '../config'; +import { GlobalSearchResultProvider } from '../types'; +import { SearchService } from './search_service'; + +const getTestScheduler = () => + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); + +describe('SearchService', () => { + let service: SearchService; + let httpStart: ReturnType; + let licenseChecker: ReturnType; + + const createConfig = (timeoutMs: number = 30000): GlobalSearchClientConfigType => { + return { + search_timeout: duration(timeoutMs).toString(), + }; + }; + + const startDeps = () => ({ + http: httpStart, + licenseChecker, + }); + + const createProvider = ( + id: string, + source: Observable = of([]) + ): jest.Mocked => ({ + id, + find: jest.fn().mockImplementation((term, options, context) => source), + }); + + const expectedResult = (id: string) => expect.objectContaining({ id }); + + const expectedBatch = (...ids: string[]) => ({ + results: ids.map((id) => expectedResult(id)), + }); + + const providerResult = ( + id: string, + parts: Partial = {} + ): GlobalSearchProviderResult => ({ + title: id, + type: 'test', + url: '/foo/bar', + score: 100, + ...parts, + id, + }); + + const serverResult = ( + id: string, + parts: Partial = {} + ): GlobalSearchResult => ({ + title: id, + type: 'test', + url: '/foo/bar', + score: 100, + ...parts, + id, + }); + + beforeEach(() => { + service = new SearchService(); + httpStart = httpServiceMock.createStartContract({ basePath: '/base-path' }); + licenseChecker = licenseCheckerMock.create(); + + fetchServerResultsMock.mockClear(); + fetchServerResultsMock.mockReturnValue(of()); + + getDefaultPreferenceMock.mockClear(); + getDefaultPreferenceMock.mockReturnValue('default_pref'); + }); + + describe('#setup()', () => { + describe('#registerResultProvider()', () => { + it('throws when trying to register the same provider twice', () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + const provider = createProvider('A'); + registerResultProvider(provider); + expect(() => { + registerResultProvider(provider); + }).toThrowErrorMatchingInlineSnapshot(`"trying to register duplicate provider: A"`); + }); + }); + }); + + describe('#start()', () => { + describe('#find()', () => { + it('calls the provider with the correct parameters', () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + const provider = createProvider('A'); + registerResultProvider(provider); + + const { find } = service.start(startDeps()); + find('foobar', { preference: 'pref' }); + + expect(provider.find).toHaveBeenCalledTimes(1); + expect(provider.find).toHaveBeenCalledWith( + 'foobar', + expect.objectContaining({ preference: 'pref' }) + ); + }); + + it('calls `fetchServerResults` with the correct parameters', () => { + service.setup({ config: createConfig() }); + + const { find } = service.start(startDeps()); + find('foobar', { preference: 'pref' }); + + expect(fetchServerResultsMock).toHaveBeenCalledTimes(1); + expect(fetchServerResultsMock).toHaveBeenCalledWith( + httpStart, + 'foobar', + expect.objectContaining({ preference: 'pref', aborted$: expect.any(Object) }) + ); + }); + + it('calls `getDefaultPreference` when `preference` is not specified', () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + const provider = createProvider('A'); + registerResultProvider(provider); + + const { find } = service.start(startDeps()); + find('foobar', { preference: 'pref' }); + + expect(getDefaultPreferenceMock).not.toHaveBeenCalled(); + + expect(provider.find).toHaveBeenNthCalledWith( + 1, + 'foobar', + expect.objectContaining({ + preference: 'pref', + }) + ); + + find('foobar', {}); + + expect(getDefaultPreferenceMock).toHaveBeenCalledTimes(1); + + expect(provider.find).toHaveBeenNthCalledWith( + 2, + 'foobar', + expect.objectContaining({ + preference: 'default_pref', + }) + ); + }); + + it('return the results from the provider', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('a-b-|', { + a: [providerResult('1')], + b: [providerResult('2')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe('a-b-|', { + a: expectedBatch('1'), + b: expectedBatch('2'), + }); + }); + }); + + it('return the results from the server', async () => { + service.setup({ config: createConfig() }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const serverResults = hot('a-b-|', { + a: [serverResult('1')], + b: [serverResult('2')], + }); + + fetchServerResultsMock.mockReturnValue(serverResults); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe('a-b-|', { + a: expectedBatch('1'), + b: expectedBatch('2'), + }); + }); + }); + + it('handles multiple providers', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + registerResultProvider( + createProvider( + 'A', + hot('a---d-|', { + a: [providerResult('A1'), providerResult('A2')], + d: [providerResult('A3')], + }) + ) + ); + registerResultProvider( + createProvider( + 'B', + hot('-b-c| ', { + b: [providerResult('B1')], + c: [providerResult('B2'), providerResult('B3')], + }) + ) + ); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe('ab-cd-|', { + a: expectedBatch('A1', 'A2'), + b: expectedBatch('B1'), + c: expectedBatch('B2', 'B3'), + d: expectedBatch('A3'), + }); + }); + }); + + it('return mixed server/client providers results', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + fetchServerResultsMock.mockReturnValue( + hot('-----(c|)', { + c: [serverResult('S1'), serverResult('S2')], + }) + ); + + registerResultProvider( + createProvider( + 'A', + hot('a-b-|', { + a: [providerResult('P1')], + b: [providerResult('P2')], + }) + ) + ); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe('a-b--(c|)', { + a: expectedBatch('P1'), + b: expectedBatch('P2'), + c: expectedBatch('S1', 'S2'), + }); + }); + }); + + it('handles the `aborted$` option', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('--a---(b|)', { + a: [providerResult('1')], + b: [providerResult('2')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const aborted$ = hot('----a--|', { a: undefined }); + + const { find } = service.start(startDeps()); + const results = find('foo', { aborted$ }); + + expectObservable(results).toBe('--a-|', { + a: expectedBatch('1'), + }); + }); + }); + + it('respects the timeout duration', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(100), + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('a 24ms b 100ms (c|)', { + a: [providerResult('1')], + b: [providerResult('2')], + c: [providerResult('3')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe('a 24ms b 74ms |', { + a: expectedBatch('1'), + b: expectedBatch('2'), + }); + }); + }); + + it('only returns a given maximum number of results per provider', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(100), + maxProviderResults: 2, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + registerResultProvider( + createProvider( + 'A', + hot('a---d-|', { + a: [providerResult('A1'), providerResult('A2')], + d: [providerResult('A3')], + }) + ) + ); + registerResultProvider( + createProvider( + 'B', + hot('-b-c| ', { + b: [providerResult('B1')], + c: [providerResult('B2'), providerResult('B3')], + }) + ) + ); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe('ab-(c|)', { + a: expectedBatch('A1', 'A2'), + b: expectedBatch('B1'), + c: expectedBatch('B2'), + }); + }); + }); + + it('process the results before returning them', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + const resultA = providerResult('A', { + type: 'application', + icon: 'appIcon', + score: 42, + title: 'foo', + url: '/foo/bar', + }); + const resultB = providerResult('B', { + type: 'dashboard', + score: 69, + title: 'bar', + url: { path: '/foo', prependBasePath: false }, + }); + + const provider = createProvider('A', of([resultA, resultB])); + registerResultProvider(provider); + + const { find } = service.start(startDeps()); + const batch = await find('foo', {}).pipe(take(1)).toPromise(); + + expect(batch.results).toHaveLength(2); + expect(batch.results[0]).toEqual({ + ...resultA, + url: '/base-path/foo/bar', + }); + expect(batch.results[1]).toEqual({ + ...resultB, + url: '/foo', + }); + }); + + it('emits an error when the license is invalid', async () => { + licenseChecker.getState.mockReturnValue({ valid: false, message: 'expired' }); + + const { registerResultProvider } = service.setup({ + config: createConfig(), + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('a-b-|', { + a: [providerResult('1')], + b: [providerResult('2')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const { find } = service.start(startDeps()); + const results = find('foo', {}); + + expectObservable(results).toBe( + '#', + {}, + GlobalSearchFindError.invalidLicense( + 'GlobalSearch API is disabled because of invalid license state: expired' + ) + ); + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/global_search/public/services/search_service.ts b/x-pack/plugins/global_search/public/services/search_service.ts new file mode 100644 index 0000000000000..68970b75ad975 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/search_service.ts @@ -0,0 +1,164 @@ +/* + * 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 { merge, Observable, timer, throwError } from 'rxjs'; +import { map, takeUntil } from 'rxjs/operators'; +import { duration } from 'moment'; +import { i18n } from '@kbn/i18n'; +import { HttpStart } from 'src/core/public'; +import { GlobalSearchProviderResult, GlobalSearchBatchedResults } from '../../common/types'; +import { GlobalSearchFindError } from '../../common/errors'; +import { takeInArray } from '../../common/operators'; +import { processProviderResult } from '../../common/process_result'; +import { ILicenseChecker } from '../../common/license_checker'; +import { GlobalSearchResultProvider } from '../types'; +import { GlobalSearchClientConfigType } from '../config'; +import { GlobalSearchFindOptions } from './types'; +import { getDefaultPreference } from './utils'; +import { fetchServerResults } from './fetch_server_results'; + +/** @public */ +export interface SearchServiceSetup { + /** + * Register a result provider to be used by the search service. + * + * @example + * ```ts + * setupDeps.globalSearch.registerResultProvider({ + * id: 'my_provider', + * find: (term, options) => { + * const resultPromise = myService.search(term, options); + * return from(resultPromise).pipe(takeUntil(options.aborted$); + * }, + * }); + * ``` + * + * @remarks + * As results from providers registered from the client-side API will not be available from the server's `find` API, + * registering result providers from the client should only be done when returning results that would not be retrievable + * from the server-side. In any other situation, prefer registering your provider from the server-side instead. + */ + registerResultProvider(provider: GlobalSearchResultProvider): void; +} + +/** @public */ +export interface SearchServiceStart { + /** + * Perform a search for given `term` and {@link GlobalSearchFindOptions | options}. + * + * @example + * ```ts + * startDeps.globalSearch.find('some term').subscribe({ + * next: ({ results }) => { + * addNewResultsToList(results); + * }, + * error: () => {}, + * complete: () => { + * showAsyncSearchIndicator(false); + * } + * }); + * ``` + * + * @remarks + * Emissions from the resulting observable will only contains **new** results. It is the consumer's + * responsibility to aggregate the emission and sort the results if required. + */ + find(term: string, options: GlobalSearchFindOptions): Observable; +} + +interface SetupDeps { + config: GlobalSearchClientConfigType; + maxProviderResults?: number; +} + +interface StartDeps { + http: HttpStart; + licenseChecker: ILicenseChecker; +} + +const defaultMaxProviderResults = 20; +const mapToUndefined = () => undefined; + +/** @internal */ +export class SearchService { + private readonly providers = new Map(); + private config?: GlobalSearchClientConfigType; + private http?: HttpStart; + private maxProviderResults = defaultMaxProviderResults; + private licenseChecker?: ILicenseChecker; + + setup({ config, maxProviderResults = defaultMaxProviderResults }: SetupDeps): SearchServiceSetup { + this.config = config; + + this.maxProviderResults = maxProviderResults; + + return { + registerResultProvider: (provider) => { + if (this.providers.has(provider.id)) { + throw new Error(`trying to register duplicate provider: ${provider.id}`); + } + this.providers.set(provider.id, provider); + }, + }; + } + + start({ http, licenseChecker }: StartDeps): SearchServiceStart { + this.http = http; + this.licenseChecker = licenseChecker; + + return { + find: (term, options) => this.performFind(term, options), + }; + } + + private performFind(term: string, options: GlobalSearchFindOptions) { + const licenseState = this.licenseChecker!.getState(); + if (!licenseState.valid) { + return throwError( + GlobalSearchFindError.invalidLicense( + i18n.translate('xpack.globalSearch.find.invalidLicenseError', { + defaultMessage: `GlobalSearch API is disabled because of invalid license state: {errorMessage}`, + values: { errorMessage: licenseState.message }, + }) + ) + ); + } + + const timeout = duration(this.config!.search_timeout).asMilliseconds(); + const timeout$ = timer(timeout).pipe(map(mapToUndefined)); + const aborted$ = options.aborted$ ? merge(options.aborted$, timeout$) : timeout$; + const preference = options.preference ?? getDefaultPreference(); + + const providerOptions = { + ...options, + preference, + maxResults: this.maxProviderResults, + aborted$, + }; + + const processResult = (result: GlobalSearchProviderResult) => + processProviderResult(result, this.http!.basePath); + + const serverResults$ = fetchServerResults(this.http!, term, { + preference, + aborted$, + }); + + const providersResults$ = [...this.providers.values()].map((provider) => + provider.find(term, providerOptions).pipe( + takeInArray(this.maxProviderResults), + takeUntil(aborted$), + map((results) => results.map((r) => processResult(r))) + ) + ); + + return merge(...providersResults$, serverResults$).pipe( + map((results) => ({ + results, + })) + ); + } +} diff --git a/x-pack/plugins/global_search/public/services/types.ts b/x-pack/plugins/global_search/public/services/types.ts new file mode 100644 index 0000000000000..fcaa8f0545a6e --- /dev/null +++ b/x-pack/plugins/global_search/public/services/types.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { Observable } from 'rxjs'; + +/** + * Options for the server-side {@link GlobalSearchPluginStart.find | find API} + */ +export interface GlobalSearchFindOptions { + /** + * A custom preference token associated with a search 'session' that should be used to get consistent scoring + * when performing calls to ES. Can also be used as a 'session' token for providers returning data from elsewhere + * than an elasticsearch cluster. + * + * If not specified, a random token will be generated and used. The token is stored in the sessionStorage and is guaranteed + * to be consistent during a given http 'session' + */ + preference?: string; + /** + * Optional observable to notify that the associated `find` call should be canceled. + * If/when provided and emitting, the result observable will be completed and no further result emission will be performed. + */ + aborted$?: Observable; +} diff --git a/x-pack/plugins/global_search/public/services/utils.test.ts b/x-pack/plugins/global_search/public/services/utils.test.ts new file mode 100644 index 0000000000000..f69fb1d2fd825 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/utils.test.ts @@ -0,0 +1,49 @@ +/* + * 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 { StubBrowserStorage } from '../../../../../src/test_utils/public/stub_browser_storage'; +import { getDefaultPreference } from './utils'; + +describe('getDefaultPreference', () => { + let storage: Storage; + let getItemSpy: jest.SpyInstance; + let setItemSpy: jest.SpyInstance; + + beforeEach(() => { + storage = new StubBrowserStorage(); + getItemSpy = jest.spyOn(storage, 'getItem'); + setItemSpy = jest.spyOn(storage, 'setItem'); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + it('returns the value in storage when available', () => { + getItemSpy.mockReturnValue('foo_pref'); + + const pref = getDefaultPreference(storage); + + expect(pref).toEqual('foo_pref'); + expect(getItemSpy).toHaveBeenCalledTimes(1); + expect(setItemSpy).not.toHaveBeenCalled(); + }); + + it('sets the value to the storage and return it when not already present', () => { + getItemSpy.mockReturnValue(null); + + const returnedPref = getDefaultPreference(storage); + + expect(getItemSpy).toHaveBeenCalledTimes(1); + expect(setItemSpy).toHaveBeenCalledTimes(1); + + const storedPref = setItemSpy.mock.calls[0][1]; + + expect(storage.length).toBe(1); + expect(storage.key(0)).toBe('globalSearch:defaultPref'); + expect(storedPref).toEqual(returnedPref); + }); +}); diff --git a/x-pack/plugins/global_search/public/services/utils.ts b/x-pack/plugins/global_search/public/services/utils.ts new file mode 100644 index 0000000000000..45d2ba7d7c210 --- /dev/null +++ b/x-pack/plugins/global_search/public/services/utils.ts @@ -0,0 +1,24 @@ +/* + * 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 uuid from 'uuid'; + +const defaultPrefStorageKey = 'globalSearch:defaultPref'; + +/** + * Returns the default {@link GlobalSearchFindOptions.preference | preference} value. + * + * The implementation is based on the sessionStorage, which ensure the default value for a session/tab will remain the same. + */ +export const getDefaultPreference = (storage: Storage = window.sessionStorage): string => { + let pref = storage.getItem(defaultPrefStorageKey); + if (pref) { + return pref; + } + pref = uuid.v4(); + storage.setItem(defaultPrefStorageKey, pref); + return pref; +}; diff --git a/x-pack/plugins/global_search/public/types.ts b/x-pack/plugins/global_search/public/types.ts new file mode 100644 index 0000000000000..42ef234504d12 --- /dev/null +++ b/x-pack/plugins/global_search/public/types.ts @@ -0,0 +1,43 @@ +/* + * 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 { Observable } from 'rxjs'; +import { GlobalSearchProviderFindOptions, GlobalSearchProviderResult } from '../common/types'; +import { SearchServiceSetup, SearchServiceStart } from './services'; + +export type GlobalSearchPluginSetup = Pick; +export type GlobalSearchPluginStart = Pick; + +/** + * GlobalSearch result provider, to be registered using the {@link GlobalSearchPluginSetup | global search API} + */ +export interface GlobalSearchResultProvider { + /** + * id of the provider + */ + id: string; + /** + * Method that should return an observable used to emit new results from the provider. + * + * See {@GlobalSearchProviderResult | the result type} for the expected result structure. + * + * @example + * ```ts + * // returning all results in a single batch + * setupDeps.globalSearch.registerResultProvider({ + * id: 'my_provider', + * find: (term, { aborted$, preference, maxResults }, context) => { + * const resultPromise = myService.search(term, { preference, maxResults }, context.core.savedObjects.client); + * return from(resultPromise).pipe(takeUntil(aborted$)); + * }, + * }); + * ``` + */ + find( + term: string, + options: GlobalSearchProviderFindOptions + ): Observable; +} diff --git a/x-pack/plugins/global_search/server/config.ts b/x-pack/plugins/global_search/server/config.ts new file mode 100644 index 0000000000000..33ff45595b912 --- /dev/null +++ b/x-pack/plugins/global_search/server/config.ts @@ -0,0 +1,21 @@ +/* + * 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, TypeOf } from '@kbn/config-schema'; +import { PluginConfigDescriptor } from 'kibana/server'; + +const configSchema = schema.object({ + search_timeout: schema.duration({ defaultValue: '30s' }), +}); + +export type GlobalSearchConfigType = TypeOf; + +export const config: PluginConfigDescriptor = { + schema: configSchema, + exposeToBrowser: { + search_timeout: true, + }, +}; diff --git a/x-pack/plugins/global_search/server/index.ts b/x-pack/plugins/global_search/server/index.ts new file mode 100644 index 0000000000000..82f7c80dca552 --- /dev/null +++ b/x-pack/plugins/global_search/server/index.ts @@ -0,0 +1,38 @@ +/* + * 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 { PluginInitializer } from 'src/core/server'; +import { + GlobalSearchPlugin, + GlobalSearchPluginSetupDeps, + GlobalSearchPluginStartDeps, +} from './plugin'; +import { GlobalSearchPluginSetup, GlobalSearchPluginStart } from './types'; + +export const plugin: PluginInitializer< + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + GlobalSearchPluginSetupDeps, + GlobalSearchPluginStartDeps +> = (context) => new GlobalSearchPlugin(context); + +export { config } from './config'; + +export { + GlobalSearchBatchedResults, + GlobalSearchProviderFindOptions, + GlobalSearchProviderResult, + GlobalSearchProviderResultUrl, + GlobalSearchResult, +} from '../common/types'; +export { + GlobalSearchFindOptions, + GlobalSearchProviderContext, + GlobalSearchPluginStart, + GlobalSearchPluginSetup, + GlobalSearchResultProvider, + RouteHandlerGlobalSearchContext, +} from './types'; diff --git a/x-pack/plugins/global_search/server/mocks.ts b/x-pack/plugins/global_search/server/mocks.ts new file mode 100644 index 0000000000000..8a189a5701708 --- /dev/null +++ b/x-pack/plugins/global_search/server/mocks.ts @@ -0,0 +1,45 @@ +/* + * 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 { of } from 'rxjs'; +import { + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + RouteHandlerGlobalSearchContext, +} from './types'; +import { searchServiceMock } from './services/search_service.mock'; + +const createSetupMock = (): jest.Mocked => { + const searchMock = searchServiceMock.createSetupContract(); + + return { + registerResultProvider: searchMock.registerResultProvider, + }; +}; + +const createStartMock = (): jest.Mocked => { + const searchMock = searchServiceMock.createStartContract(); + + return { + find: searchMock.find, + }; +}; + +const createRouteHandlerContextMock = (): jest.Mocked => { + const contextMock = { + find: jest.fn(), + }; + + contextMock.find.mockReturnValue(of([])); + + return contextMock; +}; + +export const globalSearchPluginMock = { + createSetupContract: createSetupMock, + createStartContract: createStartMock, + createRouteHandlerContext: createRouteHandlerContextMock, +}; diff --git a/x-pack/plugins/global_search/server/plugin.test.mocks.ts b/x-pack/plugins/global_search/server/plugin.test.mocks.ts new file mode 100644 index 0000000000000..1223b1ec20389 --- /dev/null +++ b/x-pack/plugins/global_search/server/plugin.test.mocks.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export const registerRoutesMock = jest.fn(); +jest.doMock('./routes', () => ({ + registerRoutes: registerRoutesMock, +})); diff --git a/x-pack/plugins/global_search/server/plugin.test.ts b/x-pack/plugins/global_search/server/plugin.test.ts new file mode 100644 index 0000000000000..e654dbfdc158a --- /dev/null +++ b/x-pack/plugins/global_search/server/plugin.test.ts @@ -0,0 +1,33 @@ +/* + * 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 { registerRoutesMock } from './plugin.test.mocks'; + +import { coreMock } from '../../../../src/core/server/mocks'; +import { GlobalSearchPlugin } from './plugin'; + +describe('GlobalSearchPlugin', () => { + let plugin: GlobalSearchPlugin; + + beforeEach(() => { + plugin = new GlobalSearchPlugin(coreMock.createPluginInitializerContext()); + }); + + it('registers routes during `setup`', async () => { + await plugin.setup(coreMock.createSetup()); + expect(registerRoutesMock).toHaveBeenCalledTimes(1); + }); + + it('registers the globalSearch route handler context', async () => { + const coreSetup = coreMock.createSetup(); + await plugin.setup(coreSetup); + expect(coreSetup.http.registerRouteHandlerContext).toHaveBeenCalledTimes(1); + expect(coreSetup.http.registerRouteHandlerContext).toHaveBeenCalledWith( + 'globalSearch', + expect.any(Function) + ); + }); +}); diff --git a/x-pack/plugins/global_search/server/plugin.ts b/x-pack/plugins/global_search/server/plugin.ts new file mode 100644 index 0000000000000..87e7f96b34c0c --- /dev/null +++ b/x-pack/plugins/global_search/server/plugin.ts @@ -0,0 +1,86 @@ +/* + * 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 { Observable } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'src/core/server'; +import { LicensingPluginStart } from '../../licensing/server'; +import { LicenseChecker, ILicenseChecker } from '../common/license_checker'; +import { SearchService, SearchServiceStart } from './services'; +import { registerRoutes } from './routes'; +import { + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + RouteHandlerGlobalSearchContext, +} from './types'; +import { GlobalSearchConfigType } from './config'; + +declare module 'src/core/server' { + interface RequestHandlerContext { + globalSearch?: RouteHandlerGlobalSearchContext; + } +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface GlobalSearchPluginSetupDeps {} +export interface GlobalSearchPluginStartDeps { + licensing: LicensingPluginStart; +} + +export class GlobalSearchPlugin + implements + Plugin< + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + GlobalSearchPluginSetupDeps, + GlobalSearchPluginStartDeps + > { + private readonly config$: Observable; + private readonly searchService = new SearchService(); + private searchServiceStart?: SearchServiceStart; + private licenseChecker?: ILicenseChecker; + + constructor(context: PluginInitializerContext) { + this.config$ = context.config.create(); + } + + public async setup(core: CoreSetup<{}, GlobalSearchPluginStart>) { + const config = await this.config$.pipe(take(1)).toPromise(); + const { registerResultProvider } = this.searchService.setup({ + basePath: core.http.basePath, + config, + }); + + registerRoutes(core.http.createRouter()); + + core.http.registerRouteHandlerContext('globalSearch', (_, req) => { + return { + find: (term, options) => this.searchServiceStart!.find(term, options, req), + }; + }); + + return { + registerResultProvider, + }; + } + + public start(core: CoreStart, { licensing }: GlobalSearchPluginStartDeps) { + this.licenseChecker = new LicenseChecker(licensing.license$); + this.searchServiceStart = this.searchService.start({ + core, + licenseChecker: this.licenseChecker, + }); + return { + find: this.searchServiceStart.find, + }; + } + + public stop() { + if (this.licenseChecker) { + this.licenseChecker.clean(); + } + } +} diff --git a/x-pack/plugins/global_search/server/routes/find.ts b/x-pack/plugins/global_search/server/routes/find.ts new file mode 100644 index 0000000000000..a9063abda0e3e --- /dev/null +++ b/x-pack/plugins/global_search/server/routes/find.ts @@ -0,0 +1,50 @@ +/* + * 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 { reduce, map } from 'rxjs/operators'; +import { schema } from '@kbn/config-schema'; +import { IRouter } from 'src/core/server'; +import { GlobalSearchFindError } from '../../common/errors'; + +export const registerInternalFindRoute = (router: IRouter) => { + router.post( + { + path: '/internal/global_search/find', + validate: { + body: schema.object({ + term: schema.string(), + options: schema.maybe( + schema.object({ + preference: schema.maybe(schema.string()), + }) + ), + }), + }, + }, + async (ctx, req, res) => { + const { term, options } = req.body; + try { + const allResults = await ctx + .globalSearch!.find(term, { ...options, aborted$: req.events.aborted$ }) + .pipe( + map((batch) => batch.results), + reduce((acc, results) => [...acc, ...results]) + ) + .toPromise(); + return res.ok({ + body: { + results: allResults, + }, + }); + } catch (e) { + if (e instanceof GlobalSearchFindError && e.type === 'invalid-license') { + return res.forbidden({ body: e.message }); + } + throw e; + } + } + ); +}; diff --git a/x-pack/plugins/global_search/server/routes/index.test.ts b/x-pack/plugins/global_search/server/routes/index.test.ts new file mode 100644 index 0000000000000..64675bc13cb1c --- /dev/null +++ b/x-pack/plugins/global_search/server/routes/index.test.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { httpServiceMock } from '../../../../../src/core/server/mocks'; +import { registerRoutes } from './index'; + +describe('registerRoutes', () => { + it('foo', () => { + const router = httpServiceMock.createRouter(); + + registerRoutes(router); + + expect(router.post).toHaveBeenCalledTimes(1); + + expect(router.post).toHaveBeenCalledWith( + expect.objectContaining({ + path: '/internal/global_search/find', + }), + expect.any(Function) + ); + + expect(router.get).toHaveBeenCalledTimes(0); + expect(router.delete).toHaveBeenCalledTimes(0); + expect(router.put).toHaveBeenCalledTimes(0); + }); +}); diff --git a/x-pack/plugins/siem/public/cases/components/property_actions/translations.ts b/x-pack/plugins/global_search/server/routes/index.ts similarity index 56% rename from x-pack/plugins/siem/public/cases/components/property_actions/translations.ts rename to x-pack/plugins/global_search/server/routes/index.ts index 4d7e15a76739d..7840b95614993 100644 --- a/x-pack/plugins/siem/public/cases/components/property_actions/translations.ts +++ b/x-pack/plugins/global_search/server/routes/index.ts @@ -4,8 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { i18n } from '@kbn/i18n'; +import { IRouter } from 'src/core/server'; +import { registerInternalFindRoute } from './find'; -export const ACTIONS_ARIA = i18n.translate('xpack.siem.case.caseView.editActionsLinkAria', { - defaultMessage: 'click to see all actions', -}); +export const registerRoutes = (router: IRouter) => { + registerInternalFindRoute(router); +}; diff --git a/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts b/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts new file mode 100644 index 0000000000000..878e4ac896b96 --- /dev/null +++ b/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts @@ -0,0 +1,131 @@ +/* + * 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 { of, throwError } from 'rxjs'; +import supertest from 'supertest'; +import { UnwrapPromise } from '@kbn/utility-types'; +import { setupServer } from '../../../../../../src/core/server/test_utils'; +import { GlobalSearchResult, GlobalSearchBatchedResults } from '../../../common/types'; +import { GlobalSearchFindError } from '../../../common/errors'; +import { globalSearchPluginMock } from '../../mocks'; +import { registerInternalFindRoute } from '../find'; + +type setupServerReturn = UnwrapPromise>; +const pluginId = Symbol('globalSearch'); + +const createResult = (id: string): GlobalSearchResult => ({ + id, + title: id, + type: 'test', + url: `/app/test/${id}`, + score: 42, +}); + +const createBatch = (...ids: string[]): GlobalSearchBatchedResults => ({ + results: ids.map(createResult), +}); + +const expectedResults = (...ids: string[]) => ids.map((id) => expect.objectContaining({ id })); + +describe('POST /internal/global_search/find', () => { + let server: setupServerReturn['server']; + let httpSetup: setupServerReturn['httpSetup']; + let globalSearchHandlerContext: ReturnType; + + beforeEach(async () => { + ({ server, httpSetup } = await setupServer(pluginId)); + + globalSearchHandlerContext = globalSearchPluginMock.createRouteHandlerContext(); + httpSetup.registerRouteHandlerContext( + pluginId, + 'globalSearch', + () => globalSearchHandlerContext + ); + + const router = httpSetup.createRouter('/'); + + registerInternalFindRoute(router); + + await server.start(); + }); + + afterEach(async () => { + await server.stop(); + }); + + it('calls the handler context with correct parameters', async () => { + await supertest(httpSetup.server.listener) + .post('/internal/global_search/find') + .send({ + term: 'search', + options: { + preference: 'custom-pref', + }, + }) + .expect(200); + + expect(globalSearchHandlerContext.find).toHaveBeenCalledTimes(1); + expect(globalSearchHandlerContext.find).toHaveBeenCalledWith('search', { + preference: 'custom-pref', + aborted$: expect.any(Object), + }); + }); + + it('returns all the results returned from the service', async () => { + globalSearchHandlerContext.find.mockReturnValue( + of(createBatch('1', '2'), createBatch('3', '4')) + ); + + const response = await supertest(httpSetup.server.listener) + .post('/internal/global_search/find') + .send({ + term: 'search', + }) + .expect(200); + + expect(response.body).toEqual({ + results: expectedResults('1', '2', '3', '4'), + }); + }); + + it('returns a 403 when the observable throws an invalid-license error', async () => { + globalSearchHandlerContext.find.mockReturnValue( + throwError(GlobalSearchFindError.invalidLicense('invalid-license-message')) + ); + + const response = await supertest(httpSetup.server.listener) + .post('/internal/global_search/find') + .send({ + term: 'search', + }) + .expect(403); + + expect(response.body).toEqual( + expect.objectContaining({ + message: 'invalid-license-message', + statusCode: 403, + }) + ); + }); + + it('returns the default error when the observable throws any other error', async () => { + globalSearchHandlerContext.find.mockReturnValue(throwError('any-error')); + + const response = await supertest(httpSetup.server.listener) + .post('/internal/global_search/find') + .send({ + term: 'search', + }) + .expect(500); + + expect(response.body).toEqual( + expect.objectContaining({ + message: 'An internal server error occurred.', + statusCode: 500, + }) + ); + }); +}); diff --git a/x-pack/plugins/global_search/server/services/context.test.ts b/x-pack/plugins/global_search/server/services/context.test.ts new file mode 100644 index 0000000000000..397a1ea170349 --- /dev/null +++ b/x-pack/plugins/global_search/server/services/context.test.ts @@ -0,0 +1,38 @@ +/* + * 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 { httpServerMock, coreMock } from '../../../../../src/core/server/mocks'; +import { getContextFactory } from './context'; + +describe('getContextFactory', () => { + it('returns a GlobalSearchProviderContext bound to the request', () => { + const coreStart = coreMock.createStart(); + const request = httpServerMock.createKibanaRequest(); + + const factory = getContextFactory(coreStart); + const context = factory(request); + + expect(coreStart.savedObjects.getScopedClient).toHaveBeenCalledTimes(1); + expect(coreStart.savedObjects.getScopedClient).toHaveBeenCalledWith(request); + + expect(coreStart.savedObjects.getTypeRegistry).toHaveBeenCalledTimes(1); + + expect(coreStart.elasticsearch.legacy.client.asScoped).toHaveBeenCalledTimes(1); + expect(coreStart.elasticsearch.legacy.client.asScoped).toHaveBeenCalledWith(request); + + const soClient = coreStart.savedObjects.getScopedClient.mock.results[0].value; + expect(coreStart.uiSettings.asScopedToClient).toHaveBeenCalledTimes(1); + expect(coreStart.uiSettings.asScopedToClient).toHaveBeenCalledWith(soClient); + + expect(context).toEqual({ + core: { + savedObjects: expect.any(Object), + elasticsearch: expect.any(Object), + uiSettings: expect.any(Object), + }, + }); + }); +}); diff --git a/x-pack/plugins/global_search/server/services/context.ts b/x-pack/plugins/global_search/server/services/context.ts new file mode 100644 index 0000000000000..b15deccaae018 --- /dev/null +++ b/x-pack/plugins/global_search/server/services/context.ts @@ -0,0 +1,35 @@ +/* + * 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 { CoreStart, KibanaRequest } from 'src/core/server'; +import { GlobalSearchProviderContext } from '../types'; + +export type GlobalSearchContextFactory = (request: KibanaRequest) => GlobalSearchProviderContext; + +/** + * {@link GlobalSearchProviderContext | context} factory + */ +export const getContextFactory = (coreStart: CoreStart) => ( + request: KibanaRequest +): GlobalSearchProviderContext => { + const soClient = coreStart.savedObjects.getScopedClient(request); + return { + core: { + savedObjects: { + client: soClient, + typeRegistry: coreStart.savedObjects.getTypeRegistry(), + }, + elasticsearch: { + legacy: { + client: coreStart.elasticsearch.legacy.client.asScoped(request), + }, + }, + uiSettings: { + client: coreStart.uiSettings.asScopedToClient(soClient), + }, + }, + }; +}; diff --git a/x-pack/plugins/global_search/server/services/index.ts b/x-pack/plugins/global_search/server/services/index.ts new file mode 100644 index 0000000000000..cee5b24d2f588 --- /dev/null +++ b/x-pack/plugins/global_search/server/services/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { SearchService, SearchServiceSetup, SearchServiceStart } from './search_service'; diff --git a/x-pack/plugins/global_search/server/services/search_service.mock.ts b/x-pack/plugins/global_search/server/services/search_service.mock.ts new file mode 100644 index 0000000000000..eca69148288b9 --- /dev/null +++ b/x-pack/plugins/global_search/server/services/search_service.mock.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { SearchServiceSetup, SearchServiceStart } from './search_service'; +import { of } from 'rxjs'; + +const createSetupMock = (): jest.Mocked => { + return { + registerResultProvider: jest.fn(), + }; +}; + +const createStartMock = (): jest.Mocked => { + const mock = { + find: jest.fn(), + }; + mock.find.mockReturnValue(of({ results: [] })); + + return mock; +}; + +export const searchServiceMock = { + createSetupContract: createSetupMock, + createStartContract: createStartMock, +}; diff --git a/x-pack/plugins/global_search/server/services/search_service.test.ts b/x-pack/plugins/global_search/server/services/search_service.test.ts new file mode 100644 index 0000000000000..fd705b4286680 --- /dev/null +++ b/x-pack/plugins/global_search/server/services/search_service.test.ts @@ -0,0 +1,323 @@ +/* + * 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 { Observable, of } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { TestScheduler } from 'rxjs/testing'; +import { duration } from 'moment'; +import { httpServiceMock, httpServerMock, coreMock } from '../../../../../src/core/server/mocks'; +import { licenseCheckerMock } from '../../common/license_checker.mock'; +import { GlobalSearchProviderResult } from '../../common/types'; +import { GlobalSearchFindError } from '../../common/errors'; +import { GlobalSearchConfigType } from '../config'; +import { GlobalSearchResultProvider } from '../types'; +import { SearchService } from './search_service'; + +const getTestScheduler = () => + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); + +describe('SearchService', () => { + let service: SearchService; + let basePath: ReturnType; + let coreStart: ReturnType; + let licenseChecker: ReturnType; + let request: ReturnType; + + const createConfig = (timeoutMs: number = 30000): GlobalSearchConfigType => { + return { + search_timeout: duration(timeoutMs), + }; + }; + + const createProvider = ( + id: string, + source: Observable = of([]) + ): jest.Mocked => ({ + id, + find: jest.fn().mockImplementation((term, options, context) => source), + }); + + const expectedResult = (id: string) => expect.objectContaining({ id }); + + const expectedBatch = (...ids: string[]) => ({ + results: ids.map((id) => expectedResult(id)), + }); + + const result = ( + id: string, + parts: Partial = {} + ): GlobalSearchProviderResult => ({ + title: id, + type: 'test', + url: '/foo/bar', + score: 100, + ...parts, + id, + }); + + beforeEach(() => { + service = new SearchService(); + basePath = httpServiceMock.createBasePath(); + basePath.prepend.mockImplementation((path) => `/base-path${path}`); + coreStart = coreMock.createStart(); + licenseChecker = licenseCheckerMock.create(); + }); + + describe('#setup()', () => { + describe('#registerResultProvider()', () => { + it('throws when trying to register the same provider twice', () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + const provider = createProvider('A'); + registerResultProvider(provider); + expect(() => { + registerResultProvider(provider); + }).toThrowErrorMatchingInlineSnapshot(`"trying to register duplicate provider: A"`); + }); + }); + }); + + describe('#start()', () => { + describe('#find()', () => { + it('calls the provider with the correct parameters', () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + const provider = createProvider('A'); + registerResultProvider(provider); + + const { find } = service.start({ core: coreStart, licenseChecker }); + find('foobar', { preference: 'pref' }, request); + + expect(provider.find).toHaveBeenCalledTimes(1); + expect(provider.find).toHaveBeenCalledWith( + 'foobar', + expect.objectContaining({ preference: 'pref' }), + expect.objectContaining({ core: expect.any(Object) }) + ); + }); + + it('return the results from the provider', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('a-b-|', { + a: [result('1')], + b: [result('2')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const results = find('foo', {}, request); + + expectObservable(results).toBe('a-b-|', { + a: expectedBatch('1'), + b: expectedBatch('2'), + }); + }); + }); + + it('handles multiple providers', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + registerResultProvider( + createProvider( + 'A', + hot('a---d-|', { + a: [result('A1'), result('A2')], + d: [result('A3')], + }) + ) + ); + registerResultProvider( + createProvider( + 'B', + hot('-b-c| ', { + b: [result('B1')], + c: [result('B2'), result('B3')], + }) + ) + ); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const results = find('foo', {}, request); + + expectObservable(results).toBe('ab-cd-|', { + a: expectedBatch('A1', 'A2'), + b: expectedBatch('B1'), + c: expectedBatch('B2', 'B3'), + d: expectedBatch('A3'), + }); + }); + }); + + it('handles the `aborted$` option', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('--a---(b|)', { + a: [result('1')], + b: [result('2')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const aborted$ = hot('----a--|', { a: undefined }); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const results = find('foo', { aborted$ }, request); + + expectObservable(results).toBe('--a-|', { + a: expectedBatch('1'), + }); + }); + }); + + it('respects the timeout duration', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(100), + basePath, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('a 24ms b 100ms (c|)', { + a: [result('1')], + b: [result('2')], + c: [result('3')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const results = find('foo', {}, request); + + expectObservable(results).toBe('a 24ms b 74ms |', { + a: expectedBatch('1'), + b: expectedBatch('2'), + }); + }); + }); + + it('only returns a given maximum number of results per provider', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(100), + basePath, + maxProviderResults: 2, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + registerResultProvider( + createProvider( + 'A', + hot('a---d-|', { + a: [result('A1'), result('A2')], + d: [result('A3')], + }) + ) + ); + registerResultProvider( + createProvider( + 'B', + hot('-b-c| ', { + b: [result('B1')], + c: [result('B2'), result('B3')], + }) + ) + ); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const results = find('foo', {}, request); + + expectObservable(results).toBe('ab-(c|)', { + a: expectedBatch('A1', 'A2'), + b: expectedBatch('B1'), + c: expectedBatch('B2'), + }); + }); + }); + + it('process the results before returning them', async () => { + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + const resultA = result('A', { + type: 'application', + icon: 'appIcon', + score: 42, + title: 'foo', + url: '/foo/bar', + }); + const resultB = result('B', { + type: 'dashboard', + score: 69, + title: 'bar', + url: { path: '/foo', prependBasePath: false }, + }); + + const provider = createProvider('A', of([resultA, resultB])); + registerResultProvider(provider); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const batch = await find('foo', {}, request).pipe(take(1)).toPromise(); + + expect(batch.results).toHaveLength(2); + expect(batch.results[0]).toEqual({ + ...resultA, + url: '/base-path/foo/bar', + }); + expect(batch.results[1]).toEqual({ + ...resultB, + url: '/foo', + }); + }); + + it('emits an error when the license is invalid', async () => { + licenseChecker.getState.mockReturnValue({ valid: false, message: 'expired' }); + + const { registerResultProvider } = service.setup({ + config: createConfig(), + basePath, + }); + + getTestScheduler().run(({ expectObservable, hot }) => { + const providerResults = hot('a-b-|', { + a: [result('1')], + b: [result('2')], + }); + registerResultProvider(createProvider('A', providerResults)); + + const { find } = service.start({ core: coreStart, licenseChecker }); + const results = find('foo', {}, request); + + expectObservable(results).toBe( + '#', + {}, + GlobalSearchFindError.invalidLicense( + 'GlobalSearch API is disabled because of invalid license state: expired' + ) + ); + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/global_search/server/services/search_service.ts b/x-pack/plugins/global_search/server/services/search_service.ts new file mode 100644 index 0000000000000..12eada2a1385e --- /dev/null +++ b/x-pack/plugins/global_search/server/services/search_service.ts @@ -0,0 +1,162 @@ +/* + * 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 { Observable, timer, merge, throwError } from 'rxjs'; +import { map, takeUntil } from 'rxjs/operators'; +import { i18n } from '@kbn/i18n'; +import { KibanaRequest, CoreStart, IBasePath } from 'src/core/server'; +import { GlobalSearchProviderResult, GlobalSearchBatchedResults } from '../../common/types'; +import { GlobalSearchFindError } from '../../common/errors'; +import { takeInArray } from '../../common/operators'; +import { ILicenseChecker } from '../../common/license_checker'; + +import { processProviderResult } from '../../common/process_result'; +import { GlobalSearchConfigType } from '../config'; +import { getContextFactory, GlobalSearchContextFactory } from './context'; +import { GlobalSearchResultProvider, GlobalSearchFindOptions } from '../types'; + +/** @public */ +export interface SearchServiceSetup { + /** + * Register a result provider to be used by the search service. + * + * @example + * ```ts + * setupDeps.globalSearch.registerResultProvider({ + * id: 'my_provider', + * find: (term, options, context) => { + * const resultPromise = myService.search(term, options, context.core.savedObjects.client); + * return from(resultPromise).pipe(takeUntil(options.aborted$); + * }, + * }); + * ``` + */ + registerResultProvider(provider: GlobalSearchResultProvider): void; +} + +/** @public */ +export interface SearchServiceStart { + /** + * Perform a search for given `term` and {@link GlobalSearchFindOptions | options}. + * + * @example + * ```ts + * startDeps.globalSearch.find('some term').subscribe({ + * next: ({ results }) => { + * addNewResultsToList(results); + * }, + * error: () => {}, + * complete: () => { + * showAsyncSearchIndicator(false); + * } + * }); + * ``` + * + * @remarks + * - Emissions from the resulting observable will only contains **new** results. It is the consumer + * responsibility to aggregate the emission and sort the results if required. + * - Results from the client-side registered providers will not available when performing a search + * from the server-side `find` API. + */ + find( + term: string, + options: GlobalSearchFindOptions, + request: KibanaRequest + ): Observable; +} + +interface SetupDeps { + basePath: IBasePath; + config: GlobalSearchConfigType; + maxProviderResults?: number; +} + +interface StartDeps { + core: CoreStart; + licenseChecker: ILicenseChecker; +} + +const defaultMaxProviderResults = 20; +const mapToUndefined = () => undefined; + +/** @internal */ +export class SearchService { + private readonly providers = new Map(); + private basePath?: IBasePath; + private config?: GlobalSearchConfigType; + private contextFactory?: GlobalSearchContextFactory; + private licenseChecker?: ILicenseChecker; + private maxProviderResults = defaultMaxProviderResults; + + setup({ + basePath, + config, + maxProviderResults = defaultMaxProviderResults, + }: SetupDeps): SearchServiceSetup { + this.basePath = basePath; + this.config = config; + this.maxProviderResults = maxProviderResults; + + return { + registerResultProvider: (provider) => { + if (this.providers.has(provider.id)) { + throw new Error(`trying to register duplicate provider: ${provider.id}`); + } + this.providers.set(provider.id, provider); + }, + }; + } + + start({ core, licenseChecker }: StartDeps): SearchServiceStart { + this.licenseChecker = licenseChecker; + this.contextFactory = getContextFactory(core); + return { + find: (term, options, request) => this.performFind(term, options, request), + }; + } + + private performFind(term: string, options: GlobalSearchFindOptions, request: KibanaRequest) { + const licenseState = this.licenseChecker!.getState(); + if (!licenseState.valid) { + return throwError( + GlobalSearchFindError.invalidLicense( + i18n.translate('xpack.globalSearch.find.invalidLicenseError', { + defaultMessage: `GlobalSearch API is disabled because of invalid license state: {errorMessage}`, + values: { errorMessage: licenseState.message }, + }) + ) + ); + } + + const context = this.contextFactory!(request); + + const timeout$ = timer(this.config!.search_timeout.asMilliseconds()).pipe(map(mapToUndefined)); + const aborted$ = options.aborted$ ? merge(options.aborted$, timeout$) : timeout$; + const providerOptions = { + ...options, + preference: options.preference ?? 'default', + maxResults: this.maxProviderResults, + aborted$, + }; + + const processResult = (result: GlobalSearchProviderResult) => + processProviderResult(result, this.basePath!); + + const providersResults$ = [...this.providers.values()].map((provider) => + provider.find(term, providerOptions, context).pipe( + takeInArray(this.maxProviderResults), + takeUntil(aborted$), + map((results) => results.map((r) => processResult(r))) + ) + ); + + return merge(...providersResults$).pipe( + map((results) => ({ + results, + })) + ); + } +} diff --git a/x-pack/plugins/global_search/server/types.ts b/x-pack/plugins/global_search/server/types.ts new file mode 100644 index 0000000000000..eca4aff366883 --- /dev/null +++ b/x-pack/plugins/global_search/server/types.ts @@ -0,0 +1,110 @@ +/* + * 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 { Observable } from 'rxjs'; +import { + ISavedObjectTypeRegistry, + IScopedClusterClient, + IUiSettingsClient, + SavedObjectsClientContract, +} from 'src/core/server'; +import { + GlobalSearchBatchedResults, + GlobalSearchProviderFindOptions, + GlobalSearchProviderResult, +} from '../common/types'; +import { SearchServiceSetup, SearchServiceStart } from './services'; + +export type GlobalSearchPluginSetup = Pick; +export type GlobalSearchPluginStart = Pick; + +/** + * globalSearch route handler context. + * + * @public + */ +export interface RouteHandlerGlobalSearchContext { + /** + * See {@link SearchServiceStart.find | the find API} + */ + find(term: string, options: GlobalSearchFindOptions): Observable; +} + +/** + * Context passed to server-side {@GlobalSearchResultProvider | result provider}'s `find` method. + * + * @public + */ +export interface GlobalSearchProviderContext { + core: { + savedObjects: { + client: SavedObjectsClientContract; + typeRegistry: ISavedObjectTypeRegistry; + }; + elasticsearch: { + legacy: { + client: IScopedClusterClient; + }; + }; + uiSettings: { + client: IUiSettingsClient; + }; + }; +} + +/** + * Options for the server-side {@link GlobalSearchPluginStart.find | find API} + * + * @public + */ +export interface GlobalSearchFindOptions { + /** + * A custom preference token associated with a search 'session' that should be used to get consistent scoring + * when performing calls to ES. Can also be used as a 'session' token for providers returning data from elsewhere + * than an elasticsearch cluster. + * If not specified, a random token will be generated and used. + */ + preference?: string; + /** + * Optional observable to notify that the associated `find` call should be canceled. + * If/when provided and emitting, no further result emission will be performed and the result observable will be completed. + */ + aborted$?: Observable; +} + +/** + * GlobalSearch result provider, to be registered using the {@link GlobalSearchPluginSetup | global search API} + * + * @public + */ +export interface GlobalSearchResultProvider { + /** + * id of the provider + */ + id: string; + /** + * Method that should return an observable used to emit new results from the provider. + * + * See {@GlobalSearchProviderResult | the result type} for the expected result structure. + * + * @example + * ```ts + * // returning all results in a single batch + * setupDeps.globalSearch.registerResultProvider({ + * id: 'my_provider', + * find: (term, { aborted$, preference, maxResults }, context) => { + * const resultPromise = myService.search(term, { preference, maxResults }, context.core.savedObjects.client); + * return from(resultPromise).pipe(takeUntil(aborted$)); + * }, + * }); + * ``` + */ + find( + term: string, + options: GlobalSearchProviderFindOptions, + context: GlobalSearchProviderContext + ): Observable; +} diff --git a/x-pack/plugins/graph/server/routes/search.ts b/x-pack/plugins/graph/server/routes/search.ts index ffca273d66c71..645e6b520013f 100644 --- a/x-pack/plugins/graph/server/routes/search.ts +++ b/x-pack/plugins/graph/server/routes/search.ts @@ -7,6 +7,7 @@ import { IRouter } from 'kibana/server'; import { schema } from '@kbn/config-schema'; import { LicenseState, verifyApiAccess } from '../lib/license_state'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/server'; export function registerSearchRoute({ router, @@ -41,7 +42,7 @@ export function registerSearchRoute({ response ) => { verifyApiAccess(licenseState); - const includeFrozen = await uiSettings.get('search:includeFrozen'); + const includeFrozen = await uiSettings.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); try { return response.ok({ body: { diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/min_age_input.js b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/min_age_input.js index bfe1bbb04338c..28bc8671f29e2 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/min_age_input.js +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/min_age_input.js @@ -140,6 +140,41 @@ export const MinAgeInput = (props) => { defaultMessage: 'hours from index creation', } ); + + minutesOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.creationMinutesOptionLabel', + { + defaultMessage: 'minutes from index creation', + } + ); + + secondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.creationSecondsOptionLabel', + { + defaultMessage: 'seconds from index creation', + } + ); + + millisecondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.creationMilliSecondsOptionLabel', + { + defaultMessage: 'milliseconds from index creation', + } + ); + + microsecondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.creationMicroSecondsOptionLabel', + { + defaultMessage: 'microseconds from index creation', + } + ); + + nanosecondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.creationNanoSecondsOptionLabel', + { + defaultMessage: 'nanoseconds from index creation', + } + ); } return ( diff --git a/x-pack/plugins/index_lifecycle_management/public/application/store/selectors/lifecycle.js b/x-pack/plugins/index_lifecycle_management/public/application/store/selectors/lifecycle.js index 789de0f528b1b..03538fad9aa83 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/store/selectors/lifecycle.js +++ b/x-pack/plugins/index_lifecycle_management/public/application/store/selectors/lifecycle.js @@ -270,7 +270,9 @@ export const getLifecycle = (state) => { if (phaseName === PHASE_DELETE) { accum[phaseName].actions = { ...accum[phaseName].actions, - delete: {}, + delete: { + ...accum[phaseName].actions.delete, + }, }; } } diff --git a/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_create_route.ts b/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_create_route.ts index 2eb635e19be48..7bf3f96e2b2ef 100644 --- a/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_create_route.ts +++ b/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_create_route.ts @@ -67,7 +67,7 @@ const warmPhaseSchema = schema.maybe( actions: schema.object({ set_priority: setPrioritySchema, unfollow: unfollowSchema, - read_only: schema.maybe(schema.object({})), // Readonly has no options + readonly: schema.maybe(schema.object({})), // Readonly has no options allocate: allocateSchema, shrink: schema.maybe( schema.object({ @@ -91,6 +91,11 @@ const coldPhaseSchema = schema.maybe( unfollow: unfollowSchema, allocate: allocateSchema, freeze: schema.maybe(schema.object({})), // Freeze has no options + searchable_snapshot: schema.maybe( + schema.object({ + snapshot_repository: schema.string(), + }) + ), }), }) ); @@ -104,7 +109,11 @@ const deletePhaseSchema = schema.maybe( policy: schema.string(), }) ), - delete: schema.maybe(schema.object({})), // Delete has no options + delete: schema.maybe( + schema.object({ + delete_searchable_snapshot: schema.maybe(schema.boolean()), + }) + ), }), }) ); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts b/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts index e5bce31ee6de1..da461609f0b83 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts @@ -12,7 +12,7 @@ type HttpResponse = Record | any[]; // Register helpers to mock HTTP Requests const registerHttpRequestMockHelpers = (server: SinonFakeServer) => { const setLoadTemplatesResponse = (response: HttpResponse = []) => { - server.respondWith('GET', `${API_BASE_PATH}/templates`, [ + server.respondWith('GET', `${API_BASE_PATH}/index-templates`, [ 200, { 'Content-Type': 'application/json' }, JSON.stringify(response), @@ -28,7 +28,7 @@ const registerHttpRequestMockHelpers = (server: SinonFakeServer) => { }; const setDeleteTemplateResponse = (response: HttpResponse = []) => { - server.respondWith('DELETE', `${API_BASE_PATH}/templates`, [ + server.respondWith('POST', `${API_BASE_PATH}/delete-index-templates`, [ 200, { 'Content-Type': 'application/json' }, JSON.stringify(response), @@ -39,7 +39,7 @@ const registerHttpRequestMockHelpers = (server: SinonFakeServer) => { const status = error ? error.status || 400 : 200; const body = error ? error.body : response; - server.respondWith('GET', `${API_BASE_PATH}/templates/:id`, [ + server.respondWith('GET', `${API_BASE_PATH}/index-templates/:id`, [ status, { 'Content-Type': 'application/json' }, JSON.stringify(body), @@ -50,7 +50,7 @@ const registerHttpRequestMockHelpers = (server: SinonFakeServer) => { const status = error ? error.body.status || 400 : 200; const body = error ? JSON.stringify(error.body) : JSON.stringify(response); - server.respondWith('PUT', `${API_BASE_PATH}/templates`, [ + server.respondWith('POST', `${API_BASE_PATH}/index-templates`, [ status, { 'Content-Type': 'application/json' }, body, @@ -61,7 +61,7 @@ const registerHttpRequestMockHelpers = (server: SinonFakeServer) => { const status = error ? error.status || 400 : 200; const body = error ? JSON.stringify(error.body) : JSON.stringify(response); - server.respondWith('PUT', `${API_BASE_PATH}/templates/:name`, [ + server.respondWith('PUT', `${API_BASE_PATH}/index-templates/:name`, [ status, { 'Content-Type': 'application/json' }, body, diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts index ab42a035a3d90..8e7755a65af3c 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import './mocks'; + export { nextTick, getRandomString, findTestSubject, TestBed } from '../../../../../test_utils'; export { setupEnvironment, WithAppDependencies, services } from './setup_environment'; @@ -14,6 +16,7 @@ export type TestSubjects = | 'cell' | 'closeDetailsButton' | 'createTemplateButton' + | 'createLegacyTemplateButton' | 'deleteSystemTemplateCallOut' | 'deleteTemplateButton' | 'deleteTemplatesConfirmation' @@ -44,4 +47,7 @@ export type TestSubjects = | 'templateDetails.title' | 'templateList' | 'templateTable' - | 'templatesTab'; + | 'templatesTab' + | 'legacyTemplateTable' + | 'viewButton' + | 'filterList.filterItem'; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/mocks.ts b/x-pack/plugins/index_management/__jest__/client_integration/helpers/mocks.ts new file mode 100644 index 0000000000000..6260a987e270a --- /dev/null +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/mocks.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +(window as any).Worker = class Worker { + onmessage() {} + postMessage() {} +}; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/home.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/home.test.ts index d195ce46c2f54..a7ac2ebf9bb02 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/home.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/home.test.ts @@ -7,9 +7,17 @@ import { act } from 'react-dom/test-utils'; import { setupEnvironment, nextTick } from '../helpers'; - import { HomeTestBed, setup } from './home.helpers'; +/** + * The below import is required to avoid a console error warn from the "brace" package + * console.warn ../node_modules/brace/index.js:3999 + Could not load worker ReferenceError: Worker is not defined + at createWorker (//node_modules/brace/index.js:17992:5) + */ +import { stubWebWorker } from '../../../../../test_utils/stub_web_worker'; +stubWebWorker(); + describe('', () => { const { server, httpRequestsMockHelpers } = setupEnvironment(); let testBed: HomeTestBed; @@ -62,7 +70,7 @@ describe('', () => { expect(exists('indicesList')).toBe(true); expect(exists('templateList')).toBe(false); - httpRequestsMockHelpers.setLoadTemplatesResponse([]); + httpRequestsMockHelpers.setLoadTemplatesResponse({ templates: [], legacyTemplates: [] }); actions.selectHomeTab('templatesTab'); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts index 0c4cca4dbcc7e..98bd3077670a7 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts @@ -12,7 +12,6 @@ import { TestBed, TestBedConfig, findTestSubject, - nextTick, } from '../../../../../test_utils'; // NOTE: We have to use the Home component instead of the TemplateList component because we depend // upon react router to provide the name of the template to load in the detail panel. @@ -24,7 +23,7 @@ import { WithAppDependencies, services, TestSubjects } from '../helpers'; const testBedConfig: TestBedConfig = { store: () => indexManagementStore(services as any), memoryRouter: { - initialEntries: [`/indices?includeHidden=true`], + initialEntries: [`/indices`], componentRoutePath: `/:section(indices|templates)`, }, doMountAsync: true, @@ -45,6 +44,7 @@ export interface IndexTemplatesTabTestBed extends TestBed { clickTemplateAt: (index: number) => void; clickCloseDetailsButton: () => void; clickActionMenu: (name: TemplateDeserialized['name']) => void; + toggleViewItem: (view: 'composable' | 'system') => void; }; } @@ -102,15 +102,14 @@ export const setup = async (): Promise => { const clickTemplateAt = async (index: number) => { const { component, table, router } = testBed; - const { rows } = table.getMetaData('templateTable'); + const { rows } = table.getMetaData('legacyTemplateTable'); const templateLink = findTestSubject(rows[index].reactWrapper, 'templateDetailsLink'); + const { href } = templateLink.props(); await act(async () => { - const { href } = templateLink.props(); router.navigateTo(href!); - await nextTick(); - component.update(); }); + component.update(); }; const clickCloseDetailsButton = () => { @@ -119,6 +118,23 @@ export const setup = async (): Promise => { find('closeDetailsButton').simulate('click'); }; + const toggleViewItem = (view: 'composable' | 'system') => { + const { find, component } = testBed; + const views = ['composable', 'system']; + + // First open the pop over + act(() => { + find('viewButton').simulate('click'); + }); + component.update(); + + // Then click on a filter item + act(() => { + find('filterList.filterItem').at(views.indexOf(view)).simulate('click'); + }); + component.update(); + }; + return { ...testBed, findAction, @@ -130,6 +146,7 @@ export const setup = async (): Promise => { clickTemplateAt, clickCloseDetailsButton, clickActionMenu, + toggleViewItem, }, }; }; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts index c9a279e90d0e0..8f6a8dddeb195 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts @@ -8,16 +8,18 @@ import { act } from 'react-dom/test-utils'; import * as fixtures from '../../../test/fixtures'; import { API_BASE_PATH } from '../../../common/constants'; -import { setupEnvironment, nextTick, getRandomString } from '../helpers'; +import { setupEnvironment, getRandomString } from '../helpers'; import { IndexTemplatesTabTestBed, setup } from './index_templates_tab.helpers'; const removeWhiteSpaceOnArrayValues = (array: any[]) => array.map((value) => { - if (!value.trim) { + if (typeof value !== 'string') { return value; } - return value.trim(); + + // Convert non breaking spaces ( ) to ordinary space + return value.trim().replace(/\s/g, ' '); }); describe('Index Templates tab', () => { @@ -31,13 +33,8 @@ describe('Index Templates tab', () => { beforeEach(async () => { httpRequestsMockHelpers.setLoadIndicesResponse([]); - testBed = await setup(); - await act(async () => { - const { component } = testBed; - - await nextTick(); - component.update(); + testBed = await setup(); }); }); @@ -45,14 +42,12 @@ describe('Index Templates tab', () => { beforeEach(async () => { const { actions, component } = testBed; - httpRequestsMockHelpers.setLoadTemplatesResponse([]); - - actions.goToTemplatesList(); + httpRequestsMockHelpers.setLoadTemplatesResponse({ templates: [], legacyTemplates: [] }); await act(async () => { - await nextTick(); - component.update(); + actions.goToTemplatesList(); }); + component.update(); }); test('should display an empty prompt', async () => { @@ -64,6 +59,9 @@ describe('Index Templates tab', () => { }); describe('when there are index templates', () => { + // Add a default loadIndexTemplate response + httpRequestsMockHelpers.setLoadTemplateResponse(fixtures.getTemplate()); + const template1 = fixtures.getTemplate({ name: `a${getRandomString()}`, indexPatterns: ['template1Pattern1*', 'template1Pattern2'], @@ -78,37 +76,87 @@ describe('Index Templates tab', () => { }, }, }); + const template2 = fixtures.getTemplate({ name: `b${getRandomString()}`, indexPatterns: ['template2Pattern1*'], }); + const template3 = fixtures.getTemplate({ name: `.c${getRandomString()}`, // mock system template indexPatterns: ['template3Pattern1*', 'template3Pattern2', 'template3Pattern3'], }); + const template4 = fixtures.getTemplate({ + name: `a${getRandomString()}`, + indexPatterns: ['template4Pattern1*', 'template4Pattern2'], + template: { + settings: { + index: { + number_of_shards: '1', + lifecycle: { + name: 'my_ilm_policy', + }, + }, + }, + }, + isLegacy: true, + }); + + const template5 = fixtures.getTemplate({ + name: `b${getRandomString()}`, + indexPatterns: ['template5Pattern1*'], + isLegacy: true, + }); + + const template6 = fixtures.getTemplate({ + name: `.c${getRandomString()}`, // mock system template + indexPatterns: ['template6Pattern1*', 'template6Pattern2', 'template6Pattern3'], + isLegacy: true, + }); + const templates = [template1, template2, template3]; + const legacyTemplates = [template4, template5, template6]; beforeEach(async () => { const { actions, component } = testBed; - httpRequestsMockHelpers.setLoadTemplatesResponse(templates); - - actions.goToTemplatesList(); + httpRequestsMockHelpers.setLoadTemplatesResponse({ templates, legacyTemplates }); await act(async () => { - await nextTick(); - component.update(); + actions.goToTemplatesList(); }); + component.update(); }); test('should list them in the table', async () => { const { table } = testBed; const { tableCellsValues } = table.getMetaData('templateTable'); + const { tableCellsValues: legacyTableCellsValues } = table.getMetaData('legacyTemplateTable'); + // Test composable table content tableCellsValues.forEach((row, i) => { const template = templates[i]; + const { name, indexPatterns, priority, ilmPolicy, composedOf } = template; + + const ilmPolicyName = ilmPolicy && ilmPolicy.name ? ilmPolicy.name : ''; + const composedOfString = composedOf ? composedOf.join(',') : ''; + const priorityFormatted = priority ? priority.toString() : ''; + + expect(removeWhiteSpaceOnArrayValues(row)).toEqual([ + name, + indexPatterns.join(', '), + ilmPolicyName, + composedOfString, + priorityFormatted, + 'M S A', // Mappings Settings Aliases badges + ]); + }); + + // Test legacy table content + legacyTableCellsValues.forEach((row, i) => { + const template = legacyTemplates[i]; const { name, indexPatterns, order, ilmPolicy } = template; const ilmPolicyName = ilmPolicy && ilmPolicy.name ? ilmPolicy.name : ''; @@ -129,44 +177,40 @@ describe('Index Templates tab', () => { }); test('should have a button to reload the index templates', async () => { - const { component, exists, actions } = testBed; + const { exists, actions } = testBed; const totalRequests = server.requests.length; expect(exists('reloadButton')).toBe(true); await act(async () => { actions.clickReloadButton(); - await nextTick(); - component.update(); }); expect(server.requests.length).toBe(totalRequests + 1); - expect(server.requests[server.requests.length - 1].url).toBe(`${API_BASE_PATH}/templates`); + expect(server.requests[server.requests.length - 1].url).toBe( + `${API_BASE_PATH}/index-templates` + ); }); test('should have a button to create a new template', () => { const { exists } = testBed; - expect(exists('createTemplateButton')).toBe(true); + expect(exists('createLegacyTemplateButton')).toBe(true); }); test('should have a switch to view system templates', async () => { - const { table, exists, component, form } = testBed; - const { rows } = table.getMetaData('templateTable'); + const { table, exists, actions } = testBed; + const { rows } = table.getMetaData('legacyTemplateTable'); expect(rows.length).toEqual( - templates.filter((template) => !template.name.startsWith('.')).length + legacyTemplates.filter((template) => !template.name.startsWith('.')).length ); - expect(exists('systemTemplatesSwitch')).toBe(true); + expect(exists('viewButton')).toBe(true); - await act(async () => { - form.toggleEuiSwitch('systemTemplatesSwitch'); - await nextTick(); - component.update(); - }); + actions.toggleViewItem('system'); - const { rows: updatedRows } = table.getMetaData('templateTable'); - expect(updatedRows.length).toEqual(templates.length); + const { rows: updatedRows } = table.getMetaData('legacyTemplateTable'); + expect(updatedRows.length).toEqual(legacyTemplates.length); }); test('each row should have a link to the template details panel', async () => { @@ -176,12 +220,12 @@ describe('Index Templates tab', () => { expect(exists('templateList')).toBe(true); expect(exists('templateDetails')).toBe(true); - expect(find('templateDetails.title').text()).toBe(template1.name); + expect(find('templateDetails.title').text()).toBe(legacyTemplates[0].name); }); test('template actions column should have an option to delete', () => { const { actions, findAction } = testBed; - const { name: templateName } = template1; + const [{ name: templateName }] = legacyTemplates; actions.clickActionMenu(templateName); @@ -192,7 +236,7 @@ describe('Index Templates tab', () => { test('template actions column should have an option to clone', () => { const { actions, findAction } = testBed; - const { name: templateName } = template1; + const [{ name: templateName }] = legacyTemplates; actions.clickActionMenu(templateName); @@ -203,7 +247,7 @@ describe('Index Templates tab', () => { test('template actions column should have an option to edit', () => { const { actions, findAction } = testBed; - const { name: templateName } = template1; + const [{ name: templateName }] = legacyTemplates; actions.clickActionMenu(templateName); @@ -215,7 +259,7 @@ describe('Index Templates tab', () => { describe('delete index template', () => { test('should show a confirmation when clicking the delete template button', async () => { const { actions } = testBed; - const { name: templateName } = template1; + const [{ name: templateName }] = legacyTemplates; await actions.clickTemplateAction(templateName, 'delete'); @@ -231,32 +275,28 @@ describe('Index Templates tab', () => { }); test('should show a warning message when attempting to delete a system template', async () => { - const { component, form, actions } = testBed; + const { exists, actions } = testBed; - await act(async () => { - form.toggleEuiSwitch('systemTemplatesSwitch'); - await nextTick(); - component.update(); - }); + actions.toggleViewItem('system'); - const { name: systemTemplateName } = template3; + const { name: systemTemplateName } = legacyTemplates[2]; await actions.clickTemplateAction(systemTemplateName, 'delete'); - expect( - document.body.querySelector('[data-test-subj="deleteSystemTemplateCallOut"]') - ).not.toBe(null); + expect(exists('deleteSystemTemplateCallOut')).toBe(true); }); test('should send the correct HTTP request to delete an index template', async () => { - const { component, actions, table } = testBed; - const { rows } = table.getMetaData('templateTable'); + const { actions, table } = testBed; + const { rows } = table.getMetaData('legacyTemplateTable'); const templateId = rows[0].columns[2].value; - const { - name: templateName, - _kbnMeta: { formatVersion }, - } = template1; + const [ + { + name: templateName, + _kbnMeta: { isLegacy }, + }, + ] = legacyTemplates; await actions.clickTemplateAction(templateName, 'delete'); const modal = document.body.querySelector('[data-test-subj="deleteTemplatesConfirmation"]'); @@ -273,16 +313,14 @@ describe('Index Templates tab', () => { await act(async () => { confirmButton!.click(); - await nextTick(); - component.update(); }); const latestRequest = server.requests[server.requests.length - 1]; expect(latestRequest.method).toBe('POST'); - expect(latestRequest.url).toBe(`${API_BASE_PATH}/delete-templates`); + expect(latestRequest.url).toBe(`${API_BASE_PATH}/delete-index-templates`); expect(JSON.parse(JSON.parse(latestRequest.requestBody).body)).toEqual({ - templates: [{ name: template1.name, formatVersion }], + templates: [{ name: legacyTemplates[0].name, isLegacy }], }); }); }); @@ -292,6 +330,7 @@ describe('Index Templates tab', () => { const template = fixtures.getTemplate({ name: `a${getRandomString()}`, indexPatterns: ['template1Pattern1*', 'template1Pattern2'], + isLegacy: true, }); httpRequestsMockHelpers.setLoadTemplateResponse(template); @@ -316,7 +355,7 @@ describe('Index Templates tab', () => { test('should set the correct title', async () => { const { find } = testBed; - const { name } = template1; + const [{ name }] = legacyTemplates; expect(find('templateDetails.title').text()).toEqual(name); }); @@ -327,12 +366,10 @@ describe('Index Templates tab', () => { expect(exists('closeDetailsButton')).toBe(true); expect(exists('summaryTab')).toBe(true); - actions.clickCloseDetailsButton(); - await act(async () => { - await nextTick(); - component.update(); + actions.clickCloseDetailsButton(); }); + component.update(); expect(exists('summaryTab')).toBe(false); }); @@ -372,6 +409,7 @@ describe('Index Templates tab', () => { alias1: {}, }, }, + isLegacy: true, }); const { find, actions, exists } = testBed; @@ -412,19 +450,15 @@ describe('Index Templates tab', () => { const templateWithNoOptionalFields = fixtures.getTemplate({ name: `a${getRandomString()}`, indexPatterns: ['template1Pattern1*', 'template1Pattern2'], + isLegacy: true, }); - const { actions, find, exists, component } = testBed; + const { actions, find, exists } = testBed; httpRequestsMockHelpers.setLoadTemplateResponse(templateWithNoOptionalFields); await actions.clickTemplateAt(0); - await act(async () => { - await nextTick(); - component.update(); - }); - expect(find('templateDetails.tab').length).toBe(4); expect(exists('summaryTab')).toBe(true); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts index 07f3391782a54..e995932dfa00d 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts @@ -14,7 +14,7 @@ import { WithAppDependencies, services, TestSubjects } from '../helpers'; const testBedConfig: TestBedConfig = { store: () => indexManagementStore(services as any), memoryRouter: { - initialEntries: [`/indices?includeHidden=true`], + initialEntries: [`/indices?includeHiddenIndices=true`], componentRoutePath: `/:section(indices|templates)`, }, doMountAsync: true, diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.test.ts index e5db5d547f1ab..11c25ffbb590f 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.test.ts @@ -8,9 +8,17 @@ import { act } from 'react-dom/test-utils'; import { API_BASE_PATH } from '../../../common/constants'; import { setupEnvironment, nextTick } from '../helpers'; - import { IndicesTestBed, setup } from './indices_tab.helpers'; +/** + * The below import is required to avoid a console error warn from the "brace" package + * console.warn ../node_modules/brace/index.js:3999 + Could not load worker ReferenceError: Worker is not defined + at createWorker (//node_modules/brace/index.js:17992:5) + */ +import { stubWebWorker } from '../../../../../test_utils/stub_web_worker'; +stubWebWorker(); + describe('', () => { const { server, httpRequestsMockHelpers } = setupEnvironment(); let testBed: IndicesTestBed; @@ -33,16 +41,14 @@ describe('', () => { }); }); - test('sets the hash query param base on include hidden indices toggle', () => { + test('toggles the include hidden button through URL hash correctly', () => { const { actions } = testBed; expect(actions.getIncludeHiddenIndicesToggleStatus()).toBe(true); - expect(window.location.hash.includes('includeHidden=true')).toBe(true); actions.clickIncludeHiddenIndicesToggle(); - expect(window.location.hash.includes('includeHidden=true')).toBe(false); + expect(actions.getIncludeHiddenIndicesToggleStatus()).toBe(false); // Note: this test modifies the shared location.hash state, we put it back the way it was actions.clickIncludeHiddenIndicesToggle(); expect(actions.getIncludeHiddenIndicesToggleStatus()).toBe(true); - expect(window.location.hash.includes('includeHidden=true')).toBe(true); }); }); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.test.tsx index e0db9cd58ee23..6250ef0dc247d 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.test.tsx @@ -53,6 +53,7 @@ describe.skip('', () => { template: { mappings: MAPPINGS, }, + isLegacy: true, }); beforeEach(async () => { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx index 95545b6c66f54..50b35fc76721a 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from '../../../common'; +import { CREATE_LEGACY_TEMPLATE_BY_DEFAULT } from '../../../common'; import { setupEnvironment, nextTick } from '../helpers'; import { @@ -344,7 +344,6 @@ describe.skip('', () => { const latestRequest = server.requests[server.requests.length - 1]; const expected = { - isManaged: false, name: TEMPLATE_NAME, indexPatterns: DEFAULT_INDEX_PATTERNS, template: { @@ -366,7 +365,8 @@ describe.skip('', () => { aliases: ALIASES, }, _kbnMeta: { - formatVersion: DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT, + isLegacy: CREATE_LEGACY_TEMPLATE_BY_DEFAULT, + isManaged: false, }, }; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx index 6e935a5263301..88067d479f7e7 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.test.tsx @@ -62,6 +62,7 @@ describe.skip('', () => { const templateToEdit = fixtures.getTemplate({ name: 'index_template_without_mappings', indexPatterns: ['indexPattern1'], + isLegacy: true, }); beforeEach(async () => { @@ -102,6 +103,7 @@ describe.skip('', () => { template: { mappings: MAPPING, }, + isLegacy: true, }); beforeEach(async () => { @@ -206,9 +208,9 @@ describe.skip('', () => { settings: SETTINGS, aliases: ALIASES, }, - isManaged: false, _kbnMeta: { - formatVersion: templateToEdit._kbnMeta.formatVersion, + isManaged: false, + isLegacy: templateToEdit._kbnMeta.isLegacy, }, }; diff --git a/x-pack/plugins/index_management/common/constants/index.ts b/x-pack/plugins/index_management/common/constants/index.ts index 966e2e8e64838..526b9fede2a67 100644 --- a/x-pack/plugins/index_management/common/constants/index.ts +++ b/x-pack/plugins/index_management/common/constants/index.ts @@ -9,7 +9,7 @@ export { BASE_PATH } from './base_path'; export { API_BASE_PATH } from './api_base_path'; export { INVALID_INDEX_PATTERN_CHARS, INVALID_TEMPLATE_NAME_CHARS } from './invalid_characters'; export * from './index_statuses'; -export { DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from './index_templates'; +export { CREATE_LEGACY_TEMPLATE_BY_DEFAULT } from './index_templates'; export { UIM_APP_NAME, diff --git a/x-pack/plugins/index_management/common/constants/index_templates.ts b/x-pack/plugins/index_management/common/constants/index_templates.ts index 788e96ee895ed..7696b3832c51e 100644 --- a/x-pack/plugins/index_management/common/constants/index_templates.ts +++ b/x-pack/plugins/index_management/common/constants/index_templates.ts @@ -6,7 +6,7 @@ /** * Up until the end of the 8.x release cycle we need to support both - * V1 and V2 index template formats. This constant keeps track of whether - * we create V1 or V2 index template format in the UI. + * legacy and composable index template formats. This constant keeps track of whether + * we create legacy index template format by default in the UI. */ -export const DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT = 1; +export const CREATE_LEGACY_TEMPLATE_BY_DEFAULT = true; diff --git a/x-pack/plugins/index_management/common/index.ts b/x-pack/plugins/index_management/common/index.ts index 459eda7552c85..3792e322ae40b 100644 --- a/x-pack/plugins/index_management/common/index.ts +++ b/x-pack/plugins/index_management/common/index.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -export { PLUGIN, API_BASE_PATH, DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from './constants'; +export { PLUGIN, API_BASE_PATH, CREATE_LEGACY_TEMPLATE_BY_DEFAULT } from './constants'; export { getTemplateParameter } from './lib'; diff --git a/x-pack/plugins/index_management/common/lib/index.ts b/x-pack/plugins/index_management/common/lib/index.ts index 33f7fbe45182e..16eb544c56a08 100644 --- a/x-pack/plugins/index_management/common/lib/index.ts +++ b/x-pack/plugins/index_management/common/lib/index.ts @@ -4,9 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ export { + deserializeLegacyTemplateList, deserializeTemplateList, - deserializeV1Template, - serializeV1Template, + deserializeLegacyTemplate, + serializeLegacyTemplate, } from './template_serialization'; export { getTemplateParameter } from './utils'; diff --git a/x-pack/plugins/index_management/common/lib/template_serialization.ts b/x-pack/plugins/index_management/common/lib/template_serialization.ts index 33a83d1e9335b..249881f668d9f 100644 --- a/x-pack/plugins/index_management/common/lib/template_serialization.ts +++ b/x-pack/plugins/index_management/common/lib/template_serialization.ts @@ -5,60 +5,34 @@ */ import { TemplateDeserialized, - TemplateV1Serialized, - TemplateV2Serialized, + LegacyTemplateSerialized, + TemplateSerialized, TemplateListItem, } from '../types'; const hasEntries = (data: object = {}) => Object.entries(data).length > 0; -export function serializeV1Template(template: TemplateDeserialized): TemplateV1Serialized { - const { - name, - version, - order, - indexPatterns, - template: { settings, aliases, mappings } = {} as TemplateDeserialized['template'], - } = template; +export function serializeTemplate(templateDeserialized: TemplateDeserialized): TemplateSerialized { + const { version, priority, indexPatterns, template, composedOf } = templateDeserialized; - const serializedTemplate: TemplateV1Serialized = { - name, + return { version, - order, + priority, + template, index_patterns: indexPatterns, - settings, - aliases, - mappings, - }; - - return serializedTemplate; -} - -export function serializeV2Template(template: TemplateDeserialized): TemplateV2Serialized { - const { aliases, mappings, settings, ...templateV1serialized } = serializeV1Template(template); - - return { - ...templateV1serialized, - template: { - aliases, - mappings, - settings, - }, - priority: template.priority, - composed_of: template.composedOf, + composed_of: composedOf, }; } -export function deserializeV2Template( - templateEs: TemplateV2Serialized, +export function deserializeTemplate( + templateEs: TemplateSerialized & { name: string }, managedTemplatePrefix?: string ): TemplateDeserialized { const { name, version, - order, index_patterns: indexPatterns, - template, + template = {}, priority, composed_of: composedOf, } = templateEs; @@ -67,49 +41,92 @@ export function deserializeV2Template( const deserializedTemplate: TemplateDeserialized = { name, version, - order, + priority, indexPatterns: indexPatterns.sort(), template, - ilmPolicy: settings && settings.index && settings.index.lifecycle, - isManaged: Boolean(managedTemplatePrefix && name.startsWith(managedTemplatePrefix)), - priority, + ilmPolicy: settings?.index?.lifecycle, composedOf, _kbnMeta: { - formatVersion: 2, + isManaged: Boolean(managedTemplatePrefix && name.startsWith(managedTemplatePrefix)), }, }; return deserializedTemplate; } -export function deserializeV1Template( - templateEs: TemplateV1Serialized, +export function deserializeTemplateList( + indexTemplates: Array<{ name: string; index_template: TemplateSerialized }>, + managedTemplatePrefix?: string +): TemplateListItem[] { + return indexTemplates.map(({ name, index_template: templateSerialized }) => { + const { + template: { mappings, settings, aliases }, + ...deserializedTemplate + } = deserializeTemplate({ name, ...templateSerialized }, managedTemplatePrefix); + + return { + ...deserializedTemplate, + hasSettings: hasEntries(settings), + hasAliases: hasEntries(aliases), + hasMappings: hasEntries(mappings), + }; + }); +} + +/** + * ------------------------------------------ + * --------- LEGACY INDEX TEMPLATES --------- + * ------------------------------------------ + */ + +export function serializeLegacyTemplate(template: TemplateDeserialized): LegacyTemplateSerialized { + const { + version, + order, + indexPatterns, + template: { settings, aliases, mappings }, + } = template; + + return { + version, + order, + index_patterns: indexPatterns, + settings, + aliases, + mappings, + }; +} + +export function deserializeLegacyTemplate( + templateEs: LegacyTemplateSerialized & { name: string }, managedTemplatePrefix?: string ): TemplateDeserialized { const { settings, aliases, mappings, ...rest } = templateEs; - const deserializedTemplateV2 = deserializeV2Template( + const deserializedTemplate = deserializeTemplate( { ...rest, template: { aliases, settings, mappings } }, managedTemplatePrefix ); return { - ...deserializedTemplateV2, + ...deserializedTemplate, + order: templateEs.order, _kbnMeta: { - formatVersion: 1, + ...deserializedTemplate._kbnMeta, + isLegacy: true, }, }; } -export function deserializeTemplateList( - indexTemplatesByName: { [key: string]: Omit }, +export function deserializeLegacyTemplateList( + indexTemplatesByName: { [key: string]: LegacyTemplateSerialized }, managedTemplatePrefix?: string ): TemplateListItem[] { return Object.entries(indexTemplatesByName).map(([name, templateSerialized]) => { const { template: { mappings, settings, aliases }, ...deserializedTemplate - } = deserializeV1Template({ name, ...templateSerialized }, managedTemplatePrefix); + } = deserializeLegacyTemplate({ name, ...templateSerialized }, managedTemplatePrefix); return { ...deserializedTemplate, diff --git a/x-pack/plugins/index_management/common/lib/utils.test.ts b/x-pack/plugins/index_management/common/lib/utils.test.ts index 221d1b009cede..056101061a82b 100644 --- a/x-pack/plugins/index_management/common/lib/utils.test.ts +++ b/x-pack/plugins/index_management/common/lib/utils.test.ts @@ -3,12 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { TemplateV1Serialized, TemplateV2Serialized } from '../types'; -import { getTemplateVersion } from './utils'; +import { LegacyTemplateSerialized, TemplateSerialized } from '../types'; +import { isLegacyTemplate } from './utils'; describe('utils', () => { - describe('getTemplateVersion', () => { - test('should detect v1 template', () => { + describe('isLegacyTemplate', () => { + test('should detect legacy template', () => { const template = { name: 'my_template', index_patterns: ['logs*'], @@ -16,10 +16,10 @@ describe('utils', () => { properties: {}, }, }; - expect(getTemplateVersion(template as TemplateV1Serialized)).toBe(1); + expect(isLegacyTemplate(template as LegacyTemplateSerialized)).toBe(true); }); - test('should detect v2 template', () => { + test('should detect composable template', () => { const template = { name: 'my_template', index_patterns: ['logs*'], @@ -29,7 +29,7 @@ describe('utils', () => { }, }, }; - expect(getTemplateVersion(template as TemplateV2Serialized)).toBe(2); + expect(isLegacyTemplate(template as TemplateSerialized)).toBe(false); }); }); }); diff --git a/x-pack/plugins/index_management/common/lib/utils.ts b/x-pack/plugins/index_management/common/lib/utils.ts index eee35dc1ab467..5a7db8ef50ab4 100644 --- a/x-pack/plugins/index_management/common/lib/utils.ts +++ b/x-pack/plugins/index_management/common/lib/utils.ts @@ -4,26 +4,24 @@ * you may not use this file except in compliance with the Elastic License. */ -import { TemplateDeserialized, TemplateV1Serialized, TemplateV2Serialized } from '../types'; +import { TemplateDeserialized, LegacyTemplateSerialized, TemplateSerialized } from '../types'; /** - * Helper to get the format version of an index template. - * v1 will be supported up until 9.x but marked as deprecated from 7.8 - * v2 will be supported from 7.8 + * Helper to know if a template has the legacy format or not + * legacy format will be supported up until 9.x but marked as deprecated from 7.8 + * new (composable) format is supported from 7.8 */ -export const getTemplateVersion = ( - template: TemplateDeserialized | TemplateV1Serialized | TemplateV2Serialized -): 1 | 2 => { - return {}.hasOwnProperty.call(template, 'template') ? 2 : 1; +export const isLegacyTemplate = ( + template: TemplateDeserialized | LegacyTemplateSerialized | TemplateSerialized +): boolean => { + return {}.hasOwnProperty.call(template, 'template') ? false : true; }; export const getTemplateParameter = ( - template: TemplateV1Serialized | TemplateV2Serialized, + template: LegacyTemplateSerialized | TemplateSerialized, setting: 'aliases' | 'settings' | 'mappings' ) => { - const formatVersion = getTemplateVersion(template); - - return formatVersion === 1 - ? (template as TemplateV1Serialized)[setting] - : (template as TemplateV2Serialized).template[setting]; + return isLegacyTemplate(template) + ? (template as LegacyTemplateSerialized)[setting] + : (template as TemplateSerialized).template[setting]; }; diff --git a/x-pack/plugins/index_management/common/types/templates.ts b/x-pack/plugins/index_management/common/types/templates.ts index c37088982f207..f113aa44d058f 100644 --- a/x-pack/plugins/index_management/common/types/templates.ts +++ b/x-pack/plugins/index_management/common/types/templates.ts @@ -8,28 +8,45 @@ import { IndexSettings } from './indices'; import { Aliases } from './aliases'; import { Mappings } from './mappings'; -// Template serialized (from Elasticsearch) -interface TemplateBaseSerialized { - name: string; +/** + * Index template format from Elasticsearch + */ +export interface TemplateSerialized { index_patterns: string[]; + template: { + settings?: IndexSettings; + aliases?: Aliases; + mappings?: Mappings; + }; + composed_of?: string[]; version?: number; - order?: number; -} - -export interface TemplateV1Serialized extends TemplateBaseSerialized { - settings?: IndexSettings; - aliases?: Aliases; - mappings?: Mappings; + priority?: number; } -export interface TemplateV2Serialized extends TemplateBaseSerialized { +/** + * TemplateDeserialized is the format the UI will be working with, + * regardless if we are loading the new format (composable) index template, + * or the legacy one. Serialization is done server side. + */ +export interface TemplateDeserialized { + name: string; + indexPatterns: string[]; template: { settings?: IndexSettings; aliases?: Aliases; mappings?: Mappings; }; + composedOf?: string[]; // Used on composable index template + version?: number; priority?: number; - composed_of?: string[]; + order?: number; // Used on legacy index template + ilmPolicy?: { + name: string; + }; + _kbnMeta: { + isManaged: boolean; + isLegacy?: boolean; + }; } /** @@ -42,42 +59,30 @@ export interface TemplateListItem { indexPatterns: string[]; version?: number; order?: number; + priority?: number; hasSettings: boolean; hasAliases: boolean; hasMappings: boolean; ilmPolicy?: { name: string; }; - isManaged: boolean; _kbnMeta: { - formatVersion: IndexTemplateFormatVersion; + isManaged: boolean; + isLegacy?: boolean; }; } /** - * TemplateDeserialized falls back to index template V2 format - * The UI will only be dealing with this interface, conversion from and to V1 format - * is done server side. + * ------------------------------------------ + * --------- LEGACY INDEX TEMPLATES --------- + * ------------------------------------------ */ -export interface TemplateDeserialized { - name: string; - indexPatterns: string[]; - isManaged: boolean; - template: { - settings?: IndexSettings; - aliases?: Aliases; - mappings?: Mappings; - }; - _kbnMeta: { - formatVersion: IndexTemplateFormatVersion; - }; + +export interface LegacyTemplateSerialized { + index_patterns: string[]; version?: number; - priority?: number; + settings?: IndexSettings; + aliases?: Aliases; + mappings?: Mappings; order?: number; - ilmPolicy?: { - name: string; - }; - composedOf?: string[]; } - -export type IndexTemplateFormatVersion = 1 | 2; diff --git a/x-pack/plugins/index_management/public/application/components/template_delete_modal.tsx b/x-pack/plugins/index_management/public/application/components/template_delete_modal.tsx index a87412ef92950..06babb0db3bd1 100644 --- a/x-pack/plugins/index_management/public/application/components/template_delete_modal.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_delete_modal.tsx @@ -9,7 +9,6 @@ import { EuiConfirmModal, EuiOverlayMask, EuiCallOut, EuiCheckbox, EuiBadge } fr import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { IndexTemplateFormatVersion } from '../../../common'; import { deleteTemplates } from '../services/api'; import { notificationService } from '../services/notification'; @@ -17,7 +16,7 @@ export const TemplateDeleteModal = ({ templatesToDelete, callback, }: { - templatesToDelete: Array<{ name: string; formatVersion: IndexTemplateFormatVersion }>; + templatesToDelete: Array<{ name: string; isLegacy?: boolean }>; callback: (data?: { hasDeletedTemplates: boolean }) => void; }) => { const [isDeleteConfirmed, setIsDeleteConfirmed] = useState(false); diff --git a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx index 7b266034bc336..387887239aaf0 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/steps/step_review.tsx @@ -23,8 +23,8 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { serializers } from '../../../../shared_imports'; import { - serializeV1Template, - serializeV2Template, + serializeLegacyTemplate, + serializeTemplate, } from '../../../../../common/lib/template_serialization'; import { TemplateDeserialized, getTemplateParameter } from '../../../../../common'; import { StepProps } from '../types'; @@ -60,16 +60,20 @@ export const StepReview: React.FunctionComponent = ({ template, updat indexPatterns, version, order, - _kbnMeta: { formatVersion }, + _kbnMeta: { isLegacy }, } = template!; - const serializedTemplate = - formatVersion === 1 - ? serializeV1Template(stripEmptyFields(template!) as TemplateDeserialized) - : serializeV2Template(stripEmptyFields(template!) as TemplateDeserialized); - - // Name not included in ES request body - delete serializedTemplate.name; + const serializedTemplate = isLegacy + ? serializeLegacyTemplate( + stripEmptyFields(template!, { + types: ['string'], + }) as TemplateDeserialized + ) + : serializeTemplate( + stripEmptyFields(template!, { + types: ['string'], + }) as TemplateDeserialized + ); const serializedMappings = getTemplateParameter(serializedTemplate, 'mappings'); const serializedSettings = getTemplateParameter(serializedTemplate, 'settings'); diff --git a/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx b/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx index 0cdfaae70f151..52e26e6d3e895 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { serializers } from '../../../shared_imports'; -import { TemplateDeserialized, DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from '../../../../common'; +import { TemplateDeserialized, CREATE_LEGACY_TEMPLATE_BY_DEFAULT } from '../../../../common'; import { TemplateSteps } from './template_steps'; import { StepAliases, StepLogistics, StepMappings, StepSettings, StepReview } from './steps'; import { StepProps, DataGetterFunc } from './types'; @@ -51,9 +51,9 @@ export const TemplateForm: React.FunctionComponent = ({ name: '', indexPatterns: [], template: {}, - isManaged: false, _kbnMeta: { - formatVersion: DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT, + isManaged: false, + isLegacy: CREATE_LEGACY_TEMPLATE_BY_DEFAULT, }, }, onSave, @@ -246,7 +246,9 @@ export const TemplateForm: React.FunctionComponent = ({ iconType="check" onClick={onSave.bind( null, - stripEmptyFields(template.current!) as TemplateDeserialized + stripEmptyFields(template.current!, { + types: ['string'], + }) as TemplateDeserialized )} data-test-subj="submitButton" isLoading={isSaving} diff --git a/x-pack/plugins/index_management/public/application/lib/index_templates.ts b/x-pack/plugins/index_management/public/application/lib/index_templates.ts index 7129e536287c1..08102ae93cc0e 100644 --- a/x-pack/plugins/index_management/public/application/lib/index_templates.ts +++ b/x-pack/plugins/index_management/public/application/lib/index_templates.ts @@ -6,12 +6,12 @@ import { parse } from 'query-string'; import { Location } from 'history'; -export const getFormatVersionFromQueryparams = (location: Location): 1 | 2 | undefined => { - const { v: version } = parse(location.search.substring(1)); +export const getIsLegacyFromQueryParams = (location: Location): boolean => { + const { legacy } = parse(location.search.substring(1)); - if (!Boolean(version) || typeof version !== 'string') { - return undefined; + if (!Boolean(legacy) || typeof legacy !== 'string') { + return false; } - return +version as 1 | 2; + return legacy === 'true'; }; diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_list.js b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_list.js index 4b58ff0de17ee..df5ca7f837d10 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_list.js +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_list.js @@ -8,15 +8,10 @@ import React from 'react'; import { DetailPanel } from './detail_panel'; import { IndexTable } from './index_table'; -export function IndexList({ - match: { - params: { filter }, - }, - location, -}) { +export function IndexList() { return (
- +
); diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.container.js b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.container.js index 44d811f490d9d..9a44a02a44f87 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.container.js +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.container.js @@ -5,13 +5,13 @@ */ import { connect } from 'react-redux'; +import { withRouter } from 'react-router-dom'; import { getDetailPanelIndexName, getPageOfIndices, getPager, getFilter, isDetailPanelOpen, - showHiddenIndices, getSortField, isSortAscending, getIndicesAsArray, @@ -26,7 +26,6 @@ import { pageChanged, pageSizeChanged, sortChanged, - showHiddenIndicesChanged, loadIndices, reloadIndices, toggleChanged, @@ -34,15 +33,14 @@ import { import { IndexTable as PresentationComponent } from './index_table'; -const mapStateToProps = (state) => { +const mapStateToProps = (state, props) => { return { allIndices: getIndicesAsArray(state), isDetailPanelOpen: isDetailPanelOpen(state), detailPanelIndexName: getDetailPanelIndexName(state), - indices: getPageOfIndices(state), - pager: getPager(state), + indices: getPageOfIndices(state, props), + pager: getPager(state, props), filter: getFilter(state), - showHiddenIndices: showHiddenIndices(state), sortField: getSortField(state), isSortAscending: isSortAscending(state), indicesLoading: indicesLoading(state), @@ -65,9 +63,6 @@ const mapDispatchToProps = (dispatch) => { sortChanged: (sortField, isSortAscending) => { dispatch(sortChanged({ sortField, isSortAscending })); }, - showHiddenIndicesChanged: (showHiddenIndices) => { - dispatch(showHiddenIndicesChanged({ showHiddenIndices })); - }, toggleChanged: (toggleName, toggleValue) => { dispatch(toggleChanged({ toggleName, toggleValue })); }, @@ -80,10 +75,12 @@ const mapDispatchToProps = (dispatch) => { loadIndices: () => { dispatch(loadIndices()); }, - reloadIndices: () => { - dispatch(reloadIndices()); + reloadIndices: (indexNames) => { + dispatch(reloadIndices(indexNames)); }, }; }; -export const IndexTable = connect(mapStateToProps, mapDispatchToProps)(PresentationComponent); +export const IndexTable = withRouter( + connect(mapStateToProps, mapDispatchToProps)(PresentationComponent) +); diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.js b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.js index 0d005b2864863..f33d486520a29 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.js +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_table/index_table.js @@ -8,7 +8,7 @@ import React, { Component, Fragment } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { Route } from 'react-router-dom'; -import { parse } from 'query-string'; +import qs from 'query-string'; import { EuiButton, @@ -66,6 +66,9 @@ const HEADERS = { size: i18n.translate('xpack.idxMgmt.indexTable.headers.storageSizeHeader', { defaultMessage: 'Storage size', }), + data_stream: i18n.translate('xpack.idxMgmt.indexTable.headers.dataStreamHeader', { + defaultMessage: 'Data stream', + }), }; export class IndexTable extends Component { @@ -97,17 +100,14 @@ export class IndexTable extends Component { componentDidMount() { this.props.loadIndices(); - this.interval = setInterval(this.props.reloadIndices, REFRESH_RATE_INDEX_LIST); - const { - filterChanged, - filterFromURI, - showHiddenIndicesChanged, - showHiddenIndices, - location, - } = this.props; - - if (filterFromURI) { - const decodedFilter = decodeURIComponent(filterFromURI); + this.interval = setInterval( + () => this.props.reloadIndices(this.props.indices.map((i) => i.name)), + REFRESH_RATE_INDEX_LIST + ); + const { location, filterChanged } = this.props; + const { filter } = qs.parse((location && location.search) || ''); + if (filter) { + const decodedFilter = decodeURIComponent(filter); try { const filter = EuiSearchBar.Query.parse(decodedFilter); @@ -116,17 +116,30 @@ export class IndexTable extends Component { this.setState({ filterError: e }); } } - - // Check if the we have the includeHidden query param - const { includeHidden } = parse((location && location.search) || ''); - const nextValue = includeHidden === 'true'; - if (nextValue !== showHiddenIndices) { - showHiddenIndicesChanged(nextValue); - } } componentWillUnmount() { clearInterval(this.interval); } + + readURLParams() { + const { location } = this.props; + const { includeHiddenIndices } = qs.parse((location && location.search) || ''); + return { + includeHiddenIndices: includeHiddenIndices === 'true', + }; + } + + setIncludeHiddenParam(hidden) { + const { pathname, search } = this.props.location; + const params = qs.parse(search); + if (hidden) { + params.includeHiddenIndices = 'true'; + } else { + delete params.includeHiddenIndices; + } + this.props.history.push(pathname + '?' + qs.stringify(params)); + } + onSort = (column) => { const { sortField, isSortAscending, sortChanged } = this.props; @@ -416,8 +429,6 @@ export class IndexTable extends Component { render() { const { filter, - showHiddenIndices, - showHiddenIndicesChanged, indices, loadIndices, indicesLoading, @@ -426,6 +437,8 @@ export class IndexTable extends Component { pager, } = this.props; + const { includeHiddenIndices } = this.readURLParams(); + let emptyState; if (indicesLoading) { @@ -477,8 +490,8 @@ export class IndexTable extends Component { showHiddenIndicesChanged(event.target.checked)} + checked={includeHiddenIndices} + onChange={(event) => this.setIncludeHiddenParam(event.target.checked)} label={ { + filters: Filters; + onChange(filters: Filters): void; +} + +export type Filters = { + [key in T]: Filter; +}; + +export function FilterListButton({ onChange, filters }: Props) { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + const activeFilters = Object.values(filters).filter((v) => (v as Filter).checked === 'on'); + + const onButtonClick = () => { + setIsPopoverOpen(!isPopoverOpen); + }; + + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const toggleFilter = (filter: T) => { + const previousValue = filters[filter].checked; + onChange({ + ...filters, + [filter]: { + ...filters[filter], + checked: previousValue === 'on' ? 'off' : 'on', + }, + }); + }; + + const button = ( + 0} + numActiveFilters={activeFilters.length} + data-test-subj="viewButton" + > + + + ); + + return ( + +
+ {Object.entries(filters).map(([filter, item], index) => ( + toggleFilter(filter as T)} + data-test-subj="filterItem" + > + {(item as Filter).name} + + ))} +
+
+ ); +} diff --git a/x-pack/plugins/siem/server/client/index.ts b/x-pack/plugins/index_management/public/application/sections/home/template_list/components/index.ts similarity index 73% rename from x-pack/plugins/siem/server/client/index.ts rename to x-pack/plugins/index_management/public/application/sections/home/template_list/components/index.ts index 97aec4d85aff9..dcaba319bb21a 100644 --- a/x-pack/plugins/siem/server/client/index.ts +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/components/index.ts @@ -4,5 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -export { SiemClient } from './client'; -export { SiemClientFactory } from './factory'; +export * from './filter_list_button'; +export * from './template_content_indicator'; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/components/template_content_indicator.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/components/template_content_indicator.tsx new file mode 100644 index 0000000000000..78e33d7940bd4 --- /dev/null +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/components/template_content_indicator.tsx @@ -0,0 +1,51 @@ +/* + * 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 from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiBadge, EuiToolTip } from '@elastic/eui'; + +interface Props { + mappings: boolean; + settings: boolean; + aliases: boolean; +} + +const texts = { + settings: i18n.translate('xpack.idxMgmt.templateContentIndicator.indexSettingsTooltipLabel', { + defaultMessage: 'Index settings', + }), + mappings: i18n.translate('xpack.idxMgmt.templateContentIndicator.mappingsTooltipLabel', { + defaultMessage: 'Mappings', + }), + aliases: i18n.translate('xpack.idxMgmt.templateContentIndicator.aliasesTooltipLabel', { + defaultMessage: 'Aliases', + }), +}; + +export const TemplateContentIndicator = ({ mappings, settings, aliases }: Props) => { + const getColor = (flag: boolean) => (flag ? 'primary' : 'hollow'); + + return ( + <> + + <> + M +   + + + + <> + S +   + + + + A + + + ); +}; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_details/index.ts b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_details/index.ts new file mode 100644 index 0000000000000..519120b559e7b --- /dev/null +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_details/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { LegacyTemplateDetails } from './template_details'; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_details/template_details.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_details/template_details.tsx new file mode 100644 index 0000000000000..ec2956973d4f6 --- /dev/null +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_details/template_details.tsx @@ -0,0 +1,327 @@ +/* + * 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, { Fragment, useState } from 'react'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; +import { + EuiCallOut, + EuiFlyout, + EuiFlyoutHeader, + EuiTitle, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlexGroup, + EuiFlexItem, + EuiButtonEmpty, + EuiTab, + EuiTabs, + EuiSpacer, + EuiPopover, + EuiButton, + EuiContextMenu, +} from '@elastic/eui'; +import { + UIM_TEMPLATE_DETAIL_PANEL_MAPPINGS_TAB, + UIM_TEMPLATE_DETAIL_PANEL_SUMMARY_TAB, + UIM_TEMPLATE_DETAIL_PANEL_SETTINGS_TAB, + UIM_TEMPLATE_DETAIL_PANEL_ALIASES_TAB, +} from '../../../../../../../common/constants'; +import { TemplateDeserialized } from '../../../../../../../common'; +import { + TemplateDeleteModal, + SectionLoading, + SectionError, + Error, +} from '../../../../../components'; +import { useLoadIndexTemplate } from '../../../../../services/api'; +import { decodePath } from '../../../../../services/routing'; +import { SendRequestResponse } from '../../../../../../shared_imports'; +import { useServices } from '../../../../../app_context'; +import { TabSummary, TabMappings, TabSettings, TabAliases } from '../../template_details/tabs'; + +interface Props { + template: { name: string; isLegacy?: boolean }; + onClose: () => void; + editTemplate: (name: string, isLegacy?: boolean) => void; + cloneTemplate: (name: string, isLegacy?: boolean) => void; + reload: () => Promise; +} + +const SUMMARY_TAB_ID = 'summary'; +const MAPPINGS_TAB_ID = 'mappings'; +const ALIASES_TAB_ID = 'aliases'; +const SETTINGS_TAB_ID = 'settings'; + +const TABS = [ + { + id: SUMMARY_TAB_ID, + name: i18n.translate('xpack.idxMgmt.legacyTemplateDetails.summaryTabTitle', { + defaultMessage: 'Summary', + }), + }, + { + id: SETTINGS_TAB_ID, + name: i18n.translate('xpack.idxMgmt.legacyTemplateDetails.settingsTabTitle', { + defaultMessage: 'Settings', + }), + }, + { + id: MAPPINGS_TAB_ID, + name: i18n.translate('xpack.idxMgmt.legacyTemplateDetails.mappingsTabTitle', { + defaultMessage: 'Mappings', + }), + }, + { + id: ALIASES_TAB_ID, + name: i18n.translate('xpack.idxMgmt.legacyTemplateDetails.aliasesTabTitle', { + defaultMessage: 'Aliases', + }), + }, +]; + +const tabToComponentMap: { + [key: string]: React.FunctionComponent<{ templateDetails: TemplateDeserialized }>; +} = { + [SUMMARY_TAB_ID]: TabSummary, + [SETTINGS_TAB_ID]: TabSettings, + [MAPPINGS_TAB_ID]: TabMappings, + [ALIASES_TAB_ID]: TabAliases, +}; + +const tabToUiMetricMap: { [key: string]: string } = { + [SUMMARY_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_SUMMARY_TAB, + [SETTINGS_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_SETTINGS_TAB, + [MAPPINGS_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_MAPPINGS_TAB, + [ALIASES_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_ALIASES_TAB, +}; + +export const LegacyTemplateDetails: React.FunctionComponent = ({ + template: { name: templateName, isLegacy }, + onClose, + editTemplate, + cloneTemplate, + reload, +}) => { + const { uiMetricService } = useServices(); + const decodedTemplateName = decodePath(templateName); + const { error, data: templateDetails, isLoading } = useLoadIndexTemplate( + decodedTemplateName, + isLegacy + ); + const isManaged = templateDetails?._kbnMeta.isManaged ?? false; + const [templateToDelete, setTemplateToDelete] = useState< + Array<{ name: string; isLegacy?: boolean }> + >([]); + const [activeTab, setActiveTab] = useState(SUMMARY_TAB_ID); + const [isPopoverOpen, setIsPopOverOpen] = useState(false); + + let content; + + if (isLoading) { + content = ( + + + + ); + } else if (error) { + content = ( + + } + error={error as Error} + data-test-subj="sectionError" + /> + ); + } else if (templateDetails) { + const Content = tabToComponentMap[activeTab]; + const managedTemplateCallout = isManaged ? ( + + + } + color="primary" + size="s" + > + + + + + ) : null; + + content = ( + + {managedTemplateCallout} + + + {TABS.map((tab) => ( + { + uiMetricService.trackMetric('click', tabToUiMetricMap[tab.id]); + setActiveTab(tab.id); + }} + isSelected={tab.id === activeTab} + key={tab.id} + data-test-subj="tab" + > + {tab.name} + + ))} + + + + + + + ); + } + + return ( + + {templateToDelete && templateToDelete.length > 0 ? ( + { + if (data && data.hasDeletedTemplates) { + reload(); + } else { + setTemplateToDelete([]); + } + onClose(); + }} + templatesToDelete={templateToDelete} + /> + ) : null} + + + + +

+ {decodedTemplateName} +

+
+
+ + {content} + + + + + + + + + {templateDetails && ( + + {/* Manage templates context menu */} + setIsPopOverOpen((prev) => !prev)} + > + + + } + isOpen={isPopoverOpen} + closePopover={() => setIsPopOverOpen(false)} + panelPaddingSize="none" + withTitle + anchorPosition="rightUp" + repositionOnScroll + > + editTemplate(templateName, isLegacy), + disabled: isManaged, + }, + { + name: i18n.translate( + 'xpack.idxMgmt.legacyTemplateDetails.cloneButtonLabel', + { + defaultMessage: 'Clone', + } + ), + icon: 'copy', + onClick: () => cloneTemplate(templateName, isLegacy), + }, + { + name: i18n.translate( + 'xpack.idxMgmt.legacyTemplateDetails.deleteButtonLabel', + { + defaultMessage: 'Delete', + } + ), + icon: 'trash', + onClick: () => + setTemplateToDelete([{ name: decodedTemplateName, isLegacy }]), + disabled: isManaged, + }, + ], + }, + ]} + /> + + + )} + + +
+
+ ); +}; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_table/index.ts b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_table/index.ts new file mode 100644 index 0000000000000..a8499df45ce27 --- /dev/null +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_table/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { LegacyTemplateTable } from './template_table'; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_table/template_table.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_table/template_table.tsx new file mode 100644 index 0000000000000..92fedd5d68f00 --- /dev/null +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/legacy_templates/template_table/template_table.tsx @@ -0,0 +1,304 @@ +/* + * 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, { useState, Fragment } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { EuiInMemoryTable, EuiIcon, EuiButton, EuiLink, EuiBasicTableColumn } from '@elastic/eui'; +import { ScopedHistory } from 'kibana/public'; +import { reactRouterNavigate } from '../../../../../../../../../../src/plugins/kibana_react/public'; +import { TemplateListItem } from '../../../../../../../common'; +import { UIM_TEMPLATE_SHOW_DETAILS_CLICK } from '../../../../../../../common/constants'; +import { TemplateDeleteModal } from '../../../../../components'; +import { useServices } from '../../../../../app_context'; +import { SendRequestResponse } from '../../../../../../shared_imports'; + +interface Props { + templates: TemplateListItem[]; + reload: () => Promise; + editTemplate: (name: string, isLegacy?: boolean) => void; + cloneTemplate: (name: string, isLegacy?: boolean) => void; + history: ScopedHistory; +} + +export const LegacyTemplateTable: React.FunctionComponent = ({ + templates, + reload, + editTemplate, + cloneTemplate, + history, +}) => { + const { uiMetricService } = useServices(); + const [selection, setSelection] = useState([]); + const [templatesToDelete, setTemplatesToDelete] = useState< + Array<{ name: string; isLegacy?: boolean }> + >([]); + + const columns: Array> = [ + { + field: 'name', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.nameColumnTitle', { + defaultMessage: 'Name', + }), + truncateText: true, + sortable: true, + render: (name: TemplateListItem['name'], item: TemplateListItem) => { + return ( + /* eslint-disable-next-line @elastic/eui/href-or-on-click */ + uiMetricService.trackMetric('click', UIM_TEMPLATE_SHOW_DETAILS_CLICK) + )} + data-test-subj="templateDetailsLink" + > + {name} + + ); + }, + }, + { + field: 'indexPatterns', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.indexPatternsColumnTitle', { + defaultMessage: 'Index patterns', + }), + truncateText: true, + sortable: true, + render: (indexPatterns: string[]) => {indexPatterns.join(', ')}, + }, + { + field: 'ilmPolicy', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.ilmPolicyColumnTitle', { + defaultMessage: 'ILM policy', + }), + truncateText: true, + sortable: true, + render: (ilmPolicy: { name: string }) => + ilmPolicy && ilmPolicy.name ? ( + + {ilmPolicy.name} + + ) : null, + }, + { + field: 'order', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.orderColumnTitle', { + defaultMessage: 'Order', + }), + truncateText: true, + sortable: true, + }, + { + field: 'hasMappings', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.mappingsColumnTitle', { + defaultMessage: 'Mappings', + }), + truncateText: true, + sortable: true, + render: (hasMappings: boolean) => (hasMappings ? : null), + }, + { + field: 'hasSettings', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.settingsColumnTitle', { + defaultMessage: 'Settings', + }), + truncateText: true, + sortable: true, + render: (hasSettings: boolean) => (hasSettings ? : null), + }, + { + field: 'hasAliases', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.aliasesColumnTitle', { + defaultMessage: 'Aliases', + }), + truncateText: true, + sortable: true, + render: (hasAliases: boolean) => (hasAliases ? : null), + }, + { + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.actionColumnTitle', { + defaultMessage: 'Actions', + }), + actions: [ + { + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.actionEditText', { + defaultMessage: 'Edit', + }), + isPrimary: true, + description: i18n.translate( + 'xpack.idxMgmt.templateList.legacyTable.actionEditDecription', + { + defaultMessage: 'Edit this template', + } + ), + icon: 'pencil', + type: 'icon', + onClick: ({ name, _kbnMeta: { isLegacy } }: TemplateListItem) => { + editTemplate(name, isLegacy); + }, + enabled: ({ _kbnMeta: { isManaged } }: TemplateListItem) => !isManaged, + }, + { + type: 'icon', + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.actionCloneTitle', { + defaultMessage: 'Clone', + }), + description: i18n.translate( + 'xpack.idxMgmt.templateList.legacyTable.actionCloneDescription', + { + defaultMessage: 'Clone this template', + } + ), + icon: 'copy', + onClick: ({ name, _kbnMeta: { isLegacy } }: TemplateListItem) => { + cloneTemplate(name, isLegacy); + }, + }, + { + name: i18n.translate('xpack.idxMgmt.templateList.legacyTable.actionDeleteText', { + defaultMessage: 'Delete', + }), + description: i18n.translate( + 'xpack.idxMgmt.templateList.legacyTable.actionDeleteDecription', + { + defaultMessage: 'Delete this template', + } + ), + icon: 'trash', + color: 'danger', + type: 'icon', + onClick: ({ name, _kbnMeta: { isLegacy } }: TemplateListItem) => { + setTemplatesToDelete([{ name, isLegacy }]); + }, + isPrimary: true, + enabled: ({ _kbnMeta: { isManaged } }: TemplateListItem) => !isManaged, + }, + ], + }, + ]; + + const pagination = { + initialPageSize: 20, + pageSizeOptions: [10, 20, 50], + }; + + const sorting = { + sort: { + field: 'name', + direction: 'asc', + }, + } as const; + + const selectionConfig = { + onSelectionChange: setSelection, + selectable: ({ _kbnMeta: { isManaged } }: TemplateListItem) => !isManaged, + selectableMessage: (selectable: boolean) => { + if (!selectable) { + return i18n.translate( + 'xpack.idxMgmt.templateList.legacyTable.deleteManagedTemplateTooltip', + { + defaultMessage: 'You cannot delete a managed template.', + } + ); + } + return ''; + }, + }; + + const searchConfig = { + box: { + incremental: true, + }, + toolsLeft: + selection.length > 0 ? ( + + setTemplatesToDelete( + selection.map(({ name, _kbnMeta: { isLegacy } }: TemplateListItem) => ({ + name, + isLegacy, + })) + ) + } + color="danger" + > + + + ) : undefined, + toolsRight: [ + + + , + ], + }; + + return ( + + {templatesToDelete && templatesToDelete.length > 0 ? ( + { + if (data && data.hasDeletedTemplates) { + reload(); + } else { + setTemplatesToDelete([]); + } + }} + templatesToDelete={templatesToDelete} + /> + ) : null} + ({ + 'data-test-subj': 'row', + })} + cellProps={() => ({ + 'data-test-subj': 'cell', + })} + data-test-subj="legacyTemplateTable" + message={ + + } + /> + + ); +}; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details.tsx index ed403276af564..9f51f114176fb 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details.tsx @@ -4,313 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment, useState } from 'react'; -import { FormattedMessage } from '@kbn/i18n/react'; -import { i18n } from '@kbn/i18n'; -import { - EuiCallOut, - EuiFlyout, - EuiFlyoutHeader, - EuiTitle, - EuiFlyoutBody, - EuiFlyoutFooter, - EuiFlexGroup, - EuiFlexItem, - EuiButtonEmpty, - EuiTab, - EuiTabs, - EuiSpacer, - EuiPopover, - EuiButton, - EuiContextMenu, -} from '@elastic/eui'; -import { - UIM_TEMPLATE_DETAIL_PANEL_MAPPINGS_TAB, - UIM_TEMPLATE_DETAIL_PANEL_SUMMARY_TAB, - UIM_TEMPLATE_DETAIL_PANEL_SETTINGS_TAB, - UIM_TEMPLATE_DETAIL_PANEL_ALIASES_TAB, -} from '../../../../../../common/constants'; -import { TemplateDeserialized, IndexTemplateFormatVersion } from '../../../../../../common'; -import { TemplateDeleteModal, SectionLoading, SectionError, Error } from '../../../../components'; -import { useLoadIndexTemplate } from '../../../../services/api'; -import { decodePath } from '../../../../services/routing'; -import { SendRequestResponse } from '../../../../../shared_imports'; -import { useServices } from '../../../../app_context'; -import { TabSummary, TabMappings, TabSettings, TabAliases } from './tabs'; +import React from 'react'; -interface Props { - template: { name: string; formatVersion: IndexTemplateFormatVersion }; - onClose: () => void; - editTemplate: (name: string, formatVersion: IndexTemplateFormatVersion) => void; - cloneTemplate: (name: string, formatVersion: IndexTemplateFormatVersion) => void; - reload: () => Promise; -} - -const SUMMARY_TAB_ID = 'summary'; -const MAPPINGS_TAB_ID = 'mappings'; -const ALIASES_TAB_ID = 'aliases'; -const SETTINGS_TAB_ID = 'settings'; - -const TABS = [ - { - id: SUMMARY_TAB_ID, - name: i18n.translate('xpack.idxMgmt.templateDetails.summaryTabTitle', { - defaultMessage: 'Summary', - }), - }, - { - id: SETTINGS_TAB_ID, - name: i18n.translate('xpack.idxMgmt.templateDetails.settingsTabTitle', { - defaultMessage: 'Settings', - }), - }, - { - id: MAPPINGS_TAB_ID, - name: i18n.translate('xpack.idxMgmt.templateDetails.mappingsTabTitle', { - defaultMessage: 'Mappings', - }), - }, - { - id: ALIASES_TAB_ID, - name: i18n.translate('xpack.idxMgmt.templateDetails.aliasesTabTitle', { - defaultMessage: 'Aliases', - }), - }, -]; - -const tabToComponentMap: { - [key: string]: React.FunctionComponent<{ templateDetails: TemplateDeserialized }>; -} = { - [SUMMARY_TAB_ID]: TabSummary, - [SETTINGS_TAB_ID]: TabSettings, - [MAPPINGS_TAB_ID]: TabMappings, - [ALIASES_TAB_ID]: TabAliases, -}; - -const tabToUiMetricMap: { [key: string]: string } = { - [SUMMARY_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_SUMMARY_TAB, - [SETTINGS_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_SETTINGS_TAB, - [MAPPINGS_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_MAPPINGS_TAB, - [ALIASES_TAB_ID]: UIM_TEMPLATE_DETAIL_PANEL_ALIASES_TAB, -}; - -export const TemplateDetails: React.FunctionComponent = ({ - template: { name: templateName, formatVersion }, - onClose, - editTemplate, - cloneTemplate, - reload, -}) => { - const { uiMetricService } = useServices(); - const decodedTemplateName = decodePath(templateName); - const { error, data: templateDetails, isLoading } = useLoadIndexTemplate( - decodedTemplateName, - formatVersion - ); - const isManaged = templateDetails?.isManaged; - const [templateToDelete, setTemplateToDelete] = useState< - Array<{ name: string; formatVersion: IndexTemplateFormatVersion }> - >([]); - const [activeTab, setActiveTab] = useState(SUMMARY_TAB_ID); - const [isPopoverOpen, setIsPopOverOpen] = useState(false); - - let content; - - if (isLoading) { - content = ( - - - - ); - } else if (error) { - content = ( - - } - error={error as Error} - data-test-subj="sectionError" - /> - ); - } else if (templateDetails) { - const Content = tabToComponentMap[activeTab]; - const managedTemplateCallout = isManaged ? ( - - - } - color="primary" - size="s" - > - - - - - ) : null; - - content = ( - - {managedTemplateCallout} - - - {TABS.map((tab) => ( - { - uiMetricService.trackMetric('click', tabToUiMetricMap[tab.id]); - setActiveTab(tab.id); - }} - isSelected={tab.id === activeTab} - key={tab.id} - data-test-subj="tab" - > - {tab.name} - - ))} - - - - - - - ); - } - - return ( - - {templateToDelete && templateToDelete.length > 0 ? ( - { - if (data && data.hasDeletedTemplates) { - reload(); - } else { - setTemplateToDelete([]); - } - onClose(); - }} - templatesToDelete={templateToDelete} - /> - ) : null} - - - - -

- {decodedTemplateName} -

-
-
- - {content} - - - - - - - - - {templateDetails && ( - - {/* Manage templates context menu */} - setIsPopOverOpen((prev) => !prev)} - > - - - } - isOpen={isPopoverOpen} - closePopover={() => setIsPopOverOpen(false)} - panelPaddingSize="none" - withTitle - anchorPosition="rightUp" - repositionOnScroll - > - editTemplate(templateName, formatVersion), - disabled: isManaged, - }, - { - name: i18n.translate('xpack.idxMgmt.templateDetails.cloneButtonLabel', { - defaultMessage: 'Clone', - }), - icon: 'copy', - onClick: () => cloneTemplate(templateName, formatVersion), - }, - { - name: i18n.translate( - 'xpack.idxMgmt.templateDetails.deleteButtonLabel', - { - defaultMessage: 'Delete', - } - ), - icon: 'trash', - onClick: () => - setTemplateToDelete([{ name: decodedTemplateName, formatVersion }]), - disabled: isManaged, - }, - ], - }, - ]} - /> - - - )} - - -
-
- ); +export const TemplateDetails: React.FunctionComponent = () => { + // TODO new (V2) templatte details + return null; }; diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_list.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_list.tsx index db0833ea03233..fc3d5125e3066 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_list.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_list.tsx @@ -7,19 +7,20 @@ import React, { Fragment, useState, useEffect, useMemo } from 'react'; import { RouteComponentProps } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; import { ScopedHistory } from 'kibana/public'; import { EuiEmptyPrompt, EuiSpacer, EuiTitle, EuiText, - EuiSwitch, EuiFlexItem, EuiFlexGroup, + EuiButton, } from '@elastic/eui'; import { UIM_TEMPLATE_LIST_LOAD } from '../../../../../common/constants'; -import { IndexTemplateFormatVersion } from '../../../../../common'; +import { TemplateListItem } from '../../../../../common'; import { SectionError, SectionLoading, Error } from '../../../components'; import { useLoadIndexTemplates } from '../../../services/api'; import { useServices } from '../../../app_context'; @@ -28,14 +29,20 @@ import { getTemplateListLink, getTemplateCloneLink, } from '../../../services/routing'; -import { getFormatVersionFromQueryparams } from '../../../lib/index_templates'; +import { getIsLegacyFromQueryParams } from '../../../lib/index_templates'; import { TemplateTable } from './template_table'; -import { TemplateDetails } from './template_details'; +import { LegacyTemplateTable } from './legacy_templates/template_table'; +import { LegacyTemplateDetails } from './legacy_templates/template_details'; +import { FilterListButton, Filters } from './components'; +type FilterName = 'composable' | 'system'; interface MatchParams { templateName?: string; } +const stripOutSystemTemplates = (templates: TemplateListItem[]): TemplateListItem[] => + templates.filter((template) => !template.name.startsWith('.')); + export const TemplateList: React.FunctionComponent> = ({ match: { params: { templateName }, @@ -44,122 +51,188 @@ export const TemplateList: React.FunctionComponent { const { uiMetricService } = useServices(); - const { error, isLoading, data: templates, sendRequest: reload } = useLoadIndexTemplates(); - const queryParamsFormatVersion = getFormatVersionFromQueryparams(location); + const { error, isLoading, data: allTemplates, sendRequest: reload } = useLoadIndexTemplates(); - let content; + const [filters, setFilters] = useState>({ + composable: { + name: i18n.translate('xpack.idxMgmt.indexTemplatesList.viewComposableTemplateLabel', { + defaultMessage: 'Composable templates', + }), + checked: 'on', + }, + system: { + name: i18n.translate('xpack.idxMgmt.indexTemplatesList.viewSystemTemplateLabel', { + defaultMessage: 'System templates', + }), + checked: 'off', + }, + }); - const [showSystemTemplates, setShowSystemTemplates] = useState(false); + const filteredTemplates = useMemo(() => { + if (!allTemplates) { + return { templates: [], legacyTemplates: [] }; + } - // Filter out system index templates - const filteredTemplates = useMemo( - () => (templates ? templates.filter((template) => !template.name.startsWith('.')) : []), - [templates] - ); + return filters.system.checked === 'on' + ? allTemplates + : { + templates: stripOutSystemTemplates(allTemplates.templates), + legacyTemplates: stripOutSystemTemplates(allTemplates.legacyTemplates), + }; + }, [allTemplates, filters.system.checked]); + + const showComposableTemplateTable = filters.composable.checked === 'on'; + + const selectedTemplate = Boolean(templateName) + ? { + name: templateName!, + isLegacy: getIsLegacyFromQueryParams(location), + } + : null; + + const isLegacyTemplateDetailsVisible = selectedTemplate !== null && selectedTemplate.isLegacy; + const hasTemplates = + allTemplates && (allTemplates.legacyTemplates.length > 0 || allTemplates.templates.length > 0); const closeTemplateDetails = () => { history.push(getTemplateListLink()); }; - const editTemplate = (name: string, formatVersion: IndexTemplateFormatVersion) => { - history.push(getTemplateEditLink(name, formatVersion)); + const editTemplate = (name: string, isLegacy?: boolean) => { + history.push(getTemplateEditLink(name, isLegacy)); }; - const cloneTemplate = (name: string, formatVersion: IndexTemplateFormatVersion) => { - history.push(getTemplateCloneLink(name, formatVersion)); + const cloneTemplate = (name: string, isLegacy?: boolean) => { + history.push(getTemplateCloneLink(name, isLegacy)); }; - // Track component loaded - useEffect(() => { - uiMetricService.trackMetric('loaded', UIM_TEMPLATE_LIST_LOAD); - }, [uiMetricService]); + const renderHeader = () => ( + + + + + + + + + + filters={filters} onChange={setFilters} /> + + + + + + + + ); - if (isLoading) { - content = ( - - - - ); - } else if (error) { - content = ( - + showComposableTemplateTable ? ( + <> + + + + ) : null; + + const renderLegacyTemplatesTable = () => ( + <> + + +

- } - error={error as Error} +

+
+ + - ); - } else if (Array.isArray(templates) && templates.length === 0) { - content = ( - + + ); + + const renderContent = () => { + if (isLoading) { + return ( + + + + ); + } else if (error) { + return ( + - - } - data-test-subj="emptyPrompt" - /> - ); - } else if (Array.isArray(templates) && templates.length > 0) { - content = ( - - - - - - - - - - - setShowSystemTemplates(event.target.checked)} - label={ - - } - /> - - - - + ); + } else if (!hasTemplates) { + return ( + + + + } + data-test-subj="emptyPrompt" /> - - ); - } + ); + } else { + return ( + + {/* Header */} + {renderHeader()} + + {/* Composable index templates table */} + {renderTemplatesTable()} + + {/* Legacy index templates table */} + {renderLegacyTemplatesTable()} + + ); + } + }; + + // Track component loaded + useEffect(() => { + uiMetricService.trackMetric('loaded', UIM_TEMPLATE_LIST_LOAD); + }, [uiMetricService]); return (
- {content} - {templateName && queryParamsFormatVersion !== undefined && ( - Promise; - editTemplate: (name: string, formatVersion: IndexTemplateFormatVersion) => void; - cloneTemplate: (name: string, formatVersion: IndexTemplateFormatVersion) => void; - history: ScopedHistory; } -export const TemplateTable: React.FunctionComponent = ({ - templates, - reload, - editTemplate, - cloneTemplate, - history, -}) => { - const { uiMetricService } = useServices(); - const [selection, setSelection] = useState([]); +export const TemplateTable: React.FunctionComponent = ({ templates, reload }) => { const [templatesToDelete, setTemplatesToDelete] = useState< - Array<{ name: string; formatVersion: IndexTemplateFormatVersion }> + Array<{ name: string; isLegacy?: boolean }> >([]); const columns: Array> = [ @@ -45,24 +31,6 @@ export const TemplateTable: React.FunctionComponent = ({ }), truncateText: true, sortable: true, - render: (name: TemplateListItem['name'], item: TemplateListItem) => { - return ( - /* eslint-disable-next-line @elastic/eui/href-or-on-click */ - uiMetricService.trackMetric('click', UIM_TEMPLATE_SHOW_DETAILS_CLICK) - )} - data-test-subj="templateDetailsLink" - > - {name} - - ); - }, }, { field: 'indexPatterns', @@ -95,90 +63,36 @@ export const TemplateTable: React.FunctionComponent = ({ ) : null, }, { - field: 'order', - name: i18n.translate('xpack.idxMgmt.templateList.table.orderColumnTitle', { - defaultMessage: 'Order', + field: 'composedOf', + name: i18n.translate('xpack.idxMgmt.templateList.table.componentsColumnTitle', { + defaultMessage: 'Components', }), truncateText: true, sortable: true, + render: (composedOf: string[] = []) => {composedOf.join(', ')}, }, { - field: 'hasMappings', - name: i18n.translate('xpack.idxMgmt.templateList.table.mappingsColumnTitle', { - defaultMessage: 'Mappings', + field: 'priority', + name: i18n.translate('xpack.idxMgmt.templateList.table.priorityColumnTitle', { + defaultMessage: 'Priority', }), truncateText: true, sortable: true, - render: (hasMappings: boolean) => (hasMappings ? : null), }, { - field: 'hasSettings', - name: i18n.translate('xpack.idxMgmt.templateList.table.settingsColumnTitle', { - defaultMessage: 'Settings', - }), - truncateText: true, - sortable: true, - render: (hasSettings: boolean) => (hasSettings ? : null), - }, - { - field: 'hasAliases', - name: i18n.translate('xpack.idxMgmt.templateList.table.aliasesColumnTitle', { - defaultMessage: 'Aliases', + field: 'hasMappings', + name: i18n.translate('xpack.idxMgmt.templateList.table.overridesColumnTitle', { + defaultMessage: 'Overrides', }), truncateText: true, - sortable: true, - render: (hasAliases: boolean) => (hasAliases ? : null), - }, - { - name: i18n.translate('xpack.idxMgmt.templateList.table.actionColumnTitle', { - defaultMessage: 'Actions', - }), - actions: [ - { - name: i18n.translate('xpack.idxMgmt.templateList.table.actionEditText', { - defaultMessage: 'Edit', - }), - isPrimary: true, - description: i18n.translate('xpack.idxMgmt.templateList.table.actionEditDecription', { - defaultMessage: 'Edit this template', - }), - icon: 'pencil', - type: 'icon', - onClick: ({ name, _kbnMeta: { formatVersion } }: TemplateListItem) => { - editTemplate(name, formatVersion); - }, - enabled: ({ isManaged }: TemplateListItem) => !isManaged, - }, - { - type: 'icon', - name: i18n.translate('xpack.idxMgmt.templateList.table.actionCloneTitle', { - defaultMessage: 'Clone', - }), - description: i18n.translate('xpack.idxMgmt.templateList.table.actionCloneDescription', { - defaultMessage: 'Clone this template', - }), - icon: 'copy', - onClick: ({ name, _kbnMeta: { formatVersion } }: TemplateListItem) => { - cloneTemplate(name, formatVersion); - }, - }, - { - name: i18n.translate('xpack.idxMgmt.templateList.table.actionDeleteText', { - defaultMessage: 'Delete', - }), - description: i18n.translate('xpack.idxMgmt.templateList.table.actionDeleteDecription', { - defaultMessage: 'Delete this template', - }), - icon: 'trash', - color: 'danger', - type: 'icon', - onClick: ({ name, _kbnMeta: { formatVersion } }: TemplateListItem) => { - setTemplatesToDelete([{ name, formatVersion }]); - }, - isPrimary: true, - enabled: ({ isManaged }: TemplateListItem) => !isManaged, - }, - ], + sortable: false, + render: (_, item) => ( + + ), }, ]; @@ -194,70 +108,10 @@ export const TemplateTable: React.FunctionComponent = ({ }, } as const; - const selectionConfig = { - onSelectionChange: setSelection, - selectable: ({ isManaged }: TemplateListItem) => !isManaged, - selectableMessage: (selectable: boolean) => { - if (!selectable) { - return i18n.translate('xpack.idxMgmt.templateList.table.deleteManagedTemplateTooltip', { - defaultMessage: 'You cannot delete a managed template.', - }); - } - return ''; - }, - }; - const searchConfig = { box: { incremental: true, }, - toolsLeft: - selection.length > 0 ? ( - - setTemplatesToDelete( - selection.map(({ name, _kbnMeta: { formatVersion } }: TemplateListItem) => ({ - name, - formatVersion, - })) - ) - } - color="danger" - > - - - ) : undefined, - toolsRight: [ - - - , - - - , - ], }; return ( @@ -280,8 +134,7 @@ export const TemplateTable: React.FunctionComponent = ({ columns={columns} search={searchConfig} sorting={sorting} - isSelectable={true} - selection={selectionConfig} + isSelectable={false} pagination={pagination} rowProps={() => ({ 'data-test-subj': 'row', diff --git a/x-pack/plugins/index_management/public/application/sections/template_clone/template_clone.tsx b/x-pack/plugins/index_management/public/application/sections/template_clone/template_clone.tsx index b69e441feb176..8bdd230f89952 100644 --- a/x-pack/plugins/index_management/public/application/sections/template_clone/template_clone.tsx +++ b/x-pack/plugins/index_management/public/application/sections/template_clone/template_clone.tsx @@ -8,12 +8,12 @@ import { RouteComponentProps } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiPageBody, EuiPageContent, EuiSpacer, EuiTitle } from '@elastic/eui'; -import { TemplateDeserialized, DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from '../../../../common'; +import { TemplateDeserialized } from '../../../../common'; import { TemplateForm, SectionLoading, SectionError, Error } from '../../components'; import { breadcrumbService } from '../../services/breadcrumbs'; import { decodePath, getTemplateDetailsLink } from '../../services/routing'; import { saveTemplate, useLoadIndexTemplate } from '../../services/api'; -import { getFormatVersionFromQueryparams } from '../../lib/index_templates'; +import { getIsLegacyFromQueryParams } from '../../lib/index_templates'; interface MatchParams { name: string; @@ -27,14 +27,13 @@ export const TemplateClone: React.FunctionComponent { const decodedTemplateName = decodePath(name); - const formatVersion = - getFormatVersionFromQueryparams(location) ?? DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT; + const isLegacy = getIsLegacyFromQueryParams(location); const [isSaving, setIsSaving] = useState(false); const [saveError, setSaveError] = useState(null); const { error: templateToCloneError, data: templateToClone, isLoading } = useLoadIndexTemplate( decodedTemplateName, - formatVersion + isLegacy ); const onSave = async (template: TemplateDeserialized) => { @@ -52,7 +51,7 @@ export const TemplateClone: React.FunctionComponent { diff --git a/x-pack/plugins/index_management/public/application/sections/template_create/template_create.tsx b/x-pack/plugins/index_management/public/application/sections/template_create/template_create.tsx index 27341685f3dc0..f567b9835d53d 100644 --- a/x-pack/plugins/index_management/public/application/sections/template_create/template_create.tsx +++ b/x-pack/plugins/index_management/public/application/sections/template_create/template_create.tsx @@ -33,7 +33,7 @@ export const TemplateCreate: React.FunctionComponent = ({ h return; } - history.push(getTemplateDetailsLink(name, template._kbnMeta.formatVersion)); + history.push(getTemplateDetailsLink(name, template._kbnMeta.isLegacy)); }; const clearSaveError = () => { diff --git a/x-pack/plugins/index_management/public/application/sections/template_edit/template_edit.tsx b/x-pack/plugins/index_management/public/application/sections/template_edit/template_edit.tsx index 9ad26d0af802d..d3e539989bc96 100644 --- a/x-pack/plugins/index_management/public/application/sections/template_edit/template_edit.tsx +++ b/x-pack/plugins/index_management/public/application/sections/template_edit/template_edit.tsx @@ -8,12 +8,12 @@ import { RouteComponentProps } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiPageBody, EuiPageContent, EuiTitle, EuiSpacer, EuiCallOut } from '@elastic/eui'; -import { TemplateDeserialized, DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from '../../../../common'; +import { TemplateDeserialized } from '../../../../common'; import { breadcrumbService } from '../../services/breadcrumbs'; import { useLoadIndexTemplate, updateTemplate } from '../../services/api'; import { decodePath, getTemplateDetailsLink } from '../../services/routing'; import { SectionLoading, SectionError, TemplateForm, Error } from '../../components'; -import { getFormatVersionFromQueryparams } from '../../lib/index_templates'; +import { getIsLegacyFromQueryParams } from '../../lib/index_templates'; interface MatchParams { name: string; @@ -27,16 +27,12 @@ export const TemplateEdit: React.FunctionComponent { const decodedTemplateName = decodePath(name); - const formatVersion = - getFormatVersionFromQueryparams(location) ?? DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT; + const isLegacy = getIsLegacyFromQueryParams(location); const [isSaving, setIsSaving] = useState(false); const [saveError, setSaveError] = useState(null); - const { error, data: template, isLoading } = useLoadIndexTemplate( - decodedTemplateName, - formatVersion - ); + const { error, data: template, isLoading } = useLoadIndexTemplate(decodedTemplateName, isLegacy); useEffect(() => { breadcrumbService.setBreadcrumbs('templateEdit'); @@ -55,7 +51,7 @@ export const TemplateEdit: React.FunctionComponent { @@ -87,7 +83,10 @@ export const TemplateEdit: React.FunctionComponent ); } else if (template) { - const { name: templateName, isManaged } = template; + const { + name: templateName, + _kbnMeta: { isManaged }, + } = template; const isSystemTemplate = templateName && templateName.startsWith('.'); if (isManaged) { diff --git a/x-pack/plugins/index_management/public/application/services/api.ts b/x-pack/plugins/index_management/public/application/services/api.ts index 181707b3661b4..3961942b83ea3 100644 --- a/x-pack/plugins/index_management/public/application/services/api.ts +++ b/x-pack/plugins/index_management/public/application/services/api.ts @@ -37,11 +37,7 @@ import { TAB_SETTINGS, TAB_MAPPING, TAB_STATS } from '../constants'; import { useRequest, sendRequest } from './use_request'; import { httpService } from './http'; import { UiMetricService } from './ui_metric'; -import { - TemplateDeserialized, - TemplateListItem, - IndexTemplateFormatVersion, -} from '../../../common'; +import { TemplateDeserialized, TemplateListItem } from '../../../common'; import { IndexMgmtMetricsType } from '../../types'; // Temporary hack to provide the uiMetricService instance to this file. @@ -214,17 +210,15 @@ export async function loadIndexData(type: string, indexName: string) { } export function useLoadIndexTemplates() { - return useRequest({ - path: `${API_BASE_PATH}/templates`, + return useRequest<{ templates: TemplateListItem[]; legacyTemplates: TemplateListItem[] }>({ + path: `${API_BASE_PATH}/index-templates`, method: 'get', }); } -export async function deleteTemplates( - templates: Array<{ name: string; formatVersion: IndexTemplateFormatVersion }> -) { +export async function deleteTemplates(templates: Array<{ name: string; isLegacy?: boolean }>) { const result = sendRequest({ - path: `${API_BASE_PATH}/delete-templates`, + path: `${API_BASE_PATH}/delete-index-templates`, method: 'post', body: { templates }, }); @@ -236,23 +230,20 @@ export async function deleteTemplates( return result; } -export function useLoadIndexTemplate( - name: TemplateDeserialized['name'], - formatVersion: IndexTemplateFormatVersion -) { +export function useLoadIndexTemplate(name: TemplateDeserialized['name'], isLegacy?: boolean) { return useRequest({ - path: `${API_BASE_PATH}/templates/${encodeURIComponent(name)}`, + path: `${API_BASE_PATH}/index-templates/${encodeURIComponent(name)}`, method: 'get', query: { - v: formatVersion, + legacy: isLegacy, }, }); } export async function saveTemplate(template: TemplateDeserialized, isClone?: boolean) { const result = await sendRequest({ - path: `${API_BASE_PATH}/templates`, - method: 'put', + path: `${API_BASE_PATH}/index-templates`, + method: 'post', body: JSON.stringify(template), }); @@ -266,7 +257,7 @@ export async function saveTemplate(template: TemplateDeserialized, isClone?: boo export async function updateTemplate(template: TemplateDeserialized) { const { name } = template; const result = await sendRequest({ - path: `${API_BASE_PATH}/templates/${encodeURIComponent(name)}`, + path: `${API_BASE_PATH}/index-templates/${encodeURIComponent(name)}`, method: 'put', body: JSON.stringify(template), }); diff --git a/x-pack/plugins/index_management/public/application/services/routing.ts b/x-pack/plugins/index_management/public/application/services/routing.ts index fe118b1181082..a999c58f5bb42 100644 --- a/x-pack/plugins/index_management/public/application/services/routing.ts +++ b/x-pack/plugins/index_management/public/application/services/routing.ts @@ -3,33 +3,29 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { IndexTemplateFormatVersion } from '../../../common'; -export const getTemplateListLink = () => { - return `/templates`; -}; +export const getTemplateListLink = () => `/templates`; // Need to add some additonal encoding/decoding logic to work with React Router // For background, see: https://github.com/ReactTraining/history/issues/505 -export const getTemplateDetailsLink = ( - name: string, - formatVersion: IndexTemplateFormatVersion, - withHash = false -) => { - const baseUrl = `/templates/${encodeURIComponent(encodeURIComponent(name))}?v=${formatVersion}`; - const url = withHash ? `#${baseUrl}` : baseUrl; +export const getTemplateDetailsLink = (name: string, isLegacy?: boolean, withHash = false) => { + const baseUrl = `/templates/${encodeURIComponent(encodeURIComponent(name))}`; + let url = withHash ? `#${baseUrl}` : baseUrl; + if (isLegacy) { + url = `${url}?legacy=${isLegacy}`; + } return encodeURI(url); }; -export const getTemplateEditLink = (name: string, formatVersion: IndexTemplateFormatVersion) => { +export const getTemplateEditLink = (name: string, isLegacy?: boolean) => { return encodeURI( - `/edit_template/${encodeURIComponent(encodeURIComponent(name))}?v=${formatVersion}` + `/edit_template/${encodeURIComponent(encodeURIComponent(name))}?legacy=${isLegacy === true}` ); }; -export const getTemplateCloneLink = (name: string, formatVersion: IndexTemplateFormatVersion) => { +export const getTemplateCloneLink = (name: string, isLegacy?: boolean) => { return encodeURI( - `/clone_template/${encodeURIComponent(encodeURIComponent(name))}?v=${formatVersion}` + `/clone_template/${encodeURIComponent(encodeURIComponent(name))}?legacy=${isLegacy === true}` ); }; diff --git a/x-pack/plugins/index_management/public/application/services/sort_table.ts b/x-pack/plugins/index_management/public/application/services/sort_table.ts index ed8c5bb146f53..429f2961c4521 100644 --- a/x-pack/plugins/index_management/public/application/services/sort_table.ts +++ b/x-pack/plugins/index_management/public/application/services/sort_table.ts @@ -14,7 +14,8 @@ type SortField = | 'replica' | 'documents' | 'size' - | 'primary_size'; + | 'primary_size' + | 'data_stream'; type Unit = 'kb' | 'mb' | 'gb' | 'tb' | 'pb'; @@ -55,6 +56,7 @@ const sorters = { documents: numericSort('documents'), size: byteSort('size'), primary_size: byteSort('primary_size'), + data_stream: stringSort('data_stream'), }; export const sortTable = (array = [], sortField: SortField, isSortAscending: boolean) => { diff --git a/x-pack/plugins/index_management/public/application/store/actions/reload_indices.js b/x-pack/plugins/index_management/public/application/store/actions/reload_indices.js index 11329ece8f59f..d70e811ff24e5 100644 --- a/x-pack/plugins/index_management/public/application/store/actions/reload_indices.js +++ b/x-pack/plugins/index_management/public/application/store/actions/reload_indices.js @@ -6,15 +6,13 @@ import { createAction } from 'redux-actions'; import { i18n } from '@kbn/i18n'; -import { getIndexNamesForCurrentPage } from '../selectors'; import { reloadIndices as request } from '../../services'; import { loadIndices } from './load_indices'; import { notificationService } from '../../services/notification'; export const reloadIndicesSuccess = createAction('INDEX_MANAGEMENT_RELOAD_INDICES_SUCCESS'); -export const reloadIndices = (indexNames) => async (dispatch, getState) => { +export const reloadIndices = (indexNames) => async (dispatch) => { let indices; - indexNames = indexNames || getIndexNamesForCurrentPage(getState()); try { indices = await request(indexNames); } catch (error) { diff --git a/x-pack/plugins/index_management/public/application/store/actions/table_state.js b/x-pack/plugins/index_management/public/application/store/actions/table_state.js index 70e0de74d0278..2127d8cd36b1e 100644 --- a/x-pack/plugins/index_management/public/application/store/actions/table_state.js +++ b/x-pack/plugins/index_management/public/application/store/actions/table_state.js @@ -17,8 +17,4 @@ export const pageSizeChanged = createAction('INDEX_MANAGEMENT_PAGE_SIZE_CHANGED' export const sortChanged = createAction('INDEX_MANAGEMENT_SORT_CHANGED'); -export const showHiddenIndicesChanged = createAction( - 'INDEX_MANAGEMENT_SHOW_HIDDEN_INDICES_CHANGED' -); - export const toggleChanged = createAction('INDEX_MANAGEMENT_TOGGLE_CHANGED'); diff --git a/x-pack/plugins/index_management/public/application/store/middlewares/sync_url_hash_query_param.js.ts b/x-pack/plugins/index_management/public/application/store/middlewares/sync_url_hash_query_param.js.ts deleted file mode 100644 index 145b4b6c9a8bc..0000000000000 --- a/x-pack/plugins/index_management/public/application/store/middlewares/sync_url_hash_query_param.js.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 * as q from 'query-string'; -import { Middleware } from 'redux'; -// @ts-ignore -import { showHiddenIndicesChanged } from '../actions'; - -export const syncUrlHashQueryParam: Middleware = () => (next) => (action) => { - if (action.type === String(showHiddenIndicesChanged)) { - const { url, query } = q.parseUrl(window.location.hash); - if (action.payload.showHiddenIndices) { - query.includeHidden = 'true'; - } else { - delete query.includeHidden; - } - window.location.hash = url + '?' + q.stringify(query); - } - next(action); -}; diff --git a/x-pack/plugins/index_management/public/application/store/reducers/table_state.js b/x-pack/plugins/index_management/public/application/store/reducers/table_state.js index e90fa72aa62fe..bfb37aa56b129 100644 --- a/x-pack/plugins/index_management/public/application/store/reducers/table_state.js +++ b/x-pack/plugins/index_management/public/application/store/reducers/table_state.js @@ -10,7 +10,6 @@ import { pageChanged, pageSizeChanged, sortChanged, - showHiddenIndicesChanged, toggleChanged, } from '../actions'; @@ -20,7 +19,6 @@ export const defaultTableState = { currentPage: 0, sortField: 'index.name', isSortAscending: true, - showHiddenIndices: false, }; export const tableState = handleActions( @@ -33,14 +31,6 @@ export const tableState = handleActions( currentPage: 0, }; }, - [showHiddenIndicesChanged](state, action) { - const { showHiddenIndices } = action.payload; - - return { - ...state, - showHiddenIndices, - }; - }, [toggleChanged](state, action) { const { toggleName, toggleValue } = action.payload; const toggleNameToVisibleMap = { ...state.toggleNameToVisibleMap }; diff --git a/x-pack/plugins/index_management/public/application/store/selectors/index.d.ts b/x-pack/plugins/index_management/public/application/store/selectors/index.d.ts index 999b11c5d6665..37aaea0e7e3d8 100644 --- a/x-pack/plugins/index_management/public/application/store/selectors/index.d.ts +++ b/x-pack/plugins/index_management/public/application/store/selectors/index.d.ts @@ -6,3 +6,5 @@ import { ExtensionsService } from '../../../services'; export declare function setExtensionsService(extensionsService: ExtensionsService): any; + +export const getFilteredIndices: (state: any, props: any) => any; diff --git a/x-pack/plugins/index_management/public/application/store/selectors/index.js b/x-pack/plugins/index_management/public/application/store/selectors/index.js index c1011680d4da2..c80658581dbee 100644 --- a/x-pack/plugins/index_management/public/application/store/selectors/index.js +++ b/x-pack/plugins/index_management/public/application/store/selectors/index.js @@ -6,6 +6,7 @@ import { Pager, EuiSearchBar } from '@elastic/eui'; import { createSelector } from 'reselect'; +import * as qs from 'query-string'; import { indexStatusLabels } from '../../lib/index_status_labels'; import { sortTable } from '../../services'; @@ -35,6 +36,7 @@ export const getIndexByIndexName = (state, name) => getIndices(state)[name]; export const getFilteredIds = (state) => state.indices.filteredIds; export const getRowStatuses = (state) => state.rowStatus; export const getTableState = (state) => state.tableState; +export const getTableLocationProp = (_, props) => props.location; export const getAllIds = (state) => state.indices.allIds; export const getIndexStatusByIndexName = (state, indexName) => { const indices = getIndices(state); @@ -79,18 +81,24 @@ const filterByToggles = (indices, toggleNameToVisibleMap) => { }); }); }; -const getFilteredIndices = createSelector( + +export const getFilteredIndices = createSelector( getIndices, getAllIds, getTableState, - (indices, allIds, tableState) => { + getTableLocationProp, + (indices, allIds, tableState, tableLocation) => { let indexArray = allIds.map((indexName) => indices[indexName]); indexArray = filterByToggles(indexArray, tableState.toggleNameToVisibleMap); - const systemFilteredIndexes = tableState.showHiddenIndices + const { includeHiddenIndices: includeHiddenParam } = qs.parse(tableLocation.search); + const includeHidden = includeHiddenParam === 'true'; + const filteredIndices = includeHidden ? indexArray - : indexArray.filter((index) => !(index.name + '').startsWith('.') && !index.hidden); + : indexArray.filter((index) => { + return !(index.name + '').startsWith('.') && !index.hidden; + }); const filter = tableState.filter || EuiSearchBar.Query.MATCH_ALL; - return EuiSearchBar.Query.execute(filter, systemFilteredIndexes, { + return EuiSearchBar.Query.execute(filter, filteredIndices, { defaultFields: defaultFilterFields, }); } @@ -133,29 +141,8 @@ export const getPageOfIndices = createSelector( } ); -export const getIndexNamesForCurrentPage = createSelector(getPageOfIndices, (pageOfIndices) => { - return pageOfIndices.map((index) => index.name); -}); - -export const getHasNextPage = createSelector(getPager, (pager) => { - return pager.hasNextPage; -}); - -export const getHasPreviousPage = createSelector(getPager, (pager) => { - return pager.hasPreviousPage; -}); - -export const getCurrentPage = createSelector(getPager, (pager) => { - return pager.currentPage; -}); - export const getFilter = createSelector(getTableState, ({ filter }) => filter); -export const showHiddenIndices = createSelector( - getTableState, - ({ showHiddenIndices }) => showHiddenIndices -); - export const isSortAscending = createSelector( getTableState, ({ isSortAscending }) => isSortAscending diff --git a/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts b/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts new file mode 100644 index 0000000000000..f230ddd18e9eb --- /dev/null +++ b/x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts @@ -0,0 +1,49 @@ +/* + * 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 { ExtensionsService } from '../../../services'; +import { getFilteredIndices, setExtensionsService } from '.'; +// @ts-ignore +import { defaultTableState } from '../reducers/table_state'; + +describe('getFilteredIndices selector', () => { + let extensionService: ExtensionsService; + beforeAll(() => { + extensionService = new ExtensionsService(); + extensionService.setup(); + setExtensionsService(extensionService); + }); + + const state = { + tableState: { ...defaultTableState }, + indices: { + byId: { + test: { name: 'index1', hidden: true }, + anotherTest: { name: 'index2', hidden: false }, + aTest: { name: 'index3' }, + aFinalTest: { name: '.index4' }, + }, + allIds: ['test', 'anotherTest', 'aTest', 'aFinalTest'], + }, + }; + + it('filters out hidden indices', () => { + expect(getFilteredIndices(state, { location: { search: '' } })).toEqual([ + { name: 'index2', hidden: false }, + { name: 'index3' }, + ]); + }); + + it('includes hidden indices', () => { + expect( + getFilteredIndices(state, { location: { search: '?includeHiddenIndices=true' } }) + ).toEqual([ + { name: 'index1', hidden: true }, + { name: 'index2', hidden: false }, + { name: 'index3' }, + { name: '.index4' }, + ]); + }); +}); diff --git a/x-pack/plugins/index_management/public/application/store/store.js b/x-pack/plugins/index_management/public/application/store/store.js index d2f24d50941c6..b189a7cf38938 100644 --- a/x-pack/plugins/index_management/public/application/store/store.js +++ b/x-pack/plugins/index_management/public/application/store/store.js @@ -9,7 +9,6 @@ import thunk from 'redux-thunk'; import { defaultTableState } from './reducers/table_state'; import { getReducer } from './reducers/'; -import { syncUrlHashQueryParam } from './middlewares'; export function indexManagementStore(services) { const toggleNameToVisibleMap = {}; @@ -17,7 +16,7 @@ export function indexManagementStore(services) { toggleNameToVisibleMap[toggleExtension.name] = false; }); const initialState = { tableState: { ...defaultTableState, toggleNameToVisibleMap } }; - const enhancers = [applyMiddleware(thunk, syncUrlHashQueryParam)]; + const enhancers = [applyMiddleware(thunk)]; window.__REDUX_DEVTOOLS_EXTENSION__ && enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__()); return createStore(getReducer(services), initialState, compose(...enhancers)); diff --git a/x-pack/plugins/index_management/server/lib/fetch_indices.ts b/x-pack/plugins/index_management/server/lib/fetch_indices.ts index b52a63a414967..ae10629e069e8 100644 --- a/x-pack/plugins/index_management/server/lib/fetch_indices.ts +++ b/x-pack/plugins/index_management/server/lib/fetch_indices.ts @@ -23,6 +23,7 @@ interface Hit { interface IndexInfo { aliases: { [aliasName: string]: unknown }; mappings: unknown; + data_stream?: string; settings: { index: { hidden: 'true' | 'false'; @@ -87,6 +88,7 @@ async function fetchIndicesCall( isFrozen: hit.sth === 'true', // sth value coming back as a string from ES aliases: aliases.length ? aliases : 'none', hidden: index.settings.index.hidden === 'true', + data_stream: index.data_stream, }; }); } diff --git a/x-pack/plugins/index_management/server/routes/api/templates/register_create_route.ts b/x-pack/plugins/index_management/server/routes/api/templates/register_create_route.ts index 1409fa8af2ceb..26e74847e3e05 100644 --- a/x-pack/plugins/index_management/server/routes/api/templates/register_create_route.ts +++ b/x-pack/plugins/index_management/server/routes/api/templates/register_create_route.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { TemplateDeserialized } from '../../../../common'; -import { serializeV1Template } from '../../../../common/lib'; +import { serializeLegacyTemplate } from '../../../../common/lib'; import { RouteDependencies } from '../../../types'; import { addBasePath } from '../index'; import { templateSchema } from './validate_schemas'; @@ -15,35 +15,26 @@ import { templateSchema } from './validate_schemas'; const bodySchema = templateSchema; export function registerCreateRoute({ router, license, lib }: RouteDependencies) { - router.put( - { path: addBasePath('/templates'), validate: { body: bodySchema } }, + router.post( + { path: addBasePath('/index-templates'), validate: { body: bodySchema } }, license.guardApiRoute(async (ctx, req, res) => { const { callAsCurrentUser } = ctx.core.elasticsearch.legacy.client; const template = req.body as TemplateDeserialized; const { - _kbnMeta: { formatVersion }, + _kbnMeta: { isLegacy }, } = template; - if (formatVersion !== 1) { - return res.badRequest({ body: 'Only index template version 1 can be created.' }); + if (!isLegacy) { + return res.badRequest({ body: 'Only legacy index templates can be created.' }); } - // For now we format to V1 index templates. - // When the V2 API is ready we will only create V2 template format. - const serializedTemplate = serializeV1Template(template); - - const { - name, - order, - index_patterns, - version, - settings, - mappings, - aliases, - } = serializedTemplate; + const serializedTemplate = serializeLegacyTemplate(template); + const { order, index_patterns, version, settings, mappings, aliases } = serializedTemplate; // Check that template with the same name doesn't already exist - const templateExists = await callAsCurrentUser('indices.existsTemplate', { name }); + const templateExists = await callAsCurrentUser('indices.existsTemplate', { + name: template.name, + }); if (templateExists) { return res.conflict({ @@ -51,7 +42,7 @@ export function registerCreateRoute({ router, license, lib }: RouteDependencies) i18n.translate('xpack.idxMgmt.createRoute.duplicateTemplateIdErrorMessage', { defaultMessage: "There is already a template with name '{name}'.", values: { - name, + name: template.name, }, }) ), @@ -61,7 +52,7 @@ export function registerCreateRoute({ router, license, lib }: RouteDependencies) try { // Otherwise create new index template const response = await callAsCurrentUser('indices.putTemplate', { - name, + name: template.name, order, body: { index_patterns, diff --git a/x-pack/plugins/index_management/server/routes/api/templates/register_delete_route.ts b/x-pack/plugins/index_management/server/routes/api/templates/register_delete_route.ts index 3dc31482b4947..b5cc00ad6d8cc 100644 --- a/x-pack/plugins/index_management/server/routes/api/templates/register_delete_route.ts +++ b/x-pack/plugins/index_management/server/routes/api/templates/register_delete_route.ts @@ -16,7 +16,7 @@ const bodySchema = schema.object({ templates: schema.arrayOf( schema.object({ name: schema.string(), - formatVersion: schema.oneOf([schema.literal(1), schema.literal(2)]), + isLegacy: schema.maybe(schema.boolean()), }) ), }); @@ -24,7 +24,7 @@ const bodySchema = schema.object({ export function registerDeleteRoute({ router, license }: RouteDependencies) { router.post( { - path: addBasePath('/delete-templates'), + path: addBasePath('/delete-index-templates'), validate: { body: bodySchema }, }, license.guardApiRoute(async (ctx, req, res) => { @@ -35,10 +35,10 @@ export function registerDeleteRoute({ router, license }: RouteDependencies) { }; await Promise.all( - templates.map(async ({ name, formatVersion }) => { + templates.map(async ({ name, isLegacy }) => { try { - if (formatVersion !== 1) { - return res.badRequest({ body: 'Only index template version 1 can be deleted.' }); + if (!isLegacy) { + return res.badRequest({ body: 'Only legacy index template can be deleted.' }); } await ctx.core.elasticsearch.legacy.client.callAsCurrentUser('indices.deleteTemplate', { diff --git a/x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts b/x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts index b18a8d88d3a4a..12ec005258a62 100644 --- a/x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts +++ b/x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts @@ -5,20 +5,38 @@ */ import { schema, TypeOf } from '@kbn/config-schema'; -import { deserializeV1Template, deserializeTemplateList } from '../../../../common/lib'; +import { + deserializeLegacyTemplate, + deserializeLegacyTemplateList, + deserializeTemplateList, +} from '../../../../common/lib'; import { getManagedTemplatePrefix } from '../../../lib/get_managed_templates'; import { RouteDependencies } from '../../../types'; import { addBasePath } from '../index'; export function registerGetAllRoute({ router, license }: RouteDependencies) { router.get( - { path: addBasePath('/templates'), validate: false }, + { path: addBasePath('/index-templates'), validate: false }, license.guardApiRoute(async (ctx, req, res) => { const { callAsCurrentUser } = ctx.core.elasticsearch.legacy.client; const managedTemplatePrefix = await getManagedTemplatePrefix(callAsCurrentUser); - const indexTemplatesByName = await callAsCurrentUser('indices.getTemplate'); - const body = deserializeTemplateList(indexTemplatesByName, managedTemplatePrefix); + const _legacyTemplates = await callAsCurrentUser('indices.getTemplate'); + const { index_templates: _templates } = await callAsCurrentUser('transport.request', { + path: '_index_template', + method: 'GET', + }); + + const legacyTemplates = deserializeLegacyTemplateList( + _legacyTemplates, + managedTemplatePrefix + ); + const templates = deserializeTemplateList(_templates, managedTemplatePrefix); + + const body = { + templates, + legacyTemplates, + }; return res.ok({ body }); }) @@ -31,22 +49,22 @@ const paramsSchema = schema.object({ // Require the template format version (V1 or V2) to be provided as Query param const querySchema = schema.object({ - v: schema.oneOf([schema.literal('1'), schema.literal('2')]), + legacy: schema.maybe(schema.boolean()), }); export function registerGetOneRoute({ router, license, lib }: RouteDependencies) { router.get( { - path: addBasePath('/templates/{name}'), + path: addBasePath('/index-templates/{name}'), validate: { params: paramsSchema, query: querySchema }, }, license.guardApiRoute(async (ctx, req, res) => { - const { name } = req.params as typeof paramsSchema.type; + const { name } = req.params as TypeOf; const { callAsCurrentUser } = ctx.core.elasticsearch.legacy.client; - const { v: version } = req.query as TypeOf; + const { legacy } = req.query as TypeOf; - if (version !== '1') { + if (!legacy) { return res.badRequest({ body: 'Only index template version 1 can be fetched.' }); } @@ -56,7 +74,7 @@ export function registerGetOneRoute({ router, license, lib }: RouteDependencies) if (indexTemplateByName[name]) { return res.ok({ - body: deserializeV1Template( + body: deserializeLegacyTemplate( { ...indexTemplateByName[name], name }, managedTemplatePrefix ), diff --git a/x-pack/plugins/index_management/server/routes/api/templates/register_update_route.ts b/x-pack/plugins/index_management/server/routes/api/templates/register_update_route.ts index 81d7aa1b4978c..5b2a0d8722e46 100644 --- a/x-pack/plugins/index_management/server/routes/api/templates/register_update_route.ts +++ b/x-pack/plugins/index_management/server/routes/api/templates/register_update_route.ts @@ -6,7 +6,7 @@ import { schema } from '@kbn/config-schema'; import { TemplateDeserialized } from '../../../../common'; -import { serializeV1Template } from '../../../../common/lib'; +import { serializeLegacyTemplate } from '../../../../common/lib'; import { RouteDependencies } from '../../../types'; import { addBasePath } from '../index'; import { templateSchema } from './validate_schemas'; @@ -19,7 +19,7 @@ const paramsSchema = schema.object({ export function registerUpdateRoute({ router, license, lib }: RouteDependencies) { router.put( { - path: addBasePath('/templates/{name}'), + path: addBasePath('/index-templates/{name}'), validate: { body: bodySchema, params: paramsSchema }, }, license.guardApiRoute(async (ctx, req, res) => { @@ -27,14 +27,14 @@ export function registerUpdateRoute({ router, license, lib }: RouteDependencies) const { name } = req.params as typeof paramsSchema.type; const template = req.body as TemplateDeserialized; const { - _kbnMeta: { formatVersion }, + _kbnMeta: { isLegacy }, } = template; - if (formatVersion !== 1) { - return res.badRequest({ body: 'Only index template version 1 can be edited.' }); + if (!isLegacy) { + return res.badRequest({ body: 'Only legacy index template can be edited.' }); } - const serializedTemplate = serializeV1Template(template); + const serializedTemplate = serializeLegacyTemplate(template); const { order, index_patterns, version, settings, mappings, aliases } = serializedTemplate; diff --git a/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts b/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts index 491a686f81177..6ab28e9021123 100644 --- a/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts +++ b/x-pack/plugins/index_management/server/routes/api/templates/validate_schemas.ts @@ -24,8 +24,8 @@ export const templateSchema = schema.object({ rollover_alias: schema.maybe(schema.string()), }) ), - isManaged: schema.maybe(schema.boolean()), _kbnMeta: schema.object({ - formatVersion: schema.oneOf([schema.literal(1), schema.literal(2)]), + isManaged: schema.maybe(schema.boolean()), + isLegacy: schema.maybe(schema.boolean()), }), }); diff --git a/x-pack/plugins/index_management/server/types.ts b/x-pack/plugins/index_management/server/types.ts index b7b1c57b6f04e..b3fb546281f1e 100644 --- a/x-pack/plugins/index_management/server/types.ts +++ b/x-pack/plugins/index_management/server/types.ts @@ -32,6 +32,7 @@ export interface Index { size: any; isFrozen: boolean; aliases: string | string[]; + data_stream?: string; [key: string]: any; } diff --git a/x-pack/plugins/index_management/test/fixtures/template.ts b/x-pack/plugins/index_management/test/fixtures/template.ts index 055c32d5cd5e4..e2e93bfb365d4 100644 --- a/x-pack/plugins/index_management/test/fixtures/template.ts +++ b/x-pack/plugins/index_management/test/fixtures/template.ts @@ -5,7 +5,7 @@ */ import { getRandomString, getRandomNumber } from '../../../../test_utils'; -import { TemplateDeserialized, DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT } from '../../common'; +import { TemplateDeserialized } from '../../common'; export const getTemplate = ({ name = getRandomString(), @@ -14,10 +14,11 @@ export const getTemplate = ({ indexPatterns = [], template: { settings, aliases, mappings } = {}, isManaged = false, - templateFormatVersion = DEFAULT_INDEX_TEMPLATE_VERSION_FORMAT, + isLegacy = false, }: Partial< TemplateDeserialized & { - templateFormatVersion?: 1 | 2; + isLegacy?: boolean; + isManaged: boolean; } > = {}): TemplateDeserialized => ({ name, @@ -29,8 +30,8 @@ export const getTemplate = ({ mappings, settings, }, - isManaged, _kbnMeta: { - formatVersion: templateFormatVersion, + isManaged, + isLegacy, }, }); diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/components/alert_dropdown.tsx b/x-pack/plugins/infra/public/alerting/metric_threshold/components/alert_dropdown.tsx index 52033a00327c0..d26575f65dfec 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/components/alert_dropdown.tsx +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/components/alert_dropdown.tsx @@ -41,6 +41,7 @@ export const MetricsAlertDropdown = () => { , ]; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [kibana.services]); return ( diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx index f4c7332a88e1d..7a71bb68bc54f 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx @@ -90,6 +90,7 @@ export const Expressions: React.FC = (props) => { aggregation: 'avg', }; } + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [alertsContext.metadata]); const updateParams = useCallback( @@ -109,6 +110,7 @@ export const Expressions: React.FC = (props) => { timeUnit: timeUnit ?? defaultExpression.timeUnit, }); setAlertParams('criteria', exp); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [setAlertParams, alertParams.criteria, timeSize, timeUnit]); const removeExpression = useCallback( @@ -119,6 +121,7 @@ export const Expressions: React.FC = (props) => { setAlertParams('criteria', exp); } }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [setAlertParams, alertParams.criteria] ); @@ -133,6 +136,7 @@ export const Expressions: React.FC = (props) => { [setAlertParams, derivedIndexPattern] ); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const debouncedOnFilterChange = useCallback(debounce(onFilterChange, FILTER_TYPING_DEBOUNCE_MS), [ onFilterChange, ]); @@ -162,6 +166,7 @@ export const Expressions: React.FC = (props) => { setTimeSize(ts || undefined); setAlertParams('criteria', criteria); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [alertParams.criteria, setAlertParams] ); @@ -175,6 +180,7 @@ export const Expressions: React.FC = (props) => { setTimeUnit(tu as TimeUnit); setAlertParams('criteria', criteria); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [alertParams.criteria, setAlertParams] ); @@ -288,6 +294,7 @@ export const Expressions: React.FC = (props) => { />
+
= ({ : (value: number) => `${value}`; }, [data]); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const yAxisFormater = useCallback(createFormatterForMetric(metric), [expression]); if (loading || !data) { diff --git a/x-pack/plugins/infra/public/components/alerting/inventory/alert_dropdown.tsx b/x-pack/plugins/infra/public/components/alerting/inventory/alert_dropdown.tsx index c48b5b9a2cc58..47a0f037816bc 100644 --- a/x-pack/plugins/infra/public/components/alerting/inventory/alert_dropdown.tsx +++ b/x-pack/plugins/infra/public/components/alerting/inventory/alert_dropdown.tsx @@ -41,6 +41,7 @@ export const InventoryAlertDropdown = () => { , ]; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [kibana.services]); return ( diff --git a/x-pack/plugins/infra/public/components/alerting/inventory/expression.tsx b/x-pack/plugins/infra/public/components/alerting/inventory/expression.tsx index f4fab113cdd17..074464fb55414 100644 --- a/x-pack/plugins/infra/public/components/alerting/inventory/expression.tsx +++ b/x-pack/plugins/infra/public/components/alerting/inventory/expression.tsx @@ -117,6 +117,7 @@ export const Expressions: React.FC = (props) => { timeUnit: timeUnit ?? defaultExpression.timeUnit, }); setAlertParams('criteria', exp); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [setAlertParams, alertParams.criteria, timeSize, timeUnit]); const removeExpression = useCallback( @@ -141,6 +142,7 @@ export const Expressions: React.FC = (props) => { [derivedIndexPattern, setAlertParams] ); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const debouncedOnFilterChange = useCallback(debounce(onFilterChange, FILTER_TYPING_DEBOUNCE_MS), [ onFilterChange, ]); diff --git a/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx b/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx index d81d11e01d4a5..609f99805fe9c 100644 --- a/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx +++ b/x-pack/plugins/infra/public/components/alerting/logs/expression_editor/editor.tsx @@ -137,6 +137,7 @@ export const Editor: React.FC = (props) => { } else { return []; } + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [sourceStatus]); const updateCount = useCallback( @@ -176,6 +177,7 @@ export const Editor: React.FC = (props) => { ? [...alertParams.criteria, DEFAULT_CRITERIA] : [DEFAULT_CRITERIA]; setAlertParams('criteria', nextCriteria); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [alertParams, setAlertParams]); const removeCriterion = useCallback( @@ -185,6 +187,7 @@ export const Editor: React.FC = (props) => { }); setAlertParams('criteria', nextCriteria); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [alertParams, setAlertParams] ); diff --git a/x-pack/plugins/infra/public/components/header/header.tsx b/x-pack/plugins/infra/public/components/header/header.tsx index fa71426f83645..47ee1857da591 100644 --- a/x-pack/plugins/infra/public/components/header/header.tsx +++ b/x-pack/plugins/infra/public/components/header/header.tsx @@ -31,10 +31,12 @@ export const Header = ({ breadcrumbs = [], readOnlyBadge = false }: HeaderProps) const setBreadcrumbs = useCallback(() => { return chrome?.setBreadcrumbs(breadcrumbs || []); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [breadcrumbs, chrome]); const setBadge = useCallback(() => { return chrome?.setBadge(badge); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [badge, chrome]); useEffect(() => { diff --git a/x-pack/plugins/infra/public/containers/logs/log_entries/index.ts b/x-pack/plugins/infra/public/containers/logs/log_entries/index.ts index 5fe9a45a7ceed..d5b2a0aaa61c0 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_entries/index.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_entries/index.ts @@ -269,6 +269,7 @@ const useFetchEntriesEffect = ( } }; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const fetchNewerEntries = useCallback( throttle(() => runFetchMoreEntriesRequest(ShouldFetchMoreEntries.After), 500), [props, state.bottomCursor] @@ -330,10 +331,12 @@ const useFetchEntriesEffect = ( props.timestampsLastUpdate, ]; + /* eslint-disable react-hooks/exhaustive-deps */ useEffect(fetchNewEntriesEffect, fetchNewEntriesEffectDependencies); useEffect(fetchMoreEntriesEffect, fetchMoreEntriesEffectDependencies); useEffect(streamEntriesEffect, streamEntriesEffectDependencies); useEffect(expandRangeEffect, expandRangeEffectDependencies); + /* eslint-enable react-hooks/exhaustive-deps */ return { fetchNewerEntries, checkForNewEntries: runFetchNewEntriesRequest }; }; diff --git a/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts b/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts index 7c903f59002dc..d5a43c0d6cffa 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts @@ -82,6 +82,7 @@ export const useLogFilterState: (props: { } return true; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [filterQueryDraft]); const serializedFilterQuery = useMemo(() => (filterQuery ? filterQuery.serializedQuery : null), [ diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts index 670988d680147..80aab6237518f 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts @@ -78,6 +78,7 @@ export const useLogSource = ({ [sourceId, fetch] ); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const logIndicesExist = useMemo(() => (sourceStatus?.logIndexNames?.length ?? 0) > 0, [ sourceStatus, ]); @@ -87,6 +88,7 @@ export const useLogSource = ({ fields: sourceStatus?.logIndexFields ?? [], title: sourceConfiguration?.configuration.name ?? 'unknown', }), + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [sourceConfiguration, sourceStatus] ); diff --git a/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts b/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts index 94e2537a67a2a..54d565d9ee223 100644 --- a/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts +++ b/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts @@ -76,6 +76,7 @@ export const useSourceViaHttp = ({ title: pickIndexPattern(response?.source, indexType), }; }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [response, type] ); diff --git a/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx index 2a70edc9b9a57..cfa9a711f7743 100644 --- a/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx @@ -35,6 +35,7 @@ export const useBulkGetSavedObject = (type: string) => { }; fetchData(); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx index 8313d496a0651..0efb862ad2eb4 100644 --- a/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx @@ -40,6 +40,7 @@ export const useCreateSavedObject = (type: string) => { }; save(); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx index 3f2d15b3b86aa..e353a79b19073 100644 --- a/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx @@ -29,6 +29,7 @@ export const useDeleteSavedObject = (type: string) => { }; dobj(); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx index 8b0ab45f6e6d1..8eb6db6103ed8 100644 --- a/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx @@ -37,6 +37,7 @@ export const useFindSavedObject = { title: loadDataErrorTitle, }); }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [services.notifications] ); diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx index 156c9a919440e..3c8db3f8246c0 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx @@ -127,6 +127,7 @@ export const LogEntryRateResultsContent: React.FunctionComponent = () => { [setAutoRefresh] ); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const hasResults = useMemo(() => (logEntryRate?.histogramBuckets?.length ?? 0) > 0, [ logEntryRate, ]); diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx index 11ea137c95a1f..a1d3d56beee2c 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx @@ -29,6 +29,7 @@ export const AnomaliesTableExpandedRow: React.FunctionComponent<{ const logEntryRateSeries = useMemo( () => results?.histogramBuckets ? getLogEntryRateSeriesForPartition(results, partitionId) : [], + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [results, partitionId] ); const anomalyAnnotations = useMemo( @@ -41,6 +42,7 @@ export const AnomaliesTableExpandedRow: React.FunctionComponent<{ major: [], critical: [], }, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [results, partitionId] ); const totalNumberOfLogEntries = useMemo( @@ -48,6 +50,7 @@ export const AnomaliesTableExpandedRow: React.FunctionComponent<{ results?.histogramBuckets ? getTotalNumberOfLogEntriesForPartition(results, partitionId) : undefined, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [results, partitionId] ); return ( diff --git a/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx b/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx index 34c4202ab8b65..f41158e114c7d 100644 --- a/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx +++ b/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx @@ -42,6 +42,7 @@ export const LogsSettingsPage = () => { const availableFields = useMemo( () => sourceStatus?.logIndexFields.map((field) => field.name) ?? [], + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [sourceStatus] ); diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx index b6e6710a0b3b4..cf3eae263ed59 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx @@ -28,6 +28,7 @@ const MODAL_MARGIN = 25; export const PageViewLogInContext: React.FC = () => { const { sourceConfiguration } = useLogSourceContext(); const { textScale, textWrap } = useContext(LogViewConfiguration.Context); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const columnConfigurations = useMemo(() => sourceConfiguration?.configuration.logColumns ?? [], [ sourceConfiguration, ]); diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx index 8b5b191ccfdd9..1452772e49ca1 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx @@ -76,6 +76,7 @@ export const Layout = () => { const intervalAsString = convertIntervalToString(interval); const dataBounds = calculateBoundsFromNodes(nodes); const bounds = autoBounds ? dataBounds : boundsOverride; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const formatter = useCallback(createInventoryMetricFormatter(options.metric), [options.metric]); return ( diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx index 7929cf8292cb6..538cd5f7d9525 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx @@ -141,14 +141,16 @@ export const LegendControls = ({ const handleStepsChange = useCallback( (e) => { - setLegendOptions((previous) => ({ ...previous, steps: parseInt(e.target.value, 10) })); + const steps = parseInt(e.target.value, 10); + setLegendOptions((previous) => ({ ...previous, steps })); }, [setLegendOptions] ); const handlePaletteChange = useCallback( (e) => { - setLegendOptions((previous) => ({ ...previous, palette: e.target.value })); + const palette = e.target.value; + setLegendOptions((previous) => ({ ...previous, palette })); }, [setLegendOptions] ); diff --git a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx index 6a4d6521855a9..dee2e0c9f457f 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx @@ -45,6 +45,7 @@ export const ChartSectionVis = ({ }: VisSectionProps) => { const isDarkMode = useUiSetting('theme:darkMode'); const [dateFormat] = useKibanaUiSetting('dateFormat'); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const valueFormatter = useCallback(getFormatter(formatter, formatterTemplate), [ formatter, formatterTemplate, diff --git a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx index 4c75003616117..88e7c0c08e441 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx @@ -23,6 +23,7 @@ export const SubSection: FunctionComponent = ({ isLiveStreaming, stopLiveStreaming, }) => { + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const metric = useMemo(() => metrics?.find((m) => m.id === id), [id, metrics]); if (!children || !metric) { diff --git a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx index ef6486eac0fdb..afee0c0498187 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx @@ -6,6 +6,7 @@ import { EuiSuperDatePicker, OnRefreshChangeProps, OnTimeChangeProps } from '@elastic/eui'; import React, { useCallback } from 'react'; +import { UI_SETTINGS } from '../../../../../../../../src/plugins/data/public'; import { euiStyled } from '../../../../../../observability/public'; import { MetricsTimeInput } from '../hooks/use_metrics_time'; import { useKibanaUiSetting } from '../../../../utils/use_kibana_ui_setting'; @@ -22,7 +23,7 @@ interface MetricsTimeControlsProps { } export const MetricsTimeControls = (props: MetricsTimeControlsProps) => { - const [timepickerQuickRanges] = useKibanaUiSetting('timepicker:quickRanges'); + const [timepickerQuickRanges] = useKibanaUiSetting(UI_SETTINGS.TIMEPICKER_QUICK_RANGES); const { onChangeTimeRange, onRefresh, diff --git a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx index d079b7bb93d73..2a218c1c78aa3 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx @@ -87,6 +87,7 @@ export const MetricsExplorerChart = ({ [dateFormat] ), }; + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const yAxisFormater = useCallback(createFormatterForMetric(first(metrics)), [options]); const dataDomain = calculateDomain(series, metrics, chartOptions.stack); const domain = diff --git a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx index 7ad1d943a9896..1471efbd21e18 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSuperDatePicker, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import React from 'react'; -import { IIndexPattern } from 'src/plugins/data/public'; +import { IIndexPattern, UI_SETTINGS } from '../../../../../../../../src/plugins/data/public'; import { MetricsExplorerMetric, MetricsExplorerAggregation, @@ -61,7 +61,7 @@ export const MetricsExplorerToolbar = ({ onViewStateChange, }: Props) => { const isDefaultOptions = options.aggregation === 'avg' && options.metrics.length === 0; - const [timepickerQuickRanges] = useKibanaUiSetting('timepicker:quickRanges'); + const [timepickerQuickRanges] = useKibanaUiSetting(UI_SETTINGS.TIMEPICKER_QUICK_RANGES); const commonlyUsedRanges = mapKibanaQuickRangesToDatePickerRanges(timepickerQuickRanges); return ( diff --git a/x-pack/plugins/infra/public/plugin.ts b/x-pack/plugins/infra/public/plugin.ts index ead5644d19fa2..deae78e22c6a1 100644 --- a/x-pack/plugins/infra/public/plugin.ts +++ b/x-pack/plugins/infra/public/plugin.ts @@ -64,7 +64,7 @@ export class Plugin defaultMessage: 'Logs', }), euiIconType: 'logsApp', - order: 8000, + order: 8100, appRoute: '/app/logs', category: DEFAULT_APP_CATEGORIES.observability, mount: async (params: AppMountParameters) => { @@ -89,7 +89,7 @@ export class Plugin defaultMessage: 'Metrics', }), euiIconType: 'metricsApp', - order: 8001, + order: 8200, appRoute: '/app/metrics', category: DEFAULT_APP_CATEGORIES.observability, mount: async (params: AppMountParameters) => { diff --git a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index 7c0c535795638..79c276a1e58f7 100644 --- a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -32,7 +32,7 @@ import { } from '../../../../../../../src/core/server'; import { RequestHandler } from '../../../../../../../src/core/server'; import { InfraConfig } from '../../../plugin'; -import { IndexPatternsFetcher } from '../../../../../../../src/plugins/data/server'; +import { IndexPatternsFetcher, UI_SETTINGS } from '../../../../../../../src/plugins/data/server'; export class KibanaFramework { public router: IRouter; @@ -197,10 +197,10 @@ export class KibanaFramework { ) { const { elasticsearch, uiSettings } = requestContext.core; - const includeFrozen = await uiSettings.client.get('search:includeFrozen'); + const includeFrozen = await uiSettings.client.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); if (endpoint === 'msearch') { const maxConcurrentShardRequests = await uiSettings.client.get( - 'courier:maxConcurrentShardRequests' + UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS ); if (maxConcurrentShardRequests > 0) { params = { ...params, max_concurrent_shard_requests: maxConcurrentShardRequests }; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts index 233a34a67d1ec..a282a742d614c 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts @@ -336,6 +336,9 @@ export const createMetricThresholdExecutor = (libs: InfraBackendLibs, alertId: s group, alertState: stateToAlertMessage[nextState], reason, + value: mapToConditionsLookup(alertResults, (result) => result[group].currentValue), + threshold: mapToConditionsLookup(criteria, (c) => c.threshold), + metric: mapToConditionsLookup(criteria, (c) => c.metric), }); } @@ -352,3 +355,14 @@ export const FIRED_ACTIONS = { defaultMessage: 'Fired', }), }; + +const mapToConditionsLookup = ( + list: any[], + mapFn: (value: any, index: number, array: any[]) => unknown +) => + list + .map(mapFn) + .reduce( + (result: Record, value, i) => ({ ...result, [`condition${i}`]: value }), + {} + ); diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts index 8b3903f2ee3be..2c98a568d16de 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts @@ -55,6 +55,30 @@ export function registerMetricThresholdAlertType(libs: InfraBackendLibs) { } ); + const valueActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.valueActionVariableDescription', + { + defaultMessage: + 'The value of the metric in the specified condition. Usage: (ctx.value.condition0, ctx.value.condition1, etc...).', + } + ); + + const metricActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.metricActionVariableDescription', + { + defaultMessage: + 'The metric name in the specified condition. Usage: (ctx.metric.condition0, ctx.metric.condition1, etc...).', + } + ); + + const thresholdActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.thresholdActionVariableDescription', + { + defaultMessage: + 'The threshold value of the metric for the specified condition. Usage: (ctx.threshold.condition0, ctx.threshold.condition1, etc...).', + } + ); + return { id: METRIC_THRESHOLD_ALERT_TYPE_ID, name: 'Metric threshold', @@ -82,6 +106,9 @@ export function registerMetricThresholdAlertType(libs: InfraBackendLibs) { { name: 'group', description: groupActionVariableDescription }, { name: 'alertState', description: alertStateActionVariableDescription }, { name: 'reason', description: reasonActionVariableDescription }, + { name: 'value', description: valueActionVariableDescription }, + { name: 'metric', description: metricActionVariableDescription }, + { name: 'threshold', description: thresholdActionVariableDescription }, ], }, producer: 'metrics', diff --git a/x-pack/plugins/ingest_manager/README.md b/x-pack/plugins/ingest_manager/README.md index f0c2466b25b04..50c42544b8bdc 100644 --- a/x-pack/plugins/ingest_manager/README.md +++ b/x-pack/plugins/ingest_manager/README.md @@ -52,12 +52,12 @@ This plugin follows the `common`, `server`, `public` structure from the [Archite 1. In one terminal, change to the `x-pack` directory and start the test server with ``` - node scripts/functional_tests_server.js --config test/api_integration/config.js + node scripts/functional_tests_server.js --config test/api_integration/config.ts ``` 1. in a second terminal, run the tests from the Kibana root directory with ``` - node scripts/functional_test_runner.js --config x-pack/test/api_integration/config.js + node scripts/functional_test_runner.js --config x-pack/test/api_integration/config.ts ``` #### EPM diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/index.tsx index 1dd7e660deaa9..6fab78951038f 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/index.tsx @@ -169,6 +169,7 @@ export const AgentConfigDetailsPage: React.FunctionComponent = () => { ))} ), + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [agentConfig, configId, agentStatus] ); diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/data_stream/list_page/components/data_stream_row_actions.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/data_stream/list_page/components/data_stream_row_actions.tsx index cdc4f1c63a11d..057970aa1ee92 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/data_stream/list_page/components/data_stream_row_actions.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/data_stream/list_page/components/data_stream_row_actions.tsx @@ -48,6 +48,7 @@ export const DataStreamRowActions = memo<{ datastream: DataStream }>(({ datastre items: [ { icon: 'dashboardApp', + /* eslint-disable-next-line react-hooks/rules-of-hooks */ href: useKibanaLink(`/dashboard/${dashboards[0].id || ''}`), name: actionNameSingular, }, @@ -70,6 +71,7 @@ export const DataStreamRowActions = memo<{ datastream: DataStream }>(({ datastre items: dashboards.map((dashboard) => { return { icon: 'dashboardApp', + /* eslint-disable-next-line react-hooks/rules-of-hooks */ href: useKibanaLink(`/dashboard/${dashboard.id || ''}`), name: dashboard.title, }; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_details_page/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_details_page/index.tsx index 1a7681584ff15..5bb0464801f70 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_details_page/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_details_page/index.tsx @@ -90,6 +90,7 @@ export const AgentDetailsPage: React.FunctionComponent = () => { ), + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [agentData, agentId, getHref] ); @@ -141,6 +142,7 @@ export const AgentDetailsPage: React.FunctionComponent = () => { ))} ) : undefined, + /* eslint-disable-next-line react-hooks/exhaustive-deps */ [agentConfigData, agentData, getHref, isAgentConfigLoading] ); diff --git a/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.test.ts b/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.test.ts index 5e83a976bd7a4..635dce93f0027 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.test.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.test.ts @@ -83,4 +83,22 @@ foo: bar custom: { foo: 'bar' }, }); }); + + it('should support optional yaml values at root level', () => { + const streamTemplate = ` +input: logs +{{custom}} + `; + const vars = { + custom: { + type: 'yaml', + value: null, + }, + }; + + const output = createStream(vars, streamTemplate); + expect(output).toEqual({ + input: 'logs', + }); + }); }); diff --git a/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.ts b/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.ts index 61f2f95fe20a9..0bcb2464f8d74 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/agent/agent.ts @@ -94,7 +94,10 @@ function replaceRootLevelYamlVariables(yamlVariables: { [k: string]: any }, yaml let patchedTemplate = yamlTemplate; Object.entries(yamlVariables).forEach(([key, val]) => { - patchedTemplate = patchedTemplate.replace(new RegExp(`^"${key}"`, 'gm'), safeDump(val)); + patchedTemplate = patchedTemplate.replace( + new RegExp(`^"${key}"`, 'gm'), + val ? safeDump(val) : '' + ); }); return patchedTemplate; diff --git a/x-pack/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/plugins/lens/public/app_plugin/app.test.tsx index f1a2edd2d554f..33f4f46681a28 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.test.tsx @@ -19,6 +19,7 @@ import { FilterManager, IFieldType, IIndexPattern, + UI_SETTINGS, } from '../../../../../src/plugins/data/public'; import { dataPluginMock } from '../../../../../src/plugins/data/public/mocks'; const dataStartMock = dataPluginMock.createStartContract(); @@ -183,7 +184,7 @@ describe('Lens App', () => { jest.fn((type) => { if (type === 'timepicker:timeDefaults') { return { from: 'now-7d', to: 'now' }; - } else if (type === 'search:queryLanguage') { + } else if (type === UI_SETTINGS.SEARCH_QUERY_LANGUAGE) { return 'kuery'; } else { return []; diff --git a/x-pack/plugins/lens/public/app_plugin/app.tsx b/x-pack/plugins/lens/public/app_plugin/app.tsx index ffa59a6fb6bc9..1349d33983fcd 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.tsx @@ -27,6 +27,7 @@ import { IndexPattern as IndexPatternInstance, IndexPatternsContract, SavedQuery, + UI_SETTINGS, } from '../../../../../src/plugins/data/public'; interface State { @@ -76,7 +77,8 @@ export function App({ onAppLeave: AppMountParameters['onAppLeave']; }) { const language = - storage.get('kibana.userQueryLanguage') || core.uiSettings.get('search:queryLanguage'); + storage.get('kibana.userQueryLanguage') || + core.uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE); const [state, setState] = useState(() => { const currentRange = data.query.timefilter.timefilter.getTime(); @@ -413,7 +415,7 @@ export function App({ query: '', language: storage.get('kibana.userQueryLanguage') || - core.uiSettings.get('search:queryLanguage'), + core.uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), }, })); }} diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx index e665e8b8dd326..defc142d4976e 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.test.tsx @@ -12,6 +12,7 @@ import { EuiSwitch, EuiSwitchEvent } from '@elastic/eui'; import { IUiSettingsClient, SavedObjectsClientContract, HttpSetup } from 'kibana/public'; import { coreMock } from 'src/core/public/mocks'; import { IStorageWrapper } from 'src/plugins/kibana_utils/public'; +import { UI_SETTINGS } from '../../../../../../../src/plugins/data/public'; import { dataPluginMock, getCalculateAutoTimeExpression, @@ -23,7 +24,7 @@ const dataStart = dataPluginMock.createStartContract(); dataStart.search.aggs.calculateAutoTimeExpression = getCalculateAutoTimeExpression({ ...coreMock.createStart().uiSettings, get: (path: string) => { - if (path === 'histogram:maxBars') { + if (path === UI_SETTINGS.HISTOGRAM_MAX_BARS) { return 10; } }, diff --git a/x-pack/plugins/lens/public/plugin.ts b/x-pack/plugins/lens/public/plugin.ts index f9a577e001c64..3000c9321b3b9 100644 --- a/x-pack/plugins/lens/public/plugin.ts +++ b/x-pack/plugins/lens/public/plugin.ts @@ -6,7 +6,7 @@ import { AppMountParameters, CoreSetup, CoreStart } from 'kibana/public'; import { DataPublicPluginSetup, DataPublicPluginStart } from 'src/plugins/data/public'; -import { EmbeddableSetup, EmbeddableStart } from 'src/plugins/embeddable/public'; +import { EmbeddableSetup } from 'src/plugins/embeddable/public'; import { ExpressionsSetup, ExpressionsStart } from 'src/plugins/expressions/public'; import { VisualizationsSetup } from 'src/plugins/visualizations/public'; import { NavigationPublicPluginStart } from 'src/plugins/navigation/public'; @@ -38,7 +38,6 @@ export interface LensPluginSetupDependencies { export interface LensPluginStartDependencies { data: DataPublicPluginStart; - embeddable: EmbeddableStart; expressions: ExpressionsStart; navigation: NavigationPublicPluginStart; uiActions: UiActionsStart; diff --git a/x-pack/plugins/lens/public/xy_visualization/index.ts b/x-pack/plugins/lens/public/xy_visualization/index.ts index 23cf9e7ff818f..cd25cb5729511 100644 --- a/x-pack/plugins/lens/public/xy_visualization/index.ts +++ b/x-pack/plugins/lens/public/xy_visualization/index.ts @@ -8,6 +8,7 @@ import { EUI_CHARTS_THEME_DARK, EUI_CHARTS_THEME_LIGHT } from '@elastic/eui/dist import { CoreSetup, IUiSettingsClient } from 'kibana/public'; import moment from 'moment-timezone'; import { ExpressionsSetup } from '../../../../../src/plugins/expressions/public'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/public'; import { xyVisualization } from './xy_visualization'; import { xyChart, getXyChartRenderer } from './xy_expression'; import { legendConfig, xConfig, layerConfig } from './types'; @@ -47,7 +48,7 @@ export class XyVisualization { ? EUI_CHARTS_THEME_DARK.theme : EUI_CHARTS_THEME_LIGHT.theme, timeZone: getTimeZone(core.uiSettings), - histogramBarTarget: core.uiSettings.get('histogram:barTarget'), + histogramBarTarget: core.uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET), }) ); diff --git a/x-pack/plugins/lens/readme.md b/x-pack/plugins/lens/readme.md index 60b4266edadb3..70d7f16b0f7fc 100644 --- a/x-pack/plugins/lens/readme.md +++ b/x-pack/plugins/lens/readme.md @@ -11,4 +11,4 @@ Run all tests from the `x-pack` root directory - You may want to comment out all imports except for Lens in the config file. - API Functional tests: - Run `node scripts/functional_tests_server` - - Run `node ../scripts/functional_test_runner.js --config ./test/api_integration/config.js --grep=Lens` + - Run `node ../scripts/functional_test_runner.js --config ./test/api_integration/config.ts --grep=Lens` diff --git a/x-pack/plugins/licensing/server/index.ts b/x-pack/plugins/licensing/server/index.ts index 76e65afc595c4..ba577660d865c 100644 --- a/x-pack/plugins/licensing/server/index.ts +++ b/x-pack/plugins/licensing/server/index.ts @@ -10,6 +10,7 @@ import { LicensingPlugin } from './plugin'; export const plugin = (context: PluginInitializerContext) => new LicensingPlugin(context); export * from '../common/types'; +export { FeatureUsageServiceSetup, FeatureUsageServiceStart } from './services'; export * from './types'; export { config } from './licensing_config'; export { CheckLicense, wrapRouteWithLicenseCheck } from './wrap_route_with_license_check'; diff --git a/x-pack/plugins/lists/common/siem_common_deps.ts b/x-pack/plugins/lists/common/siem_common_deps.ts index eb4b393a36da3..9de40e3f72932 100644 --- a/x-pack/plugins/lists/common/siem_common_deps.ts +++ b/x-pack/plugins/lists/common/siem_common_deps.ts @@ -4,5 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -export { exactCheck } from '../../siem/common/exact_check'; -export { getPaths, foldLeftRight } from '../../siem/common/test_utils'; +export { exactCheck } from '../../security_solution/common/exact_check'; +export { getPaths, foldLeftRight } from '../../security_solution/common/test_utils'; diff --git a/x-pack/plugins/lists/server/siem_server_deps.ts b/x-pack/plugins/lists/server/siem_server_deps.ts index 81ebe9f17b06f..df4b07fc46322 100644 --- a/x-pack/plugins/lists/server/siem_server_deps.ts +++ b/x-pack/plugins/lists/server/siem_server_deps.ts @@ -18,4 +18,4 @@ export { getIndexExists, buildRouteValidation, validate, -} from '../../siem/server'; +} from '../../security_solution/server'; diff --git a/x-pack/plugins/maps/public/angular/get_initial_query.js b/x-pack/plugins/maps/public/angular/get_initial_query.js index 4f61142413671..84f431cf2b3b6 100644 --- a/x-pack/plugins/maps/public/angular/get_initial_query.js +++ b/x-pack/plugins/maps/public/angular/get_initial_query.js @@ -5,6 +5,7 @@ */ import { getUiSettings } from '../kibana_services'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/public'; export function getInitialQuery({ mapStateJSON, appState = {}, userQueryLanguage }) { const settings = getUiSettings(); @@ -22,6 +23,6 @@ export function getInitialQuery({ mapStateJSON, appState = {}, userQueryLanguage return { query: '', - language: userQueryLanguage || settings.get('search:queryLanguage'), + language: userQueryLanguage || settings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), }; } diff --git a/x-pack/plugins/maps/public/angular/get_initial_refresh_config.js b/x-pack/plugins/maps/public/angular/get_initial_refresh_config.js index f13e435cd1d5c..17a50c6c5f685 100644 --- a/x-pack/plugins/maps/public/angular/get_initial_refresh_config.js +++ b/x-pack/plugins/maps/public/angular/get_initial_refresh_config.js @@ -5,6 +5,7 @@ */ import { getUiSettings } from '../kibana_services'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/public'; export function getInitialRefreshConfig({ mapStateJSON, globalState = {} }) { const uiSettings = getUiSettings(); @@ -16,7 +17,7 @@ export function getInitialRefreshConfig({ mapStateJSON, globalState = {} }) { } } - const defaultRefreshConfig = uiSettings.get('timepicker:refreshIntervalDefaults'); + const defaultRefreshConfig = uiSettings.get(UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS); const refreshInterval = { ...defaultRefreshConfig, ...globalState.refreshInterval }; return { isPaused: refreshInterval.pause, diff --git a/x-pack/plugins/maps/public/classes/styles/vector/properties/__tests__/test_util.ts b/x-pack/plugins/maps/public/classes/styles/vector/properties/__tests__/test_util.ts index a8fba834d65ab..f4ef9bdbe5b6d 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/properties/__tests__/test_util.ts +++ b/x-pack/plugins/maps/public/classes/styles/vector/properties/__tests__/test_util.ts @@ -25,6 +25,21 @@ class MockField extends AbstractField { } } +export class MockMbMap { + _paintPropertyCalls: unknown[]; + + constructor() { + this._paintPropertyCalls = []; + } + setPaintProperty(...args: unknown[]) { + this._paintPropertyCalls.push([...args]); + } + + getPaintPropertyCalls(): unknown[] { + return this._paintPropertyCalls; + } +} + export const mockField: IField = new MockField({ fieldName: 'foobar', origin: FIELD_ORIGIN.SOURCE, diff --git a/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.js b/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.js index 898da439c44aa..a0af2fbb939d8 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.js +++ b/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.js @@ -110,6 +110,9 @@ export class DynamicSizeProperty extends DynamicStyleProperty { _getMbDataDrivenSize({ targetName, minSize, maxSize, minValue, maxValue }) { const lookup = this.supportsMbFeatureState() ? 'feature-state' : 'get'; + + const stops = + minValue === maxValue ? [maxValue, maxSize] : [minValue, minSize, maxValue, maxSize]; return [ 'interpolate', ['linear'], @@ -120,10 +123,7 @@ export class DynamicSizeProperty extends DynamicStyleProperty { fieldName: targetName, fallback: 0, }), - minValue, - minSize, - maxValue, - maxSize, + ...stops, ]; } diff --git a/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.test.tsx b/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.test.tsx index 34f3e796f409f..c60547f3606c5 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.test.tsx +++ b/x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_size_property.test.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IVectorStyle } from '../vector_style'; - jest.mock('ui/new_platform'); jest.mock('../components/vector_style_editor', () => ({ VectorStyleEditor: () => { @@ -18,68 +16,22 @@ import { shallow } from 'enzyme'; // @ts-ignore import { DynamicSizeProperty } from './dynamic_size_property'; -import { StyleMeta } from '../style_meta'; -import { FIELD_ORIGIN, VECTOR_STYLES } from '../../../../../common/constants'; -import { DataRequest } from '../../../util/data_request'; -import { IVectorLayer } from '../../../layers/vector_layer/vector_layer'; +import { VECTOR_STYLES } from '../../../../../common/constants'; import { IField } from '../../../fields/field'; +import { MockMbMap } from './__tests__/test_util'; -// @ts-ignore -const mockField: IField = { - async getLabel() { - return 'foobar_label'; - }, - getName() { - return 'foobar'; - }, - getRootName() { - return 'foobar'; - }, - getOrigin() { - return FIELD_ORIGIN.SOURCE; - }, - supportsFieldMeta() { - return true; - }, - canValueBeFormatted() { - return true; - }, - async getDataType() { - return 'number'; - }, -}; +import { mockField, MockLayer, MockStyle } from './__tests__/test_util'; -// @ts-ignore -const mockLayer: IVectorLayer = { - getDataRequest(): DataRequest | undefined { - return undefined; - }, - getStyle(): IVectorStyle { - // @ts-ignore - return { - getStyleMeta(): StyleMeta { - return new StyleMeta({ - geometryTypes: { - isPointsOnly: true, - isLinesOnly: false, - isPolygonsOnly: false, - }, - fieldMeta: { - foobar: { - range: { min: 0, max: 100, delta: 100 }, - categories: { categories: [] }, - }, - }, - }); - }, - }; - }, -}; - -const makeProperty: DynamicSizeProperty = (options: object) => { - return new DynamicSizeProperty(options, VECTOR_STYLES.ICON_SIZE, mockField, mockLayer, () => { - return (x: string) => x + '_format'; - }); +const makeProperty = (options: object, mockStyle: MockStyle, field: IField = mockField) => { + return new DynamicSizeProperty( + options, + VECTOR_STYLES.ICON_SIZE, + field, + new MockLayer(mockStyle), + () => { + return (x: string) => x + '_format'; + } + ); }; const defaultLegendParams = { @@ -89,7 +41,7 @@ const defaultLegendParams = { describe('renderLegendDetailRow', () => { test('Should render as range', async () => { - const sizeProp = makeProperty(); + const sizeProp = makeProperty({}, new MockStyle({ min: 0, max: 100 })); const legendRow = sizeProp.renderLegendDetailRow(defaultLegendParams); const component = shallow(legendRow); @@ -100,3 +52,70 @@ describe('renderLegendDetailRow', () => { expect(component).toMatchSnapshot(); }); }); + +describe('syncSize', () => { + test('Should sync with circle-radius prop', async () => { + const sizeProp = makeProperty({ minSize: 8, maxSize: 32 }, new MockStyle({ min: 0, max: 100 })); + const mockMbMap = new MockMbMap(); + + sizeProp.syncCircleRadiusWithMb('foobar', mockMbMap); + + expect(mockMbMap.getPaintPropertyCalls()).toEqual([ + [ + 'foobar', + 'circle-radius', + [ + 'interpolate', + ['linear'], + [ + 'coalesce', + [ + 'case', + ['==', ['feature-state', 'foobar'], null], + -1, + ['max', ['min', ['to-number', ['feature-state', 'foobar']], 100], 0], + ], + 0, + ], + 0, + 8, + 100, + 32, + ], + ], + ]); + }); + + test('Should truncate interpolate expression to max when no delta', async () => { + const sizeProp = makeProperty( + { minSize: 8, maxSize: 32 }, + new MockStyle({ min: 100, max: 100 }) + ); + const mockMbMap = new MockMbMap(); + + sizeProp.syncCircleRadiusWithMb('foobar', mockMbMap); + + expect(mockMbMap.getPaintPropertyCalls()).toEqual([ + [ + 'foobar', + 'circle-radius', + [ + 'interpolate', + ['linear'], + [ + 'coalesce', + [ + 'case', + ['==', ['feature-state', 'foobar'], null], + 99, + ['max', ['min', ['to-number', ['feature-state', 'foobar']], 100], 100], + ], + 0, + ], + 100, + 32, + ], + ], + ]); + }); +}); diff --git a/x-pack/plugins/maps/public/connected_components/layer_panel/filter_editor/filter_editor.js b/x-pack/plugins/maps/public/connected_components/layer_panel/filter_editor/filter_editor.js index 75b6b5d66f1de..45c7507160e98 100644 --- a/x-pack/plugins/maps/public/connected_components/layer_panel/filter_editor/filter_editor.js +++ b/x-pack/plugins/maps/public/connected_components/layer_panel/filter_editor/filter_editor.js @@ -20,6 +20,7 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; +import { UI_SETTINGS } from '../../../../../../../src/plugins/data/public'; import { getIndexPatternService, getUiSettings, getData } from '../../../kibana_services'; import { GlobalFilterCheckbox } from '../../../components/global_filter_checkbox'; @@ -101,7 +102,7 @@ export class FilterEditor extends Component { query={ layerQuery ? layerQuery - : { language: uiSettings.get('search:queryLanguage'), query: '' } + : { language: uiSettings.get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), query: '' } } onQuerySubmit={this._onQueryChange} indexPatterns={this.state.indexPatterns} diff --git a/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/where_expression.js b/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/where_expression.js index d87761d3dabe8..8fdb71de2dfed 100644 --- a/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/where_expression.js +++ b/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/where_expression.js @@ -8,6 +8,7 @@ import React, { Component } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButton, EuiPopover, EuiExpression, EuiFormHelpText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; +import { UI_SETTINGS } from '../../../../../../../../src/plugins/data/public'; import { getUiSettings, getData } from '../../../../kibana_services'; export class WhereExpression extends Component { @@ -79,7 +80,7 @@ export class WhereExpression extends Component { query={ whereQuery ? whereQuery - : { language: getUiSettings().get('search:queryLanguage'), query: '' } + : { language: getUiSettings().get(UI_SETTINGS.SEARCH_QUERY_LANGUAGE), query: '' } } onQuerySubmit={this._onQueryChange} indexPatterns={[indexPattern]} diff --git a/x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts b/x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts index c75387a4b410b..3dbdb8bf3c002 100644 --- a/x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts +++ b/x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts @@ -78,6 +78,7 @@ export interface DataDescription { export interface ModelPlotConfig { enabled: boolean; + annotations_enabled?: boolean; terms?: string; } diff --git a/x-pack/plugins/ml/common/util/validators.ts b/x-pack/plugins/ml/common/util/validators.ts index 6f959c50219cf..5dcdec0553106 100644 --- a/x-pack/plugins/ml/common/util/validators.ts +++ b/x-pack/plugins/ml/common/util/validators.ts @@ -65,6 +65,8 @@ export function requiredValidator() { }; } +export type ValidationResult = object | null; + export function memoryInputValidator(allowedUnits = ALLOWED_DATA_UNITS) { return (value: any) => { if (typeof value !== 'string' || value === '') { diff --git a/x-pack/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js b/x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js similarity index 84% rename from x-pack/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js rename to x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js index af282d53273d1..c86b716b2f49b 100644 --- a/x-pack/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js +++ b/x-pack/plugins/ml/public/application/components/custom_selection_table/custom_selection_table.js @@ -29,7 +29,7 @@ import { import { Pager } from '@elastic/eui/lib/services'; import { i18n } from '@kbn/i18n'; -const JOBS_PER_PAGE = 20; +const ITEMS_PER_PAGE = 20; function getError(error) { if (error !== null) { @@ -43,15 +43,18 @@ function getError(error) { } export function CustomSelectionTable({ + checkboxDisabledCheck, columns, filterDefaultFields, filters, items, + itemsPerPage = ITEMS_PER_PAGE, onTableChange, + radioDisabledCheck, selectedIds, singleSelection, sortableProperties, - timeseriesOnly, + tableItemId = 'id', }) { const [itemIdToSelectedMap, setItemIdToSelectedMap] = useState(getCurrentlySelectedItemIdsMap()); const [currentItems, setCurrentItems] = useState(items); @@ -59,7 +62,7 @@ export function CustomSelectionTable({ const [sortedColumn, setSortedColumn] = useState(''); const [pager, setPager] = useState(); const [pagerSettings, setPagerSettings] = useState({ - itemsPerPage: JOBS_PER_PAGE, + itemsPerPage: itemsPerPage, firstItemIndex: 0, lastItemIndex: 1, }); @@ -77,9 +80,9 @@ export function CustomSelectionTable({ }, [selectedIds]); // eslint-disable-line useEffect(() => { - const tablePager = new Pager(currentItems.length, JOBS_PER_PAGE); + const tablePager = new Pager(currentItems.length, itemsPerPage); setPagerSettings({ - itemsPerPage: JOBS_PER_PAGE, + itemsPerPage: itemsPerPage, firstItemIndex: tablePager.getFirstItemIndex(), lastItemIndex: tablePager.getLastItemIndex(), }); @@ -100,7 +103,7 @@ export function CustomSelectionTable({ function handleTableChange({ isSelected, itemId }) { const selectedMapIds = Object.getOwnPropertyNames(itemIdToSelectedMap); - const currentItemIds = currentItems.map((item) => item.id); + const currentItemIds = currentItems.map((item) => item[tableItemId]); let currentSelected = selectedMapIds.filter( (id) => itemIdToSelectedMap[id] === true && id !== itemId @@ -124,11 +127,11 @@ export function CustomSelectionTable({ onTableChange(currentSelected); } - function handleChangeItemsPerPage(itemsPerPage) { - pager.setItemsPerPage(itemsPerPage); + function handleChangeItemsPerPage(numItemsPerPage) { + pager.setItemsPerPage(numItemsPerPage); setPagerSettings({ ...pagerSettings, - itemsPerPage, + itemsPerPage: numItemsPerPage, firstItemIndex: pager.getFirstItemIndex(), lastItemIndex: pager.getLastItemIndex(), }); @@ -161,7 +164,9 @@ export function CustomSelectionTable({ } function areAllItemsSelected() { - const indexOfUnselectedItem = currentItems.findIndex((item) => !isItemSelected(item.id)); + const indexOfUnselectedItem = currentItems.findIndex( + (item) => !isItemSelected(item[tableItemId]) + ); return indexOfUnselectedItem === -1; } @@ -199,7 +204,7 @@ export function CustomSelectionTable({ function toggleAll() { const allSelected = areAllItemsSelected() || itemIdToSelectedMap.all === true; const newItemIdToSelectedMap = {}; - currentItems.forEach((item) => (newItemIdToSelectedMap[item.id] = !allSelected)); + currentItems.forEach((item) => (newItemIdToSelectedMap[item[tableItemId]] = !allSelected)); setItemIdToSelectedMap(newItemIdToSelectedMap); handleTableChange({ isSelected: !allSelected, itemId: 'all' }); } @@ -255,20 +260,23 @@ export function CustomSelectionTable({ {!singleSelection && ( toggleItem(item.id)} + disabled={ + checkboxDisabledCheck !== undefined ? checkboxDisabledCheck(item) : undefined + } + id={`${item[tableItemId]}-checkbox`} + data-test-subj={`${item[tableItemId]}-checkbox`} + checked={isItemSelected(item[tableItemId])} + onChange={() => toggleItem(item[tableItemId])} type="inList" /> )} {singleSelection && ( toggleItem(item.id)} - disabled={timeseriesOnly && item.isSingleMetricViewerJob === false} + id={item[tableItemId]} + data-test-subj={`${item[tableItemId]}-radio-button`} + checked={isItemSelected(item[tableItemId])} + onChange={() => toggleItem(item[tableItemId])} + disabled={radioDisabledCheck !== undefined ? radioDisabledCheck(item) : undefined} /> )} @@ -299,11 +307,11 @@ export function CustomSelectionTable({ return ( {cells} @@ -331,7 +339,7 @@ export function CustomSelectionTable({ - + {renderSelectAll(true)} - + {renderHeaderCells()} {renderRows()} @@ -368,7 +376,7 @@ export function CustomSelectionTable({ handlePageChange(pageIndex)} @@ -379,13 +387,16 @@ export function CustomSelectionTable({ } CustomSelectionTable.propTypes = { + checkboxDisabledCheck: PropTypes.func, columns: PropTypes.array.isRequired, filterDefaultFields: PropTypes.array, filters: PropTypes.array, items: PropTypes.array.isRequired, + itemsPerPage: PropTypes.number, onTableChange: PropTypes.func.isRequired, + radioDisabledCheck: PropTypes.func, selectedId: PropTypes.array, singleSelection: PropTypes.bool, sortableProperties: PropTypes.object, - timeseriesOnly: PropTypes.bool, + tableItemId: PropTypes.string, }; diff --git a/x-pack/plugins/ml/public/application/components/job_selector/custom_selection_table/index.js b/x-pack/plugins/ml/public/application/components/custom_selection_table/index.js similarity index 100% rename from x-pack/plugins/ml/public/application/components/job_selector/custom_selection_table/index.js rename to x-pack/plugins/ml/public/application/components/custom_selection_table/index.js diff --git a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js index 4eeef560dd6d1..7b104ea372ae5 100644 --- a/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js +++ b/x-pack/plugins/ml/public/application/components/job_selector/job_selector_table/job_selector_table.js @@ -6,7 +6,7 @@ import React, { Fragment, useState, useEffect } from 'react'; import { PropTypes } from 'prop-types'; -import { CustomSelectionTable } from '../custom_selection_table'; +import { CustomSelectionTable } from '../../custom_selection_table'; import { JobSelectorBadge } from '../job_selector_badge'; import { TimeRangeBar } from '../timerange_bar'; @@ -107,7 +107,7 @@ export function JobSelectorTable({ id: 'checkbox', isCheckbox: true, textOnly: false, - width: '24px', + width: '32px', }, { label: 'job ID', @@ -157,6 +157,9 @@ export function JobSelectorTable({ filterDefaultFields={!singleSelection ? JOB_FILTER_FIELDS : undefined} items={jobs} onTableChange={(selectionFromTable) => onSelection({ selectionFromTable })} + radioDisabledCheck={(item) => { + return timeseriesOnly && item.isSingleMetricViewerJob === false; + }} selectedIds={selectedIds} singleSelection={singleSelection} sortableProperties={sortableProperties} diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js index 0f3b484402819..eed57aaf1b491 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js @@ -402,7 +402,14 @@ class RuleEditorFlyoutUI extends Component { } ) ); - this.closeFlyout(); + const updatedJob = mlJobService.getJob(anomaly.jobId); + const updatedDetector = updatedJob.analysis_config.detectors[detectorIndex]; + const updatedRules = updatedDetector.custom_rules; + if (!updatedRules) { + this.closeFlyout(); + } else { + this.setState({ job: { ...updatedJob } }); + } } else { toasts.addDanger( i18n.translate( diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js index 309e271ad26a4..c2f5820f84a9e 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js @@ -32,7 +32,7 @@ export function SelectRuleAction({ if (rules.length > 0) { ruleActionPanels = rules.map((rule, index) => { return ( - + { + if (arg === undefined) return false; const keys = Object.keys(arg); return keys.length === 1 && keys[0] === 'bool'; }; export const isQueryStringQuery = (arg: any): arg is QueryStringQuery => { + if (arg === undefined) return false; const keys = Object.keys(arg); return keys.length === 1 && keys[0] === 'query_string'; }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/common/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/common/index.ts index 400902c152c9e..58343e26153cc 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/common/index.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/common/index.ts @@ -17,6 +17,7 @@ export { IndexPattern, REFRESH_ANALYTICS_LIST_STATE, ANALYSIS_CONFIG_TYPE, + OUTLIER_ANALYSIS_METHOD, RegressionEvaluateResponse, getValuesFromResponse, loadEvalData, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step.tsx new file mode 100644 index 0000000000000..f957dcab2e87e --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step.tsx @@ -0,0 +1,32 @@ +/* + * 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, { FC } from 'react'; +import { EuiForm } from '@elastic/eui'; + +import { CreateAnalyticsStepProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { AdvancedStepForm } from './advanced_step_form'; +import { AdvancedStepDetails } from './advanced_step_details'; +import { ANALYTICS_STEPS } from '../../page'; + +export const AdvancedStep: FC = ({ + actions, + state, + step, + setCurrentStep, + stepActivated, +}) => { + return ( + + {step === ANALYTICS_STEPS.ADVANCED && ( + + )} + {step !== ANALYTICS_STEPS.ADVANCED && stepActivated === true && ( + + )} + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_details.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_details.tsx new file mode 100644 index 0000000000000..a9c8b6d4040ad --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_details.tsx @@ -0,0 +1,274 @@ +/* + * 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, { FC, Fragment } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiButtonEmpty, + EuiDescriptionList, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import { + UNSET_CONFIG_ITEM, + State, +} from '../../../analytics_management/hooks/use_create_analytics_form/state'; +import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics'; +import { ANALYTICS_STEPS } from '../../page'; + +function getStringValue(value: number | undefined) { + return value !== undefined ? `${value}` : UNSET_CONFIG_ITEM; +} + +export interface ListItems { + title: string; + description: string | JSX.Element; +} + +export const AdvancedStepDetails: FC<{ setCurrentStep: any; state: State }> = ({ + setCurrentStep, + state, +}) => { + const { form, isJobCreated } = state; + const { + computeFeatureInfluence, + dependentVariable, + eta, + featureBagFraction, + featureInfluenceThreshold, + gamma, + jobType, + lambda, + method, + maxTrees, + modelMemoryLimit, + nNeighbors, + numTopClasses, + numTopFeatureImportanceValues, + outlierFraction, + predictionFieldName, + randomizeSeed, + standardizationEnabled, + } = form; + + const isRegOrClassJob = + jobType === ANALYSIS_CONFIG_TYPE.REGRESSION || jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION; + + const advancedFirstCol: ListItems[] = []; + const advancedSecondCol: ListItems[] = []; + const advancedThirdCol: ListItems[] = []; + + const hyperFirstCol: ListItems[] = []; + const hyperSecondCol: ListItems[] = []; + const hyperThirdCol: ListItems[] = []; + + if (jobType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION) { + advancedFirstCol.push({ + title: i18n.translate( + 'xpack.ml.dataframe.analytics.create.configDetails.computeFeatureInfluence', + { + defaultMessage: 'Compute feature influence', + } + ), + description: computeFeatureInfluence, + }); + + advancedSecondCol.push({ + title: i18n.translate( + 'xpack.ml.dataframe.analytics.create.configDetails.featureInfluenceThreshold', + { + defaultMessage: 'Feature influence threshold', + } + ), + description: getStringValue(featureInfluenceThreshold), + }); + + advancedThirdCol.push({ + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.modelMemoryLimit', { + defaultMessage: 'Model memory limit', + }), + description: `${modelMemoryLimit}`, + }); + + hyperFirstCol.push( + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.nNeighbors', { + defaultMessage: 'N neighbors', + }), + description: getStringValue(nNeighbors), + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.outlierFraction', { + defaultMessage: 'Outlier fraction', + }), + description: getStringValue(outlierFraction), + } + ); + + hyperSecondCol.push({ + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.method', { + defaultMessage: 'Method', + }), + description: method !== undefined ? method : UNSET_CONFIG_ITEM, + }); + + hyperThirdCol.push({ + title: i18n.translate( + 'xpack.ml.dataframe.analytics.create.configDetails.standardizationEnabled', + { + defaultMessage: 'Standardization enabled', + } + ), + description: `${standardizationEnabled}`, + }); + } + + if (isRegOrClassJob) { + if (jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION) { + advancedFirstCol.push({ + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.numTopClasses', { + defaultMessage: 'Top classes', + }), + description: `${numTopClasses}`, + }); + } + + advancedFirstCol.push({ + title: i18n.translate( + 'xpack.ml.dataframe.analytics.create.configDetails.numTopFeatureImportanceValues', + { + defaultMessage: 'Top feature importance values', + } + ), + description: `${numTopFeatureImportanceValues}`, + }); + + hyperFirstCol.push( + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.lambdaFields', { + defaultMessage: 'Lambda', + }), + description: getStringValue(lambda), + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.eta', { + defaultMessage: 'Eta', + }), + description: getStringValue(eta), + } + ); + + advancedSecondCol.push({ + title: i18n.translate( + 'xpack.ml.dataframe.analytics.create.configDetails.predictionFieldName', + { + defaultMessage: 'Prediction field name', + } + ), + description: predictionFieldName ? predictionFieldName : `${dependentVariable}_prediction`, + }); + + hyperSecondCol.push( + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.maxTreesFields', { + defaultMessage: 'Max trees', + }), + description: getStringValue(maxTrees), + }, + { + title: i18n.translate( + 'xpack.ml.dataframe.analytics.create.configDetails.featureBagFraction', + { + defaultMessage: 'Feature bag fraction', + } + ), + description: getStringValue(featureBagFraction), + } + ); + + advancedThirdCol.push({ + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.modelMemoryLimit', { + defaultMessage: 'Model memory limit', + }), + description: `${modelMemoryLimit}`, + }); + + hyperThirdCol.push( + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.gamma', { + defaultMessage: 'Gamma', + }), + description: getStringValue(gamma), + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.randomizedSeed', { + defaultMessage: 'Randomized seed', + }), + description: getStringValue(randomizeSeed), + } + ); + } + + return ( + + +

+ {i18n.translate('xpack.ml.dataframe.analytics.create.advancedConfigDetailsTitle', { + defaultMessage: 'Advanced configuration', + })} +

+
+ + + + + + + + + + + + + + +

+ {i18n.translate('xpack.ml.dataframe.analytics.create.hyperParametersDetailsTitle', { + defaultMessage: 'Hyper parameters', + })} +

+
+ + + + + + + + + + + + + + {!isJobCreated && ( + { + setCurrentStep(ANALYTICS_STEPS.ADVANCED); + }} + > + {i18n.translate('xpack.ml.dataframe.analytics.create.advancedDetails.editButtonText', { + defaultMessage: 'Edit', + })} + + )} +
+ ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx new file mode 100644 index 0000000000000..8b137ac72361c --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx @@ -0,0 +1,332 @@ +/* + * 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, { FC, Fragment, useMemo } from 'react'; +import { + EuiAccordion, + EuiFieldNumber, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiSelect, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { HyperParameters } from './hyper_parameters'; +import { CreateAnalyticsStepProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { getModelMemoryLimitErrors } from '../../../analytics_management/hooks/use_create_analytics_form/reducer'; +import { + ANALYSIS_CONFIG_TYPE, + NUM_TOP_FEATURE_IMPORTANCE_VALUES_MIN, +} from '../../../../common/analytics'; +import { DEFAULT_MODEL_MEMORY_LIMIT } from '../../../analytics_management/hooks/use_create_analytics_form/state'; +import { ANALYTICS_STEPS } from '../../page'; +import { ContinueButton } from '../continue_button'; +import { OutlierHyperParameters } from './outlier_hyper_parameters'; + +export function getNumberValue(value?: number) { + return value === undefined ? '' : +value; +} + +export const AdvancedStepForm: FC = ({ + actions, + state, + setCurrentStep, +}) => { + const { setFormState } = actions; + const { form, isJobCreated } = state; + const { + computeFeatureInfluence, + featureInfluenceThreshold, + jobType, + modelMemoryLimit, + modelMemoryLimitValidationResult, + numTopClasses, + numTopFeatureImportanceValues, + numTopFeatureImportanceValuesValid, + predictionFieldName, + } = form; + + const mmlErrors = useMemo(() => getModelMemoryLimitErrors(modelMemoryLimitValidationResult), [ + modelMemoryLimitValidationResult, + ]); + + const isRegOrClassJob = + jobType === ANALYSIS_CONFIG_TYPE.REGRESSION || jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION; + + const mmlInvalid = modelMemoryLimitValidationResult !== null; + + const outlierDetectionAdvancedConfig = ( + + + + { + setFormState({ + computeFeatureInfluence: e.target.value, + }); + }} + /> + + + + + + setFormState({ + featureInfluenceThreshold: e.target.value === '' ? undefined : +e.target.value, + }) + } + data-test-subj="mlAnalyticsCreateJobWizardFeatureInfluenceThresholdInput" + min={0} + max={1} + step={0.001} + value={getNumberValue(featureInfluenceThreshold)} + /> + + + + ); + + const regAndClassAdvancedConfig = ( + + + + {i18n.translate( + 'xpack.ml.dataframe.analytics.create.numTopFeatureImportanceValuesErrorText', + { + defaultMessage: 'Invalid maximum number of feature importance values.', + } + )} + , + ] + : []), + ]} + > + + setFormState({ + numTopFeatureImportanceValues: e.target.value === '' ? undefined : +e.target.value, + }) + } + step={1} + value={getNumberValue(numTopFeatureImportanceValues)} + /> + + + + _prediction.', + } + )} + > + setFormState({ predictionFieldName: e.target.value })} + data-test-subj="mlAnalyticsCreateJobWizardPredictionFieldNameInput" + /> + + +
+ ); + + return ( + + +

+ {i18n.translate('xpack.ml.dataframe.analytics.create.advancedConfigSectionTitle', { + defaultMessage: 'Advanced configuration', + })} +

+
+ + {jobType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION && outlierDetectionAdvancedConfig} + {isRegOrClassJob && regAndClassAdvancedConfig} + {jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION && ( + + + + setFormState({ + numTopClasses: e.target.value === '' ? undefined : +e.target.value, + }) + } + step={1} + value={getNumberValue(numTopClasses)} + /> + + + )} + + + setFormState({ modelMemoryLimit: e.target.value })} + isInvalid={mmlInvalid} + data-test-subj="mlAnalyticsCreateJobWizardModelMemoryInput" + /> + + + + + +

+ {i18n.translate('xpack.ml.dataframe.analytics.create.hyperParametersSectionTitle', { + defaultMessage: 'Hyper parameters', + })} +

+ + } + initialIsOpen={false} + data-test-subj="mlAnalyticsCreateJobWizardHyperParametersSection" + > + + {jobType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION && ( + + )} + {isRegOrClassJob && } + +
+ + { + setCurrentStep(ANALYTICS_STEPS.DETAILS); + }} + /> +
+ ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/hyper_parameters.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/hyper_parameters.tsx new file mode 100644 index 0000000000000..144a062106003 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/hyper_parameters.tsx @@ -0,0 +1,188 @@ +/* + * 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, { FC, Fragment } from 'react'; +import { EuiFieldNumber, EuiFlexItem, EuiFormRow } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { CreateAnalyticsFormProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { getNumberValue } from './advanced_step_form'; + +const MAX_TREES_LIMIT = 2000; + +export const HyperParameters: FC = ({ actions, state }) => { + const { setFormState } = actions; + + const { eta, featureBagFraction, gamma, lambda, maxTrees, randomizeSeed } = state.form; + + return ( + + + + + setFormState({ lambda: e.target.value === '' ? undefined : +e.target.value }) + } + step={0.001} + min={0} + value={getNumberValue(lambda)} + /> + + + + + + setFormState({ maxTrees: e.target.value === '' ? undefined : +e.target.value }) + } + isInvalid={maxTrees !== undefined && !Number.isInteger(maxTrees)} + step={1} + min={1} + max={MAX_TREES_LIMIT} + value={getNumberValue(maxTrees)} + /> + + + + + + setFormState({ gamma: e.target.value === '' ? undefined : +e.target.value }) + } + step={0.001} + min={0} + value={getNumberValue(gamma)} + /> + + + + + + setFormState({ eta: e.target.value === '' ? undefined : +e.target.value }) + } + step={0.001} + min={0.001} + max={1} + value={getNumberValue(eta)} + /> + + + + + + setFormState({ + featureBagFraction: e.target.value === '' ? undefined : +e.target.value, + }) + } + isInvalid={ + featureBagFraction !== undefined && + (featureBagFraction > 1 || featureBagFraction <= 0) + } + step={0.001} + max={1} + value={getNumberValue(featureBagFraction)} + /> + + + + + + setFormState({ randomizeSeed: e.target.value === '' ? undefined : +e.target.value }) + } + isInvalid={randomizeSeed !== undefined && typeof randomizeSeed !== 'number'} + value={getNumberValue(randomizeSeed)} + step={1} + /> + + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/index.ts new file mode 100644 index 0000000000000..6a19e55b533c1 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { AdvancedStep } from './advanced_step'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx new file mode 100644 index 0000000000000..dfe7969d8a6d9 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx @@ -0,0 +1,153 @@ +/* + * 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, { FC, Fragment } from 'react'; +import { EuiFieldNumber, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { OUTLIER_ANALYSIS_METHOD } from '../../../../common/analytics'; +import { CreateAnalyticsFormProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { getNumberValue } from './advanced_step_form'; + +export const OutlierHyperParameters: FC = ({ actions, state }) => { + const { setFormState } = actions; + + const { method, nNeighbors, outlierFraction, standardizationEnabled } = state.form; + + return ( + + + + ({ + value: outlierMethod, + text: outlierMethod, + }))} + value={method} + hasNoInitialSelection={true} + onChange={(e) => { + setFormState({ method: e.target.value }); + }} + data-test-subj="mlAnalyticsCreateJobWizardMethodInput" + /> + + + + + + setFormState({ nNeighbors: e.target.value === '' ? undefined : +e.target.value }) + } + step={1} + min={1} + value={getNumberValue(nNeighbors)} + /> + + + + + + setFormState({ outlierFraction: e.target.value === '' ? undefined : +e.target.value }) + } + step={0.001} + min={0} + max={1} + value={getNumberValue(outlierFraction)} + /> + + + + + { + setFormState({ standardizationEnabled: e.target.value }); + }} + /> + + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx new file mode 100644 index 0000000000000..e437d27372a3e --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx @@ -0,0 +1,35 @@ +/* + * 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, { FC, Fragment } from 'react'; +import { EuiCard, EuiHorizontalRule, EuiIcon } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +function redirectToAnalyticsManagementPage() { + window.location.href = '#/data_frame_analytics?'; +} + +export const BackToListPanel: FC = () => ( + + + } + title={i18n.translate('xpack.ml.dataframe.analytics.create.analyticsListCardTitle', { + defaultMessage: 'Data Frame Analytics', + })} + description={i18n.translate( + 'xpack.ml.dataframe.analytics.create.analyticsListCardDescription', + { + defaultMessage: 'Return to the analytics management page.', + } + )} + onClick={redirectToAnalyticsManagementPage} + data-test-subj="analyticsWizardCardManagement" + /> + +); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/index.ts new file mode 100644 index 0000000000000..4da6561562879 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { BackToListPanel } from './back_to_list_panel'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx new file mode 100644 index 0000000000000..ad540285e49f0 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx @@ -0,0 +1,207 @@ +/* + * 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, { FC, Fragment, memo, useEffect, useState } from 'react'; +import { EuiCallOut, EuiFormRow, EuiPanel, EuiSpacer, EuiText } from '@elastic/eui'; +// @ts-ignore no declaration +import { LEFT_ALIGNMENT, CENTER_ALIGNMENT, SortableProperties } from '@elastic/eui/lib/services'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { FieldSelectionItem } from '../../../../common/analytics'; +// @ts-ignore could not find declaration file +import { CustomSelectionTable } from '../../../../../components/custom_selection_table'; + +const columns = [ + { + id: 'checkbox', + isCheckbox: true, + textOnly: false, + width: '32px', + }, + { + label: i18n.translate('xpack.ml.dataframe.analytics.create.analyticsTable.fieldNameColumn', { + defaultMessage: 'Field name', + }), + id: 'name', + isSortable: true, + alignment: LEFT_ALIGNMENT, + }, + { + id: 'mapping_types', + label: i18n.translate('xpack.ml.dataframe.analytics.create.analyticsTable.mappingColumn', { + defaultMessage: 'Mapping', + }), + isSortable: false, + alignment: LEFT_ALIGNMENT, + }, + { + label: i18n.translate('xpack.ml.dataframe.analytics.create.analyticsTable.isIncludedColumn', { + defaultMessage: 'Is included', + }), + id: 'is_included', + alignment: LEFT_ALIGNMENT, + isSortable: true, + // eslint-disable-next-line @typescript-eslint/camelcase + render: ({ is_included }: { is_included: boolean }) => (is_included ? 'Yes' : 'No'), + }, + { + label: i18n.translate('xpack.ml.dataframe.analytics.create.analyticsTable.isRequiredColumn', { + defaultMessage: 'Is required', + }), + id: 'is_required', + alignment: LEFT_ALIGNMENT, + isSortable: true, + // eslint-disable-next-line @typescript-eslint/camelcase + render: ({ is_required }: { is_required: boolean }) => (is_required ? 'Yes' : 'No'), + }, + { + label: i18n.translate('xpack.ml.dataframe.analytics.create.analyticsTable.reasonColumn', { + defaultMessage: 'Reason', + }), + id: 'reason', + alignment: LEFT_ALIGNMENT, + isSortable: false, + }, +]; + +const checkboxDisabledCheck = (item: FieldSelectionItem) => + (item.is_included === false && !item.reason?.includes('in excludes list')) || + item.is_required === true; + +export const MemoizedAnalysisFieldsTable: FC<{ + excludes: string[]; + loadingItems: boolean; + setFormState: any; + tableItems: FieldSelectionItem[]; +}> = memo( + ({ excludes, loadingItems, setFormState, tableItems }) => { + const [sortableProperties, setSortableProperties] = useState(); + const [currentSelection, setCurrentSelection] = useState([]); + + useEffect(() => { + if (excludes.length > 0) { + setCurrentSelection(excludes); + } + }, []); + + // Only set form state on unmount to prevent re-renders due to props changing if exludes was updated on each selection + useEffect(() => { + return () => { + setFormState({ excludes: currentSelection }); + }; + }, [currentSelection]); + + useEffect(() => { + let sortablePropertyItems = []; + const defaultSortProperty = 'name'; + + sortablePropertyItems = [ + { + name: 'name', + getValue: (item: any) => item.name.toLowerCase(), + isAscending: true, + }, + { + name: 'is_included', + getValue: (item: any) => item.is_included, + isAscending: true, + }, + { + name: 'is_required', + getValue: (item: any) => item.is_required, + isAscending: true, + }, + ]; + const sortableProps = new SortableProperties(sortablePropertyItems, defaultSortProperty); + + setSortableProperties(sortableProps); + }, []); + + const filters = [ + { + type: 'field_value_selection', + field: 'is_included', + name: i18n.translate('xpack.ml.dataframe.analytics.create.excludedFilterLabel', { + defaultMessage: 'Is included', + }), + multiSelect: false, + options: [ + { + value: true, + view: ( + + {i18n.translate('xpack.ml.dataframe.analytics.create.isIncludedOption', { + defaultMessage: 'Yes', + })} + + ), + }, + { + value: false, + view: ( + + {i18n.translate('xpack.ml.dataframe.analytics.create.isNotIncludedOption', { + defaultMessage: 'No', + })} + + ), + }, + ], + }, + ]; + + return ( + + + + + {tableItems.length === 0 && ( + + + + )} + {tableItems.length > 0 && ( + + { + setCurrentSelection(selection); + }} + selectedIds={currentSelection} + singleSelection={false} + sortableProperties={sortableProperties} + tableItemId={'name'} + /> + + )} + + + ); + }, + (prevProps, nextProps) => prevProps.tableItems.length === nextProps.tableItems.length +); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step.tsx new file mode 100644 index 0000000000000..220910535aafe --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step.tsx @@ -0,0 +1,35 @@ +/* + * 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, { FC } from 'react'; +import { EuiForm } from '@elastic/eui'; + +import { CreateAnalyticsStepProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { ConfigurationStepDetails } from './configuration_step_details'; +import { ConfigurationStepForm } from './configuration_step_form'; +import { ANALYTICS_STEPS } from '../../page'; + +export const ConfigurationStep: FC = ({ + actions, + state, + setCurrentStep, + step, + stepActivated, +}) => { + return ( + + {step === ANALYTICS_STEPS.CONFIGURATION && ( + + )} + {step !== ANALYTICS_STEPS.CONFIGURATION && stepActivated === true && ( + + )} + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx new file mode 100644 index 0000000000000..6603af9aa302e --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_details.tsx @@ -0,0 +1,115 @@ +/* + * 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, { FC, Fragment } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiButtonEmpty, + EuiDescriptionList, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, +} from '@elastic/eui'; +import { + State, + UNSET_CONFIG_ITEM, +} from '../../../analytics_management/hooks/use_create_analytics_form/state'; +import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics'; +import { useMlContext } from '../../../../../contexts/ml'; +import { ANALYTICS_STEPS } from '../../page'; + +interface Props { + setCurrentStep: React.Dispatch>; + state: State; +} + +export const ConfigurationStepDetails: FC = ({ setCurrentStep, state }) => { + const mlContext = useMlContext(); + const { currentIndexPattern } = mlContext; + const { form, isJobCreated } = state; + const { dependentVariable, excludes, jobConfigQueryString, jobType, trainingPercent } = form; + + const isJobTypeWithDepVar = + jobType === ANALYSIS_CONFIG_TYPE.REGRESSION || jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION; + + const detailsFirstCol = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.sourceIndex', { + defaultMessage: 'Source index', + }), + description: currentIndexPattern.title || UNSET_CONFIG_ITEM, + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.Query', { + defaultMessage: 'Query', + }), + description: jobConfigQueryString || UNSET_CONFIG_ITEM, + }, + ]; + + const detailsSecondCol = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.jobType', { + defaultMessage: 'Job type', + }), + description: jobType! as string, + }, + ]; + + const detailsThirdCol = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.excludedFields', { + defaultMessage: 'Excluded fields', + }), + description: excludes.length > 0 ? excludes.join(', ') : UNSET_CONFIG_ITEM, + }, + ]; + + if (isJobTypeWithDepVar) { + detailsSecondCol.push({ + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.trainingPercent', { + defaultMessage: 'Training percent', + }), + description: `${trainingPercent}`, + }); + detailsThirdCol.unshift({ + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.dependentVariable', { + defaultMessage: 'Dependent variable', + }), + description: dependentVariable, + }); + } + + return ( + + + + + + + + + + + + + + {!isJobCreated && ( + { + setCurrentStep(ANALYTICS_STEPS.CONFIGURATION); + }} + > + {i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.editButtonText', { + defaultMessage: 'Edit', + })} + + )} + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx new file mode 100644 index 0000000000000..9446dfd4ed525 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx @@ -0,0 +1,449 @@ +/* + * 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, { FC, Fragment, useEffect, useRef } from 'react'; +import { EuiBadge, EuiComboBox, EuiFormRow, EuiRange, EuiSpacer, EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { debounce } from 'lodash'; + +import { newJobCapsService } from '../../../../../services/new_job_capabilities_service'; +import { useMlContext } from '../../../../../contexts/ml'; + +import { + DfAnalyticsExplainResponse, + FieldSelectionItem, + ANALYSIS_CONFIG_TYPE, + TRAINING_PERCENT_MIN, + TRAINING_PERCENT_MAX, +} from '../../../../common/analytics'; +import { CreateAnalyticsStepProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { Messages } from '../../../analytics_management/components/create_analytics_form/messages'; +import { + DEFAULT_MODEL_MEMORY_LIMIT, + getJobConfigFromFormState, + State, +} from '../../../analytics_management/hooks/use_create_analytics_form/state'; +import { shouldAddAsDepVarOption } from '../../../analytics_management/components/create_analytics_form/form_options_validation'; +import { ml } from '../../../../../services/ml_api_service'; +import { getToastNotifications } from '../../../../../util/dependency_cache'; + +import { ANALYTICS_STEPS } from '../../page'; +import { ContinueButton } from '../continue_button'; +import { JobType } from './job_type'; +import { SupportedFieldsMessage } from './supported_fields_message'; +import { MemoizedAnalysisFieldsTable } from './analysis_fields_table'; +import { DataGrid } from '../../../../../components/data_grid'; +import { useIndexData } from '../../hooks'; +import { ExplorationQueryBar } from '../../../analytics_exploration/components/exploration_query_bar'; +import { useSavedSearch } from './use_saved_search'; + +const requiredFieldsErrorText = i18n.translate( + 'xpack.ml.dataframe.analytics.createWizard.requiredFieldsErrorMessage', + { + defaultMessage: 'At least one field must be included in the analysis.', + } +); + +export const ConfigurationStepForm: FC = ({ + actions, + state, + setCurrentStep, +}) => { + const mlContext = useMlContext(); + const { currentSavedSearch, currentIndexPattern } = mlContext; + const { savedSearchQuery, savedSearchQueryStr } = useSavedSearch(); + + const { initiateWizard, setEstimatedModelMemoryLimit, setFormState } = actions; + const { estimatedModelMemoryLimit, form, isJobCreated, requestMessages } = state; + const firstUpdate = useRef(true); + const { + dependentVariable, + dependentVariableFetchFail, + dependentVariableOptions, + excludes, + excludesTableItems, + fieldOptionsFetchFail, + jobConfigQuery, + jobConfigQueryString, + jobType, + loadingDepVarOptions, + loadingFieldOptions, + maxDistinctValuesError, + modelMemoryLimit, + previousJobType, + requiredFieldsError, + trainingPercent, + } = form; + + const setJobConfigQuery = ({ query, queryString }: { query: any; queryString: string }) => { + setFormState({ jobConfigQuery: query, jobConfigQueryString: queryString }); + }; + + const indexData = useIndexData( + currentIndexPattern, + savedSearchQuery !== undefined ? savedSearchQuery : jobConfigQuery + ); + + const indexPreviewProps = { + ...indexData, + dataTestSubj: 'mlAnalyticsCreationDataGrid', + toastNotifications: getToastNotifications(), + }; + + const isJobTypeWithDepVar = + jobType === ANALYSIS_CONFIG_TYPE.REGRESSION || jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION; + + const dependentVariableEmpty = isJobTypeWithDepVar && dependentVariable === ''; + + const isStepInvalid = + dependentVariableEmpty || + jobType === undefined || + maxDistinctValuesError !== undefined || + requiredFieldsError !== undefined; + + const loadDepVarOptions = async (formState: State['form']) => { + setFormState({ + loadingDepVarOptions: true, + maxDistinctValuesError: undefined, + }); + try { + if (currentIndexPattern !== undefined) { + const formStateUpdate: { + loadingDepVarOptions: boolean; + dependentVariableFetchFail: boolean; + dependentVariableOptions: State['form']['dependentVariableOptions']; + dependentVariable?: State['form']['dependentVariable']; + } = { + loadingDepVarOptions: false, + dependentVariableFetchFail: false, + dependentVariableOptions: [] as State['form']['dependentVariableOptions'], + }; + + // Get fields and filter for supported types for job type + const { fields } = newJobCapsService; + + let resetDependentVariable = true; + for (const field of fields) { + if (shouldAddAsDepVarOption(field, jobType)) { + formStateUpdate.dependentVariableOptions.push({ + label: field.id, + }); + + if (formState.dependentVariable === field.id) { + resetDependentVariable = false; + } + } + } + + if (resetDependentVariable) { + formStateUpdate.dependentVariable = ''; + } + + setFormState(formStateUpdate); + } + } catch (e) { + setFormState({ loadingDepVarOptions: false, dependentVariableFetchFail: true }); + } + }; + + const debouncedGetExplainData = debounce(async () => { + const jobTypeChanged = previousJobType !== jobType; + const shouldUpdateModelMemoryLimit = !firstUpdate.current || !modelMemoryLimit; + const shouldUpdateEstimatedMml = + !firstUpdate.current || !modelMemoryLimit || estimatedModelMemoryLimit === ''; + + if (firstUpdate.current) { + firstUpdate.current = false; + } + // Reset if jobType changes (jobType requires dependent_variable to be set - + // which won't be the case if switching from outlier detection) + if (jobTypeChanged) { + setFormState({ + loadingFieldOptions: true, + }); + } + + try { + const jobConfig = getJobConfigFromFormState(form); + delete jobConfig.dest; + delete jobConfig.model_memory_limit; + const resp: DfAnalyticsExplainResponse = await ml.dataFrameAnalytics.explainDataFrameAnalytics( + jobConfig + ); + const expectedMemoryWithoutDisk = resp.memory_estimation?.expected_memory_without_disk; + + if (shouldUpdateEstimatedMml) { + setEstimatedModelMemoryLimit(expectedMemoryWithoutDisk); + } + + const fieldSelection: FieldSelectionItem[] | undefined = resp.field_selection; + + let hasRequiredFields = false; + if (fieldSelection) { + for (let i = 0; i < fieldSelection.length; i++) { + const field = fieldSelection[i]; + if (field.is_included === true && field.is_required === false) { + hasRequiredFields = true; + break; + } + } + } + + // If job type has changed load analysis field options again + if (jobTypeChanged) { + setFormState({ + ...(shouldUpdateModelMemoryLimit ? { modelMemoryLimit: expectedMemoryWithoutDisk } : {}), + excludesTableItems: fieldSelection ? fieldSelection : [], + loadingFieldOptions: false, + fieldOptionsFetchFail: false, + maxDistinctValuesError: undefined, + requiredFieldsError: !hasRequiredFields ? requiredFieldsErrorText : undefined, + }); + } else { + setFormState({ + ...(shouldUpdateModelMemoryLimit ? { modelMemoryLimit: expectedMemoryWithoutDisk } : {}), + requiredFieldsError: !hasRequiredFields ? requiredFieldsErrorText : undefined, + }); + } + } catch (e) { + let errorMessage; + if ( + jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION && + e.body && + e.body.message !== undefined && + e.body.message.includes('status_exception') && + (e.body.message.includes('must have at most') || + e.body.message.includes('must have at least')) + ) { + errorMessage = e.body.message; + } + const fallbackModelMemoryLimit = + jobType !== undefined + ? DEFAULT_MODEL_MEMORY_LIMIT[jobType] + : DEFAULT_MODEL_MEMORY_LIMIT.outlier_detection; + setEstimatedModelMemoryLimit(fallbackModelMemoryLimit); + setFormState({ + fieldOptionsFetchFail: true, + maxDistinctValuesError: errorMessage, + loadingFieldOptions: false, + ...(shouldUpdateModelMemoryLimit ? { modelMemoryLimit: fallbackModelMemoryLimit } : {}), + }); + } + }, 300); + + useEffect(() => { + initiateWizard(); + }, []); + + useEffect(() => { + setFormState({ sourceIndex: currentIndexPattern.title }); + }, []); + + useEffect(() => { + if (savedSearchQueryStr !== undefined) { + setFormState({ jobConfigQuery: savedSearchQuery, jobConfigQueryString: savedSearchQueryStr }); + } + }, [JSON.stringify(savedSearchQuery), savedSearchQueryStr]); + + useEffect(() => { + if (isJobTypeWithDepVar) { + loadDepVarOptions(form); + } + }, [jobType]); + + useEffect(() => { + const hasBasicRequiredFields = jobType !== undefined; + + const hasRequiredAnalysisFields = + (isJobTypeWithDepVar && dependentVariable !== '') || + jobType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION; + + if (hasBasicRequiredFields && hasRequiredAnalysisFields) { + debouncedGetExplainData(); + } + + return () => { + debouncedGetExplainData.cancel(); + }; + }, [jobType, dependentVariable, trainingPercent, JSON.stringify(excludes), jobConfigQueryString]); + + return ( + + + + + {savedSearchQuery === undefined && ( + + + + )} + + {savedSearchQuery !== undefined && ( + + {i18n.translate('xpack.ml.dataframe.analytics.create.savedSearchLabel', { + defaultMessage: 'Saved search', + })} + + )} + + {savedSearchQuery !== undefined + ? currentSavedSearch?.attributes.title + : currentIndexPattern.title} + + + } + fullWidth + > + + + {isJobTypeWithDepVar && ( + + + {i18n.translate( + 'xpack.ml.dataframe.analytics.create.dependentVariableOptionsFetchError', + { + defaultMessage: + 'There was a problem fetching fields. Please refresh the page and try again.', + } + )} + , + ] + : []), + ...(fieldOptionsFetchFail === true && maxDistinctValuesError !== undefined + ? [ + + {i18n.translate( + 'xpack.ml.dataframe.analytics.create.dependentVariableMaxDistictValuesError', + { + defaultMessage: 'Invalid. {message}', + values: { message: maxDistinctValuesError }, + } + )} + , + ] + : []), + ]} + > + + setFormState({ + dependentVariable: selectedOptions[0].label || '', + }) + } + isClearable={false} + isInvalid={dependentVariable === ''} + data-test-subj="mlAnalyticsCreateJobWizardDependentVariableSelect" + /> + + + )} + + + + + {isJobTypeWithDepVar && ( + + setFormState({ trainingPercent: +e.target.value })} + data-test-subj="mlAnalyticsCreateJobWizardTrainingPercentSlider" + /> + + )} + + { + setCurrentStep(ANALYTICS_STEPS.ADVANCED); + }} + /> + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/index.ts new file mode 100644 index 0000000000000..ba67a6f080d45 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { ConfigurationStep } from './configuration_step'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/job_type.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/job_type.tsx new file mode 100644 index 0000000000000..f31c9cd28f65a --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/job_type.tsx @@ -0,0 +1,83 @@ +/* + * 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, { Fragment, FC } from 'react'; +import { i18n } from '@kbn/i18n'; + +import { EuiFormRow, EuiSelect } from '@elastic/eui'; +import { ANALYSIS_CONFIG_TYPE } from '../../../../common'; + +import { AnalyticsJobType } from '../../../analytics_management/hooks/use_create_analytics_form/state'; + +interface Props { + type: AnalyticsJobType; + setFormState: React.Dispatch>; +} + +export const JobType: FC = ({ type, setFormState }) => { + const outlierHelpText = i18n.translate( + 'xpack.ml.dataframe.analytics.create.outlierDetectionHelpText', + { + defaultMessage: + 'Outlier detection jobs require a source index that is mapped as a table-like data structure and analyze only numeric and boolean fields. Use the advanced editor to add custom options to the configuration.', + } + ); + + const regressionHelpText = i18n.translate( + 'xpack.ml.dataframe.analytics.create.outlierRegressionHelpText', + { + defaultMessage: + 'Regression jobs analyze only numeric fields. Use the advanced editor to apply custom options, such as the prediction field name.', + } + ); + + const classificationHelpText = i18n.translate( + 'xpack.ml.dataframe.analytics.create.classificationHelpText', + { + defaultMessage: + 'Classification jobs require a source index that is mapped as a table-like data structure and support fields that are numeric, boolean, text, keyword, or ip. Use the advanced editor to apply custom options, such as the prediction field name.', + } + ); + + const helpText = { + [ANALYSIS_CONFIG_TYPE.REGRESSION]: regressionHelpText, + [ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION]: outlierHelpText, + [ANALYSIS_CONFIG_TYPE.CLASSIFICATION]: classificationHelpText, + }; + + return ( + + + ({ + value: jobType, + text: jobType.replace(/_/g, ' '), + 'data-test-subj': `mlAnalyticsCreation-${jobType}-option`, + }))} + value={type} + hasNoInitialSelection={true} + onChange={(e) => { + const value = e.target.value as AnalyticsJobType; + setFormState({ + previousJobType: type, + jobType: value, + excludes: [], + requiredFieldsError: undefined, + }); + }} + data-test-subj="mlAnalyticsCreateJobWizardJobTypeSelect" + /> + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/supported_fields_message.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/supported_fields_message.tsx new file mode 100644 index 0000000000000..fe13cc1d6edfc --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/supported_fields_message.tsx @@ -0,0 +1,120 @@ +/* + * 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, { FC, Fragment, useState, useEffect } from 'react'; +import { EuiSpacer, EuiText } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; + +import { AnalyticsJobType } from '../../../analytics_management/hooks/use_create_analytics_form/state'; +import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics'; +import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../common/types/fields'; +import { BASIC_NUMERICAL_TYPES, EXTENDED_NUMERICAL_TYPES } from '../../../../common/fields'; +import { + OMIT_FIELDS, + CATEGORICAL_TYPES, +} from '../../../analytics_management/components/create_analytics_form/form_options_validation'; +import { ES_FIELD_TYPES } from '../../../../../../../../../../src/plugins/data/public'; +import { newJobCapsService } from '../../../../../services/new_job_capabilities_service'; + +const containsClassificationFieldsCb = ({ name, type }: Field) => + !OMIT_FIELDS.includes(name) && + name !== EVENT_RATE_FIELD_ID && + (BASIC_NUMERICAL_TYPES.has(type) || + CATEGORICAL_TYPES.has(type) || + type === ES_FIELD_TYPES.BOOLEAN); + +const containsRegressionFieldsCb = ({ name, type }: Field) => + !OMIT_FIELDS.includes(name) && + name !== EVENT_RATE_FIELD_ID && + (BASIC_NUMERICAL_TYPES.has(type) || EXTENDED_NUMERICAL_TYPES.has(type)); + +const containsOutlierFieldsCb = ({ name, type }: Field) => + !OMIT_FIELDS.includes(name) && name !== EVENT_RATE_FIELD_ID && BASIC_NUMERICAL_TYPES.has(type); + +const callbacks: Record boolean> = { + [ANALYSIS_CONFIG_TYPE.CLASSIFICATION]: containsClassificationFieldsCb, + [ANALYSIS_CONFIG_TYPE.REGRESSION]: containsRegressionFieldsCb, + [ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION]: containsOutlierFieldsCb, +}; + +const messages: Record = { + [ANALYSIS_CONFIG_TYPE.CLASSIFICATION]: ( + + ), + [ANALYSIS_CONFIG_TYPE.REGRESSION]: ( + + ), + [ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION]: ( + + ), +}; + +interface Props { + jobType: AnalyticsJobType; +} + +export const SupportedFieldsMessage: FC = ({ jobType }) => { + const [sourceIndexContainsSupportedFields, setSourceIndexContainsSupportedFields] = useState< + boolean + >(true); + const [sourceIndexFieldsCheckFailed, setSourceIndexFieldsCheckFailed] = useState(false); + const { fields } = newJobCapsService; + + // Find out if index pattern contains supported fields for job type. Provides a hint in the form + // that job may not run correctly if no supported fields are found. + const validateFields = () => { + if (fields && jobType !== undefined) { + try { + const containsSupportedFields: boolean = fields.some(callbacks[jobType]); + + setSourceIndexContainsSupportedFields(containsSupportedFields); + setSourceIndexFieldsCheckFailed(false); + } catch (e) { + setSourceIndexFieldsCheckFailed(true); + } + } + }; + + useEffect(() => { + if (jobType !== undefined) { + setSourceIndexContainsSupportedFields(true); + setSourceIndexFieldsCheckFailed(false); + validateFields(); + } + }, [jobType]); + + if (sourceIndexContainsSupportedFields === true) return null; + + if (sourceIndexFieldsCheckFailed === true) { + return ( + + + + + ); + } + + return ( + + + {jobType !== undefined && messages[jobType]} + + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/use_saved_search.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/use_saved_search.ts new file mode 100644 index 0000000000000..856358538b26f --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/use_saved_search.ts @@ -0,0 +1,50 @@ +/* + * 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 { useState, useEffect } from 'react'; +import { useMlContext } from '../../../../../contexts/ml'; +import { esQuery, esKuery } from '../../../../../../../../../../src/plugins/data/public'; +import { SEARCH_QUERY_LANGUAGE } from '../../../../../../../common/constants/search'; +import { getQueryFromSavedSearch } from '../../../../../util/index_utils'; + +export function useSavedSearch() { + const [savedSearchQuery, setSavedSearchQuery] = useState(undefined); + const [savedSearchQueryStr, setSavedSearchQueryStr] = useState(undefined); + + const mlContext = useMlContext(); + const { currentSavedSearch, currentIndexPattern, kibanaConfig } = mlContext; + + const getQueryData = () => { + let qry; + let qryString; + + if (currentSavedSearch !== null) { + const { query } = getQueryFromSavedSearch(currentSavedSearch); + const queryLanguage = query.language as SEARCH_QUERY_LANGUAGE; + qryString = query.query; + + if (queryLanguage === SEARCH_QUERY_LANGUAGE.KUERY) { + const ast = esKuery.fromKueryExpression(qryString); + qry = esKuery.toElasticsearchQuery(ast, currentIndexPattern); + } else { + qry = esQuery.luceneStringToDsl(qryString); + esQuery.decorateQuery(qry, kibanaConfig.get('query:queryString:options')); + } + + setSavedSearchQuery(qry); + setSavedSearchQueryStr(qryString); + } + }; + + useEffect(() => { + getQueryData(); + }, []); + + return { + savedSearchQuery, + savedSearchQueryStr, + }; +} diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/continue_button.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/continue_button.tsx new file mode 100644 index 0000000000000..6e95a0a246573 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/continue_button.tsx @@ -0,0 +1,34 @@ +/* + * 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, { FC } from 'react'; +import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +const continueButtonText = i18n.translate( + 'xpack.ml.dataframe.analytics.creation.continueButtonText', + { + defaultMessage: 'Continue', + } +); + +export const ContinueButton: FC<{ isDisabled: boolean; onClick: any }> = ({ + isDisabled, + onClick, +}) => ( + + + + {continueButtonText} + + + +); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx new file mode 100644 index 0000000000000..2dda5f5d819b7 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx @@ -0,0 +1,95 @@ +/* + * 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, { FC, Fragment, useState } from 'react'; +import { + EuiButton, + EuiCheckbox, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiSpacer, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { CreateAnalyticsFormProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { Messages } from '../../../analytics_management/components/create_analytics_form/messages'; +import { ANALYTICS_STEPS } from '../../page'; +import { BackToListPanel } from '../back_to_list_panel'; + +interface Props extends CreateAnalyticsFormProps { + step: ANALYTICS_STEPS; +} + +export const CreateStep: FC = ({ actions, state, step }) => { + const { createAnalyticsJob, startAnalyticsJob } = actions; + const { + isAdvancedEditorValidJson, + isJobCreated, + isJobStarted, + isModalButtonDisabled, + isValid, + requestMessages, + } = state; + + const [checked, setChecked] = useState(true); + + if (step !== ANALYTICS_STEPS.CREATE) return null; + + const handleCreation = async () => { + await createAnalyticsJob(); + + if (checked) { + startAnalyticsJob(); + } + }; + + return ( + + {!isJobCreated && !isJobStarted && ( + + + + setChecked(e.target.checked)} + /> + + + + + {i18n.translate('xpack.ml.dataframe.analytics.create.wizardCreateButton', { + defaultMessage: 'Create', + })} + + + + )} + + + {isJobCreated === true && } + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/index.ts new file mode 100644 index 0000000000000..01c8e4bff934d --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { CreateStep } from './create_step'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step.tsx new file mode 100644 index 0000000000000..a40813ed2fc3e --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step.tsx @@ -0,0 +1,32 @@ +/* + * 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, { FC } from 'react'; +import { EuiForm } from '@elastic/eui'; + +import { CreateAnalyticsStepProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { DetailsStepDetails } from './details_step_details'; +import { DetailsStepForm } from './details_step_form'; +import { ANALYTICS_STEPS } from '../../page'; + +export const DetailsStep: FC = ({ + actions, + state, + setCurrentStep, + step, + stepActivated, +}) => { + return ( + + {step === ANALYTICS_STEPS.DETAILS && ( + + )} + {step !== ANALYTICS_STEPS.DETAILS && stepActivated === true && ( + + )} + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step_details.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step_details.tsx new file mode 100644 index 0000000000000..a4d86b48006e8 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step_details.tsx @@ -0,0 +1,87 @@ +/* + * 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, { FC, Fragment } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiButtonEmpty, + EuiDescriptionList, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, +} from '@elastic/eui'; +import { State } from '../../../analytics_management/hooks/use_create_analytics_form/state'; +import { ANALYTICS_STEPS } from '../../page'; + +export interface ListItems { + title: string; + description: string | JSX.Element; +} + +export const DetailsStepDetails: FC<{ setCurrentStep: any; state: State }> = ({ + setCurrentStep, + state, +}) => { + const { form, isJobCreated } = state; + const { description, jobId, destinationIndex } = form; + + const detailsFirstCol: ListItems[] = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.jobId', { + defaultMessage: 'Job ID', + }), + description: jobId, + }, + ]; + + const detailsSecondCol: ListItems[] = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.jobDescription', { + defaultMessage: 'Job description', + }), + description, + }, + ]; + + const detailsThirdCol: ListItems[] = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.create.configDetails.destIndex', { + defaultMessage: 'Destination index', + }), + description: destinationIndex || '', + }, + ]; + + return ( + + + + + + + + + + + + + + {!isJobCreated && ( + { + setCurrentStep(ANALYTICS_STEPS.DETAILS); + }} + > + {i18n.translate('xpack.ml.dataframe.analytics.create.detailsDetails.editButtonText', { + defaultMessage: 'Edit', + })} + + )} + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step_form.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step_form.tsx new file mode 100644 index 0000000000000..67f8472e7ad14 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/details_step_form.tsx @@ -0,0 +1,221 @@ +/* + * 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, { FC, Fragment, useRef } from 'react'; +import { EuiFieldText, EuiFormRow, EuiLink, EuiSpacer, EuiSwitch, EuiTextArea } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +import { useMlKibana } from '../../../../../contexts/kibana'; +import { CreateAnalyticsStepProps } from '../../../analytics_management/hooks/use_create_analytics_form'; +import { JOB_ID_MAX_LENGTH } from '../../../../../../../common/constants/validation'; +import { ContinueButton } from '../continue_button'; +import { ANALYTICS_STEPS } from '../../page'; + +export const DetailsStepForm: FC = ({ + actions, + state, + setCurrentStep, +}) => { + const { + services: { docLinks }, + } = useMlKibana(); + const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = docLinks; + + const { setFormState } = actions; + const { form, isJobCreated } = state; + const { + createIndexPattern, + description, + destinationIndex, + destinationIndexNameEmpty, + destinationIndexNameExists, + destinationIndexNameValid, + destinationIndexPatternTitleExists, + jobId, + jobIdEmpty, + jobIdExists, + jobIdInvalidMaxLength, + jobIdValid, + } = form; + const forceInput = useRef(null); + + const isStepInvalid = + jobIdEmpty === true || + jobIdExists === true || + jobIdValid === false || + destinationIndexNameEmpty === true || + destinationIndexNameValid === false || + (destinationIndexPatternTitleExists === true && createIndexPattern === true); + + return ( + + + { + if (input) { + forceInput.current = input; + } + }} + disabled={isJobCreated} + placeholder={i18n.translate('xpack.ml.dataframe.analytics.create.jobIdPlaceholder', { + defaultMessage: 'Job ID', + })} + value={jobId} + onChange={(e) => setFormState({ jobId: e.target.value })} + aria-label={i18n.translate('xpack.ml.dataframe.analytics.create.jobIdInputAriaLabel', { + defaultMessage: 'Choose a unique analytics job ID.', + })} + isInvalid={(!jobIdEmpty && !jobIdValid) || jobIdExists || jobIdEmpty} + data-test-subj="mlAnalyticsCreateJobFlyoutJobIdInput" + /> + + + { + const value = e.target.value; + setFormState({ description: value }); + }} + data-test-subj="mlDFAnalyticsJobCreationJobDescription" + /> + + + {i18n.translate('xpack.ml.dataframe.analytics.create.destinationIndexInvalidError', { + defaultMessage: 'Invalid destination index name.', + })} +
+ + {i18n.translate( + 'xpack.ml.dataframe.stepDetailsForm.destinationIndexInvalidErrorLink', + { + defaultMessage: 'Learn more about index name limitations.', + } + )} + +
, + ] + } + > + setFormState({ destinationIndex: e.target.value })} + aria-label={i18n.translate( + 'xpack.ml.dataframe.analytics.create.destinationIndexInputAriaLabel', + { + defaultMessage: 'Choose a unique destination index name.', + } + )} + isInvalid={!destinationIndexNameEmpty && !destinationIndexNameValid} + data-test-subj="mlAnalyticsCreateJobFlyoutDestinationIndexInput" + /> + + + setFormState({ createIndexPattern: !createIndexPattern })} + data-test-subj="mlAnalyticsCreateJobWizardCreateIndexPatternSwitch" + /> + + + { + setCurrentStep(ANALYTICS_STEPS.CREATE); + }} + /> + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/index.ts new file mode 100644 index 0000000000000..6cadd87d97e27 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { DetailsStep } from './details_step'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/index.ts new file mode 100644 index 0000000000000..efd7c0634bed4 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/index.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export { ConfigurationStep } from './configuration_step/index'; +export { AdvancedStep } from './advanced_step/index'; +export { DetailsStep } from './details_step/index'; +export { CreateStep } from './create_step/index'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/index.ts new file mode 100644 index 0000000000000..5199fa1b6e4c6 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { useIndexData } from './use_index_data'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts new file mode 100644 index 0000000000000..e8f25584201e3 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts @@ -0,0 +1,103 @@ +/* + * 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 { useEffect } from 'react'; + +import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import { + getDataGridSchemaFromKibanaFieldType, + getFieldsFromKibanaIndexPattern, + useDataGrid, + useRenderCellValue, + EsSorting, + SearchResponse7, + UseIndexDataReturnType, +} from '../../../../components/data_grid'; +import { getErrorMessage } from '../../../../../../common/util/errors'; +import { INDEX_STATUS } from '../../../common/analytics'; +import { ml } from '../../../../services/ml_api_service'; + +type IndexSearchResponse = SearchResponse7; + +export const useIndexData = (indexPattern: IndexPattern, query: any): UseIndexDataReturnType => { + const indexPatternFields = getFieldsFromKibanaIndexPattern(indexPattern); + + // EuiDataGrid State + const columns = [ + ...indexPatternFields.map((id) => { + const field = indexPattern.fields.getByName(id); + const schema = getDataGridSchemaFromKibanaFieldType(field); + return { id, schema }; + }), + ]; + + const dataGrid = useDataGrid(columns); + + const { + pagination, + resetPagination, + setErrorMessage, + setRowCount, + setStatus, + setTableItems, + sortingColumns, + tableItems, + } = dataGrid; + + useEffect(() => { + resetPagination(); + // custom comparison + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [JSON.stringify(query)]); + + const getIndexData = async function () { + setErrorMessage(''); + setStatus(INDEX_STATUS.LOADING); + + const sort: EsSorting = sortingColumns.reduce((s, column) => { + s[column.id] = { order: column.direction }; + return s; + }, {} as EsSorting); + + const esSearchRequest = { + index: indexPattern.title, + body: { + // Instead of using the default query (`*`), fall back to a more efficient `match_all` query. + query, // isDefaultQuery(query) ? matchAllQuery : query, + from: pagination.pageIndex * pagination.pageSize, + size: pagination.pageSize, + ...(Object.keys(sort).length > 0 ? { sort } : {}), + }, + }; + + try { + const resp: IndexSearchResponse = await ml.esSearch(esSearchRequest); + + const docs = resp.hits.hits.map((d) => d._source); + + setRowCount(resp.hits.total.value); + setTableItems(docs); + setStatus(INDEX_STATUS.LOADED); + } catch (e) { + setErrorMessage(getErrorMessage(e)); + setStatus(INDEX_STATUS.ERROR); + } + }; + + useEffect(() => { + getIndexData(); + // custom comparison + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [indexPattern.title, JSON.stringify([query, pagination, sortingColumns])]); + + const renderCellValue = useRenderCellValue(indexPattern, pagination, tableItems); + + return { + ...dataGrid, + columns, + renderCellValue, + }; +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/index.ts new file mode 100644 index 0000000000000..7e2d651439ae3 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/index.ts @@ -0,0 +1,7 @@ +/* + * 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. + */ + +export { Page } from './page'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx new file mode 100644 index 0000000000000..def862b859162 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/page.tsx @@ -0,0 +1,191 @@ +/* + * 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, { FC, useEffect, useState } from 'react'; +import { + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiPage, + EuiPageBody, + EuiPageContent, + EuiSpacer, + EuiSteps, + EuiStepStatus, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { useMlContext } from '../../../contexts/ml'; +import { newJobCapsService } from '../../../services/new_job_capabilities_service'; +import { useCreateAnalyticsForm } from '../analytics_management/hooks/use_create_analytics_form'; +import { CreateAnalyticsAdvancedEditor } from '../analytics_management/components/create_analytics_advanced_editor'; +import { AdvancedStep, ConfigurationStep, CreateStep, DetailsStep } from './components'; + +export enum ANALYTICS_STEPS { + CONFIGURATION, + ADVANCED, + DETAILS, + CREATE, +} + +export const Page: FC = () => { + const [currentStep, setCurrentStep] = useState(ANALYTICS_STEPS.CONFIGURATION); + const [activatedSteps, setActivatedSteps] = useState([true, false, false, false]); + + const mlContext = useMlContext(); + const { currentIndexPattern } = mlContext; + + const createAnalyticsForm = useCreateAnalyticsForm(); + const { isAdvancedEditorEnabled } = createAnalyticsForm.state; + const { jobType } = createAnalyticsForm.state.form; + const { switchToAdvancedEditor } = createAnalyticsForm.actions; + + useEffect(() => { + if (activatedSteps[currentStep] === false) { + activatedSteps.splice(currentStep, 1, true); + setActivatedSteps(activatedSteps); + } + }, [currentStep]); + + useEffect(() => { + if (currentIndexPattern) { + (async function () { + await newJobCapsService.initializeFromIndexPattern(currentIndexPattern, false, false); + })(); + } + }, []); + + const analyticsWizardSteps = [ + { + title: i18n.translate('xpack.ml.dataframe.analytics.creation.configurationStepTitle', { + defaultMessage: 'Configuration', + }), + children: ( + + ), + status: + currentStep >= ANALYTICS_STEPS.CONFIGURATION ? undefined : ('incomplete' as EuiStepStatus), + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.creation.advancedStepTitle', { + defaultMessage: 'Additional options', + }), + children: ( + + ), + status: currentStep >= ANALYTICS_STEPS.ADVANCED ? undefined : ('incomplete' as EuiStepStatus), + 'data-test-subj': 'mlAnalyticsCreateJobWizardAdvancedStep', + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.creation.detailsStepTitle', { + defaultMessage: 'Job details', + }), + children: ( + + ), + status: currentStep >= ANALYTICS_STEPS.DETAILS ? undefined : ('incomplete' as EuiStepStatus), + 'data-test-subj': 'mlAnalyticsCreateJobWizardDetailsStep', + }, + { + title: i18n.translate('xpack.ml.dataframe.analytics.creation.createStepTitle', { + defaultMessage: 'Create', + }), + children: , + status: currentStep >= ANALYTICS_STEPS.CREATE ? undefined : ('incomplete' as EuiStepStatus), + 'data-test-subj': 'mlAnalyticsCreateJobWizardCreateStep', + }, + ]; + + return ( + + + + + + + + +

+ +

+
+
+ +

+ +

+
+
+
+ {isAdvancedEditorEnabled === false && ( + + + + + {i18n.translate( + 'xpack.ml.dataframe.analytics.create.switchToJsonEditorSwitch', + { + defaultMessage: 'Switch to json editor', + } + )} + + + + + )} +
+ + {isAdvancedEditorEnabled === true && ( + + )} + {isAdvancedEditorEnabled === false && ( + + )} +
+
+
+ ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx index f95e6a93058ba..8c158c1ca14a0 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Dispatch, FC, SetStateAction, useState } from 'react'; +import React, { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'; import { EuiCode, EuiInputPopover } from '@elastic/eui'; @@ -30,11 +30,15 @@ interface ErrorMessage { interface ExplorationQueryBarProps { indexPattern: IIndexPattern; setSearchQuery: Dispatch>; + includeQueryString?: boolean; + defaultQueryString?: string; } export const ExplorationQueryBar: FC = ({ indexPattern, setSearchQuery, + includeQueryString = false, + defaultQueryString, }) => { // The internal state of the input query bar updated on every key stroke. const [searchInput, setSearchInput] = useState({ @@ -44,20 +48,34 @@ export const ExplorationQueryBar: FC = ({ const [errorMessage, setErrorMessage] = useState(undefined); + useEffect(() => { + if (defaultQueryString !== undefined) { + setSearchInput({ query: defaultQueryString, language: SEARCH_QUERY_LANGUAGE.KUERY }); + } + }, []); + const searchChangeHandler = (query: Query) => setSearchInput(query); const searchSubmitHandler = (query: Query) => { try { switch (query.language) { case SEARCH_QUERY_LANGUAGE.KUERY: + const convertedKQuery = esKuery.toElasticsearchQuery( + esKuery.fromKueryExpression(query.query as string), + indexPattern + ); setSearchQuery( - esKuery.toElasticsearchQuery( - esKuery.fromKueryExpression(query.query as string), - indexPattern - ) + includeQueryString + ? { queryString: query.query, query: convertedKQuery } + : convertedKQuery ); return; case SEARCH_QUERY_LANGUAGE.LUCENE: - setSearchQuery(esQuery.luceneStringToDsl(query.query as string)); + const convertedLQuery = esQuery.luceneStringToDsl(query.query as string); + setSearchQuery( + includeQueryString + ? { queryString: query.query, query: convertedLQuery } + : convertedLQuery + ); return; } } catch (e) { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx index 0154f92576c4a..58f8528236bb9 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx @@ -73,6 +73,7 @@ export const OutlierExploration: FC = React.memo(({ jobId }) = ); } + /* eslint-disable-next-line react-hooks/rules-of-hooks */ const colorRange = useColorRange( COLOR_RANGE.BLUE, COLOR_RANGE_SCALE.INFLUENCER, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx index 72514c91ff58b..295a3988e1b58 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButtonEmpty, EuiToolTip } from '@elastic/eui'; -import { DeepReadonly } from '../../../../../../../common/types/common'; +// import { DeepReadonly } from '../../../../../../../common/types/common'; import { checkPermission, @@ -21,7 +21,7 @@ import { isClassificationAnalysis, } from '../../../../common/analytics'; import { CreateAnalyticsFormProps } from '../../hooks/use_create_analytics_form'; -import { CloneAction } from './action_clone'; +// import { CloneAction } from './action_clone'; import { getResultsUrl, isDataFrameAnalyticsRunning, DataFrameAnalyticsListRow } from './common'; import { stopAnalytics } from '../../services/analytics_service'; @@ -106,10 +106,10 @@ export const getActions = (createAnalyticsForm: CreateAnalyticsFormProps) => { return ; }, }, - { - render: (item: DeepReadonly) => { - return ; - }, - }, + // { + // render: (item: DeepReadonly) => { + // return ; + // }, + // }, ]; }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx index 4a99c042b108b..bb012a2190859 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx @@ -53,6 +53,7 @@ import { CreateAnalyticsButton } from '../create_analytics_button'; import { CreateAnalyticsFormProps } from '../../hooks/use_create_analytics_form'; import { CreateAnalyticsFlyoutWrapper } from '../create_analytics_flyout_wrapper'; import { getSelectedJobIdFromUrl } from '../../../../../jobs/jobs_list/components/utils'; +import { SourceSelection } from '../source_selection'; function getItemIdToExpandedRowMap( itemIds: DataFrameAnalyticsId[], @@ -90,6 +91,7 @@ export const DataFrameAnalyticsList: FC = ({ createAnalyticsForm, }) => { const [isInitialized, setIsInitialized] = useState(false); + const [isSourceIndexModalVisible, setIsSourceIndexModalVisible] = useState(false); const [isLoading, setIsLoading] = useState(false); const [filterActive, setFilterActive] = useState(false); @@ -271,7 +273,7 @@ export const DataFrameAnalyticsList: FC = ({ !isManagementTable && createAnalyticsForm ? [ setIsSourceIndexModalVisible(true)} isDisabled={disabled} data-test-subj="mlAnalyticsCreateFirstButton" > @@ -287,6 +289,9 @@ export const DataFrameAnalyticsList: FC = ({ {!isManagementTable && createAnalyticsForm && ( )} + {isSourceIndexModalVisible === true && ( + setIsSourceIndexModalVisible(false)} /> + )} ); } @@ -402,7 +407,10 @@ export const DataFrameAnalyticsList: FC = ({ {!isManagementTable && createAnalyticsForm && ( - + )} @@ -435,6 +443,9 @@ export const DataFrameAnalyticsList: FC = ({ {!isManagementTable && createAnalyticsForm?.state.isModalVisible && ( )} + {isSourceIndexModalVisible === true && ( + setIsSourceIndexModalVisible(false)} /> + )} ); }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx index 48eb95948bb12..17b905cab135b 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_advanced_editor/create_analytics_advanced_editor.tsx @@ -23,11 +23,14 @@ import { XJsonMode } from '../../../../../../../shared_imports'; const xJsonMode = new XJsonMode(); import { CreateAnalyticsFormProps } from '../../hooks/use_create_analytics_form'; +import { CreateStep } from '../../../analytics_creation/components/create_step'; +import { ANALYTICS_STEPS } from '../../../analytics_creation/page'; -export const CreateAnalyticsAdvancedEditor: FC = ({ actions, state }) => { +export const CreateAnalyticsAdvancedEditor: FC = (props) => { + const { actions, state } = props; const { setAdvancedEditorRawString, setFormState } = actions; - const { advancedEditorMessages, advancedEditorRawString, isJobCreated, requestMessages } = state; + const { advancedEditorMessages, advancedEditorRawString, isJobCreated } = state; const { createIndexPattern, @@ -56,120 +59,105 @@ export const CreateAnalyticsAdvancedEditor: FC = ({ ac return ( - {requestMessages.map((requestMessage, i) => ( + + { + if (input) { + forceInput.current = input; + } + }} + disabled={isJobCreated} + placeholder="analytics job ID" + value={jobId} + onChange={(e) => setFormState({ jobId: e.target.value })} + aria-label={i18n.translate( + 'xpack.ml.dataframe.analytics.create.advancedEditor.jobIdInputAriaLabel', + { + defaultMessage: 'Choose a unique analytics job ID.', + } + )} + isInvalid={(!jobIdEmpty && !jobIdValid) || jobIdExists} + /> + + + + + + + {advancedEditorMessages.map((advancedEditorMessage, i) => ( - {requestMessage.error !== undefined ?

{requestMessage.error}

: null} + {advancedEditorMessage.message !== '' && advancedEditorMessage.error !== undefined ? ( +

{advancedEditorMessage.error}

+ ) : null}
- +
))} {!isJobCreated && ( - - { - if (input) { - forceInput.current = input; - } - }} - disabled={isJobCreated} - placeholder="analytics job ID" - value={jobId} - onChange={(e) => setFormState({ jobId: e.target.value })} - aria-label={i18n.translate( - 'xpack.ml.dataframe.analytics.create.advancedEditor.jobIdInputAriaLabel', - { - defaultMessage: 'Choose a unique analytics job ID.', - } - )} - isInvalid={(!jobIdEmpty && !jobIdValid) || jobIdExists} - /> - - - - - - - {advancedEditorMessages.map((advancedEditorMessage, i) => ( - - - {advancedEditorMessage.message !== '' && - advancedEditorMessage.error !== undefined ? ( -

{advancedEditorMessage.error}

- ) : null} -
- -
- ))} = ({ ac
)} + +
); }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/_index.scss b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/_index.scss new file mode 100644 index 0000000000000..14ff9de7ded4d --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/_index.scss @@ -0,0 +1,4 @@ +.dataFrameAnalyticsCreateSearchDialog { + width: $euiSizeL * 30; + min-height: $euiSizeL * 25; +} diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.test.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.test.tsx index 10565fb4d7a93..8e9b09ef41fa8 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.test.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.test.tsx @@ -35,7 +35,9 @@ describe('Data Frame Analytics: ', () => { test('Minimal initialization', () => { const { getLastHookValue } = getMountedHook(); const props = getLastHookValue(); - const wrapper = mount(); + const wrapper = mount( + + ); expect(wrapper.find('EuiButton').text()).toBe('Create analytics job'); }); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.tsx index 952bd48468b0a..595a1cf73e189 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_button/create_analytics_button.tsx @@ -10,15 +10,26 @@ import { i18n } from '@kbn/i18n'; import { createPermissionFailureMessage } from '../../../../../capabilities/check_capabilities'; import { CreateAnalyticsFormProps } from '../../hooks/use_create_analytics_form'; -export const CreateAnalyticsButton: FC = (props) => { - const { disabled } = props.state; - const { openModal } = props.actions; +interface Props extends CreateAnalyticsFormProps { + setIsSourceIndexModalVisible: React.Dispatch>; +} + +export const CreateAnalyticsButton: FC = ({ + state, + actions, + setIsSourceIndexModalVisible, +}) => { + const { disabled } = state; + + const handleClick = () => { + setIsSourceIndexModalVisible(true); + }; const button = ( = ({ messages }) => { {messages.map((requestMessage, i) => ( void; +} + +export const SourceSelection: FC = ({ onClose }) => { + const { uiSettings, savedObjects } = useMlKibana().services; + + const onSearchSelected = (id: string, type: string) => { + window.location.href = `ml#/data_frame_analytics/new_job?${ + type === 'index-pattern' ? 'index' : 'savedSearchId' + }=${encodeURIComponent(id)}`; + }; + + return ( + <> + + + + + {' '} + /{' '} + + + + + 'search', + name: i18n.translate( + 'xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.search', + { + defaultMessage: 'Saved search', + } + ), + }, + { + type: 'index-pattern', + getIconForSavedObject: () => 'indexPatternApp', + name: i18n.translate( + 'xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.indexPattern', + { + defaultMessage: 'Index pattern', + } + ), + }, + ]} + fixedPageSize={fixedPageSize} + uiSettings={uiSettings} + savedObjects={savedObjects} + /> + + + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts index 66e4103f5bb41..c42e03b584a56 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts @@ -72,6 +72,7 @@ export interface ActionDispatchers { closeModal: () => void; createAnalyticsJob: () => void; openModal: () => Promise; + initiateWizard: () => Promise; resetAdvancedEditorMessages: () => void; setAdvancedEditorRawString: (payload: State['advancedEditorRawString']) => void; setFormState: (payload: Partial) => void; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/index.ts index e5e56c084f7b9..8ec415bc2abb4 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/index.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/index.ts @@ -5,4 +5,9 @@ */ export { DEFAULT_NUM_TOP_FEATURE_IMPORTANCE_VALUES } from './state'; -export { useCreateAnalyticsForm, CreateAnalyticsFormProps } from './use_create_analytics_form'; +export { + AnalyticsCreationStep, + useCreateAnalyticsForm, + CreateAnalyticsFormProps, + CreateAnalyticsStepProps, +} from './use_create_analytics_form'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts index 4ff7deab34f26..387ce89ee4120 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts @@ -11,6 +11,7 @@ import { mlNodesAvailable } from '../../../../../ml_nodes_check'; import { newJobCapsService } from '../../../../../services/new_job_capabilities_service'; import { + FieldSelectionItem, isClassificationAnalysis, isRegressionAnalysis, DataFrameAnalyticsId, @@ -26,7 +27,8 @@ export enum DEFAULT_MODEL_MEMORY_LIMIT { classification = '100mb', } -export const DEFAULT_NUM_TOP_FEATURE_IMPORTANCE_VALUES = 2; +export const DEFAULT_NUM_TOP_FEATURE_IMPORTANCE_VALUES = 0; +export const UNSET_CONFIG_ITEM = '--'; export type EsIndexName = string; export type DependentVariable = string; @@ -47,6 +49,7 @@ export interface State { advancedEditorMessages: FormMessage[]; advancedEditorRawString: string; form: { + computeFeatureInfluence: string; createIndexPattern: boolean; dependentVariable: DependentVariable; dependentVariableFetchFail: boolean; @@ -57,31 +60,47 @@ export interface State { destinationIndexNameEmpty: boolean; destinationIndexNameValid: boolean; destinationIndexPatternTitleExists: boolean; + eta: undefined | number; excludes: string[]; + excludesTableItems: FieldSelectionItem[]; excludesOptions: EuiComboBoxOptionOption[]; + featureBagFraction: undefined | number; + featureInfluenceThreshold: undefined | number; fieldOptionsFetchFail: boolean; + gamma: undefined | number; jobId: DataFrameAnalyticsId; jobIdExists: boolean; jobIdEmpty: boolean; jobIdInvalidMaxLength: boolean; jobIdValid: boolean; jobType: AnalyticsJobType; + jobConfigQuery: any; + jobConfigQueryString: string | undefined; + lambda: number | undefined; loadingDepVarOptions: boolean; loadingFieldOptions: boolean; maxDistinctValuesError: string | undefined; + maxTrees: undefined | number; + method: undefined | string; modelMemoryLimit: string | undefined; modelMemoryLimitUnitValid: boolean; modelMemoryLimitValidationResult: any; + nNeighbors: undefined | number; numTopFeatureImportanceValues: number | undefined; numTopFeatureImportanceValuesValid: boolean; + numTopClasses: number; + outlierFraction: undefined | number; + predictionFieldName: undefined | string; previousJobType: null | AnalyticsJobType; previousSourceIndex: EsIndexName | undefined; requiredFieldsError: string | undefined; + randomizeSeed: undefined | number; sourceIndex: EsIndexName; sourceIndexNameEmpty: boolean; sourceIndexNameValid: boolean; sourceIndexContainsNumericalFields: boolean; sourceIndexFieldsCheckFailed: boolean; + standardizationEnabled: undefined | string; trainingPercent: number; }; disabled: boolean; @@ -105,7 +124,8 @@ export const getInitialState = (): State => ({ advancedEditorMessages: [], advancedEditorRawString: '', form: { - createIndexPattern: false, + computeFeatureInfluence: 'true', + createIndexPattern: true, dependentVariable: '', dependentVariableFetchFail: false, dependentVariableOptions: [], @@ -115,8 +135,13 @@ export const getInitialState = (): State => ({ destinationIndexNameEmpty: true, destinationIndexNameValid: false, destinationIndexPatternTitleExists: false, + eta: undefined, excludes: [], + featureBagFraction: undefined, + featureInfluenceThreshold: undefined, fieldOptionsFetchFail: false, + gamma: undefined, + excludesTableItems: [], excludesOptions: [], jobId: '', jobIdExists: false, @@ -124,22 +149,33 @@ export const getInitialState = (): State => ({ jobIdInvalidMaxLength: false, jobIdValid: false, jobType: undefined, + jobConfigQuery: { match_all: {} }, + jobConfigQueryString: undefined, + lambda: undefined, loadingDepVarOptions: false, loadingFieldOptions: false, maxDistinctValuesError: undefined, + maxTrees: undefined, + method: undefined, modelMemoryLimit: undefined, modelMemoryLimitUnitValid: true, modelMemoryLimitValidationResult: null, + nNeighbors: undefined, numTopFeatureImportanceValues: DEFAULT_NUM_TOP_FEATURE_IMPORTANCE_VALUES, numTopFeatureImportanceValuesValid: true, + numTopClasses: 2, + outlierFraction: undefined, + predictionFieldName: undefined, previousJobType: null, previousSourceIndex: undefined, requiredFieldsError: undefined, + randomizeSeed: undefined, sourceIndex: '', sourceIndexNameEmpty: true, sourceIndexNameValid: false, sourceIndexContainsNumericalFields: true, sourceIndexFieldsCheckFailed: false, + standardizationEnabled: 'true', trainingPercent: 80, }, jobConfig: {}, @@ -222,6 +258,7 @@ export const getJobConfigFromFormState = ( index: formState.sourceIndex.includes(',') ? formState.sourceIndex.split(',').map((d) => d.trim()) : formState.sourceIndex, + query: formState.jobConfigQuery, }, dest: { index: formState.destinationIndex, @@ -239,15 +276,55 @@ export const getJobConfigFromFormState = ( formState.jobType === ANALYSIS_CONFIG_TYPE.REGRESSION || formState.jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION ) { - jobConfig.analysis = { - [formState.jobType]: { - dependent_variable: formState.dependentVariable, - num_top_feature_importance_values: formState.numTopFeatureImportanceValues, - training_percent: formState.trainingPercent, + let analysis = { + dependent_variable: formState.dependentVariable, + num_top_feature_importance_values: formState.numTopFeatureImportanceValues, + training_percent: formState.trainingPercent, + }; + + analysis = Object.assign( + analysis, + formState.predictionFieldName && { prediction_field_name: formState.predictionFieldName }, + formState.eta && { eta: formState.eta }, + formState.featureBagFraction && { + feature_bag_fraction: formState.featureBagFraction, }, + formState.gamma && { gamma: formState.gamma }, + formState.lambda && { lambda: formState.lambda }, + formState.maxTrees && { max_trees: formState.maxTrees }, + formState.randomizeSeed && { randomize_seed: formState.randomizeSeed } + ); + + jobConfig.analysis = { + [formState.jobType]: analysis, }; } + if ( + formState.jobType === ANALYSIS_CONFIG_TYPE.CLASSIFICATION && + jobConfig?.analysis?.classification !== undefined && + formState.numTopClasses !== undefined + ) { + // @ts-ignore + jobConfig.analysis.classification.num_top_classes = formState.numTopClasses; + } + + if (formState.jobType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION) { + const analysis = Object.assign( + {}, + formState.method && { method: formState.method }, + formState.nNeighbors && { + n_neighbors: formState.nNeighbors, + }, + formState.outlierFraction && { outlier_fraction: formState.outlierFraction }, + formState.standardizationEnabled && { + standardization_enabled: formState.standardizationEnabled, + } + ); + // @ts-ignore + jobConfig.analysis.outlier_detection = analysis; + } + return jobConfig; }; @@ -279,6 +356,11 @@ export function getCloneFormStateFromJobConfig( resultState.dependentVariable = analysisConfig.dependent_variable; resultState.numTopFeatureImportanceValues = analysisConfig.num_top_feature_importance_values; resultState.trainingPercent = analysisConfig.training_percent; + + if (isClassificationAnalysis(analyticsJobConfig.analysis)) { + // @ts-ignore + resultState.numTopClasses = analysisConfig.num_top_classes; + } } return resultState; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts index 1ec767d014a2e..c4cbe149f88bc 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts @@ -36,11 +36,24 @@ import { getCloneFormStateFromJobConfig, } from './state'; +import { ANALYTICS_STEPS } from '../../../analytics_creation/page'; + +export interface AnalyticsCreationStep { + number: ANALYTICS_STEPS; + completed: boolean; +} + export interface CreateAnalyticsFormProps { actions: ActionDispatchers; state: State; } +export interface CreateAnalyticsStepProps extends CreateAnalyticsFormProps { + setCurrentStep: React.Dispatch>; + step?: ANALYTICS_STEPS; + stepActivated?: boolean; +} + export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => { const mlContext = useMlContext(); const [state, dispatch] = useReducer(reducer, getInitialState()); @@ -261,8 +274,12 @@ export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => { dispatch({ type: ACTION.OPEN_MODAL }); }; + const initiateWizard = async () => { + await mlContext.indexPatterns.clearCache(); + await prepareFormValidation(); + }; + const startAnalyticsJob = async () => { - setIsModalButtonDisabled(true); try { const response = await ml.dataFrameAnalytics.startDataFrameAnalytics(jobId); if (response.acknowledged !== true) { @@ -278,7 +295,6 @@ export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => { ), }); setIsJobStarted(true); - setIsModalButtonDisabled(false); refresh(); } catch (e) { addRequestMessage({ @@ -290,7 +306,6 @@ export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => { } ), }); - setIsModalButtonDisabled(false); } }; @@ -331,6 +346,7 @@ export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => { closeModal, createAnalyticsJob, openModal, + initiateWizard, resetAdvancedEditorMessages, setAdvancedEditorRawString, setFormState, diff --git a/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx b/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx index d68c0342ac857..97b4043c9fd64 100644 --- a/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx +++ b/x-pack/plugins/ml/public/application/datavisualizer/index_based/page.tsx @@ -27,6 +27,7 @@ import { Query, esQuery, esKuery, + UI_SETTINGS, } from '../../../../../../../src/plugins/data/public'; import { SavedSearchSavedObject } from '../../../../common/types/kibana'; import { NavigationMenu } from '../../components/navigation_menu'; @@ -254,7 +255,7 @@ export const Page: FC = () => { qry = esKuery.toElasticsearchQuery(ast, currentIndexPattern); } else { qry = esQuery.luceneStringToDsl(qryString); - esQuery.decorateQuery(qry, kibanaConfig.get('query:queryString:options')); + esQuery.decorateQuery(qry, kibanaConfig.get(UI_SETTINGS.QUERY_STRING_OPTIONS)); } return { diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js index c2dd8e6378305..8b30dccc25306 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js @@ -518,7 +518,6 @@ function processRecordsForDisplay(anomalyRecords) { } }); - console.log('explorer charts aggregatedData is:', aggregatedData); let recordsForSeries = []; // Convert to an array of the records with the highest record_score per unique series. _.each(aggregatedData, (detectorsForJob) => { diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_utils.js b/x-pack/plugins/ml/public/application/explorer/explorer_utils.js index f35a000b7f9e1..bd6a7ee59c942 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_utils.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_utils.js @@ -715,7 +715,6 @@ export async function loadDataForCharts( (selectedCells !== undefined && Object.keys(selectedCells).length > 0) || influencersFilterQuery !== undefined ) { - console.log('Explorer anomaly charts data set:', resp.records); resolve(resp.records); } @@ -764,7 +763,6 @@ export function loadOverallData(selectedJobs, interval, bounds) { interval.asSeconds() ); - console.log('Explorer overall swimlane data set:', overallSwimlaneData); resolve({ loading: false, overallSwimlaneData, @@ -795,7 +793,6 @@ export function loadViewBySwimlane( getSwimlaneContainerWidth(noInfluencersConfigured) ).asSeconds() ); - console.log('Explorer view by swimlane data set:', viewBySwimlaneData); resolve({ viewBySwimlaneData, @@ -879,7 +876,6 @@ export async function loadTopInfluencers( ) .then((resp) => { // TODO - sort the influencers keys so that the partition field(s) are first. - console.log('Explorer top influencers data set:', resp.influencers); resolve(resp.influencers); }); } else { diff --git a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx new file mode 100644 index 0000000000000..68af9a2a49cab --- /dev/null +++ b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_creation.tsx @@ -0,0 +1,41 @@ +/* + * 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, { FC } from 'react'; +import { i18n } from '@kbn/i18n'; +import { parse } from 'query-string'; +import { MlRoute, PageLoader, PageProps } from '../../router'; +import { useResolver } from '../../use_resolver'; +import { basicResolvers } from '../../resolvers'; +import { Page } from '../../../data_frame_analytics/pages/analytics_creation'; +import { ML_BREADCRUMB } from '../../breadcrumbs'; + +const breadcrumbs = [ + ML_BREADCRUMB, + { + text: i18n.translate('xpack.ml.dataFrameAnalyticsBreadcrumbs.dataFrameManagementLabel', { + defaultMessage: 'Data Frame Analytics', + }), + href: '#/data_frame_analytics', + }, +]; + +export const analyticsJobsCreationRoute: MlRoute = { + path: '/data_frame_analytics/new_job', + render: (props, deps) => , + breadcrumbs, +}; + +const PageWrapper: FC = ({ location, deps }) => { + const { index, savedSearchId }: Record = parse(location.search, { sort: false }); + const { context } = useResolver(index, savedSearchId, deps.config, basicResolvers(deps)); + + return ( + + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/index.ts b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/index.ts index 552c15a408b65..9b6bcc25c8c7e 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/index.ts +++ b/x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/index.ts @@ -6,3 +6,4 @@ export * from './analytics_jobs_list'; export * from './analytics_job_exploration'; +export * from './analytics_job_creation'; diff --git a/x-pack/plugins/ml/public/application/services/explorer_service.ts b/x-pack/plugins/ml/public/application/services/explorer_service.ts index efcec8cf2b954..717ed3ba64c37 100644 --- a/x-pack/plugins/ml/public/application/services/explorer_service.ts +++ b/x-pack/plugins/ml/public/application/services/explorer_service.ts @@ -6,7 +6,11 @@ import { IUiSettingsClient } from 'kibana/public'; import { i18n } from '@kbn/i18n'; -import { TimefilterContract, TimeRange } from '../../../../../../src/plugins/data/public'; +import { + TimefilterContract, + TimeRange, + UI_SETTINGS, +} from '../../../../../../src/plugins/data/public'; import { getBoundsRoundedToInterval, TimeBuckets, TimeRangeBounds } from '../util/time_buckets'; import { ExplorerJob, OverallSwimlaneData, SwimlaneData } from '../explorer/explorer_utils'; import { VIEW_BY_JOB_LABEL } from '../explorer/explorer_constants'; @@ -25,8 +29,8 @@ export class ExplorerService { private mlResultsService: MlResultsService ) { this.timeBuckets = new TimeBuckets({ - 'histogram:maxBars': uiSettings.get('histogram:maxBars'), - 'histogram:barTarget': uiSettings.get('histogram:barTarget'), + 'histogram:maxBars': uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS), + 'histogram:barTarget': uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET), dateFormat: uiSettings.get('dateFormat'), 'dateFormat:scaled': uiSettings.get('dateFormat:scaled'), }); diff --git a/x-pack/plugins/ml/public/application/services/job_service.js b/x-pack/plugins/ml/public/application/services/job_service.js index 8d59270b36dae..a3be479571702 100644 --- a/x-pack/plugins/ml/public/application/services/job_service.js +++ b/x-pack/plugins/ml/public/application/services/job_service.js @@ -368,6 +368,7 @@ class JobService { delete tempJob.calendars; delete tempJob.timing_stats; delete tempJob.forecasts_stats; + delete tempJob.assignment_explanation; delete tempJob.analysis_config.use_per_partition_normalization; @@ -411,8 +412,7 @@ class JobService { // return the promise chain return ml .updateJob({ jobId, job }) - .then((resp) => { - console.log('update job', resp); + .then(() => { return { success: true }; }) .catch((err) => { @@ -422,7 +422,7 @@ class JobService { values: { jobId }, }) ); - console.log('update job', err); + console.error('update job', err); return { success: false, message: err.message }; }); } diff --git a/x-pack/plugins/ml/public/application/util/time_buckets.d.ts b/x-pack/plugins/ml/public/application/util/time_buckets.d.ts index 9c5d663a6e4ab..91661ea3fd3fa 100644 --- a/x-pack/plugins/ml/public/application/util/time_buckets.d.ts +++ b/x-pack/plugins/ml/public/application/util/time_buckets.d.ts @@ -5,6 +5,7 @@ */ import { Moment } from 'moment'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/public'; export interface TimeRangeBounds { min?: Moment; diff --git a/x-pack/plugins/ml/public/application/util/time_buckets.js b/x-pack/plugins/ml/public/application/util/time_buckets.js index 2b23eca1ab5c0..1915a4ce6516b 100644 --- a/x-pack/plugins/ml/public/application/util/time_buckets.js +++ b/x-pack/plugins/ml/public/application/util/time_buckets.js @@ -11,7 +11,7 @@ import dateMath from '@elastic/datemath'; import { timeBucketsCalcAutoIntervalProvider } from './calc_auto_interval'; import { parseInterval } from '../../../common/util/parse_interval'; import { getFieldFormats, getUiSettings } from './dependency_cache'; -import { FIELD_FORMAT_IDS } from '../../../../../../src/plugins/data/public'; +import { FIELD_FORMAT_IDS, UI_SETTINGS } from '../../../../../../src/plugins/data/public'; const unitsDesc = dateMath.unitsDesc; const largeMax = unitsDesc.indexOf('w'); // Multiple units of week or longer converted to days for ES intervals. @@ -21,8 +21,8 @@ const calcAuto = timeBucketsCalcAutoIntervalProvider(); export function getTimeBucketsFromCache() { const uiSettings = getUiSettings(); return new TimeBuckets({ - 'histogram:maxBars': uiSettings.get('histogram:maxBars'), - 'histogram:barTarget': uiSettings.get('histogram:barTarget'), + [UI_SETTINGS.HISTOGRAM_MAX_BARS]: uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS), + [UI_SETTINGS.HISTOGRAM_BAR_TARGET]: uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET), dateFormat: uiSettings.get('dateFormat'), 'dateFormat:scaled': uiSettings.get('dateFormat:scaled'), }); @@ -35,8 +35,8 @@ export function getTimeBucketsFromCache() { */ export function TimeBuckets(timeBucketsConfig) { this._timeBucketsConfig = timeBucketsConfig; - this.barTarget = this._timeBucketsConfig['histogram:barTarget']; - this.maxBars = this._timeBucketsConfig['histogram:maxBars']; + this.barTarget = this._timeBucketsConfig[UI_SETTINGS.HISTOGRAM_BAR_TARGET]; + this.maxBars = this._timeBucketsConfig[UI_SETTINGS.HISTOGRAM_MAX_BARS]; } /** diff --git a/x-pack/plugins/ml/public/application/util/time_buckets.test.js b/x-pack/plugins/ml/public/application/util/time_buckets.test.js index baecf7df90641..250c7255f5b99 100644 --- a/x-pack/plugins/ml/public/application/util/time_buckets.test.js +++ b/x-pack/plugins/ml/public/application/util/time_buckets.test.js @@ -5,6 +5,7 @@ */ import moment from 'moment'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/public'; import { TimeBuckets, getBoundsRoundedToInterval, calcEsInterval } from './time_buckets'; describe('ML - time buckets', () => { @@ -13,8 +14,8 @@ describe('ML - time buckets', () => { beforeEach(() => { const timeBucketsConfig = { - 'histogram:maxBars': 100, - 'histogram:barTarget': 50, + [UI_SETTINGS.HISTOGRAM_MAX_BARS]: 100, + [UI_SETTINGS.HISTOGRAM_BAR_TARGET]: 50, }; autoBuckets = new TimeBuckets(timeBucketsConfig); diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts index e48ce9f9a1d92..74a7b432de267 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts @@ -27,7 +27,7 @@ import { MlStartDependencies } from '../../plugin'; import { SWIMLANE_TYPE } from '../../application/explorer/explorer_constants'; import { Filter } from '../../../../../../src/plugins/data/common/es_query/filters'; import { Query } from '../../../../../../src/plugins/data/common/query'; -import { esKuery } from '../../../../../../src/plugins/data/public'; +import { esKuery, UI_SETTINGS } from '../../../../../../src/plugins/data/public'; import { ExplorerJob, OverallSwimlaneData } from '../../application/explorer/explorer_utils'; import { parseInterval } from '../../../common/util/parse_interval'; import { AnomalyDetectorService } from '../../application/services/anomaly_detector_service'; @@ -62,8 +62,8 @@ export function useSwimlaneInputResolver( const timeBuckets = useMemo(() => { return new TimeBuckets({ - 'histogram:maxBars': uiSettings.get('histogram:maxBars'), - 'histogram:barTarget': uiSettings.get('histogram:barTarget'), + 'histogram:maxBars': uiSettings.get(UI_SETTINGS.HISTOGRAM_MAX_BARS), + 'histogram:barTarget': uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET), dateFormat: uiSettings.get('dateFormat'), 'dateFormat:scaled': uiSettings.get('dateFormat:scaled'), }); diff --git a/x-pack/plugins/ml/server/routes/schemas/data_analytics_schema.ts b/x-pack/plugins/ml/server/routes/schemas/data_analytics_schema.ts index 0b2469c103578..e6b4e4ccf8582 100644 --- a/x-pack/plugins/ml/server/routes/schemas/data_analytics_schema.ts +++ b/x-pack/plugins/ml/server/routes/schemas/data_analytics_schema.ts @@ -47,6 +47,7 @@ export const dataAnalyticsExplainSchema = schema.object({ /** Source */ source: schema.object({ index: schema.string(), + query: schema.maybe(schema.any()), }), analysis: schema.any(), analyzed_fields: schema.maybe(schema.any()), diff --git a/x-pack/plugins/monitoring/public/plugin.ts b/x-pack/plugins/monitoring/public/plugin.ts index 73133da5a006c..24383028e558c 100644 --- a/x-pack/plugins/monitoring/public/plugin.ts +++ b/x-pack/plugins/monitoring/public/plugin.ts @@ -17,6 +17,7 @@ import { FeatureCatalogueCategory, HomePublicPluginSetup, } from '../../../../src/plugins/home/public'; +import { UI_SETTINGS } from '../../../../src/plugins/data/public'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; import { MonitoringPluginDependencies, MonitoringConfig } from './types'; import { @@ -110,7 +111,7 @@ export class MonitoringPlugin timefilter.setRefreshInterval(refreshInterval); timefilter.setTime(time); uiSettings.overrideLocalDefault( - 'timepicker:refreshIntervalDefaults', + UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS, JSON.stringify(refreshInterval) ); uiSettings.overrideLocalDefault('timepicker:timeDefaults', JSON.stringify(time)); diff --git a/x-pack/plugins/monitoring/public/views/access_denied/index.html b/x-pack/plugins/monitoring/public/views/access_denied/index.html index 63cd4440ecf8a..24863559212f7 100644 --- a/x-pack/plugins/monitoring/public/views/access_denied/index.html +++ b/x-pack/plugins/monitoring/public/views/access_denied/index.html @@ -30,12 +30,13 @@
- + + +
diff --git a/x-pack/plugins/monitoring/public/views/access_denied/index.js b/x-pack/plugins/monitoring/public/views/access_denied/index.js index 856e59702963a..f7a4d03a26452 100644 --- a/x-pack/plugins/monitoring/public/views/access_denied/index.js +++ b/x-pack/plugins/monitoring/public/views/access_denied/index.js @@ -4,16 +4,15 @@ * you may not use this file except in compliance with the Elastic License. */ -import { noop } from 'lodash'; +import { kbnBaseUrl } from '../../../../../../src/plugins/kibana_legacy/common/kbn_base_url'; import { uiRoutes } from '../../angular/helpers/routes'; -import { Legacy } from '../../legacy_shims'; import template from './index.html'; const tryPrivilege = ($http, kbnUrl) => { return $http .get('../api/monitoring/v1/check_access') .then(() => kbnUrl.redirect('/home')) - .catch(noop); + .catch(() => true); }; uiRoutes.when('/access-denied', { @@ -31,17 +30,13 @@ uiRoutes.when('/access-denied', { }, }, controllerAs: 'accessDenied', - controller($scope, $injector) { - const $window = $injector.get('$window'); - const kbnBaseUrl = $injector.get('kbnBaseUrl'); + controller: function ($scope, $injector) { const $http = $injector.get('$http'); const kbnUrl = $injector.get('kbnUrl'); const $interval = $injector.get('$interval'); // The template's "Back to Kibana" button click handler - this.goToKibana = () => { - $window.location.href = Legacy.shims.getBasePath() + kbnBaseUrl; - }; + this.goToKibanaURL = kbnBaseUrl; // keep trying to load data in the background const accessPoller = $interval(() => tryPrivilege($http, kbnUrl), 5 * 1000); // every 5 seconds diff --git a/x-pack/plugins/observability/public/application/index.tsx b/x-pack/plugins/observability/public/application/index.tsx new file mode 100644 index 0000000000000..21a9fabf445f1 --- /dev/null +++ b/x-pack/plugins/observability/public/application/index.tsx @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { EuiThemeProvider } from '../../../../legacy/common/eui_styled_components'; +import { AppMountParameters, CoreStart } from '../../../../../src/core/public'; +import { Home } from '../pages/home'; +import { PluginContext } from '../context/plugin_context'; + +export const renderApp = (core: CoreStart, { element }: AppMountParameters) => { + const i18nCore = core.i18n; + const isDarkMode = core.uiSettings.get('theme:darkMode'); + ReactDOM.render( + + + + + + + , + element + ); + return () => { + ReactDOM.unmountComponentAtNode(element); + }; +}; diff --git a/x-pack/plugins/observability/public/assets/observability_overview.png b/x-pack/plugins/observability/public/assets/observability_overview.png new file mode 100644 index 0000000000000..70be08af9745a Binary files /dev/null and b/x-pack/plugins/observability/public/assets/observability_overview.png differ diff --git a/x-pack/plugins/observability/public/context/plugin_context.tsx b/x-pack/plugins/observability/public/context/plugin_context.tsx new file mode 100644 index 0000000000000..7d705e7a6cc05 --- /dev/null +++ b/x-pack/plugins/observability/public/context/plugin_context.tsx @@ -0,0 +1,14 @@ +/* + * 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 { createContext } from 'react'; +import { AppMountContext } from 'kibana/public'; + +export interface PluginContextValue { + core: AppMountContext['core']; +} + +export const PluginContext = createContext({} as PluginContextValue); diff --git a/x-pack/plugins/observability/public/hooks/use_plugin_context.tsx b/x-pack/plugins/observability/public/hooks/use_plugin_context.tsx new file mode 100644 index 0000000000000..eeec115f0d286 --- /dev/null +++ b/x-pack/plugins/observability/public/hooks/use_plugin_context.tsx @@ -0,0 +1,12 @@ +/* + * 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 { useContext } from 'react'; +import { PluginContext } from '../context/plugin_context'; + +export function usePluginContext() { + return useContext(PluginContext); +} diff --git a/x-pack/plugins/observability/public/pages/home/index.tsx b/x-pack/plugins/observability/public/pages/home/index.tsx new file mode 100644 index 0000000000000..072d3c47d3a55 --- /dev/null +++ b/x-pack/plugins/observability/public/pages/home/index.tsx @@ -0,0 +1,205 @@ +/* + * 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 { + EuiButton, + EuiCard, + EuiFlexGrid, + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiIcon, + EuiImage, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { useEffect } from 'react'; +import styled from 'styled-components'; +import { usePluginContext } from '../../hooks/use_plugin_context'; +import { appsSection, tryItOutItemsSection } from './section'; + +const Container = styled.div` + min-height: calc(100vh - 48px); + background: ${(props) => props.theme.eui.euiColorEmptyShade}; +`; + +const Title = styled.div` + background-color: ${(props) => props.theme.eui.euiPageBackgroundColor}; + border-bottom: ${(props) => props.theme.eui.euiBorderThin}; +`; + +const Page = styled.div` + width: 100%; + max-width: 1200px; + margin: 0 auto; + overflow: hidden; +} +`; + +const EuiCardWithoutPadding = styled(EuiCard)` + padding: 0; +`; + +export const Home = () => { + const { core } = usePluginContext(); + + useEffect(() => { + core.chrome.setBreadcrumbs([ + { + text: i18n.translate('xpack.observability.home.breadcrumb.observability', { + defaultMessage: 'Observability', + }), + }, + { + text: i18n.translate('xpack.observability.home.breadcrumb.gettingStarted', { + defaultMessage: 'Getting started', + }), + }, + ]); + }, [core]); + + return ( + + + <Page> + <EuiSpacer size="xxl" /> + <EuiFlexGroup> + <EuiFlexItem grow={false}> + <EuiIcon type="logoObservability" size="xxl" /> + </EuiFlexItem> + <EuiFlexItem> + <EuiTitle size="m"> + <h1> + {i18n.translate('xpack.observability.home.title', { + defaultMessage: 'Observability', + })} + </h1> + </EuiTitle> + </EuiFlexItem> + </EuiFlexGroup> + <EuiSpacer size="xxl" /> + </Page> + + + + + {/* title and description */} + + +

+ {i18n.translate('xpack.observability.home.sectionTitle', { + defaultMessage: 'Observability built on the Elastic Stack', + })} +

+
+ + + {i18n.translate('xpack.observability.home.sectionsubtitle', { + defaultMessage: + 'Bring your logs, metrics, and APM traces together at scale in a single stack so you can monitor and react to events happening anywhere in your environment.', + })} + +
+ + {/* Apps sections */} + + + + + + {appsSection.map((app) => ( + + } + title={ + +

{app.title}

+
+ } + description={app.description} + /> +
+ ))} +
+
+ + + +
+
+ + {/* Get started button */} + + + + + {i18n.translate('xpack.observability.home.getStatedButton', { + defaultMessage: 'Get started', + })} + + + + + + + + {/* Try it out */} + + + + +

+ {i18n.translate('xpack.observability.home.tryItOut', { + defaultMessage: 'Try it out', + })} +

+
+
+
+
+ + {/* Try it out sections */} + + + {tryItOutItemsSection.map((item) => ( + + } + title={ + +

{item.title}

+
+ } + description={item.description} + target={item.target} + href={item.href} + /> +
+ ))} +
+ +
+
+
+
+ ); +}; diff --git a/x-pack/plugins/observability/public/pages/home/section.ts b/x-pack/plugins/observability/public/pages/home/section.ts new file mode 100644 index 0000000000000..f8bbfbfa30548 --- /dev/null +++ b/x-pack/plugins/observability/public/pages/home/section.ts @@ -0,0 +1,84 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +interface ISection { + id: string; + title: string; + icon: string; + description: string; + href?: string; + target?: '_blank'; +} + +export const appsSection: ISection[] = [ + { + id: 'logs', + title: i18n.translate('xpack.observability.section.apps.logs.title', { + defaultMessage: 'Logs', + }), + icon: 'logoLogging', + description: i18n.translate('xpack.observability.section.apps.logs.description', { + defaultMessage: + 'The Elastic Stack (sometimes known as the ELK Stack) is the most popular open source logging platform.', + }), + }, + { + id: 'apm', + title: i18n.translate('xpack.observability.section.apps.apm.title', { + defaultMessage: 'APM', + }), + icon: 'logoAPM', + description: i18n.translate('xpack.observability.section.apps.apm.description', { + defaultMessage: + 'See exactly where your application is spending time so you can quickly fix issues and feel good about the code you push.', + }), + }, + { + id: 'metrics', + title: i18n.translate('xpack.observability.section.apps.metrics.title', { + defaultMessage: 'Metrics', + }), + icon: 'logoMetrics', + description: i18n.translate('xpack.observability.section.apps.metrics.description', { + defaultMessage: + 'Already using the Elastic Stack for logs? Add metrics in just a few steps and correlate metrics and logs in one place.', + }), + }, + { + id: 'uptime', + title: i18n.translate('xpack.observability.section.apps.uptime.title', { + defaultMessage: 'Uptime', + }), + icon: 'logoUptime', + description: i18n.translate('xpack.observability.section.apps.uptime.description', { + defaultMessage: + 'React to availability issues across your apps and services before they affect users.', + }), + }, +]; + +export const tryItOutItemsSection: ISection[] = [ + { + id: 'demo', + title: i18n.translate('xpack.observability.section.tryItOut.demo.title', { + defaultMessage: 'Demo Playground', + }), + icon: 'play', + description: '', + href: 'https://demo.elastic.co/', + target: '_blank', + }, + { + id: 'sampleData', + title: i18n.translate('xpack.observability.section.tryItOut.sampleData.title', { + defaultMessage: 'Add sample data', + }), + icon: 'documents', + description: '', + href: '/app/home#/tutorial_directory/sampleData', + }, +]; diff --git a/x-pack/plugins/observability/public/plugin.ts b/x-pack/plugins/observability/public/plugin.ts index a7eb1c50a0392..f2c88a7b1c056 100644 --- a/x-pack/plugins/observability/public/plugin.ts +++ b/x-pack/plugins/observability/public/plugin.ts @@ -3,13 +3,37 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { Plugin as PluginClass, PluginInitializerContext } from 'kibana/public'; +import { + AppMountParameters, + CoreSetup, + DEFAULT_APP_CATEGORIES, + Plugin as PluginClass, + PluginInitializerContext, +} from '../../../../src/core/public'; export type ClientSetup = void; export type ClientStart = void; -export class Plugin implements PluginClass { +export class Plugin implements PluginClass { constructor(context: PluginInitializerContext) {} - start() {} - setup() {} + + public setup(core: CoreSetup) { + core.application.register({ + id: 'observability-overview', + title: 'Overview', + order: 8000, + appRoute: '/app/observability', + category: DEFAULT_APP_CATEGORIES.observability, + + async mount(params: AppMountParameters) { + // Load application bundle + const { renderApp } = await import('./application'); + // Get start services + const [coreStart] = await core.getStartServices(); + + return renderApp(coreStart, params); + }, + }); + } + public start() {} } diff --git a/x-pack/plugins/painless_lab/public/application/components/output_pane/parameters_tab.tsx b/x-pack/plugins/painless_lab/public/application/components/output_pane/parameters_tab.tsx index 5a417933e8022..b707fd493bcdd 100644 --- a/x-pack/plugins/painless_lab/public/application/components/output_pane/parameters_tab.tsx +++ b/x-pack/plugins/painless_lab/public/application/components/output_pane/parameters_tab.tsx @@ -14,7 +14,7 @@ import { EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; import { i18n } from '@kbn/i18n'; import { CodeEditor } from '../../../../../../../src/plugins/kibana_react/public'; diff --git a/x-pack/plugins/painless_lab/public/application/hooks/use_submit_code.ts b/x-pack/plugins/painless_lab/public/application/hooks/use_submit_code.ts index 36cd4f280ac4c..d0426a5e67e46 100644 --- a/x-pack/plugins/painless_lab/public/application/hooks/use_submit_code.ts +++ b/x-pack/plugins/painless_lab/public/application/hooks/use_submit_code.ts @@ -19,6 +19,7 @@ export const useSubmitCode = (http: HttpSetup) => { const [response, setResponse] = useState(undefined); const [inProgress, setInProgress] = useState(false); + /* eslint-disable-next-line react-hooks/exhaustive-deps */ const submit = useCallback( debounce( async (config: Payload) => { diff --git a/x-pack/plugins/painless_lab/public/lib/monaco_painless_lang.ts b/x-pack/plugins/painless_lab/public/lib/monaco_painless_lang.ts index 602697064a768..4278c77b4c791 100644 --- a/x-pack/plugins/painless_lab/public/lib/monaco_painless_lang.ts +++ b/x-pack/plugins/painless_lab/public/lib/monaco_painless_lang.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import * as monaco from 'monaco-editor'; +import { monaco } from '@kbn/monaco'; /** * Extends the default type for a Monarch language so we can use diff --git a/x-pack/plugins/painless_lab/public/services/language_service.ts b/x-pack/plugins/painless_lab/public/services/language_service.ts index efff9cd0e78d5..68ac3ca290ad8 100644 --- a/x-pack/plugins/painless_lab/public/services/language_service.ts +++ b/x-pack/plugins/painless_lab/public/services/language_service.ts @@ -7,7 +7,7 @@ // It is important that we use this specific monaco instance so that // editor settings are registered against the instance our React component // uses. -import { monaco } from '@kbn/ui-shared-deps/monaco'; +import { monaco } from '@kbn/monaco'; // @ts-ignore import workerSrc from 'raw-loader!monaco-editor/min/vs/base/worker/workerMain.js'; diff --git a/x-pack/plugins/reporting/server/config/schema.ts b/x-pack/plugins/reporting/server/config/schema.ts index dfabfa98f8cbf..b1234a6ddf0b6 100644 --- a/x-pack/plugins/reporting/server/config/schema.ts +++ b/x-pack/plugins/reporting/server/config/schema.ts @@ -162,6 +162,7 @@ const PollSchema = schema.object({ }); export const ConfigSchema = schema.object({ + enabled: schema.boolean({ defaultValue: true }), kibanaServer: KibanaServerSchema, queue: QueueSchema, capture: CaptureSchema, diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.test.ts b/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.test.ts index 6f227d00974ca..ddcf94079ade4 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.test.ts @@ -8,7 +8,7 @@ import nodeCrypto from '@elastic/node-crypto'; // @ts-ignore import Puid from 'puid'; import sinon from 'sinon'; -import { fieldFormats } from '../../../../../../../src/plugins/data/server'; +import { fieldFormats, UI_SETTINGS } from '../../../../../../../src/plugins/data/server'; import { CancellationToken } from '../../../../common'; import { CSV_BOM_CHARS } from '../../../../common/constants'; import { LevelLogger } from '../../../lib'; @@ -16,6 +16,10 @@ import { setFieldFormats } from '../../../services'; import { createMockReportingCore } from '../../../test_helpers'; import { JobDocPayloadDiscoverCsv } from '../types'; import { executeJobFactory } from './execute_job'; +import { + CSV_SEPARATOR_SETTING, + CSV_QUOTE_VALUES_SETTING, +} from '../../../../../../../src/plugins/share/server'; const delay = (ms: number) => new Promise((resolve) => setTimeout(() => resolve(), ms)); @@ -94,13 +98,13 @@ describe('CSV Execute Job', function () { .stub(clusterStub, 'callAsCurrentUser') .resolves(defaultElasticsearchResponse); - mockUiSettingsClient.get.withArgs('csv:separator').returns(','); - mockUiSettingsClient.get.withArgs('csv:quoteValues').returns(true); + mockUiSettingsClient.get.withArgs(CSV_SEPARATOR_SETTING).returns(','); + mockUiSettingsClient.get.withArgs(CSV_QUOTE_VALUES_SETTING).returns(true); setFieldFormats({ fieldFormatServiceFactory() { const uiConfigMock = {}; - (uiConfigMock as any)['format:defaultTypeMap'] = { + (uiConfigMock as any)[UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP] = { _default_: { id: 'string', params: {} }, }; @@ -748,7 +752,7 @@ describe('CSV Execute Job', function () { }); it('should use custom uiSettings csv:separator for header', async function () { - mockUiSettingsClient.get.withArgs('csv:separator').returns(';'); + mockUiSettingsClient.get.withArgs(CSV_SEPARATOR_SETTING).returns(';'); const executeJob = await executeJobFactory(mockReportingCore, mockLogger); const jobParams = getJobDocPayload({ headers: encryptedHeaders, @@ -760,7 +764,7 @@ describe('CSV Execute Job', function () { }); it('should escape column headers if uiSettings csv:quoteValues is true', async function () { - mockUiSettingsClient.get.withArgs('csv:quoteValues').returns(true); + mockUiSettingsClient.get.withArgs(CSV_QUOTE_VALUES_SETTING).returns(true); const executeJob = await executeJobFactory(mockReportingCore, mockLogger); const jobParams = getJobDocPayload({ headers: encryptedHeaders, @@ -772,7 +776,7 @@ describe('CSV Execute Job', function () { }); it(`shouldn't escape column headers if uiSettings csv:quoteValues is false`, async function () { - mockUiSettingsClient.get.withArgs('csv:quoteValues').returns(false); + mockUiSettingsClient.get.withArgs(CSV_QUOTE_VALUES_SETTING).returns(false); const executeJob = await executeJobFactory(mockReportingCore, mockLogger); const jobParams = getJobDocPayload({ headers: encryptedHeaders, diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts b/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts index de5ddb2503b2f..4b17cc669efe1 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts @@ -7,6 +7,10 @@ import { i18n } from '@kbn/i18n'; import Hapi from 'hapi'; import { IUiSettingsClient, KibanaRequest } from '../../../../../../../src/core/server'; +import { + CSV_SEPARATOR_SETTING, + CSV_QUOTE_VALUES_SETTING, +} from '../../../../../../../src/plugins/share/server'; import { ReportingCore } from '../../..'; import { CSV_BOM_CHARS, CSV_JOB_TYPE } from '../../../../common/constants'; import { getFieldFormats } from '../../../../server/services'; @@ -94,8 +98,8 @@ export const executeJobFactory: ExecuteJobFactory { const [separator, quoteValues, timezone] = await Promise.all([ - client.get('csv:separator'), - client.get('csv:quoteValues'), + client.get(CSV_SEPARATOR_SETTING), + client.get(CSV_QUOTE_VALUES_SETTING), client.get('dateFormat:tz'), ]); diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/lib/field_format_map.test.ts b/x-pack/plugins/reporting/server/export_types/csv/server/lib/field_format_map.test.ts index 0434da3d11fe1..83aa23de67663 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/lib/field_format_map.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/server/lib/field_format_map.test.ts @@ -9,6 +9,7 @@ import expect from '@kbn/expect'; import { fieldFormats, FieldFormatsGetConfigFn, + UI_SETTINGS, } from '../../../../../../../../src/plugins/data/server'; import { fieldFormatMapFactory } from './field_format_map'; @@ -28,10 +29,10 @@ describe('field format map', function () { }, }; const configMock: Record = {}; - configMock['format:defaultTypeMap'] = { + configMock[UI_SETTINGS.FORMAT_DEFAULT_TYPE_MAP] = { number: { id: 'number', params: {} }, }; - configMock['format:number:defaultPattern'] = '0,0.[000]'; + configMock[UI_SETTINGS.FORMAT_NUMBER_DEFAULT_PATTERN] = '0,0.[000]'; const getConfig = ((key: string) => configMock[key]) as FieldFormatsGetConfigFn; const testValue = '4000'; diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts index a9e4366f4eda6..3f997a703bef1 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts @@ -16,7 +16,12 @@ import { Filter, IIndexPattern, Query, + UI_SETTINGS, } from '../../../../../../../../src/plugins/data/server'; +import { + CSV_SEPARATOR_SETTING, + CSV_QUOTE_VALUES_SETTING, +} from '../../../../../../../../src/plugins/share/server'; import { CancellationToken } from '../../../../../common'; import { LevelLogger } from '../../../../lib'; import { createGenerateCsv } from '../../../csv/server/lib/generate_csv'; @@ -32,9 +37,9 @@ import { getFilters } from './get_filters'; const getEsQueryConfig = async (config: IUiSettingsClient) => { const configs = await Promise.all([ - config.get('query:allowLeadingWildcards'), - config.get('query:queryString:options'), - config.get('courier:ignoreFilterIfFieldNotInIndex'), + config.get(UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS), + config.get(UI_SETTINGS.QUERY_STRING_OPTIONS), + config.get(UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX), ]); const [allowLeadingWildcards, queryStringOptions, ignoreFilterIfFieldNotInIndex] = configs; return { @@ -45,7 +50,10 @@ const getEsQueryConfig = async (config: IUiSettingsClient) => { }; const getUiSettings = async (config: IUiSettingsClient) => { - const configs = await Promise.all([config.get('csv:separator'), config.get('csv:quoteValues')]); + const configs = await Promise.all([ + config.get(CSV_SEPARATOR_SETTING), + config.get(CSV_QUOTE_VALUES_SETTING), + ]); const [separator, quoteValues] = configs; return { separator, quoteValues }; }; diff --git a/x-pack/plugins/reporting/server/routes/generation.test.ts b/x-pack/plugins/reporting/server/routes/generation.test.ts index eb75109c704c7..f9b3e5446cfce 100644 --- a/x-pack/plugins/reporting/server/routes/generation.test.ts +++ b/x-pack/plugins/reporting/server/routes/generation.test.ts @@ -6,8 +6,7 @@ import supertest from 'supertest'; import { UnwrapPromise } from '@kbn/utility-types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { setupServer } from 'src/core/server/saved_objects/routes/integration_tests/test_utils'; +import { setupServer } from 'src/core/server/test_utils'; import { registerJobGenerationRoutes } from './generation'; import { createMockReportingCore } from '../test_helpers'; import { ReportingCore } from '..'; diff --git a/x-pack/plugins/reporting/server/routes/jobs.test.ts b/x-pack/plugins/reporting/server/routes/jobs.test.ts index d13b3e72ca8e7..22d60d62d5fdb 100644 --- a/x-pack/plugins/reporting/server/routes/jobs.test.ts +++ b/x-pack/plugins/reporting/server/routes/jobs.test.ts @@ -6,8 +6,7 @@ import { UnwrapPromise } from '@kbn/utility-types'; import { of } from 'rxjs'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { setupServer } from 'src/core/server/saved_objects/routes/integration_tests/test_utils'; +import { setupServer } from 'src/core/server/test_utils'; import supertest from 'supertest'; import { ReportingCore } from '..'; import { ReportingInternalSetup } from '../core'; diff --git a/x-pack/plugins/security/public/account_management/account_management_app.ts b/x-pack/plugins/security/public/account_management/account_management_app.ts index 41567a04fe030..0bb7785259c0e 100644 --- a/x-pack/plugins/security/public/account_management/account_management_app.ts +++ b/x-pack/plugins/security/public/account_management/account_management_app.ts @@ -5,7 +5,12 @@ */ import { i18n } from '@kbn/i18n'; -import { StartServicesAccessor, ApplicationSetup, AppMountParameters } from 'src/core/public'; +import { + ApplicationSetup, + AppMountParameters, + AppNavLinkStatus, + StartServicesAccessor, +} from '../../../../../src/core/public'; import { AuthenticationServiceSetup } from '../authentication'; interface CreateDeps { @@ -23,8 +28,7 @@ export const accountManagementApp = Object.freeze({ application.register({ id: this.id, title, - // TODO: switch to proper enum once https://github.com/elastic/kibana/issues/58327 is resolved. - navLinkStatus: 3, + navLinkStatus: AppNavLinkStatus.hidden, appRoute: '/security/account', async mount({ element }: AppMountParameters) { const [ diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss index 6784052ef4337..344cde9c7825c 100644 --- a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss @@ -23,9 +23,10 @@ } &:focus { + @include euiFocusRing; + border-color: transparent; border-radius: $euiBorderRadius; - @include euiFocusRing; .secLoginCard__title { text-decoration: underline; diff --git a/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts b/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts index 98110a83103aa..6821c163d817d 100644 --- a/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts +++ b/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts @@ -11,13 +11,15 @@ import { Feature } from '../../../../../features/public'; import { KibanaPrivileges } from '../model'; import { SecurityLicenseFeatures } from '../../..'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { featuresPluginMock } from '../../../../../features/server/mocks'; + export const createRawKibanaPrivileges = ( features: Feature[], { allowSubFeaturePrivileges = true } = {} ) => { - const featuresService = { - getFeatures: () => features, - }; + const featuresService = featuresPluginMock.createSetup(); + featuresService.getFeatures.mockReturnValue(features); const licensingService = { getFeatures: () => ({ allowSubFeaturePrivileges } as SecurityLicenseFeatures), diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx index afb8b6ec5dbe0..43387d913e6fc 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx @@ -163,7 +163,12 @@ function getProps({ const { http, docLinks, notifications } = coreMock.createStart(); http.get.mockImplementation(async (path: any) => { if (path === '/api/spaces/space') { - return buildSpaces(); + if (spacesEnabled) { + return buildSpaces(); + } + + const notFoundError = { response: { status: 404 } }; + throw notFoundError; } }); @@ -181,7 +186,6 @@ function getProps({ notifications, docLinks: new DocumentationLinksService(docLinks), fatalErrors, - spacesEnabled, uiCapabilities: buildUICapabilities(canManageSpaces), history: (scopedHistoryMock.create() as unknown) as ScopedHistory, }; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx index 77f4455d813c6..15888733ec424 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx @@ -80,7 +80,6 @@ interface Props { docLinks: DocumentationLinksService; http: HttpStart; license: SecurityLicense; - spacesEnabled: boolean; uiCapabilities: Capabilities; notifications: NotificationsStart; fatalErrors: FatalErrorsSetup; @@ -225,14 +224,21 @@ function useRole( return [role, setRole] as [Role | null, typeof setRole]; } -function useSpaces(http: HttpStart, fatalErrors: FatalErrorsSetup, spacesEnabled: boolean) { - const [spaces, setSpaces] = useState(null); +function useSpaces(http: HttpStart, fatalErrors: FatalErrorsSetup) { + const [spaces, setSpaces] = useState<{ enabled: boolean; list: Space[] } | null>(null); useEffect(() => { - (spacesEnabled ? http.get('/api/spaces/space') : Promise.resolve([])).then( - (fetchedSpaces) => setSpaces(fetchedSpaces), - (err) => fatalErrors.add(err) + http.get('/api/spaces/space').then( + (fetchedSpaces) => setSpaces({ enabled: true, list: fetchedSpaces }), + (err: IHttpFetchError) => { + // Spaces plugin can be disabled and hence this endpoint can be unavailable. + if (err.response?.status === 404) { + setSpaces({ enabled: false, list: [] }); + } else { + fatalErrors.add(err); + } + } ); - }, [http, fatalErrors, spacesEnabled]); + }, [http, fatalErrors]); return spaces; } @@ -278,7 +284,6 @@ export const EditRolePage: FunctionComponent = ({ roleName, action, fatalErrors, - spacesEnabled, license, docLinks, uiCapabilities, @@ -295,7 +300,7 @@ export const EditRolePage: FunctionComponent = ({ const runAsUsers = useRunAsUsers(userAPIClient, fatalErrors); const indexPatternsTitles = useIndexPatternsTitles(indexPatterns, fatalErrors, notifications); const privileges = usePrivileges(privilegesAPIClient, fatalErrors); - const spaces = useSpaces(http, fatalErrors, spacesEnabled); + const spaces = useSpaces(http, fatalErrors); const features = useFeatures(getFeatures, fatalErrors); const [role, setRole] = useRole( rolesAPIClient, @@ -434,8 +439,8 @@ export const EditRolePage: FunctionComponent = ({ = ({ setFormError(null); try { - await rolesAPIClient.saveRole({ role, spacesEnabled }); + await rolesAPIClient.saveRole({ role, spacesEnabled: spaces.enabled }); } catch (error) { notifications.toasts.addDanger(get(error, 'data.message')); return; @@ -554,7 +559,7 @@ export const EditRolePage: FunctionComponent = ({ backToRoleList(); }; - const description = spacesEnabled ? ( + const description = spaces.enabled ? ( (), + getFeatureUsageService: jest + .fn() + .mockReturnValue(securityFeatureUsageServiceMock.createStartContract()), }; } @@ -1451,6 +1455,9 @@ describe('Authenticator', () => { ); expect(mockSessionStorage.set).not.toHaveBeenCalled(); + expect( + mockOptions.getFeatureUsageService().recordPreAccessAgreementUsage + ).not.toHaveBeenCalled(); }); it('fails if cannot retrieve user session', async () => { @@ -1463,6 +1470,9 @@ describe('Authenticator', () => { ); expect(mockSessionStorage.set).not.toHaveBeenCalled(); + expect( + mockOptions.getFeatureUsageService().recordPreAccessAgreementUsage + ).not.toHaveBeenCalled(); }); it('fails if license doesn allow access agreement acknowledgement', async () => { @@ -1477,6 +1487,9 @@ describe('Authenticator', () => { ); expect(mockSessionStorage.set).not.toHaveBeenCalled(); + expect( + mockOptions.getFeatureUsageService().recordPreAccessAgreementUsage + ).not.toHaveBeenCalled(); }); it('properly acknowledges access agreement for the authenticated user', async () => { @@ -1493,6 +1506,10 @@ describe('Authenticator', () => { type: 'basic', name: 'basic1', }); + + expect( + mockOptions.getFeatureUsageService().recordPreAccessAgreementUsage + ).toHaveBeenCalledTimes(1); }); }); }); diff --git a/x-pack/plugins/security/server/authentication/authenticator.ts b/x-pack/plugins/security/server/authentication/authenticator.ts index 98342a8494e38..ac5c2a72b9667 100644 --- a/x-pack/plugins/security/server/authentication/authenticator.ts +++ b/x-pack/plugins/security/server/authentication/authenticator.ts @@ -38,6 +38,7 @@ import { DeauthenticationResult } from './deauthentication_result'; import { Tokens } from './tokens'; import { canRedirectRequest } from './can_redirect_request'; import { HTTPAuthorizationHeader } from './http_authentication'; +import { SecurityFeatureUsageServiceStart } from '../feature_usage'; /** * The shape of the session that is actually stored in the cookie. @@ -94,6 +95,7 @@ export interface ProviderLoginAttempt { export interface AuthenticatorOptions { auditLogger: SecurityAuditLogger; + getFeatureUsageService: () => SecurityFeatureUsageServiceStart; getCurrentUser: (request: KibanaRequest) => AuthenticatedUser | null; config: Pick; basePath: HttpServiceSetup['basePath']; @@ -502,6 +504,8 @@ export class Authenticator { currentUser.username, existingSession.provider ); + + this.options.getFeatureUsageService().recordPreAccessAgreementUsage(); } /** diff --git a/x-pack/plugins/security/server/authentication/index.test.ts b/x-pack/plugins/security/server/authentication/index.test.ts index 1c1e0ed781f18..c7323509c00d6 100644 --- a/x-pack/plugins/security/server/authentication/index.test.ts +++ b/x-pack/plugins/security/server/authentication/index.test.ts @@ -42,6 +42,8 @@ import { } from './api_keys'; import { SecurityLicense } from '../../common/licensing'; import { SecurityAuditLogger } from '../audit'; +import { SecurityFeatureUsageServiceStart } from '../feature_usage'; +import { securityFeatureUsageServiceMock } from '../feature_usage/index.mock'; describe('setupAuthentication()', () => { let mockSetupAuthenticationParams: { @@ -51,6 +53,7 @@ describe('setupAuthentication()', () => { http: jest.Mocked; clusterClient: jest.Mocked; license: jest.Mocked; + getFeatureUsageService: () => jest.Mocked; }; let mockScopedClusterClient: jest.Mocked>; beforeEach(() => { @@ -69,6 +72,9 @@ describe('setupAuthentication()', () => { clusterClient: elasticsearchServiceMock.createClusterClient(), license: licenseMock.create(), loggers: loggingServiceMock.create(), + getFeatureUsageService: jest + .fn() + .mockReturnValue(securityFeatureUsageServiceMock.createStartContract()), }; mockScopedClusterClient = elasticsearchServiceMock.createScopedClusterClient(); diff --git a/x-pack/plugins/security/server/authentication/index.ts b/x-pack/plugins/security/server/authentication/index.ts index 779b852195b02..ec48c727a5739 100644 --- a/x-pack/plugins/security/server/authentication/index.ts +++ b/x-pack/plugins/security/server/authentication/index.ts @@ -17,6 +17,7 @@ import { ConfigType } from '../config'; import { getErrorStatusCode } from '../errors'; import { Authenticator, ProviderSession } from './authenticator'; import { APIKeys, CreateAPIKeyParams, InvalidateAPIKeyParams } from './api_keys'; +import { SecurityFeatureUsageServiceStart } from '../feature_usage'; export { canRedirectRequest } from './can_redirect_request'; export { Authenticator, ProviderLoginAttempt } from './authenticator'; @@ -37,6 +38,7 @@ export { interface SetupAuthenticationParams { auditLogger: SecurityAuditLogger; + getFeatureUsageService: () => SecurityFeatureUsageServiceStart; http: CoreSetup['http']; clusterClient: IClusterClient; config: ConfigType; @@ -48,6 +50,7 @@ export type Authentication = UnwrapPromise { diff --git a/x-pack/plugins/security/server/authorization/app_authorization.ts b/x-pack/plugins/security/server/authorization/app_authorization.ts index aead8cb07897c..1036997ca821d 100644 --- a/x-pack/plugins/security/server/authorization/app_authorization.ts +++ b/x-pack/plugins/security/server/authorization/app_authorization.ts @@ -4,13 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { CoreSetup, Logger } from '../../../../../src/core/server'; -import { FeaturesService } from '../plugin'; -import { Authorization } from '.'; +import { HttpServiceSetup, Logger } from '../../../../../src/core/server'; +import { PluginSetupContract as FeaturesPluginSetup } from '../../../features/server'; +import { AuthorizationServiceSetup } from '.'; class ProtectedApplications { private applications: Set | null = null; - constructor(private readonly featuresService: FeaturesService) {} + constructor(private readonly featuresService: FeaturesPluginSetup) {} public shouldProtect(appId: string) { // Currently, once we get the list of features we essentially "lock" additional @@ -30,14 +30,14 @@ class ProtectedApplications { } export function initAppAuthorization( - http: CoreSetup['http'], + http: HttpServiceSetup, { actions, checkPrivilegesDynamicallyWithRequest, mode, - }: Pick, + }: Pick, logger: Logger, - featuresService: FeaturesService + featuresService: FeaturesPluginSetup ) { const protectedApplications = new ProtectedApplications(featuresService); diff --git a/x-pack/plugins/security/server/authorization/authorization_service.test.ts b/x-pack/plugins/security/server/authorization/authorization_service.test.ts new file mode 100644 index 0000000000000..978c985cfe820 --- /dev/null +++ b/x-pack/plugins/security/server/authorization/authorization_service.test.ts @@ -0,0 +1,263 @@ +/* + * 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 { + mockAuthorizationModeFactory, + mockCheckPrivilegesDynamicallyWithRequestFactory, + mockCheckPrivilegesWithRequestFactory, + mockCheckSavedObjectsPrivilegesWithRequestFactory, + mockPrivilegesFactory, + mockRegisterPrivilegesWithCluster, +} from './service.test.mocks'; + +import { BehaviorSubject } from 'rxjs'; +import { CoreStatus, ServiceStatusLevels } from '../../../../../src/core/server'; +import { checkPrivilegesWithRequestFactory } from './check_privileges'; +import { checkPrivilegesDynamicallyWithRequestFactory } from './check_privileges_dynamically'; +import { checkSavedObjectsPrivilegesWithRequestFactory } from './check_saved_objects_privileges'; +import { authorizationModeFactory } from './mode'; +import { privilegesFactory } from './privileges'; +import { AuthorizationService } from '.'; + +import { + coreMock, + elasticsearchServiceMock, + loggingServiceMock, +} from '../../../../../src/core/server/mocks'; +import { featuresPluginMock } from '../../../features/server/mocks'; +import { licenseMock } from '../../common/licensing/index.mock'; +import { SecurityLicense, SecurityLicenseFeatures } from '../../common/licensing'; +import { nextTick } from 'test_utils/enzyme_helpers'; + +const kibanaIndexName = '.a-kibana-index'; +const application = `kibana-${kibanaIndexName}`; +const mockCheckPrivilegesWithRequest = Symbol(); +const mockCheckPrivilegesDynamicallyWithRequest = Symbol(); +const mockCheckSavedObjectsPrivilegesWithRequest = Symbol(); +const mockPrivilegesService = Symbol(); +const mockAuthorizationMode = Symbol(); +beforeEach(() => { + mockCheckPrivilegesWithRequestFactory.mockReturnValue(mockCheckPrivilegesWithRequest); + mockCheckPrivilegesDynamicallyWithRequestFactory.mockReturnValue( + mockCheckPrivilegesDynamicallyWithRequest + ); + mockCheckSavedObjectsPrivilegesWithRequestFactory.mockReturnValue( + mockCheckSavedObjectsPrivilegesWithRequest + ); + mockPrivilegesFactory.mockReturnValue(mockPrivilegesService); + mockAuthorizationModeFactory.mockReturnValue(mockAuthorizationMode); +}); + +afterEach(() => { + mockRegisterPrivilegesWithCluster.mockClear(); +}); + +it(`#setup returns exposed services`, () => { + const mockClusterClient = elasticsearchServiceMock.createClusterClient(); + const mockGetSpacesService = jest + .fn() + .mockReturnValue({ getSpaceId: jest.fn(), namespaceToSpaceId: jest.fn() }); + const mockFeaturesSetup = featuresPluginMock.createSetup(); + const mockLicense = licenseMock.create(); + const mockCoreSetup = coreMock.createSetup(); + + const authorizationService = new AuthorizationService(); + const authz = authorizationService.setup({ + http: mockCoreSetup.http, + capabilities: mockCoreSetup.capabilities, + status: mockCoreSetup.status, + clusterClient: mockClusterClient, + license: mockLicense, + loggers: loggingServiceMock.create(), + kibanaIndexName, + packageVersion: 'some-version', + features: mockFeaturesSetup, + getSpacesService: mockGetSpacesService, + }); + + expect(authz.actions.version).toBe('version:some-version'); + expect(authz.applicationName).toBe(application); + + expect(authz.checkPrivilegesWithRequest).toBe(mockCheckPrivilegesWithRequest); + expect(checkPrivilegesWithRequestFactory).toHaveBeenCalledWith( + authz.actions, + mockClusterClient, + authz.applicationName + ); + + expect(authz.checkPrivilegesDynamicallyWithRequest).toBe( + mockCheckPrivilegesDynamicallyWithRequest + ); + expect(checkPrivilegesDynamicallyWithRequestFactory).toHaveBeenCalledWith( + mockCheckPrivilegesWithRequest, + mockGetSpacesService + ); + + expect(authz.checkSavedObjectsPrivilegesWithRequest).toBe( + mockCheckSavedObjectsPrivilegesWithRequest + ); + expect(checkSavedObjectsPrivilegesWithRequestFactory).toHaveBeenCalledWith( + mockCheckPrivilegesWithRequest, + mockGetSpacesService + ); + + expect(authz.privileges).toBe(mockPrivilegesService); + expect(privilegesFactory).toHaveBeenCalledWith(authz.actions, mockFeaturesSetup, mockLicense); + + expect(authz.mode).toBe(mockAuthorizationMode); + expect(authorizationModeFactory).toHaveBeenCalledWith(mockLicense); + + expect(mockCoreSetup.capabilities.registerSwitcher).toHaveBeenCalledTimes(1); + expect(mockCoreSetup.capabilities.registerSwitcher).toHaveBeenCalledWith(expect.any(Function)); +}); + +describe('#start', () => { + let statusSubject: BehaviorSubject; + let licenseSubject: BehaviorSubject; + let mockLicense: jest.Mocked; + beforeEach(() => { + const mockClusterClient = elasticsearchServiceMock.createClusterClient(); + + licenseSubject = new BehaviorSubject(({} as unknown) as SecurityLicenseFeatures); + mockLicense = licenseMock.create(); + mockLicense.isEnabled.mockReturnValue(false); + mockLicense.features$ = licenseSubject; + + statusSubject = new BehaviorSubject({ + elasticsearch: { level: ServiceStatusLevels.unavailable, summary: 'Service is NOT working' }, + savedObjects: { level: ServiceStatusLevels.unavailable, summary: 'Service is NOT working' }, + }); + const mockCoreSetup = coreMock.createSetup(); + mockCoreSetup.status.core$ = statusSubject; + + const authorizationService = new AuthorizationService(); + authorizationService.setup({ + http: mockCoreSetup.http, + capabilities: mockCoreSetup.capabilities, + status: mockCoreSetup.status, + clusterClient: mockClusterClient, + license: mockLicense, + loggers: loggingServiceMock.create(), + kibanaIndexName, + packageVersion: 'some-version', + features: featuresPluginMock.createSetup(), + getSpacesService: jest + .fn() + .mockReturnValue({ getSpaceId: jest.fn(), namespaceToSpaceId: jest.fn() }), + }); + + const featuresStart = featuresPluginMock.createStart(); + featuresStart.getFeatures.mockReturnValue([]); + + authorizationService.start({ clusterClient: mockClusterClient, features: featuresStart }); + + // ES and license aren't available yet. + expect(mockRegisterPrivilegesWithCluster).not.toHaveBeenCalled(); + }); + + it('registers cluster privileges', async () => { + // ES is available now, but not license. + statusSubject.next({ + elasticsearch: { level: ServiceStatusLevels.available, summary: 'Service is working' }, + savedObjects: { level: ServiceStatusLevels.unavailable, summary: 'Service is NOT working' }, + }); + expect(mockRegisterPrivilegesWithCluster).not.toHaveBeenCalled(); + + // Both ES and license are available now. + mockLicense.isEnabled.mockReturnValue(true); + licenseSubject.next(({} as unknown) as SecurityLicenseFeatures); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(1); + + await nextTick(); + + // New changes still trigger privileges re-registration. + licenseSubject.next(({} as unknown) as SecurityLicenseFeatures); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(2); + }); + + it('schedules retries if fails to register cluster privileges', async () => { + jest.useFakeTimers(); + + mockRegisterPrivilegesWithCluster.mockRejectedValue(new Error('Some error')); + + // Both ES and license are available. + mockLicense.isEnabled.mockReturnValue(true); + statusSubject.next({ + elasticsearch: { level: ServiceStatusLevels.available, summary: 'Service is working' }, + savedObjects: { level: ServiceStatusLevels.unavailable, summary: 'Service is NOT working' }, + }); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(1); + + // Next retry isn't performed immediately, retry happens only after a timeout. + await nextTick(); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(1); + jest.advanceTimersByTime(100); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(2); + + // Delay between consequent retries is increasing. + await nextTick(); + jest.advanceTimersByTime(100); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(2); + await nextTick(); + jest.advanceTimersByTime(100); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(3); + + // When call finally succeeds retries aren't scheduled anymore. + mockRegisterPrivilegesWithCluster.mockResolvedValue(undefined); + await nextTick(); + jest.runAllTimers(); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(4); + await nextTick(); + jest.runAllTimers(); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(4); + + // New changes still trigger privileges re-registration. + licenseSubject.next(({} as unknown) as SecurityLicenseFeatures); + expect(mockRegisterPrivilegesWithCluster).toHaveBeenCalledTimes(5); + }); +}); + +it('#stop unsubscribes from license and ES updates.', () => { + const mockClusterClient = elasticsearchServiceMock.createClusterClient(); + + const licenseSubject = new BehaviorSubject(({} as unknown) as SecurityLicenseFeatures); + const mockLicense = licenseMock.create(); + mockLicense.isEnabled.mockReturnValue(false); + mockLicense.features$ = licenseSubject; + + const mockCoreSetup = coreMock.createSetup(); + mockCoreSetup.status.core$ = new BehaviorSubject({ + elasticsearch: { level: ServiceStatusLevels.available, summary: 'Service is working' }, + savedObjects: { level: ServiceStatusLevels.available, summary: 'Service is working' }, + }); + + const authorizationService = new AuthorizationService(); + authorizationService.setup({ + http: mockCoreSetup.http, + capabilities: mockCoreSetup.capabilities, + status: mockCoreSetup.status, + clusterClient: mockClusterClient, + license: mockLicense, + loggers: loggingServiceMock.create(), + kibanaIndexName, + packageVersion: 'some-version', + features: featuresPluginMock.createSetup(), + getSpacesService: jest + .fn() + .mockReturnValue({ getSpaceId: jest.fn(), namespaceToSpaceId: jest.fn() }), + }); + + const featuresStart = featuresPluginMock.createStart(); + featuresStart.getFeatures.mockReturnValue([]); + authorizationService.start({ clusterClient: mockClusterClient, features: featuresStart }); + + authorizationService.stop(); + + // After stop we don't register privileges even if all requirements are met. + mockLicense.isEnabled.mockReturnValue(true); + licenseSubject.next(({} as unknown) as SecurityLicenseFeatures); + expect(mockRegisterPrivilegesWithCluster).not.toHaveBeenCalled(); +}); diff --git a/x-pack/plugins/security/server/authorization/authorization_service.ts b/x-pack/plugins/security/server/authorization/authorization_service.ts new file mode 100644 index 0000000000000..989784a1436d2 --- /dev/null +++ b/x-pack/plugins/security/server/authorization/authorization_service.ts @@ -0,0 +1,221 @@ +/* + * 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 { combineLatest, BehaviorSubject, Subscription } from 'rxjs'; +import { distinctUntilChanged, filter } from 'rxjs/operators'; +import { UICapabilities } from 'ui/capabilities'; +import { + LoggerFactory, + KibanaRequest, + IClusterClient, + ServiceStatusLevels, + Logger, + StatusServiceSetup, + HttpServiceSetup, + CapabilitiesSetup, +} from '../../../../../src/core/server'; + +import { + PluginSetupContract as FeaturesPluginSetup, + PluginStartContract as FeaturesPluginStart, +} from '../../../features/server'; + +import { SpacesService } from '../plugin'; +import { Actions } from './actions'; +import { CheckPrivilegesWithRequest, checkPrivilegesWithRequestFactory } from './check_privileges'; +import { + CheckPrivilegesDynamicallyWithRequest, + checkPrivilegesDynamicallyWithRequestFactory, +} from './check_privileges_dynamically'; +import { + CheckSavedObjectsPrivilegesWithRequest, + checkSavedObjectsPrivilegesWithRequestFactory, +} from './check_saved_objects_privileges'; +import { AuthorizationMode, authorizationModeFactory } from './mode'; +import { privilegesFactory, PrivilegesService } from './privileges'; +import { initAppAuthorization } from './app_authorization'; +import { initAPIAuthorization } from './api_authorization'; +import { disableUICapabilitiesFactory } from './disable_ui_capabilities'; +import { validateFeaturePrivileges } from './validate_feature_privileges'; +import { validateReservedPrivileges } from './validate_reserved_privileges'; +import { registerPrivilegesWithCluster } from './register_privileges_with_cluster'; +import { APPLICATION_PREFIX } from '../../common/constants'; +import { SecurityLicense } from '../../common/licensing'; + +export { Actions } from './actions'; +export { CheckSavedObjectsPrivileges } from './check_saved_objects_privileges'; +export { featurePrivilegeIterator } from './privileges'; + +interface AuthorizationServiceSetupParams { + packageVersion: string; + http: HttpServiceSetup; + status: StatusServiceSetup; + capabilities: CapabilitiesSetup; + clusterClient: IClusterClient; + license: SecurityLicense; + loggers: LoggerFactory; + features: FeaturesPluginSetup; + kibanaIndexName: string; + getSpacesService(): SpacesService | undefined; +} + +interface AuthorizationServiceStartParams { + features: FeaturesPluginStart; + clusterClient: IClusterClient; +} + +export interface AuthorizationServiceSetup { + actions: Actions; + checkPrivilegesWithRequest: CheckPrivilegesWithRequest; + checkPrivilegesDynamicallyWithRequest: CheckPrivilegesDynamicallyWithRequest; + checkSavedObjectsPrivilegesWithRequest: CheckSavedObjectsPrivilegesWithRequest; + applicationName: string; + mode: AuthorizationMode; + privileges: PrivilegesService; +} + +export class AuthorizationService { + private logger!: Logger; + private license!: SecurityLicense; + private status!: StatusServiceSetup; + private applicationName!: string; + private privileges!: PrivilegesService; + + private statusSubscription?: Subscription; + + setup({ + http, + capabilities, + status, + packageVersion, + clusterClient, + license, + loggers, + features, + kibanaIndexName, + getSpacesService, + }: AuthorizationServiceSetupParams): AuthorizationServiceSetup { + this.logger = loggers.get('authorization'); + this.license = license; + this.status = status; + this.applicationName = `${APPLICATION_PREFIX}${kibanaIndexName}`; + + const mode = authorizationModeFactory(license); + const actions = new Actions(packageVersion); + this.privileges = privilegesFactory(actions, features, license); + + const checkPrivilegesWithRequest = checkPrivilegesWithRequestFactory( + actions, + clusterClient, + this.applicationName + ); + + const authz = { + actions, + applicationName: this.applicationName, + mode, + privileges: this.privileges, + checkPrivilegesWithRequest, + checkPrivilegesDynamicallyWithRequest: checkPrivilegesDynamicallyWithRequestFactory( + checkPrivilegesWithRequest, + getSpacesService + ), + checkSavedObjectsPrivilegesWithRequest: checkSavedObjectsPrivilegesWithRequestFactory( + checkPrivilegesWithRequest, + getSpacesService + ), + }; + + capabilities.registerSwitcher( + async (request: KibanaRequest, uiCapabilities: UICapabilities) => { + // If we have a license which doesn't enable security, or we're a legacy user we shouldn't + // disable any ui capabilities + if (!mode.useRbacForRequest(request)) { + return uiCapabilities; + } + + const disableUICapabilities = disableUICapabilitiesFactory( + request, + features.getFeatures(), + this.logger, + authz + ); + + if (!request.auth.isAuthenticated) { + return disableUICapabilities.all(uiCapabilities); + } + + return await disableUICapabilities.usingPrivileges(uiCapabilities); + } + ); + + initAPIAuthorization(http, authz, loggers.get('api-authorization')); + initAppAuthorization(http, authz, loggers.get('app-authorization'), features); + + return authz; + } + + start({ clusterClient, features }: AuthorizationServiceStartParams) { + const allFeatures = features.getFeatures(); + validateFeaturePrivileges(allFeatures); + validateReservedPrivileges(allFeatures); + + this.registerPrivileges(clusterClient); + } + + stop() { + if (this.statusSubscription !== undefined) { + this.statusSubscription.unsubscribe(); + this.statusSubscription = undefined; + } + } + + private registerPrivileges(clusterClient: IClusterClient) { + const RETRY_SCALE_DURATION = 100; + const RETRY_TIMEOUT_MAX = 10000; + const retries$ = new BehaviorSubject(0); + let retryTimeout: NodeJS.Timeout; + + // Register cluster privileges once Elasticsearch is available and Security plugin is enabled. + this.statusSubscription = combineLatest([ + this.status.core$, + this.license.features$, + retries$.asObservable().pipe( + // We shouldn't emit new value if retry counter is reset. This comparator isn't called for + // the initial value. + distinctUntilChanged((prev, curr) => prev === curr || curr === 0) + ), + ]) + .pipe( + filter( + ([status]) => + this.license.isEnabled() && status.elasticsearch.level === ServiceStatusLevels.available + ) + ) + .subscribe(async () => { + // If status or license change occurred before retry timeout we should cancel it. + if (retryTimeout) { + clearTimeout(retryTimeout); + } + + try { + await registerPrivilegesWithCluster( + this.logger, + this.privileges, + this.applicationName, + clusterClient + ); + retries$.next(0); + } catch (err) { + const retriesElapsed = retries$.getValue() + 1; + retryTimeout = setTimeout( + () => retries$.next(retriesElapsed), + Math.min(retriesElapsed * RETRY_SCALE_DURATION, RETRY_TIMEOUT_MAX) + ); + } + }); + } +} diff --git a/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts b/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts index 72937c15756ac..183ad9169a123 100644 --- a/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts +++ b/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts @@ -10,13 +10,13 @@ import { KibanaRequest, Logger } from '../../../../../src/core/server'; import { Feature } from '../../../features/server'; import { CheckPrivilegesResponse } from './check_privileges'; -import { Authorization } from './index'; +import { AuthorizationServiceSetup } from '.'; export function disableUICapabilitiesFactory( request: KibanaRequest, features: Feature[], logger: Logger, - authz: Authorization + authz: AuthorizationServiceSetup ) { const featureNavLinkIds = features .map((feature) => feature.navLinkId) diff --git a/x-pack/plugins/security/server/authorization/index.test.ts b/x-pack/plugins/security/server/authorization/index.test.ts deleted file mode 100644 index 3252053454764..0000000000000 --- a/x-pack/plugins/security/server/authorization/index.test.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 { - mockAuthorizationModeFactory, - mockCheckPrivilegesDynamicallyWithRequestFactory, - mockCheckPrivilegesWithRequestFactory, - mockCheckSavedObjectsPrivilegesWithRequestFactory, - mockPrivilegesFactory, -} from './service.test.mocks'; - -import { checkPrivilegesWithRequestFactory } from './check_privileges'; -import { checkPrivilegesDynamicallyWithRequestFactory } from './check_privileges_dynamically'; -import { checkSavedObjectsPrivilegesWithRequestFactory } from './check_saved_objects_privileges'; -import { authorizationModeFactory } from './mode'; -import { privilegesFactory } from './privileges'; -import { setupAuthorization } from '.'; - -import { - coreMock, - elasticsearchServiceMock, - loggingServiceMock, -} from '../../../../../src/core/server/mocks'; -import { licenseMock } from '../../common/licensing/index.mock'; - -test(`returns exposed services`, () => { - const kibanaIndexName = '.a-kibana-index'; - const application = `kibana-${kibanaIndexName}`; - - const mockCheckPrivilegesWithRequest = Symbol(); - mockCheckPrivilegesWithRequestFactory.mockReturnValue(mockCheckPrivilegesWithRequest); - - const mockCheckPrivilegesDynamicallyWithRequest = Symbol(); - mockCheckPrivilegesDynamicallyWithRequestFactory.mockReturnValue( - mockCheckPrivilegesDynamicallyWithRequest - ); - - const mockCheckSavedObjectsPrivilegesWithRequest = Symbol(); - mockCheckSavedObjectsPrivilegesWithRequestFactory.mockReturnValue( - mockCheckSavedObjectsPrivilegesWithRequest - ); - - const mockPrivilegesService = Symbol(); - mockPrivilegesFactory.mockReturnValue(mockPrivilegesService); - const mockAuthorizationMode = Symbol(); - mockAuthorizationModeFactory.mockReturnValue(mockAuthorizationMode); - - const mockClusterClient = elasticsearchServiceMock.createClusterClient(); - const mockGetSpacesService = jest - .fn() - .mockReturnValue({ getSpaceId: jest.fn(), namespaceToSpaceId: jest.fn() }); - const mockFeaturesService = { getFeatures: () => [] }; - const mockLicense = licenseMock.create(); - - const authz = setupAuthorization({ - http: coreMock.createSetup().http, - clusterClient: mockClusterClient, - license: mockLicense, - loggers: loggingServiceMock.create(), - kibanaIndexName, - packageVersion: 'some-version', - featuresService: mockFeaturesService, - getSpacesService: mockGetSpacesService, - }); - - expect(authz.actions.version).toBe('version:some-version'); - expect(authz.applicationName).toBe(application); - - expect(authz.checkPrivilegesWithRequest).toBe(mockCheckPrivilegesWithRequest); - expect(checkPrivilegesWithRequestFactory).toHaveBeenCalledWith( - authz.actions, - mockClusterClient, - authz.applicationName - ); - - expect(authz.checkPrivilegesDynamicallyWithRequest).toBe( - mockCheckPrivilegesDynamicallyWithRequest - ); - expect(checkPrivilegesDynamicallyWithRequestFactory).toHaveBeenCalledWith( - mockCheckPrivilegesWithRequest, - mockGetSpacesService - ); - - expect(authz.checkSavedObjectsPrivilegesWithRequest).toBe( - mockCheckSavedObjectsPrivilegesWithRequest - ); - expect(checkSavedObjectsPrivilegesWithRequestFactory).toHaveBeenCalledWith( - mockCheckPrivilegesWithRequest, - mockGetSpacesService - ); - - expect(authz.privileges).toBe(mockPrivilegesService); - expect(privilegesFactory).toHaveBeenCalledWith(authz.actions, mockFeaturesService, mockLicense); - - expect(authz.mode).toBe(mockAuthorizationMode); - expect(authorizationModeFactory).toHaveBeenCalledWith(mockLicense); -}); diff --git a/x-pack/plugins/security/server/authorization/index.ts b/x-pack/plugins/security/server/authorization/index.ts index cf970a561b93f..d5c1323354f86 100644 --- a/x-pack/plugins/security/server/authorization/index.ts +++ b/x-pack/plugins/security/server/authorization/index.ts @@ -4,134 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { UICapabilities } from 'ui/capabilities'; -import { - CoreSetup, - LoggerFactory, - KibanaRequest, - IClusterClient, -} from '../../../../../src/core/server'; - -import { FeaturesService, SpacesService } from '../plugin'; -import { Actions } from './actions'; -import { CheckPrivilegesWithRequest, checkPrivilegesWithRequestFactory } from './check_privileges'; -import { - CheckPrivilegesDynamicallyWithRequest, - checkPrivilegesDynamicallyWithRequestFactory, -} from './check_privileges_dynamically'; -import { - CheckSavedObjectsPrivilegesWithRequest, - checkSavedObjectsPrivilegesWithRequestFactory, -} from './check_saved_objects_privileges'; -import { AuthorizationMode, authorizationModeFactory } from './mode'; -import { privilegesFactory, PrivilegesService } from './privileges'; -import { initAppAuthorization } from './app_authorization'; -import { initAPIAuthorization } from './api_authorization'; -import { disableUICapabilitiesFactory } from './disable_ui_capabilities'; -import { validateFeaturePrivileges } from './validate_feature_privileges'; -import { validateReservedPrivileges } from './validate_reserved_privileges'; -import { registerPrivilegesWithCluster } from './register_privileges_with_cluster'; -import { APPLICATION_PREFIX } from '../../common/constants'; -import { SecurityLicense } from '../../common/licensing'; - export { Actions } from './actions'; +export { AuthorizationService, AuthorizationServiceSetup } from './authorization_service'; export { CheckSavedObjectsPrivileges } from './check_saved_objects_privileges'; export { featurePrivilegeIterator } from './privileges'; - -interface SetupAuthorizationParams { - packageVersion: string; - http: CoreSetup['http']; - clusterClient: IClusterClient; - license: SecurityLicense; - loggers: LoggerFactory; - featuresService: FeaturesService; - kibanaIndexName: string; - getSpacesService(): SpacesService | undefined; -} - -export interface Authorization { - actions: Actions; - checkPrivilegesWithRequest: CheckPrivilegesWithRequest; - checkPrivilegesDynamicallyWithRequest: CheckPrivilegesDynamicallyWithRequest; - checkSavedObjectsPrivilegesWithRequest: CheckSavedObjectsPrivilegesWithRequest; - applicationName: string; - mode: AuthorizationMode; - privileges: PrivilegesService; - disableUnauthorizedCapabilities: ( - request: KibanaRequest, - capabilities: UICapabilities - ) => Promise; - registerPrivilegesWithCluster: () => Promise; -} - -export function setupAuthorization({ - http, - packageVersion, - clusterClient, - license, - loggers, - featuresService, - kibanaIndexName, - getSpacesService, -}: SetupAuthorizationParams): Authorization { - const actions = new Actions(packageVersion); - const mode = authorizationModeFactory(license); - const applicationName = `${APPLICATION_PREFIX}${kibanaIndexName}`; - const checkPrivilegesWithRequest = checkPrivilegesWithRequestFactory( - actions, - clusterClient, - applicationName - ); - const privileges = privilegesFactory(actions, featuresService, license); - const logger = loggers.get('authorization'); - - const authz = { - actions, - applicationName, - checkPrivilegesWithRequest, - checkPrivilegesDynamicallyWithRequest: checkPrivilegesDynamicallyWithRequestFactory( - checkPrivilegesWithRequest, - getSpacesService - ), - checkSavedObjectsPrivilegesWithRequest: checkSavedObjectsPrivilegesWithRequestFactory( - checkPrivilegesWithRequest, - getSpacesService - ), - mode, - privileges, - - async disableUnauthorizedCapabilities(request: KibanaRequest, capabilities: UICapabilities) { - // If we have a license which doesn't enable security, or we're a legacy user we shouldn't - // disable any ui capabilities - if (!mode.useRbacForRequest(request)) { - return capabilities; - } - - const disableUICapabilities = disableUICapabilitiesFactory( - request, - featuresService.getFeatures(), - logger, - authz - ); - - if (!request.auth.isAuthenticated) { - return disableUICapabilities.all(capabilities); - } - - return await disableUICapabilities.usingPrivileges(capabilities); - }, - - registerPrivilegesWithCluster: async () => { - const features = featuresService.getFeatures(); - validateFeaturePrivileges(features); - validateReservedPrivileges(features); - - await registerPrivilegesWithCluster(logger, privileges, applicationName, clusterClient); - }, - }; - - initAPIAuthorization(http, authz, loggers.get('api-authorization')); - initAppAuthorization(http, authz, loggers.get('app-authorization'), featuresService); - - return authz; -} diff --git a/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts b/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts index b023c12d35b79..06f064a379fe6 100644 --- a/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts +++ b/x-pack/plugins/security/server/authorization/privileges/privileges.test.ts @@ -8,6 +8,8 @@ import { Feature } from '../../../../features/server'; import { Actions } from '../actions'; import { privilegesFactory } from './privileges'; +import { featuresPluginMock } from '../../../../features/server/mocks'; + const actions = new Actions('1.0.0-zeta1'); describe('features', () => { @@ -42,7 +44,9 @@ describe('features', () => { }), ]; - const mockFeaturesService = { getFeatures: jest.fn().mockReturnValue(features) }; + const mockFeaturesService = featuresPluginMock.createSetup(); + mockFeaturesService.getFeatures.mockReturnValue(features); + const mockLicenseService = { getFeatures: jest.fn().mockReturnValue({ allowSubFeaturePrivileges: true }), }; diff --git a/x-pack/plugins/security/server/authorization/privileges/privileges.ts b/x-pack/plugins/security/server/authorization/privileges/privileges.ts index f3b2881e79ece..5a15290a7f1a2 100644 --- a/x-pack/plugins/security/server/authorization/privileges/privileges.ts +++ b/x-pack/plugins/security/server/authorization/privileges/privileges.ts @@ -6,11 +6,10 @@ import { uniq } from 'lodash'; import { SecurityLicense } from '../../../common/licensing'; -import { Feature } from '../../../../features/server'; +import { Feature, PluginSetupContract as FeaturesPluginSetup } from '../../../../features/server'; import { RawKibanaPrivileges } from '../../../common/model'; import { Actions } from '../actions'; import { featurePrivilegeBuilderFactory } from './feature_privilege_builder'; -import { FeaturesService } from '../../plugin'; import { featurePrivilegeIterator, subFeaturePrivilegeIterator, @@ -22,7 +21,7 @@ export interface PrivilegesService { export function privilegesFactory( actions: Actions, - featuresService: FeaturesService, + featuresService: FeaturesPluginSetup, licenseService: Pick ) { const featurePrivilegeBuilder = featurePrivilegeBuilderFactory(actions); diff --git a/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.test.ts b/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.test.ts index fff4345c72409..e21203e60b887 100644 --- a/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.test.ts +++ b/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.test.ts @@ -49,7 +49,7 @@ const registerPrivilegesWithClusterTest = ( }); for (const deletedPrivilege of deletedPrivileges) { expect(mockLogger.debug).toHaveBeenCalledWith( - `Deleting Kibana Privilege ${deletedPrivilege} from Elasticearch for ${application}` + `Deleting Kibana Privilege ${deletedPrivilege} from Elasticsearch for ${application}` ); expect(mockClusterClient.callAsInternalUser).toHaveBeenCalledWith( 'shield.deletePrivilege', @@ -82,7 +82,7 @@ const registerPrivilegesWithClusterTest = ( `Registering Kibana Privileges with Elasticsearch for ${application}` ); expect(mockLogger.debug).toHaveBeenCalledWith( - `Kibana Privileges already registered with Elasticearch for ${application}` + `Kibana Privileges already registered with Elasticsearch for ${application}` ); }; }; diff --git a/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.ts b/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.ts index 22e7830d20e28..8e54794494a90 100644 --- a/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.ts +++ b/x-pack/plugins/security/server/authorization/register_privileges_with_cluster.ts @@ -61,14 +61,14 @@ export async function registerPrivilegesWithCluster( privilege: application, }); if (arePrivilegesEqual(existingPrivileges, expectedPrivileges)) { - logger.debug(`Kibana Privileges already registered with Elasticearch for ${application}`); + logger.debug(`Kibana Privileges already registered with Elasticsearch for ${application}`); return; } const privilegesToDelete = getPrivilegesToDelete(existingPrivileges, expectedPrivileges); for (const privilegeToDelete of privilegesToDelete) { logger.debug( - `Deleting Kibana Privilege ${privilegeToDelete} from Elasticearch for ${application}` + `Deleting Kibana Privilege ${privilegeToDelete} from Elasticsearch for ${application}` ); try { await clusterClient.callAsInternalUser('shield.deletePrivilege', { diff --git a/x-pack/plugins/security/server/authorization/service.test.mocks.ts b/x-pack/plugins/security/server/authorization/service.test.mocks.ts index 5cd2eac20094d..d73adde66a490 100644 --- a/x-pack/plugins/security/server/authorization/service.test.mocks.ts +++ b/x-pack/plugins/security/server/authorization/service.test.mocks.ts @@ -28,3 +28,8 @@ export const mockAuthorizationModeFactory = jest.fn(); jest.mock('./mode', () => ({ authorizationModeFactory: mockAuthorizationModeFactory, })); + +export const mockRegisterPrivilegesWithCluster = jest.fn(); +jest.mock('./register_privileges_with_cluster', () => ({ + registerPrivilegesWithCluster: mockRegisterPrivilegesWithCluster, +})); diff --git a/x-pack/plugins/security/server/feature_usage/feature_usage_service.test.ts b/x-pack/plugins/security/server/feature_usage/feature_usage_service.test.ts new file mode 100644 index 0000000000000..46796fa73ef26 --- /dev/null +++ b/x-pack/plugins/security/server/feature_usage/feature_usage_service.test.ts @@ -0,0 +1,42 @@ +/* + * 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 { SecurityFeatureUsageService } from './feature_usage_service'; + +describe('#setup', () => { + it('registers all known security features', () => { + const featureUsage = { register: jest.fn() }; + const securityFeatureUsage = new SecurityFeatureUsageService(); + securityFeatureUsage.setup({ featureUsage }); + expect(featureUsage.register).toHaveBeenCalledTimes(2); + expect(featureUsage.register.mock.calls.map((c) => c[0])).toMatchInlineSnapshot(` + Array [ + "Subfeature privileges", + "Pre-access agreement", + ] + `); + }); +}); + +describe('start contract', () => { + it('notifies when sub-feature privileges are in use', () => { + const featureUsage = { notifyUsage: jest.fn(), getLastUsages: jest.fn() }; + const securityFeatureUsage = new SecurityFeatureUsageService(); + const startContract = securityFeatureUsage.start({ featureUsage }); + startContract.recordSubFeaturePrivilegeUsage(); + expect(featureUsage.notifyUsage).toHaveBeenCalledTimes(1); + expect(featureUsage.notifyUsage).toHaveBeenCalledWith('Subfeature privileges'); + }); + + it('notifies when pre-access agreement is used', () => { + const featureUsage = { notifyUsage: jest.fn(), getLastUsages: jest.fn() }; + const securityFeatureUsage = new SecurityFeatureUsageService(); + const startContract = securityFeatureUsage.start({ featureUsage }); + startContract.recordPreAccessAgreementUsage(); + expect(featureUsage.notifyUsage).toHaveBeenCalledTimes(1); + expect(featureUsage.notifyUsage).toHaveBeenCalledWith('Pre-access agreement'); + }); +}); diff --git a/x-pack/plugins/security/server/feature_usage/feature_usage_service.ts b/x-pack/plugins/security/server/feature_usage/feature_usage_service.ts new file mode 100644 index 0000000000000..1bc1e664981bf --- /dev/null +++ b/x-pack/plugins/security/server/feature_usage/feature_usage_service.ts @@ -0,0 +1,38 @@ +/* + * 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 { FeatureUsageServiceSetup, FeatureUsageServiceStart } from '../../../licensing/server'; + +interface SetupDeps { + featureUsage: FeatureUsageServiceSetup; +} + +interface StartDeps { + featureUsage: FeatureUsageServiceStart; +} + +export interface SecurityFeatureUsageServiceStart { + recordPreAccessAgreementUsage: () => void; + recordSubFeaturePrivilegeUsage: () => void; +} + +export class SecurityFeatureUsageService { + public setup({ featureUsage }: SetupDeps) { + featureUsage.register('Subfeature privileges', 'gold'); + featureUsage.register('Pre-access agreement', 'gold'); + } + + public start({ featureUsage }: StartDeps): SecurityFeatureUsageServiceStart { + return { + recordPreAccessAgreementUsage() { + featureUsage.notifyUsage('Pre-access agreement'); + }, + recordSubFeaturePrivilegeUsage() { + featureUsage.notifyUsage('Subfeature privileges'); + }, + }; + } +} diff --git a/x-pack/plugins/security/server/feature_usage/index.mock.ts b/x-pack/plugins/security/server/feature_usage/index.mock.ts new file mode 100644 index 0000000000000..6ed42145abd76 --- /dev/null +++ b/x-pack/plugins/security/server/feature_usage/index.mock.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { SecurityFeatureUsageServiceStart } from './feature_usage_service'; + +export const securityFeatureUsageServiceMock = { + createStartContract() { + return { + recordPreAccessAgreementUsage: jest.fn(), + recordSubFeaturePrivilegeUsage: jest.fn(), + } as jest.Mocked; + }, +}; diff --git a/x-pack/plugins/security/server/feature_usage/index.ts b/x-pack/plugins/security/server/feature_usage/index.ts new file mode 100644 index 0000000000000..a3e1f35ee3824 --- /dev/null +++ b/x-pack/plugins/security/server/feature_usage/index.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export { + SecurityFeatureUsageService, + SecurityFeatureUsageServiceStart, +} from './feature_usage_service'; diff --git a/x-pack/plugins/security/server/mocks.ts b/x-pack/plugins/security/server/mocks.ts index 72a946d6c5155..c2d99433b0346 100644 --- a/x-pack/plugins/security/server/mocks.ts +++ b/x-pack/plugins/security/server/mocks.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SecurityPluginSetup } from './plugin'; - import { authenticationMock } from './authentication/index.mock'; import { authorizationMock } from './authorization/index.mock'; import { licenseMock } from '../common/licensing/index.mock'; @@ -23,7 +21,6 @@ function createSetupMock() { }, registerSpacesService: jest.fn(), license: licenseMock.create(), - __legacyCompat: {} as SecurityPluginSetup['__legacyCompat'], }; } diff --git a/x-pack/plugins/security/server/plugin.test.ts b/x-pack/plugins/security/server/plugin.test.ts index 3e30ff9447f3e..e01c608e5f306 100644 --- a/x-pack/plugins/security/server/plugin.test.ts +++ b/x-pack/plugins/security/server/plugin.test.ts @@ -41,16 +41,15 @@ describe('Security Plugin', () => { mockClusterClient = elasticsearchServiceMock.createCustomClusterClient(); mockCoreSetup.elasticsearch.legacy.createClient.mockReturnValue(mockClusterClient); - mockDependencies = { licensing: { license$: of({}) } } as PluginSetupDependencies; + mockDependencies = ({ + licensing: { license$: of({}), featureUsage: { register: jest.fn() } }, + } as unknown) as PluginSetupDependencies; }); describe('setup()', () => { it('exposes proper contract', async () => { await expect(plugin.setup(mockCoreSetup, mockDependencies)).resolves.toMatchInlineSnapshot(` Object { - "__legacyCompat": Object { - "registerPrivilegesWithCluster": [Function], - }, "audit": Object { "getLogger": [Function], }, diff --git a/x-pack/plugins/security/server/plugin.ts b/x-pack/plugins/security/server/plugin.ts index bdda0be9b15a7..c8f47aaae7b5d 100644 --- a/x-pack/plugins/security/server/plugin.ts +++ b/x-pack/plugins/security/server/plugin.ts @@ -8,32 +8,35 @@ import { combineLatest } from 'rxjs'; import { first, map } from 'rxjs/operators'; import { TypeOf } from '@kbn/config-schema'; import { + deepFreeze, ICustomClusterClient, CoreSetup, + CoreStart, Logger, PluginInitializerContext, } from '../../../../src/core/server'; -import { deepFreeze } from '../../../../src/core/server'; import { SpacesPluginSetup } from '../../spaces/server'; -import { PluginSetupContract as FeaturesSetupContract } from '../../features/server'; -import { LicensingPluginSetup } from '../../licensing/server'; +import { + PluginSetupContract as FeaturesPluginSetup, + PluginStartContract as FeaturesPluginStart, +} from '../../features/server'; +import { LicensingPluginSetup, LicensingPluginStart } from '../../licensing/server'; import { Authentication, setupAuthentication } from './authentication'; -import { Authorization, setupAuthorization } from './authorization'; +import { AuthorizationService, AuthorizationServiceSetup } from './authorization'; import { ConfigSchema, createConfig } from './config'; import { defineRoutes } from './routes'; import { SecurityLicenseService, SecurityLicense } from '../common/licensing'; import { setupSavedObjects } from './saved_objects'; import { AuditService, SecurityAuditLogger, AuditServiceSetup } from './audit'; import { elasticsearchClientPlugin } from './elasticsearch_client_plugin'; +import { SecurityFeatureUsageService, SecurityFeatureUsageServiceStart } from './feature_usage'; export type SpacesService = Pick< SpacesPluginSetup['spacesService'], 'getSpaceId' | 'namespaceToSpaceId' >; -export type FeaturesService = Pick; - /** * Describes public Security plugin contract returned at the `setup` stage. */ @@ -48,7 +51,7 @@ export interface SecurityPluginSetup { | 'grantAPIKeyAsInternalUser' | 'invalidateAPIKeyAsInternalUser' >; - authz: Pick; + authz: Pick; license: SecurityLicense; audit: Pick; @@ -61,17 +64,18 @@ export interface SecurityPluginSetup { * @param service Spaces service exposed by the Spaces plugin. */ registerSpacesService: (service: SpacesService) => void; - - __legacyCompat: { - registerPrivilegesWithCluster: () => void; - }; } export interface PluginSetupDependencies { - features: FeaturesService; + features: FeaturesPluginSetup; licensing: LicensingPluginSetup; } +export interface PluginStartDependencies { + features: FeaturesPluginStart; + licensing: LicensingPluginStart; +} + /** * Represents Security Plugin instance that will be managed by the Kibana plugin system. */ @@ -80,7 +84,18 @@ export class Plugin { private clusterClient?: ICustomClusterClient; private spacesService?: SpacesService | symbol = Symbol('not accessed'); private securityLicenseService?: SecurityLicenseService; + + private readonly featureUsageService = new SecurityFeatureUsageService(); + private featureUsageServiceStart?: SecurityFeatureUsageServiceStart; + private readonly getFeatureUsageService = () => { + if (!this.featureUsageServiceStart) { + throw new Error(`featureUsageServiceStart is not registered!`); + } + return this.featureUsageServiceStart; + }; + private readonly auditService = new AuditService(this.initializerContext.logger.get('audit')); + private readonly authorizationService = new AuthorizationService(); private readonly getSpacesService = () => { // Changing property value from Symbol to undefined denotes the fact that property was accessed. @@ -95,7 +110,10 @@ export class Plugin { this.logger = this.initializerContext.logger.get(); } - public async setup(core: CoreSetup, { features, licensing }: PluginSetupDependencies) { + public async setup( + core: CoreSetup, + { features, licensing }: PluginSetupDependencies + ) { const [config, legacyConfig] = await combineLatest([ this.initializerContext.config.create>().pipe( map((rawConfig) => @@ -118,11 +136,14 @@ export class Plugin { license$: licensing.license$, }); + this.featureUsageService.setup({ featureUsage: licensing.featureUsage }); + const audit = this.auditService.setup({ license, config: config.audit }); const auditLogger = new SecurityAuditLogger(audit.getLogger()); const authc = await setupAuthentication({ auditLogger, + getFeatureUsageService: this.getFeatureUsageService, http: core.http, clusterClient: this.clusterClient, config, @@ -130,15 +151,17 @@ export class Plugin { loggers: this.initializerContext.logger, }); - const authz = await setupAuthorization({ + const authz = this.authorizationService.setup({ http: core.http, + capabilities: core.capabilities, + status: core.status, clusterClient: this.clusterClient, license, loggers: this.initializerContext.logger, kibanaIndexName: legacyConfig.kibana.index, packageVersion: this.initializerContext.env.packageInfo.version, getSpacesService: this.getSpacesService, - featuresService: features, + features, }); setupSavedObjects({ @@ -148,8 +171,6 @@ export class Plugin { getSpacesService: this.getSpacesService, }); - core.capabilities.registerSwitcher(authz.disableUnauthorizedCapabilities); - defineRoutes({ router: core.http.createRouter(), basePath: core.http.basePath, @@ -160,6 +181,11 @@ export class Plugin { authc, authz, license, + getFeatures: () => + core + .getStartServices() + .then(([, { features: featuresStart }]) => featuresStart.getFeatures()), + getFeatureUsageService: this.getFeatureUsageService, }); return deepFreeze({ @@ -192,15 +218,15 @@ export class Plugin { this.spacesService = service; }, - - __legacyCompat: { - registerPrivilegesWithCluster: async () => await authz.registerPrivilegesWithCluster(), - }, }); } - public start() { + public start(core: CoreStart, { features, licensing }: PluginStartDependencies) { this.logger.debug('Starting plugin'); + this.featureUsageServiceStart = this.featureUsageService.start({ + featureUsage: licensing.featureUsage, + }); + this.authorizationService.start({ features, clusterClient: this.clusterClient! }); } public stop() { @@ -216,7 +242,11 @@ export class Plugin { this.securityLicenseService = undefined; } + if (this.featureUsageServiceStart) { + this.featureUsageServiceStart = undefined; + } this.auditService.stop(); + this.authorizationService.stop(); } private wasSpacesServiceAccessed() { diff --git a/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts b/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts index d7710bf669ce1..bec60fa149bcf 100644 --- a/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts +++ b/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts @@ -15,6 +15,8 @@ import { httpServerMock, } from '../../../../../../../src/core/server/mocks'; import { routeDefinitionParamsMock } from '../../index.mock'; +import { Feature } from '../../../../../features/server'; +import { securityFeatureUsageServiceMock } from '../../../feature_usage/index.mock'; const application = 'kibana-.kibana'; const privilegeMap = { @@ -47,7 +49,12 @@ interface TestOptions { licenseCheckResult?: LicenseCheck; apiResponses?: Array<() => Promise>; payload?: Record; - asserts: { statusCode: number; result?: Record; apiArguments?: unknown[][] }; + asserts: { + statusCode: number; + result?: Record; + apiArguments?: unknown[][]; + recordSubFeaturePrivilegeUsage?: boolean; + }; } const putRoleTest = ( @@ -71,6 +78,47 @@ const putRoleTest = ( mockScopedClusterClient.callAsCurrentUser.mockImplementationOnce(apiResponse); } + mockRouteDefinitionParams.getFeatureUsageService.mockReturnValue( + securityFeatureUsageServiceMock.createStartContract() + ); + + mockRouteDefinitionParams.getFeatures.mockResolvedValue([ + new Feature({ + id: 'feature_1', + name: 'feature 1', + app: [], + privileges: { + all: { + ui: [], + savedObject: { all: [], read: [] }, + }, + read: { + ui: [], + savedObject: { all: [], read: [] }, + }, + }, + subFeatures: [ + { + name: 'sub feature 1', + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + id: 'sub_feature_privilege_1', + name: 'first sub-feature privilege', + includeIn: 'none', + ui: [], + savedObject: { all: [], read: [] }, + }, + ], + }, + ], + }, + ], + }), + ]); + definePutRolesRoutes(mockRouteDefinitionParams); const [[{ validate }, handler]] = mockRouteDefinitionParams.router.put.mock.calls; @@ -99,6 +147,16 @@ const putRoleTest = ( expect(mockScopedClusterClient.callAsCurrentUser).not.toHaveBeenCalled(); } expect(mockContext.licensing.license.check).toHaveBeenCalledWith('security', 'basic'); + + if (asserts.recordSubFeaturePrivilegeUsage) { + expect( + mockRouteDefinitionParams.getFeatureUsageService().recordSubFeaturePrivilegeUsage + ).toHaveBeenCalledTimes(1); + } else { + expect( + mockRouteDefinitionParams.getFeatureUsageService().recordSubFeaturePrivilegeUsage + ).not.toHaveBeenCalled(); + } }); }; @@ -598,5 +656,131 @@ describe('PUT role', () => { result: undefined, }, }); + + putRoleTest(`notifies when sub-feature privileges are included`, { + name: 'foo-role', + payload: { + kibana: [ + { + spaces: ['*'], + feature: { + feature_1: ['sub_feature_privilege_1'], + }, + }, + ], + }, + apiResponses: [async () => ({}), async () => {}], + asserts: { + recordSubFeaturePrivilegeUsage: true, + apiArguments: [ + ['shield.getRole', { name: 'foo-role', ignore: [404] }], + [ + 'shield.putRole', + { + name: 'foo-role', + body: { + cluster: [], + indices: [], + run_as: [], + applications: [ + { + application: 'kibana-.kibana', + privileges: ['feature_feature_1.sub_feature_privilege_1'], + resources: ['*'], + }, + ], + metadata: undefined, + }, + }, + ], + ], + statusCode: 204, + result: undefined, + }, + }); + + putRoleTest(`does not record sub-feature privilege usage for unknown privileges`, { + name: 'foo-role', + payload: { + kibana: [ + { + spaces: ['*'], + feature: { + feature_1: ['unknown_sub_feature_privilege_1'], + }, + }, + ], + }, + apiResponses: [async () => ({}), async () => {}], + asserts: { + recordSubFeaturePrivilegeUsage: false, + apiArguments: [ + ['shield.getRole', { name: 'foo-role', ignore: [404] }], + [ + 'shield.putRole', + { + name: 'foo-role', + body: { + cluster: [], + indices: [], + run_as: [], + applications: [ + { + application: 'kibana-.kibana', + privileges: ['feature_feature_1.unknown_sub_feature_privilege_1'], + resources: ['*'], + }, + ], + metadata: undefined, + }, + }, + ], + ], + statusCode: 204, + result: undefined, + }, + }); + + putRoleTest(`does not record sub-feature privilege usage for unknown features`, { + name: 'foo-role', + payload: { + kibana: [ + { + spaces: ['*'], + feature: { + unknown_feature: ['sub_feature_privilege_1'], + }, + }, + ], + }, + apiResponses: [async () => ({}), async () => {}], + asserts: { + recordSubFeaturePrivilegeUsage: false, + apiArguments: [ + ['shield.getRole', { name: 'foo-role', ignore: [404] }], + [ + 'shield.putRole', + { + name: 'foo-role', + body: { + cluster: [], + indices: [], + run_as: [], + applications: [ + { + application: 'kibana-.kibana', + privileges: ['feature_unknown_feature.sub_feature_privilege_1'], + resources: ['*'], + }, + ], + metadata: undefined, + }, + }, + ], + ], + statusCode: 204, + result: undefined, + }, + }); }); }); diff --git a/x-pack/plugins/security/server/routes/authorization/roles/put.ts b/x-pack/plugins/security/server/routes/authorization/roles/put.ts index 5db83375afa96..d83cf92bcaa0d 100644 --- a/x-pack/plugins/security/server/routes/authorization/roles/put.ts +++ b/x-pack/plugins/security/server/routes/authorization/roles/put.ts @@ -4,7 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { schema } from '@kbn/config-schema'; +import { schema, TypeOf } from '@kbn/config-schema'; +import { Feature } from '../../../../../features/common'; import { RouteDefinitionParams } from '../../index'; import { createLicensedRouteHandler } from '../../licensed_route_handler'; import { wrapIntoCustomErrorResponse } from '../../../errors'; @@ -14,7 +15,37 @@ import { transformPutPayloadToElasticsearchRole, } from './model'; -export function definePutRolesRoutes({ router, authz, clusterClient }: RouteDefinitionParams) { +const roleGrantsSubFeaturePrivileges = ( + features: Feature[], + role: TypeOf> +) => { + if (!role.kibana) { + return false; + } + + const subFeaturePrivileges = new Map( + features.map((feature) => [ + feature.id, + feature.subFeatures.map((sf) => sf.privilegeGroups.map((pg) => pg.privileges)).flat(2), + ]) + ); + + const hasAnySubFeaturePrivileges = role.kibana.some((kibanaPrivilege) => + Object.entries(kibanaPrivilege.feature ?? {}).some(([featureId, privileges]) => { + return !!subFeaturePrivileges.get(featureId)?.some(({ id }) => privileges.includes(id)); + }) + ); + + return hasAnySubFeaturePrivileges; +}; + +export function definePutRolesRoutes({ + router, + authz, + clusterClient, + getFeatures, + getFeatureUsageService, +}: RouteDefinitionParams) { router.put( { path: '/api/security/role/{name}', @@ -46,9 +77,16 @@ export function definePutRolesRoutes({ router, authz, clusterClient }: RouteDefi rawRoles[name] ? rawRoles[name].applications : [] ); - await clusterClient - .asScoped(request) - .callAsCurrentUser('shield.putRole', { name: request.params.name, body }); + const [features] = await Promise.all([ + getFeatures(), + clusterClient + .asScoped(request) + .callAsCurrentUser('shield.putRole', { name: request.params.name, body }), + ]); + + if (roleGrantsSubFeaturePrivileges(features, request.body)) { + getFeatureUsageService().recordSubFeaturePrivilegeUsage(); + } return response.noContent(); } catch (error) { diff --git a/x-pack/plugins/security/server/routes/index.mock.ts b/x-pack/plugins/security/server/routes/index.mock.ts index b0c74b98ee19b..1a93d6701e257 100644 --- a/x-pack/plugins/security/server/routes/index.mock.ts +++ b/x-pack/plugins/security/server/routes/index.mock.ts @@ -29,5 +29,7 @@ export const routeDefinitionParamsMock = { authz: authorizationMock.create(), license: licenseMock.create(), httpResources: httpResourcesMock.createRegistrar(), + getFeatures: jest.fn(), + getFeatureUsageService: jest.fn(), }), }; diff --git a/x-pack/plugins/security/server/routes/index.ts b/x-pack/plugins/security/server/routes/index.ts index e43072b95c906..5721a2699d15c 100644 --- a/x-pack/plugins/security/server/routes/index.ts +++ b/x-pack/plugins/security/server/routes/index.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +import { Feature } from '../../../features/server'; import { CoreSetup, HttpResources, @@ -13,7 +14,7 @@ import { } from '../../../../../src/core/server'; import { SecurityLicense } from '../../common/licensing'; import { Authentication } from '../authentication'; -import { Authorization } from '../authorization'; +import { AuthorizationServiceSetup } from '../authorization'; import { ConfigType } from '../config'; import { defineAuthenticationRoutes } from './authentication'; @@ -23,6 +24,7 @@ import { defineIndicesRoutes } from './indices'; import { defineUsersRoutes } from './users'; import { defineRoleMappingRoutes } from './role_mapping'; import { defineViewRoutes } from './views'; +import { SecurityFeatureUsageServiceStart } from '../feature_usage'; /** * Describes parameters used to define HTTP routes. @@ -35,8 +37,10 @@ export interface RouteDefinitionParams { clusterClient: IClusterClient; config: ConfigType; authc: Authentication; - authz: Authorization; + authz: AuthorizationServiceSetup; license: SecurityLicense; + getFeatures: () => Promise; + getFeatureUsageService: () => SecurityFeatureUsageServiceStart; } export function defineRoutes(params: RouteDefinitionParams) { diff --git a/x-pack/plugins/security/server/saved_objects/index.ts b/x-pack/plugins/security/server/saved_objects/index.ts index 29fbe3af21b95..6acfd06a0309b 100644 --- a/x-pack/plugins/security/server/saved_objects/index.ts +++ b/x-pack/plugins/security/server/saved_objects/index.ts @@ -11,13 +11,16 @@ import { SavedObjectsClient, } from '../../../../../src/core/server'; import { SecureSavedObjectsClientWrapper } from './secure_saved_objects_client_wrapper'; -import { Authorization } from '../authorization'; +import { AuthorizationServiceSetup } from '../authorization'; import { SecurityAuditLogger } from '../audit'; import { SpacesService } from '../plugin'; interface SetupSavedObjectsParams { auditLogger: SecurityAuditLogger; - authz: Pick; + authz: Pick< + AuthorizationServiceSetup, + 'mode' | 'actions' | 'checkSavedObjectsPrivilegesWithRequest' + >; savedObjects: CoreSetup['savedObjects']; getSpacesService(): SpacesService | undefined; } diff --git a/x-pack/plugins/security_solution/.gitattributes b/x-pack/plugins/security_solution/.gitattributes new file mode 100644 index 0000000000000..431f25be5e78e --- /dev/null +++ b/x-pack/plugins/security_solution/.gitattributes @@ -0,0 +1,6 @@ +# Auto-collapse generated files in GitHub +# https://help.github.com/en/articles/customizing-how-changed-files-appear-on-github +x-pack/plugins/security_solution/server/graphql/types.ts linguist-generated=true +x-pack/plugins/security_solution/public/graphql/types.ts linguist-generated=true +x-pack/plugins/security_solution/public/graphql/introspection.json linguist-generated=true + diff --git a/x-pack/plugins/siem/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts similarity index 84% rename from x-pack/plugins/siem/common/constants.ts rename to x-pack/plugins/security_solution/common/constants.ts index a80f7f04fbfa0..d04d1f2c91b97 100644 --- a/x-pack/plugins/siem/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -4,24 +4,25 @@ * you may not use this file except in compliance with the Elastic License. */ -export const APP_ID = 'siem'; -export const APP_NAME = 'SIEM'; +export const APP_ID = 'securitySolution'; +export const APP_NAME = 'Security'; export const APP_ICON = 'securityAnalyticsApp'; -export const APP_PATH = `/app/${APP_ID}`; +export const APP_PATH = `/app/security`; +export const ADD_DATA_PATH = `/app/home#/tutorial_directory/security`; export const DEFAULT_BYTES_FORMAT = 'format:bytes:defaultPattern'; export const DEFAULT_DATE_FORMAT = 'dateFormat'; export const DEFAULT_DATE_FORMAT_TZ = 'dateFormat:tz'; export const DEFAULT_DARK_MODE = 'theme:darkMode'; -export const DEFAULT_INDEX_KEY = 'siem:defaultIndex'; +export const DEFAULT_INDEX_KEY = 'securitySolution:defaultIndex'; export const DEFAULT_NUMBER_FORMAT = 'format:number:defaultPattern'; export const DEFAULT_TIME_RANGE = 'timepicker:timeDefaults'; export const DEFAULT_REFRESH_RATE_INTERVAL = 'timepicker:refreshIntervalDefaults'; -export const DEFAULT_SIEM_TIME_RANGE = 'siem:timeDefaults'; -export const DEFAULT_SIEM_REFRESH_INTERVAL = 'siem:refreshIntervalDefaults'; +export const DEFAULT_APP_TIME_RANGE = 'securitySolution:timeDefaults'; +export const DEFAULT_APP_REFRESH_INTERVAL = 'securitySolution:refreshIntervalDefaults'; export const DEFAULT_SIGNALS_INDEX = '.siem-signals'; export const DEFAULT_MAX_SIGNALS = 100; export const DEFAULT_SEARCH_AFTER_PAGE_SIZE = 100; -export const DEFAULT_ANOMALY_SCORE = 'siem:defaultAnomalyScore'; +export const DEFAULT_ANOMALY_SCORE = 'securitySolution:defaultAnomalyScore'; export const DEFAULT_MAX_TABLE_QUERY_SIZE = 10000; export const DEFAULT_SCALE_DATE_FORMAT = 'dateFormat:scaled'; export const DEFAULT_FROM = 'now-24h'; @@ -30,6 +31,7 @@ export const DEFAULT_INTERVAL_PAUSE = true; export const DEFAULT_INTERVAL_TYPE = 'manual'; export const DEFAULT_INTERVAL_VALUE = 300000; // ms export const DEFAULT_TIMEPICKER_QUICK_RANGES = 'timepicker:quickRanges'; +export const NO_ALERT_INDEX = 'no-alert-index-049FC71A-4C2C-446F-9901-37XMC5024C51'; /** The comma-delimited list of Elasticsearch indices from which the SIEM app collects events */ export const DEFAULT_INDEX_PATTERN = [ @@ -42,16 +44,16 @@ export const DEFAULT_INDEX_PATTERN = [ ]; /** This Kibana Advanced Setting enables the `Security news` feed widget */ -export const ENABLE_NEWS_FEED_SETTING = 'siem:enableNewsFeed'; +export const ENABLE_NEWS_FEED_SETTING = 'securitySolution:enableNewsFeed'; /** This Kibana Advanced Setting specifies the URL of the News feed widget */ -export const NEWS_FEED_URL_SETTING = 'siem:newsFeedUrl'; +export const NEWS_FEED_URL_SETTING = 'securitySolution:newsFeedUrl'; /** The default value for News feed widget */ export const NEWS_FEED_URL_SETTING_DEFAULT = 'https://feeds.elastic.co/security-solution'; /** This Kibana Advanced Setting specifies the URLs of `IP Reputation Links`*/ -export const IP_REPUTATION_LINKS_SETTING = 'siem:ipReputationLinks'; +export const IP_REPUTATION_LINKS_SETTING = 'securitySolution:ipReputationLinks'; /** The default value for `IP Reputation Links` */ export const IP_REPUTATION_LINKS_SETTING_DEFAULT = `[ @@ -62,12 +64,12 @@ export const IP_REPUTATION_LINKS_SETTING_DEFAULT = `[ /** * Id for the signals alerting type */ -export const SIGNALS_ID = `${APP_ID}.signals`; +export const SIGNALS_ID = `siem.signals`; /** * Id for the notifications alerting type */ -export const NOTIFICATIONS_ID = `${APP_ID}.notifications`; +export const NOTIFICATIONS_ID = `siem.notifications`; /** * Special internal structure for tags for signals. This is used diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/common/schemas.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/common/schemas.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/__mocks__/utils.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/__mocks__/utils.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/__mocks__/utils.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/__mocks__/utils.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/error_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/error_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/error_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/error_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/find_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/find_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/find_rules_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/find_rules_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/find_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/find_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/find_rules_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/find_rules_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/import_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/import_rules_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/import_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/import_rules_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/rules_bulk_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/rules_bulk_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/rules_bulk_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/rules_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/rules_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/response/type_timeline_only_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/response/type_timeline_only_schema.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/iso_date_string.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/iso_date_string.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/iso_date_string.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/iso_date_string.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/iso_date_string.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/iso_date_string.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/iso_date_string.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/iso_date_string.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/lists_default_array.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists_default_array.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/lists_default_array.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists_default_array.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/lists_default_array.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists_default_array.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/lists_default_array.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists_default_array.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/positive_integer.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/positive_integer.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/positive_integer.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/positive_integer.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/positive_integer_greater_than_zero.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/positive_integer_greater_than_zero.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/positive_integer_greater_than_zero.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/positive_integer_greater_than_zero.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/positive_integer_greater_than_zero.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/positive_integer_greater_than_zero.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/positive_integer_greater_than_zero.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/positive_integer_greater_than_zero.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/postive_integer.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/postive_integer.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/postive_integer.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/postive_integer.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/references_default_array.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/references_default_array.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/references_default_array.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/references_default_array.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/references_default_array.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/references_default_array.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/references_default_array.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/references_default_array.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/risk_score.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/risk_score.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/risk_score.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/risk_score.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/risk_score.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/risk_score.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/risk_score.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/risk_score.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/uuid.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/uuid.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/uuid.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/uuid.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/schemas/types/uuid.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/uuid.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/schemas/types/uuid.ts rename to x-pack/plugins/security_solution/common/detection_engine/schemas/types/uuid.ts diff --git a/x-pack/plugins/siem/common/detection_engine/transform_actions.test.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/transform_actions.test.ts rename to x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts diff --git a/x-pack/plugins/siem/common/detection_engine/transform_actions.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/transform_actions.ts rename to x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts diff --git a/x-pack/plugins/siem/common/detection_engine/types.ts b/x-pack/plugins/security_solution/common/detection_engine/types.ts similarity index 100% rename from x-pack/plugins/siem/common/detection_engine/types.ts rename to x-pack/plugins/security_solution/common/detection_engine/types.ts diff --git a/x-pack/plugins/siem/common/endpoint/generate_data.test.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts similarity index 89% rename from x-pack/plugins/siem/common/endpoint/generate_data.test.ts rename to x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts index 3fcb00d879583..6c8c5e3f51808 100644 --- a/x-pack/plugins/siem/common/endpoint/generate_data.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts @@ -3,7 +3,14 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { EndpointDocGenerator, Event, Tree, TreeNode } from './generate_data'; +import { + EndpointDocGenerator, + Event, + Tree, + TreeNode, + RelatedEventCategory, + ECSCategory, +} from './generate_data'; interface Node { events: Event[]; @@ -106,7 +113,11 @@ describe('data generator', () => { generations, percentTerminated: 100, percentWithRelated: 100, - relatedEvents: 4, + relatedEvents: [ + { category: RelatedEventCategory.Driver, count: 1 }, + { category: RelatedEventCategory.File, count: 2 }, + { category: RelatedEventCategory.Network, count: 1 }, + ], }); }); @@ -117,6 +128,36 @@ describe('data generator', () => { return (inRelated || inLifecycle) && event.process.entity_id === node.id; }; + it('has the right related events for each node', () => { + const checkRelatedEvents = (node: TreeNode) => { + expect(node.relatedEvents.length).toEqual(4); + + const counts: Record = {}; + for (const event of node.relatedEvents) { + if (Array.isArray(event.event.category)) { + for (const cat of event.event.category) { + counts[cat] = counts[cat] + 1 || 1; + } + } else { + counts[event.event.category] = counts[event.event.category] + 1 || 1; + } + } + expect(counts[ECSCategory.Driver]).toEqual(1); + expect(counts[ECSCategory.File]).toEqual(2); + expect(counts[ECSCategory.Network]).toEqual(1); + }; + + for (const node of tree.ancestry.values()) { + checkRelatedEvents(node); + } + + for (const node of tree.children.values()) { + checkRelatedEvents(node); + } + + checkRelatedEvents(tree.origin); + }); + it('has the right number of ancestors', () => { expect(tree.ancestry.size).toEqual(ancestors); }); diff --git a/x-pack/plugins/siem/common/endpoint/generate_data.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts similarity index 86% rename from x-pack/plugins/siem/common/endpoint/generate_data.ts rename to x-pack/plugins/security_solution/common/endpoint/generate_data.ts index 57d41b6554907..b17a5aa28ac6a 100644 --- a/x-pack/plugins/siem/common/endpoint/generate_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts @@ -24,7 +24,7 @@ interface EventOptions { entityID?: string; parentEntityID?: string; eventType?: string; - eventCategory?: string; + eventCategory?: string | string[]; processName?: string; } @@ -75,21 +75,98 @@ const POLICIES: Array<{ name: string; id: string }> = [ const FILE_OPERATIONS: string[] = ['creation', 'open', 'rename', 'execution', 'deletion']; interface EventInfo { - category: string; + category: string | string[]; /** * This denotes the `event.type` field for when an event is created, this can be `start` or `creation` */ creationType: string; } +/** + * The valid ecs categories. + */ +export enum ECSCategory { + Driver = 'driver', + File = 'file', + Network = 'network', + /** + * Registry has not been added to ecs yet. + */ + Registry = 'registry', + Authentication = 'authentication', + Session = 'session', +} + +/** + * High level categories for related events. These specify the type of related events that should be generated. + */ +export enum RelatedEventCategory { + /** + * The Random category allows the related event categories to be chosen randomly + */ + Random = 'random', + Driver = 'driver', + File = 'file', + Network = 'network', + Registry = 'registry', + /** + * Security isn't an actual category but defines a type of related event to be created. + */ + Security = 'security', +} + +/** + * This map defines the relationship between a higher level event type defined by the RelatedEventCategory enums and + * the ECS categories that is should map to. This should only be used for tests that need to determine the exact + * ecs categories that were created based on the related event information passed to the generator. + */ +export const categoryMapping: Record = { + [RelatedEventCategory.Security]: [ECSCategory.Authentication, ECSCategory.Session], + [RelatedEventCategory.Driver]: ECSCategory.Driver, + [RelatedEventCategory.File]: ECSCategory.File, + [RelatedEventCategory.Network]: ECSCategory.Network, + [RelatedEventCategory.Registry]: ECSCategory.Registry, + /** + * Random is only used by the generator to indicate that it should randomly choose the event information when generating + * related events. It does not map to a specific ecs category. + */ + [RelatedEventCategory.Random]: '', +}; + +/** + * The related event category and number of events that should be generated. + */ +export interface RelatedEventInfo { + category: RelatedEventCategory; + count: number; +} + // These are from the v1 schemas and aren't all valid ECS event categories, still in flux -const OTHER_EVENT_CATEGORIES: EventInfo[] = [ - { category: 'driver', creationType: 'start' }, - { category: 'file', creationType: 'creation' }, - { category: 'library', creationType: 'start' }, - { category: 'network', creationType: 'start' }, - { category: 'registry', creationType: 'creation' }, -]; +const OTHER_EVENT_CATEGORIES: Record< + Exclude, + EventInfo +> = { + [RelatedEventCategory.Security]: { + category: categoryMapping[RelatedEventCategory.Security], + creationType: 'start', + }, + [RelatedEventCategory.Driver]: { + category: categoryMapping[RelatedEventCategory.Driver], + creationType: 'start', + }, + [RelatedEventCategory.File]: { + category: categoryMapping[RelatedEventCategory.File], + creationType: 'creation', + }, + [RelatedEventCategory.Network]: { + category: categoryMapping[RelatedEventCategory.Network], + creationType: 'start', + }, + [RelatedEventCategory.Registry]: { + category: categoryMapping[RelatedEventCategory.Registry], + creationType: 'creation', + }, +}; interface HostInfo { elastic: { @@ -164,7 +241,7 @@ export interface TreeOptions { ancestors?: number; generations?: number; children?: number; - relatedEvents?: number; + relatedEvents?: RelatedEventInfo[]; percentWithRelated?: number; percentTerminated?: number; alwaysGenMaxChildrenPerNode?: boolean; @@ -487,7 +564,8 @@ export class EndpointDocGenerator { * @param alertAncestors - number of ancestor generations to create relative to the alert * @param childGenerations - number of child generations to create relative to the alert * @param maxChildrenPerNode - maximum number of children for any given node in the tree - * @param relatedEventsPerNode - number of related events (file, registry, etc) to create for each process event in the tree + * @param relatedEventsPerNode - can be an array of RelatedEventInfo objects describing the related events that should be generated for each process node + * or a number which defines the number of related events and will default to random categories * @param percentNodesWithRelated - percent of nodes which should have related events * @param percentTerminated - percent of nodes which will have process termination events * @param alwaysGenMaxChildrenPerNode - flag to always return the max children per node instead of it being a random number of children @@ -496,7 +574,7 @@ export class EndpointDocGenerator { alertAncestors?: number, childGenerations?: number, maxChildrenPerNode?: number, - relatedEventsPerNode?: number, + relatedEventsPerNode?: RelatedEventInfo[] | number, percentNodesWithRelated?: number, percentTerminated?: number, alwaysGenMaxChildrenPerNode?: boolean @@ -525,13 +603,14 @@ export class EndpointDocGenerator { /** * Creates an alert event and associated process ancestry. The alert event will always be the last event in the return array. * @param alertAncestors - number of ancestor generations to create - * @param relatedEventsPerNode - number of related events to add to each process node being created + * @param relatedEventsPerNode - can be an array of RelatedEventInfo objects describing the related events that should be generated for each process node + * or a number which defines the number of related events and will default to random categories * @param pctWithRelated - percent of ancestors that will have related events * @param pctWithTerminated - percent of ancestors that will have termination events */ public createAlertEventAncestry( alertAncestors = 3, - relatedEventsPerNode = 5, + relatedEventsPerNode: RelatedEventInfo[] | number = 5, pctWithRelated = 30, pctWithTerminated = 100 ): Event[] { @@ -611,7 +690,8 @@ export class EndpointDocGenerator { * @param root - The process event to use as the root node of the tree * @param generations - number of child generations to create. The root node is not counted as a generation. * @param maxChildrenPerNode - maximum number of children for any given node in the tree - * @param relatedEventsPerNode - number of related events (file, registry, etc) to create for each process event in the tree + * @param relatedEventsPerNode - can be an array of RelatedEventInfo objects describing the related events that should be generated for each process node + * or a number which defines the number of related events and will default to random categories * @param percentNodesWithRelated - percent of nodes which should have related events * @param percentChildrenTerminated - percent of nodes which will have process termination events * @param alwaysGenMaxChildrenPerNode - flag to always return the max children per node instead of it being a random number of children @@ -620,7 +700,7 @@ export class EndpointDocGenerator { root: Event, generations = 2, maxChildrenPerNode = 2, - relatedEventsPerNode = 3, + relatedEventsPerNode: RelatedEventInfo[] | number = 3, percentNodesWithRelated = 100, percentChildrenTerminated = 100, alwaysGenMaxChildrenPerNode = false @@ -686,25 +766,40 @@ export class EndpointDocGenerator { /** * Creates related events for a process event * @param node - process event to relate events to by entityID - * @param numRelatedEvents - number of related events to generate + * @param relatedEvents - can be an array of RelatedEventInfo objects describing the related events that should be generated for each process node + * or a number which defines the number of related events and will default to random categories * @param processDuration - maximum number of seconds after process event that related event timestamp can be */ public *relatedEventsGenerator( node: Event, - numRelatedEvents = 10, + relatedEvents: RelatedEventInfo[] | number = 10, processDuration: number = 6 * 3600 ) { - for (let i = 0; i < numRelatedEvents; i++) { - const eventInfo = this.randomChoice(OTHER_EVENT_CATEGORIES); - - const ts = node['@timestamp'] + this.randomN(processDuration) * 1000; - yield this.generateEvent({ - timestamp: ts, - entityID: node.process.entity_id, - parentEntityID: node.process.parent?.entity_id, - eventCategory: eventInfo.category, - eventType: eventInfo.creationType, - }); + let relatedEventsInfo: RelatedEventInfo[]; + if (typeof relatedEvents === 'number') { + relatedEventsInfo = [{ category: RelatedEventCategory.Random, count: relatedEvents }]; + } else { + relatedEventsInfo = relatedEvents; + } + for (const event of relatedEventsInfo) { + let eventInfo: EventInfo; + + for (let i = 0; i < event.count; i++) { + if (event.category === RelatedEventCategory.Random) { + eventInfo = this.randomChoice(Object.values(OTHER_EVENT_CATEGORIES)); + } else { + eventInfo = OTHER_EVENT_CATEGORIES[event.category]; + } + + const ts = node['@timestamp'] + this.randomN(processDuration) * 1000; + yield this.generateEvent({ + timestamp: ts, + entityID: node.process.entity_id, + parentEntityID: node.process.parent?.entity_id, + eventCategory: eventInfo.category, + eventType: eventInfo.creationType, + }); + } } } @@ -834,7 +929,7 @@ export class EndpointDocGenerator { status: HostPolicyResponseActionStatus.success, }, { - name: 'load_malware_mode', + name: 'load_malware_model', message: 'Error deserializing EXE model; no valid malware model installed', status: HostPolicyResponseActionStatus.success, }, diff --git a/x-pack/plugins/siem/common/endpoint/models/event.ts b/x-pack/plugins/security_solution/common/endpoint/models/event.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint/models/event.ts rename to x-pack/plugins/security_solution/common/endpoint/models/event.ts diff --git a/x-pack/plugins/siem/common/endpoint/models/policy_config.ts b/x-pack/plugins/security_solution/common/endpoint/models/policy_config.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint/models/policy_config.ts rename to x-pack/plugins/security_solution/common/endpoint/models/policy_config.ts diff --git a/x-pack/plugins/siem/common/endpoint/schema/policy.ts b/x-pack/plugins/security_solution/common/endpoint/schema/policy.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint/schema/policy.ts rename to x-pack/plugins/security_solution/common/endpoint/schema/policy.ts diff --git a/x-pack/plugins/siem/common/endpoint/schema/resolver.ts b/x-pack/plugins/security_solution/common/endpoint/schema/resolver.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint/schema/resolver.ts rename to x-pack/plugins/security_solution/common/endpoint/schema/resolver.ts diff --git a/x-pack/plugins/siem/common/endpoint/types.ts b/x-pack/plugins/security_solution/common/endpoint/types.ts similarity index 97% rename from x-pack/plugins/siem/common/endpoint/types.ts rename to x-pack/plugins/security_solution/common/endpoint/types.ts index 45b5cf2526e12..816f9b77115ec 100644 --- a/x-pack/plugins/siem/common/endpoint/types.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types.ts @@ -41,14 +41,30 @@ type ImmutableMap = ReadonlyMap, Immutable>; type ImmutableSet = ReadonlySet>; type ImmutableObject = { readonly [K in keyof T]: Immutable }; +export interface EventStats { + /** + * The total number of related events (all events except process and alerts) that exist for a node. + */ + total: number; + /** + * A mapping of ECS event.category to the number of related events are marked with that category + * For example: + * { + * network: 5, + * file: 2 + * } + */ + byCategory: Record; +} + /** * Statistical information for a node in a resolver tree. */ export interface ResolverNodeStats { /** - * The total number of related events (all events except process and alerts) that exist for a node. + * The stats for related events (excludes alerts and process events) for a particular node in the resolver tree. */ - totalEvents: number; + events: EventStats; /** * The total number of alerts that exist for a node. */ @@ -379,6 +395,7 @@ export interface LegacyEndpointEvent { event?: { action?: string; type?: string; + category?: string | string[]; }; } diff --git a/x-pack/plugins/siem/common/endpoint_alerts/alert_constants.ts b/x-pack/plugins/security_solution/common/endpoint_alerts/alert_constants.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint_alerts/alert_constants.ts rename to x-pack/plugins/security_solution/common/endpoint_alerts/alert_constants.ts diff --git a/x-pack/plugins/siem/common/endpoint_alerts/schema/alert_index.ts b/x-pack/plugins/security_solution/common/endpoint_alerts/schema/alert_index.ts similarity index 84% rename from x-pack/plugins/siem/common/endpoint_alerts/schema/alert_index.ts rename to x-pack/plugins/security_solution/common/endpoint_alerts/schema/alert_index.ts index 6794eea20066b..bf57a366f341d 100644 --- a/x-pack/plugins/siem/common/endpoint_alerts/schema/alert_index.ts +++ b/x-pack/plugins/security_solution/common/endpoint_alerts/schema/alert_index.ts @@ -47,7 +47,7 @@ export const alertingIndexGetQuerySchema = schema.object( try { decode(value); } catch (err) { - return i18n.translate('xpack.siem.endpoint.alerts.errors.bad_rison', { + return i18n.translate('xpack.securitySolution.endpoint.alerts.errors.bad_rison', { defaultMessage: 'must be a valid rison-encoded string', }); } @@ -62,7 +62,7 @@ export const alertingIndexGetQuerySchema = schema.object( try { decode(value); } catch (err) { - return i18n.translate('xpack.siem.endpoint.alerts.errors.bad_rison', { + return i18n.translate('xpack.securitySolution.endpoint.alerts.errors.bad_rison', { defaultMessage: 'must be a valid rison-encoded string', }); } @@ -77,7 +77,7 @@ export const alertingIndexGetQuerySchema = schema.object( try { decode(value); } catch (err) { - return i18n.translate('xpack.siem.endpoint.alerts.errors.bad_rison', { + return i18n.translate('xpack.securitySolution.endpoint.alerts.errors.bad_rison', { defaultMessage: 'must be a valid rison-encoded string', }); } @@ -89,7 +89,7 @@ export const alertingIndexGetQuerySchema = schema.object( validate(value) { if (value.after !== undefined && value.page_index !== undefined) { return i18n.translate( - 'xpack.siem.endpoint.alerts.errors.page_index_cannot_be_used_with_after', + 'xpack.securitySolution.endpoint.alerts.errors.page_index_cannot_be_used_with_after', { defaultMessage: '[page_index] cannot be used with [after]', } @@ -97,7 +97,7 @@ export const alertingIndexGetQuerySchema = schema.object( } if (value.before !== undefined && value.page_index !== undefined) { return i18n.translate( - 'xpack.siem.endpoint.alerts.errors.page_index_cannot_be_used_with_before', + 'xpack.securitySolution.endpoint.alerts.errors.page_index_cannot_be_used_with_before', { defaultMessage: '[page_index] cannot be used with [before]', } @@ -105,7 +105,7 @@ export const alertingIndexGetQuerySchema = schema.object( } if (value.before !== undefined && value.after !== undefined) { return i18n.translate( - 'xpack.siem.endpoint.alerts.errors.before_cannot_be_used_with_after', + 'xpack.securitySolution.endpoint.alerts.errors.before_cannot_be_used_with_after', { defaultMessage: '[before] cannot be used with [after]', } diff --git a/x-pack/plugins/siem/common/endpoint_alerts/schema/index_pattern.ts b/x-pack/plugins/security_solution/common/endpoint_alerts/schema/index_pattern.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint_alerts/schema/index_pattern.ts rename to x-pack/plugins/security_solution/common/endpoint_alerts/schema/index_pattern.ts diff --git a/x-pack/plugins/siem/common/endpoint_alerts/types.ts b/x-pack/plugins/security_solution/common/endpoint_alerts/types.ts similarity index 100% rename from x-pack/plugins/siem/common/endpoint_alerts/types.ts rename to x-pack/plugins/security_solution/common/endpoint_alerts/types.ts diff --git a/x-pack/plugins/siem/common/exact_check.test.ts b/x-pack/plugins/security_solution/common/exact_check.test.ts similarity index 100% rename from x-pack/plugins/siem/common/exact_check.test.ts rename to x-pack/plugins/security_solution/common/exact_check.test.ts diff --git a/x-pack/plugins/siem/common/exact_check.ts b/x-pack/plugins/security_solution/common/exact_check.ts similarity index 100% rename from x-pack/plugins/siem/common/exact_check.ts rename to x-pack/plugins/security_solution/common/exact_check.ts diff --git a/x-pack/plugins/siem/common/format_errors.test.ts b/x-pack/plugins/security_solution/common/format_errors.test.ts similarity index 100% rename from x-pack/plugins/siem/common/format_errors.test.ts rename to x-pack/plugins/security_solution/common/format_errors.test.ts diff --git a/x-pack/plugins/siem/common/format_errors.ts b/x-pack/plugins/security_solution/common/format_errors.ts similarity index 100% rename from x-pack/plugins/siem/common/format_errors.ts rename to x-pack/plugins/security_solution/common/format_errors.ts diff --git a/x-pack/plugins/siem/common/graphql/root/index.ts b/x-pack/plugins/security_solution/common/graphql/root/index.ts similarity index 100% rename from x-pack/plugins/siem/common/graphql/root/index.ts rename to x-pack/plugins/security_solution/common/graphql/root/index.ts diff --git a/x-pack/plugins/siem/common/graphql/root/schema.gql.ts b/x-pack/plugins/security_solution/common/graphql/root/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/common/graphql/root/schema.gql.ts rename to x-pack/plugins/security_solution/common/graphql/root/schema.gql.ts diff --git a/x-pack/plugins/siem/common/graphql/shared/index.ts b/x-pack/plugins/security_solution/common/graphql/shared/index.ts similarity index 100% rename from x-pack/plugins/siem/common/graphql/shared/index.ts rename to x-pack/plugins/security_solution/common/graphql/shared/index.ts diff --git a/x-pack/plugins/siem/common/graphql/shared/schema.gql.ts b/x-pack/plugins/security_solution/common/graphql/shared/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/common/graphql/shared/schema.gql.ts rename to x-pack/plugins/security_solution/common/graphql/shared/schema.gql.ts diff --git a/x-pack/plugins/siem/common/machine_learning/empty_ml_capabilities.ts b/x-pack/plugins/security_solution/common/machine_learning/empty_ml_capabilities.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/empty_ml_capabilities.ts rename to x-pack/plugins/security_solution/common/machine_learning/empty_ml_capabilities.ts diff --git a/x-pack/plugins/siem/common/machine_learning/has_ml_admin_permissions.test.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.test.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/has_ml_admin_permissions.test.ts rename to x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.test.ts diff --git a/x-pack/plugins/siem/common/machine_learning/has_ml_admin_permissions.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/has_ml_admin_permissions.ts rename to x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.ts diff --git a/x-pack/plugins/siem/common/machine_learning/has_ml_user_permissions.test.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.test.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/has_ml_user_permissions.test.ts rename to x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.test.ts diff --git a/x-pack/plugins/siem/common/machine_learning/has_ml_user_permissions.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/has_ml_user_permissions.ts rename to x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.ts diff --git a/x-pack/plugins/siem/common/machine_learning/helpers.test.ts b/x-pack/plugins/security_solution/common/machine_learning/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/helpers.test.ts rename to x-pack/plugins/security_solution/common/machine_learning/helpers.test.ts diff --git a/x-pack/plugins/siem/common/machine_learning/helpers.ts b/x-pack/plugins/security_solution/common/machine_learning/helpers.ts similarity index 100% rename from x-pack/plugins/siem/common/machine_learning/helpers.ts rename to x-pack/plugins/security_solution/common/machine_learning/helpers.ts diff --git a/x-pack/plugins/siem/common/test_utils.ts b/x-pack/plugins/security_solution/common/test_utils.ts similarity index 100% rename from x-pack/plugins/siem/common/test_utils.ts rename to x-pack/plugins/security_solution/common/test_utils.ts diff --git a/x-pack/plugins/siem/common/typed_json.ts b/x-pack/plugins/security_solution/common/typed_json.ts similarity index 100% rename from x-pack/plugins/siem/common/typed_json.ts rename to x-pack/plugins/security_solution/common/typed_json.ts diff --git a/x-pack/plugins/siem/common/types/timeline/index.ts b/x-pack/plugins/security_solution/common/types/timeline/index.ts similarity index 100% rename from x-pack/plugins/siem/common/types/timeline/index.ts rename to x-pack/plugins/security_solution/common/types/timeline/index.ts diff --git a/x-pack/plugins/siem/common/types/timeline/note/index.ts b/x-pack/plugins/security_solution/common/types/timeline/note/index.ts similarity index 100% rename from x-pack/plugins/siem/common/types/timeline/note/index.ts rename to x-pack/plugins/security_solution/common/types/timeline/note/index.ts diff --git a/x-pack/plugins/siem/common/types/timeline/pinned_event/index.ts b/x-pack/plugins/security_solution/common/types/timeline/pinned_event/index.ts similarity index 100% rename from x-pack/plugins/siem/common/types/timeline/pinned_event/index.ts rename to x-pack/plugins/security_solution/common/types/timeline/pinned_event/index.ts diff --git a/x-pack/plugins/siem/common/utility_types.ts b/x-pack/plugins/security_solution/common/utility_types.ts similarity index 100% rename from x-pack/plugins/siem/common/utility_types.ts rename to x-pack/plugins/security_solution/common/utility_types.ts diff --git a/x-pack/plugins/siem/cypress/.eslintrc.json b/x-pack/plugins/security_solution/cypress/.eslintrc.json similarity index 100% rename from x-pack/plugins/siem/cypress/.eslintrc.json rename to x-pack/plugins/security_solution/cypress/.eslintrc.json diff --git a/x-pack/plugins/siem/cypress/.gitignore b/x-pack/plugins/security_solution/cypress/.gitignore similarity index 100% rename from x-pack/plugins/siem/cypress/.gitignore rename to x-pack/plugins/security_solution/cypress/.gitignore diff --git a/x-pack/plugins/siem/cypress/README.md b/x-pack/plugins/security_solution/cypress/README.md similarity index 87% rename from x-pack/plugins/siem/cypress/README.md rename to x-pack/plugins/security_solution/cypress/README.md index b50924532726c..ad3af2aaa4e8a 100644 --- a/x-pack/plugins/siem/cypress/README.md +++ b/x-pack/plugins/security_solution/cypress/README.md @@ -1,6 +1,6 @@ # Cypress Tests -The `siem/cypress` directory contains end to end tests, (plus a few tests +The `security_solution/cypress` directory contains end to end tests, (plus a few tests that rely on mocked API calls), that execute via [Cypress](https://www.cypress.io/). Cypress tests may be run against: @@ -20,7 +20,7 @@ automatically when you submit a PR. ## Smoke Tests -Smoke Tests are located in `siem/cypress/integration/smoke_tests` +Smoke Tests are located in `security_solution/cypress/integration/smoke_tests` ## Structure @@ -53,7 +53,7 @@ it's necessary because a test must assert that a specific value is rendered, and it's not possible to derive that value based on the data in the environment where tests are running. -Mocked responses API from the server are located in `siem/cypress/fixtures`. +Mocked responses API from the server are located in `security_solution/cypress/fixtures`. ## Speeding up test execution time @@ -124,20 +124,20 @@ yarn kbn bootstrap 2. Launch Cypress command line test runner: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution yarn cypress:run-as-ci ``` Note that with this type of execution you don't need to have running a kibana and elasticsearch instance. This is because the command, as it would happen in the CI, will launch the instances. The elasticsearch instance will be fed data - found in: `x-pack/test/siem_cypress/es_archives` + found in: `x-pack/test/security_solution_cypress/es_archives` As in this case we want to mimic a CI execution we want to execute the tests with the same set of data, this is why in this case does not make sense to override Cypress environment variables. ### Test data -As mentioned above, when running the tests as Jenkins the tests are populated with data ("archives") found in: `x-pack/test/siem_cypress/es_archives`. +As mentioned above, when running the tests as Jenkins the tests are populated with data ("archives") found in: `x-pack/test/security_solution_cypress/es_archives`. By default, each test is populated with some base data: an empty kibana index and a set of auditbeat data (the `empty_kibana` and `auditbeat` archives, respectively). This is usually enough to cover most of the scenarios that we are testing. @@ -168,7 +168,7 @@ Note that loading and unloading data take a significant amount of time, so try t ### Current archives -The current archives can be found in `x-pack/test/siem_cypress/es_archives/`. +The current archives can be found in `x-pack/test/security_solution_cypress/es_archives/`. - auditbeat - Auditbeat data generated in Sep, 2019 with the following hosts present: @@ -193,15 +193,15 @@ We are using es_archiver in order to manage the data that our Cypress tests need 1. Setup if possible a clean instance of kibana and elasticsearch (if not, possible please try to clean the data that you are going to generate). 2. With the kibana and elasticsearch instance up and running, create the data that you need for your test. -3. When you are sure that you have all the data you need run the following command from: `x-pack/plugins/siem` +3. When you are sure that you have all the data you need run the following command from: `x-pack/plugins/security_solution` ```sh -node ../../../scripts/es_archiver save --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url http://:@: +node ../../../scripts/es_archiver save --dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url http://:@: ``` Example: ```sh -node ../../../scripts/es_archiver save custom_rules ".kibana",".siem-signal*" --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url http://elastic:changeme@localhost:9220 +node ../../../scripts/es_archiver save custom_rules ".kibana",".siem-signal*" --dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url http://elastic:changeme@localhost:9220 ``` Note that the command is going to create the folder if does not exist in the directory with the imported data. @@ -233,10 +233,10 @@ yarn start --no-base-path 4. Launch the Cypress interactive test runner via one of the following options: - To run tests interactively against the default (local) host specified by -`baseUrl`, as configured in `plugins/siem/cypress.json`: +`baseUrl`, as configured in `plugins/security_solution/cypress.json`: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution yarn cypress:open ``` @@ -245,7 +245,7 @@ yarn cypress:open test runner, as shown in the following example: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution CYPRESS_baseUrl=http://localhost:5601 yarn cypress:open ``` @@ -253,7 +253,7 @@ CYPRESS_baseUrl=http://localhost:5601 yarn cypress:open running tests interactively: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD= yarn cypress:open ``` @@ -282,10 +282,10 @@ yarn start --no-base-path 4. Launch the Cypress command line test runner via one of the following options: - To run tests on the command line against the default (local) host specified by -`baseUrl`, as configured in `plugins/siem/cypress.json`: +`baseUrl`, as configured in `plugins/security_solution/cypress.json`: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution yarn cypress:run ``` @@ -294,7 +294,7 @@ yarn cypress:run the following example: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution CYPRESS_baseUrl=http://localhost:5601 yarn cypress:run ``` @@ -302,7 +302,7 @@ CYPRESS_baseUrl=http://localhost:5601 yarn cypress:run running via the command line: ```sh -cd x-pack/plugins/siem +cd x-pack/plugins/security_solution CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD= yarn cypress:run ``` @@ -317,7 +317,7 @@ of the Kibana, as detailed for each artifact type in the sections below. An HTML report (e.g. for email notifications) is output to: ``` -target/kibana-siem/cypress/results/output.html +target/kibana-security-solution/cypress/results/output.html ``` ### Screenshots @@ -325,14 +325,14 @@ target/kibana-siem/cypress/results/output.html Screenshots of failed tests are output to: ``` -target/kibana-siem/cypress/screenshots +target/kibana-security-solution/cypress/screenshots ``` ### `junit` Reports The Kibana CI process reports `junit` test results from the `target/junit` directory. -Cypress `junit` reports are generated in `target/kibana-siem/cypress/results` +Cypress `junit` reports are generated in `target/kibana-security-solution/cypress/results` and copied to the `target/junit` directory. ### Videos (optional) @@ -347,7 +347,7 @@ CYPRESS_video=true yarn cypress:run Videos are (optionally) output to: ``` -target/kibana-siem/cypress/videos +target/kibana-security-solution/cypress/videos ``` ## Linting diff --git a/x-pack/plugins/security_solution/cypress/cypress.json b/x-pack/plugins/security_solution/cypress/cypress.json new file mode 100644 index 0000000000000..b097b0432e75d --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/cypress.json @@ -0,0 +1,8 @@ +{ + "baseUrl": "http://localhost:5601", + "defaultCommandTimeout": 120000, + "screenshotsFolder": "../../../target/kibana-security-solution/cypress/screenshots", + "trashAssetsBeforeRuns": false, + "video": false, + "videosFolder": "../../../target/kibana-security-solution/cypress/videos" +} diff --git a/x-pack/plugins/siem/cypress/fixtures/overview.json b/x-pack/plugins/security_solution/cypress/fixtures/overview.json similarity index 100% rename from x-pack/plugins/siem/cypress/fixtures/overview.json rename to x-pack/plugins/security_solution/cypress/fixtures/overview.json diff --git a/x-pack/plugins/siem/cypress/integration/cases.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/cases.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/cases.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/cases_connectors.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases_connectors.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/cases_connectors.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/cases_connectors.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/detections.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detections.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/detections.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/detections.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/detections_timeline.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detections_timeline.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/detections_timeline.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/detections_timeline.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/events_viewer.spec.ts b/x-pack/plugins/security_solution/cypress/integration/events_viewer.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/events_viewer.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/events_viewer.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/fields_browser.spec.ts b/x-pack/plugins/security_solution/cypress/integration/fields_browser.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/fields_browser.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/fields_browser.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/inspect.spec.ts b/x-pack/plugins/security_solution/cypress/integration/inspect.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/inspect.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/inspect.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/ml_conditional_links.spec.ts b/x-pack/plugins/security_solution/cypress/integration/ml_conditional_links.spec.ts similarity index 59% rename from x-pack/plugins/siem/cypress/integration/ml_conditional_links.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/ml_conditional_links.spec.ts index 328ff7582efd6..e96c1fe691966 100644 --- a/x-pack/plugins/siem/cypress/integration/ml_conditional_links.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/ml_conditional_links.spec.ts @@ -101,7 +101,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlNetworkSingleIpNullKqlQuery); cy.url().should( 'include', - '/app/siem#/network/ip/127.0.0.1/source?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))' + '/app/security#/network/ip/127.0.0.1/source?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))' ); }); @@ -109,7 +109,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlNetworkSingleIpKqlQuery); cy.url().should( 'include', - "/app/siem#/network/ip/127.0.0.1/source?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))" + "/app/security#/network/ip/127.0.0.1/source?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))" ); }); @@ -117,7 +117,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlNetworkMultipleIpNullKqlQuery); cy.url().should( 'include', - "app/siem#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999))" + "app/security#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999))" ); }); @@ -125,7 +125,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlNetworkMultipleIpKqlQuery); cy.url().should( 'include', - "/app/siem#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))" + "/app/security#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))" ); }); @@ -133,7 +133,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlNetworkNullKqlQuery); cy.url().should( 'include', - '/app/siem#/network/flows?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))' + '/app/security#/network/flows?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))' ); }); @@ -141,7 +141,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlNetworkKqlQuery); cy.url().should( 'include', - "/app/siem#/network/flows?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))" + "/app/security#/network/flows?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))" ); }); @@ -149,7 +149,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostSingleHostNullKqlQuery); cy.url().should( 'include', - '/app/siem#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))' + '/app/security#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))' ); }); @@ -157,7 +157,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostSingleHostKqlQueryVariable); cy.url().should( 'include', - '/app/siem#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))' + '/app/security#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))' ); }); @@ -165,7 +165,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostSingleHostKqlQuery); cy.url().should( 'include', - "/app/siem#/hosts/siem-windows/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" + "/app/security#/hosts/siem-windows/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" ); }); @@ -173,7 +173,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostMultiHostNullKqlQuery); cy.url().should( 'include', - "/app/siem#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" + "/app/security#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" ); }); @@ -181,7 +181,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostMultiHostKqlQuery); cy.url().should( 'include', - "/app/siem#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" + "/app/security#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" ); }); @@ -189,7 +189,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostVariableHostNullKqlQuery); cy.url().should( 'include', - '/app/siem#/hosts/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))' + '/app/security#/hosts/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))' ); }); @@ -197,7 +197,7 @@ describe('ml conditional links', () => { loginAndWaitForPageWithoutDateRange(mlHostVariableHostKqlQuery); cy.url().should( 'include', - "/app/siem#/hosts/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" + "/app/security#/hosts/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))" ); }); }); diff --git a/x-pack/plugins/siem/cypress/integration/navigation.spec.ts b/x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts similarity index 79% rename from x-pack/plugins/siem/cypress/integration/navigation.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts index bebd5f7d679cf..a9e5a848d54a8 100644 --- a/x-pack/plugins/siem/cypress/integration/navigation.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts @@ -16,26 +16,26 @@ describe('top-level navigation common to all pages in the SIEM app', () => { }); it('navigates to the Overview page', () => { navigateFromHeaderTo(OVERVIEW); - cy.url().should('include', '/siem#/overview'); + cy.url().should('include', '/security#/overview'); }); it('navigates to the Hosts page', () => { navigateFromHeaderTo(HOSTS); - cy.url().should('include', '/siem#/hosts'); + cy.url().should('include', '/security#/hosts'); }); it('navigates to the Network page', () => { navigateFromHeaderTo(NETWORK); - cy.url().should('include', '/siem#/network'); + cy.url().should('include', '/security#/network'); }); it('navigates to the Detections page', () => { navigateFromHeaderTo(DETECTIONS); - cy.url().should('include', '/siem#/detections'); + cy.url().should('include', '/security#/detections'); }); it('navigates to the Timelines page', () => { navigateFromHeaderTo(TIMELINES); - cy.url().should('include', '/siem#/timelines'); + cy.url().should('include', '/security#/timelines'); }); }); diff --git a/x-pack/plugins/siem/cypress/integration/overview.spec.ts b/x-pack/plugins/security_solution/cypress/integration/overview.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/overview.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/overview.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/pagination.spec.ts b/x-pack/plugins/security_solution/cypress/integration/pagination.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/pagination.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/pagination.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/signal_detection_rules.spec.ts b/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/signal_detection_rules.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/signal_detection_rules.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts b/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_custom.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_custom.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/signal_detection_rules_export.spec.ts b/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_export.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/signal_detection_rules_export.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_export.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts b/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_ml.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_ml.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts b/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_prebuilt.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_prebuilt.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/timeline_data_providers.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timeline_data_providers.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/timeline_data_providers.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/timeline_data_providers.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timeline_flyout_button.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/timeline_flyout_button.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timeline_search_or_filter.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/timeline_search_or_filter.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timeline_toggle_column.spec.ts similarity index 100% rename from x-pack/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/timeline_toggle_column.spec.ts diff --git a/x-pack/plugins/siem/cypress/integration/url_state.spec.ts b/x-pack/plugins/security_solution/cypress/integration/url_state.spec.ts similarity index 98% rename from x-pack/plugins/siem/cypress/integration/url_state.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/url_state.spec.ts index 5625e1812f696..cf69a83dbf951 100644 --- a/x-pack/plugins/siem/cypress/integration/url_state.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/url_state.spec.ts @@ -255,8 +255,8 @@ describe('url state', () => { expect(matched).to.have.lengthOf(1); closeTimeline(); cy.visit('/app/kibana'); - cy.visit(`/app/siem#/overview?timeline\=(id:'${newTimelineId}',isOpen:!t)`); - cy.contains('a', 'SIEM'); + cy.visit(`/app/security#/overview?timeline\=(id:'${newTimelineId}',isOpen:!t)`); + cy.contains('a', 'Security'); cy.get(DATE_PICKER_APPLY_BUTTON_TIMELINE).invoke('text').should('not.equal', 'Updating'); cy.get(TIMELINE_TITLE).should('have.attr', 'value', timelineName); }); diff --git a/x-pack/plugins/siem/cypress/objects/case.ts b/x-pack/plugins/security_solution/cypress/objects/case.ts similarity index 100% rename from x-pack/plugins/siem/cypress/objects/case.ts rename to x-pack/plugins/security_solution/cypress/objects/case.ts diff --git a/x-pack/plugins/siem/cypress/objects/rule.ts b/x-pack/plugins/security_solution/cypress/objects/rule.ts similarity index 100% rename from x-pack/plugins/siem/cypress/objects/rule.ts rename to x-pack/plugins/security_solution/cypress/objects/rule.ts diff --git a/x-pack/plugins/siem/cypress/objects/timeline.ts b/x-pack/plugins/security_solution/cypress/objects/timeline.ts similarity index 100% rename from x-pack/plugins/siem/cypress/objects/timeline.ts rename to x-pack/plugins/security_solution/cypress/objects/timeline.ts diff --git a/x-pack/plugins/siem/cypress/plugins/index.js b/x-pack/plugins/security_solution/cypress/plugins/index.js similarity index 100% rename from x-pack/plugins/siem/cypress/plugins/index.js rename to x-pack/plugins/security_solution/cypress/plugins/index.js diff --git a/x-pack/plugins/security_solution/cypress/reporter_config.json b/x-pack/plugins/security_solution/cypress/reporter_config.json new file mode 100644 index 0000000000000..b72a5cf077c6a --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/reporter_config.json @@ -0,0 +1,10 @@ +{ + "reporterEnabled": "mochawesome, mocha-junit-reporter", + "reporterOptions": { + "html": false, + "json": true, + "mochaFile": "../../../target/kibana-security-solution/cypress/results/TEST-security-solution-cypress-[hash].xml", + "overwrite": false, + "reportDir": "../../../target/kibana-security-solution/cypress/results" + } +} diff --git a/x-pack/plugins/siem/cypress/screens/alert_detection_rules.ts b/x-pack/plugins/security_solution/cypress/screens/alert_detection_rules.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/alert_detection_rules.ts rename to x-pack/plugins/security_solution/cypress/screens/alert_detection_rules.ts diff --git a/x-pack/plugins/siem/cypress/screens/all_cases.ts b/x-pack/plugins/security_solution/cypress/screens/all_cases.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/all_cases.ts rename to x-pack/plugins/security_solution/cypress/screens/all_cases.ts diff --git a/x-pack/plugins/siem/cypress/screens/case_details.ts b/x-pack/plugins/security_solution/cypress/screens/case_details.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/case_details.ts rename to x-pack/plugins/security_solution/cypress/screens/case_details.ts diff --git a/x-pack/plugins/siem/cypress/screens/configure_cases.ts b/x-pack/plugins/security_solution/cypress/screens/configure_cases.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/configure_cases.ts rename to x-pack/plugins/security_solution/cypress/screens/configure_cases.ts diff --git a/x-pack/plugins/siem/cypress/screens/create_new_case.ts b/x-pack/plugins/security_solution/cypress/screens/create_new_case.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/create_new_case.ts rename to x-pack/plugins/security_solution/cypress/screens/create_new_case.ts diff --git a/x-pack/plugins/siem/cypress/screens/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/create_new_rule.ts rename to x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts diff --git a/x-pack/plugins/siem/cypress/screens/date_picker.ts b/x-pack/plugins/security_solution/cypress/screens/date_picker.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/date_picker.ts rename to x-pack/plugins/security_solution/cypress/screens/date_picker.ts diff --git a/x-pack/plugins/siem/cypress/screens/detections.ts b/x-pack/plugins/security_solution/cypress/screens/detections.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/detections.ts rename to x-pack/plugins/security_solution/cypress/screens/detections.ts diff --git a/x-pack/plugins/siem/cypress/screens/fields_browser.ts b/x-pack/plugins/security_solution/cypress/screens/fields_browser.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/fields_browser.ts rename to x-pack/plugins/security_solution/cypress/screens/fields_browser.ts diff --git a/x-pack/plugins/siem/cypress/screens/hosts/all_hosts.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/all_hosts.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/hosts/all_hosts.ts rename to x-pack/plugins/security_solution/cypress/screens/hosts/all_hosts.ts diff --git a/x-pack/plugins/siem/cypress/screens/hosts/authentications.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/authentications.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/hosts/authentications.ts rename to x-pack/plugins/security_solution/cypress/screens/hosts/authentications.ts diff --git a/x-pack/plugins/siem/cypress/screens/hosts/events.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/events.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/hosts/events.ts rename to x-pack/plugins/security_solution/cypress/screens/hosts/events.ts diff --git a/x-pack/plugins/siem/cypress/screens/hosts/main.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/main.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/hosts/main.ts rename to x-pack/plugins/security_solution/cypress/screens/hosts/main.ts diff --git a/x-pack/plugins/siem/cypress/screens/hosts/uncommon_processes.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/uncommon_processes.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/hosts/uncommon_processes.ts rename to x-pack/plugins/security_solution/cypress/screens/hosts/uncommon_processes.ts diff --git a/x-pack/plugins/siem/cypress/screens/inspect.ts b/x-pack/plugins/security_solution/cypress/screens/inspect.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/inspect.ts rename to x-pack/plugins/security_solution/cypress/screens/inspect.ts diff --git a/x-pack/plugins/siem/cypress/screens/network/flows.ts b/x-pack/plugins/security_solution/cypress/screens/network/flows.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/network/flows.ts rename to x-pack/plugins/security_solution/cypress/screens/network/flows.ts diff --git a/x-pack/plugins/siem/cypress/screens/overview.ts b/x-pack/plugins/security_solution/cypress/screens/overview.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/overview.ts rename to x-pack/plugins/security_solution/cypress/screens/overview.ts diff --git a/x-pack/plugins/siem/cypress/screens/pagination.ts b/x-pack/plugins/security_solution/cypress/screens/pagination.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/pagination.ts rename to x-pack/plugins/security_solution/cypress/screens/pagination.ts diff --git a/x-pack/plugins/siem/cypress/screens/rule_details.ts b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/rule_details.ts rename to x-pack/plugins/security_solution/cypress/screens/rule_details.ts diff --git a/x-pack/plugins/siem/cypress/screens/siem_header.ts b/x-pack/plugins/security_solution/cypress/screens/siem_header.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/siem_header.ts rename to x-pack/plugins/security_solution/cypress/screens/siem_header.ts diff --git a/x-pack/plugins/siem/cypress/screens/siem_main.ts b/x-pack/plugins/security_solution/cypress/screens/siem_main.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/siem_main.ts rename to x-pack/plugins/security_solution/cypress/screens/siem_main.ts diff --git a/x-pack/plugins/siem/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts similarity index 100% rename from x-pack/plugins/siem/cypress/screens/timeline.ts rename to x-pack/plugins/security_solution/cypress/screens/timeline.ts diff --git a/x-pack/plugins/siem/cypress/support/commands.js b/x-pack/plugins/security_solution/cypress/support/commands.js similarity index 94% rename from x-pack/plugins/siem/cypress/support/commands.js rename to x-pack/plugins/security_solution/cypress/support/commands.js index 4bc62da22aca7..d086981cb98f7 100644 --- a/x-pack/plugins/siem/cypress/support/commands.js +++ b/x-pack/plugins/security_solution/cypress/support/commands.js @@ -37,5 +37,5 @@ Cypress.Commands.add('stubSIEMapi', function (dataFileName) { }); cy.server(); cy.fixture(dataFileName).as(`${dataFileName}JSON`); - cy.route('POST', 'api/siem/graphql', `@${dataFileName}JSON`); + cy.route('POST', 'api/solutions/security/graphql', `@${dataFileName}JSON`); }); diff --git a/x-pack/plugins/siem/cypress/support/index.d.ts b/x-pack/plugins/security_solution/cypress/support/index.d.ts similarity index 100% rename from x-pack/plugins/siem/cypress/support/index.d.ts rename to x-pack/plugins/security_solution/cypress/support/index.d.ts diff --git a/x-pack/plugins/siem/cypress/support/index.js b/x-pack/plugins/security_solution/cypress/support/index.js similarity index 100% rename from x-pack/plugins/siem/cypress/support/index.js rename to x-pack/plugins/security_solution/cypress/support/index.js diff --git a/x-pack/plugins/siem/cypress/tasks/alert_detection_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/alert_detection_rules.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/alert_detection_rules.ts rename to x-pack/plugins/security_solution/cypress/tasks/alert_detection_rules.ts diff --git a/x-pack/plugins/siem/cypress/tasks/all_cases.ts b/x-pack/plugins/security_solution/cypress/tasks/all_cases.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/all_cases.ts rename to x-pack/plugins/security_solution/cypress/tasks/all_cases.ts diff --git a/x-pack/plugins/siem/cypress/tasks/case_details.ts b/x-pack/plugins/security_solution/cypress/tasks/case_details.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/case_details.ts rename to x-pack/plugins/security_solution/cypress/tasks/case_details.ts diff --git a/x-pack/plugins/siem/cypress/tasks/common.ts b/x-pack/plugins/security_solution/cypress/tasks/common.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/common.ts rename to x-pack/plugins/security_solution/cypress/tasks/common.ts diff --git a/x-pack/plugins/siem/cypress/tasks/configure_cases.ts b/x-pack/plugins/security_solution/cypress/tasks/configure_cases.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/configure_cases.ts rename to x-pack/plugins/security_solution/cypress/tasks/configure_cases.ts diff --git a/x-pack/plugins/siem/cypress/tasks/create_new_case.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_case.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/create_new_case.ts rename to x-pack/plugins/security_solution/cypress/tasks/create_new_case.ts diff --git a/x-pack/plugins/siem/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/create_new_rule.ts rename to x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts diff --git a/x-pack/plugins/siem/cypress/tasks/date_picker.ts b/x-pack/plugins/security_solution/cypress/tasks/date_picker.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/date_picker.ts rename to x-pack/plugins/security_solution/cypress/tasks/date_picker.ts diff --git a/x-pack/plugins/siem/cypress/tasks/detections.ts b/x-pack/plugins/security_solution/cypress/tasks/detections.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/detections.ts rename to x-pack/plugins/security_solution/cypress/tasks/detections.ts diff --git a/x-pack/plugins/siem/cypress/tasks/es_archiver.ts b/x-pack/plugins/security_solution/cypress/tasks/es_archiver.ts similarity index 74% rename from x-pack/plugins/siem/cypress/tasks/es_archiver.ts rename to x-pack/plugins/security_solution/cypress/tasks/es_archiver.ts index 8a4ab8c819457..5a09a2f753dc4 100644 --- a/x-pack/plugins/siem/cypress/tasks/es_archiver.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/es_archiver.ts @@ -6,7 +6,7 @@ export const esArchiverLoadEmptyKibana = () => { cy.exec( - `node ../../../scripts/es_archiver empty_kibana load empty--dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver empty_kibana load empty--dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -14,7 +14,7 @@ export const esArchiverLoadEmptyKibana = () => { export const esArchiverLoad = (folder: string) => { cy.exec( - `node ../../../scripts/es_archiver load ${folder} --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver load ${folder} --dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -22,7 +22,7 @@ export const esArchiverLoad = (folder: string) => { export const esArchiverUnload = (folder: string) => { cy.exec( - `node ../../../scripts/es_archiver unload ${folder} --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver unload ${folder} --dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -30,7 +30,7 @@ export const esArchiverUnload = (folder: string) => { export const esArchiverUnloadEmptyKibana = () => { cy.exec( - `node ../../../scripts/es_archiver unload empty_kibana empty--dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver unload empty_kibana empty--dir ../../test/security_solution_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); diff --git a/x-pack/plugins/siem/cypress/tasks/fields_browser.ts b/x-pack/plugins/security_solution/cypress/tasks/fields_browser.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/fields_browser.ts rename to x-pack/plugins/security_solution/cypress/tasks/fields_browser.ts diff --git a/x-pack/plugins/siem/cypress/tasks/hosts/all_hosts.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/hosts/all_hosts.ts rename to x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts diff --git a/x-pack/plugins/siem/cypress/tasks/hosts/authentications.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/authentications.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/hosts/authentications.ts rename to x-pack/plugins/security_solution/cypress/tasks/hosts/authentications.ts diff --git a/x-pack/plugins/siem/cypress/tasks/hosts/events.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/events.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/hosts/events.ts rename to x-pack/plugins/security_solution/cypress/tasks/hosts/events.ts diff --git a/x-pack/plugins/siem/cypress/tasks/hosts/main.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/main.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/hosts/main.ts rename to x-pack/plugins/security_solution/cypress/tasks/hosts/main.ts diff --git a/x-pack/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/uncommon_processes.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts rename to x-pack/plugins/security_solution/cypress/tasks/hosts/uncommon_processes.ts diff --git a/x-pack/plugins/siem/cypress/tasks/inspect.ts b/x-pack/plugins/security_solution/cypress/tasks/inspect.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/inspect.ts rename to x-pack/plugins/security_solution/cypress/tasks/inspect.ts diff --git a/x-pack/plugins/siem/cypress/tasks/login.ts b/x-pack/plugins/security_solution/cypress/tasks/login.ts similarity index 98% rename from x-pack/plugins/siem/cypress/tasks/login.ts rename to x-pack/plugins/security_solution/cypress/tasks/login.ts index 13580037b3d7c..4479c8d9d1fbe 100644 --- a/x-pack/plugins/siem/cypress/tasks/login.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/login.ts @@ -124,12 +124,12 @@ export const loginAndWaitForPage = (url: string) => { cy.visit( `${url}?timerange=(global:(linkTo:!(timeline),timerange:(from:1547914976217,fromStr:'2019-01-19T16:22:56.217Z',kind:relative,to:1579537385745,toStr:now)),timeline:(linkTo:!(global),timerange:(from:1547914976217,fromStr:'2019-01-19T16:22:56.217Z',kind:relative,to:1579537385745,toStr:now)))` ); - cy.contains('a', 'SIEM'); + cy.contains('a', 'Security'); }; export const loginAndWaitForPageWithoutDateRange = (url: string) => { login(); cy.viewport('macbook-15'); cy.visit(url); - cy.contains('a', 'SIEM', { timeout: 120000 }); + cy.contains('a', 'Security', { timeout: 120000 }); }; diff --git a/x-pack/plugins/siem/cypress/tasks/network/flows.ts b/x-pack/plugins/security_solution/cypress/tasks/network/flows.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/network/flows.ts rename to x-pack/plugins/security_solution/cypress/tasks/network/flows.ts diff --git a/x-pack/plugins/siem/cypress/tasks/overview.ts b/x-pack/plugins/security_solution/cypress/tasks/overview.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/overview.ts rename to x-pack/plugins/security_solution/cypress/tasks/overview.ts diff --git a/x-pack/plugins/siem/cypress/tasks/pagination.ts b/x-pack/plugins/security_solution/cypress/tasks/pagination.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/pagination.ts rename to x-pack/plugins/security_solution/cypress/tasks/pagination.ts diff --git a/x-pack/plugins/siem/cypress/tasks/siem_header.ts b/x-pack/plugins/security_solution/cypress/tasks/siem_header.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/siem_header.ts rename to x-pack/plugins/security_solution/cypress/tasks/siem_header.ts diff --git a/x-pack/plugins/siem/cypress/tasks/siem_main.ts b/x-pack/plugins/security_solution/cypress/tasks/siem_main.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/siem_main.ts rename to x-pack/plugins/security_solution/cypress/tasks/siem_main.ts diff --git a/x-pack/plugins/siem/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts similarity index 100% rename from x-pack/plugins/siem/cypress/tasks/timeline.ts rename to x-pack/plugins/security_solution/cypress/tasks/timeline.ts diff --git a/x-pack/plugins/siem/cypress/test_files/expected_rules_export.ndjson b/x-pack/plugins/security_solution/cypress/test_files/expected_rules_export.ndjson similarity index 100% rename from x-pack/plugins/siem/cypress/test_files/expected_rules_export.ndjson rename to x-pack/plugins/security_solution/cypress/test_files/expected_rules_export.ndjson diff --git a/x-pack/plugins/siem/cypress/tsconfig.json b/x-pack/plugins/security_solution/cypress/tsconfig.json similarity index 100% rename from x-pack/plugins/siem/cypress/tsconfig.json rename to x-pack/plugins/security_solution/cypress/tsconfig.json diff --git a/x-pack/plugins/security_solution/cypress/urls/ml_conditional_links.ts b/x-pack/plugins/security_solution/cypress/urls/ml_conditional_links.ts new file mode 100644 index 0000000000000..cfa18099e5888 --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/urls/ml_conditional_links.ts @@ -0,0 +1,76 @@ +/* + * 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. + */ + +/* + * These links are for different test scenarios that try and capture different drill downs into + * ml-network and ml-hosts and are of the flavor of testing: + * A filter being null: (query:!n) + * A filter being set with single values: query=(query:%27process.name%20:%20%22conhost.exe%22%27,language:kuery) + * A filter being set with multiple values: query=(query:%27process.name%20:%20%22conhost.exe,sc.exe%22%27,language:kuery) + * A filter containing variables not replaced: query=(query:%27process.name%20:%20%$process.name$%22%27,language:kuery) + * + * In different combination with: + * network not being set: $ip$ + * host not being set: $host.name$ + * ...or... + * network being set normally: 127.0.0.1 + * host being set normally: suricata-iowa + * ...or... + * network having multiple values: 127.0.0.1,127.0.0.2 + * host having multiple values: suricata-iowa,siem-windows + */ + +// Single IP with a null for the Query: +export const mlNetworkSingleIpNullKqlQuery = + "/app/security#/ml-network/ip/127.0.0.1?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; + +// Single IP with a value for the Query: +export const mlNetworkSingleIpKqlQuery = + "/app/security#/ml-network/ip/127.0.0.1?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; + +// Multiple IPs with a null for the Query: +export const mlNetworkMultipleIpNullKqlQuery = + "/app/security#/ml-network/ip/127.0.0.1,127.0.0.2?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; + +// Multiple IPs with a value for the Query: +export const mlNetworkMultipleIpKqlQuery = + "/app/security#/ml-network/ip/127.0.0.1,127.0.0.2?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; + +// $ip$ with a null Query: +export const mlNetworkNullKqlQuery = + "/app/security#/ml-network/ip/$ip$?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; + +// $ip$ with a value for the Query: +export const mlNetworkKqlQuery = + "/app/security#/ml-network/ip/$ip$?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; + +// Single host name with a null for the Query: +export const mlHostSingleHostNullKqlQuery = + "/app/security#/ml-hosts/siem-windows?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; + +// Single host name with a variable in the Query: +export const mlHostSingleHostKqlQueryVariable = + "/app/security#/ml-hosts/siem-windows?query=(language:kuery,query:'process.name%20:%20%22$process.name$%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; + +// Single host name with a value for Query: +export const mlHostSingleHostKqlQuery = + "/app/security#/ml-hosts/siem-windows?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; + +// Multiple host names with null for Query: +export const mlHostMultiHostNullKqlQuery = + "/app/security#/ml-hosts/siem-windows,siem-suricata?query=!n&&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; + +// Multiple host names with a value for Query: +export const mlHostMultiHostKqlQuery = + "/app/security#/ml-hosts/siem-windows,siem-suricata?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; + +// Undefined/null host name with a null for the KQL: +export const mlHostVariableHostNullKqlQuery = + "/app/security#/ml-hosts/$host.name$?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; + +// Undefined/null host name but with a value for Query: +export const mlHostVariableHostKqlQuery = + "/app/security#/ml-hosts/$host.name$?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; diff --git a/x-pack/plugins/security_solution/cypress/urls/navigation.ts b/x-pack/plugins/security_solution/cypress/urls/navigation.ts new file mode 100644 index 0000000000000..9bfe2e9e5102e --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/urls/navigation.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +export const CASES = '/app/security#/case'; +export const DETECTIONS = 'app/security#/detections'; +export const HOSTS_PAGE = '/app/security#/hosts/allHosts'; +export const HOSTS_PAGE_TAB_URLS = { + allHosts: '/app/security#/hosts/allHosts', + anomalies: '/app/security#/hosts/anomalies', + authentications: '/app/security#/hosts/authentications', + events: '/app/security#/hosts/events', + uncommonProcesses: '/app/security#/hosts/uncommonProcesses', +}; +export const NETWORK_PAGE = '/app/security#/network'; +export const OVERVIEW_PAGE = '/app/security#/overview'; +export const TIMELINES_PAGE = '/app/security#/timelines'; diff --git a/x-pack/plugins/security_solution/cypress/urls/state.ts b/x-pack/plugins/security_solution/cypress/urls/state.ts new file mode 100644 index 0000000000000..6de30fdafdaf8 --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/urls/state.ts @@ -0,0 +1,21 @@ +/* + * 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. + */ + +export const ABSOLUTE_DATE_RANGE = { + url: + '/app/security#/network/?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))', + + urlUnlinked: + '/app/security#/network/?timerange=(global:(linkTo:!(),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(),timerange:(from:1564776209186,kind:absolute,to:1564779809186)))', + urlKqlNetworkNetwork: `/app/security#/network/?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, + urlKqlNetworkHosts: `/app/security#/network/?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, + urlKqlHostsNetwork: `/app/security#/hosts/allHosts?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, + urlKqlHostsHosts: `/app/security#/hosts/allHosts?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, + urlHost: + '/app/security#/hosts/authentications?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))', + urlHostNew: + '/app/security#/hosts/authentications?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1577914409186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1577914409186)))', +}; diff --git a/x-pack/plugins/siem/kibana.json b/x-pack/plugins/security_solution/kibana.json similarity index 86% rename from x-pack/plugins/siem/kibana.json rename to x-pack/plugins/security_solution/kibana.json index df40ad4650f45..8ce8820a8e57d 100644 --- a/x-pack/plugins/siem/kibana.json +++ b/x-pack/plugins/security_solution/kibana.json @@ -1,8 +1,8 @@ { - "id": "siem", + "id": "securitySolution", "version": "8.0.0", "kibanaVersion": "kibana", - "configPath": ["xpack", "siem"], + "configPath": ["xpack", "securitySolution"], "requiredPlugins": [ "actions", "alerts", diff --git a/x-pack/plugins/siem/package.json b/x-pack/plugins/security_solution/package.json similarity index 68% rename from x-pack/plugins/siem/package.json rename to x-pack/plugins/security_solution/package.json index f61ab8e946b15..73347e00e6b34 100644 --- a/x-pack/plugins/siem/package.json +++ b/x-pack/plugins/security_solution/package.json @@ -1,6 +1,6 @@ { "author": "Elastic", - "name": "siem", + "name": "security_solution", "version": "8.0.0", "private": true, "license": "Elastic-License", @@ -8,8 +8,8 @@ "extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js && node ../../../scripts/eslint ./public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix", "build-graphql-types": "node scripts/generate_types_from_graphql.js", "cypress:open": "cypress open --config-file ./cypress/cypress.json", - "cypress:run": "cypress run --browser chrome --headless --spec ./cypress/integration/**/*.spec.ts --config-file ./cypress/cypress.json --reporter ../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; ../../node_modules/.bin/mochawesome-merge --reportDir ../../../target/kibana-siem/cypress/results > ../../../target/kibana-siem/cypress/results/output.json; ../../../node_modules/.bin/marge ../../../target/kibana-siem/cypress/results/output.json --reportDir ../../../target/kibana-siem/cypress/results; mkdir -p ../../../target/junit && cp ../../../target/kibana-siem/cypress/results/*.xml ../../../target/junit/ && exit $status;", - "cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/siem_cypress/config.ts", + "cypress:run": "cypress run --browser chrome --headless --spec ./cypress/integration/**/*.spec.ts --config-file ./cypress/cypress.json --reporter ../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; ../../node_modules/.bin/mochawesome-merge --reportDir ../../../target/kibana-security-solution/cypress/results > ../../../target/kibana-security-solution/cypress/results/output.json; ../../../node_modules/.bin/marge ../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../target/kibana-security-solution/cypress/results; mkdir -p ../../../target/junit && cp ../../../target/kibana-security-solution/cypress/results/*.xml ../../../target/junit/ && exit $status;", + "cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/security_solution_cypress/config.ts", "test:generate": "ts-node --project scripts/endpoint/cli_tsconfig.json scripts/endpoint/resolver_generator.ts" }, "devDependencies": { diff --git a/x-pack/plugins/siem/public/alerts/components/activity_monitor/columns.tsx b/x-pack/plugins/security_solution/public/alerts/components/activity_monitor/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/activity_monitor/columns.tsx rename to x-pack/plugins/security_solution/public/alerts/components/activity_monitor/columns.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/activity_monitor/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/activity_monitor/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/activity_monitor/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/activity_monitor/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/activity_monitor/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/activity_monitor/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/activity_monitor/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/activity_monitor/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/activity_monitor/types.ts b/x-pack/plugins/security_solution/public/alerts/components/activity_monitor/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/activity_monitor/types.ts rename to x-pack/plugins/security_solution/public/alerts/components/activity_monitor/types.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/alerts_histogram.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/alerts_histogram.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/alerts_histogram.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/alerts_histogram.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/alerts_histogram.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/alerts_histogram.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/alerts_histogram.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/alerts_histogram.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/config.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/config.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/config.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/config.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/helpers.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/helpers.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/helpers.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/helpers.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/helpers.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/translations.ts similarity index 58% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/translations.ts index 91345e3d989f1..6eaa0ba3fc4ec 100644 --- a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/translations.ts @@ -7,104 +7,104 @@ import { i18n } from '@kbn/i18n'; export const STACK_BY_LABEL = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.stackByLabel', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.stackByLabel', { defaultMessage: 'Stack by', } ); export const STACK_BY_RISK_SCORES = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.riskScoresDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.riskScoresDropDown', { defaultMessage: 'Risk scores', } ); export const STACK_BY_SEVERITIES = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.severitiesDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.severitiesDropDown', { defaultMessage: 'Severities', } ); export const STACK_BY_DESTINATION_IPS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.destinationIpsDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.destinationIpsDropDown', { defaultMessage: 'Top destination IPs', } ); export const STACK_BY_SOURCE_IPS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.sourceIpsDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.sourceIpsDropDown', { defaultMessage: 'Top source IPs', } ); export const STACK_BY_ACTIONS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.eventActionsDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.eventActionsDropDown', { defaultMessage: 'Top event actions', } ); export const STACK_BY_CATEGORIES = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.eventCategoriesDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.eventCategoriesDropDown', { defaultMessage: 'Top event categories', } ); export const STACK_BY_HOST_NAMES = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.hostNamesDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.hostNamesDropDown', { defaultMessage: 'Top host names', } ); export const STACK_BY_RULE_TYPES = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.ruleTypesDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.ruleTypesDropDown', { defaultMessage: 'Top rule types', } ); export const STACK_BY_RULE_NAMES = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.rulesDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.rulesDropDown', { defaultMessage: 'Top rules', } ); export const STACK_BY_USERS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.stackByOptions.usersDropDown', + 'xpack.securitySolution.detectionEngine.alerts.histogram.stackByOptions.usersDropDown', { defaultMessage: 'Top users', } ); export const TOP = (fieldName: string) => - i18n.translate('xpack.siem.detectionEngine.alerts.histogram.topNLabel', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.histogram.topNLabel', { values: { fieldName }, defaultMessage: `Top {fieldName}`, }); export const HISTOGRAM_HEADER = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.headerTitle', + 'xpack.securitySolution.detectionEngine.alerts.histogram.headerTitle', { defaultMessage: 'Alert count', } ); export const ALL_OTHERS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.allOthersGroupingLabel', + 'xpack.securitySolution.detectionEngine.alerts.histogram.allOthersGroupingLabel', { defaultMessage: 'All others', } ); export const VIEW_ALERTS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.viewAlertsButtonLabel', + 'xpack.securitySolution.detectionEngine.alerts.histogram.viewAlertsButtonLabel', { defaultMessage: 'View alerts', } @@ -115,7 +115,7 @@ export const SHOWING_ALERTS = ( totalAlerts: number, modifier: string ) => - i18n.translate('xpack.siem.detectionEngine.alerts.histogram.showingAlertsTitle', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.histogram.showingAlertsTitle', { values: { totalAlertsFormatted, totalAlerts, modifier }, defaultMessage: 'Showing: {modifier}{totalAlertsFormatted} {totalAlerts, plural, =1 {alert} other {alerts}}', diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/types.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_histogram_panel/types.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_histogram_panel/types.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_info/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_info/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_info/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_info/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_info/query.dsl.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_info/query.dsl.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_info/query.dsl.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_info/query.dsl.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_info/types.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_info/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_info/types.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_info/types.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/actions.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/actions.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/actions.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/actions.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/actions.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/actions.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/actions.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_filter_group/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_filter_group/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_filter_group/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_filter_group/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_filter_group/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_filter_group/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_filter_group/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_filter_group/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/translations.ts similarity index 66% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/translations.ts index ae5070efc21e1..9427464e23726 100644 --- a/x-pack/plugins/siem/public/alerts/components/alerts_table/alerts_utility_bar/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/alerts_utility_bar/translations.ts @@ -7,70 +7,70 @@ import { i18n } from '@kbn/i18n'; export const SHOWING_ALERTS = (totalAlertsFormatted: string, totalAlerts: number) => - i18n.translate('xpack.siem.detectionEngine.alerts.utilityBar.showingAlertsTitle', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.utilityBar.showingAlertsTitle', { values: { totalAlertsFormatted, totalAlerts }, defaultMessage: 'Showing {totalAlertsFormatted} {totalAlerts, plural, =1 {alert} other {alerts}}', }); export const SELECTED_ALERTS = (selectedAlertsFormatted: string, selectedAlerts: number) => - i18n.translate('xpack.siem.detectionEngine.alerts.utilityBar.selectedAlertsTitle', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.utilityBar.selectedAlertsTitle', { values: { selectedAlertsFormatted, selectedAlerts }, defaultMessage: 'Selected {selectedAlertsFormatted} {selectedAlerts, plural, =1 {alert} other {alerts}}', }); export const SELECT_ALL_ALERTS = (totalAlertsFormatted: string, totalAlerts: number) => - i18n.translate('xpack.siem.detectionEngine.alerts.utilityBar.selectAllAlertsTitle', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.utilityBar.selectAllAlertsTitle', { values: { totalAlertsFormatted, totalAlerts }, defaultMessage: 'Select all {totalAlertsFormatted} {totalAlerts, plural, =1 {alert} other {alerts}}', }); export const CLEAR_SELECTION = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.clearSelectionTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.clearSelectionTitle', { defaultMessage: 'Clear selection', } ); export const BATCH_ACTIONS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.batchActionsTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.batchActionsTitle', { defaultMessage: 'Batch actions', } ); export const BATCH_ACTION_VIEW_SELECTED_IN_HOSTS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.batchActions.viewSelectedInHostsTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.batchActions.viewSelectedInHostsTitle', { defaultMessage: 'View selected in hosts', } ); export const BATCH_ACTION_VIEW_SELECTED_IN_NETWORK = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.batchActions.viewSelectedInNetworkTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.batchActions.viewSelectedInNetworkTitle', { defaultMessage: 'View selected in network', } ); export const BATCH_ACTION_VIEW_SELECTED_IN_TIMELINE = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.batchActions.viewSelectedInTimelineTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.batchActions.viewSelectedInTimelineTitle', { defaultMessage: 'View selected in timeline', } ); export const BATCH_ACTION_OPEN_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.batchActions.openSelectedTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.batchActions.openSelectedTitle', { defaultMessage: 'Open selected', } ); export const BATCH_ACTION_CLOSE_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.alerts.utilityBar.batchActions.closeSelectedTitle', + 'xpack.securitySolution.detectionEngine.alerts.utilityBar.batchActions.closeSelectedTitle', { defaultMessage: 'Close selected', } diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/default_config.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/default_config.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/default_config.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/default_config.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/default_config.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/default_config.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/default_config.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/default_config.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/helpers.test.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/helpers.test.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/helpers.test.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/helpers.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/helpers.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/helpers.ts diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/translations.ts similarity index 54% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/translations.ts index 4f34e9d031eed..07cc28681387d 100644 --- a/x-pack/plugins/siem/public/alerts/components/alerts_table/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/translations.ts @@ -6,122 +6,131 @@ import { i18n } from '@kbn/i18n'; -export const PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.pageTitle', { +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.detectionEngine.pageTitle', { defaultMessage: 'Detection engine', }); -export const ALERTS_TABLE_TITLE = i18n.translate('xpack.siem.detectionEngine.alerts.tableTitle', { - defaultMessage: 'Alert list', -}); +export const ALERTS_TABLE_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.alerts.tableTitle', + { + defaultMessage: 'Alert list', + } +); export const ALERTS_DOCUMENT_TYPE = i18n.translate( - 'xpack.siem.detectionEngine.alerts.documentTypeTitle', + 'xpack.securitySolution.detectionEngine.alerts.documentTypeTitle', { defaultMessage: 'Alerts', } ); -export const OPEN_ALERTS = i18n.translate('xpack.siem.detectionEngine.alerts.openAlertsTitle', { - defaultMessage: 'Open alerts', -}); +export const OPEN_ALERTS = i18n.translate( + 'xpack.securitySolution.detectionEngine.alerts.openAlertsTitle', + { + defaultMessage: 'Open alerts', + } +); -export const CLOSED_ALERTS = i18n.translate('xpack.siem.detectionEngine.alerts.closedAlertsTitle', { - defaultMessage: 'Closed alerts', -}); +export const CLOSED_ALERTS = i18n.translate( + 'xpack.securitySolution.detectionEngine.alerts.closedAlertsTitle', + { + defaultMessage: 'Closed alerts', + } +); export const LOADING_ALERTS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.loadingAlertsTitle', + 'xpack.securitySolution.detectionEngine.alerts.loadingAlertsTitle', { defaultMessage: 'Loading Alerts', } ); export const TOTAL_COUNT_OF_ALERTS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.totalCountOfAlertsTitle', + 'xpack.securitySolution.detectionEngine.alerts.totalCountOfAlertsTitle', { defaultMessage: 'alerts match the search criteria', } ); export const ALERTS_HEADERS_RULE = i18n.translate( - 'xpack.siem.eventsViewer.alerts.defaultHeaders.ruleTitle', + 'xpack.securitySolution.eventsViewer.alerts.defaultHeaders.ruleTitle', { defaultMessage: 'Rule', } ); export const ALERTS_HEADERS_VERSION = i18n.translate( - 'xpack.siem.eventsViewer.alerts.defaultHeaders.versionTitle', + 'xpack.securitySolution.eventsViewer.alerts.defaultHeaders.versionTitle', { defaultMessage: 'Version', } ); export const ALERTS_HEADERS_METHOD = i18n.translate( - 'xpack.siem.eventsViewer.alerts.defaultHeaders.methodTitle', + 'xpack.securitySolution.eventsViewer.alerts.defaultHeaders.methodTitle', { defaultMessage: 'Method', } ); export const ALERTS_HEADERS_SEVERITY = i18n.translate( - 'xpack.siem.eventsViewer.alerts.defaultHeaders.severityTitle', + 'xpack.securitySolution.eventsViewer.alerts.defaultHeaders.severityTitle', { defaultMessage: 'Severity', } ); export const ALERTS_HEADERS_RISK_SCORE = i18n.translate( - 'xpack.siem.eventsViewer.alerts.defaultHeaders.riskScoreTitle', + 'xpack.securitySolution.eventsViewer.alerts.defaultHeaders.riskScoreTitle', { defaultMessage: 'Risk Score', } ); export const ACTION_OPEN_ALERT = i18n.translate( - 'xpack.siem.detectionEngine.alerts.actions.openAlertTitle', + 'xpack.securitySolution.detectionEngine.alerts.actions.openAlertTitle', { defaultMessage: 'Open alert', } ); export const ACTION_CLOSE_ALERT = i18n.translate( - 'xpack.siem.detectionEngine.alerts.actions.closeAlertTitle', + 'xpack.securitySolution.detectionEngine.alerts.actions.closeAlertTitle', { defaultMessage: 'Close alert', } ); export const ACTION_INVESTIGATE_IN_TIMELINE = i18n.translate( - 'xpack.siem.detectionEngine.alerts.actions.investigateInTimelineTitle', + 'xpack.securitySolution.detectionEngine.alerts.actions.investigateInTimelineTitle', { defaultMessage: 'Investigate in timeline', } ); export const CLOSED_ALERT_SUCCESS_TOAST = (totalAlerts: number) => - i18n.translate('xpack.siem.detectionEngine.alerts.closedAlertSuccessToastMessage', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.closedAlertSuccessToastMessage', { values: { totalAlerts }, defaultMessage: 'Successfully closed {totalAlerts} {totalAlerts, plural, =1 {alert} other {alerts}}.', }); export const OPENED_ALERT_SUCCESS_TOAST = (totalAlerts: number) => - i18n.translate('xpack.siem.detectionEngine.alerts.openedAlertSuccessToastMessage', { + i18n.translate('xpack.securitySolution.detectionEngine.alerts.openedAlertSuccessToastMessage', { values: { totalAlerts }, defaultMessage: 'Successfully opened {totalAlerts} {totalAlerts, plural, =1 {alert} other {alerts}}.', }); export const CLOSED_ALERT_FAILED_TOAST = i18n.translate( - 'xpack.siem.detectionEngine.alerts.closedAlertFailedToastMessage', + 'xpack.securitySolution.detectionEngine.alerts.closedAlertFailedToastMessage', { defaultMessage: 'Failed to close alert(s).', } ); export const OPENED_ALERT_FAILED_TOAST = i18n.translate( - 'xpack.siem.detectionEngine.alerts.openedAlertFailedToastMessage', + 'xpack.securitySolution.detectionEngine.alerts.openedAlertFailedToastMessage', { defaultMessage: 'Failed to open alert(s)', } diff --git a/x-pack/plugins/siem/public/alerts/components/alerts_table/types.ts b/x-pack/plugins/security_solution/public/alerts/components/alerts_table/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/alerts_table/types.ts rename to x-pack/plugins/security_solution/public/alerts/components/alerts_table/types.ts diff --git a/x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/translations.ts similarity index 79% rename from x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/translations.ts index 651faf0b17318..f59be16923805 100644 --- a/x-pack/plugins/siem/public/alerts/components/detection_engine_header_page/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/detection_engine_header_page/translations.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; export const PAGE_BADGE_LABEL = i18n.translate( - 'xpack.siem.detectionEngine.headerPage.pageBadgeLabel', + 'xpack.securitySolution.detectionEngine.headerPage.pageBadgeLabel', { defaultMessage: 'Beta', } ); export const PAGE_BADGE_TOOLTIP = i18n.translate( - 'xpack.siem.detectionEngine.headerPage.pageBadgeTooltip', + 'xpack.securitySolution.detectionEngine.headerPage.pageBadgeTooltip', { defaultMessage: 'Alerts is still in beta. Please help us improve by reporting issues or bugs in the Kibana repo.', diff --git a/x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/translations.ts similarity index 80% rename from x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/translations.ts index 84804af8840f9..bc08a13c8b5d1 100644 --- a/x-pack/plugins/siem/public/alerts/components/no_api_integration_callout/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/no_api_integration_callout/translations.ts @@ -7,21 +7,21 @@ import { i18n } from '@kbn/i18n'; export const NO_API_INTEGRATION_KEY_CALLOUT_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.noApiIntegrationKeyCallOutTitle', + 'xpack.securitySolution.detectionEngine.noApiIntegrationKeyCallOutTitle', { defaultMessage: 'API integration key required', } ); export const NO_API_INTEGRATION_KEY_CALLOUT_MSG = i18n.translate( - 'xpack.siem.detectionEngine.noApiIntegrationKeyCallOutMsg', + 'xpack.securitySolution.detectionEngine.noApiIntegrationKeyCallOutMsg', { defaultMessage: `A new encryption key is generated for saved objects each time you start Kibana. Without a persistent key, you cannot delete or modify rules after Kibana restarts. To set a persistent key, add the xpack.encryptedSavedObjects.encryptionKey setting with any text value of 32 or more characters to the kibana.yml file.`, } ); export const DISMISS_CALLOUT = i18n.translate( - 'xpack.siem.detectionEngine.dismissNoApiIntegrationKeyButton', + 'xpack.securitySolution.detectionEngine.dismissNoApiIntegrationKeyButton', { defaultMessage: 'Dismiss', } diff --git a/x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts similarity index 77% rename from x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts index f79ede56ef9ae..d036c422b2fb9 100644 --- a/x-pack/plugins/siem/public/alerts/components/no_write_alerts_callout/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; export const NO_WRITE_ALERTS_CALLOUT_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.noWriteAlertsCallOutTitle', + 'xpack.securitySolution.detectionEngine.noWriteAlertsCallOutTitle', { defaultMessage: 'Alerts index permissions required', } ); export const NO_WRITE_ALERTS_CALLOUT_MSG = i18n.translate( - 'xpack.siem.detectionEngine.noWriteAlertsCallOutMsg', + 'xpack.securitySolution.detectionEngine.noWriteAlertsCallOutMsg', { defaultMessage: 'You are currently missing the required permissions to update alerts. Please contact your administrator for further assistance.', @@ -22,7 +22,7 @@ export const NO_WRITE_ALERTS_CALLOUT_MSG = i18n.translate( ); export const DISMISS_CALLOUT = i18n.translate( - 'xpack.siem.detectionEngine.dismissNoWriteAlertButton', + 'xpack.securitySolution.detectionEngine.dismissNoWriteAlertButton', { defaultMessage: 'Dismiss', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/accordion_title/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/accordion_title/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/accordion_title/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/accordion_title/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/accordion_title/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/accordion_title/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/accordion_title/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/accordion_title/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/add_item_form/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/add_item_form/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/add_item_form/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/add_item_form/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/add_item_form/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/add_item_form/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/add_item_form/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/add_item_form/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/all_rules_tables/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/all_rules_tables/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/all_rules_tables/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/all_rules_tables/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/all_rules_tables/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/all_rules_tables/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/all_rules_tables/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/all_rules_tables/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/anomaly_threshold_slider/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/anomaly_threshold_slider/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/anomaly_threshold_slider/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/anomaly_threshold_slider/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/anomaly_threshold_slider/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/anomaly_threshold_slider/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/anomaly_threshold_slider/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/anomaly_threshold_slider/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/actions_description.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/actions_description.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/actions_description.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/actions_description.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/assets/list_tree_icon.svg b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/assets/list_tree_icon.svg similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/assets/list_tree_icon.svg rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/assets/list_tree_icon.svg diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/helpers.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/helpers.test.tsx similarity index 98% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/helpers.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/helpers.test.tsx index e39ee38d71da7..b82d1c0a36ab2 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/description_step/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/helpers.test.tsx @@ -9,7 +9,11 @@ import { shallow } from 'enzyme'; import { EuiLoadingSpinner } from '@elastic/eui'; import { coreMock } from '../../../../../../../../src/core/public/mocks'; -import { esFilters, FilterManager } from '../../../../../../../../src/plugins/data/public'; +import { + esFilters, + FilterManager, + UI_SETTINGS, +} from '../../../../../../../../src/plugins/data/public'; import { SeverityBadge } from '../severity_badge'; import * as i18n from './translations'; @@ -29,7 +33,7 @@ import { ListItems } from './types'; const setupMock = coreMock.createSetup(); const uiSettingsMock = (pinnedByDefault: boolean) => (key: string) => { switch (key) { - case 'filters:pinnedByDefault': + case UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT: return pinnedByDefault; default: throw new Error(`Unexpected uiSettings key in FilterManager mock: ${key}`); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/helpers.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/helpers.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/helpers.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/index.test.tsx similarity index 98% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/index.test.tsx index 1f474630fd6e3..b8f81f6d7e5f7 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/description_step/index.test.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/index.test.tsx @@ -13,7 +13,12 @@ import { getDescriptionItem, } from '.'; -import { esFilters, Filter, FilterManager } from '../../../../../../../../src/plugins/data/public'; +import { + esFilters, + Filter, + FilterManager, + UI_SETTINGS, +} from '../../../../../../../../src/plugins/data/public'; import { mockAboutStepRule, mockDefineStepRule, @@ -33,7 +38,7 @@ describe('description_step', () => { const setupMock = coreMock.createSetup(); const uiSettingsMock = (pinnedByDefault: boolean) => (key: string) => { switch (key) { - case 'filters:pinnedByDefault': + case UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT: return pinnedByDefault; default: throw new Error(`Unexpected uiSettings key in FilterManager mock: ${key}`); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/ml_job_description.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/ml_job_description.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/ml_job_description.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/ml_job_description.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/ml_job_description.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/ml_job_description.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/ml_job_description.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/ml_job_description.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/throttle_description.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/throttle_description.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/throttle_description.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/throttle_description.tsx diff --git a/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/translations.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/translations.tsx new file mode 100644 index 0000000000000..3e639ede7a18b --- /dev/null +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/translations.tsx @@ -0,0 +1,56 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const FILTERS_LABEL = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.filtersLabel', + { + defaultMessage: 'Filters', + } +); + +export const QUERY_LABEL = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.QueryLabel', + { + defaultMessage: 'Custom query', + } +); + +export const SAVED_ID_LABEL = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.savedIdLabel', + { + defaultMessage: 'Saved query name', + } +); + +export const ML_TYPE_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.mlRuleTypeDescription', + { + defaultMessage: 'Machine Learning', + } +); + +export const QUERY_TYPE_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.queryRuleTypeDescription', + { + defaultMessage: 'Query', + } +); + +export const ML_JOB_STARTED = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDescription.mlJobStartedDescription', + { + defaultMessage: 'Started', + } +); + +export const ML_JOB_STOPPED = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDescription.mlJobStoppedDescription', + { + defaultMessage: 'Stopped', + } +); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/types.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/description_step/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/description_step/types.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/description_step/types.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/mitre/helpers.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/mitre/helpers.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/mitre/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/mitre/helpers.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/mitre/helpers.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/mitre/helpers.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/mitre/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/mitre/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/mitre/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/mitre/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/mitre/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/mitre/index.tsx diff --git a/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/translations.ts new file mode 100644 index 0000000000000..704f950cfb4b9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/mitre/translations.ts @@ -0,0 +1,42 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const TACTIC = i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttack.tacticsDescription', + { + defaultMessage: 'tactic', + } +); + +export const TECHNIQUE = i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttack.techniquesDescription', + { + defaultMessage: 'techniques', + } +); + +export const ADD_MITRE_ATTACK = i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttack.addTitle', + { + defaultMessage: 'Add MITRE ATT&CK\\u2122 threat', + } +); + +export const TECHNIQUES_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttack.techniquesPlaceHolderDescription', + { + defaultMessage: 'Select techniques ...', + } +); + +export const TACTIC_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttack.tacticPlaceHolderDescription', + { + defaultMessage: 'Select tactic ...', + } +); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/ml_job_select/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/ml_job_select/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/ml_job_select/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/ml_job_select/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/ml_job_select/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/ml_job_select/index.tsx similarity index 95% rename from x-pack/plugins/siem/public/alerts/components/rules/ml_job_select/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/ml_job_select/index.tsx index 0d88242178225..cb084d4daa782 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/ml_job_select/index.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/ml_job_select/index.tsx @@ -40,13 +40,13 @@ const HelpText: React.FC<{ href: string; showEnableWarning: boolean }> = ({ }) => ( <> diff --git a/x-pack/plugins/siem/public/alerts/components/rules/next_step/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/alerts/components/rules/next_step/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/next_step/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/alerts/components/rules/next_step/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/alerts/components/rules/next_step/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/next_step/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/next_step/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/next_step/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/next_step/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/next_step/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/next_step/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/next_step/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/optional_field_label/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/optional_field_label/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/optional_field_label/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/optional_field_label/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/optional_field_label/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/optional_field_label/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/optional_field_label/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/optional_field_label/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pick_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/pick_timeline/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/pick_timeline/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/pick_timeline/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pick_timeline/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/pick_timeline/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/pick_timeline/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/pick_timeline/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/load_empty_prompt.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/translations.ts similarity index 71% rename from x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/translations.ts index 9b36d96cef9ca..b43ef8c615003 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/translations.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; export const PRE_BUILT_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.rules.prePackagedRules.emptyPromptTitle', + 'xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptTitle', { defaultMessage: 'Load Elastic prebuilt detection rules', } ); export const PRE_BUILT_MSG = i18n.translate( - 'xpack.siem.detectionEngine.rules.prePackagedRules.emptyPromptMessage', + 'xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptMessage', { defaultMessage: 'Elastic SIEM comes with prebuilt detection rules that run in the background and create alerts when their conditions are met. By default, all prebuilt rules are disabled and you select which rules you want to activate.', @@ -22,42 +22,42 @@ export const PRE_BUILT_MSG = i18n.translate( ); export const PRE_BUILT_ACTION = i18n.translate( - 'xpack.siem.detectionEngine.rules.prePackagedRules.loadPreBuiltButton', + 'xpack.securitySolution.detectionEngine.rules.prePackagedRules.loadPreBuiltButton', { defaultMessage: 'Load prebuilt detection rules', } ); export const CREATE_RULE_ACTION = i18n.translate( - 'xpack.siem.detectionEngine.rules.prePackagedRules.createOwnRuletButton', + 'xpack.securitySolution.detectionEngine.rules.prePackagedRules.createOwnRuletButton', { defaultMessage: 'Create your own rules', } ); export const UPDATE_PREPACKAGED_RULES_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.rules.updatePrePackagedRulesTitle', + 'xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle', { defaultMessage: 'Update available for Elastic prebuilt rules', } ); export const UPDATE_PREPACKAGED_RULES_MSG = (updateRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.updatePrePackagedRulesMsg', { + i18n.translate('xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg', { values: { updateRules }, defaultMessage: 'You can update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}}. Note that this will reload deleted Elastic prebuilt rules.', }); export const UPDATE_PREPACKAGED_RULES = (updateRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.updatePrePackagedRulesButton', { + i18n.translate('xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton', { values: { updateRules }, defaultMessage: 'Update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}} ', }); export const RELEASE_NOTES_HELP = i18n.translate( - 'xpack.siem.detectionEngine.rules.releaseNotesHelp', + 'xpack.securitySolution.detectionEngine.rules.releaseNotesHelp', { defaultMessage: 'Release notes', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/update_callout.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/update_callout.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/update_callout.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/update_callout.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/update_callout.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/update_callout.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/pre_packaged_rules/update_callout.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/pre_packaged_rules/update_callout.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/query_bar/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/query_bar/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/query_bar/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/query_bar/translations.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/translations.tsx similarity index 80% rename from x-pack/plugins/siem/public/alerts/components/rules/query_bar/translations.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/translations.tsx index 9b14e4f8599da..756b0c05f435a 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/query_bar/translations.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/query_bar/translations.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const IMPORT_TIMELINE_MODAL = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.importTimelineModalTitle', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.importTimelineModalTitle', { defaultMessage: 'Import query from saved timeline', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/translations.ts similarity index 69% rename from x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/translations.ts index c3429f4365031..26b6bb83a145d 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/read_only_callout/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/read_only_callout/translations.ts @@ -7,20 +7,23 @@ import { i18n } from '@kbn/i18n'; export const READ_ONLY_CALLOUT_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.readOnlyCallOutTitle', + 'xpack.securitySolution.detectionEngine.readOnlyCallOutTitle', { defaultMessage: 'Rule permissions required', } ); export const READ_ONLY_CALLOUT_MSG = i18n.translate( - 'xpack.siem.detectionEngine.readOnlyCallOutMsg', + 'xpack.securitySolution.detectionEngine.readOnlyCallOutMsg', { defaultMessage: 'You are currently missing the required permissions to create/edit detection engine rule. Please contact your administrator for further assistance.', } ); -export const DISMISS_CALLOUT = i18n.translate('xpack.siem.detectionEngine.dismissButton', { - defaultMessage: 'Dismiss', -}); +export const DISMISS_CALLOUT = i18n.translate( + 'xpack.securitySolution.detectionEngine.dismissButton', + { + defaultMessage: 'Dismiss', + } +); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/translations.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/translations.tsx similarity index 79% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/translations.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/translations.tsx index 8bf8e39685dfd..8e467307cb6da 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_field/translations.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_field/translations.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const FORM_ERRORS_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.createRule.ruleActionsField.ruleActionsFormErrorsTitle', + 'xpack.securitySolution.detectionEngine.createRule.ruleActionsField.ruleActionsFormErrorsTitle', { defaultMessage: 'Please fix issues listed below', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/translations.ts similarity index 79% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/translations.ts index 631fbe41870d6..862d78936e9d5 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/rule_actions_overflow/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_actions_overflow/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const ALL_ACTIONS = i18n.translate( - 'xpack.siem.detectionEngine.rules.components.ruleActionsOverflow.allActionsTitle', + 'xpack.securitySolution.detectionEngine.rules.components.ruleActionsOverflow.allActionsTitle', { defaultMessage: 'All actions', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_status/helpers.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_status/helpers.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_status/helpers.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_status/helpers.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/helpers.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_status/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_status/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_status/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_status/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/index.tsx diff --git a/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/translations.ts new file mode 100644 index 0000000000000..30a352a83a324 --- /dev/null +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_status/translations.ts @@ -0,0 +1,35 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const STATUS = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleStatus.statusDescription', + { + defaultMessage: 'Last response', + } +); + +export const STATUS_AT = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleStatus.statusAtDescription', + { + defaultMessage: 'at', + } +); + +export const STATUS_DATE = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleStatus.statusDateDescription', + { + defaultMessage: 'Status date', + } +); + +export const REFRESH = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleStatus.refreshButton', + { + defaultMessage: 'Refresh', + } +); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_switch/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_switch/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_switch/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_switch/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_switch/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_switch/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_switch/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_switch/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_switch/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/rule_switch/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/rule_switch/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/rule_switch/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/translations.ts similarity index 60% rename from x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/translations.ts index 1bc983814c330..66bc6ea900925 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/schedule_item_form/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/schedule_item_form/translations.ts @@ -7,28 +7,28 @@ import { i18n } from '@kbn/i18n'; export const SECONDS = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription', { defaultMessage: 'Seconds', } ); export const MINUTES = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription', { defaultMessage: 'Minutes', } ); export const HOURS = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription', { defaultMessage: 'Hours', } ); export const INVALID_TIME = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.invalidTimeMessageDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.invalidTimeMessageDescription', { defaultMessage: 'A time is required.', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/index.tsx similarity index 94% rename from x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/index.tsx index 4a21eb0fbcf23..3dad53f532a5b 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/index.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/index.tsx @@ -34,13 +34,13 @@ const MlCardDescription = ({ i18n.ML_TYPE_DESCRIPTION ) : ( diff --git a/x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/translations.ts similarity index 64% rename from x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/translations.ts index 4dc0a89af4a49..8b92d20616f7c 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/select_rule_type/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/select_rule_type/translations.ts @@ -7,28 +7,28 @@ import { i18n } from '@kbn/i18n'; export const QUERY_TYPE_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeTitle', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeTitle', { defaultMessage: 'Custom query', } ); export const QUERY_TYPE_DESCRIPTION = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeDescription', { defaultMessage: 'Use KQL or Lucene to detect issues across indices.', } ); export const ML_TYPE_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeTitle', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeTitle', { defaultMessage: 'Machine Learning', } ); export const ML_TYPE_DESCRIPTION = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDescription', { defaultMessage: 'Select ML job to detect anomalous activity.', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/severity_badge/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/severity_badge/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/severity_badge/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/severity_badge/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/severity_badge/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/severity_badge/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/severity_badge/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/severity_badge/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/status_icon/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/status_icon/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/status_icon/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/status_icon/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/status_icon/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/status_icon/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/status_icon/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/status_icon/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/data.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/data.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/data.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/data.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/default_value.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/default_value.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/default_value.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/default_value.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/schema.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/schema.tsx similarity index 68% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/schema.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/schema.tsx index 69e8ed10d1b34..42ffab10ff469 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/schema.tsx @@ -24,14 +24,17 @@ const { emptyField } = fieldValidators; export const schema: FormSchema = { name: { type: FIELD_TYPES.TEXT, - label: i18n.translate('xpack.siem.detectionEngine.createRule.stepAboutRule.fieldNameLabel', { - defaultMessage: 'Name', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNameLabel', + { + defaultMessage: 'Name', + } + ), validations: [ { validator: emptyField( i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError', { defaultMessage: 'A name is required.', } @@ -43,7 +46,7 @@ export const schema: FormSchema = { description: { type: FIELD_TYPES.TEXTAREA, label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldDescriptionLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldDescriptionLabel', { defaultMessage: 'Description', } @@ -52,7 +55,7 @@ export const schema: FormSchema = { { validator: emptyField( i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.descriptionFieldRequiredError', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.descriptionFieldRequiredError', { defaultMessage: 'A description is required.', } @@ -64,7 +67,7 @@ export const schema: FormSchema = { severity: { type: FIELD_TYPES.SUPER_SELECT, label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldSeverityLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldSeverityLabel', { defaultMessage: 'Severity', } @@ -73,7 +76,7 @@ export const schema: FormSchema = { { validator: emptyField( i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.severityFieldRequiredError', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.severityFieldRequiredError', { defaultMessage: 'A severity is required.', } @@ -85,7 +88,7 @@ export const schema: FormSchema = { riskScore: { type: FIELD_TYPES.RANGE, label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldRiskScoreLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldRiskScoreLabel', { defaultMessage: 'Risk score', } @@ -93,7 +96,7 @@ export const schema: FormSchema = { }, references: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldReferenceUrlsLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldReferenceUrlsLabel', { defaultMessage: 'Reference URLs', } @@ -124,7 +127,7 @@ export const schema: FormSchema = { }, falsePositives: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldFalsePositiveLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldFalsePositiveLabel', { defaultMessage: 'False positive examples', } @@ -133,7 +136,7 @@ export const schema: FormSchema = { }, threat: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel', { defaultMessage: 'MITRE ATT&CK\\u2122', } @@ -164,11 +167,14 @@ export const schema: FormSchema = { }, tags: { type: FIELD_TYPES.COMBO_BOX, - label: i18n.translate('xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTagsLabel', { - defaultMessage: 'Tags', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTagsLabel', + { + defaultMessage: 'Tags', + } + ), helpText: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTagsHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTagsHelpText', { defaultMessage: 'Type one or more custom identifying tags for this rule. Press enter after each tag to begin a new one.', @@ -178,13 +184,19 @@ export const schema: FormSchema = { }, note: { type: FIELD_TYPES.TEXTAREA, - label: i18n.translate('xpack.siem.detectionEngine.createRule.stepAboutRule.guideLabel', { - defaultMessage: 'Investigation guide', - }), - helpText: i18n.translate('xpack.siem.detectionEngine.createRule.stepAboutRule.guideHelpText', { - defaultMessage: - 'Provide helpful information for analysts that are performing an alert investigation. This guide will appear on both the rule details page and in timelines created from alerts generated by this rule.', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.guideLabel', + { + defaultMessage: 'Investigation guide', + } + ), + helpText: i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.guideHelpText', + { + defaultMessage: + 'Provide helpful information for analysts that are performing a signal investigation. This guide will appear on both the rule details page and in timelines created from alerts generated by this rule.', + } + ), labelAppend: OptionalFieldLabel, }, }; diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/translations.ts similarity index 56% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/translations.ts index 0b1e712c663f3..c179128c56d92 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/translations.ts @@ -7,70 +7,70 @@ import { i18n } from '@kbn/i18n'; export const ADVANCED_SETTINGS = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.advancedSettingsButton', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.advancedSettingsButton', { defaultMessage: 'Advanced settings', } ); export const ADD_REFERENCE = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.addReferenceDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.addReferenceDescription', { defaultMessage: 'Add reference URL', } ); export const ADD_FALSE_POSITIVE = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.addFalsePositiveDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.addFalsePositiveDescription', { defaultMessage: 'Add false positive example', } ); export const LOW = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionLowDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionLowDescription', { defaultMessage: 'Low', } ); export const MEDIUM = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionMediumDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionMediumDescription', { defaultMessage: 'Medium', } ); export const HIGH = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionHighDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionHighDescription', { defaultMessage: 'High', } ); export const CRITICAL = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionCriticalDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionCriticalDescription', { defaultMessage: 'Critical', } ); export const CUSTOM_MITRE_ATTACK_TECHNIQUES_REQUIRED = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.customMitreAttackTechniquesFieldRequiredError', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customMitreAttackTechniquesFieldRequiredError', { defaultMessage: 'At least one Technique is required with a Tactic.', } ); export const URL_FORMAT_INVALID = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError', { defaultMessage: 'Url is invalid format', } ); export const ADD_RULE_NOTE_HELP_TEXT = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutrule.noteHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutrule.noteHelpText', { defaultMessage: 'Add rule investigation guide...', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/translations.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/translations.ts similarity index 69% rename from x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/translations.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/translations.ts index 79c5eb12d4663..e1b89b1ec8ce2 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_about_rule_details/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule_details/translations.ts @@ -6,21 +6,21 @@ import { i18n } from '@kbn/i18n'; export const ABOUT_PANEL_DETAILS_TAB = i18n.translate( - 'xpack.siem.detectionEngine.details.stepAboutRule.detailsLabel', + 'xpack.securitySolution.detectionEngine.details.stepAboutRule.detailsLabel', { defaultMessage: 'Details', } ); export const ABOUT_TEXT = i18n.translate( - 'xpack.siem.detectionEngine.details.stepAboutRule.aboutText', + 'xpack.securitySolution.detectionEngine.details.stepAboutRule.aboutText', { defaultMessage: 'About', } ); export const ABOUT_PANEL_NOTES_TAB = i18n.translate( - 'xpack.siem.detectionEngine.details.stepAboutRule.investigationGuideLabel', + 'xpack.securitySolution.detectionEngine.details.stepAboutRule.investigationGuideLabel', { defaultMessage: 'Investigation guide', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_content_wrapper/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_content_wrapper/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_content_wrapper/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_content_wrapper/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_content_wrapper/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_content_wrapper/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_content_wrapper/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_content_wrapper/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/schema.tsx similarity index 82% rename from x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/schema.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/schema.tsx index 0c309c8c51a15..190d4484b156b 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/schema.tsx @@ -25,7 +25,7 @@ export const schema: FormSchema = { index: { type: FIELD_TYPES.COMBO_BOX, label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fiedIndexPatternsLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fiedIndexPatternsLabel', { defaultMessage: 'Index patterns', } @@ -45,7 +45,7 @@ export const schema: FormSchema = { return fieldValidators.emptyField( i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.outputIndiceNameFieldRequiredError', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.outputIndiceNameFieldRequiredError', { defaultMessage: 'A minimum of one index pattern is required.', } @@ -57,7 +57,7 @@ export const schema: FormSchema = { }, queryBar: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel', { defaultMessage: 'Custom query', } @@ -111,7 +111,7 @@ export const schema: FormSchema = { }, ruleType: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.fieldRuleTypeLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldRuleTypeLabel', { defaultMessage: 'Rule type', } @@ -120,7 +120,7 @@ export const schema: FormSchema = { }, anomalyThreshold: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel', { defaultMessage: 'Anomaly score threshold', } @@ -129,7 +129,7 @@ export const schema: FormSchema = { }, machineLearningJobId: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel', { defaultMessage: 'Machine Learning job', } @@ -148,7 +148,7 @@ export const schema: FormSchema = { return fieldValidators.emptyField( i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.machineLearningJobIdRequired', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningJobIdRequired', { defaultMessage: 'A Machine Learning job is required.', } @@ -160,13 +160,13 @@ export const schema: FormSchema = { }, timeline: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateLabel', { defaultMessage: 'Timeline template', } ), helpText: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateHelpText', { defaultMessage: 'Select which timeline to use when investigating generated alerts.', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/translations.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/translations.tsx similarity index 64% rename from x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/translations.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/translations.tsx index bbdb2130ce298..a371db72d2ee1 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/translations.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/translations.tsx @@ -7,35 +7,35 @@ import { i18n } from '@kbn/i18n'; export const CUSTOM_QUERY_REQUIRED = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.customQueryFieldRequiredError', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldRequiredError', { defaultMessage: 'A custom query is required.', } ); export const INVALID_CUSTOM_QUERY = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError', { defaultMessage: 'The KQL is invalid', } ); export const CONFIG_INDICES = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.indicesFromConfigDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesFromConfigDescription', { defaultMessage: 'Use Elasticsearch indices from SIEM advanced settings', } ); export const CUSTOM_INDICES = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.indicesCustomDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesCustomDescription', { defaultMessage: 'Provide custom list of indices', } ); export const INDEX_HELPER_TEXT = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.indicesHelperDescription', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesHelperDescription', { defaultMessage: 'Enter the pattern of Elasticsearch indices where you would like this rule to run. By default, these will include index patterns defined in SIEM advanced settings.', @@ -43,28 +43,28 @@ export const INDEX_HELPER_TEXT = i18n.translate( ); export const RESET_DEFAULT_INDEX = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton', { defaultMessage: 'Reset to default index patterns', } ); export const IMPORT_TIMELINE_QUERY = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.importTimelineQueryButton', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.importTimelineQueryButton', { defaultMessage: 'Import query from saved timeline', } ); export const ML_JOB_SELECT_PLACEHOLDER_TEXT = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText', { defaultMessage: 'Select a job', } ); export const ENABLE_ML_JOB_WARNING = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepDefineRule.mlEnableJobWarningTitle', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlEnableJobWarningTitle', { defaultMessage: 'This ML job is not currently running. Please set this job to run via "ML job settings" before activating this rule.', diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/types.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_define_rule/types.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_define_rule/types.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_panel/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_panel/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_panel/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_panel/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_panel/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_panel/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_panel/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_panel/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/index.tsx similarity index 97% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/index.tsx index ad71059984a8b..778c6bd92bc73 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/index.tsx @@ -162,7 +162,6 @@ const StepRuleActionsComponent: FC = ({ {myStepData.throttle !== stepActionsDefaultValue.throttle ? ( <> - = ({ messageVariables: actionMessageParams, }} /> - ) : ( = ({ component={GhostFormField} /> )} + diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/schema.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/schema.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/schema.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/schema.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/schema.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/schema.tsx similarity index 92% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/schema.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/schema.tsx index a211a93bd1461..a093f991afaf7 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/schema.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/schema.tsx @@ -73,13 +73,13 @@ export const getSchema = ({ kibanaSiemAppUrl: {}, throttle: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel', { defaultMessage: 'Actions frequency', } ), helpText: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepRuleActions.fieldThrottleHelpText', { defaultMessage: 'Select when automated actions should be performed if a rule evaluates as true.', diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/translations.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/translations.tsx similarity index 68% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/translations.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/translations.tsx index d0c990df81ffe..a276cb17e95f5 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/translations.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/translations.tsx @@ -8,21 +8,21 @@ import { i18n } from '@kbn/i18n'; import { startCase } from 'lodash/fp'; export const COMPLETE_WITHOUT_ACTIVATING = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRule.completeWithoutActivatingTitle', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithoutActivatingTitle', { defaultMessage: 'Create rule without activating it', } ); export const COMPLETE_WITH_ACTIVATING = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRule.completeWithActivatingTitle', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.completeWithActivatingTitle', { defaultMessage: 'Create & activate rule', } ); export const NO_CONNECTOR_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepRuleActions.noConnectorSelectedErrorMessage', + 'xpack.securitySolution.detectionEngine.createRule.stepRuleActions.noConnectorSelectedErrorMessage', { defaultMessage: 'No connector selected', } @@ -30,7 +30,7 @@ export const NO_CONNECTOR_SELECTED = i18n.translate( export const INVALID_MUSTACHE_TEMPLATE = (paramKey: string) => i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage', + 'xpack.securitySolution.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage', { defaultMessage: '{key} is not valid mustache template', values: { diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/utils.test.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/utils.test.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/utils.test.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/utils.ts b/x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_rule_actions/utils.ts rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/utils.ts diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/schema.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/schema.tsx similarity index 71% rename from x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/schema.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/schema.tsx index d010a3128b24d..f4c371a2364f6 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/schema.tsx @@ -14,13 +14,13 @@ import { FormSchema } from '../../../../shared_imports'; export const schema: FormSchema = { interval: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldIntervalLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalLabel', { defaultMessage: 'Runs every', } ), helpText: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText', { defaultMessage: 'Rules run periodically and detect alerts within the specified time frame.', } @@ -28,14 +28,14 @@ export const schema: FormSchema = { }, from: { label: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel', { defaultMessage: 'Additional look-back time', } ), labelAppend: OptionalFieldLabel, helpText: i18n.translate( - 'xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText', { defaultMessage: 'Adds time to the look-back period to prevent missed alerts.', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/translations.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/translations.tsx similarity index 71% rename from x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/translations.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/translations.tsx index 67bcc1af8150b..d49e7396f4c87 100644 --- a/x-pack/plugins/siem/public/alerts/components/rules/step_schedule_rule/translations.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/rules/step_schedule_rule/translations.tsx @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; export const COMPLETE_WITHOUT_ACTIVATING = i18n.translate( - 'xpack.siem.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle', + 'xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle', { defaultMessage: 'Create rule without activating it', } ); export const COMPLETE_WITH_ACTIVATING = i18n.translate( - 'xpack.siem.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle', + 'xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle', { defaultMessage: 'Create & activate rule', } diff --git a/x-pack/plugins/siem/public/alerts/components/rules/throttle_select_field/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/throttle_select_field/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/throttle_select_field/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/throttle_select_field/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/rules/throttle_select_field/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/rules/throttle_select_field/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/components/rules/throttle_select_field/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/rules/throttle_select_field/index.tsx diff --git a/x-pack/plugins/siem/public/alerts/components/user_info/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/components/user_info/index.test.tsx similarity index 98% rename from x-pack/plugins/siem/public/alerts/components/user_info/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/components/user_info/index.test.tsx index b01edac2605eb..1d0f0e2e24f77 100644 --- a/x-pack/plugins/siem/public/alerts/components/user_info/index.test.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/user_info/index.test.tsx @@ -22,7 +22,7 @@ describe('useUserInfo', () => { services: { application: { capabilities: { - siem: { + securitySolution: { crud: true, }, }, diff --git a/x-pack/plugins/siem/public/alerts/components/user_info/index.tsx b/x-pack/plugins/security_solution/public/alerts/components/user_info/index.tsx similarity index 98% rename from x-pack/plugins/siem/public/alerts/components/user_info/index.tsx rename to x-pack/plugins/security_solution/public/alerts/components/user_info/index.tsx index 049463d4066d8..8753064751f76 100644 --- a/x-pack/plugins/siem/public/alerts/components/user_info/index.tsx +++ b/x-pack/plugins/security_solution/public/alerts/components/user_info/index.tsx @@ -163,7 +163,9 @@ export const useUserInfo = (): State => { const uiCapabilities = useKibana().services.application.capabilities; const capabilitiesCanUserCRUD: boolean = - typeof uiCapabilities.siem.crud === 'boolean' ? uiCapabilities.siem.crud : false; + typeof uiCapabilities.securitySolution.crud === 'boolean' + ? uiCapabilities.securitySolution.crud + : false; useEffect(() => { if (loading !== privilegeLoading || indexNameLoading) { diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/__mocks__/api.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/__mocks__/api.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/__mocks__/api.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/__mocks__/api.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/api.test.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/api.test.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/api.test.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/api.test.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/api.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/api.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/api.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/api.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/mock.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/mock.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/mock.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/translations.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/translations.ts similarity index 67% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/translations.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/translations.ts index 2f3ebccdb14cd..41f6a129d1b5e 100644 --- a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/translations.ts @@ -7,28 +7,28 @@ import { i18n } from '@kbn/i18n'; export const ALERT_FETCH_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.alerts.errorFetchingAlertsDescription', + 'xpack.securitySolution.containers.detectionEngine.alerts.errorFetchingAlertsDescription', { defaultMessage: 'Failed to query alerts', } ); export const PRIVILEGE_FETCH_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.alerts.errorFetchingAlertsDescription', + 'xpack.securitySolution.containers.detectionEngine.alerts.errorFetchingAlertsDescription', { defaultMessage: 'Failed to query alerts', } ); export const SIGNAL_GET_NAME_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.alerts.errorGetAlertDescription', + 'xpack.securitySolution.containers.detectionEngine.alerts.errorGetAlertDescription', { defaultMessage: 'Failed to get signal index name', } ); export const SIGNAL_POST_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.alerts.errorPostAlertDescription', + 'xpack.securitySolution.containers.detectionEngine.alerts.errorPostAlertDescription', { defaultMessage: 'Failed to create signal index', } diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/types.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/types.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/types.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_privilege_user.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_privilege_user.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_privilege_user.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_privilege_user.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_privilege_user.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_privilege_user.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_privilege_user.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_privilege_user.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_query.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_query.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_query.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_query.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_query.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_query.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_query.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_query.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_signal_index.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_signal_index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_signal_index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_signal_index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_signal_index.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_signal_index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/alerts/use_signal_index.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/alerts/use_signal_index.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/__mocks__/api.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/__mocks__/api.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/__mocks__/api.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/__mocks__/api.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/api.test.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/api.test.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/api.test.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/api.test.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/api.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/api.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/api.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/api.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/fetch_index_patterns.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/fetch_index_patterns.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/fetch_index_patterns.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/fetch_index_patterns.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/fetch_index_patterns.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/fetch_index_patterns.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/fetch_index_patterns.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/fetch_index_patterns.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/index.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/index.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/index.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/index.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/mock.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/mock.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/mock.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/persist_rule.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/persist_rule.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/persist_rule.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/persist_rule.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/persist_rule.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/persist_rule.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/persist_rule.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/persist_rule.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/translations.ts similarity index 59% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/translations.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/translations.ts index 84e008312fefe..2b4b32bce9c7b 100644 --- a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/translations.ts @@ -6,33 +6,36 @@ import { i18n } from '@kbn/i18n'; -export const RULE_FETCH_FAILURE = i18n.translate('xpack.siem.containers.detectionEngine.rules', { - defaultMessage: 'Failed to fetch Rules', -}); +export const RULE_FETCH_FAILURE = i18n.translate( + 'xpack.securitySolution.containers.detectionEngine.rules', + { + defaultMessage: 'Failed to fetch Rules', + } +); export const RULE_ADD_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.addRuleFailDescription', + 'xpack.securitySolution.containers.detectionEngine.addRuleFailDescription', { defaultMessage: 'Failed to add Rule', } ); export const RULE_PREPACKAGED_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.createPrePackagedRuleFailDescription', + 'xpack.securitySolution.containers.detectionEngine.createPrePackagedRuleFailDescription', { defaultMessage: 'Failed to installed pre-packaged rules from elastic', } ); export const RULE_PREPACKAGED_SUCCESS = i18n.translate( - 'xpack.siem.containers.detectionEngine.createPrePackagedRuleSuccesDescription', + 'xpack.securitySolution.containers.detectionEngine.createPrePackagedRuleSuccesDescription', { defaultMessage: 'Installed pre-packaged rules from elastic', } ); export const TAG_FETCH_FAILURE = i18n.translate( - 'xpack.siem.containers.detectionEngine.tagFetchFailDescription', + 'xpack.securitySolution.containers.detectionEngine.tagFetchFailDescription', { defaultMessage: 'Failed to fetch Tags', } diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/types.ts rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/types.ts diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_pre_packaged_rules.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule_status.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule_status.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule_status.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule_status.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule_status.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule_status.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rule_status.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rule_status.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rules.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rules.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rules.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rules.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rules.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rules.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_rules.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_rules.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_tags.test.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_tags.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_tags.test.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_tags.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_tags.tsx b/x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_tags.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/containers/detection_engine/rules/use_tags.tsx rename to x-pack/plugins/security_solution/public/alerts/containers/detection_engine/rules/use_tags.tsx diff --git a/x-pack/plugins/siem/public/alerts/index.ts b/x-pack/plugins/security_solution/public/alerts/index.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/index.ts rename to x-pack/plugins/security_solution/public/alerts/index.ts diff --git a/x-pack/plugins/siem/public/alerts/mitre/mitre_tactics_techniques.ts b/x-pack/plugins/security_solution/public/alerts/mitre/mitre_tactics_techniques.ts similarity index 79% rename from x-pack/plugins/siem/public/alerts/mitre/mitre_tactics_techniques.ts rename to x-pack/plugins/security_solution/public/alerts/mitre/mitre_tactics_techniques.ts index 16ab73365222b..fb8deeec8309c 100644 --- a/x-pack/plugins/siem/public/alerts/mitre/mitre_tactics_techniques.ts +++ b/x-pack/plugins/security_solution/public/alerts/mitre/mitre_tactics_techniques.ts @@ -76,9 +76,12 @@ export const tacticsOptions: MitreTacticsOptions[] = [ id: 'TA0009', name: 'Collection', reference: 'https://attack.mitre.org/tactics/TA0009', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.collectionDescription', { - defaultMessage: 'Collection (TA0009)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.collectionDescription', + { + defaultMessage: 'Collection (TA0009)', + } + ), value: 'collection', }, { @@ -86,7 +89,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [ name: 'Command and Control', reference: 'https://attack.mitre.org/tactics/TA0011', text: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTactics.commandAndControlDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.commandAndControlDescription', { defaultMessage: 'Command and Control (TA0011)' } ), value: 'commandAndControl', @@ -96,7 +99,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [ name: 'Credential Access', reference: 'https://attack.mitre.org/tactics/TA0006', text: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTactics.credentialAccessDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.credentialAccessDescription', { defaultMessage: 'Credential Access (TA0006)' } ), value: 'credentialAccess', @@ -106,7 +109,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [ name: 'Defense Evasion', reference: 'https://attack.mitre.org/tactics/TA0005', text: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTactics.defenseEvasionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.defenseEvasionDescription', { defaultMessage: 'Defense Evasion (TA0005)' } ), value: 'defenseEvasion', @@ -115,45 +118,60 @@ export const tacticsOptions: MitreTacticsOptions[] = [ id: 'TA0007', name: 'Discovery', reference: 'https://attack.mitre.org/tactics/TA0007', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.discoveryDescription', { - defaultMessage: 'Discovery (TA0007)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.discoveryDescription', + { + defaultMessage: 'Discovery (TA0007)', + } + ), value: 'discovery', }, { id: 'TA0002', name: 'Execution', reference: 'https://attack.mitre.org/tactics/TA0002', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.executionDescription', { - defaultMessage: 'Execution (TA0002)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.executionDescription', + { + defaultMessage: 'Execution (TA0002)', + } + ), value: 'execution', }, { id: 'TA0010', name: 'Exfiltration', reference: 'https://attack.mitre.org/tactics/TA0010', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.exfiltrationDescription', { - defaultMessage: 'Exfiltration (TA0010)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.exfiltrationDescription', + { + defaultMessage: 'Exfiltration (TA0010)', + } + ), value: 'exfiltration', }, { id: 'TA0040', name: 'Impact', reference: 'https://attack.mitre.org/tactics/TA0040', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.impactDescription', { - defaultMessage: 'Impact (TA0040)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.impactDescription', + { + defaultMessage: 'Impact (TA0040)', + } + ), value: 'impact', }, { id: 'TA0001', name: 'Initial Access', reference: 'https://attack.mitre.org/tactics/TA0001', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.initialAccessDescription', { - defaultMessage: 'Initial Access (TA0001)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.initialAccessDescription', + { + defaultMessage: 'Initial Access (TA0001)', + } + ), value: 'initialAccess', }, { @@ -161,7 +179,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [ name: 'Lateral Movement', reference: 'https://attack.mitre.org/tactics/TA0008', text: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTactics.lateralMovementDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.lateralMovementDescription', { defaultMessage: 'Lateral Movement (TA0008)' } ), value: 'lateralMovement', @@ -170,9 +188,12 @@ export const tacticsOptions: MitreTacticsOptions[] = [ id: 'TA0003', name: 'Persistence', reference: 'https://attack.mitre.org/tactics/TA0003', - text: i18n.translate('xpack.siem.detectionEngine.mitreAttackTactics.persistenceDescription', { - defaultMessage: 'Persistence (TA0003)', - }), + text: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.persistenceDescription', + { + defaultMessage: 'Persistence (TA0003)', + } + ), value: 'persistence', }, { @@ -180,7 +201,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [ name: 'Privilege Escalation', reference: 'https://attack.mitre.org/tactics/TA0004', text: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTactics.privilegeEscalationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.privilegeEscalationDescription', { defaultMessage: 'Privilege Escalation (TA0004)' } ), value: 'privilegeEscalation', @@ -1789,7 +1810,7 @@ export const technique = [ export const techniquesOptions: MitreTechniquesOptions[] = [ { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.bashProfileAndBashrcDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.bashProfileAndBashrcDescription', { defaultMessage: '.bash_profile and .bashrc (T1156)' } ), id: 'T1156', @@ -1800,7 +1821,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.accessTokenManipulationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.accessTokenManipulationDescription', { defaultMessage: 'Access Token Manipulation (T1134)' } ), id: 'T1134', @@ -1811,7 +1832,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.accessibilityFeaturesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.accessibilityFeaturesDescription', { defaultMessage: 'Accessibility Features (T1015)' } ), id: 'T1015', @@ -1822,7 +1843,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.accountAccessRemovalDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountAccessRemovalDescription', { defaultMessage: 'Account Access Removal (T1531)' } ), id: 'T1531', @@ -1833,7 +1854,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.accountDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountDiscoveryDescription', { defaultMessage: 'Account Discovery (T1087)' } ), id: 'T1087', @@ -1844,7 +1865,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.accountManipulationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountManipulationDescription', { defaultMessage: 'Account Manipulation (T1098)' } ), id: 'T1098', @@ -1855,7 +1876,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.appCertDlLsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.appCertDlLsDescription', { defaultMessage: 'AppCert DLLs (T1182)' } ), id: 'T1182', @@ -1866,7 +1887,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.appInitDlLsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.appInitDlLsDescription', { defaultMessage: 'AppInit DLLs (T1103)' } ), id: 'T1103', @@ -1877,7 +1898,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.appleScriptDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.appleScriptDescription', { defaultMessage: 'AppleScript (T1155)' } ), id: 'T1155', @@ -1888,7 +1909,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.applicationAccessTokenDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationAccessTokenDescription', { defaultMessage: 'Application Access Token (T1527)' } ), id: 'T1527', @@ -1899,7 +1920,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.applicationDeploymentSoftwareDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationDeploymentSoftwareDescription', { defaultMessage: 'Application Deployment Software (T1017)' } ), id: 'T1017', @@ -1910,7 +1931,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.applicationShimmingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationShimmingDescription', { defaultMessage: 'Application Shimming (T1138)' } ), id: 'T1138', @@ -1921,7 +1942,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.applicationWindowDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationWindowDiscoveryDescription', { defaultMessage: 'Application Window Discovery (T1010)' } ), id: 'T1010', @@ -1932,7 +1953,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.audioCaptureDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.audioCaptureDescription', { defaultMessage: 'Audio Capture (T1123)' } ), id: 'T1123', @@ -1943,7 +1964,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.authenticationPackageDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.authenticationPackageDescription', { defaultMessage: 'Authentication Package (T1131)' } ), id: 'T1131', @@ -1954,7 +1975,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.automatedCollectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.automatedCollectionDescription', { defaultMessage: 'Automated Collection (T1119)' } ), id: 'T1119', @@ -1965,7 +1986,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.automatedExfiltrationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.automatedExfiltrationDescription', { defaultMessage: 'Automated Exfiltration (T1020)' } ), id: 'T1020', @@ -1975,9 +1996,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'automatedExfiltration', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.bitsJobsDescription', { - defaultMessage: 'BITS Jobs (T1197)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.bitsJobsDescription', + { + defaultMessage: 'BITS Jobs (T1197)', + } + ), id: 'T1197', name: 'BITS Jobs', reference: 'https://attack.mitre.org/techniques/T1197', @@ -1986,7 +2010,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.bashHistoryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.bashHistoryDescription', { defaultMessage: 'Bash History (T1139)' } ), id: 'T1139', @@ -1997,7 +2021,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.binaryPaddingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.binaryPaddingDescription', { defaultMessage: 'Binary Padding (T1009)' } ), id: 'T1009', @@ -2007,9 +2031,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'binaryPadding', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.bootkitDescription', { - defaultMessage: 'Bootkit (T1067)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.bootkitDescription', + { + defaultMessage: 'Bootkit (T1067)', + } + ), id: 'T1067', name: 'Bootkit', reference: 'https://attack.mitre.org/techniques/T1067', @@ -2018,7 +2045,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.browserBookmarkDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.browserBookmarkDiscoveryDescription', { defaultMessage: 'Browser Bookmark Discovery (T1217)' } ), id: 'T1217', @@ -2029,7 +2056,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.browserExtensionsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.browserExtensionsDescription', { defaultMessage: 'Browser Extensions (T1176)' } ), id: 'T1176', @@ -2040,7 +2067,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.bruteForceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.bruteForceDescription', { defaultMessage: 'Brute Force (T1110)' } ), id: 'T1110', @@ -2051,7 +2078,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.bypassUserAccountControlDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.bypassUserAccountControlDescription', { defaultMessage: 'Bypass User Account Control (T1088)' } ), id: 'T1088', @@ -2061,9 +2088,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'bypassUserAccountControl', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.cmstpDescription', { - defaultMessage: 'CMSTP (T1191)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.cmstpDescription', + { + defaultMessage: 'CMSTP (T1191)', + } + ), id: 'T1191', name: 'CMSTP', reference: 'https://attack.mitre.org/techniques/T1191', @@ -2072,7 +2102,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.changeDefaultFileAssociationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.changeDefaultFileAssociationDescription', { defaultMessage: 'Change Default File Association (T1042)' } ), id: 'T1042', @@ -2083,7 +2113,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.clearCommandHistoryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.clearCommandHistoryDescription', { defaultMessage: 'Clear Command History (T1146)' } ), id: 'T1146', @@ -2094,7 +2124,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.clipboardDataDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.clipboardDataDescription', { defaultMessage: 'Clipboard Data (T1115)' } ), id: 'T1115', @@ -2105,7 +2135,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.cloudInstanceMetadataApiDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudInstanceMetadataApiDescription', { defaultMessage: 'Cloud Instance Metadata API (T1522)' } ), id: 'T1522', @@ -2116,7 +2146,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.cloudServiceDashboardDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudServiceDashboardDescription', { defaultMessage: 'Cloud Service Dashboard (T1538)' } ), id: 'T1538', @@ -2127,7 +2157,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.cloudServiceDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudServiceDiscoveryDescription', { defaultMessage: 'Cloud Service Discovery (T1526)' } ), id: 'T1526', @@ -2138,7 +2168,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.codeSigningDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.codeSigningDescription', { defaultMessage: 'Code Signing (T1116)' } ), id: 'T1116', @@ -2149,7 +2179,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.commandLineInterfaceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.commandLineInterfaceDescription', { defaultMessage: 'Command-Line Interface (T1059)' } ), id: 'T1059', @@ -2160,7 +2190,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.commonlyUsedPortDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.commonlyUsedPortDescription', { defaultMessage: 'Commonly Used Port (T1043)' } ), id: 'T1043', @@ -2171,7 +2201,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.communicationThroughRemovableMediaDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.communicationThroughRemovableMediaDescription', { defaultMessage: 'Communication Through Removable Media (T1092)' } ), id: 'T1092', @@ -2182,7 +2212,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.compileAfterDeliveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.compileAfterDeliveryDescription', { defaultMessage: 'Compile After Delivery (T1500)' } ), id: 'T1500', @@ -2193,7 +2223,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.compiledHtmlFileDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.compiledHtmlFileDescription', { defaultMessage: 'Compiled HTML File (T1223)' } ), id: 'T1223', @@ -2204,7 +2234,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.componentFirmwareDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentFirmwareDescription', { defaultMessage: 'Component Firmware (T1109)' } ), id: 'T1109', @@ -2215,7 +2245,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.componentObjectModelHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentObjectModelHijackingDescription', { defaultMessage: 'Component Object Model Hijacking (T1122)' } ), id: 'T1122', @@ -2226,7 +2256,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.componentObjectModelAndDistributedComDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentObjectModelAndDistributedComDescription', { defaultMessage: 'Component Object Model and Distributed COM (T1175)' } ), id: 'T1175', @@ -2237,7 +2267,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.connectionProxyDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.connectionProxyDescription', { defaultMessage: 'Connection Proxy (T1090)' } ), id: 'T1090', @@ -2248,7 +2278,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.controlPanelItemsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.controlPanelItemsDescription', { defaultMessage: 'Control Panel Items (T1196)' } ), id: 'T1196', @@ -2259,7 +2289,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.createAccountDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.createAccountDescription', { defaultMessage: 'Create Account (T1136)' } ), id: 'T1136', @@ -2270,7 +2300,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.credentialDumpingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialDumpingDescription', { defaultMessage: 'Credential Dumping (T1003)' } ), id: 'T1003', @@ -2281,7 +2311,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.credentialsFromWebBrowsersDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsFromWebBrowsersDescription', { defaultMessage: 'Credentials from Web Browsers (T1503)' } ), id: 'T1503', @@ -2292,7 +2322,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.credentialsInFilesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsInFilesDescription', { defaultMessage: 'Credentials in Files (T1081)' } ), id: 'T1081', @@ -2303,7 +2333,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.credentialsInRegistryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsInRegistryDescription', { defaultMessage: 'Credentials in Registry (T1214)' } ), id: 'T1214', @@ -2314,7 +2344,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.customCommandAndControlProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.customCommandAndControlProtocolDescription', { defaultMessage: 'Custom Command and Control Protocol (T1094)' } ), id: 'T1094', @@ -2325,7 +2355,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.customCryptographicProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.customCryptographicProtocolDescription', { defaultMessage: 'Custom Cryptographic Protocol (T1024)' } ), id: 'T1024', @@ -2335,9 +2365,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'customCryptographicProtocol', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.dcShadowDescription', { - defaultMessage: 'DCShadow (T1207)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dcShadowDescription', + { + defaultMessage: 'DCShadow (T1207)', + } + ), id: 'T1207', name: 'DCShadow', reference: 'https://attack.mitre.org/techniques/T1207', @@ -2346,7 +2379,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dllSearchOrderHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dllSearchOrderHijackingDescription', { defaultMessage: 'DLL Search Order Hijacking (T1038)' } ), id: 'T1038', @@ -2357,7 +2390,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dllSideLoadingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dllSideLoadingDescription', { defaultMessage: 'DLL Side-Loading (T1073)' } ), id: 'T1073', @@ -2368,7 +2401,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataCompressedDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataCompressedDescription', { defaultMessage: 'Data Compressed (T1002)' } ), id: 'T1002', @@ -2379,7 +2412,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataDestructionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataDestructionDescription', { defaultMessage: 'Data Destruction (T1485)' } ), id: 'T1485', @@ -2390,7 +2423,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataEncodingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncodingDescription', { defaultMessage: 'Data Encoding (T1132)' } ), id: 'T1132', @@ -2401,7 +2434,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataEncryptedDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncryptedDescription', { defaultMessage: 'Data Encrypted (T1022)' } ), id: 'T1022', @@ -2412,7 +2445,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataEncryptedForImpactDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncryptedForImpactDescription', { defaultMessage: 'Data Encrypted for Impact (T1486)' } ), id: 'T1486', @@ -2423,7 +2456,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataObfuscationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataObfuscationDescription', { defaultMessage: 'Data Obfuscation (T1001)' } ), id: 'T1001', @@ -2434,7 +2467,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataStagedDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataStagedDescription', { defaultMessage: 'Data Staged (T1074)' } ), id: 'T1074', @@ -2445,7 +2478,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataTransferSizeLimitsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataTransferSizeLimitsDescription', { defaultMessage: 'Data Transfer Size Limits (T1030)' } ), id: 'T1030', @@ -2456,7 +2489,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataFromCloudStorageObjectDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromCloudStorageObjectDescription', { defaultMessage: 'Data from Cloud Storage Object (T1530)' } ), id: 'T1530', @@ -2467,7 +2500,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataFromInformationRepositoriesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromInformationRepositoriesDescription', { defaultMessage: 'Data from Information Repositories (T1213)' } ), id: 'T1213', @@ -2478,7 +2511,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataFromLocalSystemDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromLocalSystemDescription', { defaultMessage: 'Data from Local System (T1005)' } ), id: 'T1005', @@ -2489,7 +2522,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataFromNetworkSharedDriveDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromNetworkSharedDriveDescription', { defaultMessage: 'Data from Network Shared Drive (T1039)' } ), id: 'T1039', @@ -2500,7 +2533,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dataFromRemovableMediaDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromRemovableMediaDescription', { defaultMessage: 'Data from Removable Media (T1025)' } ), id: 'T1025', @@ -2511,7 +2544,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.defacementDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.defacementDescription', { defaultMessage: 'Defacement (T1491)' } ), id: 'T1491', @@ -2522,7 +2555,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.deobfuscateDecodeFilesOrInformationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.deobfuscateDecodeFilesOrInformationDescription', { defaultMessage: 'Deobfuscate/Decode Files or Information (T1140)' } ), id: 'T1140', @@ -2533,7 +2566,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.disablingSecurityToolsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.disablingSecurityToolsDescription', { defaultMessage: 'Disabling Security Tools (T1089)' } ), id: 'T1089', @@ -2544,7 +2577,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.diskContentWipeDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.diskContentWipeDescription', { defaultMessage: 'Disk Content Wipe (T1488)' } ), id: 'T1488', @@ -2555,7 +2588,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.diskStructureWipeDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.diskStructureWipeDescription', { defaultMessage: 'Disk Structure Wipe (T1487)' } ), id: 'T1487', @@ -2566,7 +2599,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.domainFrontingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainFrontingDescription', { defaultMessage: 'Domain Fronting (T1172)' } ), id: 'T1172', @@ -2577,7 +2610,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.domainGenerationAlgorithmsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainGenerationAlgorithmsDescription', { defaultMessage: 'Domain Generation Algorithms (T1483)' } ), id: 'T1483', @@ -2588,7 +2621,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.domainTrustDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainTrustDiscoveryDescription', { defaultMessage: 'Domain Trust Discovery (T1482)' } ), id: 'T1482', @@ -2599,7 +2632,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.driveByCompromiseDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.driveByCompromiseDescription', { defaultMessage: 'Drive-by Compromise (T1189)' } ), id: 'T1189', @@ -2610,7 +2643,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dylibHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dylibHijackingDescription', { defaultMessage: 'Dylib Hijacking (T1157)' } ), id: 'T1157', @@ -2621,7 +2654,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.dynamicDataExchangeDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.dynamicDataExchangeDescription', { defaultMessage: 'Dynamic Data Exchange (T1173)' } ), id: 'T1173', @@ -2632,7 +2665,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.elevatedExecutionWithPromptDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.elevatedExecutionWithPromptDescription', { defaultMessage: 'Elevated Execution with Prompt (T1514)' } ), id: 'T1514', @@ -2643,7 +2676,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.emailCollectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.emailCollectionDescription', { defaultMessage: 'Email Collection (T1114)' } ), id: 'T1114', @@ -2653,9 +2686,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'emailCollection', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.emondDescription', { - defaultMessage: 'Emond (T1519)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.emondDescription', + { + defaultMessage: 'Emond (T1519)', + } + ), id: 'T1519', name: 'Emond', reference: 'https://attack.mitre.org/techniques/T1519', @@ -2664,7 +2700,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.endpointDenialOfServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.endpointDenialOfServiceDescription', { defaultMessage: 'Endpoint Denial of Service (T1499)' } ), id: 'T1499', @@ -2675,7 +2711,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.executionGuardrailsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionGuardrailsDescription', { defaultMessage: 'Execution Guardrails (T1480)' } ), id: 'T1480', @@ -2686,7 +2722,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.executionThroughApiDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionThroughApiDescription', { defaultMessage: 'Execution through API (T1106)' } ), id: 'T1106', @@ -2697,7 +2733,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.executionThroughModuleLoadDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionThroughModuleLoadDescription', { defaultMessage: 'Execution through Module Load (T1129)' } ), id: 'T1129', @@ -2708,7 +2744,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverAlternativeProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverAlternativeProtocolDescription', { defaultMessage: 'Exfiltration Over Alternative Protocol (T1048)' } ), id: 'T1048', @@ -2719,7 +2755,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverCommandAndControlChannelDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverCommandAndControlChannelDescription', { defaultMessage: 'Exfiltration Over Command and Control Channel (T1041)' } ), id: 'T1041', @@ -2730,7 +2766,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverOtherNetworkMediumDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverOtherNetworkMediumDescription', { defaultMessage: 'Exfiltration Over Other Network Medium (T1011)' } ), id: 'T1011', @@ -2741,7 +2777,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverPhysicalMediumDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverPhysicalMediumDescription', { defaultMessage: 'Exfiltration Over Physical Medium (T1052)' } ), id: 'T1052', @@ -2752,7 +2788,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exploitPublicFacingApplicationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitPublicFacingApplicationDescription', { defaultMessage: 'Exploit Public-Facing Application (T1190)' } ), id: 'T1190', @@ -2763,7 +2799,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForClientExecutionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForClientExecutionDescription', { defaultMessage: 'Exploitation for Client Execution (T1203)' } ), id: 'T1203', @@ -2774,7 +2810,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForCredentialAccessDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForCredentialAccessDescription', { defaultMessage: 'Exploitation for Credential Access (T1212)' } ), id: 'T1212', @@ -2785,7 +2821,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForDefenseEvasionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForDefenseEvasionDescription', { defaultMessage: 'Exploitation for Defense Evasion (T1211)' } ), id: 'T1211', @@ -2796,7 +2832,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForPrivilegeEscalationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForPrivilegeEscalationDescription', { defaultMessage: 'Exploitation for Privilege Escalation (T1068)' } ), id: 'T1068', @@ -2807,7 +2843,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.exploitationOfRemoteServicesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationOfRemoteServicesDescription', { defaultMessage: 'Exploitation of Remote Services (T1210)' } ), id: 'T1210', @@ -2818,7 +2854,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.externalRemoteServicesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.externalRemoteServicesDescription', { defaultMessage: 'External Remote Services (T1133)' } ), id: 'T1133', @@ -2829,7 +2865,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.extraWindowMemoryInjectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.extraWindowMemoryInjectionDescription', { defaultMessage: 'Extra Window Memory Injection (T1181)' } ), id: 'T1181', @@ -2840,7 +2876,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.fallbackChannelsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.fallbackChannelsDescription', { defaultMessage: 'Fallback Channels (T1008)' } ), id: 'T1008', @@ -2851,7 +2887,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.fileDeletionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileDeletionDescription', { defaultMessage: 'File Deletion (T1107)' } ), id: 'T1107', @@ -2862,7 +2898,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.fileSystemLogicalOffsetsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileSystemLogicalOffsetsDescription', { defaultMessage: 'File System Logical Offsets (T1006)' } ), id: 'T1006', @@ -2873,7 +2909,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.fileSystemPermissionsWeaknessDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileSystemPermissionsWeaknessDescription', { defaultMessage: 'File System Permissions Weakness (T1044)' } ), id: 'T1044', @@ -2884,7 +2920,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.fileAndDirectoryDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileAndDirectoryDiscoveryDescription', { defaultMessage: 'File and Directory Discovery (T1083)' } ), id: 'T1083', @@ -2895,7 +2931,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.fileAndDirectoryPermissionsModificationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileAndDirectoryPermissionsModificationDescription', { defaultMessage: 'File and Directory Permissions Modification (T1222)' } ), id: 'T1222', @@ -2906,7 +2942,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.firmwareCorruptionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.firmwareCorruptionDescription', { defaultMessage: 'Firmware Corruption (T1495)' } ), id: 'T1495', @@ -2917,7 +2953,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.forcedAuthenticationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.forcedAuthenticationDescription', { defaultMessage: 'Forced Authentication (T1187)' } ), id: 'T1187', @@ -2928,7 +2964,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.gatekeeperBypassDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.gatekeeperBypassDescription', { defaultMessage: 'Gatekeeper Bypass (T1144)' } ), id: 'T1144', @@ -2939,7 +2975,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.graphicalUserInterfaceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.graphicalUserInterfaceDescription', { defaultMessage: 'Graphical User Interface (T1061)' } ), id: 'T1061', @@ -2950,7 +2986,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.groupPolicyModificationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.groupPolicyModificationDescription', { defaultMessage: 'Group Policy Modification (T1484)' } ), id: 'T1484', @@ -2961,7 +2997,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.histcontrolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.histcontrolDescription', { defaultMessage: 'HISTCONTROL (T1148)' } ), id: 'T1148', @@ -2972,7 +3008,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.hardwareAdditionsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.hardwareAdditionsDescription', { defaultMessage: 'Hardware Additions (T1200)' } ), id: 'T1200', @@ -2983,7 +3019,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.hiddenFilesAndDirectoriesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenFilesAndDirectoriesDescription', { defaultMessage: 'Hidden Files and Directories (T1158)' } ), id: 'T1158', @@ -2994,7 +3030,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.hiddenUsersDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenUsersDescription', { defaultMessage: 'Hidden Users (T1147)' } ), id: 'T1147', @@ -3005,7 +3041,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.hiddenWindowDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenWindowDescription', { defaultMessage: 'Hidden Window (T1143)' } ), id: 'T1143', @@ -3015,9 +3051,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'hiddenWindow', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.hookingDescription', { - defaultMessage: 'Hooking (T1179)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.hookingDescription', + { + defaultMessage: 'Hooking (T1179)', + } + ), id: 'T1179', name: 'Hooking', reference: 'https://attack.mitre.org/techniques/T1179', @@ -3026,7 +3065,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.hypervisorDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.hypervisorDescription', { defaultMessage: 'Hypervisor (T1062)' } ), id: 'T1062', @@ -3037,7 +3076,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.imageFileExecutionOptionsInjectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.imageFileExecutionOptionsInjectionDescription', { defaultMessage: 'Image File Execution Options Injection (T1183)' } ), id: 'T1183', @@ -3048,7 +3087,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.implantContainerImageDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.implantContainerImageDescription', { defaultMessage: 'Implant Container Image (T1525)' } ), id: 'T1525', @@ -3059,7 +3098,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.indicatorBlockingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorBlockingDescription', { defaultMessage: 'Indicator Blocking (T1054)' } ), id: 'T1054', @@ -3070,7 +3109,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.indicatorRemovalFromToolsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorRemovalFromToolsDescription', { defaultMessage: 'Indicator Removal from Tools (T1066)' } ), id: 'T1066', @@ -3081,7 +3120,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.indicatorRemovalOnHostDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorRemovalOnHostDescription', { defaultMessage: 'Indicator Removal on Host (T1070)' } ), id: 'T1070', @@ -3092,7 +3131,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.indirectCommandExecutionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.indirectCommandExecutionDescription', { defaultMessage: 'Indirect Command Execution (T1202)' } ), id: 'T1202', @@ -3103,7 +3142,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.inhibitSystemRecoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.inhibitSystemRecoveryDescription', { defaultMessage: 'Inhibit System Recovery (T1490)' } ), id: 'T1490', @@ -3114,7 +3153,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.inputCaptureDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.inputCaptureDescription', { defaultMessage: 'Input Capture (T1056)' } ), id: 'T1056', @@ -3125,7 +3164,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.inputPromptDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.inputPromptDescription', { defaultMessage: 'Input Prompt (T1141)' } ), id: 'T1141', @@ -3136,7 +3175,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.installRootCertificateDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.installRootCertificateDescription', { defaultMessage: 'Install Root Certificate (T1130)' } ), id: 'T1130', @@ -3147,7 +3186,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.installUtilDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.installUtilDescription', { defaultMessage: 'InstallUtil (T1118)' } ), id: 'T1118', @@ -3158,7 +3197,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.internalSpearphishingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.internalSpearphishingDescription', { defaultMessage: 'Internal Spearphishing (T1534)' } ), id: 'T1534', @@ -3169,7 +3208,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.kerberoastingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.kerberoastingDescription', { defaultMessage: 'Kerberoasting (T1208)' } ), id: 'T1208', @@ -3180,7 +3219,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.kernelModulesAndExtensionsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.kernelModulesAndExtensionsDescription', { defaultMessage: 'Kernel Modules and Extensions (T1215)' } ), id: 'T1215', @@ -3190,9 +3229,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'kernelModulesAndExtensions', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.keychainDescription', { - defaultMessage: 'Keychain (T1142)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.keychainDescription', + { + defaultMessage: 'Keychain (T1142)', + } + ), id: 'T1142', name: 'Keychain', reference: 'https://attack.mitre.org/techniques/T1142', @@ -3201,7 +3243,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.lcLoadDylibAdditionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.lcLoadDylibAdditionDescription', { defaultMessage: 'LC_LOAD_DYLIB Addition (T1161)' } ), id: 'T1161', @@ -3212,7 +3254,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.lcMainHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.lcMainHijackingDescription', { defaultMessage: 'LC_MAIN Hijacking (T1149)' } ), id: 'T1149', @@ -3223,7 +3265,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.llmnrNbtNsPoisoningAndRelayDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.llmnrNbtNsPoisoningAndRelayDescription', { defaultMessage: 'LLMNR/NBT-NS Poisoning and Relay (T1171)' } ), id: 'T1171', @@ -3234,7 +3276,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.lsassDriverDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.lsassDriverDescription', { defaultMessage: 'LSASS Driver (T1177)' } ), id: 'T1177', @@ -3245,7 +3287,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.launchAgentDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchAgentDescription', { defaultMessage: 'Launch Agent (T1159)' } ), id: 'T1159', @@ -3256,7 +3298,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.launchDaemonDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchDaemonDescription', { defaultMessage: 'Launch Daemon (T1160)' } ), id: 'T1160', @@ -3266,9 +3308,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'launchDaemon', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.launchctlDescription', { - defaultMessage: 'Launchctl (T1152)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchctlDescription', + { + defaultMessage: 'Launchctl (T1152)', + } + ), id: 'T1152', name: 'Launchctl', reference: 'https://attack.mitre.org/techniques/T1152', @@ -3277,7 +3322,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.localJobSchedulingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.localJobSchedulingDescription', { defaultMessage: 'Local Job Scheduling (T1168)' } ), id: 'T1168', @@ -3287,9 +3332,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'localJobScheduling', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.loginItemDescription', { - defaultMessage: 'Login Item (T1162)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.loginItemDescription', + { + defaultMessage: 'Login Item (T1162)', + } + ), id: 'T1162', name: 'Login Item', reference: 'https://attack.mitre.org/techniques/T1162', @@ -3298,7 +3346,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.logonScriptsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.logonScriptsDescription', { defaultMessage: 'Logon Scripts (T1037)' } ), id: 'T1037', @@ -3309,7 +3357,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.manInTheBrowserDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.manInTheBrowserDescription', { defaultMessage: 'Man in the Browser (T1185)' } ), id: 'T1185', @@ -3320,7 +3368,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.masqueradingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.masqueradingDescription', { defaultMessage: 'Masquerading (T1036)' } ), id: 'T1036', @@ -3331,7 +3379,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.modifyExistingServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.modifyExistingServiceDescription', { defaultMessage: 'Modify Existing Service (T1031)' } ), id: 'T1031', @@ -3342,7 +3390,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.modifyRegistryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.modifyRegistryDescription', { defaultMessage: 'Modify Registry (T1112)' } ), id: 'T1112', @@ -3352,9 +3400,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'modifyRegistry', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.mshtaDescription', { - defaultMessage: 'Mshta (T1170)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.mshtaDescription', + { + defaultMessage: 'Mshta (T1170)', + } + ), id: 'T1170', name: 'Mshta', reference: 'https://attack.mitre.org/techniques/T1170', @@ -3363,7 +3414,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.multiStageChannelsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.multiStageChannelsDescription', { defaultMessage: 'Multi-Stage Channels (T1104)' } ), id: 'T1104', @@ -3374,7 +3425,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.multiHopProxyDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.multiHopProxyDescription', { defaultMessage: 'Multi-hop Proxy (T1188)' } ), id: 'T1188', @@ -3385,7 +3436,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.multibandCommunicationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.multibandCommunicationDescription', { defaultMessage: 'Multiband Communication (T1026)' } ), id: 'T1026', @@ -3396,7 +3447,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.multilayerEncryptionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.multilayerEncryptionDescription', { defaultMessage: 'Multilayer Encryption (T1079)' } ), id: 'T1079', @@ -3407,7 +3458,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.ntfsFileAttributesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.ntfsFileAttributesDescription', { defaultMessage: 'NTFS File Attributes (T1096)' } ), id: 'T1096', @@ -3418,7 +3469,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.netshHelperDllDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.netshHelperDllDescription', { defaultMessage: 'Netsh Helper DLL (T1128)' } ), id: 'T1128', @@ -3429,7 +3480,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.networkDenialOfServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkDenialOfServiceDescription', { defaultMessage: 'Network Denial of Service (T1498)' } ), id: 'T1498', @@ -3440,7 +3491,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.networkServiceScanningDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkServiceScanningDescription', { defaultMessage: 'Network Service Scanning (T1046)' } ), id: 'T1046', @@ -3451,7 +3502,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.networkShareConnectionRemovalDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkShareConnectionRemovalDescription', { defaultMessage: 'Network Share Connection Removal (T1126)' } ), id: 'T1126', @@ -3462,7 +3513,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.networkShareDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkShareDiscoveryDescription', { defaultMessage: 'Network Share Discovery (T1135)' } ), id: 'T1135', @@ -3473,7 +3524,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.networkSniffingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkSniffingDescription', { defaultMessage: 'Network Sniffing (T1040)' } ), id: 'T1040', @@ -3484,7 +3535,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.newServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.newServiceDescription', { defaultMessage: 'New Service (T1050)' } ), id: 'T1050', @@ -3495,7 +3546,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.obfuscatedFilesOrInformationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.obfuscatedFilesOrInformationDescription', { defaultMessage: 'Obfuscated Files or Information (T1027)' } ), id: 'T1027', @@ -3506,7 +3557,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.officeApplicationStartupDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.officeApplicationStartupDescription', { defaultMessage: 'Office Application Startup (T1137)' } ), id: 'T1137', @@ -3517,7 +3568,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.parentPidSpoofingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.parentPidSpoofingDescription', { defaultMessage: 'Parent PID Spoofing (T1502)' } ), id: 'T1502', @@ -3528,7 +3579,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.passTheHashDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.passTheHashDescription', { defaultMessage: 'Pass the Hash (T1075)' } ), id: 'T1075', @@ -3539,7 +3590,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.passTheTicketDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.passTheTicketDescription', { defaultMessage: 'Pass the Ticket (T1097)' } ), id: 'T1097', @@ -3550,7 +3601,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.passwordFilterDllDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.passwordFilterDllDescription', { defaultMessage: 'Password Filter DLL (T1174)' } ), id: 'T1174', @@ -3561,7 +3612,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.passwordPolicyDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.passwordPolicyDiscoveryDescription', { defaultMessage: 'Password Policy Discovery (T1201)' } ), id: 'T1201', @@ -3572,7 +3623,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.pathInterceptionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.pathInterceptionDescription', { defaultMessage: 'Path Interception (T1034)' } ), id: 'T1034', @@ -3583,7 +3634,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.peripheralDeviceDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.peripheralDeviceDiscoveryDescription', { defaultMessage: 'Peripheral Device Discovery (T1120)' } ), id: 'T1120', @@ -3594,7 +3645,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.permissionGroupsDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.permissionGroupsDiscoveryDescription', { defaultMessage: 'Permission Groups Discovery (T1069)' } ), id: 'T1069', @@ -3605,7 +3656,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.plistModificationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.plistModificationDescription', { defaultMessage: 'Plist Modification (T1150)' } ), id: 'T1150', @@ -3616,7 +3667,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.portKnockingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.portKnockingDescription', { defaultMessage: 'Port Knocking (T1205)' } ), id: 'T1205', @@ -3627,7 +3678,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.portMonitorsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.portMonitorsDescription', { defaultMessage: 'Port Monitors (T1013)' } ), id: 'T1013', @@ -3638,7 +3689,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.powerShellDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.powerShellDescription', { defaultMessage: 'PowerShell (T1086)' } ), id: 'T1086', @@ -3649,7 +3700,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.powerShellProfileDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.powerShellProfileDescription', { defaultMessage: 'PowerShell Profile (T1504)' } ), id: 'T1504', @@ -3660,7 +3711,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.privateKeysDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.privateKeysDescription', { defaultMessage: 'Private Keys (T1145)' } ), id: 'T1145', @@ -3671,7 +3722,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.processDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.processDiscoveryDescription', { defaultMessage: 'Process Discovery (T1057)' } ), id: 'T1057', @@ -3682,7 +3733,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.processDoppelgangingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.processDoppelgangingDescription', { defaultMessage: 'Process Doppelgänging (T1186)' } ), id: 'T1186', @@ -3693,7 +3744,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.processHollowingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.processHollowingDescription', { defaultMessage: 'Process Hollowing (T1093)' } ), id: 'T1093', @@ -3704,7 +3755,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.processInjectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.processInjectionDescription', { defaultMessage: 'Process Injection (T1055)' } ), id: 'T1055', @@ -3715,7 +3766,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.queryRegistryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.queryRegistryDescription', { defaultMessage: 'Query Registry (T1012)' } ), id: 'T1012', @@ -3725,9 +3776,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'queryRegistry', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.rcCommonDescription', { - defaultMessage: 'Rc.common (T1163)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.rcCommonDescription', + { + defaultMessage: 'Rc.common (T1163)', + } + ), id: 'T1163', name: 'Rc.common', reference: 'https://attack.mitre.org/techniques/T1163', @@ -3736,7 +3790,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.reOpenedApplicationsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.reOpenedApplicationsDescription', { defaultMessage: 'Re-opened Applications (T1164)' } ), id: 'T1164', @@ -3747,7 +3801,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.redundantAccessDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.redundantAccessDescription', { defaultMessage: 'Redundant Access (T1108)' } ), id: 'T1108', @@ -3758,7 +3812,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.registryRunKeysStartupFolderDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.registryRunKeysStartupFolderDescription', { defaultMessage: 'Registry Run Keys / Startup Folder (T1060)' } ), id: 'T1060', @@ -3769,7 +3823,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.regsvcsRegasmDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.regsvcsRegasmDescription', { defaultMessage: 'Regsvcs/Regasm (T1121)' } ), id: 'T1121', @@ -3779,9 +3833,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'regsvcsRegasm', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.regsvr32Description', { - defaultMessage: 'Regsvr32 (T1117)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.regsvr32Description', + { + defaultMessage: 'Regsvr32 (T1117)', + } + ), id: 'T1117', name: 'Regsvr32', reference: 'https://attack.mitre.org/techniques/T1117', @@ -3790,7 +3847,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.remoteAccessToolsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteAccessToolsDescription', { defaultMessage: 'Remote Access Tools (T1219)' } ), id: 'T1219', @@ -3801,7 +3858,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.remoteDesktopProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteDesktopProtocolDescription', { defaultMessage: 'Remote Desktop Protocol (T1076)' } ), id: 'T1076', @@ -3812,7 +3869,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.remoteFileCopyDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteFileCopyDescription', { defaultMessage: 'Remote File Copy (T1105)' } ), id: 'T1105', @@ -3823,7 +3880,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.remoteServicesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteServicesDescription', { defaultMessage: 'Remote Services (T1021)' } ), id: 'T1021', @@ -3834,7 +3891,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.remoteSystemDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteSystemDiscoveryDescription', { defaultMessage: 'Remote System Discovery (T1018)' } ), id: 'T1018', @@ -3845,7 +3902,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.replicationThroughRemovableMediaDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.replicationThroughRemovableMediaDescription', { defaultMessage: 'Replication Through Removable Media (T1091)' } ), id: 'T1091', @@ -3856,7 +3913,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.resourceHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.resourceHijackingDescription', { defaultMessage: 'Resource Hijacking (T1496)' } ), id: 'T1496', @@ -3867,7 +3924,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.revertCloudInstanceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.revertCloudInstanceDescription', { defaultMessage: 'Revert Cloud Instance (T1536)' } ), id: 'T1536', @@ -3877,9 +3934,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'revertCloudInstance', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.rootkitDescription', { - defaultMessage: 'Rootkit (T1014)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.rootkitDescription', + { + defaultMessage: 'Rootkit (T1014)', + } + ), id: 'T1014', name: 'Rootkit', reference: 'https://attack.mitre.org/techniques/T1014', @@ -3887,9 +3947,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'rootkit', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.rundll32Description', { - defaultMessage: 'Rundll32 (T1085)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.rundll32Description', + { + defaultMessage: 'Rundll32 (T1085)', + } + ), id: 'T1085', name: 'Rundll32', reference: 'https://attack.mitre.org/techniques/T1085', @@ -3898,7 +3961,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.runtimeDataManipulationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.runtimeDataManipulationDescription', { defaultMessage: 'Runtime Data Manipulation (T1494)' } ), id: 'T1494', @@ -3909,7 +3972,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.sidHistoryInjectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sidHistoryInjectionDescription', { defaultMessage: 'SID-History Injection (T1178)' } ), id: 'T1178', @@ -3920,7 +3983,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.sipAndTrustProviderHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sipAndTrustProviderHijackingDescription', { defaultMessage: 'SIP and Trust Provider Hijacking (T1198)' } ), id: 'T1198', @@ -3931,7 +3994,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.sshHijackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sshHijackingDescription', { defaultMessage: 'SSH Hijacking (T1184)' } ), id: 'T1184', @@ -3942,7 +4005,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.scheduledTaskDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.scheduledTaskDescription', { defaultMessage: 'Scheduled Task (T1053)' } ), id: 'T1053', @@ -3953,7 +4016,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.scheduledTransferDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.scheduledTransferDescription', { defaultMessage: 'Scheduled Transfer (T1029)' } ), id: 'T1029', @@ -3964,7 +4027,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.screenCaptureDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.screenCaptureDescription', { defaultMessage: 'Screen Capture (T1113)' } ), id: 'T1113', @@ -3975,7 +4038,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.screensaverDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.screensaverDescription', { defaultMessage: 'Screensaver (T1180)' } ), id: 'T1180', @@ -3985,9 +4048,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'screensaver', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.scriptingDescription', { - defaultMessage: 'Scripting (T1064)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.scriptingDescription', + { + defaultMessage: 'Scripting (T1064)', + } + ), id: 'T1064', name: 'Scripting', reference: 'https://attack.mitre.org/techniques/T1064', @@ -3996,7 +4062,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.securitySoftwareDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitySoftwareDiscoveryDescription', { defaultMessage: 'Security Software Discovery (T1063)' } ), id: 'T1063', @@ -4007,7 +4073,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.securitySupportProviderDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitySupportProviderDescription', { defaultMessage: 'Security Support Provider (T1101)' } ), id: 'T1101', @@ -4018,7 +4084,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.securitydMemoryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitydMemoryDescription', { defaultMessage: 'Securityd Memory (T1167)' } ), id: 'T1167', @@ -4029,7 +4095,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.serverSoftwareComponentDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.serverSoftwareComponentDescription', { defaultMessage: 'Server Software Component (T1505)' } ), id: 'T1505', @@ -4040,7 +4106,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.serviceExecutionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceExecutionDescription', { defaultMessage: 'Service Execution (T1035)' } ), id: 'T1035', @@ -4051,7 +4117,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.serviceRegistryPermissionsWeaknessDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceRegistryPermissionsWeaknessDescription', { defaultMessage: 'Service Registry Permissions Weakness (T1058)' } ), id: 'T1058', @@ -4062,7 +4128,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.serviceStopDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceStopDescription', { defaultMessage: 'Service Stop (T1489)' } ), id: 'T1489', @@ -4073,7 +4139,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.setuidAndSetgidDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.setuidAndSetgidDescription', { defaultMessage: 'Setuid and Setgid (T1166)' } ), id: 'T1166', @@ -4084,7 +4150,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.sharedWebrootDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sharedWebrootDescription', { defaultMessage: 'Shared Webroot (T1051)' } ), id: 'T1051', @@ -4095,7 +4161,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.shortcutModificationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.shortcutModificationDescription', { defaultMessage: 'Shortcut Modification (T1023)' } ), id: 'T1023', @@ -4106,7 +4172,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.signedBinaryProxyExecutionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.signedBinaryProxyExecutionDescription', { defaultMessage: 'Signed Binary Proxy Execution (T1218)' } ), id: 'T1218', @@ -4117,7 +4183,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.signedScriptProxyExecutionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.signedScriptProxyExecutionDescription', { defaultMessage: 'Signed Script Proxy Execution (T1216)' } ), id: 'T1216', @@ -4128,7 +4194,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.softwareDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.softwareDiscoveryDescription', { defaultMessage: 'Software Discovery (T1518)' } ), id: 'T1518', @@ -4139,7 +4205,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.softwarePackingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.softwarePackingDescription', { defaultMessage: 'Software Packing (T1045)' } ), id: 'T1045', @@ -4149,9 +4215,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'softwarePacking', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.sourceDescription', { - defaultMessage: 'Source (T1153)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sourceDescription', + { + defaultMessage: 'Source (T1153)', + } + ), id: 'T1153', name: 'Source', reference: 'https://attack.mitre.org/techniques/T1153', @@ -4160,7 +4229,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.spaceAfterFilenameDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.spaceAfterFilenameDescription', { defaultMessage: 'Space after Filename (T1151)' } ), id: 'T1151', @@ -4171,7 +4240,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingAttachmentDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingAttachmentDescription', { defaultMessage: 'Spearphishing Attachment (T1193)' } ), id: 'T1193', @@ -4182,7 +4251,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingLinkDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingLinkDescription', { defaultMessage: 'Spearphishing Link (T1192)' } ), id: 'T1192', @@ -4193,7 +4262,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingViaServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingViaServiceDescription', { defaultMessage: 'Spearphishing via Service (T1194)' } ), id: 'T1194', @@ -4204,7 +4273,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.standardApplicationLayerProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardApplicationLayerProtocolDescription', { defaultMessage: 'Standard Application Layer Protocol (T1071)' } ), id: 'T1071', @@ -4215,7 +4284,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.standardCryptographicProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardCryptographicProtocolDescription', { defaultMessage: 'Standard Cryptographic Protocol (T1032)' } ), id: 'T1032', @@ -4226,7 +4295,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.standardNonApplicationLayerProtocolDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardNonApplicationLayerProtocolDescription', { defaultMessage: 'Standard Non-Application Layer Protocol (T1095)' } ), id: 'T1095', @@ -4237,7 +4306,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.startupItemsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.startupItemsDescription', { defaultMessage: 'Startup Items (T1165)' } ), id: 'T1165', @@ -4248,7 +4317,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.stealApplicationAccessTokenDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.stealApplicationAccessTokenDescription', { defaultMessage: 'Steal Application Access Token (T1528)' } ), id: 'T1528', @@ -4259,7 +4328,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.stealWebSessionCookieDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.stealWebSessionCookieDescription', { defaultMessage: 'Steal Web Session Cookie (T1539)' } ), id: 'T1539', @@ -4270,7 +4339,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.storedDataManipulationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.storedDataManipulationDescription', { defaultMessage: 'Stored Data Manipulation (T1492)' } ), id: 'T1492', @@ -4280,9 +4349,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'storedDataManipulation', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.sudoDescription', { - defaultMessage: 'Sudo (T1169)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sudoDescription', + { + defaultMessage: 'Sudo (T1169)', + } + ), id: 'T1169', name: 'Sudo', reference: 'https://attack.mitre.org/techniques/T1169', @@ -4291,7 +4363,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.sudoCachingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.sudoCachingDescription', { defaultMessage: 'Sudo Caching (T1206)' } ), id: 'T1206', @@ -4302,7 +4374,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.supplyChainCompromiseDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.supplyChainCompromiseDescription', { defaultMessage: 'Supply Chain Compromise (T1195)' } ), id: 'T1195', @@ -4313,7 +4385,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemFirmwareDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemFirmwareDescription', { defaultMessage: 'System Firmware (T1019)' } ), id: 'T1019', @@ -4324,7 +4396,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemInformationDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemInformationDiscoveryDescription', { defaultMessage: 'System Information Discovery (T1082)' } ), id: 'T1082', @@ -4335,7 +4407,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemNetworkConfigurationDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemNetworkConfigurationDiscoveryDescription', { defaultMessage: 'System Network Configuration Discovery (T1016)' } ), id: 'T1016', @@ -4346,7 +4418,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemNetworkConnectionsDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemNetworkConnectionsDiscoveryDescription', { defaultMessage: 'System Network Connections Discovery (T1049)' } ), id: 'T1049', @@ -4357,7 +4429,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemOwnerUserDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemOwnerUserDiscoveryDescription', { defaultMessage: 'System Owner/User Discovery (T1033)' } ), id: 'T1033', @@ -4368,7 +4440,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemServiceDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemServiceDiscoveryDescription', { defaultMessage: 'System Service Discovery (T1007)' } ), id: 'T1007', @@ -4379,7 +4451,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemShutdownRebootDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemShutdownRebootDescription', { defaultMessage: 'System Shutdown/Reboot (T1529)' } ), id: 'T1529', @@ -4390,7 +4462,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemTimeDiscoveryDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemTimeDiscoveryDescription', { defaultMessage: 'System Time Discovery (T1124)' } ), id: 'T1124', @@ -4401,7 +4473,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.systemdServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemdServiceDescription', { defaultMessage: 'Systemd Service (T1501)' } ), id: 'T1501', @@ -4412,7 +4484,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.taintSharedContentDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.taintSharedContentDescription', { defaultMessage: 'Taint Shared Content (T1080)' } ), id: 'T1080', @@ -4423,7 +4495,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.templateInjectionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.templateInjectionDescription', { defaultMessage: 'Template Injection (T1221)' } ), id: 'T1221', @@ -4434,7 +4506,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.thirdPartySoftwareDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.thirdPartySoftwareDescription', { defaultMessage: 'Third-party Software (T1072)' } ), id: 'T1072', @@ -4445,7 +4517,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.timeProvidersDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.timeProvidersDescription', { defaultMessage: 'Time Providers (T1209)' } ), id: 'T1209', @@ -4455,9 +4527,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'timeProviders', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.timestompDescription', { - defaultMessage: 'Timestomp (T1099)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.timestompDescription', + { + defaultMessage: 'Timestomp (T1099)', + } + ), id: 'T1099', name: 'Timestomp', reference: 'https://attack.mitre.org/techniques/T1099', @@ -4466,7 +4541,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.transferDataToCloudAccountDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.transferDataToCloudAccountDescription', { defaultMessage: 'Transfer Data to Cloud Account (T1537)' } ), id: 'T1537', @@ -4477,7 +4552,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.transmittedDataManipulationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.transmittedDataManipulationDescription', { defaultMessage: 'Transmitted Data Manipulation (T1493)' } ), id: 'T1493', @@ -4487,9 +4562,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'transmittedDataManipulation', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.trapDescription', { - defaultMessage: 'Trap (T1154)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.trapDescription', + { + defaultMessage: 'Trap (T1154)', + } + ), id: 'T1154', name: 'Trap', reference: 'https://attack.mitre.org/techniques/T1154', @@ -4498,7 +4576,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.trustedDeveloperUtilitiesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.trustedDeveloperUtilitiesDescription', { defaultMessage: 'Trusted Developer Utilities (T1127)' } ), id: 'T1127', @@ -4509,7 +4587,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.trustedRelationshipDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.trustedRelationshipDescription', { defaultMessage: 'Trusted Relationship (T1199)' } ), id: 'T1199', @@ -4520,7 +4598,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.twoFactorAuthenticationInterceptionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.twoFactorAuthenticationInterceptionDescription', { defaultMessage: 'Two-Factor Authentication Interception (T1111)' } ), id: 'T1111', @@ -4531,7 +4609,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.uncommonlyUsedPortDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.uncommonlyUsedPortDescription', { defaultMessage: 'Uncommonly Used Port (T1065)' } ), id: 'T1065', @@ -4542,7 +4620,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.unusedUnsupportedCloudRegionsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.unusedUnsupportedCloudRegionsDescription', { defaultMessage: 'Unused/Unsupported Cloud Regions (T1535)' } ), id: 'T1535', @@ -4553,7 +4631,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.userExecutionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.userExecutionDescription', { defaultMessage: 'User Execution (T1204)' } ), id: 'T1204', @@ -4564,7 +4642,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.validAccountsDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.validAccountsDescription', { defaultMessage: 'Valid Accounts (T1078)' } ), id: 'T1078', @@ -4575,7 +4653,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.videoCaptureDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.videoCaptureDescription', { defaultMessage: 'Video Capture (T1125)' } ), id: 'T1125', @@ -4586,7 +4664,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.virtualizationSandboxEvasionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.virtualizationSandboxEvasionDescription', { defaultMessage: 'Virtualization/Sandbox Evasion (T1497)' } ), id: 'T1497', @@ -4597,7 +4675,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.webServiceDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.webServiceDescription', { defaultMessage: 'Web Service (T1102)' } ), id: 'T1102', @@ -4608,7 +4686,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.webSessionCookieDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.webSessionCookieDescription', { defaultMessage: 'Web Session Cookie (T1506)' } ), id: 'T1506', @@ -4618,9 +4696,12 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ value: 'webSessionCookie', }, { - label: i18n.translate('xpack.siem.detectionEngine.mitreAttackTechniques.webShellDescription', { - defaultMessage: 'Web Shell (T1100)', - }), + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.webShellDescription', + { + defaultMessage: 'Web Shell (T1100)', + } + ), id: 'T1100', name: 'Web Shell', reference: 'https://attack.mitre.org/techniques/T1100', @@ -4629,7 +4710,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.windowsAdminSharesDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsAdminSharesDescription', { defaultMessage: 'Windows Admin Shares (T1077)' } ), id: 'T1077', @@ -4640,7 +4721,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationDescription', { defaultMessage: 'Windows Management Instrumentation (T1047)' } ), id: 'T1047', @@ -4651,7 +4732,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationEventSubscriptionDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationEventSubscriptionDescription', { defaultMessage: 'Windows Management Instrumentation Event Subscription (T1084)' } ), id: 'T1084', @@ -4662,7 +4743,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.windowsRemoteManagementDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsRemoteManagementDescription', { defaultMessage: 'Windows Remote Management (T1028)' } ), id: 'T1028', @@ -4673,7 +4754,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.winlogonHelperDllDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.winlogonHelperDllDescription', { defaultMessage: 'Winlogon Helper DLL (T1004)' } ), id: 'T1004', @@ -4684,7 +4765,7 @@ export const techniquesOptions: MitreTechniquesOptions[] = [ }, { label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.xslScriptProcessingDescription', + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.xslScriptProcessingDescription', { defaultMessage: 'XSL Script Processing (T1220)' } ), id: 'T1220', diff --git a/x-pack/plugins/siem/public/alerts/mitre/types.ts b/x-pack/plugins/security_solution/public/alerts/mitre/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/mitre/types.ts rename to x-pack/plugins/security_solution/public/alerts/mitre/types.ts diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine.test.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine.test.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine_empty_page.test.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine_empty_page.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine_empty_page.test.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine_empty_page.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine_empty_page.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine_empty_page.tsx similarity index 92% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine_empty_page.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine_empty_page.tsx index 9632ddfeadc0d..0c58f5620964b 100644 --- a/x-pack/plugins/siem/public/alerts/pages/detection_engine/detection_engine_empty_page.tsx +++ b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/detection_engine_empty_page.tsx @@ -9,12 +9,13 @@ import React from 'react'; import { useKibana } from '../../../common/lib/kibana'; import { EmptyPage } from '../../../common/components/empty_page'; import * as i18n from '../../../common/translations'; +import { ADD_DATA_PATH } from '../../../../common/constants'; export const DetectionEngineEmptyPage = React.memo(() => ( + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.create.successfullyCreatedRuleTitle', + { + values: { ruleName }, + defaultMessage: '{ruleName} was created', + } + ); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/failure_history.test.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/failure_history.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/failure_history.test.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/failure_history.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/failure_history.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/failure_history.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/failure_history.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/failure_history.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/index.tsx similarity index 98% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/index.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/index.tsx index 7197ed397717c..ebd6ed118f937 100644 --- a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/index.tsx @@ -132,7 +132,7 @@ export const RuleDetailsPageComponent: FC = ({ ) : ( [ = ({ />, rule?.updated_by != null ? ( { {tabHasError.length > 0 && ( + i18n.translate('xpack.securitySolution.detectionEngine.rules.update.successfullySavedRuleTitle', { + values: { ruleName }, + defaultMessage: '{ruleName} was saved', + }); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/helpers.test.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/helpers.test.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/helpers.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/helpers.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/helpers.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/index.test.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/index.test.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/index.test.tsx diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/index.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/index.tsx rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/index.tsx diff --git a/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/translations.ts new file mode 100644 index 0000000000000..32f59093e6a04 --- /dev/null +++ b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/translations.ts @@ -0,0 +1,530 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const BACK_TO_ALERTS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.backOptionsHeader', + { + defaultMessage: 'Back to alerts', + } +); + +export const IMPORT_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.importRuleTitle', + { + defaultMessage: 'Import rule…', + } +); + +export const ADD_NEW_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addNewRuleTitle', + { + defaultMessage: 'Create new rule', + } +); + +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.detectionEngine.rules.pageTitle', { + defaultMessage: 'Detection rules', +}); + +export const ADD_PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.addPageTitle', + { + defaultMessage: 'Create', + } +); + +export const EDIT_PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.editPageTitle', + { + defaultMessage: 'Edit', + } +); + +export const REFRESH = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.refreshTitle', + { + defaultMessage: 'Refresh', + } +); + +export const BATCH_ACTIONS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle', + { + defaultMessage: 'Bulk actions', + } +); + +export const ACTIVE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.activeRuleDescription', + { + defaultMessage: 'active', + } +); + +export const INACTIVE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.inactiveRuleDescription', + { + defaultMessage: 'inactive', + } +); + +export const BATCH_ACTION_ACTIVATE_SELECTED = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedTitle', + { + defaultMessage: 'Activate selected', + } +); + +export const BATCH_ACTION_ACTIVATE_SELECTED_ERROR = (totalRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle', + { + values: { totalRules }, + defaultMessage: 'Error activating {totalRules, plural, =1 {rule} other {rules}}…', + } + ); + +export const BATCH_ACTION_DEACTIVATE_SELECTED = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedTitle', + { + defaultMessage: 'Deactivate selected', + } +); + +export const BATCH_ACTION_DEACTIVATE_SELECTED_ERROR = (totalRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle', + { + values: { totalRules }, + defaultMessage: 'Error deactivating {totalRules, plural, =1 {rule} other {rules}}…', + } + ); + +export const BATCH_ACTION_EXPORT_SELECTED = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.exportSelectedTitle', + { + defaultMessage: 'Export selected', + } +); + +export const BATCH_ACTION_DUPLICATE_SELECTED = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.duplicateSelectedTitle', + { + defaultMessage: 'Duplicate selected…', + } +); + +export const BATCH_ACTION_DELETE_SELECTED = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedTitle', + { + defaultMessage: 'Delete selected…', + } +); + +export const BATCH_ACTION_DELETE_SELECTED_IMMUTABLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle', + { + defaultMessage: 'Selection contains immutable rules which cannot be deleted', + } +); + +export const BATCH_ACTION_DELETE_SELECTED_ERROR = (totalRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle', + { + values: { totalRules }, + defaultMessage: 'Error deleting {totalRules, plural, =1 {rule} other {rules}}…', + } + ); + +export const EXPORT_FILENAME = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.exportFilenameTitle', + { + defaultMessage: 'rules_export', + } +); + +export const SUCCESSFULLY_EXPORTED_RULES = (totalRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.successfullyExportedRulesTitle', + { + values: { totalRules }, + defaultMessage: + 'Successfully exported {totalRules, plural, =0 {all rules} =1 {{totalRules} rule} other {{totalRules} rules}}', + } + ); + +export const ALL_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.tableTitle', + { + defaultMessage: 'All rules', + } +); + +export const SEARCH_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.searchAriaLabel', + { + defaultMessage: 'Search rules', + } +); + +export const SEARCH_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.searchPlaceholder', + { + defaultMessage: 'e.g. rule name', + } +); + +export const SHOWING_RULES = (totalRules: number) => + i18n.translate('xpack.securitySolution.detectionEngine.rules.allRules.showingRulesTitle', { + values: { totalRules }, + defaultMessage: 'Showing {totalRules} {totalRules, plural, =1 {rule} other {rules}}', + }); + +export const SELECTED_RULES = (selectedRules: number) => + i18n.translate('xpack.securitySolution.detectionEngine.rules.allRules.selectedRulesTitle', { + values: { selectedRules }, + defaultMessage: 'Selected {selectedRules} {selectedRules, plural, =1 {rule} other {rules}}', + }); + +export const EDIT_RULE_SETTINGS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsDescription', + { + defaultMessage: 'Edit rule settings', + } +); + +export const DUPLICATE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateTitle', + { + defaultMessage: 'Duplicate', + } +); + +export const DUPLICATE_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleDescription', + { + defaultMessage: 'Duplicate rule…', + } +); + +export const SUCCESSFULLY_DUPLICATED_RULES = (totalRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.successfullyDuplicatedRulesTitle', + { + values: { totalRules }, + defaultMessage: + 'Successfully duplicated {totalRules, plural, =1 {{totalRules} rule} other {{totalRules} rules}}', + } + ); + +export const DUPLICATE_RULE_ERROR = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription', + { + defaultMessage: 'Error duplicating rule…', + } +); + +export const EXPORT_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription', + { + defaultMessage: 'Export rule', + } +); + +export const DELETE_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.actions.deleteeRuleDescription', + { + defaultMessage: 'Delete rule…', + } +); + +export const COLUMN_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.ruleTitle', + { + defaultMessage: 'Rule', + } +); + +export const COLUMN_RISK_SCORE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.riskScoreTitle', + { + defaultMessage: 'Risk score', + } +); + +export const COLUMN_SEVERITY = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.severityTitle', + { + defaultMessage: 'Severity', + } +); + +export const COLUMN_LAST_COMPLETE_RUN = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.lastRunTitle', + { + defaultMessage: 'Last run', + } +); + +export const COLUMN_LAST_RESPONSE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.lastResponseTitle', + { + defaultMessage: 'Last response', + } +); + +export const COLUMN_TAGS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.tagsTitle', + { + defaultMessage: 'Tags', + } +); + +export const COLUMN_ACTIVATE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.activateTitle', + { + defaultMessage: 'Activated', + } +); + +export const COLUMN_INDEXING_TIMES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.indexingTimes', + { + defaultMessage: 'Indexing Time (ms)', + } +); + +export const COLUMN_QUERY_TIMES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.queryTimes', + { + defaultMessage: 'Query Time (ms)', + } +); + +export const COLUMN_GAP = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.gap', + { + defaultMessage: 'Gap (if any)', + } +); + +export const COLUMN_LAST_LOOKBACK_DATE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.lastLookBackDate', + { + defaultMessage: 'Last Look-Back Date', + } +); + +export const RULES_TAB = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.tabs.rules', + { + defaultMessage: 'Rules', + } +); + +export const MONITORING_TAB = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.tabs.monitoring', + { + defaultMessage: 'Monitoring', + } +); + +export const CUSTOM_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.filters.customRulesTitle', + { + defaultMessage: 'Custom rules', + } +); + +export const ELASTIC_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.filters.elasticRulesTitle', + { + defaultMessage: 'Elastic rules', + } +); + +export const TAGS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.filters.tagsLabel', + { + defaultMessage: 'Tags', + } +); + +export const NO_TAGS_AVAILABLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.filters.noTagsAvailableDescription', + { + defaultMessage: 'No tags available', + } +); + +export const NO_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.filters.noRulesTitle', + { + defaultMessage: 'No rules found', + } +); + +export const NO_RULES_BODY = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.filters.noRulesBodyTitle', + { + defaultMessage: "We weren't able to find any rules with the above filters.", + } +); + +export const DEFINE_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.defineRuleTitle', + { + defaultMessage: 'Define rule', + } +); + +export const ABOUT_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.aboutRuleTitle', + { + defaultMessage: 'About rule', + } +); + +export const SCHEDULE_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.scheduleRuleTitle', + { + defaultMessage: 'Schedule rule', + } +); + +export const RULE_ACTIONS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.ruleActionsTitle', + { + defaultMessage: 'Rule actions', + } +); + +export const DEFINITION = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.stepDefinitionTitle', + { + defaultMessage: 'Definition', + } +); + +export const ABOUT = i18n.translate('xpack.securitySolution.detectionEngine.rules.stepAboutTitle', { + defaultMessage: 'About', +}); + +export const SCHEDULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.stepScheduleTitle', + { + defaultMessage: 'Schedule', + } +); + +export const ACTIONS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.stepActionsTitle', + { + defaultMessage: 'Actions', + } +); + +export const OPTIONAL_FIELD = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.optionalFieldDescription', + { + defaultMessage: 'Optional', + } +); + +export const CONTINUE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.continueButtonTitle', + { + defaultMessage: 'Continue', + } +); + +export const UPDATE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.updateButtonTitle', + { + defaultMessage: 'Update', + } +); + +export const DELETE = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.deleteDescription', + { + defaultMessage: 'Delete', + } +); + +export const LOAD_PREPACKAGED_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.loadPrePackagedRulesButton', + { + defaultMessage: 'Load Elastic prebuilt rules', + } +); + +export const RELOAD_MISSING_PREPACKAGED_RULES = (missingRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.reloadMissingPrePackagedRulesButton', + { + values: { missingRules }, + defaultMessage: + 'Install {missingRules} Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} ', + } + ); + +export const IMPORT_RULE_BTN_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.importRuleTitle', + { + defaultMessage: 'Import rule', + } +); + +export const SELECT_RULE = i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.selectRuleDescription', + { + defaultMessage: 'Select a SIEM rule (as exported from the Detection Engine view) to import', + } +); + +export const INITIAL_PROMPT_TEXT = i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.initialPromptTextDescription', + { + defaultMessage: 'Select or drag and drop a valid rules_export.ndjson file', + } +); + +export const OVERWRITE_WITH_SAME_NAME = i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.overwriteDescription', + { + defaultMessage: 'Automatically overwrite saved objects with the same rule ID', + } +); + +export const SUCCESSFULLY_IMPORTED_RULES = (totalRules: number) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle', + { + values: { totalRules }, + defaultMessage: + 'Successfully imported {totalRules} {totalRules, plural, =1 {rule} other {rules}}', + } + ); + +export const IMPORT_FAILED = i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.importFailedTitle', + { + defaultMessage: 'Failed to import rules', + } +); + +export const IMPORT_FAILED_DETAILED = (ruleId: string, statusCode: number, message: string) => + i18n.translate( + 'xpack.securitySolution.detectionEngine.components.importRuleModal.importFailedDetailedTitle', + { + values: { ruleId, statusCode, message }, + defaultMessage: 'Rule ID: {ruleId}\n Status Code: {statusCode}\n Message: {message}', + } + ); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/types.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/types.ts rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/types.ts diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/utils.test.ts b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/utils.test.ts rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/utils.test.ts diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/utils.ts rename to x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/utils.ts diff --git a/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/translations.ts b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/translations.ts new file mode 100644 index 0000000000000..a19422d0de2c1 --- /dev/null +++ b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/translations.ts @@ -0,0 +1,117 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.detectionsPageTitle', + { + defaultMessage: 'Alerts', + } +); + +export const LAST_ALERT = i18n.translate('xpack.securitySolution.detectionEngine.lastSignalTitle', { + defaultMessage: 'Last alert', +}); + +export const TOTAL_SIGNAL = i18n.translate( + 'xpack.securitySolution.detectionEngine.totalSignalTitle', + { + defaultMessage: 'Total', + } +); + +export const SIGNAL = i18n.translate('xpack.securitySolution.detectionEngine.signalTitle', { + defaultMessage: 'Detected alerts', +}); + +export const ALERT = i18n.translate('xpack.securitySolution.detectionEngine.alertTitle', { + defaultMessage: 'External alerts', +}); + +export const BUTTON_MANAGE_RULES = i18n.translate( + 'xpack.securitySolution.detectionEngine.buttonManageRules', + { + defaultMessage: 'Manage detection rules', + } +); + +export const PANEL_SUBTITLE_SHOWING = i18n.translate( + 'xpack.securitySolution.detectionEngine.panelSubtitleShowing', + { + defaultMessage: 'Showing', + } +); + +export const EMPTY_TITLE = i18n.translate('xpack.securitySolution.detectionEngine.emptyTitle', { + defaultMessage: + 'It looks like you don’t have any indices relevant to the detection engine in the SIEM application', +}); + +export const EMPTY_ACTION_PRIMARY = i18n.translate( + 'xpack.securitySolution.detectionEngine.emptyActionPrimary', + { + defaultMessage: 'View setup instructions', + } +); + +export const EMPTY_ACTION_SECONDARY = i18n.translate( + 'xpack.securitySolution.detectionEngine.emptyActionSecondary', + { + defaultMessage: 'Go to documentation', + } +); + +export const NO_INDEX_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.noIndexTitle', + { + defaultMessage: 'Let’s set up your detection engine', + } +); + +export const NO_INDEX_MSG_BODY = i18n.translate( + 'xpack.securitySolution.detectionEngine.noIndexMsgBody', + { + defaultMessage: + 'To use the detection engine, a user with the required cluster and index privileges must first access this page. For more help, contact your administrator.', + } +); + +export const GO_TO_DOCUMENTATION = i18n.translate( + 'xpack.securitySolution.detectionEngine.goToDocumentationButton', + { + defaultMessage: 'View documentation', + } +); + +export const USER_UNAUTHENTICATED_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.userUnauthenticatedTitle', + { + defaultMessage: 'Detection engine permissions required', + } +); + +export const USER_UNAUTHENTICATED_MSG_BODY = i18n.translate( + 'xpack.securitySolution.detectionEngine.userUnauthenticatedMsgBody', + { + defaultMessage: + 'You do not have the required permissions for viewing the detection engine. For more help, contact your administrator.', + } +); + +export const ML_RULES_DISABLED_MESSAGE = i18n.translate( + 'xpack.securitySolution.detectionEngine.mlRulesDisabledMessageTitle', + { + defaultMessage: 'ML rules require Platinum License and ML Admin Permissions', + } +); + +export const ML_RULES_UNAVAILABLE = (totalRules: number) => + i18n.translate('xpack.securitySolution.detectionEngine.mlUnavailableTitle', { + values: { totalRules }, + defaultMessage: + '{totalRules} {totalRules, plural, =1 {rule requires} other {rules require}} Machine Learning to enable.', + }); diff --git a/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/types.ts b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/types.ts new file mode 100644 index 0000000000000..d529d99ad3ad4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/types.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export enum DetectionEngineTab { + signals = 'signals', + alerts = 'alerts', +} diff --git a/x-pack/plugins/siem/public/alerts/routes.tsx b/x-pack/plugins/security_solution/public/alerts/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/alerts/routes.tsx rename to x-pack/plugins/security_solution/public/alerts/routes.tsx diff --git a/x-pack/plugins/siem/public/app/404.tsx b/x-pack/plugins/security_solution/public/app/404.tsx similarity index 88% rename from x-pack/plugins/siem/public/app/404.tsx rename to x-pack/plugins/security_solution/public/app/404.tsx index 6a1b5c56dc853..b24cad5ad5b4b 100644 --- a/x-pack/plugins/siem/public/app/404.tsx +++ b/x-pack/plugins/security_solution/public/app/404.tsx @@ -12,7 +12,7 @@ import { WrapperPage } from '../common/components/wrapper_page'; export const NotFoundPage = React.memo(() => ( diff --git a/x-pack/plugins/siem/public/app/app.tsx b/x-pack/plugins/security_solution/public/app/app.tsx similarity index 100% rename from x-pack/plugins/siem/public/app/app.tsx rename to x-pack/plugins/security_solution/public/app/app.tsx diff --git a/x-pack/plugins/siem/public/app/home/home_navigations.tsx b/x-pack/plugins/security_solution/public/app/home/home_navigations.tsx similarity index 100% rename from x-pack/plugins/siem/public/app/home/home_navigations.tsx rename to x-pack/plugins/security_solution/public/app/home/home_navigations.tsx diff --git a/x-pack/plugins/siem/public/app/home/index.tsx b/x-pack/plugins/security_solution/public/app/home/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/app/home/index.tsx rename to x-pack/plugins/security_solution/public/app/home/index.tsx diff --git a/x-pack/plugins/siem/public/app/home/setup.tsx b/x-pack/plugins/security_solution/public/app/home/setup.tsx similarity index 90% rename from x-pack/plugins/siem/public/app/home/setup.tsx rename to x-pack/plugins/security_solution/public/app/home/setup.tsx index a88b6a36100db..5b977a83302a9 100644 --- a/x-pack/plugins/siem/public/app/home/setup.tsx +++ b/x-pack/plugins/security_solution/public/app/home/setup.tsx @@ -13,11 +13,11 @@ export const Setup: React.FunctionComponent<{ notifications: NotificationsStart; }> = ({ ingestManager, notifications }) => { React.useEffect(() => { - const defaultText = i18n.translate('xpack.siem.endpoint.ingestToastMessage', { + const defaultText = i18n.translate('xpack.securitySolution.endpoint.ingestToastMessage', { defaultMessage: 'Ingest Manager failed during its setup.', }); - const title = i18n.translate('xpack.siem.endpoint.ingestToastTitle', { + const title = i18n.translate('xpack.securitySolution.endpoint.ingestToastTitle', { defaultMessage: 'App failed to initialize', }); diff --git a/x-pack/plugins/security_solution/public/app/home/translations.ts b/x-pack/plugins/security_solution/public/app/home/translations.ts new file mode 100644 index 0000000000000..ccf927eba20c9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/app/home/translations.ts @@ -0,0 +1,38 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const OVERVIEW = i18n.translate('xpack.securitySolution.navigation.overview', { + defaultMessage: 'Overview', +}); + +export const HOSTS = i18n.translate('xpack.securitySolution.navigation.hosts', { + defaultMessage: 'Hosts', +}); + +export const NETWORK = i18n.translate('xpack.securitySolution.navigation.network', { + defaultMessage: 'Network', +}); + +export const DETECTION_ENGINE = i18n.translate( + 'xpack.securitySolution.navigation.detectionEngine', + { + defaultMessage: 'Detections', + } +); + +export const TIMELINES = i18n.translate('xpack.securitySolution.navigation.timelines', { + defaultMessage: 'Timelines', +}); + +export const CASE = i18n.translate('xpack.securitySolution.navigation.case', { + defaultMessage: 'Cases', +}); + +export const MANAGEMENT = i18n.translate('xpack.securitySolution.navigation.management', { + defaultMessage: 'Management', +}); diff --git a/x-pack/plugins/siem/public/app/index.tsx b/x-pack/plugins/security_solution/public/app/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/app/index.tsx rename to x-pack/plugins/security_solution/public/app/index.tsx diff --git a/x-pack/plugins/siem/public/app/routes.tsx b/x-pack/plugins/security_solution/public/app/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/app/routes.tsx rename to x-pack/plugins/security_solution/public/app/routes.tsx diff --git a/x-pack/plugins/siem/public/app/types.ts b/x-pack/plugins/security_solution/public/app/types.ts similarity index 100% rename from x-pack/plugins/siem/public/app/types.ts rename to x-pack/plugins/security_solution/public/app/types.ts diff --git a/x-pack/plugins/siem/public/cases/components/__mock__/form.ts b/x-pack/plugins/security_solution/public/cases/components/__mock__/form.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/components/__mock__/form.ts rename to x-pack/plugins/security_solution/public/cases/components/__mock__/form.ts diff --git a/x-pack/plugins/siem/public/cases/components/__mock__/router.ts b/x-pack/plugins/security_solution/public/cases/components/__mock__/router.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/components/__mock__/router.ts rename to x-pack/plugins/security_solution/public/cases/components/__mock__/router.ts diff --git a/x-pack/plugins/siem/public/cases/components/add_comment/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/add_comment/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/add_comment/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/add_comment/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/add_comment/index.tsx b/x-pack/plugins/security_solution/public/cases/components/add_comment/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/add_comment/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/add_comment/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/add_comment/schema.tsx b/x-pack/plugins/security_solution/public/cases/components/add_comment/schema.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/add_comment/schema.tsx rename to x-pack/plugins/security_solution/public/cases/components/add_comment/schema.tsx diff --git a/x-pack/plugins/siem/public/cases/components/add_comment/translations.ts b/x-pack/plugins/security_solution/public/cases/components/add_comment/translations.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/components/add_comment/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/add_comment/translations.ts diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/actions.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/actions.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/columns.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/columns.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/columns.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/columns.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/columns.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/index.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/table_filters.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/table_filters.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/table_filters.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/all_cases/table_filters.tsx rename to x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.tsx diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts b/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts new file mode 100644 index 0000000000000..9198aaceb96f9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts @@ -0,0 +1,110 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export * from '../../translations'; + +export const NO_CASES = i18n.translate('xpack.securitySolution.case.caseTable.noCases.title', { + defaultMessage: 'No Cases', +}); +export const NO_CASES_BODY = i18n.translate('xpack.securitySolution.case.caseTable.noCases.body', { + defaultMessage: + 'There are no cases to display. Please create a new case or change your filter settings above.', +}); + +export const ADD_NEW_CASE = i18n.translate('xpack.securitySolution.case.caseTable.addNewCase', { + defaultMessage: 'Add New Case', +}); + +export const SHOWING_SELECTED_CASES = (totalRules: number) => + i18n.translate('xpack.securitySolution.case.caseTable.selectedCasesTitle', { + values: { totalRules }, + defaultMessage: 'Selected {totalRules} {totalRules, plural, =1 {case} other {cases}}', + }); + +export const SHOWING_CASES = (totalRules: number) => + i18n.translate('xpack.securitySolution.case.caseTable.showingCasesTitle', { + values: { totalRules }, + defaultMessage: 'Showing {totalRules} {totalRules, plural, =1 {case} other {cases}}', + }); + +export const UNIT = (totalCount: number) => + i18n.translate('xpack.securitySolution.case.caseTable.unit', { + values: { totalCount }, + defaultMessage: `{totalCount, plural, =1 {case} other {cases}}`, + }); + +export const SEARCH_CASES = i18n.translate( + 'xpack.securitySolution.case.caseTable.searchAriaLabel', + { + defaultMessage: 'Search cases', + } +); + +export const BULK_ACTIONS = i18n.translate('xpack.securitySolution.case.caseTable.bulkActions', { + defaultMessage: 'Bulk actions', +}); + +export const EXTERNAL_INCIDENT = i18n.translate( + 'xpack.securitySolution.case.caseTable.snIncident', + { + defaultMessage: 'External Incident', + } +); + +export const INCIDENT_MANAGEMENT_SYSTEM = i18n.translate( + 'xpack.securitySolution.case.caseTable.incidentSystem', + { + defaultMessage: 'Incident Management System', + } +); + +export const SEARCH_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.case.caseTable.searchPlaceholder', + { + defaultMessage: 'e.g. case name', + } +); +export const OPEN_CASES = i18n.translate('xpack.securitySolution.case.caseTable.openCases', { + defaultMessage: 'Open cases', +}); +export const CLOSED_CASES = i18n.translate('xpack.securitySolution.case.caseTable.closedCases', { + defaultMessage: 'Closed cases', +}); + +export const CLOSED = i18n.translate('xpack.securitySolution.case.caseTable.closed', { + defaultMessage: 'Closed', +}); + +export const DELETE = i18n.translate('xpack.securitySolution.case.caseTable.delete', { + defaultMessage: 'Delete', +}); + +export const REQUIRES_UPDATE = i18n.translate( + 'xpack.securitySolution.case.caseTable.requiresUpdate', + { + defaultMessage: ' requires update', + } +); + +export const UP_TO_DATE = i18n.translate('xpack.securitySolution.case.caseTable.upToDate', { + defaultMessage: ' is up to date', +}); +export const NOT_PUSHED = i18n.translate('xpack.securitySolution.case.caseTable.notPushed', { + defaultMessage: 'Not pushed', +}); + +export const REFRESH = i18n.translate('xpack.securitySolution.case.caseTable.refreshTitle', { + defaultMessage: 'Refresh', +}); + +export const SERVICENOW_LINK_ARIA = i18n.translate( + 'xpack.securitySolution.case.caseTable.serviceNowLinkAria', + { + defaultMessage: 'click to view the incident on servicenow', + } +); diff --git a/x-pack/plugins/siem/public/cases/components/bulk_actions/index.tsx b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/bulk_actions/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/bulk_actions/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/bulk_actions/translations.ts b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts similarity index 73% rename from x-pack/plugins/siem/public/cases/components/bulk_actions/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts index 97045c8ebaf8b..25e22aebb6a0b 100644 --- a/x-pack/plugins/siem/public/cases/components/bulk_actions/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts @@ -7,21 +7,21 @@ import { i18n } from '@kbn/i18n'; export const BULK_ACTION_CLOSE_SELECTED = i18n.translate( - 'xpack.siem.case.caseTable.bulkActions.closeSelectedTitle', + 'xpack.securitySolution.case.caseTable.bulkActions.closeSelectedTitle', { defaultMessage: 'Close selected', } ); export const BULK_ACTION_OPEN_SELECTED = i18n.translate( - 'xpack.siem.case.caseTable.bulkActions.openSelectedTitle', + 'xpack.securitySolution.case.caseTable.bulkActions.openSelectedTitle', { defaultMessage: 'Reopen selected', } ); export const BULK_ACTION_DELETE_SELECTED = i18n.translate( - 'xpack.siem.case.caseTable.bulkActions.deleteSelectedTitle', + 'xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle', { defaultMessage: 'Delete selected', } diff --git a/x-pack/plugins/siem/public/cases/components/callout/helpers.tsx b/x-pack/plugins/security_solution/public/cases/components/callout/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/callout/helpers.tsx rename to x-pack/plugins/security_solution/public/cases/components/callout/helpers.tsx diff --git a/x-pack/plugins/siem/public/cases/components/callout/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/callout/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/callout/index.tsx b/x-pack/plugins/security_solution/public/cases/components/callout/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/callout/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/callout/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/callout/translations.ts b/x-pack/plugins/security_solution/public/cases/components/callout/translations.ts similarity index 78% rename from x-pack/plugins/siem/public/cases/components/callout/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/callout/translations.ts index f70225b841162..01956ca942997 100644 --- a/x-pack/plugins/siem/public/cases/components/callout/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/callout/translations.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; export const READ_ONLY_SAVED_OBJECT_TITLE = i18n.translate( - 'xpack.siem.case.readOnlySavedObjectTitle', + 'xpack.securitySolution.case.readOnlySavedObjectTitle', { defaultMessage: 'You have read-only feature privileges', } ); export const READ_ONLY_SAVED_OBJECT_MSG = i18n.translate( - 'xpack.siem.case.readOnlySavedObjectDescription', + 'xpack.securitySolution.case.readOnlySavedObjectDescription', { defaultMessage: 'You are only allowed to view cases. If you need to open and update cases, contact your Kibana administrator', @@ -22,7 +22,7 @@ export const READ_ONLY_SAVED_OBJECT_MSG = i18n.translate( ); export const DISMISS_CALLOUT = i18n.translate( - 'xpack.siem.case.dismissErrorsPushServiceCallOutTitle', + 'xpack.securitySolution.case.dismissErrorsPushServiceCallOutTitle', { defaultMessage: 'Dismiss', } diff --git a/x-pack/plugins/siem/public/cases/components/case_header_page/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_header_page/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/case_header_page/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/case_header_page/index.tsx diff --git a/x-pack/plugins/security_solution/public/cases/components/case_header_page/translations.ts b/x-pack/plugins/security_solution/public/cases/components/case_header_page/translations.ts new file mode 100644 index 0000000000000..8cdc287b1584c --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/components/case_header_page/translations.ts @@ -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 { i18n } from '@kbn/i18n'; + +export const PAGE_BADGE_LABEL = i18n.translate( + 'xpack.securitySolution.case.caseView.pageBadgeLabel', + { + defaultMessage: 'Beta', + } +); + +export const PAGE_BADGE_TOOLTIP = i18n.translate( + 'xpack.securitySolution.case.caseView.pageBadgeTooltip', + { + defaultMessage: + 'Case Workflow is still in beta. Please help us improve by reporting issues or bugs in the Kibana repo.', + } +); diff --git a/x-pack/plugins/siem/public/cases/components/case_status/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_status/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/case_status/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/case_status/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/case_view/actions.test.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/actions.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/case_view/actions.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/case_view/actions.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/case_view/actions.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/actions.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/case_view/actions.tsx rename to x-pack/plugins/security_solution/public/cases/components/case_view/actions.tsx diff --git a/x-pack/plugins/siem/public/cases/components/case_view/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/case_view/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/case_view/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx similarity index 99% rename from x-pack/plugins/siem/public/cases/components/case_view/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx index 669fc89ffe804..bb63cf633747b 100644 --- a/x-pack/plugins/siem/public/cases/components/case_view/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx @@ -70,7 +70,7 @@ export interface CaseProps extends Props { export const CaseComponent = React.memo( ({ caseId, caseData, fetchCase, updateCase, userCanCrud }) => { const basePath = window.location.origin + useBasePath(); - const caseLink = `${basePath}/app/siem#/case/${caseId}`; + const caseLink = `${basePath}/app/security#/case/${caseId}`; const search = useGetUrlSearch(navTabs.case); const [initLoadingData, setInitLoadingData] = useState(true); const { diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts b/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts new file mode 100644 index 0000000000000..b8219ad52f5b0 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts @@ -0,0 +1,156 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export * from '../../translations'; + +export const SHOWING_CASES = (actionDate: string, actionName: string, userName: string) => + i18n.translate('xpack.securitySolution.case.caseView.actionHeadline', { + values: { + actionDate, + actionName, + userName, + }, + defaultMessage: '{userName} {actionName} on {actionDate}', + }); + +export const ADDED_FIELD = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.addedField', + { + defaultMessage: 'added', + } +); + +export const CHANGED_FIELD = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.changededField', + { + defaultMessage: 'changed', + } +); + +export const SELECTED_THIRD_PARTY = (thirdParty: string) => + i18n.translate('xpack.securitySolution.case.caseView.actionLabel.selectedThirdParty', { + values: { + thirdParty, + }, + defaultMessage: 'selected { thirdParty } as incident management system', + }); + +export const REMOVED_THIRD_PARTY = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.removedThirdParty', + { + defaultMessage: 'removed external incident management system', + } +); + +export const EDITED_FIELD = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.editedField', + { + defaultMessage: 'edited', + } +); + +export const REMOVED_FIELD = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.removedField', + { + defaultMessage: 'removed', + } +); + +export const VIEW_INCIDENT = (incidentNumber: string) => + i18n.translate('xpack.securitySolution.case.caseView.actionLabel.viewIncident', { + defaultMessage: 'View {incidentNumber}', + values: { + incidentNumber, + }, + }); + +export const PUSHED_NEW_INCIDENT = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.pushedNewIncident', + { + defaultMessage: 'pushed as new incident', + } +); + +export const UPDATE_INCIDENT = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.updateIncident', + { + defaultMessage: 'updated incident', + } +); + +export const ADDED_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.addDescription', + { + defaultMessage: 'added description', + } +); + +export const EDIT_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.case.caseView.edit.description', + { + defaultMessage: 'Edit description', + } +); + +export const QUOTE = i18n.translate('xpack.securitySolution.case.caseView.edit.quote', { + defaultMessage: 'Quote', +}); + +export const EDIT_COMMENT = i18n.translate('xpack.securitySolution.case.caseView.edit.comment', { + defaultMessage: 'Edit comment', +}); + +export const ON = i18n.translate('xpack.securitySolution.case.caseView.actionLabel.on', { + defaultMessage: 'on', +}); + +export const ADDED_COMMENT = i18n.translate( + 'xpack.securitySolution.case.caseView.actionLabel.addComment', + { + defaultMessage: 'added comment', + } +); + +export const STATUS = i18n.translate('xpack.securitySolution.case.caseView.statusLabel', { + defaultMessage: 'Status', +}); + +export const CASE = i18n.translate('xpack.securitySolution.case.caseView.case', { + defaultMessage: 'case', +}); + +export const COMMENT = i18n.translate('xpack.securitySolution.case.caseView.comment', { + defaultMessage: 'comment', +}); + +export const CASE_OPENED = i18n.translate('xpack.securitySolution.case.caseView.caseOpened', { + defaultMessage: 'Case opened', +}); + +export const CASE_CLOSED = i18n.translate('xpack.securitySolution.case.caseView.caseClosed', { + defaultMessage: 'Case closed', +}); + +export const CASE_REFRESH = i18n.translate('xpack.securitySolution.case.caseView.caseRefresh', { + defaultMessage: 'Refresh case', +}); + +export const EMAIL_SUBJECT = (caseTitle: string) => + i18n.translate('xpack.securitySolution.case.caseView.emailSubject', { + values: { caseTitle }, + defaultMessage: 'Security Case - {caseTitle}', + }); + +export const EMAIL_BODY = (caseUrl: string) => + i18n.translate('xpack.securitySolution.case.caseView.emailBody', { + values: { caseUrl }, + defaultMessage: 'Case reference: {caseUrl}', + }); +export const UNKNOWN = i18n.translate('xpack.securitySolution.case.caseView.unknown', { + defaultMessage: 'Unknown', +}); diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/__mock__/index.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/__mock__/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/__mock__/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/__mock__/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/button.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/button.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/button.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/button.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/button.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/button.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/button.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/button.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/closure_options.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/closure_options.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/closure_options.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/closure_options.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/closure_options_radio.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options_radio.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/closure_options_radio.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options_radio.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/closure_options_radio.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options_radio.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/closure_options_radio.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/closure_options_radio.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/connectors.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/connectors.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/connectors.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/connectors.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/connectors_dropdown.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/connectors_dropdown.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/connectors_dropdown.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/connectors_dropdown.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping.test.tsx similarity index 94% rename from x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping.test.tsx index 43d5351a5dce3..67963c7487826 100644 --- a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping.test.tsx @@ -52,7 +52,7 @@ describe('FieldMappingRow', () => { test('it pass the corrects props to mapping row', () => { const rows = wrapper.find(FieldMappingRow); rows.forEach((row, index) => { - expect(row.prop('siemField')).toEqual(mapping[index].source); + expect(row.prop('securitySolutionField')).toEqual(mapping[index].source); expect(row.prop('selectedActionType')).toEqual(mapping[index].actionType); expect(row.prop('selectedThirdParty')).toEqual(mapping[index].target); }); @@ -68,7 +68,7 @@ describe('FieldMappingRow', () => { const rows = newWrapper.find(FieldMappingRow); rows.forEach((row, index) => { - expect(row.prop('siemField')).toEqual(defaultMapping[index].source); + expect(row.prop('securitySolutionField')).toEqual(defaultMapping[index].source); expect(row.prop('selectedActionType')).toEqual(defaultMapping[index].actionType); expect(row.prop('selectedThirdParty')).toEqual(defaultMapping[index].target); }); diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping.tsx similarity index 99% rename from x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping.tsx index 3d515941fc2f3..415faa96eeedd 100644 --- a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping.tsx @@ -132,7 +132,7 @@ const FieldMappingComponent: React.FC = ({ key={`${item.source}`} id={`${item.source}`} disabled={disabled} - siemField={item.source} + securitySolutionField={item.source} thirdPartyOptions={getThirdPartyOptions(item.source, selectedConnector.fields)} actionTypeOptions={actionTypeOptions} onChangeActionType={onChangeActionType} diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping_row.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row.test.tsx similarity index 98% rename from x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping_row.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row.test.tsx index 3787a43ff2d28..a2acd0e20b6ad 100644 --- a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping_row.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row.test.tsx @@ -51,7 +51,7 @@ describe('FieldMappingRow', () => { const props: RowProps = { id: 'title', disabled: false, - siemField: 'title', + securitySolutionField: 'title', thirdPartyOptions, actionTypeOptions, onChangeActionType, diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping_row.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row.tsx similarity index 85% rename from x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping_row.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row.tsx index 922ea7222efce..6e688b213f82c 100644 --- a/x-pack/plugins/siem/public/cases/components/configure_cases/field_mapping_row.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/field_mapping_row.tsx @@ -20,7 +20,7 @@ import { AllThirdPartyFields } from '../../../common/lib/connectors/types'; export interface RowProps { id: string; disabled: boolean; - siemField: CaseField; + securitySolutionField: CaseField; thirdPartyOptions: Array>; actionTypeOptions: Array>; onChangeActionType: (caseField: CaseField, newActionType: ActionType) => void; @@ -32,7 +32,7 @@ export interface RowProps { const FieldMappingRowComponent: React.FC = ({ id, disabled, - siemField, + securitySolutionField, thirdPartyOptions, actionTypeOptions, onChangeActionType, @@ -40,13 +40,15 @@ const FieldMappingRowComponent: React.FC = ({ selectedActionType, selectedThirdParty, }) => { - const siemFieldCapitalized = useMemo(() => capitalize(siemField), [siemField]); + const securitySolutionFieldCapitalized = useMemo(() => capitalize(securitySolutionField), [ + securitySolutionField, + ]); return ( - {siemFieldCapitalized} + {securitySolutionFieldCapitalized} @@ -58,7 +60,7 @@ const FieldMappingRowComponent: React.FC = ({ disabled={disabled} options={thirdPartyOptions} valueOfSelected={selectedThirdParty} - onChange={onChangeThirdParty.bind(null, siemField)} + onChange={onChangeThirdParty.bind(null, securitySolutionField)} data-test-subj={`case-configure-third-party-select-${id}`} /> @@ -67,7 +69,7 @@ const FieldMappingRowComponent: React.FC = ({ disabled={disabled} options={actionTypeOptions} valueOfSelected={selectedActionType} - onChange={onChangeActionType.bind(null, siemField)} + onChange={onChangeActionType.bind(null, securitySolutionField)} data-test-subj={`case-configure-action-type-select-${id}`} /> diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/index.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/mapping.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/mapping.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/mapping.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/mapping.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/mapping.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/mapping.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/mapping.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/mapping.tsx diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts b/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts new file mode 100644 index 0000000000000..9ef6ce2f3d4a9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts @@ -0,0 +1,184 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const INCIDENT_MANAGEMENT_SYSTEM_TITLE = i18n.translate( + 'xpack.securitySolution.case.configureCases.incidentManagementSystemTitle', + { + defaultMessage: 'Connect to external incident management system', + } +); + +export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate( + 'xpack.securitySolution.case.configureCases.incidentManagementSystemDesc', + { + defaultMessage: + 'You may optionally connect Security cases to an external incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.', + } +); + +export const INCIDENT_MANAGEMENT_SYSTEM_LABEL = i18n.translate( + 'xpack.securitySolution.case.configureCases.incidentManagementSystemLabel', + { + defaultMessage: 'Incident management system', + } +); + +export const NO_CONNECTOR = i18n.translate( + 'xpack.securitySolution.case.configureCases.noConnector', + { + defaultMessage: 'No connector selected', + } +); + +export const ADD_NEW_CONNECTOR = i18n.translate( + 'xpack.securitySolution.case.configureCases.addNewConnector', + { + defaultMessage: 'Add new connector', + } +); + +export const CASE_CLOSURE_OPTIONS_TITLE = i18n.translate( + 'xpack.securitySolution.case.configureCases.caseClosureOptionsTitle', + { + defaultMessage: 'Case Closures', + } +); + +export const CASE_CLOSURE_OPTIONS_DESC = i18n.translate( + 'xpack.securitySolution.case.configureCases.caseClosureOptionsDesc', + { + defaultMessage: + 'Define how you wish Security cases to be closed. Automated case closures require an established connection to an external incident management system.', + } +); + +export const CASE_CLOSURE_OPTIONS_LABEL = i18n.translate( + 'xpack.securitySolution.case.configureCases.caseClosureOptionsLabel', + { + defaultMessage: 'Case closure options', + } +); + +export const CASE_CLOSURE_OPTIONS_MANUAL = i18n.translate( + 'xpack.securitySolution.case.configureCases.caseClosureOptionsManual', + { + defaultMessage: 'Manually close Security cases', + } +); + +export const CASE_CLOSURE_OPTIONS_NEW_INCIDENT = i18n.translate( + 'xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident', + { + defaultMessage: + 'Automatically close Security cases when pushing new incident to external system', + } +); + +export const CASE_CLOSURE_OPTIONS_CLOSED_INCIDENT = i18n.translate( + 'xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident', + { + defaultMessage: 'Automatically close Security cases when incident is closed in external system', + } +); + +export const FIELD_MAPPING_TITLE = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingTitle', + { + defaultMessage: 'Field mappings', + } +); + +export const FIELD_MAPPING_DESC = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingDesc', + { + defaultMessage: + 'Map Security case fields when pushing data to a third-party. Field mappings require an established connection to an external incident management system.', + } +); + +export const FIELD_MAPPING_FIRST_COL = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingFirstCol', + { + defaultMessage: 'Security case field', + } +); + +export const FIELD_MAPPING_SECOND_COL = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingSecondCol', + { + defaultMessage: 'External incident field', + } +); + +export const FIELD_MAPPING_THIRD_COL = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingThirdCol', + { + defaultMessage: 'On edit and update', + } +); + +export const FIELD_MAPPING_EDIT_NOTHING = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingEditNothing', + { + defaultMessage: 'Nothing', + } +); + +export const FIELD_MAPPING_EDIT_OVERWRITE = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingEditOverwrite', + { + defaultMessage: 'Overwrite', + } +); + +export const FIELD_MAPPING_EDIT_APPEND = i18n.translate( + 'xpack.securitySolution.case.configureCases.fieldMappingEditAppend', + { + defaultMessage: 'Append', + } +); + +export const CANCEL = i18n.translate('xpack.securitySolution.case.configureCases.cancelButton', { + defaultMessage: 'Cancel', +}); + +export const WARNING_NO_CONNECTOR_TITLE = i18n.translate( + 'xpack.securitySolution.case.configureCases.warningTitle', + { + defaultMessage: 'Warning', + } +); + +export const WARNING_NO_CONNECTOR_MESSAGE = i18n.translate( + 'xpack.securitySolution.case.configureCases.warningMessage', + { + defaultMessage: + 'The selected connector has been deleted. Either select a different connector or create a new one.', + } +); + +export const MAPPING_FIELD_NOT_MAPPED = i18n.translate( + 'xpack.securitySolution.case.configureCases.mappingFieldNotMapped', + { + defaultMessage: 'Not mapped', + } +); + +export const UPDATE_CONNECTOR = i18n.translate( + 'xpack.securitySolution.case.configureCases.updateConnector', + { + defaultMessage: 'Update connector', + } +); + +export const UPDATE_SELECTED_CONNECTOR = (connectorName: string): string => { + return i18n.translate('xpack.securitySolution.case.configureCases.updateSelectedConnector', { + values: { connectorName }, + defaultMessage: 'Update { connectorName }', + }); +}; diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/utils.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/utils.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/utils.ts b/x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/components/configure_cases/utils.ts rename to x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.ts diff --git a/x-pack/plugins/siem/public/cases/components/confirm_delete_case/index.tsx b/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/confirm_delete_case/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/confirm_delete_case/translations.ts b/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts similarity index 79% rename from x-pack/plugins/siem/public/cases/components/confirm_delete_case/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts index a535286e7e8e5..ad51d13206809 100644 --- a/x-pack/plugins/siem/public/cases/components/confirm_delete_case/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts @@ -8,27 +8,27 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; export const DELETE_TITLE = (caseTitle: string) => - i18n.translate('xpack.siem.case.confirmDeleteCase.deleteTitle', { + i18n.translate('xpack.securitySolution.case.confirmDeleteCase.deleteTitle', { values: { caseTitle }, defaultMessage: 'Delete "{caseTitle}"', }); export const CONFIRM_QUESTION = i18n.translate( - 'xpack.siem.case.confirmDeleteCase.confirmQuestion', + 'xpack.securitySolution.case.confirmDeleteCase.confirmQuestion', { defaultMessage: 'By deleting this case, all related case data will be permanently removed and you will no longer be able to push data to an external incident management system. Are you sure you wish to proceed?', } ); export const DELETE_SELECTED_CASES = i18n.translate( - 'xpack.siem.case.confirmDeleteCase.selectedCases', + 'xpack.securitySolution.case.confirmDeleteCase.selectedCases', { defaultMessage: 'Delete selected cases', } ); export const CONFIRM_QUESTION_PLURAL = i18n.translate( - 'xpack.siem.case.confirmDeleteCase.confirmQuestionPlural', + 'xpack.securitySolution.case.confirmDeleteCase.confirmQuestionPlural', { defaultMessage: 'By deleting these cases, all related case data will be permanently removed and you will no longer be able to push data to an external incident management system. Are you sure you wish to proceed?', diff --git a/x-pack/plugins/siem/public/cases/components/connector_selector/form.tsx b/x-pack/plugins/security_solution/public/cases/components/connector_selector/form.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/connector_selector/form.tsx rename to x-pack/plugins/security_solution/public/cases/components/connector_selector/form.tsx diff --git a/x-pack/plugins/siem/public/cases/components/create/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/create/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/create/index.tsx b/x-pack/plugins/security_solution/public/cases/components/create/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/create/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/create/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/create/optional_field_label/index.tsx b/x-pack/plugins/security_solution/public/cases/components/create/optional_field_label/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/create/optional_field_label/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/create/optional_field_label/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/create/schema.tsx b/x-pack/plugins/security_solution/public/cases/components/create/schema.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/create/schema.tsx rename to x-pack/plugins/security_solution/public/cases/components/create/schema.tsx diff --git a/x-pack/plugins/siem/public/cases/components/edit_connector/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/edit_connector/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/edit_connector/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/edit_connector/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/edit_connector/index.tsx b/x-pack/plugins/security_solution/public/cases/components/edit_connector/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/edit_connector/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/edit_connector/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/edit_connector/schema.tsx b/x-pack/plugins/security_solution/public/cases/components/edit_connector/schema.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/edit_connector/schema.tsx rename to x-pack/plugins/security_solution/public/cases/components/edit_connector/schema.tsx diff --git a/x-pack/plugins/siem/public/cases/components/filter_popover/index.tsx b/x-pack/plugins/security_solution/public/cases/components/filter_popover/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/filter_popover/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/filter_popover/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/open_closed_stats/index.tsx b/x-pack/plugins/security_solution/public/cases/components/open_closed_stats/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/open_closed_stats/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/open_closed_stats/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/property_actions/constants.ts b/x-pack/plugins/security_solution/public/cases/components/property_actions/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/components/property_actions/constants.ts rename to x-pack/plugins/security_solution/public/cases/components/property_actions/constants.ts diff --git a/x-pack/plugins/siem/public/cases/components/property_actions/index.tsx b/x-pack/plugins/security_solution/public/cases/components/property_actions/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/property_actions/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/property_actions/index.tsx diff --git a/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts b/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts new file mode 100644 index 0000000000000..a00abcc7845b0 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts @@ -0,0 +1,14 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ACTIONS_ARIA = i18n.translate( + 'xpack.securitySolution.case.caseView.editActionsLinkAria', + { + defaultMessage: 'click to see all actions', + } +); diff --git a/x-pack/plugins/siem/public/cases/components/tag_list/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/tag_list/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/tag_list/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/tag_list/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/tag_list/index.tsx b/x-pack/plugins/security_solution/public/cases/components/tag_list/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/tag_list/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/tag_list/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/tag_list/schema.tsx b/x-pack/plugins/security_solution/public/cases/components/tag_list/schema.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/tag_list/schema.tsx rename to x-pack/plugins/security_solution/public/cases/components/tag_list/schema.tsx diff --git a/x-pack/plugins/siem/public/cases/components/tag_list/translations.ts b/x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts similarity index 66% rename from x-pack/plugins/siem/public/cases/components/tag_list/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts index f7f215248dad8..3aeb6391267f6 100644 --- a/x-pack/plugins/siem/public/cases/components/tag_list/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts @@ -8,6 +8,9 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; -export const EDIT_TAGS_ARIA = i18n.translate('xpack.siem.case.caseView.editTagsLinkAria', { - defaultMessage: 'click to edit tags', -}); +export const EDIT_TAGS_ARIA = i18n.translate( + 'xpack.securitySolution.case.caseView.editTagsLinkAria', + { + defaultMessage: 'click to edit tags', + } +); diff --git a/x-pack/plugins/siem/public/cases/components/use_push_to_service/helpers.tsx b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx similarity index 91% rename from x-pack/plugins/siem/public/cases/components/use_push_to_service/helpers.tsx rename to x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx index f0ded815fce43..919231d2f6034 100644 --- a/x-pack/plugins/siem/public/cases/components/use_push_to_service/helpers.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx @@ -16,7 +16,7 @@ export const getLicenseError = () => ({ description: ( @@ -33,7 +33,7 @@ export const getKibanaConfigError = () => ({ description: ( diff --git a/x-pack/plugins/siem/public/cases/components/use_push_to_service/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/use_push_to_service/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/use_push_to_service/index.tsx b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx similarity index 94% rename from x-pack/plugins/siem/public/cases/components/use_push_to_service/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx index 63b808eed3c92..2e9e3cce4306a 100644 --- a/x-pack/plugins/siem/public/cases/components/use_push_to_service/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx @@ -83,7 +83,7 @@ export const usePushToService = ({ description: ( @@ -103,7 +103,7 @@ export const usePushToService = ({ description: ( ), }, @@ -116,7 +116,7 @@ export const usePushToService = ({ description: ( ), errorType: 'danger', @@ -131,7 +131,7 @@ export const usePushToService = ({ description: ( ), }, diff --git a/x-pack/plugins/siem/public/cases/components/use_push_to_service/translations.ts b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts similarity index 65% rename from x-pack/plugins/siem/public/cases/components/use_push_to_service/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts index 4b55aa83ef726..f4539b8019d43 100644 --- a/x-pack/plugins/siem/public/cases/components/use_push_to_service/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts @@ -7,19 +7,19 @@ import { i18n } from '@kbn/i18n'; export const ERROR_PUSH_SERVICE_CALLOUT_TITLE = i18n.translate( - 'xpack.siem.case.caseView.errorsPushServiceCallOutTitle', + 'xpack.securitySolution.case.caseView.errorsPushServiceCallOutTitle', { defaultMessage: 'To send cases to external systems, you need to:', } ); export const PUSH_THIRD = (thirdParty: string) => { if (thirdParty === 'none') { - return i18n.translate('xpack.siem.case.caseView.pushThirdPartyIncident', { + return i18n.translate('xpack.securitySolution.case.caseView.pushThirdPartyIncident', { defaultMessage: 'Push as external incident', }); } - return i18n.translate('xpack.siem.case.caseView.pushNamedIncident', { + return i18n.translate('xpack.securitySolution.case.caseView.pushNamedIncident', { values: { thirdParty }, defaultMessage: 'Push as { thirdParty } incident', }); @@ -27,61 +27,61 @@ export const PUSH_THIRD = (thirdParty: string) => { export const UPDATE_THIRD = (thirdParty: string) => { if (thirdParty === 'none') { - return i18n.translate('xpack.siem.case.caseView.updateThirdPartyIncident', { + return i18n.translate('xpack.securitySolution.case.caseView.updateThirdPartyIncident', { defaultMessage: 'Update external incident', }); } - return i18n.translate('xpack.siem.case.caseView.updateNamedIncident', { + return i18n.translate('xpack.securitySolution.case.caseView.updateNamedIncident', { values: { thirdParty }, defaultMessage: 'Update { thirdParty } incident', }); }; export const PUSH_DISABLE_BY_NO_CONFIG_TITLE = i18n.translate( - 'xpack.siem.case.caseView.pushToServiceDisableByNoConfigTitle', + 'xpack.securitySolution.case.caseView.pushToServiceDisableByNoConfigTitle', { defaultMessage: 'Configure external connector', } ); export const PUSH_DISABLE_BY_NO_CASE_CONFIG_TITLE = i18n.translate( - 'xpack.siem.case.caseView.pushToServiceDisableByNoCaseConfigTitle', + 'xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigTitle', { defaultMessage: 'Select external connector', } ); export const PUSH_DISABLE_BECAUSE_CASE_CLOSED_TITLE = i18n.translate( - 'xpack.siem.case.caseView.pushToServiceDisableBecauseCaseClosedTitle', + 'xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedTitle', { defaultMessage: 'Reopen the case', } ); export const PUSH_DISABLE_BY_KIBANA_CONFIG_TITLE = i18n.translate( - 'xpack.siem.case.caseView.pushToServiceDisableByConfigTitle', + 'xpack.securitySolution.case.caseView.pushToServiceDisableByConfigTitle', { defaultMessage: 'Enable external service in Kibana configuration file', } ); export const PUSH_DISABLE_BY_LICENSE_TITLE = i18n.translate( - 'xpack.siem.case.caseView.pushToServiceDisableByLicenseTitle', + 'xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseTitle', { defaultMessage: 'Upgrade to Elastic Platinum', } ); export const LINK_CLOUD_DEPLOYMENT = i18n.translate( - 'xpack.siem.case.caseView.cloudDeploymentLink', + 'xpack.securitySolution.case.caseView.cloudDeploymentLink', { defaultMessage: 'cloud deployment', } ); export const LINK_CONNECTOR_CONFIGURE = i18n.translate( - 'xpack.siem.case.caseView.connectorConfigureLink', + 'xpack.securitySolution.case.caseView.connectorConfigureLink', { defaultMessage: 'connector', } diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/helpers.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/helpers.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/helpers.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/helpers.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/index.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/schema.ts b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/schema.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/schema.ts rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/schema.ts diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/translations.ts b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts similarity index 66% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts index e655329562d41..73c94477b4e73 100644 --- a/x-pack/plugins/siem/public/cases/components/user_action_tree/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts @@ -9,23 +9,26 @@ import { i18n } from '@kbn/i18n'; export * from '../case_view/translations'; export const ALREADY_PUSHED_TO_SERVICE = (externalService: string) => - i18n.translate('xpack.siem.case.caseView.alreadyPushedToExternalService', { + i18n.translate('xpack.securitySolution.case.caseView.alreadyPushedToExternalService', { values: { externalService }, defaultMessage: 'Already pushed to { externalService } incident', }); export const REQUIRED_UPDATE_TO_SERVICE = (externalService: string) => - i18n.translate('xpack.siem.case.caseView.requiredUpdateToExternalService', { + i18n.translate('xpack.securitySolution.case.caseView.requiredUpdateToExternalService', { values: { externalService }, defaultMessage: 'Requires update to { externalService } incident', }); -export const COPY_REFERENCE_LINK = i18n.translate('xpack.siem.case.caseView.copyCommentLinkAria', { - defaultMessage: 'Copy reference link', -}); +export const COPY_REFERENCE_LINK = i18n.translate( + 'xpack.securitySolution.case.caseView.copyCommentLinkAria', + { + defaultMessage: 'Copy reference link', + } +); export const MOVE_TO_ORIGINAL_COMMENT = i18n.translate( - 'xpack.siem.case.caseView.moveToCommentAria', + 'xpack.securitySolution.case.caseView.moveToCommentAria', { defaultMessage: 'Highlight the referenced comment', } diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_avatar.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_avatar.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_avatar.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_avatar.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_item.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_item.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_item.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_item.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_markdown.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_markdown.test.tsx similarity index 97% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_markdown.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_markdown.test.tsx index 8e07706d9c6ba..ae9f1ec7469e4 100644 --- a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_markdown.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_markdown.test.tsx @@ -18,7 +18,7 @@ const onSaveContent = jest.fn(); const timelineId = '1e10f150-949b-11ea-b63c-2bc51864784c'; const defaultProps = { - content: `A link to a timeline [timeline](http://localhost:5601/app/siem#/timelines?timeline=(id:'${timelineId}',isOpen:!t))`, + content: `A link to a timeline [timeline](http://localhost:5601/app/security#/timelines?timeline=(id:'${timelineId}',isOpen:!t))`, id: 'markdown-id', isEditable: false, onChangeEditable, diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_markdown.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_markdown.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_markdown.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_markdown.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_title.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_title.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_title.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_title.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_title.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_title.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_action_tree/user_action_title.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_title.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_list/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_list/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_list/index.test.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_list/index.test.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_list/index.tsx b/x-pack/plugins/security_solution/public/cases/components/user_list/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/user_list/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/user_list/index.tsx diff --git a/x-pack/plugins/siem/public/cases/components/user_list/translations.ts b/x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts similarity index 84% rename from x-pack/plugins/siem/public/cases/components/user_list/translations.ts rename to x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts index 4d50d11f39101..3439d58eb41f0 100644 --- a/x-pack/plugins/siem/public/cases/components/user_list/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const SEND_EMAIL_ARIA = (user: string) => - i18n.translate('xpack.siem.case.caseView.sendEmalLinkAria', { + i18n.translate('xpack.securitySolution.case.caseView.sendEmalLinkAria', { values: { user }, defaultMessage: 'click to send an email to {user}', }); diff --git a/x-pack/plugins/siem/public/cases/components/wrappers/index.tsx b/x-pack/plugins/security_solution/public/cases/components/wrappers/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/components/wrappers/index.tsx rename to x-pack/plugins/security_solution/public/cases/components/wrappers/index.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/__mocks__/api.ts b/x-pack/plugins/security_solution/public/cases/containers/__mocks__/api.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/__mocks__/api.ts rename to x-pack/plugins/security_solution/public/cases/containers/__mocks__/api.ts diff --git a/x-pack/plugins/siem/public/cases/containers/api.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/api.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/api.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/api.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/api.ts b/x-pack/plugins/security_solution/public/cases/containers/api.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/api.ts rename to x-pack/plugins/security_solution/public/cases/containers/api.ts diff --git a/x-pack/plugins/siem/public/cases/containers/configure/__mocks__/api.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/__mocks__/api.ts rename to x-pack/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts diff --git a/x-pack/plugins/siem/public/cases/containers/configure/api.test.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/api.test.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/api.test.ts rename to x-pack/plugins/security_solution/public/cases/containers/configure/api.test.ts diff --git a/x-pack/plugins/siem/public/cases/containers/configure/api.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/api.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/api.ts rename to x-pack/plugins/security_solution/public/cases/containers/configure/api.ts diff --git a/x-pack/plugins/siem/public/cases/containers/configure/mock.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/mock.ts rename to x-pack/plugins/security_solution/public/cases/containers/configure/mock.ts diff --git a/x-pack/plugins/siem/public/cases/containers/configure/translations.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts similarity index 63% rename from x-pack/plugins/siem/public/cases/containers/configure/translations.ts rename to x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts index dbd618f40155d..ee21167021e19 100644 --- a/x-pack/plugins/siem/public/cases/containers/configure/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts @@ -8,6 +8,9 @@ import { i18n } from '@kbn/i18n'; export * from '../translations'; -export const SUCCESS_CONFIGURE = i18n.translate('xpack.siem.case.configure.successSaveToast', { - defaultMessage: 'Saved external connection settings', -}); +export const SUCCESS_CONFIGURE = i18n.translate( + 'xpack.securitySolution.case.configure.successSaveToast', + { + defaultMessage: 'Saved external connection settings', + } +); diff --git a/x-pack/plugins/siem/public/cases/containers/configure/types.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/types.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/types.ts rename to x-pack/plugins/security_solution/public/cases/containers/configure/types.ts diff --git a/x-pack/plugins/siem/public/cases/containers/configure/use_configure.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/use_configure.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/configure/use_configure.tsx b/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/use_configure.tsx rename to x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/configure/use_connectors.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/configure/use_connectors.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/use_connectors.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/configure/use_connectors.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/configure/use_connectors.tsx b/x-pack/plugins/security_solution/public/cases/containers/configure/use_connectors.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/configure/use_connectors.tsx rename to x-pack/plugins/security_solution/public/cases/containers/configure/use_connectors.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/constants.ts b/x-pack/plugins/security_solution/public/cases/containers/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/constants.ts rename to x-pack/plugins/security_solution/public/cases/containers/constants.ts diff --git a/x-pack/plugins/siem/public/cases/containers/mock.ts b/x-pack/plugins/security_solution/public/cases/containers/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/mock.ts rename to x-pack/plugins/security_solution/public/cases/containers/mock.ts diff --git a/x-pack/plugins/siem/public/cases/containers/translations.ts b/x-pack/plugins/security_solution/public/cases/containers/translations.ts similarity index 67% rename from x-pack/plugins/siem/public/cases/containers/translations.ts rename to x-pack/plugins/security_solution/public/cases/containers/translations.ts index 79edcc56b0362..96d2ec2f874db 100644 --- a/x-pack/plugins/siem/public/cases/containers/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/translations.ts @@ -6,22 +6,25 @@ import { i18n } from '@kbn/i18n'; -export const ERROR_TITLE = i18n.translate('xpack.siem.containers.case.errorTitle', { +export const ERROR_TITLE = i18n.translate('xpack.securitySolution.containers.case.errorTitle', { defaultMessage: 'Error fetching data', }); -export const ERROR_DELETING = i18n.translate('xpack.siem.containers.case.errorDeletingTitle', { - defaultMessage: 'Error deleting data', -}); +export const ERROR_DELETING = i18n.translate( + 'xpack.securitySolution.containers.case.errorDeletingTitle', + { + defaultMessage: 'Error deleting data', + } +); export const UPDATED_CASE = (caseTitle: string) => - i18n.translate('xpack.siem.containers.case.updatedCase', { + i18n.translate('xpack.securitySolution.containers.case.updatedCase', { values: { caseTitle }, defaultMessage: 'Updated "{caseTitle}"', }); export const DELETED_CASES = (totalCases: number, caseTitle?: string) => - i18n.translate('xpack.siem.containers.case.deletedCases', { + i18n.translate('xpack.securitySolution.containers.case.deletedCases', { values: { caseTitle, totalCases }, defaultMessage: 'Deleted {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}}', }); @@ -33,7 +36,7 @@ export const CLOSED_CASES = ({ totalCases: number; caseTitle?: string; }) => - i18n.translate('xpack.siem.containers.case.closedCases', { + i18n.translate('xpack.securitySolution.containers.case.closedCases', { values: { caseTitle, totalCases }, defaultMessage: 'Closed {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}}', }); @@ -45,19 +48,19 @@ export const REOPENED_CASES = ({ totalCases: number; caseTitle?: string; }) => - i18n.translate('xpack.siem.containers.case.reopenedCases', { + i18n.translate('xpack.securitySolution.containers.case.reopenedCases', { values: { caseTitle, totalCases }, defaultMessage: 'Reopened {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}}', }); export const SUCCESS_SEND_TO_EXTERNAL_SERVICE = (serviceName: string) => - i18n.translate('xpack.siem.containers.case.pushToExternalService', { + i18n.translate('xpack.securitySolution.containers.case.pushToExternalService', { values: { serviceName }, defaultMessage: 'Successfully sent to { serviceName }', }); export const ERROR_PUSH_TO_SERVICE = i18n.translate( - 'xpack.siem.case.configure.errorPushingToService', + 'xpack.securitySolution.case.configure.errorPushingToService', { defaultMessage: 'Error pushing to service', } diff --git a/x-pack/plugins/siem/public/cases/containers/types.ts b/x-pack/plugins/security_solution/public/cases/containers/types.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/types.ts rename to x-pack/plugins/security_solution/public/cases/containers/types.ts diff --git a/x-pack/plugins/siem/public/cases/containers/use_bulk_update_case.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_bulk_update_case.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_bulk_update_case.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_bulk_update_case.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_delete_cases.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_delete_cases.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_delete_cases.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_delete_cases.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_action_license.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_action_license.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_action_license.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_action_license.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_action_license.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_action_license.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_action_license.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_action_license.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_case.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_case.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_case.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_case.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_case.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_case.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_case.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_case.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_case_user_actions.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_case_user_actions.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_case_user_actions.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_case_user_actions.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_cases.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_cases.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_cases.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_cases.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_cases.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_cases.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_cases.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_cases.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_cases_status.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_cases_status.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_cases_status.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_cases_status.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_cases_status.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_cases_status.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_cases_status.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_cases_status.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_reporters.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_reporters.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_reporters.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_reporters.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_tags.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_tags.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_tags.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_tags.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_get_tags.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_tags.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_get_tags.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_get_tags.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_post_case.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_case.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_post_case.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_post_case.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_post_case.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_case.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_post_case.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_post_case.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_post_comment.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_post_comment.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_post_comment.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_post_comment.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_post_comment.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_post_comment.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_post_push_to_service.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_post_push_to_service.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_post_push_to_service.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_post_push_to_service.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_update_case.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_update_case.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_update_case.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_update_case.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_update_case.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_update_case.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_update_case.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_update_case.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_update_comment.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_update_comment.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_update_comment.test.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_update_comment.test.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/use_update_comment.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_update_comment.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/use_update_comment.tsx rename to x-pack/plugins/security_solution/public/cases/containers/use_update_comment.tsx diff --git a/x-pack/plugins/siem/public/cases/containers/utils.ts b/x-pack/plugins/security_solution/public/cases/containers/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/containers/utils.ts rename to x-pack/plugins/security_solution/public/cases/containers/utils.ts diff --git a/x-pack/plugins/siem/public/cases/index.ts b/x-pack/plugins/security_solution/public/cases/index.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/index.ts rename to x-pack/plugins/security_solution/public/cases/index.ts diff --git a/x-pack/plugins/siem/public/cases/pages/case.tsx b/x-pack/plugins/security_solution/public/cases/pages/case.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/case.tsx rename to x-pack/plugins/security_solution/public/cases/pages/case.tsx diff --git a/x-pack/plugins/siem/public/cases/pages/case_details.tsx b/x-pack/plugins/security_solution/public/cases/pages/case_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/case_details.tsx rename to x-pack/plugins/security_solution/public/cases/pages/case_details.tsx diff --git a/x-pack/plugins/siem/public/cases/pages/configure_cases.tsx b/x-pack/plugins/security_solution/public/cases/pages/configure_cases.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/configure_cases.tsx rename to x-pack/plugins/security_solution/public/cases/pages/configure_cases.tsx diff --git a/x-pack/plugins/siem/public/cases/pages/create_case.tsx b/x-pack/plugins/security_solution/public/cases/pages/create_case.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/create_case.tsx rename to x-pack/plugins/security_solution/public/cases/pages/create_case.tsx diff --git a/x-pack/plugins/siem/public/cases/pages/index.tsx b/x-pack/plugins/security_solution/public/cases/pages/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/index.tsx rename to x-pack/plugins/security_solution/public/cases/pages/index.tsx diff --git a/x-pack/plugins/siem/public/cases/pages/saved_object_no_permissions.tsx b/x-pack/plugins/security_solution/public/cases/pages/saved_object_no_permissions.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/saved_object_no_permissions.tsx rename to x-pack/plugins/security_solution/public/cases/pages/saved_object_no_permissions.tsx diff --git a/x-pack/plugins/security_solution/public/cases/pages/translations.ts b/x-pack/plugins/security_solution/public/cases/pages/translations.ts new file mode 100644 index 0000000000000..5b595c5892ef2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/pages/translations.ts @@ -0,0 +1,232 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const SAVED_OBJECT_NO_PERMISSIONS_TITLE = i18n.translate( + 'xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle', + { + defaultMessage: 'Kibana feature privileges required', + } +); + +export const SAVED_OBJECT_NO_PERMISSIONS_MSG = i18n.translate( + 'xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage', + { + defaultMessage: + 'To view cases, you must have privileges for the Saved Object Management feature in the Kibana space. For more information, contact your Kibana administrator.', + } +); + +export const BACK_TO_ALL = i18n.translate('xpack.securitySolution.case.caseView.backLabel', { + defaultMessage: 'Back to cases', +}); + +export const CANCEL = i18n.translate('xpack.securitySolution.case.caseView.cancel', { + defaultMessage: 'Cancel', +}); + +export const DELETE_CASE = i18n.translate( + 'xpack.securitySolution.case.confirmDeleteCase.deleteCase', + { + defaultMessage: 'Delete case', + } +); + +export const DELETE_CASES = i18n.translate( + 'xpack.securitySolution.case.confirmDeleteCase.deleteCases', + { + defaultMessage: 'Delete cases', + } +); + +export const NAME = i18n.translate('xpack.securitySolution.case.caseView.name', { + defaultMessage: 'Name', +}); + +export const OPENED_ON = i18n.translate('xpack.securitySolution.case.caseView.openedOn', { + defaultMessage: 'Opened on', +}); + +export const CLOSED_ON = i18n.translate('xpack.securitySolution.case.caseView.closedOn', { + defaultMessage: 'Closed on', +}); + +export const REPORTER = i18n.translate('xpack.securitySolution.case.caseView.reporterLabel', { + defaultMessage: 'Reporter', +}); + +export const PARTICIPANTS = i18n.translate( + 'xpack.securitySolution.case.caseView.particpantsLabel', + { + defaultMessage: 'Participants', + } +); + +export const CREATE_BC_TITLE = i18n.translate('xpack.securitySolution.case.caseView.breadcrumb', { + defaultMessage: 'Create', +}); + +export const CREATE_TITLE = i18n.translate('xpack.securitySolution.case.caseView.create', { + defaultMessage: 'Create new case', +}); + +export const DESCRIPTION = i18n.translate('xpack.securitySolution.case.caseView.description', { + defaultMessage: 'Description', +}); + +export const DESCRIPTION_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.createCase.descriptionFieldRequiredError', + { + defaultMessage: 'A description is required.', + } +); + +export const COMMENT_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.caseView.commentFieldRequiredError', + { + defaultMessage: 'A comment is required.', + } +); + +export const REQUIRED_FIELD = i18n.translate( + 'xpack.securitySolution.case.caseView.fieldRequiredError', + { + defaultMessage: 'Required field', + } +); + +export const EDIT = i18n.translate('xpack.securitySolution.case.caseView.edit', { + defaultMessage: 'Edit', +}); + +export const OPTIONAL = i18n.translate('xpack.securitySolution.case.caseView.optional', { + defaultMessage: 'Optional', +}); + +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.case.pageTitle', { + defaultMessage: 'Cases', +}); + +export const CREATE_CASE = i18n.translate('xpack.securitySolution.case.caseView.createCase', { + defaultMessage: 'Create case', +}); + +export const CLOSED_CASE = i18n.translate('xpack.securitySolution.case.caseView.closedCase', { + defaultMessage: 'Closed case', +}); + +export const CLOSE_CASE = i18n.translate('xpack.securitySolution.case.caseView.closeCase', { + defaultMessage: 'Close case', +}); + +export const REOPEN_CASE = i18n.translate('xpack.securitySolution.case.caseView.reopenCase', { + defaultMessage: 'Reopen case', +}); + +export const REOPENED_CASE = i18n.translate('xpack.securitySolution.case.caseView.reopenedCase', { + defaultMessage: 'Reopened case', +}); + +export const CASE_NAME = i18n.translate('xpack.securitySolution.case.caseView.caseName', { + defaultMessage: 'Case name', +}); + +export const TO = i18n.translate('xpack.securitySolution.case.caseView.to', { + defaultMessage: 'to', +}); + +export const TAGS = i18n.translate('xpack.securitySolution.case.caseView.tags', { + defaultMessage: 'Tags', +}); + +export const ACTIONS = i18n.translate('xpack.securitySolution.case.allCases.actions', { + defaultMessage: 'Actions', +}); + +export const NO_TAGS_AVAILABLE = i18n.translate( + 'xpack.securitySolution.case.allCases.noTagsAvailable', + { + defaultMessage: 'No tags available', + } +); + +export const NO_REPORTERS_AVAILABLE = i18n.translate( + 'xpack.securitySolution.case.caseView.noReportersAvailable', + { + defaultMessage: 'No reporters available.', + } +); + +export const COMMENTS = i18n.translate('xpack.securitySolution.case.allCases.comments', { + defaultMessage: 'Comments', +}); + +export const TAGS_HELP = i18n.translate( + 'xpack.securitySolution.case.createCase.fieldTagsHelpText', + { + defaultMessage: + 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', + } +); + +export const NO_TAGS = i18n.translate('xpack.securitySolution.case.caseView.noTags', { + defaultMessage: 'No tags are currently assigned to this case.', +}); + +export const TITLE_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.createCase.titleFieldRequiredError', + { + defaultMessage: 'A title is required.', + } +); + +export const CONFIGURE_CASES_PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.case.configureCases.headerTitle', + { + defaultMessage: 'Configure cases', + } +); + +export const CONFIGURE_CASES_BUTTON = i18n.translate( + 'xpack.securitySolution.case.configureCasesButton', + { + defaultMessage: 'Edit external connection', + } +); + +export const ADD_COMMENT = i18n.translate( + 'xpack.securitySolution.case.caseView.comment.addComment', + { + defaultMessage: 'Add comment', + } +); + +export const ADD_COMMENT_HELP_TEXT = i18n.translate( + 'xpack.securitySolution.case.caseView.comment.addCommentHelpText', + { + defaultMessage: 'Add a new comment...', + } +); + +export const SAVE = i18n.translate('xpack.securitySolution.case.caseView.description.save', { + defaultMessage: 'Save', +}); + +export const GO_TO_DOCUMENTATION = i18n.translate( + 'xpack.securitySolution.case.caseView.goToDocumentationButton', + { + defaultMessage: 'View documentation', + } +); + +export const CONNECTORS = i18n.translate('xpack.securitySolution.case.caseView.connectors', { + defaultMessage: 'External incident management system', +}); + +export const EDIT_CONNECTOR = i18n.translate('xpack.securitySolution.case.caseView.editConnector', { + defaultMessage: 'Change external incident management system', +}); diff --git a/x-pack/plugins/siem/public/cases/pages/utils.ts b/x-pack/plugins/security_solution/public/cases/pages/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/cases/pages/utils.ts rename to x-pack/plugins/security_solution/public/cases/pages/utils.ts diff --git a/x-pack/plugins/siem/public/cases/routes.tsx b/x-pack/plugins/security_solution/public/cases/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/cases/routes.tsx rename to x-pack/plugins/security_solution/public/cases/routes.tsx diff --git a/x-pack/plugins/security_solution/public/cases/translations.ts b/x-pack/plugins/security_solution/public/cases/translations.ts new file mode 100644 index 0000000000000..5b595c5892ef2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/cases/translations.ts @@ -0,0 +1,232 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const SAVED_OBJECT_NO_PERMISSIONS_TITLE = i18n.translate( + 'xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle', + { + defaultMessage: 'Kibana feature privileges required', + } +); + +export const SAVED_OBJECT_NO_PERMISSIONS_MSG = i18n.translate( + 'xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage', + { + defaultMessage: + 'To view cases, you must have privileges for the Saved Object Management feature in the Kibana space. For more information, contact your Kibana administrator.', + } +); + +export const BACK_TO_ALL = i18n.translate('xpack.securitySolution.case.caseView.backLabel', { + defaultMessage: 'Back to cases', +}); + +export const CANCEL = i18n.translate('xpack.securitySolution.case.caseView.cancel', { + defaultMessage: 'Cancel', +}); + +export const DELETE_CASE = i18n.translate( + 'xpack.securitySolution.case.confirmDeleteCase.deleteCase', + { + defaultMessage: 'Delete case', + } +); + +export const DELETE_CASES = i18n.translate( + 'xpack.securitySolution.case.confirmDeleteCase.deleteCases', + { + defaultMessage: 'Delete cases', + } +); + +export const NAME = i18n.translate('xpack.securitySolution.case.caseView.name', { + defaultMessage: 'Name', +}); + +export const OPENED_ON = i18n.translate('xpack.securitySolution.case.caseView.openedOn', { + defaultMessage: 'Opened on', +}); + +export const CLOSED_ON = i18n.translate('xpack.securitySolution.case.caseView.closedOn', { + defaultMessage: 'Closed on', +}); + +export const REPORTER = i18n.translate('xpack.securitySolution.case.caseView.reporterLabel', { + defaultMessage: 'Reporter', +}); + +export const PARTICIPANTS = i18n.translate( + 'xpack.securitySolution.case.caseView.particpantsLabel', + { + defaultMessage: 'Participants', + } +); + +export const CREATE_BC_TITLE = i18n.translate('xpack.securitySolution.case.caseView.breadcrumb', { + defaultMessage: 'Create', +}); + +export const CREATE_TITLE = i18n.translate('xpack.securitySolution.case.caseView.create', { + defaultMessage: 'Create new case', +}); + +export const DESCRIPTION = i18n.translate('xpack.securitySolution.case.caseView.description', { + defaultMessage: 'Description', +}); + +export const DESCRIPTION_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.createCase.descriptionFieldRequiredError', + { + defaultMessage: 'A description is required.', + } +); + +export const COMMENT_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.caseView.commentFieldRequiredError', + { + defaultMessage: 'A comment is required.', + } +); + +export const REQUIRED_FIELD = i18n.translate( + 'xpack.securitySolution.case.caseView.fieldRequiredError', + { + defaultMessage: 'Required field', + } +); + +export const EDIT = i18n.translate('xpack.securitySolution.case.caseView.edit', { + defaultMessage: 'Edit', +}); + +export const OPTIONAL = i18n.translate('xpack.securitySolution.case.caseView.optional', { + defaultMessage: 'Optional', +}); + +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.case.pageTitle', { + defaultMessage: 'Cases', +}); + +export const CREATE_CASE = i18n.translate('xpack.securitySolution.case.caseView.createCase', { + defaultMessage: 'Create case', +}); + +export const CLOSED_CASE = i18n.translate('xpack.securitySolution.case.caseView.closedCase', { + defaultMessage: 'Closed case', +}); + +export const CLOSE_CASE = i18n.translate('xpack.securitySolution.case.caseView.closeCase', { + defaultMessage: 'Close case', +}); + +export const REOPEN_CASE = i18n.translate('xpack.securitySolution.case.caseView.reopenCase', { + defaultMessage: 'Reopen case', +}); + +export const REOPENED_CASE = i18n.translate('xpack.securitySolution.case.caseView.reopenedCase', { + defaultMessage: 'Reopened case', +}); + +export const CASE_NAME = i18n.translate('xpack.securitySolution.case.caseView.caseName', { + defaultMessage: 'Case name', +}); + +export const TO = i18n.translate('xpack.securitySolution.case.caseView.to', { + defaultMessage: 'to', +}); + +export const TAGS = i18n.translate('xpack.securitySolution.case.caseView.tags', { + defaultMessage: 'Tags', +}); + +export const ACTIONS = i18n.translate('xpack.securitySolution.case.allCases.actions', { + defaultMessage: 'Actions', +}); + +export const NO_TAGS_AVAILABLE = i18n.translate( + 'xpack.securitySolution.case.allCases.noTagsAvailable', + { + defaultMessage: 'No tags available', + } +); + +export const NO_REPORTERS_AVAILABLE = i18n.translate( + 'xpack.securitySolution.case.caseView.noReportersAvailable', + { + defaultMessage: 'No reporters available.', + } +); + +export const COMMENTS = i18n.translate('xpack.securitySolution.case.allCases.comments', { + defaultMessage: 'Comments', +}); + +export const TAGS_HELP = i18n.translate( + 'xpack.securitySolution.case.createCase.fieldTagsHelpText', + { + defaultMessage: + 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', + } +); + +export const NO_TAGS = i18n.translate('xpack.securitySolution.case.caseView.noTags', { + defaultMessage: 'No tags are currently assigned to this case.', +}); + +export const TITLE_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.createCase.titleFieldRequiredError', + { + defaultMessage: 'A title is required.', + } +); + +export const CONFIGURE_CASES_PAGE_TITLE = i18n.translate( + 'xpack.securitySolution.case.configureCases.headerTitle', + { + defaultMessage: 'Configure cases', + } +); + +export const CONFIGURE_CASES_BUTTON = i18n.translate( + 'xpack.securitySolution.case.configureCasesButton', + { + defaultMessage: 'Edit external connection', + } +); + +export const ADD_COMMENT = i18n.translate( + 'xpack.securitySolution.case.caseView.comment.addComment', + { + defaultMessage: 'Add comment', + } +); + +export const ADD_COMMENT_HELP_TEXT = i18n.translate( + 'xpack.securitySolution.case.caseView.comment.addCommentHelpText', + { + defaultMessage: 'Add a new comment...', + } +); + +export const SAVE = i18n.translate('xpack.securitySolution.case.caseView.description.save', { + defaultMessage: 'Save', +}); + +export const GO_TO_DOCUMENTATION = i18n.translate( + 'xpack.securitySolution.case.caseView.goToDocumentationButton', + { + defaultMessage: 'View documentation', + } +); + +export const CONNECTORS = i18n.translate('xpack.securitySolution.case.caseView.connectors', { + defaultMessage: 'External incident management system', +}); + +export const EDIT_CONNECTOR = i18n.translate('xpack.securitySolution.case.caseView.editConnector', { + defaultMessage: 'Change external incident management system', +}); diff --git a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/helpers.ts b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/index.tsx rename to x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/translations.ts b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/translations.ts similarity index 73% rename from x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/translations.ts rename to x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/translations.ts index f192c5c26fa49..c4f36bd7dd881 100644 --- a/x-pack/plugins/siem/public/common/components/add_filter_to_global_search_bar/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/add_filter_to_global_search_bar/translations.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; export const FILTER_FOR_VALUE = i18n.translate( - 'xpack.siem.add_filter_to_global_search_bar.filterForValueHoverAction', + 'xpack.securitySolution.add_filter_to_global_search_bar.filterForValueHoverAction', { defaultMessage: 'Filter for value', } ); export const FILTER_OUT_VALUE = i18n.translate( - 'xpack.siem.add_filter_to_global_search_bar.filterOutValueHoverAction', + 'xpack.securitySolution.add_filter_to_global_search_bar.filterOutValueHoverAction', { defaultMessage: 'Filter out value', } diff --git a/x-pack/plugins/siem/public/common/components/alerts_viewer/alerts_table.tsx b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/alerts_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/alerts_viewer/alerts_table.tsx rename to x-pack/plugins/security_solution/public/common/components/alerts_viewer/alerts_table.tsx diff --git a/x-pack/plugins/siem/public/common/components/alerts_viewer/default_headers.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/default_headers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/alerts_viewer/default_headers.ts rename to x-pack/plugins/security_solution/public/common/components/alerts_viewer/default_headers.ts diff --git a/x-pack/plugins/siem/public/common/components/alerts_viewer/histogram_configs.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/histogram_configs.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/alerts_viewer/histogram_configs.ts rename to x-pack/plugins/security_solution/public/common/components/alerts_viewer/histogram_configs.ts diff --git a/x-pack/plugins/siem/public/common/components/alerts_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/alerts_viewer/index.tsx rename to x-pack/plugins/security_solution/public/common/components/alerts_viewer/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/translations.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/translations.ts new file mode 100644 index 0000000000000..8403050a13114 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/translations.ts @@ -0,0 +1,67 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ALERTS_DOCUMENT_TYPE = i18n.translate( + 'xpack.securitySolution.alertsView.alertsDocumentType', + { + defaultMessage: 'External alerts', + } +); + +export const TOTAL_COUNT_OF_ALERTS = i18n.translate( + 'xpack.securitySolution.alertsView.totalCountOfAlerts', + { + defaultMessage: 'external alerts match the search criteria', + } +); + +export const ALERTS_TABLE_TITLE = i18n.translate( + 'xpack.securitySolution.alertsView.alertsTableTitle', + { + defaultMessage: 'External alerts', + } +); + +export const ALERTS_GRAPH_TITLE = i18n.translate( + 'xpack.securitySolution.alertsView.alertsGraphTitle', + { + defaultMessage: 'External alert count', + } +); + +export const ALERTS_STACK_BY_MODULE = i18n.translate( + 'xpack.securitySolution.alertsView.alertsStackByOptions.module', + { + defaultMessage: 'module', + } +); + +export const SHOWING = i18n.translate('xpack.securitySolution.alertsView.showing', { + defaultMessage: 'Showing', +}); + +export const UNIT = (totalCount: number) => + i18n.translate('xpack.securitySolution.alertsView.unit', { + values: { totalCount }, + defaultMessage: `external {totalCount, plural, =1 {alert} other {alerts}}`, + }); + +export const ERROR_FETCHING_ALERTS_DATA = i18n.translate( + 'xpack.securitySolution.alertsView.errorFetchingAlertsData', + { + defaultMessage: 'Failed to query alerts data', + } +); + +export const CATEGORY = i18n.translate('xpack.securitySolution.alertsView.categoryLabel', { + defaultMessage: 'category', +}); + +export const MODULE = i18n.translate('xpack.securitySolution.alertsView.moduleLabel', { + defaultMessage: 'module', +}); diff --git a/x-pack/plugins/siem/public/common/components/alerts_viewer/types.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/alerts_viewer/types.ts rename to x-pack/plugins/security_solution/public/common/components/alerts_viewer/types.ts diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx new file mode 100644 index 0000000000000..f939cf81d1bd3 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx @@ -0,0 +1,39 @@ +/* + * 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 { storiesOf } from '@storybook/react'; +import React from 'react'; +import { ThemeProvider } from 'styled-components'; +import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; +import { EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; + +import { AndOrBadge } from '..'; + +const sampleText = + 'Doggo ipsum i am bekom fat snoot wow such tempt waggy wags floofs, ruff heckin good boys and girls mlem. Ruff heckin good boys and girls mlem stop it fren borkf borking doggo very hand that feed shibe, you are doing me the shock big ol heck smol borking doggo with a long snoot for pats heckin good boys. You are doing me the shock smol borking doggo with a long snoot for pats wow very biscit, length boy. Doggo ipsum i am bekom fat snoot wow such tempt waggy wags floofs, ruff heckin good boys and girls mlem. Ruff heckin good boys and girls mlem stop it fren borkf borking doggo very hand that feed shibe, you are doing me the shock big ol heck smol borking doggo with a long snoot for pats heckin good boys.'; + +storiesOf('components/AndOrBadge', module) + .add('and', () => ( + ({ eui: euiLightVars, darkMode: true })}> + + + )) + .add('or', () => ( + ({ eui: euiLightVars, darkMode: true })}> + + + )) + .add('antennas', () => ( + ({ eui: euiLightVars, darkMode: true })}> + + + + + +

{sampleText}

+
+
+
+ )); diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx new file mode 100644 index 0000000000000..ed918a59a514a --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx @@ -0,0 +1,48 @@ +/* + * 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 from 'react'; +import { ThemeProvider } from 'styled-components'; +import { mount } from 'enzyme'; +import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; + +import { AndOrBadge } from './'; + +describe('AndOrBadge', () => { + test('it renders top and bottom antenna bars when "includeAntennas" is true', () => { + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="and-or-badge"]').at(0).text()).toEqual('AND'); + expect(wrapper.find('EuiFlexItem[data-test-subj="andOrBadgeBarTop"]')).toHaveLength(1); + expect(wrapper.find('EuiFlexItem[data-test-subj="andOrBadgeBarBottom"]')).toHaveLength(1); + }); + + test('it renders "and" when "type" is "and"', () => { + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="and-or-badge"]').at(0).text()).toEqual('AND'); + expect(wrapper.find('EuiFlexItem[data-test-subj="and-or-badge-bar"]')).toHaveLength(0); + }); + + test('it renders "or" when "type" is "or"', () => { + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="and-or-badge"]').at(0).text()).toEqual('OR'); + expect(wrapper.find('EuiFlexItem[data-test-subj="and-or-badge-bar"]')).toHaveLength(0); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.tsx new file mode 100644 index 0000000000000..ba3f880d9757e --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.tsx @@ -0,0 +1,108 @@ +/* + * 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 { EuiFlexGroup, EuiBadge, EuiFlexItem } from '@elastic/eui'; +import React from 'react'; +import styled, { css } from 'styled-components'; + +import * as i18n from './translations'; + +const AndOrBadgeAntenna = styled(EuiFlexItem)` + ${({ theme }) => css` + background: ${theme.eui.euiColorLightShade}; + position: relative; + width: 2px; + &:after { + background: ${theme.eui.euiColorLightShade}; + content: ''; + height: 8px; + right: -4px; + position: absolute; + width: 9px; + clip-path: circle(); + } + &.topAndOrBadgeAntenna { + &:after { + top: -1px; + } + } + &.bottomAndOrBadgeAntenna { + &:after { + bottom: -1px; + } + } + &.euiFlexItem { + margin: 0 12px 0 0; + } + `} +`; + +const EuiFlexItemWrapper = styled(EuiFlexItem)` + &.euiFlexItem { + margin: 0 12px 0 0; + } +`; + +const RoundedBadge = (styled(EuiBadge)` + align-items: center; + border-radius: 100%; + display: inline-flex; + font-size: 9px; + height: 34px; + justify-content: center; + margin: 0 5px 0 5px; + padding: 7px 6px 4px 6px; + user-select: none; + width: 34px; + .euiBadge__content { + position: relative; + top: -1px; + } + .euiBadge__text { + text-overflow: clip; + } +` as unknown) as typeof EuiBadge; + +RoundedBadge.displayName = 'RoundedBadge'; + +export type AndOr = 'and' | 'or'; + +/** Displays AND / OR in a round badge */ +// Ref: https://github.com/elastic/eui/issues/1655 +export const AndOrBadge = React.memo<{ type: AndOr; includeAntennas?: boolean }>( + ({ type, includeAntennas = false }) => { + const getBadge = () => ( + + {type === 'and' ? i18n.AND : i18n.OR} + + ); + + const getBadgeWithAntennas = () => ( + + + {getBadge()} + + + ); + + return includeAntennas ? getBadgeWithAntennas() : getBadge(); + } +); + +AndOrBadge.displayName = 'AndOrBadge'; diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/translations.ts b/x-pack/plugins/security_solution/public/common/components/and_or_badge/translations.ts similarity index 68% rename from x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/translations.ts rename to x-pack/plugins/security_solution/public/common/components/and_or_badge/translations.ts index 58bcb5130a529..390652738363f 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/translations.ts @@ -6,10 +6,10 @@ import { i18n } from '@kbn/i18n'; -export const AND = i18n.translate('xpack.siem.andOrBadge.and', { +export const AND = i18n.translate('xpack.securitySolution.andOrBadge.and', { defaultMessage: 'AND', }); -export const OR = i18n.translate('xpack.siem.andOrBadge.or', { +export const OR = i18n.translate('xpack.securitySolution.andOrBadge.or', { defaultMessage: 'OR', }); diff --git a/x-pack/plugins/siem/public/common/components/autocomplete_field/__examples__/index.stories.tsx b/x-pack/plugins/security_solution/public/common/components/autocomplete_field/__examples__/index.stories.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/autocomplete_field/__examples__/index.stories.tsx rename to x-pack/plugins/security_solution/public/common/components/autocomplete_field/__examples__/index.stories.tsx diff --git a/x-pack/plugins/siem/public/common/components/autocomplete_field/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/autocomplete_field/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/autocomplete_field/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/autocomplete_field/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/autocomplete_field/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/autocomplete_field/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/autocomplete_field/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/autocomplete_field/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/autocomplete_field/index.tsx b/x-pack/plugins/security_solution/public/common/components/autocomplete_field/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/autocomplete_field/index.tsx rename to x-pack/plugins/security_solution/public/common/components/autocomplete_field/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/autocomplete_field/suggestion_item.tsx b/x-pack/plugins/security_solution/public/common/components/autocomplete_field/suggestion_item.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/autocomplete_field/suggestion_item.tsx rename to x-pack/plugins/security_solution/public/common/components/autocomplete_field/suggestion_item.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/__snapshots__/areachart.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/charts/__snapshots__/areachart.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/__snapshots__/areachart.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/charts/__snapshots__/areachart.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/charts/__snapshots__/barchart.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/charts/__snapshots__/barchart.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/__snapshots__/barchart.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/charts/__snapshots__/barchart.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/charts/areachart.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/areachart.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/areachart.test.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/areachart.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/areachart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/areachart.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/barchart.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/barchart.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/barchart.test.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/barchart.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/barchart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/barchart.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/chart_place_holder.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/chart_place_holder.test.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/chart_place_holder.tsx b/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/chart_place_holder.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/common.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/common.test.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/common.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/common.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/common.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/draggable_legend.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/draggable_legend.test.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/draggable_legend.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/draggable_legend.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/draggable_legend_item.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/draggable_legend_item.test.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/charts/draggable_legend_item.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/charts/draggable_legend_item.tsx rename to x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/charts/translation.ts b/x-pack/plugins/security_solution/public/common/components/charts/translation.ts new file mode 100644 index 0000000000000..68b90af65aefa --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/charts/translation.ts @@ -0,0 +1,25 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ALL_VALUES_ZEROS_TITLE = i18n.translate( + 'xpack.securitySolution.chart.dataAllValuesZerosTitle', + { + defaultMessage: 'All values returned zero', + } +); + +export const DATA_NOT_AVAILABLE_TITLE = i18n.translate( + 'xpack.securitySolution.chart.dataNotAvailableTitle', + { + defaultMessage: 'Chart Data Not Available', + } +); + +export const ALL_OTHERS = i18n.translate('xpack.securitySolution.chart.allOthersGroupingLabel', { + defaultMessage: 'All others', +}); diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/drag_drop_context.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/drag_drop_context.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/drag_drop_context_wrapper.test.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/drag_drop_context_wrapper.test.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper.test.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper.test.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/droppable_wrapper.test.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/droppable_wrapper.test.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/droppable_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/droppable_wrapper.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.tsx diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts similarity index 99% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts index be58381fbca1b..afdfde6e08224 100644 --- a/x-pack/plugins/siem/public/common/components/drag_and_drop/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts @@ -960,7 +960,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); @@ -981,7 +981,7 @@ describe('helpers', () => { payload: { id: 'hosts-table-hostName-ENDPOINT-W-0-01', }, - type: 'x-pack/siem/local/drag_and_drop/NO_PROVIDER_FOUND', + type: 'x-pack/security_solution/local/drag_and_drop/NO_PROVIDER_FOUND', }); }); }); diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/helpers.ts b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/provider_container.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/provider_container.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/drag_and_drop/provider_container.tsx rename to x-pack/plugins/security_solution/public/common/components/drag_and_drop/provider_container.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/translations.ts b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/translations.ts new file mode 100644 index 0000000000000..574b2c190e1db --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/translations.ts @@ -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 { i18n } from '@kbn/i18n'; + +export const ADD_TO_TIMELINE = i18n.translate('xpack.securitySolution.dragAndDrop.addToTimeline', { + defaultMessage: 'Add to timeline investigation', +}); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.dragAndDrop.copyToClipboardTooltip', + { + defaultMessage: 'Copy to Clipboard', + } +); + +export const FIELD = i18n.translate('xpack.securitySolution.dragAndDrop.fieldLabel', { + defaultMessage: 'Field', +}); + +export const FILTER_FOR_VALUE = i18n.translate( + 'xpack.securitySolution.dragAndDrop.filterForValueHoverAction', + { + defaultMessage: 'Filter for value', + } +); + +export const FILTER_OUT_VALUE = i18n.translate( + 'xpack.securitySolution.dragAndDrop.filterOutValueHoverAction', + { + defaultMessage: 'Filter out value', + } +); + +export const CLOSE = i18n.translate('xpack.securitySolution.dragAndDrop.closeButtonLabel', { + defaultMessage: 'Close', +}); + +export const SHOW_TOP = (fieldName: string) => + i18n.translate('xpack.securitySolution.overview.showTopTooltip', { + values: { fieldName }, + defaultMessage: `Show top {fieldName}`, + }); diff --git a/x-pack/plugins/siem/public/common/components/draggables/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/draggables/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/draggables/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/draggables/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/draggables/field_badge/index.tsx b/x-pack/plugins/security_solution/public/common/components/draggables/field_badge/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/draggables/field_badge/index.tsx rename to x-pack/plugins/security_solution/public/common/components/draggables/field_badge/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/draggables/field_badge/translations.ts b/x-pack/plugins/security_solution/public/common/components/draggables/field_badge/translations.ts new file mode 100644 index 0000000000000..8d378c9a05a70 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/draggables/field_badge/translations.ts @@ -0,0 +1,33 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const CATEGORY = i18n.translate('xpack.securitySolution.draggables.field.categoryLabel', { + defaultMessage: 'Category', +}); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.eventDetails.copyToClipboardTooltip', + { + defaultMessage: 'Copy to Clipboard', + } +); + +export const FIELD = i18n.translate('xpack.securitySolution.draggables.field.fieldLabel', { + defaultMessage: 'Field', +}); + +export const TYPE = i18n.translate('xpack.securitySolution.draggables.field.typeLabel', { + defaultMessage: 'Type', +}); + +export const VIEW_CATEGORY = i18n.translate( + 'xpack.securitySolution.draggables.field.viewCategoryTooltip', + { + defaultMessage: 'View Category', + } +); diff --git a/x-pack/plugins/siem/public/common/components/draggables/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/draggables/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/draggables/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/draggables/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/draggables/index.tsx b/x-pack/plugins/security_solution/public/common/components/draggables/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/draggables/index.tsx rename to x-pack/plugins/security_solution/public/common/components/draggables/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/empty_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/empty_page/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/empty_page/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/empty_page/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/empty_page/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/empty_page/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/empty_page/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/empty_page/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/empty_page/index.tsx b/x-pack/plugins/security_solution/public/common/components/empty_page/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/empty_page/index.tsx rename to x-pack/plugins/security_solution/public/common/components/empty_page/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/empty_value/__snapshots__/empty_value.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/empty_value/__snapshots__/empty_value.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/empty_value/__snapshots__/empty_value.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/empty_value/__snapshots__/empty_value.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/empty_value/empty_value.test.tsx b/x-pack/plugins/security_solution/public/common/components/empty_value/empty_value.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/empty_value/empty_value.test.tsx rename to x-pack/plugins/security_solution/public/common/components/empty_value/empty_value.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/empty_value/index.tsx b/x-pack/plugins/security_solution/public/common/components/empty_value/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/empty_value/index.tsx rename to x-pack/plugins/security_solution/public/common/components/empty_value/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/empty_value/translations.ts b/x-pack/plugins/security_solution/public/common/components/empty_value/translations.ts new file mode 100644 index 0000000000000..afcf21505103d --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/empty_value/translations.ts @@ -0,0 +1,14 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const EMPTY_STRING = i18n.translate( + 'xpack.securitySolution.emptyString.emptyStringDescription', + { + defaultMessage: 'Empty String', + } +); diff --git a/x-pack/plugins/siem/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/endpoint/__snapshots__/page_view.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/page_view.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/__snapshots__/page_view.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/page_view.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/endpoint/formatted_date_time.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/formatted_date_time.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/formatted_date_time.tsx rename to x-pack/plugins/security_solution/public/common/components/endpoint/formatted_date_time.tsx diff --git a/x-pack/plugins/siem/public/common/components/endpoint/link_to_app.test.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/link_to_app.test.tsx rename to x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/endpoint/link_to_app.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/link_to_app.tsx rename to x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx diff --git a/x-pack/plugins/siem/public/common/components/endpoint/page_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/page_view.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/page_view.test.tsx rename to x-pack/plugins/security_solution/public/common/components/endpoint/page_view.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/endpoint/page_view.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/page_view.tsx similarity index 97% rename from x-pack/plugins/siem/public/common/components/endpoint/page_view.tsx rename to x-pack/plugins/security_solution/public/common/components/endpoint/page_view.tsx index 759274e3a4ffa..6fe15310fc88e 100644 --- a/x-pack/plugins/siem/public/common/components/endpoint/page_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/page_view.tsx @@ -149,7 +149,9 @@ export const PageView = memo( )} )} - {tabs && {tabComponents}} + {tabComponents.length > 0 && ( + {tabComponents} + )} {bodyHeader && ( diff --git a/x-pack/plugins/siem/public/common/components/endpoint/route_capture.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/route_capture.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/endpoint/route_capture.tsx rename to x-pack/plugins/security_solution/public/common/components/endpoint/route_capture.tsx diff --git a/x-pack/plugins/siem/public/common/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/error_toast_dispatcher/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/error_toast_dispatcher/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/error_toast_dispatcher/index.tsx b/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/error_toast_dispatcher/index.tsx rename to x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/event_details/__snapshots__/json_view.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/json_view.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/__snapshots__/json_view.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/json_view.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/event_details/columns.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/columns.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/event_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/event_details.test.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/event_details.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/event_details.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/event_fields_browser.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/event_fields_browser.test.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/event_fields_browser.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/event_fields_browser.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/event_id.ts b/x-pack/plugins/security_solution/public/common/components/event_details/event_id.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/event_id.ts rename to x-pack/plugins/security_solution/public/common/components/event_details/event_id.ts diff --git a/x-pack/plugins/siem/public/common/components/event_details/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/helpers.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/json_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/json_view.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/json_view.test.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/json_view.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/json_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/json_view.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/json_view.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/json_view.tsx diff --git a/x-pack/plugins/siem/public/common/components/event_details/stateful_event_details.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/stateful_event_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/stateful_event_details.tsx rename to x-pack/plugins/security_solution/public/common/components/event_details/stateful_event_details.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts b/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts new file mode 100644 index 0000000000000..19e71e0f37da6 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/event_details/translations.ts @@ -0,0 +1,52 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const TABLE = i18n.translate('xpack.securitySolution.eventDetails.table', { + defaultMessage: 'Table', +}); + +export const JSON_VIEW = i18n.translate('xpack.securitySolution.eventDetails.jsonView', { + defaultMessage: 'JSON View', +}); + +export const FIELD = i18n.translate('xpack.securitySolution.eventDetails.field', { + defaultMessage: 'Field', +}); + +export const VALUE = i18n.translate('xpack.securitySolution.eventDetails.value', { + defaultMessage: 'Value', +}); + +export const DESCRIPTION = i18n.translate('xpack.securitySolution.eventDetails.description', { + defaultMessage: 'Description', +}); + +export const BLANK = i18n.translate('xpack.securitySolution.eventDetails.blank', { + defaultMessage: ' ', +}); + +export const PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.eventDetails.filter.placeholder', + { + defaultMessage: 'Filter by Field, Value, or Description...', + } +); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.eventDetails.copyToClipboard', + { + defaultMessage: 'Copy to Clipboard', + } +); + +export const TOGGLE_COLUMN_TOOLTIP = i18n.translate( + 'xpack.securitySolution.eventDetails.toggleColumnTooltip', + { + defaultMessage: 'Toggle column', + } +); diff --git a/x-pack/plugins/siem/public/common/components/event_details/types.ts b/x-pack/plugins/security_solution/public/common/components/event_details/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/event_details/types.ts rename to x-pack/plugins/security_solution/public/common/components/event_details/types.ts diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/default_headers.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/default_headers.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/default_model.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_model.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/default_model.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/default_model.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/event_details_width_context.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/event_details_width_context.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/event_details_width_context.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/event_details_width_context.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/events_viewer.test.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/events_viewer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/events_viewer.test.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/events_viewer.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/events_viewer.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/events_viewer.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/events_viewer.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/events_viewer.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/index.tsx rename to x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/mock.ts b/x-pack/plugins/security_solution/public/common/components/events_viewer/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/events_viewer/mock.ts rename to x-pack/plugins/security_solution/public/common/components/events_viewer/mock.ts diff --git a/x-pack/plugins/siem/public/common/components/events_viewer/translations.ts b/x-pack/plugins/security_solution/public/common/components/events_viewer/translations.ts similarity index 65% rename from x-pack/plugins/siem/public/common/components/events_viewer/translations.ts rename to x-pack/plugins/security_solution/public/common/components/events_viewer/translations.ts index 376ddf72ce481..9e553b8ca9d4f 100644 --- a/x-pack/plugins/siem/public/common/components/events_viewer/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/translations.ts @@ -6,30 +6,30 @@ import { i18n } from '@kbn/i18n'; -export const SHOWING = i18n.translate('xpack.siem.eventsViewer.showingLabel', { +export const SHOWING = i18n.translate('xpack.securitySolution.eventsViewer.showingLabel', { defaultMessage: 'Showing', }); export const ERROR_FETCHING_EVENTS_DATA = i18n.translate( - 'xpack.siem.eventsViewer.errorFetchingEventsData', + 'xpack.securitySolution.eventsViewer.errorFetchingEventsData', { defaultMessage: 'Failed to query events data', } ); -export const EVENTS = i18n.translate('xpack.siem.eventsViewer.eventsLabel', { +export const EVENTS = i18n.translate('xpack.securitySolution.eventsViewer.eventsLabel', { defaultMessage: 'Events', }); export const LOADING_EVENTS = i18n.translate( - 'xpack.siem.eventsViewer.footer.loadingEventsDataLabel', + 'xpack.securitySolution.eventsViewer.footer.loadingEventsDataLabel', { defaultMessage: 'Loading Events', } ); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.eventsViewer.unit', { + i18n.translate('xpack.securitySolution.eventsViewer.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {event} other {events}}`, }); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/__examples__/index.stories.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/__examples__/index.stories.tsx new file mode 100644 index 0000000000000..b6620ed103bc8 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/__examples__/index.stories.tsx @@ -0,0 +1,118 @@ +/* + * 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 { storiesOf } from '@storybook/react'; +import React from 'react'; +import { ThemeProvider } from 'styled-components'; +import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; + +import { ExceptionItem } from '../viewer'; +import { Operator } from '../types'; +import { getExceptionItemMock } from '../mocks'; + +storiesOf('components/exceptions', module) + .add('ExceptionItem/with os', () => { + const payload = getExceptionItemMock(); + payload.description = ''; + payload.comments = []; + payload.entries = [ + { + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Elastic, N.V.', + }, + ]; + + return ( + ({ eui: euiLightVars, darkMode: false })}> + {}} + handleEdit={() => {}} + /> + + ); + }) + .add('ExceptionItem/with description', () => { + const payload = getExceptionItemMock(); + payload._tags = []; + payload.comments = []; + payload.entries = [ + { + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Elastic, N.V.', + }, + ]; + + return ( + ({ eui: euiLightVars, darkMode: false })}> + {}} + handleEdit={() => {}} + /> + + ); + }) + .add('ExceptionItem/with comments', () => { + const payload = getExceptionItemMock(); + payload._tags = []; + payload.description = ''; + payload.entries = [ + { + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Elastic, N.V.', + }, + ]; + + return ( + ({ eui: euiLightVars, darkMode: false })}> + {}} + handleEdit={() => {}} + /> + + ); + }) + .add('ExceptionItem/with nested entries', () => { + const payload = getExceptionItemMock(); + payload._tags = []; + payload.description = ''; + payload.comments = []; + + return ( + ({ eui: euiLightVars, darkMode: false })}> + {}} + handleEdit={() => {}} + /> + + ); + }) + .add('ExceptionItem/with everything', () => { + const payload = getExceptionItemMock(); + + return ( + ({ eui: euiLightVars, darkMode: false })}> + {}} + handleEdit={() => {}} + /> + + ); + }); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx new file mode 100644 index 0000000000000..223eabb0ea4ee --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx @@ -0,0 +1,467 @@ +/* + * 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 from 'react'; +import { mount } from 'enzyme'; +import moment from 'moment-timezone'; + +import { + getOperatorType, + getExceptionOperatorSelect, + determineIfIsNested, + getFormattedEntries, + formatEntry, + getOperatingSystems, + getTagsInclude, + getDescriptionListContent, + getFormattedComments, +} from './helpers'; +import { + OperatorType, + Operator, + NestedExceptionEntry, + FormattedEntry, + DescriptionListItem, +} from './types'; +import { + isOperator, + isNotOperator, + isOneOfOperator, + isNotOneOfOperator, + isInListOperator, + isNotInListOperator, + existsOperator, + doesNotExistOperator, +} from './operators'; +import { getExceptionItemEntryMock, getExceptionItemMock } from './mocks'; + +describe('Exception helpers', () => { + beforeEach(() => { + moment.tz.setDefault('UTC'); + }); + + afterEach(() => { + moment.tz.setDefault('Browser'); + }); + + describe('#getOperatorType', () => { + test('returns operator type "match" if entry.type is "match"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'match'; + const operatorType = getOperatorType(payload); + + expect(operatorType).toEqual(OperatorType.PHRASE); + }); + + test('returns operator type "match" if entry.type is "nested"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'nested'; + const operatorType = getOperatorType(payload); + + expect(operatorType).toEqual(OperatorType.PHRASE); + }); + + test('returns operator type "match_any" if entry.type is "match_any"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'match_any'; + const operatorType = getOperatorType(payload); + + expect(operatorType).toEqual(OperatorType.PHRASES); + }); + + test('returns operator type "list" if entry.type is "list"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'list'; + const operatorType = getOperatorType(payload); + + expect(operatorType).toEqual(OperatorType.LIST); + }); + + test('returns operator type "exists" if entry.type is "exists"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'exists'; + const operatorType = getOperatorType(payload); + + expect(operatorType).toEqual(OperatorType.EXISTS); + }); + }); + + describe('#getExceptionOperatorSelect', () => { + test('it returns "isOperator" when "operator" is "included" and operator type is "match"', () => { + const payload = getExceptionItemEntryMock(); + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(isOperator); + }); + + test('it returns "isNotOperator" when "operator" is "excluded" and operator type is "match"', () => { + const payload = getExceptionItemEntryMock(); + payload.operator = Operator.EXCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(isNotOperator); + }); + + test('it returns "isOneOfOperator" when "operator" is "included" and operator type is "match_any"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'match_any'; + payload.operator = Operator.INCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(isOneOfOperator); + }); + + test('it returns "isNotOneOfOperator" when "operator" is "excluded" and operator type is "match_any"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'match_any'; + payload.operator = Operator.EXCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(isNotOneOfOperator); + }); + + test('it returns "existsOperator" when "operator" is "included" and no operator type is provided', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'exists'; + payload.operator = Operator.INCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(existsOperator); + }); + + test('it returns "doesNotExistsOperator" when "operator" is "excluded" and no operator type is provided', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'exists'; + payload.operator = Operator.EXCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(doesNotExistOperator); + }); + + test('it returns "isInList" when "operator" is "included" and operator type is "list"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'list'; + payload.operator = Operator.INCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(isInListOperator); + }); + + test('it returns "isNotInList" when "operator" is "excluded" and operator type is "list"', () => { + const payload = getExceptionItemEntryMock(); + payload.type = 'list'; + payload.operator = Operator.EXCLUSION; + const result = getExceptionOperatorSelect(payload); + + expect(result).toEqual(isNotInListOperator); + }); + }); + + describe('#determineIfIsNested', () => { + test('it returns true if type NestedExceptionEntry', () => { + const payload: NestedExceptionEntry = { + field: 'actingProcess.file.signer', + type: 'nested', + entries: [], + }; + const result = determineIfIsNested(payload); + + expect(result).toBeTruthy(); + }); + + test('it returns false if NOT type NestedExceptionEntry', () => { + const payload = getExceptionItemEntryMock(); + const result = determineIfIsNested(payload); + + expect(result).toBeFalsy(); + }); + }); + + describe('#getFormattedEntries', () => { + test('it returns empty array if no entries passed', () => { + const result = getFormattedEntries([]); + + expect(result).toEqual([]); + }); + + test('it formats nested entries as expected', () => { + const payload = [ + { + field: 'file.signature', + type: 'nested', + entries: [ + { + field: 'signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Evil', + }, + { + field: 'trusted', + type: 'match', + operator: Operator.INCLUSION, + value: 'true', + }, + ], + }, + ]; + const result = getFormattedEntries(payload); + const expected: FormattedEntry[] = [ + { + fieldName: 'file.signature', + operator: null, + value: null, + isNested: false, + }, + { + fieldName: 'file.signature.signer', + isNested: true, + operator: 'is', + value: 'Evil', + }, + { + fieldName: 'file.signature.trusted', + isNested: true, + operator: 'is', + value: 'true', + }, + ]; + expect(result).toEqual(expected); + }); + + test('it formats non-nested entries as expected', () => { + const payload = [ + { + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Elastic, N.V.', + }, + { + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.EXCLUSION, + value: 'Global Signer', + }, + ]; + const result = getFormattedEntries(payload); + const expected: FormattedEntry[] = [ + { + fieldName: 'actingProcess.file.signer', + isNested: false, + operator: 'is', + value: 'Elastic, N.V.', + }, + { + fieldName: 'actingProcess.file.signer', + isNested: false, + operator: 'is not', + value: 'Global Signer', + }, + ]; + expect(result).toEqual(expected); + }); + + test('it formats a mix of nested and non-nested entries as expected', () => { + const payload = getExceptionItemMock(); + const result = getFormattedEntries(payload.entries); + const expected: FormattedEntry[] = [ + { + fieldName: 'actingProcess.file.signer', + isNested: false, + operator: 'is', + value: 'Elastic, N.V.', + }, + { + fieldName: 'host.name', + isNested: false, + operator: 'is not', + value: 'Global Signer', + }, + { + fieldName: 'file.signature', + isNested: false, + operator: null, + value: null, + }, + { + fieldName: 'file.signature.signer', + isNested: true, + operator: 'is', + value: 'Evil', + }, + { + fieldName: 'file.signature.trusted', + isNested: true, + operator: 'is', + value: 'true', + }, + ]; + expect(result).toEqual(expected); + }); + }); + + describe('#formatEntry', () => { + test('it formats an entry', () => { + const payload = getExceptionItemEntryMock(); + const formattedEntry = formatEntry({ isNested: false, item: payload }); + const expected: FormattedEntry = { + fieldName: 'actingProcess.file.signer', + isNested: false, + operator: 'is', + value: 'Elastic, N.V.', + }; + + expect(formattedEntry).toEqual(expected); + }); + + test('it formats a nested entry', () => { + const payload = getExceptionItemEntryMock(); + const formattedEntry = formatEntry({ isNested: true, parent: 'parent', item: payload }); + const expected: FormattedEntry = { + fieldName: 'parent.actingProcess.file.signer', + isNested: true, + operator: 'is', + value: 'Elastic, N.V.', + }; + + expect(formattedEntry).toEqual(expected); + }); + }); + + describe('#getOperatingSystems', () => { + test('it returns null if no operating system tag specified', () => { + const result = getOperatingSystems(['some tag', 'some other tag']); + + expect(result).toEqual(''); + }); + + test('it returns null if operating system tag malformed', () => { + const result = getOperatingSystems(['some tag', 'jibberos:mac,windows', 'some other tag']); + + expect(result).toEqual(''); + }); + + test('it returns formatted operating systems if space included in os tag', () => { + const result = getOperatingSystems(['some tag', 'os: mac', 'some other tag']); + + expect(result).toEqual('Mac'); + }); + + test('it returns formatted operating systems if multiple os tags specified', () => { + const result = getOperatingSystems(['some tag', 'os: mac', 'some other tag', 'os:windows']); + + expect(result).toEqual('Mac, Windows'); + }); + }); + + describe('#getTagsInclude', () => { + test('it returns a tuple of "false" and "null" if no matches found', () => { + const result = getTagsInclude({ tags: ['some', 'tags', 'here'], regex: /(no match)/ }); + + expect(result).toEqual([false, null]); + }); + + test('it returns a tuple of "true" and matching string if matches found', () => { + const result = getTagsInclude({ tags: ['some', 'tags', 'here'], regex: /(some)/ }); + + expect(result).toEqual([true, 'some']); + }); + }); + + describe('#getDescriptionListContent', () => { + test('it returns formatted description list with os if one is specified', () => { + const payload = getExceptionItemMock(); + payload.description = ''; + const result = getDescriptionListContent(payload); + const expected: DescriptionListItem[] = [ + { + description: 'Windows', + title: 'OS', + }, + { + description: 'April 23rd 2020 @ 00:19:13', + title: 'Date created', + }, + { + description: 'user_name', + title: 'Created by', + }, + ]; + + expect(result).toEqual(expected); + }); + + test('it returns formatted description list with a description if one specified', () => { + const payload = getExceptionItemMock(); + payload._tags = []; + payload.description = 'Im a description'; + const result = getDescriptionListContent(payload); + const expected: DescriptionListItem[] = [ + { + description: 'April 23rd 2020 @ 00:19:13', + title: 'Date created', + }, + { + description: 'user_name', + title: 'Created by', + }, + { + description: 'Im a description', + title: 'Comment', + }, + ]; + + expect(result).toEqual(expected); + }); + + test('it returns just user and date created if no other fields specified', () => { + const payload = getExceptionItemMock(); + payload._tags = []; + payload.description = ''; + const result = getDescriptionListContent(payload); + const expected: DescriptionListItem[] = [ + { + description: 'April 23rd 2020 @ 00:19:13', + title: 'Date created', + }, + { + description: 'user_name', + title: 'Created by', + }, + ]; + + expect(result).toEqual(expected); + }); + }); + + describe('#getFormattedComments', () => { + test('it returns formatted comment object with username and timestamp', () => { + const payload = getExceptionItemMock().comments; + const result = getFormattedComments(payload); + + expect(result[0].username).toEqual('user_name'); + expect(result[0].timestamp).toEqual('on Apr 23rd 2020 @ 00:19:13'); + }); + + test('it returns formatted timeline icon with comment users initial', () => { + const payload = getExceptionItemMock().comments; + const result = getFormattedComments(payload); + + const wrapper = mount(result[0].timelineIcon as React.ReactElement); + + expect(wrapper.text()).toEqual('U'); + }); + + test('it returns comment text', () => { + const payload = getExceptionItemMock().comments; + const result = getFormattedComments(payload); + + const wrapper = mount(result[0].children as React.ReactElement); + + expect(wrapper.text()).toEqual('Comment goes here'); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx new file mode 100644 index 0000000000000..bd22de636bf6c --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx @@ -0,0 +1,192 @@ +/* + * 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 from 'react'; +import { EuiText, EuiCommentProps, EuiAvatar } from '@elastic/eui'; +import { capitalize } from 'lodash'; +import moment from 'moment'; + +import * as i18n from './translations'; +import { + FormattedEntry, + OperatorType, + OperatorOption, + ExceptionEntry, + NestedExceptionEntry, + DescriptionListItem, + Comment, + ExceptionListItemSchema, +} from './types'; +import { EXCEPTION_OPERATORS, isOperator } from './operators'; + +/** + * Returns the operator type, may not need this if using io-ts types + * + * @param entry a single ExceptionItem entry + */ +export const getOperatorType = (entry: ExceptionEntry): OperatorType => { + switch (entry.type) { + case 'nested': + case 'match': + return OperatorType.PHRASE; + case 'match_any': + return OperatorType.PHRASES; + case 'list': + return OperatorType.LIST; + default: + return OperatorType.EXISTS; + } +}; + +/** + * Determines operator selection (is/is not/is one of, etc.) + * Default operator is "is" + * + * @param entry a single ExceptionItem entry + */ +export const getExceptionOperatorSelect = (entry: ExceptionEntry): OperatorOption => { + const operatorType = getOperatorType(entry); + const foundOperator = EXCEPTION_OPERATORS.find((operatorOption) => { + return entry.operator === operatorOption.operator && operatorType === operatorOption.type; + }); + + return foundOperator ?? isOperator; +}; + +export const determineIfIsNested = ( + tbd: ExceptionEntry | NestedExceptionEntry +): tbd is NestedExceptionEntry => { + if (tbd.type === 'nested') { + return true; + } + return false; +}; + +/** + * Formats ExceptionItem entries into simple field, operator, value + * for use in rendering items in table + * + * @param entries an ExceptionItem's entries + */ +export const getFormattedEntries = ( + entries: Array +): FormattedEntry[] => { + const formattedEntries = entries.map((entry) => { + if (determineIfIsNested(entry)) { + const parent = { fieldName: entry.field, operator: null, value: null, isNested: false }; + return entry.entries.reduce( + (acc, nestedEntry) => { + const formattedEntry = formatEntry({ + isNested: true, + parent: entry.field, + item: nestedEntry, + }); + return [...acc, { ...formattedEntry }]; + }, + [parent] + ); + } else { + return formatEntry({ isNested: false, item: entry }); + } + }); + + return formattedEntries.flat(); +}; + +/** + * Helper method for `getFormattedEntries` + */ +export const formatEntry = ({ + isNested, + parent, + item, +}: { + isNested: boolean; + parent?: string; + item: ExceptionEntry; +}): FormattedEntry => { + const operator = getExceptionOperatorSelect(item); + const operatorType = getOperatorType(item); + const value = operatorType === OperatorType.EXISTS ? null : item.value; + + return { + fieldName: isNested ? `${parent}.${item.field}` : item.field, + operator: operator.message, + value, + isNested, + }; +}; + +export const getOperatingSystems = (tags: string[]): string => { + const osMatches = tags + .filter((tag) => tag.startsWith('os:')) + .map((os) => capitalize(os.substring(3).trim())) + .join(', '); + + return osMatches; +}; + +export const getTagsInclude = ({ + tags, + regex, +}: { + tags: string[]; + regex: RegExp; +}): [boolean, string | null] => { + const matches: string[] | null = tags.join(';').match(regex); + const match = matches != null ? matches[1] : null; + return [matches != null, match]; +}; + +/** + * Formats ExceptionItem information for description list component + * + * @param exceptionItem an ExceptionItem + */ +export const getDescriptionListContent = ( + exceptionItem: ExceptionListItemSchema +): DescriptionListItem[] => { + const details = [ + { + title: i18n.OPERATING_SYSTEM, + value: getOperatingSystems(exceptionItem._tags), + }, + { + title: i18n.DATE_CREATED, + value: moment(exceptionItem.created_at).format('MMMM Do YYYY @ HH:mm:ss'), + }, + { + title: i18n.CREATED_BY, + value: exceptionItem.created_by, + }, + { + title: i18n.COMMENT, + value: exceptionItem.description, + }, + ]; + + return details.reduce((acc, { value, title }) => { + if (value != null && value.trim() !== '') { + return [...acc, { title, description: value }]; + } else { + return acc; + } + }, []); +}; + +/** + * Formats ExceptionItem.comments into EuiCommentList format + * + * @param comments ExceptionItem.comments + */ +export const getFormattedComments = (comments: Comment[]): EuiCommentProps[] => + comments.map((comment) => ({ + username: comment.user, + timestamp: moment(comment.timestamp).format('on MMM Do YYYY @ HH:mm:ss'), + event: i18n.COMMENT_EVENT, + timelineIcon: , + children: {comment.comment}, + })); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/mocks.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/mocks.ts new file mode 100644 index 0000000000000..15aec3533b325 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/mocks.ts @@ -0,0 +1,89 @@ +/* + * 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 { + Operator, + ExceptionListItemSchema, + ExceptionEntry, + NestedExceptionEntry, + FormattedEntry, +} from './types'; + +export const getExceptionItemEntryMock = (): ExceptionEntry => ({ + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Elastic, N.V.', +}); + +export const getNestedExceptionItemEntryMock = (): NestedExceptionEntry => ({ + field: 'actingProcess.file.signer', + type: 'nested', + entries: [{ ...getExceptionItemEntryMock() }], +}); + +export const getFormattedEntryMock = (isNested = false): FormattedEntry => ({ + fieldName: 'host.name', + operator: 'is', + value: 'some name', + isNested, +}); + +export const getExceptionItemMock = (): ExceptionListItemSchema => ({ + id: 'uuid_here', + item_id: 'item-id', + created_at: '2020-04-23T00:19:13.289Z', + created_by: 'user_name', + list_id: 'test-exception', + tie_breaker_id: '77fd1909-6786-428a-a671-30229a719c1f', + updated_at: '2020-04-23T00:19:13.289Z', + updated_by: 'user_name', + namespace_type: 'single', + name: '', + description: 'This is a description', + comments: [ + { + user: 'user_name', + timestamp: '2020-04-23T00:19:13.289Z', + comment: 'Comment goes here', + }, + ], + _tags: ['os:windows'], + tags: [], + type: 'simple', + entries: [ + { + field: 'actingProcess.file.signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Elastic, N.V.', + }, + { + field: 'host.name', + type: 'match', + operator: Operator.EXCLUSION, + value: 'Global Signer', + }, + { + field: 'file.signature', + type: 'nested', + entries: [ + { + field: 'signer', + type: 'match', + operator: Operator.INCLUSION, + value: 'Evil', + }, + { + field: 'trusted', + type: 'match', + operator: Operator.INCLUSION, + value: 'true', + }, + ], + }, + ], +}); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/operators.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/operators.ts new file mode 100644 index 0000000000000..19c726893e682 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/operators.ts @@ -0,0 +1,91 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { OperatorOption, OperatorType, Operator } from './types'; + +export const isOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.isOperatorLabel', { + defaultMessage: 'is', + }), + value: 'is', + type: OperatorType.PHRASE, + operator: Operator.INCLUSION, +}; + +export const isNotOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.isNotOperatorLabel', { + defaultMessage: 'is not', + }), + value: 'is_not', + type: OperatorType.PHRASE, + operator: Operator.EXCLUSION, +}; + +export const isOneOfOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.isOneOfOperatorLabel', { + defaultMessage: 'is one of', + }), + value: 'is_one_of', + type: OperatorType.PHRASES, + operator: Operator.INCLUSION, +}; + +export const isNotOneOfOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.isNotOneOfOperatorLabel', { + defaultMessage: 'is not one of', + }), + value: 'is_not_one_of', + type: OperatorType.PHRASES, + operator: Operator.EXCLUSION, +}; + +export const existsOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.existsOperatorLabel', { + defaultMessage: 'exists', + }), + value: 'exists', + type: OperatorType.EXISTS, + operator: Operator.INCLUSION, +}; + +export const doesNotExistOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.doesNotExistOperatorLabel', { + defaultMessage: 'does not exist', + }), + value: 'does_not_exist', + type: OperatorType.EXISTS, + operator: Operator.EXCLUSION, +}; + +export const isInListOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.isInListOperatorLabel', { + defaultMessage: 'is in list', + }), + value: 'is_in_list', + type: OperatorType.LIST, + operator: Operator.INCLUSION, +}; + +export const isNotInListOperator: OperatorOption = { + message: i18n.translate('xpack.securitySolution.exceptions.isNotInListOperatorLabel', { + defaultMessage: 'is not in list', + }), + value: 'is_not_in_list', + type: OperatorType.LIST, + operator: Operator.EXCLUSION, +}; + +export const EXCEPTION_OPERATORS: OperatorOption[] = [ + isOperator, + isNotOperator, + isOneOfOperator, + isNotOneOfOperator, + existsOperator, + doesNotExistOperator, + isInListOperator, + isNotInListOperator, +]; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/translations.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/translations.ts new file mode 100644 index 0000000000000..704849430daf9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/translations.ts @@ -0,0 +1,49 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const EDIT = i18n.translate('xpack.securitySolution.exceptions.editButtonLabel', { + defaultMessage: 'Edit', +}); + +export const REMOVE = i18n.translate('xpack.securitySolution.exceptions.removeButtonLabel', { + defaultMessage: 'Remove', +}); + +export const COMMENTS_SHOW = (comments: number) => + i18n.translate('xpack.securitySolution.exceptions.showCommentsLabel', { + values: { comments }, + defaultMessage: 'Show ({comments}) {comments, plural, =1 {Comment} other {Comments}}', + }); + +export const COMMENTS_HIDE = (comments: number) => + i18n.translate('xpack.securitySolution.exceptions.hideCommentsLabel', { + values: { comments }, + defaultMessage: 'Hide ({comments}) {comments, plural, =1 {Comment} other {Comments}}', + }); + +export const DATE_CREATED = i18n.translate('xpack.securitySolution.exceptions.dateCreatedLabel', { + defaultMessage: 'Date created', +}); + +export const CREATED_BY = i18n.translate('xpack.securitySolution.exceptions.createdByLabel', { + defaultMessage: 'Created by', +}); + +export const COMMENT = i18n.translate('xpack.securitySolution.exceptions.commentLabel', { + defaultMessage: 'Comment', +}); + +export const COMMENT_EVENT = i18n.translate('xpack.securitySolution.exceptions.commentEventLabel', { + defaultMessage: 'added a comment', +}); + +export const OPERATING_SYSTEM = i18n.translate( + 'xpack.securitySolution.exceptions.operatingSystemLabel', + { + defaultMessage: 'OS', + } +); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts new file mode 100644 index 0000000000000..e8393610e459d --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts @@ -0,0 +1,78 @@ +/* + * 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 { ReactNode } from 'react'; + +export interface OperatorOption { + message: string; + value: string; + operator: Operator; + type: OperatorType; +} + +export enum Operator { + INCLUSION = 'included', + EXCLUSION = 'excluded', +} + +export enum OperatorType { + NESTED = 'nested', + PHRASE = 'match', + PHRASES = 'match_any', + EXISTS = 'exists', + LIST = 'list', +} + +export interface FormattedEntry { + fieldName: string; + operator: string | null; + value: string | null; + isNested: boolean; +} + +export interface NestedExceptionEntry { + field: string; + type: string; + entries: ExceptionEntry[]; +} + +export interface ExceptionEntry { + field: string; + type: string; + operator: Operator; + value: string; +} + +export interface DescriptionListItem { + title: NonNullable; + description: NonNullable; +} + +export interface Comment { + user: string; + timestamp: string; + comment: string; +} + +// TODO: Delete once types are updated +export interface ExceptionListItemSchema { + _tags: string[]; + comments: Comment[]; + created_at: string; + created_by: string; + description?: string; + entries: Array; + id: string; + item_id: string; + list_id: string; + meta?: unknown; + name: string; + namespace_type: 'single' | 'agnostic'; + tags: string[]; + tie_breaker_id: string; + type: string; + updated_at: string; + updated_by: string; +} diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_details.test.tsx new file mode 100644 index 0000000000000..536d005c57b6e --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_details.test.tsx @@ -0,0 +1,226 @@ +/* + * 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 from 'react'; +import { ThemeProvider } from 'styled-components'; +import { mount } from 'enzyme'; +import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; +import moment from 'moment-timezone'; + +import { ExceptionDetails } from './exception_details'; +import { getExceptionItemMock } from '../mocks'; + +describe('ExceptionDetails', () => { + beforeEach(() => { + moment.tz.setDefault('UTC'); + }); + + afterEach(() => { + moment.tz.setDefault('Browser'); + }); + + test('it renders no comments button if no comments exist', () => { + const exceptionItem = getExceptionItemMock(); + exceptionItem.comments = []; + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerItemCommentsBtn"]')).toHaveLength(0); + }); + + test('it renders comments button if comments exist', () => { + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect( + wrapper.find('.euiButtonEmpty[data-test-subj="exceptionsViewerItemCommentsBtn"]') + ).toHaveLength(1); + }); + + test('it renders correct number of comments', () => { + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerItemCommentsBtn"]').at(0).text()).toEqual( + 'Show (1) Comment' + ); + }); + + test('it renders comments plural if more than one', () => { + const exceptionItem = getExceptionItemMock(); + exceptionItem.comments = [ + { + user: 'user_1', + timestamp: '2020-04-23T00:19:13.289Z', + comment: 'Comment goes here', + }, + { + user: 'user_2', + timestamp: '2020-04-23T00:19:13.289Z', + comment: 'Comment goes here', + }, + ]; + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerItemCommentsBtn"]').at(0).text()).toEqual( + 'Show (2) Comments' + ); + }); + + test('it renders comments show text if "showComments" is false', () => { + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerItemCommentsBtn"]').at(0).text()).toEqual( + 'Show (1) Comment' + ); + }); + + test('it renders comments hide text if "showComments" is true', () => { + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerItemCommentsBtn"]').at(0).text()).toEqual( + 'Hide (1) Comment' + ); + }); + + test('it invokes "onCommentsClick" when comments button clicked', () => { + const mockOnCommentsClick = jest.fn(); + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + const commentsBtn = wrapper.find('[data-test-subj="exceptionsViewerItemCommentsBtn"]').at(0); + commentsBtn.simulate('click'); + + expect(mockOnCommentsClick).toHaveBeenCalledTimes(1); + }); + + test('it renders the operating system if one is specified in the exception item', () => { + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('EuiDescriptionListTitle').at(0).text()).toEqual('OS'); + expect(wrapper.find('EuiDescriptionListDescription').at(0).text()).toEqual('Windows'); + }); + + test('it renders the exception item creator', () => { + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('EuiDescriptionListTitle').at(1).text()).toEqual('Date created'); + expect(wrapper.find('EuiDescriptionListDescription').at(1).text()).toEqual( + 'April 23rd 2020 @ 00:19:13' + ); + }); + + test('it renders the exception item creation timestamp', () => { + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('EuiDescriptionListTitle').at(2).text()).toEqual('Created by'); + expect(wrapper.find('EuiDescriptionListDescription').at(2).text()).toEqual('user_name'); + }); + + test('it renders the description if one is included on the exception item', () => { + const exceptionItem = getExceptionItemMock(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('EuiDescriptionListTitle').at(3).text()).toEqual('Comment'); + expect(wrapper.find('EuiDescriptionListDescription').at(3).text()).toEqual( + 'This is a description' + ); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_details.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_details.tsx new file mode 100644 index 0000000000000..8745e80a21548 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_details.tsx @@ -0,0 +1,85 @@ +/* + * 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 { EuiFlexItem, EuiFlexGroup, EuiDescriptionList, EuiButtonEmpty } from '@elastic/eui'; +import React, { useMemo } from 'react'; +import styled, { css } from 'styled-components'; +import { transparentize } from 'polished'; + +import { ExceptionListItemSchema } from '../types'; +import { getDescriptionListContent } from '../helpers'; +import * as i18n from '../translations'; + +const StyledExceptionDetails = styled(EuiFlexItem)` + ${({ theme }) => css` + background-color: ${transparentize(0.95, theme.eui.euiColorPrimary)}; + padding: ${theme.eui.euiSize}; + + .euiDescriptionList__title.listTitle--width { + width: 40%; + } + + .euiDescriptionList__description.listDescription--width { + width: 60%; + } + `} +`; + +const ExceptionDetailsComponent = ({ + showComments, + onCommentsClick, + exceptionItem, +}: { + showComments: boolean; + exceptionItem: ExceptionListItemSchema; + onCommentsClick: () => void; +}): JSX.Element => { + const descriptionList = useMemo(() => getDescriptionListContent(exceptionItem), [exceptionItem]); + + const commentsSection = useMemo((): JSX.Element => { + const { comments } = exceptionItem; + if (comments.length > 0) { + return ( + + {!showComments + ? i18n.COMMENTS_SHOW(comments.length) + : i18n.COMMENTS_HIDE(comments.length)} + + ); + } else { + return <>; + } + }, [showComments, onCommentsClick, exceptionItem]); + + return ( + + + + + + {commentsSection} + + + ); +}; + +ExceptionDetailsComponent.displayName = 'ExceptionDetailsComponent'; + +export const ExceptionDetails = React.memo(ExceptionDetailsComponent); + +ExceptionDetails.displayName = 'ExceptionDetails'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.test.tsx new file mode 100644 index 0000000000000..e0c62f51d032a --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.test.tsx @@ -0,0 +1,150 @@ +/* + * 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 from 'react'; +import { ThemeProvider } from 'styled-components'; +import { mount } from 'enzyme'; +import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; + +import { ExceptionEntries } from './exception_entries'; +import { getFormattedEntryMock } from '../mocks'; +import { getEmptyValue } from '../../empty_value'; + +describe('ExceptionEntries', () => { + test('it does NOT render the and badge if only one exception item entry exists', () => { + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerAndBadge"]')).toHaveLength(0); + }); + + test('it renders the and badge if more than one exception item exists', () => { + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('[data-test-subj="exceptionsViewerAndBadge"]')).toHaveLength(1); + }); + + test('it invokes "handlEdit" when edit button clicked', () => { + const mockHandleEdit = jest.fn(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + const editBtn = wrapper.find('[data-test-subj="exceptionsViewerEditBtn"] button').at(0); + editBtn.simulate('click'); + + expect(mockHandleEdit).toHaveBeenCalledTimes(1); + }); + + test('it invokes "handleDelete" when delete button clicked', () => { + const mockHandleDelete = jest.fn(); + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + const deleteBtn = wrapper.find('[data-test-subj="exceptionsViewerDeleteBtn"] button').at(0); + deleteBtn.simulate('click'); + + expect(mockHandleDelete).toHaveBeenCalledTimes(1); + }); + + test('it renders nested entry', () => { + const parentEntry = getFormattedEntryMock(); + parentEntry.operator = null; + parentEntry.value = null; + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + const parentField = wrapper + .find('[data-test-subj="exceptionFieldNameCell"] .euiTableCellContent') + .at(0); + const parentOperator = wrapper + .find('[data-test-subj="exceptionFieldOperatorCell"] .euiTableCellContent') + .at(0); + const parentValue = wrapper + .find('[data-test-subj="exceptionFieldValueCell"] .euiTableCellContent') + .at(0); + + const nestedField = wrapper + .find('[data-test-subj="exceptionFieldNameCell"] .euiTableCellContent') + .at(1); + const nestedOperator = wrapper + .find('[data-test-subj="exceptionFieldOperatorCell"] .euiTableCellContent') + .at(1); + const nestedValue = wrapper + .find('[data-test-subj="exceptionFieldValueCell"] .euiTableCellContent') + .at(1); + + expect(parentField.text()).toEqual('host.name'); + expect(parentOperator.text()).toEqual(getEmptyValue()); + expect(parentValue.text()).toEqual(getEmptyValue()); + + expect(nestedField.exists('.euiToolTipAnchor')).toBeTruthy(); + expect(nestedField.text()).toEqual('host.name'); + expect(nestedOperator.text()).toEqual('is'); + expect(nestedValue.text()).toEqual('some name'); + }); + + test('it renders non-nested entries', () => { + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + const field = wrapper + .find('[data-test-subj="exceptionFieldNameCell"] .euiTableCellContent') + .at(0); + const operator = wrapper + .find('[data-test-subj="exceptionFieldOperatorCell"] .euiTableCellContent') + .at(0); + const value = wrapper + .find('[data-test-subj="exceptionFieldValueCell"] .euiTableCellContent') + .at(0); + + expect(field.exists('.euiToolTipAnchor')).toBeFalsy(); + expect(field.text()).toEqual('host.name'); + expect(operator.text()).toEqual('is'); + expect(value.text()).toEqual('some name'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.tsx new file mode 100644 index 0000000000000..d0236adc27c6c --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.tsx @@ -0,0 +1,169 @@ +/* + * 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 { + EuiBasicTable, + EuiIconTip, + EuiFlexItem, + EuiFlexGroup, + EuiButton, + EuiTableFieldDataColumnType, +} from '@elastic/eui'; +import React, { useMemo } from 'react'; +import styled, { css } from 'styled-components'; +import { transparentize } from 'polished'; + +import { AndOrBadge } from '../../and_or_badge'; +import { getEmptyValue } from '../../empty_value'; +import * as i18n from '../translations'; +import { FormattedEntry } from '../types'; + +const EntriesDetails = styled(EuiFlexItem)` + padding: ${({ theme }) => theme.eui.euiSize}; +`; + +const StyledEditButton = styled(EuiButton)` + ${({ theme }) => css` + background-color: ${transparentize(0.9, theme.eui.euiColorPrimary)}; + border: none; + font-weight: ${theme.eui.euiFontWeightSemiBold}; + `} +`; + +const StyledRemoveButton = styled(EuiButton)` + ${({ theme }) => css` + background-color: ${transparentize(0.9, theme.eui.euiColorDanger)}; + border: none; + font-weight: ${theme.eui.euiFontWeightSemiBold}; + `} +`; + +const AndOrBadgeContainer = styled(EuiFlexItem)` + padding-top: ${({ theme }) => theme.eui.euiSizeXL}; +`; + +interface ExceptionEntriesComponentProps { + entries: FormattedEntry[]; + handleDelete: () => void; + handleEdit: () => void; +} + +const ExceptionEntriesComponent = ({ + entries, + handleDelete, + handleEdit, +}: ExceptionEntriesComponentProps): JSX.Element => { + const columns = useMemo( + (): Array> => [ + { + field: 'fieldName', + name: 'Field', + sortable: false, + truncateText: true, + 'data-test-subj': 'exceptionFieldNameCell', + width: '30%', + render: (value: string | null, data: FormattedEntry) => { + if (value != null && data.isNested) { + return ( + <> + + {value} + + ); + } else { + return value ?? getEmptyValue(); + } + }, + }, + { + field: 'operator', + name: 'Operator', + sortable: false, + truncateText: true, + 'data-test-subj': 'exceptionFieldOperatorCell', + width: '20%', + render: (value: string | null) => value ?? getEmptyValue(), + }, + { + field: 'value', + name: 'Value', + sortable: false, + truncateText: true, + 'data-test-subj': 'exceptionFieldValueCell', + width: '60%', + render: (values: string | string[] | null) => { + if (Array.isArray(values)) { + return ( + + {values.map((value) => { + return {value}; + })} + + ); + } else { + return values ?? getEmptyValue(); + } + }, + }, + ], + [entries] + ); + + return ( + + + + + {entries.length > 1 && ( + + + + )} + + + + + + + + + + {i18n.EDIT} + + + + + {i18n.REMOVE} + + + + + + + ); +}; + +ExceptionEntriesComponent.displayName = 'ExceptionEntriesComponent'; + +export const ExceptionEntries = React.memo(ExceptionEntriesComponent); + +ExceptionEntries.displayName = 'ExceptionEntries'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx new file mode 100644 index 0000000000000..7d3b7195def80 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx @@ -0,0 +1,116 @@ +/* + * 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 from 'react'; +import { ThemeProvider } from 'styled-components'; +import { mount } from 'enzyme'; +import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; + +import { ExceptionItem } from './'; +import { getExceptionItemMock } from '../mocks'; + +describe('ExceptionItem', () => { + it('it renders ExceptionDetails and ExceptionEntries', () => { + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('ExceptionDetails')).toHaveLength(1); + expect(wrapper.find('ExceptionEntries')).toHaveLength(1); + }); + + it('it invokes "handleEdit" when edit button clicked', () => { + const mockHandleEdit = jest.fn(); + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + const editBtn = wrapper.find('[data-test-subj="exceptionsViewerEditBtn"] button').at(0); + editBtn.simulate('click'); + + expect(mockHandleEdit).toHaveBeenCalledTimes(1); + }); + + it('it invokes "handleDelete" when delete button clicked', () => { + const mockHandleDelete = jest.fn(); + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + const editBtn = wrapper.find('[data-test-subj="exceptionsViewerDeleteBtn"] button').at(0); + editBtn.simulate('click'); + + expect(mockHandleDelete).toHaveBeenCalledTimes(1); + }); + + it('it renders comment accordion closed to begin with', () => { + const mockHandleDelete = jest.fn(); + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + expect(wrapper.find('.euiAccordion-isOpen')).toHaveLength(0); + }); + + it('it renders comment accordion open when showComments is true', () => { + const mockHandleDelete = jest.fn(); + const exceptionItem = getExceptionItemMock(); + + const wrapper = mount( + ({ eui: euiLightVars, darkMode: false })}> + + + ); + + const commentsBtn = wrapper + .find('.euiButtonEmpty[data-test-subj="exceptionsViewerItemCommentsBtn"]') + .at(0); + commentsBtn.simulate('click'); + + expect(wrapper.find('.euiAccordion-isOpen')).toHaveLength(1); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx new file mode 100644 index 0000000000000..f4cdce62f56b3 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx @@ -0,0 +1,99 @@ +/* + * 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 { + EuiPanel, + EuiFlexGroup, + EuiCommentProps, + EuiCommentList, + EuiAccordion, + EuiFlexItem, +} from '@elastic/eui'; +import React, { useEffect, useState, useMemo, useCallback } from 'react'; +import styled from 'styled-components'; + +import { ExceptionDetails } from './exception_details'; +import { ExceptionEntries } from './exception_entries'; +import { getFormattedEntries, getFormattedComments } from '../helpers'; +import { FormattedEntry, ExceptionListItemSchema } from '../types'; + +const MyFlexItem = styled(EuiFlexItem)` + &.comments--show { + padding: ${({ theme }) => theme.eui.euiSize}; + border-top: ${({ theme }) => `${theme.eui.euiBorderThin}`} + +`; + +interface ExceptionItemProps { + exceptionItem: ExceptionListItemSchema; + commentsAccordionId: string; + handleDelete: ({ id }: { id: string }) => void; + handleEdit: (item: ExceptionListItemSchema) => void; +} + +const ExceptionItemComponent = ({ + exceptionItem, + commentsAccordionId, + handleDelete, + handleEdit, +}: ExceptionItemProps): JSX.Element => { + const [entryItems, setEntryItems] = useState([]); + const [showComments, setShowComments] = useState(false); + + useEffect((): void => { + const formattedEntries = getFormattedEntries(exceptionItem.entries); + setEntryItems(formattedEntries); + }, [exceptionItem.entries]); + + const onDelete = useCallback((): void => { + handleDelete({ id: exceptionItem.id }); + }, [handleDelete, exceptionItem]); + + const onEdit = useCallback((): void => { + handleEdit(exceptionItem); + }, [handleEdit, exceptionItem]); + + const onCommentsClick = useCallback((): void => { + setShowComments(!showComments); + }, [setShowComments, showComments]); + + const formattedComments = useMemo((): EuiCommentProps[] => { + return getFormattedComments(exceptionItem.comments); + }, [exceptionItem]); + + return ( + + + + + + + + + + + + + + + + ); +}; + +ExceptionItemComponent.displayName = 'ExceptionItemComponent'; + +export const ExceptionItem = React.memo(ExceptionItemComponent); + +ExceptionItem.displayName = 'ExceptionItem'; diff --git a/x-pack/plugins/siem/public/common/components/external_link_icon/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/external_link_icon/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/external_link_icon/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/external_link_icon/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/external_link_icon/index.tsx b/x-pack/plugins/security_solution/public/common/components/external_link_icon/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/external_link_icon/index.tsx rename to x-pack/plugins/security_solution/public/common/components/external_link_icon/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/filters_global/__snapshots__/filters_global.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/filters_global/__snapshots__/filters_global.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/filters_global/__snapshots__/filters_global.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/filters_global/__snapshots__/filters_global.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/filters_global/filters_global.test.tsx b/x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/filters_global/filters_global.test.tsx rename to x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/filters_global/filters_global.tsx b/x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/filters_global/filters_global.tsx rename to x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.tsx diff --git a/x-pack/plugins/siem/public/common/components/filters_global/index.tsx b/x-pack/plugins/security_solution/public/common/components/filters_global/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/filters_global/index.tsx rename to x-pack/plugins/security_solution/public/common/components/filters_global/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/formatted_bytes/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/formatted_bytes/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_bytes/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/formatted_bytes/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/formatted_bytes/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/formatted_bytes/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_bytes/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/formatted_bytes/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/formatted_bytes/index.tsx b/x-pack/plugins/security_solution/public/common/components/formatted_bytes/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_bytes/index.tsx rename to x-pack/plugins/security_solution/public/common/components/formatted_bytes/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/formatted_date/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/formatted_date/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_date/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/formatted_date/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/formatted_date/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/formatted_date/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_date/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/formatted_date/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/formatted_date/index.tsx b/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx similarity index 96% rename from x-pack/plugins/siem/public/common/components/formatted_date/index.tsx rename to x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx index ac4a3533853f7..687d2a36da610 100644 --- a/x-pack/plugins/siem/public/common/components/formatted_date/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx @@ -14,6 +14,7 @@ import { LocalizedDateTooltip } from '../localized_date_tooltip'; import { getMaybeDate } from './maybe_date'; export const PreferenceFormattedDate = React.memo<{ dateFormat?: string; value: Date }>( + /* eslint-disable-next-line react-hooks/rules-of-hooks */ ({ value, dateFormat = useDateFormat() }) => ( <>{moment.tz(value, useTimeZone()).format(dateFormat)} ) @@ -75,14 +76,15 @@ PreferenceFormattedP1DTDate.displayName = 'PreferenceFormattedP1DTDate'; export const FormattedDate = React.memo<{ fieldName: string; value?: string | number | null; + className?: string; }>( - ({ value, fieldName }): JSX.Element => { + ({ value, fieldName, className = '' }): JSX.Element => { if (value == null) { return getOrEmptyTagFromValue(value); } const maybeDate = getMaybeDate(value); return maybeDate.isValid() ? ( - + ) : ( diff --git a/x-pack/plugins/siem/public/common/components/formatted_date/maybe_date.test.ts b/x-pack/plugins/security_solution/public/common/components/formatted_date/maybe_date.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_date/maybe_date.test.ts rename to x-pack/plugins/security_solution/public/common/components/formatted_date/maybe_date.test.ts diff --git a/x-pack/plugins/siem/public/common/components/formatted_date/maybe_date.ts b/x-pack/plugins/security_solution/public/common/components/formatted_date/maybe_date.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/formatted_date/maybe_date.ts rename to x-pack/plugins/security_solution/public/common/components/formatted_date/maybe_date.ts diff --git a/x-pack/plugins/siem/public/common/components/generic_downloader/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/generic_downloader/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/generic_downloader/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/generic_downloader/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/generic_downloader/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/generic_downloader/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/generic_downloader/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/generic_downloader/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/generic_downloader/index.tsx b/x-pack/plugins/security_solution/public/common/components/generic_downloader/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/generic_downloader/index.tsx rename to x-pack/plugins/security_solution/public/common/components/generic_downloader/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/generic_downloader/translations.ts b/x-pack/plugins/security_solution/public/common/components/generic_downloader/translations.ts similarity index 80% rename from x-pack/plugins/siem/public/common/components/generic_downloader/translations.ts rename to x-pack/plugins/security_solution/public/common/components/generic_downloader/translations.ts index 72efefa1c461b..867c908bbacd3 100644 --- a/x-pack/plugins/siem/public/common/components/generic_downloader/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/generic_downloader/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const EXPORT_FAILURE = i18n.translate( - 'xpack.siem.detectionEngine.rules.components.ruleDownloader.exportFailureTitle', + 'xpack.securitySolution.detectionEngine.rules.components.ruleDownloader.exportFailureTitle', { defaultMessage: 'Failed to export rules…', } diff --git a/x-pack/plugins/siem/public/common/components/header_global/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_global/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_global/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/header_global/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/header_global/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/header_global/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_global/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/header_global/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_global/index.tsx b/x-pack/plugins/security_solution/public/common/components/header_global/index.tsx similarity index 97% rename from x-pack/plugins/siem/public/common/components/header_global/index.tsx rename to x-pack/plugins/security_solution/public/common/components/header_global/index.tsx index 06a69d0612ee8..c9085b5953817 100644 --- a/x-pack/plugins/siem/public/common/components/header_global/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_global/index.tsx @@ -18,6 +18,7 @@ import { MlPopover } from '../ml_popover/ml_popover'; import { SiemNavigation } from '../navigation'; import * as i18n from './translations'; import { indicesExistOrDataTemporarilyUnavailable, WithSource } from '../../containers/source'; +import { ADD_DATA_PATH } from '../../../../common/constants'; const Wrapper = styled.header` ${({ theme }) => css` @@ -86,7 +87,7 @@ export const HeaderGlobal = React.memo(({ hideDetectionEngine {i18n.BUTTON_ADD_DATA} diff --git a/x-pack/plugins/siem/public/common/components/header_global/translations.ts b/x-pack/plugins/security_solution/public/common/components/header_global/translations.ts similarity index 65% rename from x-pack/plugins/siem/public/common/components/header_global/translations.ts rename to x-pack/plugins/security_solution/public/common/components/header_global/translations.ts index c713f63016594..f67f665434a96 100644 --- a/x-pack/plugins/siem/public/common/components/header_global/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/header_global/translations.ts @@ -6,10 +6,10 @@ import { i18n } from '@kbn/i18n'; -export const SIEM = i18n.translate('xpack.siem.headerGlobal.siem', { +export const SIEM = i18n.translate('xpack.securitySolution.headerGlobal.siem', { defaultMessage: 'SIEM', }); -export const BUTTON_ADD_DATA = i18n.translate('xpack.siem.headerGlobal.buttonAddData', { +export const BUTTON_ADD_DATA = i18n.translate('xpack.securitySolution.headerGlobal.buttonAddData', { defaultMessage: 'Add data', }); diff --git a/x-pack/plugins/siem/public/common/components/header_page/__snapshots__/editable_title.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/editable_title.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/__snapshots__/editable_title.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/editable_title.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/header_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/header_page/__snapshots__/title.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/title.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/__snapshots__/title.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/header_page/__snapshots__/title.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/header_page/editable_title.test.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/editable_title.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/editable_title.test.tsx rename to x-pack/plugins/security_solution/public/common/components/header_page/editable_title.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_page/editable_title.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/editable_title.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/editable_title.tsx rename to x-pack/plugins/security_solution/public/common/components/header_page/editable_title.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_page/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/header_page/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_page/index.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/index.tsx rename to x-pack/plugins/security_solution/public/common/components/header_page/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_page/title.test.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/title.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/title.test.tsx rename to x-pack/plugins/security_solution/public/common/components/header_page/title.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_page/title.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/title.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/title.tsx rename to x-pack/plugins/security_solution/public/common/components/header_page/title.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_page/translations.ts b/x-pack/plugins/security_solution/public/common/components/header_page/translations.ts similarity index 64% rename from x-pack/plugins/siem/public/common/components/header_page/translations.ts rename to x-pack/plugins/security_solution/public/common/components/header_page/translations.ts index 764f1e5ac3731..43ad4b08d60a9 100644 --- a/x-pack/plugins/siem/public/common/components/header_page/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/header_page/translations.ts @@ -6,16 +6,16 @@ import { i18n } from '@kbn/i18n'; -export const SAVE = i18n.translate('xpack.siem.header.editableTitle.save', { +export const SAVE = i18n.translate('xpack.securitySolution.header.editableTitle.save', { defaultMessage: 'Save', }); -export const CANCEL = i18n.translate('xpack.siem.header.editableTitle.cancel', { +export const CANCEL = i18n.translate('xpack.securitySolution.header.editableTitle.cancel', { defaultMessage: 'Cancel', }); export const EDIT_TITLE_ARIA = (title: string) => - i18n.translate('xpack.siem.header.editableTitle.editButtonAria', { + i18n.translate('xpack.securitySolution.header.editableTitle.editButtonAria', { values: { title }, defaultMessage: 'You can edit {title} by clicking', }); diff --git a/x-pack/plugins/siem/public/common/components/header_page/types.ts b/x-pack/plugins/security_solution/public/common/components/header_page/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_page/types.ts rename to x-pack/plugins/security_solution/public/common/components/header_page/types.ts diff --git a/x-pack/plugins/siem/public/common/components/header_section/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_section/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/header_section/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/header_section/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_section/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/header_section/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/header_section/index.tsx b/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/header_section/index.tsx rename to x-pack/plugins/security_solution/public/common/components/header_section/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/help_menu/index.tsx b/x-pack/plugins/security_solution/public/common/components/help_menu/index.tsx similarity index 83% rename from x-pack/plugins/siem/public/common/components/help_menu/index.tsx rename to x-pack/plugins/security_solution/public/common/components/help_menu/index.tsx index a219dca595cda..ba9c136445983 100644 --- a/x-pack/plugins/siem/public/common/components/help_menu/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/help_menu/index.tsx @@ -13,12 +13,12 @@ export const HelpMenu = React.memo(() => { useEffect(() => { chrome.setHelpExtension({ - appName: i18n.translate('xpack.siem.chrome.help.appName', { + appName: i18n.translate('xpack.securitySolution.chrome.help.appName', { defaultMessage: 'SIEM', }), links: [ { - content: i18n.translate('xpack.siem.chrome.helpMenu.documentation', { + content: i18n.translate('xpack.securitySolution.chrome.helpMenu.documentation', { defaultMessage: 'SIEM documentation', }), href: docLinks.links.siem.guide, @@ -28,7 +28,7 @@ export const HelpMenu = React.memo(() => { rel: 'noopener', }, { - content: i18n.translate('xpack.siem.chrome.helpMenu.documentation.ecs', { + content: i18n.translate('xpack.securitySolution.chrome.helpMenu.documentation.ecs', { defaultMessage: 'ECS documentation', }), href: `${docLinks.ELASTIC_WEBSITE_URL}guide/en/ecs/current/index.html`, diff --git a/x-pack/plugins/siem/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/import_data_modal/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/import_data_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/import_data_modal/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/import_data_modal/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/import_data_modal/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/import_data_modal/index.tsx b/x-pack/plugins/security_solution/public/common/components/import_data_modal/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/import_data_modal/index.tsx rename to x-pack/plugins/security_solution/public/common/components/import_data_modal/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/import_data_modal/translations.ts b/x-pack/plugins/security_solution/public/common/components/import_data_modal/translations.ts similarity index 81% rename from x-pack/plugins/siem/public/common/components/import_data_modal/translations.ts rename to x-pack/plugins/security_solution/public/common/components/import_data_modal/translations.ts index 3fe8f2e3ee4bb..1bd64d191167b 100644 --- a/x-pack/plugins/siem/public/common/components/import_data_modal/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/import_data_modal/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const CANCEL_BUTTON = i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.cancelTitle', + 'xpack.securitySolution.detectionEngine.components.importRuleModal.cancelTitle', { defaultMessage: 'Cancel', } diff --git a/x-pack/plugins/siem/public/common/components/inspect/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/inspect/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/inspect/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/inspect/index.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/inspect/index.tsx rename to x-pack/plugins/security_solution/public/common/components/inspect/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/inspect/modal.test.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx similarity index 87% rename from x-pack/plugins/siem/public/common/components/inspect/modal.test.tsx rename to x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx index 153a1703059c2..3451ddacb6538 100644 --- a/x-pack/plugins/siem/public/common/components/inspect/modal.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx @@ -9,7 +9,8 @@ import { mount } from 'enzyme'; import React from 'react'; import { ThemeProvider } from 'styled-components'; -import { ModalInspectQuery } from './modal'; +import { NO_ALERT_INDEX } from '../../../../common/constants'; +import { ModalInspectQuery, formatIndexPatternRequested } from './modal'; const request = '{"index": ["auditbeat-*","filebeat-*","packetbeat-*","winlogbeat-*"],"allowNoIndices": true, "ignoreUnavailable": true, "body": { "aggregations": {"hosts": {"cardinality": {"field": "host.name" } }, "hosts_histogram": {"auto_date_histogram": {"field": "@timestamp","buckets": "6"},"aggs": { "count": {"cardinality": {"field": "host.name" }}}}}, "query": {"bool": {"filter": [{"range": { "@timestamp": {"gte": 1562290224506,"lte": 1562376624506 }}}]}}, "size": 0, "track_total_hits": false}}'; @@ -244,4 +245,31 @@ describe('Modal Inspect', () => { expect(closeModal).toHaveBeenCalled(); }); }); + + describe('formatIndexPatternRequested', () => { + test('Return specific messages to NO_ALERT_INDEX if we only have one index and we match the index name `NO_ALERT_INDEX`', () => { + const expected = formatIndexPatternRequested([NO_ALERT_INDEX]); + expect(expected).toEqual({'No alert index found'}); + }); + + test('Ignore NO_ALERT_INDEX if you have more than one indices', () => { + const expected = formatIndexPatternRequested([NO_ALERT_INDEX, 'indice-1']); + expect(expected).toEqual('indice-1'); + }); + + test('Happy path', () => { + const expected = formatIndexPatternRequested(['indice-1, indice-2']); + expect(expected).toEqual('indice-1, indice-2'); + }); + + test('Empty array with no indices', () => { + const expected = formatIndexPatternRequested([]); + expect(expected).toEqual('Sorry about that, something went wrong.'); + }); + + test('Undefined indices', () => { + const expected = formatIndexPatternRequested(undefined); + expect(expected).toEqual('Sorry about that, something went wrong.'); + }); + }); }); diff --git a/x-pack/plugins/siem/public/common/components/inspect/modal.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx similarity index 92% rename from x-pack/plugins/siem/public/common/components/inspect/modal.tsx rename to x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx index 1563c005af5b6..e9f7edf86d4ba 100644 --- a/x-pack/plugins/siem/public/common/components/inspect/modal.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx @@ -22,6 +22,7 @@ import numeral from '@elastic/numeral'; import React, { ReactNode } from 'react'; import styled from 'styled-components'; +import { NO_ALERT_INDEX } from '../../../../common/constants'; import * as i18n from './translations'; const DescriptionListStyled = styled(EuiDescriptionList)` @@ -88,6 +89,15 @@ const manageStringify = (object: Record | Response): string => } }; +export const formatIndexPatternRequested = (indices: string[] = []) => { + if (indices.length === 1 && indices[0] === NO_ALERT_INDEX) { + return {i18n.NO_ALERT_INDEX_FOUND}; + } + return indices.length > 0 + ? indices.filter((i) => i !== NO_ALERT_INDEX).join(', ') + : i18n.SOMETHING_WENT_WRONG; +}; + export const ModalInspectQuery = ({ closeModal, isShowing = false, @@ -113,7 +123,7 @@ export const ModalInspectQuery = ({ ), description: ( - {inspectRequest != null ? inspectRequest.index.join(', ') : i18n.SOMETHING_WENT_WRONG} + {formatIndexPatternRequested(inspectRequest?.index ?? [])} ), }, diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/translations.ts b/x-pack/plugins/security_solution/public/common/components/inspect/translations.ts new file mode 100644 index 0000000000000..4a8da8050dd9a --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/inspect/translations.ts @@ -0,0 +1,69 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const INSPECT = i18n.translate('xpack.securitySolution.inspectDescription', { + defaultMessage: 'Inspect', +}); + +export const CLOSE = i18n.translate('xpack.securitySolution.inspect.modal.closeTitle', { + defaultMessage: 'Close', +}); + +export const SOMETHING_WENT_WRONG = i18n.translate( + 'xpack.securitySolution.inspect.modal.somethingWentWrongDescription', + { + defaultMessage: 'Sorry about that, something went wrong.', + } +); +export const INDEX_PATTERN = i18n.translate( + 'xpack.securitySolution.inspect.modal.indexPatternLabel', + { + defaultMessage: 'Index pattern', + } +); + +export const INDEX_PATTERN_DESC = i18n.translate( + 'xpack.securitySolution.inspect.modal.indexPatternDescription', + { + defaultMessage: + 'The index pattern that connected to the Elasticsearch indices. These indices can be configured in Kibana > Advanced Settings.', + } +); + +export const QUERY_TIME = i18n.translate('xpack.securitySolution.inspect.modal.queryTimeLabel', { + defaultMessage: 'Query time', +}); + +export const QUERY_TIME_DESC = i18n.translate( + 'xpack.securitySolution.inspect.modal.queryTimeDescription', + { + defaultMessage: + 'The time it took to process the query. Does not include the time to send the request or parse it in the browser.', + } +); + +export const REQUEST_TIMESTAMP = i18n.translate( + 'xpack.securitySolution.inspect.modal.reqTimestampLabel', + { + defaultMessage: 'Request timestamp', + } +); + +export const REQUEST_TIMESTAMP_DESC = i18n.translate( + 'xpack.securitySolution.inspect.modal.reqTimestampDescription', + { + defaultMessage: 'Time when the start of the request has been logged', + } +); + +export const NO_ALERT_INDEX_FOUND = i18n.translate( + 'xpack.securitySolution.inspect.modal.noAlertIndexFound', + { + defaultMessage: 'No alert index found', + } +); diff --git a/x-pack/plugins/siem/public/common/components/last_event_time/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/last_event_time/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/last_event_time/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/last_event_time/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/last_event_time/index.tsx b/x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx similarity index 96% rename from x-pack/plugins/siem/public/common/components/last_event_time/index.tsx rename to x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx index 1c988ed989e86..35a891c21aa8a 100644 --- a/x-pack/plugins/siem/public/common/components/last_event_time/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx @@ -48,7 +48,7 @@ export const LastEventTime = memo(({ hostName, indexKey, ip : !loading && lastSeen != null && ( , diff --git a/x-pack/plugins/siem/public/common/components/link_icon/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/link_icon/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_icon/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/link_icon/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/link_icon/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/link_icon/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_icon/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/link_icon/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_icon/index.tsx b/x-pack/plugins/security_solution/public/common/components/link_icon/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_icon/index.tsx rename to x-pack/plugins/security_solution/public/common/components/link_icon/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/link_to/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/link_to/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/link_to/helpers.ts b/x-pack/plugins/security_solution/public/common/components/link_to/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/link_to/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/link_to/index.ts b/x-pack/plugins/security_solution/public/common/components/link_to/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/index.ts rename to x-pack/plugins/security_solution/public/common/components/link_to/index.ts diff --git a/x-pack/plugins/siem/public/common/components/link_to/link_to.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/link_to.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/link_to.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/link_to.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_case.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_case.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_case.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_case.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_detection_engine.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_detection_engine.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_detection_engine.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_detection_engine.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_hosts.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_hosts.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_management.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_management.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_management.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_management.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_network.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_network.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_overview.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_overview.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_overview.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_overview.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_to_timelines.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_timelines.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_to_timelines.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_timelines.tsx diff --git a/x-pack/plugins/siem/public/common/components/link_to/redirect_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_wrapper.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/link_to/redirect_wrapper.tsx rename to x-pack/plugins/security_solution/public/common/components/link_to/redirect_wrapper.tsx diff --git a/x-pack/plugins/siem/public/common/components/links/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/links/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/links/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/links/index.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/links/index.tsx rename to x-pack/plugins/security_solution/public/common/components/links/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/links/translations.ts b/x-pack/plugins/security_solution/public/common/components/links/translations.ts similarity index 86% rename from x-pack/plugins/siem/public/common/components/links/translations.ts rename to x-pack/plugins/security_solution/public/common/components/links/translations.ts index fdc5036117577..cf7db8bfa8161 100644 --- a/x-pack/plugins/siem/public/common/components/links/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/links/translations.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; export * from '../../../network/components/ip_overview/translations'; export const CASE_DETAILS_LINK_ARIA = (detailName: string) => - i18n.translate('xpack.siem.case.caseTable.caseDetailsLinkAria', { + i18n.translate('xpack.securitySolution.case.caseTable.caseDetailsLinkAria', { values: { detailName }, defaultMessage: 'click to visit case with title {detailName}', }); diff --git a/x-pack/plugins/siem/public/common/components/loader/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/loader/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/loader/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/loader/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/loader/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/loader/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/loader/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/loader/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/loader/index.tsx b/x-pack/plugins/security_solution/public/common/components/loader/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/loader/index.tsx rename to x-pack/plugins/security_solution/public/common/components/loader/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/localized_date_tooltip/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/localized_date_tooltip/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/localized_date_tooltip/index.tsx b/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx similarity index 93% rename from x-pack/plugins/siem/public/common/components/localized_date_tooltip/index.tsx rename to x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx index 918ec70bd7407..d8f8742cb4364 100644 --- a/x-pack/plugins/siem/public/common/components/localized_date_tooltip/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx @@ -13,9 +13,11 @@ export const LocalizedDateTooltip = React.memo<{ children: React.ReactNode; date: Date; fieldName?: string; -}>(({ children, date, fieldName }) => ( + className?: string; +}>(({ children, date, fieldName, className = '' }) => ( {fieldName != null ? ( diff --git a/x-pack/plugins/siem/public/common/components/markdown/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/markdown/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/markdown/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/markdown/__snapshots__/markdown_hint.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/markdown/__snapshots__/markdown_hint.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown/__snapshots__/markdown_hint.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/markdown/__snapshots__/markdown_hint.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/markdown/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/markdown/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/markdown/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/markdown/index.tsx b/x-pack/plugins/security_solution/public/common/components/markdown/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown/index.tsx rename to x-pack/plugins/security_solution/public/common/components/markdown/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/markdown/markdown_hint.test.tsx b/x-pack/plugins/security_solution/public/common/components/markdown/markdown_hint.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown/markdown_hint.test.tsx rename to x-pack/plugins/security_solution/public/common/components/markdown/markdown_hint.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/markdown/markdown_hint.tsx b/x-pack/plugins/security_solution/public/common/components/markdown/markdown_hint.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown/markdown_hint.tsx rename to x-pack/plugins/security_solution/public/common/components/markdown/markdown_hint.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/markdown/translations.ts b/x-pack/plugins/security_solution/public/common/components/markdown/translations.ts new file mode 100644 index 0000000000000..98d2e7d47b3fb --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/markdown/translations.ts @@ -0,0 +1,76 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const MARKDOWN_HINT_HEADING = i18n.translate( + 'xpack.securitySolution.markdown.hint.headingLabel', + { + defaultMessage: '# heading', + } +); + +export const MARKDOWN_HINT_BOLD = i18n.translate('xpack.securitySolution.markdown.hint.boldLabel', { + defaultMessage: '**bold**', +}); + +export const MARKDOWN_HINT_ITALICS = i18n.translate( + 'xpack.securitySolution.markdown.hint.italicsLabel', + { + defaultMessage: '_italics_', + } +); + +export const MARKDOWN_HINT_CODE = i18n.translate('xpack.securitySolution.markdown.hint.codeLabel', { + defaultMessage: '`code`', +}); + +export const MARKDOWN_HINT_URL = i18n.translate('xpack.securitySolution.markdown.hint.urlLabel', { + defaultMessage: '[link](url)', +}); + +export const MARKDOWN_HINT_BULLET = i18n.translate( + 'xpack.securitySolution.markdown.hint.bulletLabel', + { + defaultMessage: '* bullet', + } +); + +export const MARKDOWN_HINT_PREFORMATTED = i18n.translate( + 'xpack.securitySolution.markdown.hint.preformattedLabel', + { + defaultMessage: '```preformatted```', + } +); + +export const MARKDOWN_HINT_QUOTE = i18n.translate( + 'xpack.securitySolution.markdown.hint.quoteLabel', + { + defaultMessage: '>quote', + } +); + +export const MARKDOWN_HINT_STRIKETHROUGH = i18n.translate( + 'xpack.securitySolution.markdown.hint.strikethroughLabel', + { + defaultMessage: 'strikethrough', + } +); + +export const MARKDOWN_HINT_IMAGE_URL = i18n.translate( + 'xpack.securitySolution.markdown.hint.imageUrlLabel', + { + defaultMessage: '![image](url)', + } +); + +export const TIMELINE_ID = (timelineId: string) => + i18n.translate('xpack.securitySolution.markdown.toolTip.timelineId', { + defaultMessage: 'Timeline id: { timelineId }', + values: { + timelineId, + }, + }); diff --git a/x-pack/plugins/siem/public/common/components/markdown_editor/constants.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown_editor/constants.ts rename to x-pack/plugins/security_solution/public/common/components/markdown_editor/constants.ts diff --git a/x-pack/plugins/siem/public/common/components/markdown_editor/form.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/form.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown_editor/form.tsx rename to x-pack/plugins/security_solution/public/common/components/markdown_editor/form.tsx diff --git a/x-pack/plugins/siem/public/common/components/markdown_editor/index.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/markdown_editor/index.tsx rename to x-pack/plugins/security_solution/public/common/components/markdown_editor/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/translations.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/translations.ts new file mode 100644 index 0000000000000..084ac8c23d447 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/translations.ts @@ -0,0 +1,21 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const MARKDOWN_SYNTAX_HELP = i18n.translate( + 'xpack.securitySolution.markdownEditor.markdownInputHelp', + { + defaultMessage: 'Markdown syntax help', + } +); + +export const MARKDOWN = i18n.translate('xpack.securitySolution.markdownEditor.markdown', { + defaultMessage: 'Markdown', +}); +export const PREVIEW = i18n.translate('xpack.securitySolution.markdownEditor.preview', { + defaultMessage: 'Preview', +}); diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/index.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/index.tsx rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/matrix_loader.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/matrix_loader.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/matrix_loader.tsx rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/matrix_loader.tsx diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/translations.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/translations.ts similarity index 82% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/translations.ts rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/translations.ts index 345eb7e937bed..5df73b45d3898 100644 --- a/x-pack/plugins/siem/public/common/components/matrix_histogram/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const STACK_BY = i18n.translate( - 'xpack.siem.components.histogram.stackByOptions.stackByLabel', + 'xpack.securitySolution.components.histogram.stackByOptions.stackByLabel', { defaultMessage: 'Stack by', } diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/types.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/types.ts rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/utils.test.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/utils.test.ts rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.test.ts diff --git a/x-pack/plugins/siem/public/common/components/matrix_histogram/utils.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/matrix_histogram/utils.ts rename to x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/__snapshots__/entity_draggable.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/__snapshots__/entity_draggable.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/__snapshots__/entity_draggable.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml/__snapshots__/entity_draggable.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml/anomaly/anomaly_table_provider.tsx b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/anomaly_table_provider.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/anomaly/anomaly_table_provider.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/anomaly/anomaly_table_provider.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/anomaly/get_interval_from_anomalies.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/anomaly/get_interval_from_anomalies.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/anomaly/get_interval_from_anomalies.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/anomaly/get_interval_from_anomalies.ts rename to x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/anomaly/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/translations.ts similarity index 81% rename from x-pack/plugins/siem/public/common/components/ml/anomaly/translations.ts rename to x-pack/plugins/security_solution/public/common/components/ml/anomaly/translations.ts index 227400a0e83cd..23ec7943e65cc 100644 --- a/x-pack/plugins/siem/public/common/components/ml/anomaly/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const SIEM_TABLE_FETCH_FAILURE = i18n.translate( - 'xpack.siem.components.ml.anomaly.errors.anomaliesTableFetchFailureTitle', + 'xpack.securitySolution.components.ml.anomaly.errors.anomaliesTableFetchFailureTitle', { defaultMessage: 'Anomalies table fetch failure', } diff --git a/x-pack/plugins/siem/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/anomaly/use_anomalies_table_data.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/anomaly/use_anomalies_table_data.ts rename to x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/api/anomalies_table_data.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/anomalies_table_data.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/api/anomalies_table_data.ts rename to x-pack/plugins/security_solution/public/common/components/ml/api/anomalies_table_data.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/api/errors.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/errors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/api/errors.ts rename to x-pack/plugins/security_solution/public/common/components/ml/api/errors.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/api/get_ml_capabilities.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/get_ml_capabilities.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/api/get_ml_capabilities.ts rename to x-pack/plugins/security_solution/public/common/components/ml/api/get_ml_capabilities.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/api/throw_if_not_ok.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/api/throw_if_not_ok.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/api/throw_if_not_ok.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/api/throw_if_not_ok.ts rename to x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/api/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/translations.ts similarity index 82% rename from x-pack/plugins/siem/public/common/components/ml/api/translations.ts rename to x-pack/plugins/security_solution/public/common/components/ml/api/translations.ts index 87edc531758fb..3bb6ab21e393c 100644 --- a/x-pack/plugins/siem/public/common/components/ml/api/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const STATUS_CODE = i18n.translate( - 'xpack.siem.components.ml.api.errors.statusCodeFailureTitle', + 'xpack.securitySolution.components.ml.api.errors.statusCodeFailureTitle', { defaultMessage: 'Status Code:', } diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/add_entities_to_kql.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/add_entities_to_kql.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/add_entities_to_kql.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/add_entities_to_kql.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/entity_helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/entity_helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/entity_helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/entity_helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/entity_helpers.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/entity_helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/entity_helpers.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/entity_helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/ml_network_conditional_container.tsx b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_network_conditional_container.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/ml_network_conditional_container.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_network_conditional_container.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/remove_kql_variables.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/remove_kql_variables.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/remove_kql_variables.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/remove_kql_variables.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_commas_with_or.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_commas_with_or.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_parts.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_parts.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_parts.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_parts.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_parts.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_parts.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/replace_kql_parts.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_parts.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/rison_helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/rison_helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/conditional_links/rison_helpers.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/conditional_links/rison_helpers.ts rename to x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_host_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_host_type.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_network_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/get_criteria_from_network_type.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/host_to_criteria.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/host_to_criteria.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/host_to_criteria.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/host_to_criteria.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/network_to_criteria.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/network_to_criteria.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/criteria/network_to_criteria.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/criteria/network_to_criteria.ts rename to x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/entity_draggable.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/entity_draggable.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/entity_draggable.tsx b/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/entity_draggable.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/get_entries.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/get_entries.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/get_entries.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/get_entries.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/get_entries.ts b/x-pack/plugins/security_solution/public/common/components/ml/get_entries.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/get_entries.ts rename to x-pack/plugins/security_solution/public/common/components/ml/get_entries.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/create_influencers.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/influencers/create_influencers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/create_influencers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/create_influencers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/create_influencers.tsx b/x-pack/plugins/security_solution/public/common/components/ml/influencers/create_influencers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/create_influencers.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/create_influencers.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/get_host_name_from_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_host_name_from_influencers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/get_host_name_from_influencers.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/get_host_name_from_influencers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/get_host_name_from_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_host_name_from_influencers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/get_host_name_from_influencers.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/get_host_name_from_influencers.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/get_network_from_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/get_network_from_influencers.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/get_network_from_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/get_network_from_influencers.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/host_to_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/host_to_influencers.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/host_to_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/host_to_influencers.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/network_to_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/network_to_influencers.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/influencers/network_to_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/influencers/network_to_influencers.ts rename to x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/links/create_explorer_link.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/links/create_explorer_link.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/links/create_explorer_link.ts b/x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/links/create_explorer_link.ts rename to x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/links/create_series_link.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/links/create_series_link.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/links/create_series_link.ts b/x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/links/create_series_link.ts rename to x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/mock.ts b/x-pack/plugins/security_solution/public/common/components/ml/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/mock.ts rename to x-pack/plugins/security_solution/public/common/components/ml/mock.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/permissions/ml_capabilities_provider.tsx b/x-pack/plugins/security_solution/public/common/components/ml/permissions/ml_capabilities_provider.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/permissions/ml_capabilities_provider.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/permissions/ml_capabilities_provider.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/permissions/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml/permissions/translations.ts similarity index 80% rename from x-pack/plugins/siem/public/common/components/ml/permissions/translations.ts rename to x-pack/plugins/security_solution/public/common/components/ml/permissions/translations.ts index 325a14b71fcb1..06c7150f11ed3 100644 --- a/x-pack/plugins/siem/public/common/components/ml/permissions/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/permissions/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const MACHINE_LEARNING_PERMISSIONS_FAILURE = i18n.translate( - 'xpack.siem.components.ml.permissions.errors.machineLearningPermissionsFailureTitle', + 'xpack.securitySolution.components.ml.permissions.errors.machineLearningPermissionsFailureTitle', { defaultMessage: 'Machine learning permissions failure', } diff --git a/x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/draggable_score.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/draggable_score.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/__snapshots__/draggable_score.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/draggable_score.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml/score/anomaly_score.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/anomaly_score.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/anomaly_score.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/anomaly_score.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/anomaly_scores.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/anomaly_scores.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/anomaly_scores.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/anomaly_scores.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/create_description_list.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/create_description_list.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/create_description_list.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/create_description_list.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/create_descriptions_list.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/create_descriptions_list.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/create_entities_from_score.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/create_entities_from_score.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/score/create_entities_from_score.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/create_entities_from_score.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/score/draggable_score.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/draggable_score.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/draggable_score.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/draggable_score.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/get_score_string.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/get_score_string.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/get_score_string.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/get_score_string.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/score/get_top_severity.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/get_top_severity.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/score/get_top_severity.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/get_top_severity.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/score/score_health.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/score_health.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/score_health.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/score/score_health.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/score/score_interval_to_datetime.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/score_interval_to_datetime.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/score/score_interval_to_datetime.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/score/score_interval_to_datetime.ts rename to x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.ts diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/translations.ts new file mode 100644 index 0000000000000..455b254542ca0 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/translations.ts @@ -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 { i18n } from '@kbn/i18n'; + +export const INFLUENCED_BY = i18n.translate('xpack.securitySolution.ml.score.influencedByTitle', { + defaultMessage: 'Influenced By', +}); + +export const MAX_ANOMALY_SCORE = i18n.translate( + 'xpack.securitySolution.ml.score.maxAnomalyScoreTitle', + { + defaultMessage: 'Max Anomaly Score', + } +); + +export const ANOMALY_JOB = i18n.translate('xpack.securitySolution.ml.score.anomalyJobTitle', { + defaultMessage: 'Job', +}); + +export const VIEW_IN_MACHINE_LEARNING = i18n.translate( + 'xpack.securitySolution.ml.score.viewInMachineLearningLink', + { + defaultMessage: 'View in Machine Learning', + } +); + +export const DETECTED = i18n.translate('xpack.securitySolution.ml.score.detectedTitle', { + defaultMessage: 'Detected', +}); + +export const NARROW_TO_THIS_DATE_RANGE = i18n.translate( + 'xpack.securitySolution.ml.score.narrowToThisDateRangeLink', + { + defaultMessage: 'Narrow to this date range', + } +); + +export const ANOMALOUS_ENTITY = i18n.translate( + 'xpack.securitySolution.ml.score.anomalousEntityTitle', + { + defaultMessage: 'Anomalous Entity', + } +); diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/anomalies_host_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/anomalies_host_table.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/anomalies_network_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/anomalies_network_table.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/basic_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/basic_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/basic_table.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/basic_table.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_hosts.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_hosts.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_network.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_network.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_network.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/convert_anomalies_to_network.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/create_compound_key.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/create_compound_key.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/create_compound_key.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/create_compound_key.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx rename to x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/host_equality.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/host_equality.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/host_equality.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/host_equality.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/host_equality.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/host_equality.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/host_equality.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/host_equality.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/network_equality.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/network_equality.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/network_equality.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/tables/network_equality.ts rename to x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.ts diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/translations.ts new file mode 100644 index 0000000000000..0a985c71cc706 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/translations.ts @@ -0,0 +1,62 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const SHOWING = i18n.translate( + 'xpack.securitySolution.anomaliesTable.table.showingDescription', + { + defaultMessage: 'Showing', + } +); + +export const ANOMALIES = i18n.translate( + 'xpack.securitySolution.anomaliesTable.table.anomaliesDescription', + { + defaultMessage: 'Anomalies', + } +); + +export const UNIT = (totalCount: number) => + i18n.translate('xpack.securitySolution.anomaliesTable.table.unit', { + values: { totalCount }, + defaultMessage: `{totalCount, plural, =1 {anomaly} other {anomalies}}`, + }); + +export const TOOLTIP = i18n.translate( + 'xpack.securitySolution.anomaliesTable.table.anomaliesTooltip', + { + defaultMessage: 'The anomalies table is not filterable via the SIEM global KQL search.', + } +); + +export const SCORE = i18n.translate('xpack.securitySolution.ml.table.scoreTitle', { + defaultMessage: 'Anomaly score', +}); + +export const HOST_NAME = i18n.translate('xpack.securitySolution.ml.table.hostNameTitle', { + defaultMessage: 'Host name', +}); + +export const INFLUENCED_BY = i18n.translate('xpack.securitySolution.ml.table.influencedByTitle', { + defaultMessage: 'Influenced by', +}); + +export const ENTITY = i18n.translate('xpack.securitySolution.ml.table.entityTitle', { + defaultMessage: 'Entity', +}); + +export const DETECTOR = i18n.translate('xpack.securitySolution.ml.table.detectorTitle', { + defaultMessage: 'Job', +}); + +export const NETWORK_NAME = i18n.translate('xpack.securitySolution.ml.table.networkNameTitle', { + defaultMessage: 'Network IP', +}); + +export const TIME_STAMP = i18n.translate('xpack.securitySolution.ml.table.timestampTitle', { + defaultMessage: 'Timestamp', +}); diff --git a/x-pack/plugins/siem/public/common/components/ml/types.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/types.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/types.test.ts rename to x-pack/plugins/security_solution/public/common/components/ml/types.test.ts diff --git a/x-pack/plugins/siem/public/common/components/ml/types.ts b/x-pack/plugins/security_solution/public/common/components/ml/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml/types.ts rename to x-pack/plugins/security_solution/public/common/components/ml/types.ts diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/__mocks__/api.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/__mocks__/api.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/__mocks__/api.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/__mocks__/api.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/__snapshots__/popover_description.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/__snapshots__/popover_description.test.tsx.snap similarity index 63% rename from x-pack/plugins/siem/public/common/components/ml_popover/__snapshots__/popover_description.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml_popover/__snapshots__/popover_description.test.tsx.snap index 78b05a00cef9b..997ed632c798c 100644 --- a/x-pack/plugins/siem/public/common/components/ml_popover/__snapshots__/popover_description.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/__snapshots__/popover_description.test.tsx.snap @@ -5,8 +5,8 @@ exports[`JobsTableFilters renders correctly against snapshot 1`] = ` size="s" > , diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap similarity index 91% rename from x-pack/plugins/siem/public/common/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap index 546fa78babe22..7e9e813288090 100644 --- a/x-pack/plugins/siem/public/common/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap @@ -12,7 +12,7 @@ exports[`JobsTableFilters renders correctly against snapshot 1`] = ` > , diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/api.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/api.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/api.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/helpers.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/hooks/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/translations.ts similarity index 82% rename from x-pack/plugins/siem/public/common/components/ml_popover/hooks/translations.ts rename to x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/translations.ts index 4740dbb59e352..2b37c437866e0 100644 --- a/x-pack/plugins/siem/public/common/components/ml_popover/hooks/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const SIEM_JOB_FETCH_FAILURE = i18n.translate( - 'xpack.siem.components.mlPopup.hooks.errors.siemJobFetchFailureTitle', + 'xpack.securitySolution.components.mlPopup.hooks.errors.siemJobFetchFailureTitle', { defaultMessage: 'SIEM job fetch failure', } diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_ml_capabilities.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_ml_capabilities.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_ml_capabilities.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_ml_capabilities.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_siem_jobs.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_siem_jobs.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_siem_jobs.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_siem_jobs.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_siem_jobs_helpers.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap similarity index 88% rename from x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap index 83b80ae9219cc..db4d682bbaead 100644 --- a/x-pack/plugins/siem/public/common/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap @@ -11,7 +11,7 @@ exports[`ShowingCount renders correctly against snapshot 1`] = ` {

( diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/translations.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/translations.ts new file mode 100644 index 0000000000000..5c9c5dbcf962f --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/translations.ts @@ -0,0 +1,63 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ML_JOB_SETTINGS = i18n.translate( + 'xpack.securitySolution.components.mlPopup.mlJobSettingsButtonLabel', + { + defaultMessage: 'ML job settings', + } +); + +export const UPGRADE_TITLE = i18n.translate( + 'xpack.securitySolution.components.mlPopup.upgradeTitle', + { + defaultMessage: 'Upgrade to Elastic Platinum', + } +); + +export const UPGRADE_BUTTON = i18n.translate( + 'xpack.securitySolution.components.mlPopup.upgradeButtonLabel', + { + defaultMessage: 'Subscription plans', + } +); + +export const LICENSE_BUTTON = i18n.translate( + 'xpack.securitySolution.components.mlPopup.licenseButtonLabel', + { + defaultMessage: 'Manage license', + } +); + +export const MODULE_NOT_COMPATIBLE_TITLE = (incompatibleJobCount: number) => + i18n.translate('xpack.securitySolution.components.mlPopup.moduleNotCompatibleTitle', { + values: { incompatibleJobCount }, + defaultMessage: + '{incompatibleJobCount} {incompatibleJobCount, plural, =1 {job} other {jobs}} are currently unavailable', + }); + +export const START_JOB_FAILURE = i18n.translate( + 'xpack.securitySolution.components.mlPopup.errors.startJobFailureTitle', + { + defaultMessage: 'Start job failure', + } +); + +export const STOP_JOB_FAILURE = i18n.translate( + 'xpack.securitySolution.containers.errors.stopJobFailureTitle', + { + defaultMessage: 'Stop job failure', + } +); + +export const CREATE_JOB_FAILURE = i18n.translate( + 'xpack.securitySolution.components.mlPopup.errors.createJobFailureTitle', + { + defaultMessage: 'Create job failure', + } +); diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/types.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/types.ts rename to x-pack/plugins/security_solution/public/common/components/ml_popover/types.ts diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/upgrade_contents.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/upgrade_contents.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/ml_popover/upgrade_contents.test.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/upgrade_contents.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/upgrade_contents.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/upgrade_contents.tsx similarity index 93% rename from x-pack/plugins/siem/public/common/components/ml_popover/upgrade_contents.tsx rename to x-pack/plugins/security_solution/public/common/components/ml_popover/upgrade_contents.tsx index e9efd7df23903..97b85ae8b913a 100644 --- a/x-pack/plugins/siem/public/common/components/ml_popover/upgrade_contents.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/upgrade_contents.tsx @@ -31,13 +31,13 @@ export const UpgradeContentsComponent = () => ( {i18n.UPGRADE_TITLE} diff --git a/x-pack/plugins/siem/public/common/components/navigation/breadcrumbs/index.test.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts similarity index 95% rename from x-pack/plugins/siem/public/common/components/navigation/breadcrumbs/index.test.ts rename to x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts index 9ec2542c52db2..8f1318aea3763 100644 --- a/x-pack/plugins/siem/public/common/components/navigation/breadcrumbs/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts @@ -112,7 +112,7 @@ describe('Navigation Breadcrumbs', () => { expect(breadcrumbs).toEqual([ { href: '#/link-to/overview', - text: 'SIEM', + text: 'Security', }, { href: @@ -129,7 +129,7 @@ describe('Navigation Breadcrumbs', () => { test('should return Network breadcrumbs when supplied network pathname', () => { const breadcrumbs = getBreadcrumbsForRoute(getMockObject('network', '/network', undefined)); expect(breadcrumbs).toEqual([ - { text: 'SIEM', href: '#/link-to/overview' }, + { text: 'Security', href: '#/link-to/overview' }, { text: 'Network', href: @@ -147,7 +147,7 @@ describe('Navigation Breadcrumbs', () => { getMockObject('timelines', '/timelines', undefined) ); expect(breadcrumbs).toEqual([ - { text: 'SIEM', href: '#/link-to/overview' }, + { text: 'Security', href: '#/link-to/overview' }, { text: 'Timelines', href: '#/link-to/timelines' }, ]); }); @@ -155,7 +155,7 @@ describe('Navigation Breadcrumbs', () => { test('should return Host Details breadcrumbs when supplied a pathname with hostName', () => { const breadcrumbs = getBreadcrumbsForRoute(getMockObject('hosts', '/hosts', hostName)); expect(breadcrumbs).toEqual([ - { text: 'SIEM', href: '#/link-to/overview' }, + { text: 'Security', href: '#/link-to/overview' }, { text: 'Hosts', href: @@ -173,7 +173,7 @@ describe('Navigation Breadcrumbs', () => { test('should return IP Details breadcrumbs when supplied pathname with ipv4', () => { const breadcrumbs = getBreadcrumbsForRoute(getMockObject('network', '/network', ipv4)); expect(breadcrumbs).toEqual([ - { text: 'SIEM', href: '#/link-to/overview' }, + { text: 'Security', href: '#/link-to/overview' }, { text: 'Network', href: @@ -190,7 +190,7 @@ describe('Navigation Breadcrumbs', () => { test('should return IP Details breadcrumbs when supplied pathname with ipv6', () => { const breadcrumbs = getBreadcrumbsForRoute(getMockObject('network', '/network', ipv6Encoded)); expect(breadcrumbs).toEqual([ - { text: 'SIEM', href: '#/link-to/overview' }, + { text: 'Security', href: '#/link-to/overview' }, { text: 'Network', href: @@ -209,7 +209,7 @@ describe('Navigation Breadcrumbs', () => { test('should call chrome breadcrumb service with correct breadcrumbs', () => { setBreadcrumbs(getMockObject('hosts', '/hosts', hostName), chromeMock); expect(setBreadcrumbsMock).toBeCalledWith([ - { text: 'SIEM', href: '#/link-to/overview' }, + { text: 'Security', href: '#/link-to/overview' }, { text: 'Hosts', href: diff --git a/x-pack/plugins/siem/public/common/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/breadcrumbs/index.ts rename to x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts diff --git a/x-pack/plugins/siem/public/common/components/navigation/helpers.ts b/x-pack/plugins/security_solution/public/common/components/navigation/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/navigation/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/navigation/index.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/index.tsx rename to x-pack/plugins/security_solution/public/common/components/navigation/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/navigation/tab_navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/tab_navigation/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/navigation/tab_navigation/index.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/tab_navigation/index.tsx rename to x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/navigation/tab_navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/tab_navigation/types.ts rename to x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts diff --git a/x-pack/plugins/siem/public/common/components/navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/types.ts rename to x-pack/plugins/security_solution/public/common/components/navigation/types.ts diff --git a/x-pack/plugins/siem/public/common/components/navigation/use_get_url_search.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_get_url_search.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/navigation/use_get_url_search.tsx rename to x-pack/plugins/security_solution/public/common/components/navigation/use_get_url_search.tsx diff --git a/x-pack/plugins/siem/public/common/components/news_feed/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/news_feed/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/news_feed/helpers.ts b/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/news_feed/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/news_feed/index.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/index.tsx rename to x-pack/plugins/security_solution/public/common/components/news_feed/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/news_feed/news_feed.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/news_feed.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/news_feed.tsx rename to x-pack/plugins/security_solution/public/common/components/news_feed/news_feed.tsx diff --git a/x-pack/plugins/siem/public/common/components/news_feed/news_link/index.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/news_link/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/news_link/index.tsx rename to x-pack/plugins/security_solution/public/common/components/news_feed/news_link/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/news_feed/no_news/index.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/no_news/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/no_news/index.tsx rename to x-pack/plugins/security_solution/public/common/components/news_feed/no_news/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/news_feed/post/index.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/post/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/post/index.tsx rename to x-pack/plugins/security_solution/public/common/components/news_feed/post/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/news_feed/translations.ts b/x-pack/plugins/security_solution/public/common/components/news_feed/translations.ts similarity index 76% rename from x-pack/plugins/siem/public/common/components/news_feed/translations.ts rename to x-pack/plugins/security_solution/public/common/components/news_feed/translations.ts index 5d3b4171f501e..b0f9507266e52 100644 --- a/x-pack/plugins/siem/public/common/components/news_feed/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/news_feed/translations.ts @@ -6,13 +6,13 @@ import { i18n } from '@kbn/i18n'; -export const NO_NEWS_MESSAGE = i18n.translate('xpack.siem.newsFeed.noNewsMessage', { +export const NO_NEWS_MESSAGE = i18n.translate('xpack.securitySolution.newsFeed.noNewsMessage', { defaultMessage: 'Your current news feed URL returned no recent news. You may update the URL or disable security news via', }); export const ADVANCED_SETTINGS_LINK_TITLE = i18n.translate( - 'xpack.siem.newsFeed.advancedSettingsLinkTitle', + 'xpack.securitySolution.newsFeed.advancedSettingsLinkTitle', { defaultMessage: 'SIEM advanced settings', } diff --git a/x-pack/plugins/siem/public/common/components/news_feed/types.ts b/x-pack/plugins/security_solution/public/common/components/news_feed/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/news_feed/types.ts rename to x-pack/plugins/security_solution/public/common/components/news_feed/types.ts diff --git a/x-pack/plugins/siem/public/common/components/page/index.tsx b/x-pack/plugins/security_solution/public/common/components/page/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/page/index.tsx rename to x-pack/plugins/security_solution/public/common/components/page/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/page/manage_query.tsx b/x-pack/plugins/security_solution/public/common/components/page/manage_query.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/page/manage_query.tsx rename to x-pack/plugins/security_solution/public/common/components/page/manage_query.tsx diff --git a/x-pack/plugins/siem/public/common/components/page/translations.ts b/x-pack/plugins/security_solution/public/common/components/page/translations.ts similarity index 69% rename from x-pack/plugins/siem/public/common/components/page/translations.ts rename to x-pack/plugins/security_solution/public/common/components/page/translations.ts index 896af2d68fc9a..d53f612364456 100644 --- a/x-pack/plugins/siem/public/common/components/page/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/page/translations.ts @@ -6,10 +6,10 @@ import { i18n } from '@kbn/i18n'; -export const LIVE = i18n.translate('xpack.siem.footer.live', { +export const LIVE = i18n.translate('xpack.securitySolution.footer.live', { defaultMessage: 'Live', }); -export const DATA = i18n.translate('xpack.siem.footer.data', { +export const DATA = i18n.translate('xpack.securitySolution.footer.data', { defaultMessage: 'data', }); diff --git a/x-pack/plugins/siem/public/common/components/page_route/index.tsx b/x-pack/plugins/security_solution/public/common/components/page_route/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/page_route/index.tsx rename to x-pack/plugins/security_solution/public/common/components/page_route/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/page_route/pageroute.test.tsx b/x-pack/plugins/security_solution/public/common/components/page_route/pageroute.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/page_route/pageroute.test.tsx rename to x-pack/plugins/security_solution/public/common/components/page_route/pageroute.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/page_route/pageroute.tsx b/x-pack/plugins/security_solution/public/common/components/page_route/pageroute.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/page_route/pageroute.tsx rename to x-pack/plugins/security_solution/public/common/components/page_route/pageroute.tsx diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/paginated_table/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/helpers.ts b/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/paginated_table/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/index.mock.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/paginated_table/index.mock.tsx rename to x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/paginated_table/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/index.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/paginated_table/index.tsx rename to x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/translations.ts b/x-pack/plugins/security_solution/public/common/components/paginated_table/translations.ts new file mode 100644 index 0000000000000..6e89ad9a85169 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/translations.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const SHOWING = i18n.translate('xpack.securitySolution.paginatedTable.showingSubtitle', { + defaultMessage: 'Showing', +}); + +export const ROWS = i18n.translate('xpack.securitySolution.paginatedTable.rowsButtonLabel', { + defaultMessage: 'Rows per page', +}); + +export const TOAST_TITLE = i18n.translate( + 'xpack.securitySolution.paginatedTable.tooManyResultsToastTitle', + { + defaultMessage: ' - too many results', + } +); + +export const TOAST_TEXT = i18n.translate( + 'xpack.securitySolution.paginatedTable.tooManyResultsToastText', + { + defaultMessage: 'Narrow your query to better filter the results', + } +); diff --git a/x-pack/plugins/siem/public/common/components/panel/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/panel/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/panel/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/panel/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/panel/index.tsx b/x-pack/plugins/security_solution/public/common/components/panel/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/panel/index.tsx rename to x-pack/plugins/security_solution/public/common/components/panel/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/progress_inline/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/progress_inline/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/progress_inline/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/progress_inline/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/progress_inline/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/progress_inline/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/progress_inline/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/progress_inline/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/progress_inline/index.tsx b/x-pack/plugins/security_solution/public/common/components/progress_inline/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/progress_inline/index.tsx rename to x-pack/plugins/security_solution/public/common/components/progress_inline/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/query_bar/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/query_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/query_bar/index.tsx rename to x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/scroll_to_top/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/scroll_to_top/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/scroll_to_top/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/scroll_to_top/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/scroll_to_top/index.tsx b/x-pack/plugins/security_solution/public/common/components/scroll_to_top/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/scroll_to_top/index.tsx rename to x-pack/plugins/security_solution/public/common/components/scroll_to_top/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/search_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/search_bar/index.tsx rename to x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/search_bar/selectors.ts b/x-pack/plugins/security_solution/public/common/components/search_bar/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/search_bar/selectors.ts rename to x-pack/plugins/security_solution/public/common/components/search_bar/selectors.ts diff --git a/x-pack/plugins/siem/public/common/components/selectable_text/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/selectable_text/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/selectable_text/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/selectable_text/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/selectable_text/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/selectable_text/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/selectable_text/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/selectable_text/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/selectable_text/index.tsx b/x-pack/plugins/security_solution/public/common/components/selectable_text/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/selectable_text/index.tsx rename to x-pack/plugins/security_solution/public/common/components/selectable_text/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/sidebar_header/index.tsx b/x-pack/plugins/security_solution/public/common/components/sidebar_header/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/sidebar_header/index.tsx rename to x-pack/plugins/security_solution/public/common/components/sidebar_header/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/stat_items/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/stat_items/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/stat_items/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/stat_items/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/stat_items/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/stat_items/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/stat_items/index.tsx b/x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/stat_items/index.tsx rename to x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/subtitle/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/subtitle/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/subtitle/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/subtitle/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/subtitle/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/subtitle/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/subtitle/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/subtitle/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/subtitle/index.tsx b/x-pack/plugins/security_solution/public/common/components/subtitle/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/subtitle/index.tsx rename to x-pack/plugins/security_solution/public/common/components/subtitle/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/super_date_picker/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/super_date_picker/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/super_date_picker/index.tsx b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/super_date_picker/index.tsx rename to x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/super_date_picker/selectors.test.ts b/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/super_date_picker/selectors.test.ts rename to x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.test.ts diff --git a/x-pack/plugins/siem/public/common/components/super_date_picker/selectors.ts b/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/super_date_picker/selectors.ts rename to x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.ts diff --git a/x-pack/plugins/siem/public/common/components/tables/__snapshots__/helpers.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/tables/__snapshots__/helpers.test.tsx.snap similarity index 97% rename from x-pack/plugins/siem/public/common/components/tables/__snapshots__/helpers.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/tables/__snapshots__/helpers.test.tsx.snap index 82f447a55ec07..5372ccfcd1188 100644 --- a/x-pack/plugins/siem/public/common/components/tables/__snapshots__/helpers.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/tables/__snapshots__/helpers.test.tsx.snap @@ -121,7 +121,7 @@ exports[`Table Helpers #getRowItemOverflow it returns correctly against snapshot diff --git a/x-pack/plugins/siem/public/common/components/tables/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/tables/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/tables/helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/tables/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/tables/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx similarity index 98% rename from x-pack/plugins/siem/public/common/components/tables/helpers.tsx rename to x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx index bdc18ddad123d..b8ea32969c015 100644 --- a/x-pack/plugins/siem/public/common/components/tables/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx @@ -164,7 +164,7 @@ export const getRowItemOverflow = ( {rowItems.length - overflowIndexStart - maxOverflowItems}{' '} diff --git a/x-pack/plugins/siem/public/common/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/toasters/errors.ts b/x-pack/plugins/security_solution/public/common/components/toasters/errors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/errors.ts rename to x-pack/plugins/security_solution/public/common/components/toasters/errors.ts diff --git a/x-pack/plugins/siem/public/common/components/toasters/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/toasters/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/toasters/index.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/index.tsx rename to x-pack/plugins/security_solution/public/common/components/toasters/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/toasters/modal_all_errors.test.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/modal_all_errors.test.tsx rename to x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/toasters/modal_all_errors.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/modal_all_errors.tsx rename to x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/translations.ts b/x-pack/plugins/security_solution/public/common/components/toasters/translations.ts new file mode 100644 index 0000000000000..99eea6434318b --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/components/toasters/translations.ts @@ -0,0 +1,25 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const SEE_ALL_ERRORS = i18n.translate( + 'xpack.securitySolution.modalAllErrors.seeAllErrors.button', + { + defaultMessage: 'See the full error(s)', + } +); + +export const TITLE_ERROR_MODAL = i18n.translate('xpack.securitySolution.modalAllErrors.title', { + defaultMessage: 'Your visualization has error(s)', +}); + +export const CLOSE_ERROR_MODAL = i18n.translate( + 'xpack.securitySolution.modalAllErrors.close.button', + { + defaultMessage: 'Close', + } +); diff --git a/x-pack/plugins/siem/public/common/components/toasters/utils.test.ts b/x-pack/plugins/security_solution/public/common/components/toasters/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/utils.test.ts rename to x-pack/plugins/security_solution/public/common/components/toasters/utils.test.ts diff --git a/x-pack/plugins/siem/public/common/components/toasters/utils.ts b/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/toasters/utils.ts rename to x-pack/plugins/security_solution/public/common/components/toasters/utils.ts diff --git a/x-pack/plugins/siem/public/common/components/top_n/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/top_n/helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/components/top_n/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/top_n/helpers.ts b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/top_n/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/top_n/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/top_n/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/top_n/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/top_n/index.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/top_n/index.tsx rename to x-pack/plugins/security_solution/public/common/components/top_n/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/top_n/top_n.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/top_n/top_n.test.tsx rename to x-pack/plugins/security_solution/public/common/components/top_n/top_n.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/top_n/top_n.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/top_n/top_n.tsx rename to x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx diff --git a/x-pack/plugins/siem/public/common/components/top_n/translations.ts b/x-pack/plugins/security_solution/public/common/components/top_n/translations.ts similarity index 52% rename from x-pack/plugins/siem/public/common/components/top_n/translations.ts rename to x-pack/plugins/security_solution/public/common/components/top_n/translations.ts index a6873ab0ece7b..b149a5eb1458f 100644 --- a/x-pack/plugins/siem/public/common/components/top_n/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/top_n/translations.ts @@ -6,18 +6,18 @@ import { i18n } from '@kbn/i18n'; -export const CLOSE = i18n.translate('xpack.siem.topN.closeButtonLabel', { +export const CLOSE = i18n.translate('xpack.securitySolution.topN.closeButtonLabel', { defaultMessage: 'Close', }); -export const ALL_EVENTS = i18n.translate('xpack.siem.topN.allEventsSelectLabel', { +export const ALL_EVENTS = i18n.translate('xpack.securitySolution.topN.allEventsSelectLabel', { defaultMessage: 'All events', }); -export const RAW_EVENTS = i18n.translate('xpack.siem.topN.rawEventsSelectLabel', { +export const RAW_EVENTS = i18n.translate('xpack.securitySolution.topN.rawEventsSelectLabel', { defaultMessage: 'Raw events', }); -export const ALERT_EVENTS = i18n.translate('xpack.siem.topN.alertEventsSelectLabel', { +export const ALERT_EVENTS = i18n.translate('xpack.securitySolution.topN.alertEventsSelectLabel', { defaultMessage: 'Alert events', }); diff --git a/x-pack/plugins/siem/public/common/components/truncatable_text/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/truncatable_text/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/truncatable_text/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/truncatable_text/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/truncatable_text/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/truncatable_text/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/truncatable_text/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/truncatable_text/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/truncatable_text/index.tsx b/x-pack/plugins/security_solution/public/common/components/truncatable_text/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/truncatable_text/index.tsx rename to x-pack/plugins/security_solution/public/common/components/truncatable_text/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/url_state/constants.ts b/x-pack/plugins/security_solution/public/common/components/url_state/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/constants.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/constants.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/url_state/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/helpers.ts b/x-pack/plugins/security_solution/public/common/components/url_state/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/helpers.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/helpers.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/url_state/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/url_state/index.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/index.tsx rename to x-pack/plugins/security_solution/public/common/components/url_state/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/url_state/index_mocked.test.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/index_mocked.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/index_mocked.test.tsx rename to x-pack/plugins/security_solution/public/common/components/url_state/index_mocked.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/url_state/initialize_redux_by_url.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/initialize_redux_by_url.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/initialize_redux_by_url.tsx rename to x-pack/plugins/security_solution/public/common/components/url_state/initialize_redux_by_url.tsx diff --git a/x-pack/plugins/siem/public/common/components/url_state/normalize_time_range.test.ts b/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/normalize_time_range.test.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.test.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/normalize_time_range.ts b/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/normalize_time_range.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/test_dependencies.ts b/x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/test_dependencies.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/types.ts b/x-pack/plugins/security_solution/public/common/components/url_state/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/types.ts rename to x-pack/plugins/security_solution/public/common/components/url_state/types.ts diff --git a/x-pack/plugins/siem/public/common/components/url_state/use_url_state.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/use_url_state.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/url_state/use_url_state.tsx rename to x-pack/plugins/security_solution/public/common/components/url_state/use_url_state.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/index.ts b/x-pack/plugins/security_solution/public/common/components/utility_bar/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/index.ts rename to x-pack/plugins/security_solution/public/common/components/utility_bar/index.ts diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/styles.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/styles.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/styles.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/styles.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar.test.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar.test.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_action.test.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_action.test.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_action.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_action.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_group.test.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_group.test.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_group.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_group.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_section.test.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_section.test.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_section.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_section.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_text.test.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_text.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_text.test.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_text.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_text.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_text.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/utility_bar/utility_bar_text.tsx rename to x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_text.tsx diff --git a/x-pack/plugins/siem/public/common/components/utils.ts b/x-pack/plugins/security_solution/public/common/components/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/common/components/utils.ts rename to x-pack/plugins/security_solution/public/common/components/utils.ts diff --git a/x-pack/plugins/siem/public/common/components/with_hover_actions/index.tsx b/x-pack/plugins/security_solution/public/common/components/with_hover_actions/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/with_hover_actions/index.tsx rename to x-pack/plugins/security_solution/public/common/components/with_hover_actions/index.tsx diff --git a/x-pack/plugins/siem/public/common/components/wrapper_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/wrapper_page/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/common/components/wrapper_page/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/common/components/wrapper_page/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/common/components/wrapper_page/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/wrapper_page/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/wrapper_page/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/wrapper_page/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/components/wrapper_page/index.tsx b/x-pack/plugins/security_solution/public/common/components/wrapper_page/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/components/wrapper_page/index.tsx rename to x-pack/plugins/security_solution/public/common/components/wrapper_page/index.tsx diff --git a/x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts rename to x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts diff --git a/x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx rename to x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx diff --git a/x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/translations.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/translations.ts similarity index 69% rename from x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/translations.ts rename to x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/translations.ts index e8f5c2cde4331..39d401fa36af2 100644 --- a/x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/translations.ts +++ b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/translations.ts @@ -7,18 +7,18 @@ import { i18n } from '@kbn/i18n'; export const ANOMALIES_STACK_BY_JOB_ID = i18n.translate( - 'xpack.siem.containers.anomalies.stackByJobId', + 'xpack.securitySolution.containers.anomalies.stackByJobId', { defaultMessage: 'job', } ); -export const ANOMALIES_TITLE = i18n.translate('xpack.siem.containers.anomalies.title', { +export const ANOMALIES_TITLE = i18n.translate('xpack.securitySolution.containers.anomalies.title', { defaultMessage: 'Anomalies', }); export const ERROR_FETCHING_ANOMALIES_DATA = i18n.translate( - 'xpack.siem.containers.anomalies.errorFetchingAnomaliesData', + 'xpack.securitySolution.containers.anomalies.errorFetchingAnomaliesData', { defaultMessage: 'Failed to query anomalies data', } diff --git a/x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/types.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/types.ts rename to x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts diff --git a/x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts rename to x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts diff --git a/x-pack/plugins/siem/public/common/containers/errors/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/errors/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/errors/index.test.tsx rename to x-pack/plugins/security_solution/public/common/containers/errors/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/containers/errors/index.tsx b/x-pack/plugins/security_solution/public/common/containers/errors/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/errors/index.tsx rename to x-pack/plugins/security_solution/public/common/containers/errors/index.tsx diff --git a/x-pack/plugins/siem/public/common/containers/errors/translations.ts b/x-pack/plugins/security_solution/public/common/containers/errors/translations.ts similarity index 62% rename from x-pack/plugins/siem/public/common/containers/errors/translations.ts rename to x-pack/plugins/security_solution/public/common/containers/errors/translations.ts index 31509e7db6d5e..442eb12092d95 100644 --- a/x-pack/plugins/siem/public/common/containers/errors/translations.ts +++ b/x-pack/plugins/security_solution/public/common/containers/errors/translations.ts @@ -7,12 +7,15 @@ import { i18n } from '@kbn/i18n'; export const DATA_FETCH_FAILURE = i18n.translate( - 'xpack.siem.containers.errors.dataFetchFailureTitle', + 'xpack.securitySolution.containers.errors.dataFetchFailureTitle', { defaultMessage: 'Data Fetch Failure', } ); -export const NETWORK_FAILURE = i18n.translate('xpack.siem.containers.errors.networkFailureTitle', { - defaultMessage: 'Network Failure', -}); +export const NETWORK_FAILURE = i18n.translate( + 'xpack.securitySolution.containers.errors.networkFailureTitle', + { + defaultMessage: 'Network Failure', + } +); diff --git a/x-pack/plugins/siem/public/common/containers/events/last_event_time/index.ts b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/events/last_event_time/index.ts rename to x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.ts diff --git a/x-pack/plugins/siem/public/common/containers/events/last_event_time/last_event_time.gql_query.ts b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/last_event_time.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/events/last_event_time/last_event_time.gql_query.ts rename to x-pack/plugins/security_solution/public/common/containers/events/last_event_time/last_event_time.gql_query.ts diff --git a/x-pack/plugins/siem/public/common/containers/events/last_event_time/mock.ts b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/events/last_event_time/mock.ts rename to x-pack/plugins/security_solution/public/common/containers/events/last_event_time/mock.ts diff --git a/x-pack/plugins/siem/public/common/containers/global_time/index.tsx b/x-pack/plugins/security_solution/public/common/containers/global_time/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/global_time/index.tsx rename to x-pack/plugins/security_solution/public/common/containers/global_time/index.tsx diff --git a/x-pack/plugins/siem/public/common/containers/helpers.test.ts b/x-pack/plugins/security_solution/public/common/containers/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/containers/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/containers/helpers.ts b/x-pack/plugins/security_solution/public/common/containers/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/helpers.ts rename to x-pack/plugins/security_solution/public/common/containers/helpers.ts diff --git a/x-pack/plugins/siem/public/common/containers/kuery_autocompletion/index.tsx b/x-pack/plugins/security_solution/public/common/containers/kuery_autocompletion/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/kuery_autocompletion/index.tsx rename to x-pack/plugins/security_solution/public/common/containers/kuery_autocompletion/index.tsx diff --git a/x-pack/plugins/siem/public/common/containers/matrix_histogram/index.gql_query.ts b/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/matrix_histogram/index.gql_query.ts rename to x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/common/containers/matrix_histogram/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/matrix_histogram/index.test.tsx rename to x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/containers/matrix_histogram/index.ts b/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/matrix_histogram/index.ts rename to x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.ts diff --git a/x-pack/plugins/siem/public/common/containers/query_template.tsx b/x-pack/plugins/security_solution/public/common/containers/query_template.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/query_template.tsx rename to x-pack/plugins/security_solution/public/common/containers/query_template.tsx diff --git a/x-pack/plugins/siem/public/common/containers/query_template_paginated.tsx b/x-pack/plugins/security_solution/public/common/containers/query_template_paginated.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/query_template_paginated.tsx rename to x-pack/plugins/security_solution/public/common/containers/query_template_paginated.tsx diff --git a/x-pack/plugins/siem/public/common/containers/source/index.gql_query.ts b/x-pack/plugins/security_solution/public/common/containers/source/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/source/index.gql_query.ts rename to x-pack/plugins/security_solution/public/common/containers/source/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/common/containers/source/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/source/index.test.tsx rename to x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/containers/source/index.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/containers/source/index.tsx rename to x-pack/plugins/security_solution/public/common/containers/source/index.tsx diff --git a/x-pack/plugins/siem/public/common/containers/source/mock.ts b/x-pack/plugins/security_solution/public/common/containers/source/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/common/containers/source/mock.ts rename to x-pack/plugins/security_solution/public/common/containers/source/mock.ts diff --git a/x-pack/plugins/siem/public/common/hooks/api/__mock__/api.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/api/__mock__/api.tsx rename to x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/api/api.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/api/api.tsx rename to x-pack/plugins/security_solution/public/common/hooks/api/api.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/api/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/api/helpers.test.tsx rename to x-pack/plugins/security_solution/public/common/hooks/api/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/api/helpers.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/api/helpers.tsx rename to x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx rename to x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts rename to x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts diff --git a/x-pack/plugins/siem/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts rename to x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts diff --git a/x-pack/plugins/siem/public/common/hooks/translations.ts b/x-pack/plugins/security_solution/public/common/hooks/translations.ts similarity index 70% rename from x-pack/plugins/siem/public/common/hooks/translations.ts rename to x-pack/plugins/security_solution/public/common/hooks/translations.ts index 40db748a3e1ac..50aeb76686962 100644 --- a/x-pack/plugins/siem/public/common/hooks/translations.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/translations.ts @@ -7,27 +7,27 @@ import { i18n } from '@kbn/i18n'; export const ADDED_TO_TIMELINE_MESSAGE = (fieldOrValue: string) => - i18n.translate('xpack.siem.hooks.useAddToTimeline.addedFieldMessage', { + i18n.translate('xpack.securitySolution.hooks.useAddToTimeline.addedFieldMessage', { values: { fieldOrValue }, defaultMessage: `Added {fieldOrValue} to timeline`, }); export const STATUS_CODE = i18n.translate( - 'xpack.siem.components.ml.api.errors.statusCodeFailureTitle', + 'xpack.securitySolution.components.ml.api.errors.statusCodeFailureTitle', { defaultMessage: 'Status Code:', } ); export const NETWORK_ERROR = i18n.translate( - 'xpack.siem.components.ml.api.errors.networkErrorFailureTitle', + 'xpack.securitySolution.components.ml.api.errors.networkErrorFailureTitle', { defaultMessage: 'Network Error:', } ); export const INDEX_PATTERN_FETCH_FAILURE = i18n.translate( - 'xpack.siem.components.mlPopup.hooks.errors.indexPatternFetchFailureTitle', + 'xpack.securitySolution.components.mlPopup.hooks.errors.indexPatternFetchFailureTitle', { defaultMessage: 'Index pattern fetch failure', } diff --git a/x-pack/plugins/siem/public/common/hooks/types.ts b/x-pack/plugins/security_solution/public/common/hooks/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/types.ts rename to x-pack/plugins/security_solution/public/common/hooks/types.ts diff --git a/x-pack/plugins/siem/public/common/hooks/use_add_to_timeline.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_add_to_timeline.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/use_add_to_timeline.tsx rename to x-pack/plugins/security_solution/public/common/hooks/use_add_to_timeline.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/use_index_patterns.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/use_index_patterns.tsx rename to x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx diff --git a/x-pack/plugins/siem/public/common/hooks/use_providers_portal.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_providers_portal.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/hooks/use_providers_portal.tsx rename to x-pack/plugins/security_solution/public/common/hooks/use_providers_portal.tsx diff --git a/x-pack/plugins/siem/public/common/lib/clipboard/clipboard.tsx b/x-pack/plugins/security_solution/public/common/lib/clipboard/clipboard.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/clipboard/clipboard.tsx rename to x-pack/plugins/security_solution/public/common/lib/clipboard/clipboard.tsx diff --git a/x-pack/plugins/security_solution/public/common/lib/clipboard/translations.ts b/x-pack/plugins/security_solution/public/common/lib/clipboard/translations.ts new file mode 100644 index 0000000000000..9d4fb492f9104 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/clipboard/translations.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const COPY = i18n.translate('xpack.securitySolution.clipboard.copy', { + defaultMessage: 'Copy', +}); + +export const COPIED = i18n.translate('xpack.securitySolution.clipboard.copied', { + defaultMessage: 'Copied', +}); + +export const TO_THE_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.clipboard.to.the.clipboard', + { + defaultMessage: 'to the clipboard', + } +); + +export const COPY_TO_THE_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.clipboard.copy.to.the.clipboard', + { + defaultMessage: 'Copy to the clipboard', + } +); diff --git a/x-pack/plugins/siem/public/common/lib/clipboard/with_copy_to_clipboard.tsx b/x-pack/plugins/security_solution/public/common/lib/clipboard/with_copy_to_clipboard.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/clipboard/with_copy_to_clipboard.tsx rename to x-pack/plugins/security_solution/public/common/lib/clipboard/with_copy_to_clipboard.tsx diff --git a/x-pack/plugins/siem/public/common/lib/compose/helpers.test.ts b/x-pack/plugins/security_solution/public/common/lib/compose/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/compose/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/lib/compose/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/lib/compose/helpers.ts b/x-pack/plugins/security_solution/public/common/lib/compose/helpers.ts similarity index 93% rename from x-pack/plugins/siem/public/common/lib/compose/helpers.ts rename to x-pack/plugins/security_solution/public/common/lib/compose/helpers.ts index b698fc55cc5e5..c9b4769cc97fa 100644 --- a/x-pack/plugins/siem/public/common/lib/compose/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/lib/compose/helpers.ts @@ -20,6 +20,6 @@ export const getLinks = (cache: InMemoryCache, basePath: string) => [ createHttpLink({ credentials: 'same-origin', headers: { 'kbn-xsrf': 'true' }, - uri: `${basePath}/api/siem/graphql`, + uri: `${basePath}/api/solutions/security/graphql`, }), ]; diff --git a/x-pack/plugins/siem/public/common/lib/compose/kibana_compose.tsx b/x-pack/plugins/security_solution/public/common/lib/compose/kibana_compose.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/compose/kibana_compose.tsx rename to x-pack/plugins/security_solution/public/common/lib/compose/kibana_compose.tsx diff --git a/x-pack/plugins/siem/public/common/lib/connectors/components/connector_flyout/index.tsx b/x-pack/plugins/security_solution/public/common/lib/connectors/components/connector_flyout/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/components/connector_flyout/index.tsx rename to x-pack/plugins/security_solution/public/common/lib/connectors/components/connector_flyout/index.tsx diff --git a/x-pack/plugins/siem/public/common/lib/connectors/config.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/config.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/config.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/config.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/index.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/index.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/jira/config.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/config.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/jira/config.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/jira/config.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/jira/flyout.tsx b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/flyout.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/jira/flyout.tsx rename to x-pack/plugins/security_solution/public/common/lib/connectors/jira/flyout.tsx diff --git a/x-pack/plugins/siem/public/common/lib/connectors/jira/index.tsx b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/jira/index.tsx rename to x-pack/plugins/security_solution/public/common/lib/connectors/jira/index.tsx diff --git a/x-pack/plugins/siem/public/common/lib/connectors/jira/logo.svg b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/logo.svg similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/jira/logo.svg rename to x-pack/plugins/security_solution/public/common/lib/connectors/jira/logo.svg diff --git a/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts new file mode 100644 index 0000000000000..286f81842411b --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/translations.ts @@ -0,0 +1,44 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export * from '../translations'; + +export const JIRA_DESC = i18n.translate( + 'xpack.securitySolution.case.connectors.jira.selectMessageText', + { + defaultMessage: 'Push or update SIEM case data to a new issue in Jira', + } +); + +export const JIRA_TITLE = i18n.translate( + 'xpack.securitySolution.case.connectors.jira.actionTypeTitle', + { + defaultMessage: 'Jira', + } +); + +export const JIRA_PROJECT_KEY_LABEL = i18n.translate( + 'xpack.securitySolution.case.connectors.jira.projectKey', + { + defaultMessage: 'Project key', + } +); + +export const JIRA_PROJECT_KEY_REQUIRED = i18n.translate( + 'xpack.securitySolution.case.connectors.jira.requiredProjectKeyTextField', + { + defaultMessage: 'Project key is required', + } +); + +export const MAPPING_FIELD_SUMMARY = i18n.translate( + 'xpack.securitySolution.case.configureCases.mappingFieldSummary', + { + defaultMessage: 'Summary', + } +); diff --git a/x-pack/plugins/siem/public/common/lib/connectors/jira/types.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/jira/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/jira/types.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/jira/types.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/config.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/config.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/servicenow/config.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/config.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/flyout.tsx b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/flyout.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/servicenow/flyout.tsx rename to x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/flyout.tsx diff --git a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/index.tsx b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/servicenow/index.tsx rename to x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/index.tsx diff --git a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/logo.svg b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/logo.svg similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/servicenow/logo.svg rename to x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/logo.svg diff --git a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/translations.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/translations.ts similarity index 74% rename from x-pack/plugins/siem/public/common/lib/connectors/servicenow/translations.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/translations.ts index 39d0ee96513a2..0f06a4259e070 100644 --- a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/translations.ts +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/translations.ts @@ -9,21 +9,21 @@ import { i18n } from '@kbn/i18n'; export * from '../translations'; export const SERVICENOW_DESC = i18n.translate( - 'xpack.siem.case.connectors.servicenow.selectMessageText', + 'xpack.securitySolution.case.connectors.servicenow.selectMessageText', { defaultMessage: 'Push or update SIEM case data to a new incident in ServiceNow', } ); export const SERVICENOW_TITLE = i18n.translate( - 'xpack.siem.case.connectors.servicenow.actionTypeTitle', + 'xpack.securitySolution.case.connectors.servicenow.actionTypeTitle', { defaultMessage: 'ServiceNow', } ); export const MAPPING_FIELD_SHORT_DESC = i18n.translate( - 'xpack.siem.case.configureCases.mappingFieldShortDescription', + 'xpack.securitySolution.case.configureCases.mappingFieldShortDescription', { defaultMessage: 'Short Description', } diff --git a/x-pack/plugins/siem/public/common/lib/connectors/servicenow/types.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/servicenow/types.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/servicenow/types.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/translations.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts similarity index 58% rename from x-pack/plugins/siem/public/common/lib/connectors/translations.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts index 071fd8ef12645..40848ea769008 100644 --- a/x-pack/plugins/siem/public/common/lib/connectors/translations.ts +++ b/x-pack/plugins/security_solution/public/common/lib/connectors/translations.ts @@ -7,88 +7,91 @@ import { i18n } from '@kbn/i18n'; export const API_URL_LABEL = i18n.translate( - 'xpack.siem.case.connectors.common.apiUrlTextFieldLabel', + 'xpack.securitySolution.case.connectors.common.apiUrlTextFieldLabel', { defaultMessage: 'URL', } ); export const API_URL_REQUIRED = i18n.translate( - 'xpack.siem.case.connectors.common.requiredApiUrlTextField', + 'xpack.securitySolution.case.connectors.common.requiredApiUrlTextField', { defaultMessage: 'URL is required', } ); export const API_URL_INVALID = i18n.translate( - 'xpack.siem.case.connectors.common.invalidApiUrlTextField', + 'xpack.securitySolution.case.connectors.common.invalidApiUrlTextField', { defaultMessage: 'URL is invalid', } ); export const USERNAME_LABEL = i18n.translate( - 'xpack.siem.case.connectors.common.usernameTextFieldLabel', + 'xpack.securitySolution.case.connectors.common.usernameTextFieldLabel', { defaultMessage: 'Username', } ); export const USERNAME_REQUIRED = i18n.translate( - 'xpack.siem.case.connectors.common.requiredUsernameTextField', + 'xpack.securitySolution.case.connectors.common.requiredUsernameTextField', { defaultMessage: 'Username is required', } ); export const PASSWORD_LABEL = i18n.translate( - 'xpack.siem.case.connectors.common.passwordTextFieldLabel', + 'xpack.securitySolution.case.connectors.common.passwordTextFieldLabel', { defaultMessage: 'Password', } ); export const PASSWORD_REQUIRED = i18n.translate( - 'xpack.siem.case.connectors.common.requiredPasswordTextField', + 'xpack.securitySolution.case.connectors.common.requiredPasswordTextField', { defaultMessage: 'Password is required', } ); export const API_TOKEN_LABEL = i18n.translate( - 'xpack.siem.case.connectors.common.apiTokenTextFieldLabel', + 'xpack.securitySolution.case.connectors.common.apiTokenTextFieldLabel', { defaultMessage: 'Api token', } ); export const API_TOKEN_REQUIRED = i18n.translate( - 'xpack.siem.case.connectors.common.requiredApiTokenTextField', + 'xpack.securitySolution.case.connectors.common.requiredApiTokenTextField', { defaultMessage: 'Api token is required', } ); -export const EMAIL_LABEL = i18n.translate('xpack.siem.case.connectors.common.emailTextFieldLabel', { - defaultMessage: 'Email', -}); +export const EMAIL_LABEL = i18n.translate( + 'xpack.securitySolution.case.connectors.common.emailTextFieldLabel', + { + defaultMessage: 'Email', + } +); export const EMAIL_REQUIRED = i18n.translate( - 'xpack.siem.case.connectors.common.requiredEmailTextField', + 'xpack.securitySolution.case.connectors.common.requiredEmailTextField', { defaultMessage: 'Email is required', } ); export const MAPPING_FIELD_DESC = i18n.translate( - 'xpack.siem.case.configureCases.mappingFieldDescription', + 'xpack.securitySolution.case.configureCases.mappingFieldDescription', { defaultMessage: 'Description', } ); export const MAPPING_FIELD_COMMENTS = i18n.translate( - 'xpack.siem.case.configureCases.mappingFieldComments', + 'xpack.securitySolution.case.configureCases.mappingFieldComments', { defaultMessage: 'Comments', } diff --git a/x-pack/plugins/siem/public/common/lib/connectors/types.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/types.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/types.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/utils.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/utils.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/utils.ts diff --git a/x-pack/plugins/siem/public/common/lib/connectors/validators.ts b/x-pack/plugins/security_solution/public/common/lib/connectors/validators.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/connectors/validators.ts rename to x-pack/plugins/security_solution/public/common/lib/connectors/validators.ts diff --git a/x-pack/plugins/siem/public/common/lib/helpers/index.test.tsx b/x-pack/plugins/security_solution/public/common/lib/helpers/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/helpers/index.test.tsx rename to x-pack/plugins/security_solution/public/common/lib/helpers/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/lib/helpers/index.tsx b/x-pack/plugins/security_solution/public/common/lib/helpers/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/helpers/index.tsx rename to x-pack/plugins/security_solution/public/common/lib/helpers/index.tsx diff --git a/x-pack/plugins/siem/public/common/lib/helpers/scheduler.ts b/x-pack/plugins/security_solution/public/common/lib/helpers/scheduler.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/helpers/scheduler.ts rename to x-pack/plugins/security_solution/public/common/lib/helpers/scheduler.ts diff --git a/x-pack/plugins/siem/public/common/lib/history/index.ts b/x-pack/plugins/security_solution/public/common/lib/history/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/history/index.ts rename to x-pack/plugins/security_solution/public/common/lib/history/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/keury/index.test.ts b/x-pack/plugins/security_solution/public/common/lib/keury/index.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/keury/index.test.ts rename to x-pack/plugins/security_solution/public/common/lib/keury/index.test.ts diff --git a/x-pack/plugins/siem/public/common/lib/keury/index.ts b/x-pack/plugins/security_solution/public/common/lib/keury/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/keury/index.ts rename to x-pack/plugins/security_solution/public/common/lib/keury/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/kibana/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/kibana/__mocks__/index.ts rename to x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/kibana/hooks.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts similarity index 89% rename from x-pack/plugins/siem/public/common/lib/kibana/hooks.ts rename to x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts index ebdefa66b0ef3..afd57cade5559 100644 --- a/x-pack/plugins/siem/public/common/lib/kibana/hooks.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts @@ -60,7 +60,7 @@ export const useCurrentUser = (): AuthenticatedElasticUser | null => { } } else { setUser({ - username: i18n.translate('xpack.siem.getCurrentUser.unknownUser', { + username: i18n.translate('xpack.securitySolution.getCurrentUser.unknownUser', { defaultMessage: 'Unknown', }), email: '', @@ -75,7 +75,7 @@ export const useCurrentUser = (): AuthenticatedElasticUser | null => { } catch (error) { if (!didCancel) { errorToToaster({ - title: i18n.translate('xpack.siem.getCurrentUser.Error', { + title: i18n.translate('xpack.securitySolution.getCurrentUser.Error', { defaultMessage: 'Error getting user', }), error: error.body && error.body.message ? new Error(error.body.message) : error, @@ -111,9 +111,13 @@ export const useGetUserSavedObjectPermissions = () => { useEffect(() => { const capabilitiesCanUserCRUD: boolean = - typeof uiCapabilities.siem.crud === 'boolean' ? uiCapabilities.siem.crud : false; + typeof uiCapabilities.securitySolution.crud === 'boolean' + ? uiCapabilities.securitySolution.crud + : false; const capabilitiesCanUserRead: boolean = - typeof uiCapabilities.siem.show === 'boolean' ? uiCapabilities.siem.show : false; + typeof uiCapabilities.securitySolution.show === 'boolean' + ? uiCapabilities.securitySolution.show + : false; setSavedObjectsPermissions({ crud: capabilitiesCanUserCRUD, read: capabilitiesCanUserRead, diff --git a/x-pack/plugins/siem/public/common/lib/kibana/index.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/kibana/index.ts rename to x-pack/plugins/security_solution/public/common/lib/kibana/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/kibana/kibana_react.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/kibana/kibana_react.ts rename to x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.ts diff --git a/x-pack/plugins/siem/public/common/lib/kibana/services.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/kibana/services.ts rename to x-pack/plugins/security_solution/public/common/lib/kibana/services.ts diff --git a/x-pack/plugins/siem/public/common/lib/lib.ts b/x-pack/plugins/security_solution/public/common/lib/lib.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/lib.ts rename to x-pack/plugins/security_solution/public/common/lib/lib.ts diff --git a/x-pack/plugins/siem/public/common/lib/note/index.ts b/x-pack/plugins/security_solution/public/common/lib/note/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/note/index.ts rename to x-pack/plugins/security_solution/public/common/lib/note/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/telemetry/index.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/telemetry/index.ts rename to x-pack/plugins/security_solution/public/common/lib/telemetry/index.ts diff --git a/x-pack/plugins/siem/public/common/lib/telemetry/middleware.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/middleware.ts similarity index 100% rename from x-pack/plugins/siem/public/common/lib/telemetry/middleware.ts rename to x-pack/plugins/security_solution/public/common/lib/telemetry/middleware.ts diff --git a/x-pack/plugins/siem/public/common/lib/theme/use_eui_theme.tsx b/x-pack/plugins/security_solution/public/common/lib/theme/use_eui_theme.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/lib/theme/use_eui_theme.tsx rename to x-pack/plugins/security_solution/public/common/lib/theme/use_eui_theme.tsx diff --git a/x-pack/plugins/siem/public/common/mock/endpoint/app_context_render.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx similarity index 89% rename from x-pack/plugins/siem/public/common/mock/endpoint/app_context_render.tsx rename to x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx index 3c0189625ee29..d930136b3c0c4 100644 --- a/x-pack/plugins/siem/public/common/mock/endpoint/app_context_render.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx @@ -18,7 +18,7 @@ import { createStore, State, substateMiddlewareFactory } from '../../store'; import { alertMiddlewareFactory } from '../../../endpoint_alerts/store/middleware'; import { AppRootProvider } from './app_root_provider'; import { managementMiddlewareFactory } from '../../../management/store/middleware'; -import { hostMiddlewareFactory } from '../../../endpoint_hosts/store/middleware'; +import { createKibanaContextProviderMock } from '../kibana_react'; import { SUB_PLUGINS_REDUCER, mockGlobalState } from '..'; type UiRender = (ui: React.ReactElement, options?: RenderOptions) => RenderResult; @@ -57,10 +57,6 @@ export const createAppRootMockRenderer = (): AppContextTestRender => { const depsStart = depsStartMock(); const middlewareSpy = createSpyMiddleware(); const store = createStore(mockGlobalState, SUB_PLUGINS_REDUCER, apolloClientObservable, [ - substateMiddlewareFactory( - (globalState) => globalState.hostList, - hostMiddlewareFactory(coreStart, depsStart) - ), substateMiddlewareFactory( (globalState) => globalState.alertList, alertMiddlewareFactory(coreStart, depsStart) @@ -68,11 +64,14 @@ export const createAppRootMockRenderer = (): AppContextTestRender => { ...managementMiddlewareFactory(coreStart, depsStart), middlewareSpy.actionSpyMiddleware, ]); + const MockKibanaContextProvider = createKibanaContextProviderMock(); const AppWrapper: React.FC<{ children: React.ReactElement }> = ({ children }) => ( - - {children} - + + + {children} + + ); const render: UiRender = (ui, options) => { return reactRender(ui, { diff --git a/x-pack/plugins/siem/public/common/mock/endpoint/app_root_provider.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/mock/endpoint/app_root_provider.tsx rename to x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx diff --git a/x-pack/plugins/siem/public/common/mock/endpoint/dependencies_start_mock.ts b/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/endpoint/dependencies_start_mock.ts rename to x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts diff --git a/x-pack/plugins/siem/public/common/mock/endpoint/index.ts b/x-pack/plugins/security_solution/public/common/mock/endpoint/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/endpoint/index.ts rename to x-pack/plugins/security_solution/public/common/mock/endpoint/index.ts diff --git a/x-pack/plugins/siem/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts similarity index 97% rename from x-pack/plugins/siem/public/common/mock/global_state.ts rename to x-pack/plugins/security_solution/public/common/mock/global_state.ts index 30dffa8dbf6bf..4af39ade70d25 100644 --- a/x-pack/plugins/siem/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -26,10 +26,8 @@ import { import { networkModel } from '../../network/store'; import { TimelineType, TimelineStatus } from '../../../common/types/timeline'; import { initialAlertListState } from '../../endpoint_alerts/store/reducer'; -import { initialHostListState } from '../../endpoint_hosts/store/reducer'; import { mockManagementState } from '../../management/store/reducer'; import { AlertListState } from '../../../common/endpoint_alerts/types'; -import { HostState } from '../../endpoint_hosts/types'; import { ManagementState } from '../../management/types'; export const mockGlobalState: State = { @@ -237,6 +235,5 @@ export const mockGlobalState: State = { * they are cast to mutable versions here. */ alertList: initialAlertListState as AlertListState, - hostList: initialHostListState as HostState, management: mockManagementState as ManagementState, }; diff --git a/x-pack/plugins/siem/public/common/mock/header.ts b/x-pack/plugins/security_solution/public/common/mock/header.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/header.ts rename to x-pack/plugins/security_solution/public/common/mock/header.ts diff --git a/x-pack/plugins/siem/public/common/mock/hook_wrapper.tsx b/x-pack/plugins/security_solution/public/common/mock/hook_wrapper.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/mock/hook_wrapper.tsx rename to x-pack/plugins/security_solution/public/common/mock/hook_wrapper.tsx diff --git a/x-pack/plugins/siem/public/common/mock/index.ts b/x-pack/plugins/security_solution/public/common/mock/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/index.ts rename to x-pack/plugins/security_solution/public/common/mock/index.ts diff --git a/x-pack/plugins/siem/public/common/mock/index_pattern.ts b/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/index_pattern.ts rename to x-pack/plugins/security_solution/public/common/mock/index_pattern.ts diff --git a/x-pack/plugins/siem/public/common/mock/kibana_core.ts b/x-pack/plugins/security_solution/public/common/mock/kibana_core.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/kibana_core.ts rename to x-pack/plugins/security_solution/public/common/mock/kibana_core.ts diff --git a/x-pack/plugins/siem/public/common/mock/kibana_react.ts b/x-pack/plugins/security_solution/public/common/mock/kibana_react.ts similarity index 95% rename from x-pack/plugins/siem/public/common/mock/kibana_react.ts rename to x-pack/plugins/security_solution/public/common/mock/kibana_react.ts index 0c51d39257a97..cc8970d4df5b4 100644 --- a/x-pack/plugins/siem/public/common/mock/kibana_react.ts +++ b/x-pack/plugins/security_solution/public/common/mock/kibana_react.ts @@ -10,8 +10,8 @@ import React from 'react'; import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; import { - DEFAULT_SIEM_TIME_RANGE, - DEFAULT_SIEM_REFRESH_INTERVAL, + DEFAULT_APP_TIME_RANGE, + DEFAULT_APP_REFRESH_INTERVAL, DEFAULT_INDEX_KEY, DEFAULT_DATE_FORMAT, DEFAULT_DATE_FORMAT_TZ, @@ -31,11 +31,11 @@ import { createKibanaCoreStartMock, createKibanaPluginsStartMock } from './kiban export const mockUiSettings: Record = { [DEFAULT_TIME_RANGE]: { from: 'now-15m', to: 'now', mode: 'quick' }, [DEFAULT_REFRESH_RATE_INTERVAL]: { pause: false, value: 0 }, - [DEFAULT_SIEM_TIME_RANGE]: { + [DEFAULT_APP_TIME_RANGE]: { from: DEFAULT_FROM, to: DEFAULT_TO, }, - [DEFAULT_SIEM_REFRESH_INTERVAL]: { + [DEFAULT_APP_REFRESH_INTERVAL]: { pause: DEFAULT_INTERVAL_PAUSE, value: DEFAULT_INTERVAL_VALUE, }, diff --git a/x-pack/plugins/siem/public/common/mock/match_media.ts b/x-pack/plugins/security_solution/public/common/mock/match_media.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/match_media.ts rename to x-pack/plugins/security_solution/public/common/mock/match_media.ts diff --git a/x-pack/plugins/siem/public/common/mock/mock_detail_item.ts b/x-pack/plugins/security_solution/public/common/mock/mock_detail_item.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/mock_detail_item.ts rename to x-pack/plugins/security_solution/public/common/mock/mock_detail_item.ts diff --git a/x-pack/plugins/siem/public/common/mock/mock_ecs.ts b/x-pack/plugins/security_solution/public/common/mock/mock_ecs.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/mock_ecs.ts rename to x-pack/plugins/security_solution/public/common/mock/mock_ecs.ts diff --git a/x-pack/plugins/siem/public/common/mock/mock_endgame_ecs_data.ts b/x-pack/plugins/security_solution/public/common/mock/mock_endgame_ecs_data.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/mock_endgame_ecs_data.ts rename to x-pack/plugins/security_solution/public/common/mock/mock_endgame_ecs_data.ts diff --git a/x-pack/plugins/siem/public/common/mock/mock_timeline_data.ts b/x-pack/plugins/security_solution/public/common/mock/mock_timeline_data.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/mock_timeline_data.ts rename to x-pack/plugins/security_solution/public/common/mock/mock_timeline_data.ts diff --git a/x-pack/plugins/siem/public/common/mock/netflow.ts b/x-pack/plugins/security_solution/public/common/mock/netflow.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/netflow.ts rename to x-pack/plugins/security_solution/public/common/mock/netflow.ts diff --git a/x-pack/plugins/siem/public/common/mock/news.ts b/x-pack/plugins/security_solution/public/common/mock/news.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/news.ts rename to x-pack/plugins/security_solution/public/common/mock/news.ts diff --git a/x-pack/plugins/siem/public/common/mock/raw_news.ts b/x-pack/plugins/security_solution/public/common/mock/raw_news.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/raw_news.ts rename to x-pack/plugins/security_solution/public/common/mock/raw_news.ts diff --git a/x-pack/plugins/siem/public/common/mock/test_providers.tsx b/x-pack/plugins/security_solution/public/common/mock/test_providers.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/mock/test_providers.tsx rename to x-pack/plugins/security_solution/public/common/mock/test_providers.tsx diff --git a/x-pack/plugins/siem/public/common/mock/timeline_results.ts b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts similarity index 100% rename from x-pack/plugins/siem/public/common/mock/timeline_results.ts rename to x-pack/plugins/security_solution/public/common/mock/timeline_results.ts diff --git a/x-pack/plugins/siem/public/common/mock/utils.ts b/x-pack/plugins/security_solution/public/common/mock/utils.ts similarity index 86% rename from x-pack/plugins/siem/public/common/mock/utils.ts rename to x-pack/plugins/security_solution/public/common/mock/utils.ts index 1ff5cb8e734ec..c71a9ada75eee 100644 --- a/x-pack/plugins/siem/public/common/mock/utils.ts +++ b/x-pack/plugins/security_solution/public/common/mock/utils.ts @@ -11,9 +11,7 @@ import { managementReducer } from '../../management/store/reducer'; import { ManagementPluginReducer } from '../../management'; import { SubPluginsInitReducer } from '../store'; import { EndpointAlertsPluginReducer } from '../../endpoint_alerts'; -import { EndpointHostsPluginReducer } from '../../endpoint_hosts'; import { alertListReducer } from '../../endpoint_alerts/store/reducer'; -import { hostListReducer } from '../../endpoint_hosts/store/reducer'; interface Global extends NodeJS.Global { // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -30,7 +28,6 @@ export const SUB_PLUGINS_REDUCER: SubPluginsInitReducer = { * These state's are wrapped in `Immutable`, but for compatibility with the overall app architecture, * they are cast to mutable versions here. */ - hostList: hostListReducer as EndpointHostsPluginReducer['hostList'], alertList: alertListReducer as EndpointAlertsPluginReducer['alertList'], management: managementReducer as ManagementPluginReducer['management'], }; diff --git a/x-pack/plugins/siem/public/common/store/actions.ts b/x-pack/plugins/security_solution/public/common/store/actions.ts similarity index 90% rename from x-pack/plugins/siem/public/common/store/actions.ts rename to x-pack/plugins/security_solution/public/common/store/actions.ts index 58e4e2f363e92..453191ebafce6 100644 --- a/x-pack/plugins/siem/public/common/store/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/actions.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HostAction } from '../../endpoint_hosts/store/action'; +import { HostAction } from '../../management/pages/endpoint_hosts/store/action'; import { AlertAction } from '../../endpoint_alerts/store/action'; import { PolicyListAction } from '../../management/pages/policy/store/policy_list'; import { PolicyDetailsAction } from '../../management/pages/policy/store/policy_details'; diff --git a/x-pack/plugins/siem/public/common/store/app/actions.ts b/x-pack/plugins/security_solution/public/common/store/app/actions.ts similarity index 88% rename from x-pack/plugins/siem/public/common/store/app/actions.ts rename to x-pack/plugins/security_solution/public/common/store/app/actions.ts index 866782710c162..61f20cc35f9e8 100644 --- a/x-pack/plugins/siem/public/common/store/app/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/app/actions.ts @@ -8,7 +8,7 @@ import actionCreatorFactory from 'typescript-fsa'; import { Note } from '../../lib/note'; -const actionCreator = actionCreatorFactory('x-pack/siem/local/app'); +const actionCreator = actionCreatorFactory('x-pack/security_solution/local/app'); export const updateNote = actionCreator<{ note: Note }>('UPDATE_NOTE'); diff --git a/x-pack/plugins/siem/public/common/store/app/index.ts b/x-pack/plugins/security_solution/public/common/store/app/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/app/index.ts rename to x-pack/plugins/security_solution/public/common/store/app/index.ts diff --git a/x-pack/plugins/siem/public/common/store/app/model.ts b/x-pack/plugins/security_solution/public/common/store/app/model.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/app/model.ts rename to x-pack/plugins/security_solution/public/common/store/app/model.ts diff --git a/x-pack/plugins/siem/public/common/store/app/reducer.ts b/x-pack/plugins/security_solution/public/common/store/app/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/app/reducer.ts rename to x-pack/plugins/security_solution/public/common/store/app/reducer.ts diff --git a/x-pack/plugins/siem/public/common/store/app/selectors.ts b/x-pack/plugins/security_solution/public/common/store/app/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/app/selectors.ts rename to x-pack/plugins/security_solution/public/common/store/app/selectors.ts diff --git a/x-pack/plugins/siem/public/common/store/constants.ts b/x-pack/plugins/security_solution/public/common/store/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/constants.ts rename to x-pack/plugins/security_solution/public/common/store/constants.ts diff --git a/x-pack/plugins/siem/public/common/store/drag_and_drop/actions.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts similarity index 87% rename from x-pack/plugins/siem/public/common/store/drag_and_drop/actions.ts rename to x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts index 82b544641adcb..ab71d7d080a41 100644 --- a/x-pack/plugins/siem/public/common/store/drag_and_drop/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts @@ -8,7 +8,7 @@ import actionCreatorFactory from 'typescript-fsa'; import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; -const actionCreator = actionCreatorFactory('x-pack/siem/local/drag_and_drop'); +const actionCreator = actionCreatorFactory('x-pack/security_solution/local/drag_and_drop'); export const registerProvider = actionCreator<{ provider: DataProvider }>('REGISTER_PROVIDER'); diff --git a/x-pack/plugins/siem/public/common/store/drag_and_drop/index.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/drag_and_drop/index.ts rename to x-pack/plugins/security_solution/public/common/store/drag_and_drop/index.ts diff --git a/x-pack/plugins/siem/public/common/store/drag_and_drop/model.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/model.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/drag_and_drop/model.ts rename to x-pack/plugins/security_solution/public/common/store/drag_and_drop/model.ts diff --git a/x-pack/plugins/siem/public/common/store/drag_and_drop/reducer.test.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/drag_and_drop/reducer.test.ts rename to x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.test.ts diff --git a/x-pack/plugins/siem/public/common/store/drag_and_drop/reducer.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/drag_and_drop/reducer.ts rename to x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.ts diff --git a/x-pack/plugins/siem/public/common/store/drag_and_drop/selectors.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/drag_and_drop/selectors.ts rename to x-pack/plugins/security_solution/public/common/store/drag_and_drop/selectors.ts diff --git a/x-pack/plugins/siem/public/common/store/epic.ts b/x-pack/plugins/security_solution/public/common/store/epic.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/epic.ts rename to x-pack/plugins/security_solution/public/common/store/epic.ts diff --git a/x-pack/plugins/siem/public/common/store/index.ts b/x-pack/plugins/security_solution/public/common/store/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/index.ts rename to x-pack/plugins/security_solution/public/common/store/index.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/actions.ts b/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts similarity index 96% rename from x-pack/plugins/siem/public/common/store/inputs/actions.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/actions.ts index 5b26957843f08..f8b8d0865d120 100644 --- a/x-pack/plugins/siem/public/common/store/inputs/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts @@ -10,7 +10,7 @@ import { InspectQuery, Refetch, RefetchKql } from './model'; import { InputsModelId } from './constants'; import { Filter, SavedQuery } from '../../../../../../../src/plugins/data/public'; -const actionCreator = actionCreatorFactory('x-pack/siem/local/inputs'); +const actionCreator = actionCreatorFactory('x-pack/security_solution/local/inputs'); export const setAbsoluteRangeDatePicker = actionCreator<{ id: InputsModelId; diff --git a/x-pack/plugins/siem/public/common/store/inputs/constants.ts b/x-pack/plugins/security_solution/public/common/store/inputs/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/constants.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/constants.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/helpers.test.ts b/x-pack/plugins/security_solution/public/common/store/inputs/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/helpers.test.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/helpers.test.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/helpers.ts b/x-pack/plugins/security_solution/public/common/store/inputs/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/helpers.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/helpers.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/index.ts b/x-pack/plugins/security_solution/public/common/store/inputs/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/index.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/index.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/model.ts b/x-pack/plugins/security_solution/public/common/store/inputs/model.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/model.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/model.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/reducer.ts b/x-pack/plugins/security_solution/public/common/store/inputs/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/reducer.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/reducer.ts diff --git a/x-pack/plugins/siem/public/common/store/inputs/selectors.ts b/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/inputs/selectors.ts rename to x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts diff --git a/x-pack/plugins/siem/public/common/store/model.ts b/x-pack/plugins/security_solution/public/common/store/model.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/model.ts rename to x-pack/plugins/security_solution/public/common/store/model.ts diff --git a/x-pack/plugins/siem/public/common/store/reducer.ts b/x-pack/plugins/security_solution/public/common/store/reducer.ts similarity index 95% rename from x-pack/plugins/siem/public/common/store/reducer.ts rename to x-pack/plugins/security_solution/public/common/store/reducer.ts index ba85fbef860d7..6aa9c6c059366 100644 --- a/x-pack/plugins/siem/public/common/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/reducer.ts @@ -17,7 +17,6 @@ import { TimelinePluginReducer } from '../../timelines/store/timeline'; import { SecuritySubPlugins } from '../../app/types'; import { ManagementPluginReducer } from '../../management'; import { EndpointAlertsPluginReducer } from '../../endpoint_alerts'; -import { EndpointHostsPluginReducer } from '../../endpoint_hosts'; import { State } from './types'; import { AppAction } from './actions'; @@ -25,7 +24,6 @@ export type SubPluginsInitReducer = HostsPluginReducer & NetworkPluginReducer & TimelinePluginReducer & EndpointAlertsPluginReducer & - EndpointHostsPluginReducer & ManagementPluginReducer; /** diff --git a/x-pack/plugins/siem/public/common/store/routing/action.ts b/x-pack/plugins/security_solution/public/common/store/routing/action.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/routing/action.ts rename to x-pack/plugins/security_solution/public/common/store/routing/action.ts diff --git a/x-pack/plugins/siem/public/common/store/routing/index.ts b/x-pack/plugins/security_solution/public/common/store/routing/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/routing/index.ts rename to x-pack/plugins/security_solution/public/common/store/routing/index.ts diff --git a/x-pack/plugins/siem/public/common/store/selectors.ts b/x-pack/plugins/security_solution/public/common/store/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/selectors.ts rename to x-pack/plugins/security_solution/public/common/store/selectors.ts diff --git a/x-pack/plugins/siem/public/common/store/store.ts b/x-pack/plugins/security_solution/public/common/store/store.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/store.ts rename to x-pack/plugins/security_solution/public/common/store/store.ts diff --git a/x-pack/plugins/siem/public/common/store/test_utils.ts b/x-pack/plugins/security_solution/public/common/store/test_utils.ts similarity index 100% rename from x-pack/plugins/siem/public/common/store/test_utils.ts rename to x-pack/plugins/security_solution/public/common/store/test_utils.ts diff --git a/x-pack/plugins/siem/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts similarity index 98% rename from x-pack/plugins/siem/public/common/store/types.ts rename to x-pack/plugins/security_solution/public/common/store/types.ts index b9942979beb1e..2b92451e30119 100644 --- a/x-pack/plugins/siem/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -17,7 +17,6 @@ import { DragAndDropState } from './drag_and_drop/reducer'; import { TimelinePluginState } from '../../timelines/store/timeline'; import { NetworkPluginState } from '../../network/store'; import { EndpointAlertsPluginState } from '../../endpoint_alerts'; -import { EndpointHostsPluginState } from '../../endpoint_hosts'; import { ManagementPluginState } from '../../management'; /** @@ -31,7 +30,6 @@ export type State = CombinedState< NetworkPluginState & TimelinePluginState & EndpointAlertsPluginState & - EndpointHostsPluginState & ManagementPluginState & { app: AppState; dragAndDrop: DragAndDropState; diff --git a/x-pack/plugins/siem/public/common/translations.ts b/x-pack/plugins/security_solution/public/common/translations.ts similarity index 64% rename from x-pack/plugins/siem/public/common/translations.ts rename to x-pack/plugins/security_solution/public/common/translations.ts index 072aee50d5136..b5a400d187f82 100644 --- a/x-pack/plugins/siem/public/common/translations.ts +++ b/x-pack/plugins/security_solution/public/common/translations.ts @@ -6,21 +6,24 @@ import { i18n } from '@kbn/i18n'; -export const EMPTY_TITLE = i18n.translate('xpack.siem.pages.common.emptyTitle', { +export const EMPTY_TITLE = i18n.translate('xpack.securitySolution.pages.common.emptyTitle', { defaultMessage: 'Welcome to SIEM. Let’s get you started.', }); -export const EMPTY_MESSAGE = i18n.translate('xpack.siem.pages.common.emptyMessage', { +export const EMPTY_MESSAGE = i18n.translate('xpack.securitySolution.pages.common.emptyMessage', { defaultMessage: 'To begin using security information and event management (SIEM), you’ll need to add SIEM-related data, in Elastic Common Schema (ECS) format, to the Elastic Stack. An easy way to get started is by installing and configuring our data shippers, called Beats. Let’s do that now!', }); -export const EMPTY_ACTION_PRIMARY = i18n.translate('xpack.siem.pages.common.emptyActionPrimary', { - defaultMessage: 'Add data with Beats', -}); +export const EMPTY_ACTION_PRIMARY = i18n.translate( + 'xpack.securitySolution.pages.common.emptyActionPrimary', + { + defaultMessage: 'Add data with Beats', + } +); export const EMPTY_ACTION_SECONDARY = i18n.translate( - 'xpack.siem.pages.common.emptyActionSecondary', + 'xpack.securitySolution.pages.common.emptyActionSecondary', { defaultMessage: 'View getting started guide', } diff --git a/x-pack/plugins/siem/public/common/types.ts b/x-pack/plugins/security_solution/public/common/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/types.ts rename to x-pack/plugins/security_solution/public/common/types.ts diff --git a/x-pack/plugins/siem/public/common/utils/api/index.ts b/x-pack/plugins/security_solution/public/common/utils/api/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/api/index.ts rename to x-pack/plugins/security_solution/public/common/utils/api/index.ts diff --git a/x-pack/plugins/siem/public/common/utils/apollo_context.ts b/x-pack/plugins/security_solution/public/common/utils/apollo_context.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/apollo_context.ts rename to x-pack/plugins/security_solution/public/common/utils/apollo_context.ts diff --git a/x-pack/plugins/siem/public/common/utils/clone_http_fetch_query.test.ts b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/clone_http_fetch_query.test.ts rename to x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts diff --git a/x-pack/plugins/siem/public/common/utils/clone_http_fetch_query.ts b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/clone_http_fetch_query.ts rename to x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.ts diff --git a/x-pack/plugins/siem/public/common/utils/default_date_settings.test.ts b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts similarity index 98% rename from x-pack/plugins/siem/public/common/utils/default_date_settings.test.ts rename to x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts index 3ae3ef2326ea2..9fc5490b16cab 100644 --- a/x-pack/plugins/siem/public/common/utils/default_date_settings.test.ts +++ b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts @@ -15,9 +15,9 @@ import { } from './default_date_settings'; import { DEFAULT_FROM, - DEFAULT_SIEM_TIME_RANGE, + DEFAULT_APP_TIME_RANGE, DEFAULT_TO, - DEFAULT_SIEM_REFRESH_INTERVAL, + DEFAULT_APP_REFRESH_INTERVAL, DEFAULT_INTERVAL_PAUSE, DEFAULT_INTERVAL_VALUE, DEFAULT_INTERVAL_TYPE, @@ -36,8 +36,8 @@ jest.mock('../../../common/constants', () => ({ DEFAULT_INTERVAL_PAUSE: true, DEFAULT_INTERVAL_TYPE: 'manual', DEFAULT_INTERVAL_VALUE: 300000, - DEFAULT_SIEM_REFRESH_INTERVAL: 'siem:refreshIntervalDefaults', - DEFAULT_SIEM_TIME_RANGE: 'siem:timeDefaults', + DEFAULT_APP_REFRESH_INTERVAL: 'securitySolution:refreshIntervalDefaults', + DEFAULT_APP_TIME_RANGE: 'securitySolution:timeDefaults', })); jest.mock('../lib/kibana'); @@ -60,9 +60,9 @@ const mockTimeRange = ( uiSettings: { get: (key: string) => { switch (key) { - case DEFAULT_SIEM_TIME_RANGE: + case DEFAULT_APP_TIME_RANGE: return timeRange; - case DEFAULT_SIEM_REFRESH_INTERVAL: + case DEFAULT_APP_REFRESH_INTERVAL: return interval; default: throw new Error(`Unexpected config key: ${key}`); diff --git a/x-pack/plugins/siem/public/common/utils/default_date_settings.ts b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts similarity index 95% rename from x-pack/plugins/siem/public/common/utils/default_date_settings.ts rename to x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts index 3523a02ea44f5..b8b4b23e20b85 100644 --- a/x-pack/plugins/siem/public/common/utils/default_date_settings.ts +++ b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts @@ -9,8 +9,8 @@ import moment from 'moment'; import { isBoolean, isNumber, isString } from 'lodash/fp'; import { - DEFAULT_SIEM_TIME_RANGE, - DEFAULT_SIEM_REFRESH_INTERVAL, + DEFAULT_APP_TIME_RANGE, + DEFAULT_APP_REFRESH_INTERVAL, DEFAULT_FROM, DEFAULT_TO, DEFAULT_INTERVAL_TYPE, @@ -44,7 +44,7 @@ const DEFAULT_TO_MOMENT = moment(); */ export const getTimeRangeSettings = (uiSettings = true) => { const timeRange = uiSettings - ? KibanaServices.get().uiSettings.get(DEFAULT_SIEM_TIME_RANGE) + ? KibanaServices.get().uiSettings.get(DEFAULT_APP_TIME_RANGE) : null; const fromStr = (isString(timeRange?.from) && timeRange?.from) || DEFAULT_FROM; @@ -62,7 +62,7 @@ export const getTimeRangeSettings = (uiSettings = true) => { */ export const getIntervalSettings = (uiSettings = true): Policy => { const interval = uiSettings - ? KibanaServices.get().uiSettings.get(DEFAULT_SIEM_REFRESH_INTERVAL) + ? KibanaServices.get().uiSettings.get(DEFAULT_APP_REFRESH_INTERVAL) : null; const duration = (isNumber(interval?.value) && interval?.value) || DEFAULT_INTERVAL_VALUE; diff --git a/x-pack/plugins/siem/public/common/utils/kql/use_update_kql.test.tsx b/x-pack/plugins/security_solution/public/common/utils/kql/use_update_kql.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/kql/use_update_kql.test.tsx rename to x-pack/plugins/security_solution/public/common/utils/kql/use_update_kql.test.tsx diff --git a/x-pack/plugins/siem/public/common/utils/kql/use_update_kql.tsx b/x-pack/plugins/security_solution/public/common/utils/kql/use_update_kql.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/kql/use_update_kql.tsx rename to x-pack/plugins/security_solution/public/common/utils/kql/use_update_kql.tsx diff --git a/x-pack/plugins/siem/public/common/utils/logo_endpoint/64_color.svg b/x-pack/plugins/security_solution/public/common/utils/logo_endpoint/64_color.svg similarity index 100% rename from x-pack/plugins/siem/public/common/utils/logo_endpoint/64_color.svg rename to x-pack/plugins/security_solution/public/common/utils/logo_endpoint/64_color.svg diff --git a/x-pack/plugins/siem/public/common/utils/route/helpers.ts b/x-pack/plugins/security_solution/public/common/utils/route/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/route/helpers.ts rename to x-pack/plugins/security_solution/public/common/utils/route/helpers.ts diff --git a/x-pack/plugins/siem/public/common/utils/route/index.test.tsx b/x-pack/plugins/security_solution/public/common/utils/route/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/route/index.test.tsx rename to x-pack/plugins/security_solution/public/common/utils/route/index.test.tsx diff --git a/x-pack/plugins/siem/public/common/utils/route/manage_spy_routes.tsx b/x-pack/plugins/security_solution/public/common/utils/route/manage_spy_routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/route/manage_spy_routes.tsx rename to x-pack/plugins/security_solution/public/common/utils/route/manage_spy_routes.tsx diff --git a/x-pack/plugins/siem/public/common/utils/route/spy_routes.tsx b/x-pack/plugins/security_solution/public/common/utils/route/spy_routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/route/spy_routes.tsx rename to x-pack/plugins/security_solution/public/common/utils/route/spy_routes.tsx diff --git a/x-pack/plugins/siem/public/common/utils/route/types.ts b/x-pack/plugins/security_solution/public/common/utils/route/types.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/route/types.ts rename to x-pack/plugins/security_solution/public/common/utils/route/types.ts diff --git a/x-pack/plugins/siem/public/common/utils/route/use_route_spy.tsx b/x-pack/plugins/security_solution/public/common/utils/route/use_route_spy.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/route/use_route_spy.tsx rename to x-pack/plugins/security_solution/public/common/utils/route/use_route_spy.tsx diff --git a/x-pack/plugins/siem/public/common/utils/saved_query_services/index.tsx b/x-pack/plugins/security_solution/public/common/utils/saved_query_services/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/saved_query_services/index.tsx rename to x-pack/plugins/security_solution/public/common/utils/saved_query_services/index.tsx diff --git a/x-pack/plugins/siem/public/common/utils/timeline/use_show_timeline.tsx b/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline.tsx similarity index 100% rename from x-pack/plugins/siem/public/common/utils/timeline/use_show_timeline.tsx rename to x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline.tsx diff --git a/x-pack/plugins/siem/public/common/utils/use_mount_appended.ts b/x-pack/plugins/security_solution/public/common/utils/use_mount_appended.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/use_mount_appended.ts rename to x-pack/plugins/security_solution/public/common/utils/use_mount_appended.ts diff --git a/x-pack/plugins/siem/public/common/utils/validators/index.test.ts b/x-pack/plugins/security_solution/public/common/utils/validators/index.test.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/validators/index.test.ts rename to x-pack/plugins/security_solution/public/common/utils/validators/index.test.ts diff --git a/x-pack/plugins/siem/public/common/utils/validators/index.ts b/x-pack/plugins/security_solution/public/common/utils/validators/index.ts similarity index 100% rename from x-pack/plugins/siem/public/common/utils/validators/index.ts rename to x-pack/plugins/security_solution/public/common/utils/validators/index.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/components/formatted_date.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/components/formatted_date.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/components/formatted_date.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/components/formatted_date.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/index.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/index.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/index.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/index.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/models/index_pattern.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/models/index_pattern.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/models/index_pattern.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/models/index_pattern.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/routes.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/routes.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/routes.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/action.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/action.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/action.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/action.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/alert_details.test.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/alert_details.test.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/alert_details.test.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/alert_details.test.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/alert_list.test.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/alert_list.test.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/alert_list.test.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/alert_list.test.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/alert_list_pagination.test.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/alert_list_pagination.test.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/alert_list_pagination.test.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/alert_list_pagination.test.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/middleware.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/middleware.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/middleware.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/middleware.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/mock_alert_result_list.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/mock_alert_result_list.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/mock_alert_result_list.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/mock_alert_result_list.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/reducer.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/reducer.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/reducer.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/store/selectors.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/store/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/store/selectors.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/store/selectors.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/alert_details.test.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/alert_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/alert_details.test.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/alert_details.test.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/details/index.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/view/details/index.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/details/index.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/details/index.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/details/metadata/file_accordion.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/details/metadata/file_accordion.tsx similarity index 57% rename from x-pack/plugins/siem/public/endpoint_alerts/view/details/metadata/file_accordion.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/details/metadata/file_accordion.tsx index e319cbe52a69c..6c9df46c9313c 100644 --- a/x-pack/plugins/siem/public/endpoint_alerts/view/details/metadata/file_accordion.tsx +++ b/x-pack/plugins/security_solution/public/endpoint_alerts/view/details/metadata/file_accordion.tsx @@ -14,32 +14,44 @@ export const FileAccordion = memo(({ alertData }: { alertData: Immutable { return [ { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.fileName', { - defaultMessage: 'File Name', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.fileName', + { + defaultMessage: 'File Name', + } + ), description: alertData.file.name, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.filePath', { - defaultMessage: 'File Path', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.filePath', + { + defaultMessage: 'File Path', + } + ), description: alertData.file.path, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.fileSize', { - defaultMessage: 'File Size', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.fileSize', + { + defaultMessage: 'File Size', + } + ), description: alertData.file.size, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.fileCreated', { - defaultMessage: 'File Created', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.fileCreated', + { + defaultMessage: 'File Created', + } + ), description: , }, { title: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.fileModified', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.fileModified', { defaultMessage: 'File Modified', } @@ -48,7 +60,7 @@ export const FileAccordion = memo(({ alertData }: { alertData: Immutable, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.signer', { - defaultMessage: 'Signer', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.signer', + { + defaultMessage: 'Signer', + } + ), description: alertData.file.code_signature.subject_name, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.owner', { - defaultMessage: 'Owner', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.owner', + { + defaultMessage: 'Owner', + } + ), description: alertData.file.owner, }, ]; @@ -74,7 +92,7 @@ export const FileAccordion = memo(({ alertData }: { alertData: Immutable { return [ { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.alertType', { - defaultMessage: 'Alert Type', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.alertType', + { + defaultMessage: 'Alert Type', + } + ), description: alertData.event.category, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.eventType', { - defaultMessage: 'Event Type', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.eventType', + { + defaultMessage: 'Event Type', + } + ), description: alertData.event.kind, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.status', { - defaultMessage: 'Status', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.status', + { + defaultMessage: 'Status', + } + ), description: 'TODO', }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.dateCreated', { - defaultMessage: 'Date Created', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.dateCreated', + { + defaultMessage: 'Date Created', + } + ), description: , }, { title: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.malwareScore', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.malwareScore', { defaultMessage: 'MalwareScore', } @@ -47,9 +59,12 @@ export const GeneralAccordion = memo(({ alertData }: { alertData: Immutable { return [ { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.md5', { - defaultMessage: 'MD5', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.md5', + { + defaultMessage: 'MD5', + } + ), description: alertData.file.hash.md5, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.sha1', { - defaultMessage: 'SHA1', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.sha1', + { + defaultMessage: 'SHA1', + } + ), description: alertData.file.hash.sha1, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.sha256', { - defaultMessage: 'SHA256', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.sha256', + { + defaultMessage: 'SHA256', + } + ), description: alertData.file.hash.sha256, }, ]; @@ -37,7 +46,7 @@ export const HashAccordion = memo(({ alertData }: { alertData: Immutable {' '} ), }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.osCurrent', { - defaultMessage: 'OS (Current)', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.osCurrent', + { + defaultMessage: 'OS (Current)', + } + ), description: alertData.state.host_metadata.host.os.name, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.osOriginal', { - defaultMessage: 'OS (At time of alert)', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.osOriginal', + { + defaultMessage: 'OS (At time of alert)', + } + ), description: alertData.host.os.name, }, ]; @@ -86,7 +92,7 @@ export const HostAccordion = memo(({ alertData }: { alertData: Immutable { return [ { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.processID', { - defaultMessage: 'Process ID', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.processID', + { + defaultMessage: 'Process ID', + } + ), description: alertData.process.pid, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.processName', { - defaultMessage: 'Process Name', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.processName', + { + defaultMessage: 'Process Name', + } + ), description: alertData.process.name, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.processPath', { - defaultMessage: 'Process Path', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.processPath', + { + defaultMessage: 'Process Path', + } + ), description: alertData.process.executable, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.md5', { - defaultMessage: 'MD5', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.md5', + { + defaultMessage: 'MD5', + } + ), description: alertData.process.hash.md5, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.sha1', { - defaultMessage: 'SHA1', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.sha1', + { + defaultMessage: 'SHA1', + } + ), description: alertData.process.hash.sha1, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.sha256', { - defaultMessage: 'SHA256', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.sha256', + { + defaultMessage: 'SHA256', + } + ), description: alertData.process.hash.sha256, }, { title: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.malwareScore', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.malwareScore', { defaultMessage: 'MalwareScore', } @@ -59,7 +77,7 @@ export const SourceProcessAccordion = memo(({ alertData }: { alertData: Immutabl }, { title: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.parentProcessID', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.parentProcessID', { defaultMessage: 'Parent Process ID', } @@ -67,21 +85,30 @@ export const SourceProcessAccordion = memo(({ alertData }: { alertData: Immutabl description: alertData.process.parent?.pid || '-', }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.signer', { - defaultMessage: 'Signer', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.signer', + { + defaultMessage: 'Signer', + } + ), description: alertData.process.code_signature.subject_name, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.username', { - defaultMessage: 'Username', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.username', + { + defaultMessage: 'Username', + } + ), description: alertData.process.token.user, }, { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.domain', { - defaultMessage: 'Domain', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.domain', + { + defaultMessage: 'Domain', + } + ), description: alertData.process.token.domain, }, ]; @@ -91,7 +118,7 @@ export const SourceProcessAccordion = memo(({ alertData }: { alertData: Immutabl { return [ { - title: i18n.translate('xpack.siem.endpoint.application.endpoint.alertDetails.sid', { - defaultMessage: 'SID', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.sid', + { + defaultMessage: 'SID', + } + ), description: alertData.process.token.sid, }, { title: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.integrityLevel', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.integrityLevel', { defaultMessage: 'Integrity Level', } @@ -35,7 +38,7 @@ export const SourceProcessTokenAccordion = memo( { return null; } + /* eslint-disable-next-line react-hooks/rules-of-hooks */ const tabs: EuiTabbedContentTab[] = useMemo(() => { return [ { id: 'overviewMetadata', 'data-test-subj': 'overviewMetadata', name: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.overview.tabs.overview', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.overview.tabs.overview', { defaultMessage: 'Overview', } @@ -56,7 +57,7 @@ const AlertDetailsOverviewComponent = memo(() => { id: 'overviewResolver', 'data-test-subj': 'overviewResolverTab', name: i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alertDetails.overview.tabs.resolver', + 'xpack.securitySolution.endpoint.application.endpoint.alertDetails.overview.tabs.resolver', { defaultMessage: 'Resolver', } @@ -71,11 +72,13 @@ const AlertDetailsOverviewComponent = memo(() => { ]; }, [alertDetailsData]); + /* eslint-disable-next-line react-hooks/rules-of-hooks */ const activeTab = useMemo( () => (alertDetailsTabId ? tabs.find(({ id }) => id === alertDetailsTabId) : tabs[0]), [alertDetailsTabId, tabs] ); + /* eslint-disable-next-line react-hooks/rules-of-hooks */ const handleTabClick = useCallback( (clickedTab: EuiTabbedContentTab): void => { if (clickedTab.id !== alertDetailsTabId) { @@ -96,7 +99,7 @@ const AlertDetailsOverviewComponent = memo(() => {

@@ -105,7 +108,7 @@ const AlertDetailsOverviewComponent = memo(() => {

{ {'Endpoint Status: '} diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/details/overview/metadata_panel.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/details/overview/metadata_panel.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/details/overview/metadata_panel.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/details/overview/metadata_panel.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/details/overview/take_action_dropdown.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/details/overview/take_action_dropdown.tsx similarity index 87% rename from x-pack/plugins/siem/public/endpoint_alerts/view/details/overview/take_action_dropdown.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/details/overview/take_action_dropdown.tsx index 847249125a5fa..5eba77a8dd54e 100644 --- a/x-pack/plugins/siem/public/endpoint_alerts/view/details/overview/take_action_dropdown.tsx +++ b/x-pack/plugins/security_solution/public/endpoint_alerts/view/details/overview/take_action_dropdown.tsx @@ -16,7 +16,7 @@ const TakeActionButton = memo(({ onClick }: { onClick: () => void }) => ( onClick={onClick} > @@ -50,7 +50,7 @@ export const TakeActionDropdown = memo(() => { iconType="folderCheck" > @@ -63,7 +63,7 @@ export const TakeActionDropdown = memo(() => { iconType="listAdd" > diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/formatted_date.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/formatted_date.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/formatted_date.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/formatted_date.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/hooks/use_alerts_selector.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/view/hooks/use_alerts_selector.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/hooks/use_alerts_selector.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/hooks/use_alerts_selector.ts diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/index.test.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/index.test.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/index.test.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/index.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/index.tsx similarity index 77% rename from x-pack/plugins/siem/public/endpoint_alerts/view/index.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/index.tsx index ff65dd2bda6a2..b39ea678596a4 100644 --- a/x-pack/plugins/siem/public/endpoint_alerts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/endpoint_alerts/view/index.tsx @@ -40,51 +40,72 @@ export const AlertIndex = memo(() => { return [ { id: 'alert_type', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.alertType', { - defaultMessage: 'Alert Type', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.alertType', + { + defaultMessage: 'Alert Type', + } + ), }, { id: 'event_type', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.eventType', { - defaultMessage: 'Event Type', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.eventType', + { + defaultMessage: 'Event Type', + } + ), }, { id: 'os', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.os', { + display: i18n.translate('xpack.securitySolution.endpoint.application.endpoint.alerts.os', { defaultMessage: 'OS', }), }, { id: 'ip_address', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.ipAddress', { - defaultMessage: 'IP Address', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.ipAddress', + { + defaultMessage: 'IP Address', + } + ), }, { id: 'host_name', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.hostName', { - defaultMessage: 'Host Name', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.hostName', + { + defaultMessage: 'Host Name', + } + ), }, { id: 'timestamp', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.timestamp', { - defaultMessage: 'Timestamp', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.timestamp', + { + defaultMessage: 'Timestamp', + } + ), }, { id: 'archived', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.archived', { - defaultMessage: 'Archived', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.archived', + { + defaultMessage: 'Archived', + } + ), }, { id: 'malware_score', - display: i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.malwareScore', { - defaultMessage: 'Malware Score', - }), + display: i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.malwareScore', + { + defaultMessage: 'Malware Score', + } + ), }, ]; }, []); @@ -148,7 +169,7 @@ export const AlertIndex = memo(() => { } > {i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alerts.alertType.maliciousFileDescription', + 'xpack.securitySolution.endpoint.application.endpoint.alerts.alertType.maliciousFileDescription', { defaultMessage: 'Malicious File', } @@ -171,7 +192,7 @@ export const AlertIndex = memo(() => { return ( {i18n.translate( - 'xpack.siem.endpoint.application.endpoint.alerts.alertDate.timestampInvalidLabel', + 'xpack.securitySolution.endpoint.application.endpoint.alerts.alertDate.timestampInvalidLabel', { defaultMessage: 'invalid', } @@ -216,9 +237,12 @@ export const AlertIndex = memo(() => {

- {i18n.translate('xpack.siem.endpoint.application.endpoint.alerts.detailsTitle', { - defaultMessage: 'Alert Details', - })} + {i18n.translate( + 'xpack.securitySolution.endpoint.application.endpoint.alerts.detailsTitle', + { + defaultMessage: 'Alert Details', + } + )}

@@ -235,7 +259,7 @@ export const AlertIndex = memo(() => {

diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/index_search_bar.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/index_search_bar.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/index_search_bar.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/index_search_bar.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/resolver.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/resolver.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/resolver.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/resolver.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/test_helpers/render_alert_page.tsx b/x-pack/plugins/security_solution/public/endpoint_alerts/view/test_helpers/render_alert_page.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/test_helpers/render_alert_page.tsx rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/test_helpers/render_alert_page.tsx diff --git a/x-pack/plugins/siem/public/endpoint_alerts/view/url_from_query_params.ts b/x-pack/plugins/security_solution/public/endpoint_alerts/view/url_from_query_params.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_alerts/view/url_from_query_params.ts rename to x-pack/plugins/security_solution/public/endpoint_alerts/view/url_from_query_params.ts diff --git a/x-pack/plugins/siem/public/graphql/introspection.json b/x-pack/plugins/security_solution/public/graphql/introspection.json similarity index 100% rename from x-pack/plugins/siem/public/graphql/introspection.json rename to x-pack/plugins/security_solution/public/graphql/introspection.json diff --git a/x-pack/plugins/siem/public/graphql/types.ts b/x-pack/plugins/security_solution/public/graphql/types.ts similarity index 100% rename from x-pack/plugins/siem/public/graphql/types.ts rename to x-pack/plugins/security_solution/public/graphql/types.ts diff --git a/x-pack/plugins/siem/public/hosts/components/authentications_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/authentications_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/hosts/components/authentications_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/hosts/components/authentications_table/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/authentications_table/index.test.tsx rename to x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/authentications_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/authentications_table/index.tsx rename to x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/authentications_table/mock.ts b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/authentications_table/mock.ts rename to x-pack/plugins/security_solution/public/hosts/components/authentications_table/mock.ts diff --git a/x-pack/plugins/siem/public/hosts/components/authentications_table/translations.ts b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/translations.ts similarity index 55% rename from x-pack/plugins/siem/public/hosts/components/authentications_table/translations.ts rename to x-pack/plugins/security_solution/public/hosts/components/authentications_table/translations.ts index 7fb24474a83dc..0e918275e2b18 100644 --- a/x-pack/plugins/siem/public/hosts/components/authentications_table/translations.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/translations.ts @@ -7,75 +7,78 @@ import { i18n } from '@kbn/i18n'; export const AUTHENTICATIONS = i18n.translate( - 'xpack.siem.authenticationsTable.authenticationFailures', + 'xpack.securitySolution.authenticationsTable.authenticationFailures', { defaultMessage: 'Authentications', } ); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.authenticationsTable.unit', { + i18n.translate('xpack.securitySolution.authenticationsTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {user} other {users}}`, }); export const LAST_SUCCESSFUL_SOURCE = i18n.translate( - 'xpack.siem.authenticationsTable.lastSuccessfulSource', + 'xpack.securitySolution.authenticationsTable.lastSuccessfulSource', { defaultMessage: 'Last successful source', } ); export const LAST_SUCCESSFUL_DESTINATION = i18n.translate( - 'xpack.siem.authenticationsTable.lastSuccessfulDestination', + 'xpack.securitySolution.authenticationsTable.lastSuccessfulDestination', { defaultMessage: 'Last successful destination', } ); export const LAST_SUCCESSFUL_TIME = i18n.translate( - 'xpack.siem.authenticationsTable.lastSuccessfulTime', + 'xpack.securitySolution.authenticationsTable.lastSuccessfulTime', { defaultMessage: 'Last success', } ); export const LAST_FAILED_SOURCE = i18n.translate( - 'xpack.siem.authenticationsTable.lastFailedSource', + 'xpack.securitySolution.authenticationsTable.lastFailedSource', { defaultMessage: 'Last failed source', } ); export const LAST_FAILED_DESTINATION = i18n.translate( - 'xpack.siem.authenticationsTable.lastFailedDestination', + 'xpack.securitySolution.authenticationsTable.lastFailedDestination', { defaultMessage: 'Last failed destination', } ); -export const LAST_FAILED_TIME = i18n.translate('xpack.siem.authenticationsTable.lastFailedTime', { - defaultMessage: 'Last failure', -}); +export const LAST_FAILED_TIME = i18n.translate( + 'xpack.securitySolution.authenticationsTable.lastFailedTime', + { + defaultMessage: 'Last failure', + } +); -export const SUCCESSES = i18n.translate('xpack.siem.authenticationsTable.successes', { +export const SUCCESSES = i18n.translate('xpack.securitySolution.authenticationsTable.successes', { defaultMessage: 'Successes', }); -export const FAILURES = i18n.translate('xpack.siem.authenticationsTable.failures', { +export const FAILURES = i18n.translate('xpack.securitySolution.authenticationsTable.failures', { defaultMessage: 'Failures', }); -export const USER = i18n.translate('xpack.siem.authenticationsTable.user', { +export const USER = i18n.translate('xpack.securitySolution.authenticationsTable.user', { defaultMessage: 'User', }); -export const ROWS_5 = i18n.translate('xpack.siem.authenticationsTable.rows', { +export const ROWS_5 = i18n.translate('xpack.securitySolution.authenticationsTable.rows', { values: { numRows: 5 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); -export const ROWS_10 = i18n.translate('xpack.siem.authenticationsTable.rows', { +export const ROWS_10 = i18n.translate('xpack.securitySolution.authenticationsTable.rows', { values: { numRows: 10 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); diff --git a/x-pack/plugins/siem/public/hosts/components/first_last_seen_host/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/first_last_seen_host/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/first_last_seen_host/index.test.tsx rename to x-pack/plugins/security_solution/public/hosts/components/first_last_seen_host/index.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/first_last_seen_host/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/first_last_seen_host/index.tsx similarity index 97% rename from x-pack/plugins/siem/public/hosts/components/first_last_seen_host/index.tsx rename to x-pack/plugins/security_solution/public/hosts/components/first_last_seen_host/index.tsx index 5cbfe2275d31c..579c3311cf732 100644 --- a/x-pack/plugins/siem/public/hosts/components/first_last_seen_host/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/first_last_seen_host/index.tsx @@ -22,6 +22,7 @@ export const FirstLastSeenHost = React.memo<{ hostname: string; type: FirstLastS return ( {(client) => { + /* eslint-disable-next-line react-hooks/rules-of-hooks */ const { loading, firstSeen, lastSeen, errorMessage } = useFirstLastSeenHostQuery( hostname, 'default', diff --git a/x-pack/plugins/siem/public/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/hosts/components/hosts_table/columns.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/hosts_table/columns.tsx rename to x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/hosts_table/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/hosts_table/index.test.tsx rename to x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/hosts_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/hosts_table/index.tsx rename to x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/hosts_table/mock.ts b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/hosts_table/mock.ts rename to x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts diff --git a/x-pack/plugins/siem/public/hosts/components/hosts_table/translations.ts b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts similarity index 57% rename from x-pack/plugins/siem/public/hosts/components/hosts_table/translations.ts rename to x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts index be5d536d4cbb6..87d6da46133b6 100644 --- a/x-pack/plugins/siem/public/hosts/components/hosts_table/translations.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts @@ -6,45 +6,45 @@ import { i18n } from '@kbn/i18n'; -export const HOSTS = i18n.translate('xpack.siem.hostsTable.hostsTitle', { +export const HOSTS = i18n.translate('xpack.securitySolution.hostsTable.hostsTitle', { defaultMessage: 'All hosts', }); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.hostsTable.unit', { + i18n.translate('xpack.securitySolution.hostsTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {host} other {hosts}}`, }); -export const NAME = i18n.translate('xpack.siem.hostsTable.nameTitle', { +export const NAME = i18n.translate('xpack.securitySolution.hostsTable.nameTitle', { defaultMessage: 'Host name', }); -export const LAST_SEEN = i18n.translate('xpack.siem.hostsTable.lastSeenTitle', { +export const LAST_SEEN = i18n.translate('xpack.securitySolution.hostsTable.lastSeenTitle', { defaultMessage: 'Last seen', }); export const FIRST_LAST_SEEN_TOOLTIP = i18n.translate( - 'xpack.siem.hostsTable.firstLastSeenToolTip', + 'xpack.securitySolution.hostsTable.firstLastSeenToolTip', { defaultMessage: 'Relative to the selected date range', } ); -export const OS = i18n.translate('xpack.siem.hostsTable.osTitle', { +export const OS = i18n.translate('xpack.securitySolution.hostsTable.osTitle', { defaultMessage: 'Operating system', }); -export const VERSION = i18n.translate('xpack.siem.hostsTable.versionTitle', { +export const VERSION = i18n.translate('xpack.securitySolution.hostsTable.versionTitle', { defaultMessage: 'Version', }); -export const ROWS_5 = i18n.translate('xpack.siem.hostsTable.rows', { +export const ROWS_5 = i18n.translate('xpack.securitySolution.hostsTable.rows', { values: { numRows: 5 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); -export const ROWS_10 = i18n.translate('xpack.siem.hostsTable.rows', { +export const ROWS_10 = i18n.translate('xpack.securitySolution.hostsTable.rows', { values: { numRows: 10 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/index.test.tsx rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/index.tsx rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/kpi_host_details_mapping.ts b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/kpi_host_details_mapping.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/kpi_host_details_mapping.ts rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/kpi_host_details_mapping.ts diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/kpi_hosts_mapping.ts b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/kpi_hosts_mapping.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/kpi_hosts_mapping.ts rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/kpi_hosts_mapping.ts diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/mock.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/mock.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/mock.tsx rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/mock.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/translations.ts b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/translations.ts similarity index 50% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/translations.ts rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/translations.ts index 45b4c0800725d..82543e6f106fa 100644 --- a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/translations.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/translations.ts @@ -5,66 +5,72 @@ */ import { i18n } from '@kbn/i18n'; -export const HOSTS = i18n.translate('xpack.siem.kpiHosts.hosts.title', { +export const HOSTS = i18n.translate('xpack.securitySolution.kpiHosts.hosts.title', { defaultMessage: 'Hosts', }); export const USER_AUTHENTICATIONS = i18n.translate( - 'xpack.siem.kpiHosts.userAuthentications.title', + 'xpack.securitySolution.kpiHosts.userAuthentications.title', { defaultMessage: 'User authentications', } ); export const SUCCESS_UNIT_LABEL = i18n.translate( - 'xpack.siem.kpiHosts.userAuthentications.successUnitLabel', + 'xpack.securitySolution.kpiHosts.userAuthentications.successUnitLabel', { defaultMessage: 'success', } ); export const FAIL_UNIT_LABEL = i18n.translate( - 'xpack.siem.kpiHosts.userAuthentications.failUnitLabel', + 'xpack.securitySolution.kpiHosts.userAuthentications.failUnitLabel', { defaultMessage: 'fail', } ); export const SUCCESS_CHART_LABEL = i18n.translate( - 'xpack.siem.kpiHosts.userAuthentications.successChartLabel', + 'xpack.securitySolution.kpiHosts.userAuthentications.successChartLabel', { defaultMessage: 'Succ.', } ); export const FAIL_CHART_LABEL = i18n.translate( - 'xpack.siem.kpiHosts.userAuthentications.failChartLabel', + 'xpack.securitySolution.kpiHosts.userAuthentications.failChartLabel', { defaultMessage: 'Fail', } ); -export const UNIQUE_IPS = i18n.translate('xpack.siem.kpiHosts.uniqueIps.title', { +export const UNIQUE_IPS = i18n.translate('xpack.securitySolution.kpiHosts.uniqueIps.title', { defaultMessage: 'Unique IPs', }); -export const SOURCE_UNIT_LABEL = i18n.translate('xpack.siem.kpiHosts.uniqueIps.sourceUnitLabel', { - defaultMessage: 'source', -}); +export const SOURCE_UNIT_LABEL = i18n.translate( + 'xpack.securitySolution.kpiHosts.uniqueIps.sourceUnitLabel', + { + defaultMessage: 'source', + } +); export const DESTINATION_UNIT_LABEL = i18n.translate( - 'xpack.siem.kpiHosts.uniqueIps.destinationUnitLabel', + 'xpack.securitySolution.kpiHosts.uniqueIps.destinationUnitLabel', { defaultMessage: 'destination', } ); -export const SOURCE_CHART_LABEL = i18n.translate('xpack.siem.kpiHosts.uniqueIps.sourceChartLabel', { - defaultMessage: 'Src.', -}); +export const SOURCE_CHART_LABEL = i18n.translate( + 'xpack.securitySolution.kpiHosts.uniqueIps.sourceChartLabel', + { + defaultMessage: 'Src.', + } +); export const DESTINATION_CHART_LABEL = i18n.translate( - 'xpack.siem.kpiHosts.uniqueIps.destinationChartLabel', + 'xpack.securitySolution.kpiHosts.uniqueIps.destinationChartLabel', { defaultMessage: 'Dest.', } diff --git a/x-pack/plugins/siem/public/hosts/components/kpi_hosts/types.ts b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/kpi_hosts/types.ts rename to x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts diff --git a/x-pack/plugins/siem/public/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/hosts/components/uncommon_process_table/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/uncommon_process_table/index.test.tsx rename to x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/uncommon_process_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/uncommon_process_table/index.tsx rename to x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/components/uncommon_process_table/mock.ts b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/components/uncommon_process_table/mock.ts rename to x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts diff --git a/x-pack/plugins/siem/public/hosts/components/uncommon_process_table/translations.ts b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/translations.ts similarity index 51% rename from x-pack/plugins/siem/public/hosts/components/uncommon_process_table/translations.ts rename to x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/translations.ts index c76544903636c..19b9e62e15098 100644 --- a/x-pack/plugins/siem/public/hosts/components/uncommon_process_table/translations.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/translations.ts @@ -7,54 +7,60 @@ import { i18n } from '@kbn/i18n'; export const UNCOMMON_PROCESSES = i18n.translate( - 'xpack.siem.authenticationsTable.uncommonProcessTable', + 'xpack.securitySolution.authenticationsTable.uncommonProcessTable', { defaultMessage: 'Uncommon processes', } ); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.uncommonProcessTable.unit', { + i18n.translate('xpack.securitySolution.uncommonProcessTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {process} other {processes}}`, }); -export const HOSTS = i18n.translate('xpack.siem.uncommonProcessTable.hostsTitle', { +export const HOSTS = i18n.translate('xpack.securitySolution.uncommonProcessTable.hostsTitle', { defaultMessage: 'Host names', }); export const NUMBER_OF_HOSTS = i18n.translate( - 'xpack.siem.uncommonProcessTable.numberOfHostsTitle', + 'xpack.securitySolution.uncommonProcessTable.numberOfHostsTitle', { defaultMessage: 'Hosts', } ); export const NUMBER_OF_INSTANCES = i18n.translate( - 'xpack.siem.uncommonProcessTable.numberOfInstances', + 'xpack.securitySolution.uncommonProcessTable.numberOfInstances', { defaultMessage: 'Instances', } ); -export const LAST_COMMAND = i18n.translate('xpack.siem.uncommonProcessTable.lastCommandTitle', { - defaultMessage: 'Last command', -}); +export const LAST_COMMAND = i18n.translate( + 'xpack.securitySolution.uncommonProcessTable.lastCommandTitle', + { + defaultMessage: 'Last command', + } +); -export const LAST_USER = i18n.translate('xpack.siem.uncommonProcessTable.lastUserTitle', { - defaultMessage: 'Last user', -}); +export const LAST_USER = i18n.translate( + 'xpack.securitySolution.uncommonProcessTable.lastUserTitle', + { + defaultMessage: 'Last user', + } +); -export const NAME = i18n.translate('xpack.siem.uncommonProcessTable.nameTitle', { +export const NAME = i18n.translate('xpack.securitySolution.uncommonProcessTable.nameTitle', { defaultMessage: 'Process name', }); -export const ROWS_5 = i18n.translate('xpack.siem.uncommonProcessTable.rows', { +export const ROWS_5 = i18n.translate('xpack.securitySolution.uncommonProcessTable.rows', { values: { numRows: 5 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); -export const ROWS_10 = i18n.translate('xpack.siem.uncommonProcessTable.rows', { +export const ROWS_10 = i18n.translate('xpack.securitySolution.uncommonProcessTable.rows', { values: { numRows: 10 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); diff --git a/x-pack/plugins/siem/public/hosts/containers/authentications/index.gql_query.ts b/x-pack/plugins/security_solution/public/hosts/containers/authentications/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/authentications/index.gql_query.ts rename to x-pack/plugins/security_solution/public/hosts/containers/authentications/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/authentications/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/authentications/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/authentications/index.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/authentications/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/first_last_seen/first_last_seen.gql_query.ts b/x-pack/plugins/security_solution/public/hosts/containers/hosts/first_last_seen/first_last_seen.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/first_last_seen/first_last_seen.gql_query.ts rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/first_last_seen/first_last_seen.gql_query.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/first_last_seen/index.ts b/x-pack/plugins/security_solution/public/hosts/containers/hosts/first_last_seen/index.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/first_last_seen/index.ts rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/first_last_seen/index.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/first_last_seen/mock.ts b/x-pack/plugins/security_solution/public/hosts/containers/hosts/first_last_seen/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/first_last_seen/mock.ts rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/first_last_seen/mock.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/hosts_table.gql_query.ts b/x-pack/plugins/security_solution/public/hosts/containers/hosts/hosts_table.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/hosts_table.gql_query.ts rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/hosts_table.gql_query.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/index.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/overview/host_overview.gql_query.ts b/x-pack/plugins/security_solution/public/hosts/containers/hosts/overview/host_overview.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/overview/host_overview.gql_query.ts rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/overview/host_overview.gql_query.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/hosts/overview/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/hosts/overview/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/hosts/overview/index.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/hosts/overview/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/containers/kpi_host_details/index.gql_query.tsx b/x-pack/plugins/security_solution/public/hosts/containers/kpi_host_details/index.gql_query.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/kpi_host_details/index.gql_query.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/kpi_host_details/index.gql_query.tsx diff --git a/x-pack/plugins/siem/public/hosts/containers/kpi_host_details/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/kpi_host_details/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/kpi_host_details/index.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/kpi_host_details/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/containers/kpi_hosts/index.gql_query.ts b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/kpi_hosts/index.gql_query.ts rename to x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/kpi_hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/kpi_hosts/index.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/containers/uncommon_processes/index.gql_query.ts b/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/uncommon_processes/index.gql_query.ts rename to x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/hosts/containers/uncommon_processes/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/containers/uncommon_processes/index.tsx rename to x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/index.ts b/x-pack/plugins/security_solution/public/hosts/index.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/index.ts rename to x-pack/plugins/security_solution/public/hosts/index.ts diff --git a/x-pack/plugins/siem/public/hosts/pages/details/details_tabs.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/details_tabs.test.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/details/details_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/details_tabs.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/details/helpers.test.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/helpers.test.ts rename to x-pack/plugins/security_solution/public/hosts/pages/details/helpers.test.ts diff --git a/x-pack/plugins/siem/public/hosts/pages/details/helpers.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/helpers.ts rename to x-pack/plugins/security_solution/public/hosts/pages/details/helpers.ts diff --git a/x-pack/plugins/siem/public/hosts/pages/details/index.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/index.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/details/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/nav_tabs.test.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/details/nav_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/details/types.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/types.ts rename to x-pack/plugins/security_solution/public/hosts/pages/details/types.ts diff --git a/x-pack/plugins/siem/public/hosts/pages/details/utils.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/details/utils.ts rename to x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts diff --git a/x-pack/plugins/siem/public/hosts/pages/hosts.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/hosts.test.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/hosts.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx similarity index 100% rename from x-pack/plugins/siem/public/hosts/pages/hosts.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx diff --git a/x-pack/plugins/siem/public/hosts/pages/hosts_empty_page.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts_empty_page.tsx similarity index 90% rename from x-pack/plugins/siem/public/hosts/pages/hosts_empty_page.tsx rename to x-pack/plugins/security_solution/public/hosts/pages/hosts_empty_page.tsx index 3ab0cb1f748d6..a01e249561e5c 100644 --- a/x-pack/plugins/siem/public/hosts/pages/hosts_empty_page.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/hosts_empty_page.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { EmptyPage } from '../../common/components/empty_page'; import { useKibana } from '../../common/lib/kibana'; import * as i18n from '../../common/translations'; +import { ADD_DATA_PATH } from '../../../common/constants'; export const HostsEmptyPage = React.memo(() => { const { http, docLinks } = useKibana().services; @@ -18,7 +19,7 @@ export const HostsEmptyPage = React.memo(() => { = Exclude extends never ? T1 : never; +type Exact = T extends Shape ? ExactKeys : never; + +/** + * Returns a string to be used in the URL as search query params. + * Ensures that when creating a URL query param string, that the given input strictly + * matches the expected interface (guards against possibly leaking internal state) + */ +const querystringStringify: ( + params: Exact +) => string = querystring.stringify; + +/** Make `selected_host` required */ +type EndpointDetailsUrlProps = Omit & + Required>; + +/** + * Input props for the `getManagementUrl()` method + */ +export type GetManagementUrlProps = { + /** + * Exclude the URL prefix (everything to the left of where the router was mounted. + * This may be needed when interacting with react-router (ex. to do `history.push()` or + * validations against matched path) + */ + excludePrefix?: boolean; +} & ( + | ({ name: 'default' | 'endpointList' } & HostIndexUIQueryParams) + | ({ name: 'endpointDetails' | 'endpointPolicyResponse' } & EndpointDetailsUrlProps) + | { name: 'policyList' } + | { name: 'policyDetails'; policyId: string } +); + +// Prefix is (almost) everything to the left of where the Router was mounted. In SIEM, since +// we're using Hash router, thats the `#`. +const URL_PREFIX = '#'; + +/** + * Returns a URL string for a given Management page view + * @param props + */ +export const getManagementUrl = (props: GetManagementUrlProps): string => { + let url = props.excludePrefix ? '' : URL_PREFIX; + + if (props.name === 'default' || props.name === 'endpointList') { + const { name, excludePrefix, ...queryParams } = props; + const urlQueryParams = querystringStringify( + queryParams + ); + + if (name === 'endpointList') { + url += generatePath(MANAGEMENT_ROUTING_ENDPOINTS_PATH, { + pageName: SiemPageName.management, + tabName: ManagementSubTab.endpoints, + }); + } else { + url += generatePath(MANAGEMENT_ROUTING_ROOT_PATH, { + pageName: SiemPageName.management, + }); + } + + if (urlQueryParams) { + url += `?${urlQueryParams}`; + } + } else if (props.name === 'endpointDetails' || props.name === 'endpointPolicyResponse') { + const { name, excludePrefix, ...queryParams } = props; + queryParams.show = (props.name === 'endpointPolicyResponse' + ? 'policy_response' + : '') as HostIndexUIQueryParams['show']; + + url += `${generatePath(MANAGEMENT_ROUTING_ENDPOINTS_PATH, { + pageName: SiemPageName.management, + tabName: ManagementSubTab.endpoints, + })}?${querystringStringify(queryParams)}`; + } else if (props.name === 'policyList') { + url += generatePath(MANAGEMENT_ROUTING_POLICIES_PATH, { + pageName: SiemPageName.management, + tabName: ManagementSubTab.policies, + }); + } else if (props.name === 'policyDetails') { + url += generatePath(MANAGEMENT_ROUTING_POLICY_DETAILS_PATH, { + pageName: SiemPageName.management, + tabName: ManagementSubTab.policies, + policyId: props.policyId, + }); + } + + return url; +}; diff --git a/x-pack/plugins/siem/public/management/components/management_page_view.tsx b/x-pack/plugins/security_solution/public/management/components/management_page_view.tsx similarity index 77% rename from x-pack/plugins/siem/public/management/components/management_page_view.tsx rename to x-pack/plugins/security_solution/public/management/components/management_page_view.tsx index 13d8525e15e15..5b140a53a363b 100644 --- a/x-pack/plugins/siem/public/management/components/management_page_view.tsx +++ b/x-pack/plugins/security_solution/public/management/components/management_page_view.tsx @@ -13,10 +13,13 @@ import { getManagementUrl } from '..'; export const ManagementPageView = memo>((options) => { const { tabName } = useParams<{ tabName: ManagementSubTab }>(); - const tabs = useMemo((): PageViewProps['tabs'] => { + const tabs = useMemo((): PageViewProps['tabs'] | undefined => { + if (options.viewType === 'details') { + return undefined; + } return [ { - name: i18n.translate('xpack.siem.managementTabs.endpoints', { + name: i18n.translate('xpack.securitySolution.managementTabs.endpoints', { defaultMessage: 'Endpoints', }), id: ManagementSubTab.endpoints, @@ -24,7 +27,9 @@ export const ManagementPageView = memo>((options) => href: getManagementUrl({ name: 'endpointList' }), }, { - name: i18n.translate('xpack.siem.managementTabs.policies', { defaultMessage: 'Policies' }), + name: i18n.translate('xpack.securitySolution.managementTabs.policies', { + defaultMessage: 'Policies', + }), id: ManagementSubTab.policies, isSelected: tabName === ManagementSubTab.policies, href: getManagementUrl({ name: 'policyList' }), diff --git a/x-pack/plugins/siem/public/management/index.ts b/x-pack/plugins/security_solution/public/management/index.ts similarity index 100% rename from x-pack/plugins/siem/public/management/index.ts rename to x-pack/plugins/security_solution/public/management/index.ts diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx new file mode 100644 index 0000000000000..ff7f522b9bc52 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx @@ -0,0 +1,25 @@ +/* + * 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 { Switch, Route } from 'react-router-dom'; +import React, { memo } from 'react'; +import { HostList } from './view'; +import { MANAGEMENT_ROUTING_ENDPOINTS_PATH } from '../../common/constants'; +import { NotFoundPage } from '../../../app/404'; + +/** + * Provides the routing container for the endpoints related views + */ +export const EndpointsContainer = memo(() => { + return ( + + + + + ); +}); + +EndpointsContainer.displayName = 'EndpointsContainer'; diff --git a/x-pack/plugins/siem/public/endpoint_hosts/routes.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_hosts/routes.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/routes.tsx diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/action.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts similarity index 87% rename from x-pack/plugins/siem/public/endpoint_hosts/store/action.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts index 9b38d7ce5a23a..62a2d9e3205c2 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/action.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts @@ -4,8 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HostResultList, HostInfo, GetHostPolicyResponse } from '../../../common/endpoint/types'; -import { ServerApiError } from '../../common/types'; +import { + HostResultList, + HostInfo, + GetHostPolicyResponse, +} from '../../../../../common/endpoint/types'; +import { ServerApiError } from '../../../../common/types'; interface ServerReturnedHostList { type: 'serverReturnedHostList'; diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/host_pagination.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts similarity index 89% rename from x-pack/plugins/siem/public/endpoint_hosts/store/host_pagination.test.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts index 17feacb0a767a..b8eaa39c77752 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/host_pagination.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts @@ -8,10 +8,10 @@ import { CoreStart, HttpSetup } from 'kibana/public'; import { History, createBrowserHistory } from 'history'; import { applyMiddleware, Store, createStore } from 'redux'; -import { coreMock } from '../../../../../../src/core/public/mocks'; +import { coreMock } from '../../../../../../../../src/core/public/mocks'; -import { HostResultList, AppLocation } from '../../../common/endpoint/types'; -import { DepsStartMock, depsStartMock } from '../../common/mock/endpoint'; +import { HostResultList, AppLocation } from '../../../../../common/endpoint/types'; +import { DepsStartMock, depsStartMock } from '../../../../common/mock/endpoint'; import { hostMiddlewareFactory } from './middleware'; @@ -20,8 +20,11 @@ import { hostListReducer } from './reducer'; import { uiQueryParams } from './selectors'; import { mockHostResultList } from './mock_host_result_list'; import { HostState, HostIndexUIQueryParams } from '../types'; -import { MiddlewareActionSpyHelper, createSpyMiddleware } from '../../common/store/test_utils'; -import { urlFromQueryParams } from '../view/url_from_query_params'; +import { + MiddlewareActionSpyHelper, + createSpyMiddleware, +} from '../../../../common/store/test_utils'; +import { getManagementUrl } from '../../..'; describe('host list pagination: ', () => { let fakeCoreStart: jest.Mocked; @@ -53,7 +56,9 @@ describe('host list pagination: ', () => { queryParams = () => uiQueryParams(store.getState()); historyPush = (nextQueryParams: HostIndexUIQueryParams): void => { - return history.push(urlFromQueryParams(nextQueryParams)); + return history.push( + getManagementUrl({ name: 'endpointList', excludePrefix: true, ...nextQueryParams }) + ); }; }); @@ -67,7 +72,7 @@ describe('host list pagination: ', () => { type: 'userChangedUrl', payload: { ...history.location, - pathname: '/endpoint-hosts', + pathname: getManagementUrl({ name: 'endpointList', excludePrefix: true }), }, }); await waitForAction('serverReturnedHostList'); diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/index.test.ts similarity index 100% rename from x-pack/plugins/siem/public/endpoint_hosts/store/index.test.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/index.test.ts diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/middleware.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts similarity index 82% rename from x-pack/plugins/siem/public/endpoint_hosts/store/middleware.test.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts index 0959a3438aad9..a6cd2ca3afac4 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/middleware.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts @@ -5,19 +5,23 @@ */ import { CoreStart, HttpSetup } from 'kibana/public'; import { applyMiddleware, createStore, Store } from 'redux'; -import { coreMock } from '../../../../../../src/core/public/mocks'; +import { coreMock } from '../../../../../../../../src/core/public/mocks'; import { History, createBrowserHistory } from 'history'; -import { DepsStartMock, depsStartMock } from '../../common/mock/endpoint'; +import { DepsStartMock, depsStartMock } from '../../../../common/mock/endpoint'; -import { createSpyMiddleware, MiddlewareActionSpyHelper } from '../../common/store/test_utils'; -import { Immutable, HostResultList } from '../../../common/endpoint/types'; -import { AppAction } from '../../common/store/actions'; +import { + createSpyMiddleware, + MiddlewareActionSpyHelper, +} from '../../../../common/store/test_utils'; +import { Immutable, HostResultList } from '../../../../../common/endpoint/types'; +import { AppAction } from '../../../../common/store/actions'; import { mockHostResultList } from './mock_host_result_list'; import { listData } from './selectors'; import { HostState } from '../types'; import { hostListReducer } from './reducer'; import { hostMiddlewareFactory } from './middleware'; +import { getManagementUrl } from '../../..'; describe('host list middleware', () => { let fakeCoreStart: jest.Mocked; @@ -56,7 +60,7 @@ describe('host list middleware', () => { type: 'userChangedUrl', payload: { ...history.location, - pathname: '/endpoint-hosts', + pathname: getManagementUrl({ name: 'endpointList', excludePrefix: true }), }, }); await waitForAction('serverReturnedHostList'); diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts similarity index 95% rename from x-pack/plugins/siem/public/endpoint_hosts/store/middleware.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts index dd9ab19a702ea..85667c9f9fc37 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HostResultList } from '../../../common/endpoint/types'; -import { ImmutableMiddlewareFactory } from '../../common/store'; +import { HostResultList } from '../../../../../common/endpoint/types'; +import { ImmutableMiddlewareFactory } from '../../../../common/store'; import { isOnHostPage, hasSelectedHost, uiQueryParams, listData } from './selectors'; import { HostState } from '../types'; @@ -37,7 +37,7 @@ export const hostMiddlewareFactory: ImmutableMiddlewareFactory = (cor }); } } - if (action.type === 'userChangedUrl' && hasSelectedHost(state) !== false) { + if (action.type === 'userChangedUrl' && hasSelectedHost(state) === true) { // If user navigated directly to a host details page, load the host list if (listData(state).length === 0) { const { page_index: pageIndex, page_size: pageSize } = uiQueryParams(state); diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/mock_host_result_list.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_host_result_list.ts similarity index 89% rename from x-pack/plugins/siem/public/endpoint_hosts/store/mock_host_result_list.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_host_result_list.ts index a2c410b5dbd65..05af1ee062de6 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/mock_host_result_list.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_host_result_list.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HostInfo, HostResultList, HostStatus } from '../../../common/endpoint/types'; -import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; +import { HostInfo, HostResultList, HostStatus } from '../../../../../common/endpoint/types'; +import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; export const mockHostResultList: (options?: { total?: number; diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts similarity index 95% rename from x-pack/plugins/siem/public/endpoint_hosts/store/reducer.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts index c0d5e6931db2b..23682544ec423 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts @@ -6,9 +6,9 @@ import { isOnHostPage, hasSelectedHost } from './selectors'; import { HostState } from '../types'; -import { AppAction } from '../../common/store/actions'; -import { ImmutableReducer } from '../../common/store'; -import { Immutable } from '../../../common/endpoint/types'; +import { AppAction } from '../../../../common/store/actions'; +import { ImmutableReducer } from '../../../../common/store'; +import { Immutable } from '../../../../../common/endpoint/types'; export const initialHostListState: Immutable = { hosts: [], diff --git a/x-pack/plugins/siem/public/endpoint_hosts/store/selectors.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts similarity index 86% rename from x-pack/plugins/siem/public/endpoint_hosts/store/selectors.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts index 05b265b49ea5d..5e7cbc0ef58d3 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts @@ -7,13 +7,15 @@ // eslint-disable-next-line import/no-nodejs-modules import querystring from 'querystring'; import { createSelector } from 'reselect'; +import { matchPath } from 'react-router-dom'; import { Immutable, HostPolicyResponseAppliedAction, HostPolicyResponseConfiguration, HostPolicyResponseActionStatus, -} from '../../../common/endpoint/types'; +} from '../../../../../common/endpoint/types'; import { HostState, HostIndexUIQueryParams } from '../types'; +import { MANAGEMENT_ROUTING_ENDPOINTS_PATH } from '../../../common/constants'; const PAGE_SIZES = Object.freeze([10, 20, 50]); @@ -96,8 +98,14 @@ export const policyResponseLoading = (state: Immutable): boolean => export const policyResponseError = (state: Immutable) => state.policyResponseError; -export const isOnHostPage = (state: Immutable) => - state.location ? state.location.pathname === '/endpoint-hosts' : false; +export const isOnHostPage = (state: Immutable) => { + return ( + matchPath(state.location?.pathname ?? '', { + path: MANAGEMENT_ROUTING_ENDPOINTS_PATH, + exact: true, + }) !== null + ); +}; export const uiQueryParams: ( state: Immutable @@ -117,11 +125,21 @@ export const uiQueryParams: ( ]; for (const key of keys) { - const value = query[key]; - if (typeof value === 'string') { - data[key] = value; - } else if (Array.isArray(value)) { - data[key] = value[value.length - 1]; + const value: string | undefined = + typeof query[key] === 'string' + ? (query[key] as string) + : Array.isArray(query[key]) + ? (query[key][query[key].length - 1] as string) + : undefined; + + if (value !== undefined) { + if (key === 'show') { + if (value === 'policy_response' || value === 'details') { + data[key] = value; + } + } else { + data[key] = value; + } } } diff --git a/x-pack/plugins/siem/public/endpoint_hosts/types.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts similarity index 92% rename from x-pack/plugins/siem/public/endpoint_hosts/types.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts index 421903cb6e1ab..4881342c06573 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts @@ -10,8 +10,8 @@ import { HostMetadata, HostPolicyResponse, AppLocation, -} from '../../common/endpoint/types'; -import { ServerApiError } from '../common/types'; +} from '../../../../common/endpoint/types'; +import { ServerApiError } from '../../../common/types'; export interface HostState { /** list of host **/ @@ -53,5 +53,5 @@ export interface HostIndexUIQueryParams { /** Which page to show */ page_index?: string; /** show the policy response or host details */ - show?: string; + show?: 'policy_response' | 'details'; } diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/details/components/flyout_sub_header.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/flyout_sub_header.tsx similarity index 100% rename from x-pack/plugins/siem/public/endpoint_hosts/view/details/components/flyout_sub_header.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/flyout_sub_header.tsx diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/details/host_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx similarity index 68% rename from x-pack/plugins/siem/public/endpoint_hosts/view/details/host_details.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx index eb265675d3a24..b05cdfb3be840 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/details/host_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx @@ -16,14 +16,14 @@ import { import React, { memo, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { HostMetadata } from '../../../../common/endpoint/types'; +import { HostMetadata } from '../../../../../../common/endpoint/types'; import { useHostSelector, useHostLogsUrl } from '../hooks'; -import { urlFromQueryParams } from '../url_from_query_params'; import { policyResponseStatus, uiQueryParams } from '../../store/selectors'; import { POLICY_STATUS_TO_HEALTH_COLOR } from '../host_constants'; -import { FormattedDateAndTime } from '../../../common/components/endpoint/formatted_date_time'; -import { useNavigateByRouterEventHandler } from '../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; -import { LinkToApp } from '../../../common/components/endpoint/link_to_app'; +import { FormattedDateAndTime } from '../../../../../common/components/endpoint/formatted_date_time'; +import { useNavigateByRouterEventHandler } from '../../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; +import { LinkToApp } from '../../../../../common/components/endpoint/link_to_app'; +import { getManagementUrl } from '../../../..'; const HostIds = styled(EuiListGroupItem)` margin-top: 0; @@ -41,19 +41,19 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { const detailsResultsUpper = useMemo(() => { return [ { - title: i18n.translate('xpack.siem.endpoint.host.details.os', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.os', { defaultMessage: 'OS', }), description: details.host.os.full, }, { - title: i18n.translate('xpack.siem.endpoint.host.details.lastSeen', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.lastSeen', { defaultMessage: 'Last Seen', }), description: , }, { - title: i18n.translate('xpack.siem.endpoint.host.details.alerts', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.alerts', { defaultMessage: 'Alerts', }), description: '0', @@ -61,25 +61,35 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { ]; }, [details]); - const policyResponseUri = useMemo(() => { - return urlFromQueryParams({ - ...queryParams, - selected_host: details.host.id, - show: 'policy_response', - }); + const [policyResponseUri, policyResponseRoutePath] = useMemo(() => { + const { selected_host, show, ...currentUrlParams } = queryParams; + return [ + getManagementUrl({ + name: 'endpointPolicyResponse', + ...currentUrlParams, + selected_host: details.host.id, + }), + getManagementUrl({ + name: 'endpointPolicyResponse', + excludePrefix: true, + ...currentUrlParams, + selected_host: details.host.id, + }), + ]; }, [details.host.id, queryParams]); - const policyStatusClickHandler = useNavigateByRouterEventHandler(policyResponseUri); + + const policyStatusClickHandler = useNavigateByRouterEventHandler(policyResponseRoutePath); const detailsResultsLower = useMemo(() => { return [ { - title: i18n.translate('xpack.siem.endpoint.host.details.policy', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.policy', { defaultMessage: 'Policy', }), description: details.endpoint.policy.id, }, { - title: i18n.translate('xpack.siem.endpoint.host.details.policyStatus', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.policyStatus', { defaultMessage: 'Policy Status', }), description: ( @@ -90,11 +100,11 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} @@ -103,7 +113,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { ), }, { - title: i18n.translate('xpack.siem.endpoint.host.details.ipAddress', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.ipAddress', { defaultMessage: 'IP Address', }), description: ( @@ -115,13 +125,13 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { ), }, { - title: i18n.translate('xpack.siem.endpoint.host.details.hostname', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.hostname', { defaultMessage: 'Hostname', }), description: details.host.hostname, }, { - title: i18n.translate('xpack.siem.endpoint.host.details.sensorVersion', { + title: i18n.translate('xpack.securitySolution.endpoint.host.details.sensorVersion', { defaultMessage: 'Sensor Version', }), description: details.agent.version, @@ -159,7 +169,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { data-test-subj="hostDetailsLinkToLogs" > diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/details/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx similarity index 82% rename from x-pack/plugins/siem/public/endpoint_hosts/view/details/index.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx index 9904306a76e9c..ed853e24d7c31 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/details/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx @@ -18,7 +18,7 @@ import { import { useHistory } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; +import { useKibana } from '../../../../../../../../../src/plugins/kibana_react/public'; import { useHostSelector } from '../hooks'; import { urlFromQueryParams } from '../url_from_query_params'; import { @@ -35,9 +35,10 @@ import { } from '../../store/selectors'; import { HostDetails } from './host_details'; import { PolicyResponse } from './policy_response'; -import { HostMetadata } from '../../../../common/endpoint/types'; +import { HostMetadata } from '../../../../../../common/endpoint/types'; import { FlyoutSubHeader, FlyoutSubHeaderProps } from './components/flyout_sub_header'; -import { useNavigateByRouterEventHandler } from '../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; +import { useNavigateByRouterEventHandler } from '../../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; +import { getManagementUrl } from '../../../..'; export const HostDetailsFlyout = memo(() => { const history = useHistory(); @@ -58,13 +59,13 @@ export const HostDetailsFlyout = memo(() => { notifications.toasts.danger({ title: ( ), body: ( ), @@ -115,24 +116,32 @@ const PolicyResponseFlyoutPanel = memo<{ const responseAttentionCount = useHostSelector(policyResponseFailedOrWarningActionCount); const loading = useHostSelector(policyResponseLoading); const error = useHostSelector(policyResponseError); - const detailsUri = useMemo( - () => - urlFromQueryParams({ + const [detailsUri, detailsRoutePath] = useMemo( + () => [ + getManagementUrl({ + name: 'endpointList', ...queryParams, selected_host: hostMeta.host.id, }), + getManagementUrl({ + name: 'endpointList', + excludePrefix: true, + ...queryParams, + selected_host: hostMeta.host.id, + }), + ], [hostMeta.host.id, queryParams] ); - const backToDetailsClickHandler = useNavigateByRouterEventHandler(detailsUri); + const backToDetailsClickHandler = useNavigateByRouterEventHandler(detailsRoutePath); const backButtonProp = useMemo((): FlyoutSubHeaderProps['backButton'] => { return { - title: i18n.translate('xpack.siem.endpoint.host.policyResponse.backLinkTitle', { + title: i18n.translate('xpack.securitySolution.endpoint.host.policyResponse.backLinkTitle', { defaultMessage: 'Endpoint Details', }), - href: `?${detailsUri.search}`, + href: detailsUri, onClick: backToDetailsClickHandler, }; - }, [backToDetailsClickHandler, detailsUri.search]); + }, [backToDetailsClickHandler, detailsUri]); return ( <> @@ -144,7 +153,7 @@ const PolicyResponseFlyoutPanel = memo<{

@@ -153,7 +162,7 @@ const PolicyResponseFlyoutPanel = memo<{ } diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/details/policy_response.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx similarity index 93% rename from x-pack/plugins/siem/public/endpoint_hosts/view/details/policy_response.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx index c6ecffe0fd51a..8db95f586782c 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/details/policy_response.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx @@ -19,7 +19,7 @@ import { Immutable, HostPolicyResponseAppliedAction, HostPolicyResponseConfiguration, -} from '../../../../common/endpoint/types'; +} from '../../../../../../common/endpoint/types'; /** * Nested accordion in the policy response detailing any concerned @@ -136,8 +136,14 @@ export const PolicyResponse = memo( const attentionCount = responseAttentionCount.get(key); return ( htmlIdGenerator()(), [])} - key={useMemo(() => htmlIdGenerator()(), [])} + id={ + /* eslint-disable-next-line react-hooks/rules-of-hooks */ + useMemo(() => htmlIdGenerator()(), []) + } + key={ + /* eslint-disable-next-line react-hooks/rules-of-hooks */ + useMemo(() => htmlIdGenerator()(), []) + } data-test-subj="hostDetailsPolicyResponseConfigAccordion" buttonContent={ diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response_friendly_names.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response_friendly_names.ts new file mode 100644 index 0000000000000..28e91331b428d --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response_friendly_names.ts @@ -0,0 +1,199 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +const responseMap = new Map(); +responseMap.set( + 'success', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.success', { + defaultMessage: 'Success', + }) +); +responseMap.set( + 'warning', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.warning', { + defaultMessage: 'Warning', + }) +); +responseMap.set( + 'failure', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.failed', { + defaultMessage: 'Failed', + }) +); +responseMap.set( + 'logging', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.logging', { + defaultMessage: 'Logging', + }) +); +responseMap.set( + 'streaming', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.streaming', { + defaultMessage: 'Streaming', + }) +); +responseMap.set( + 'malware', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.malware', { + defaultMessage: 'Malware', + }) +); +responseMap.set( + 'events', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.events', { + defaultMessage: 'Events', + }) +); +responseMap.set( + 'configure_elasticsearch_connection', + i18n.translate( + 'xpack.securitySolution.endpoint.hostDetails.policyResponse.configureElasticSearchConnection', + { + defaultMessage: 'Configure Elastic Search Connection', + } + ) +); +responseMap.set( + 'configure_logging', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.configureLogging', { + defaultMessage: 'Configure Logging', + }) +); +responseMap.set( + 'configure_kernel', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.configureKernel', { + defaultMessage: 'Configure Kernel', + }) +); +responseMap.set( + 'configure_malware', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.configureMalware', { + defaultMessage: 'Configure Malware', + }) +); +responseMap.set( + 'connect_kernel', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.connectKernel', { + defaultMessage: 'Connect Kernel', + }) +); +responseMap.set( + 'detect_file_open_events', + i18n.translate( + 'xpack.securitySolution.endpoint.hostDetails.policyResponse.detectFileOpenEvents', + { + defaultMessage: 'Detect File Open Events', + } + ) +); +responseMap.set( + 'detect_file_write_events', + i18n.translate( + 'xpack.securitySolution.endpoint.hostDetails.policyResponse.detectFileWriteEvents', + { + defaultMessage: 'Detect File Write Events', + } + ) +); +responseMap.set( + 'detect_image_load_events', + i18n.translate( + 'xpack.securitySolution.endpoint.hostDetails.policyResponse.detectImageLoadEvents', + { + defaultMessage: 'Detect Image Load Events', + } + ) +); +responseMap.set( + 'detect_process_events', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.detectProcessEvents', { + defaultMessage: 'Detect Process Events', + }) +); +responseMap.set( + 'download_global_artifacts', + i18n.translate( + 'xpack.securitySolution.endpoint.hostDetails.policyResponse.downloadGlobalArtifacts', + { + defaultMessage: 'Download Global Artifacts', + } + ) +); +responseMap.set( + 'load_config', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.loadConfig', { + defaultMessage: 'Load Config', + }) +); +responseMap.set( + 'load_malware_model', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.loadMalwareModel', { + defaultMessage: 'Load Malware Model', + }) +); +responseMap.set( + 'read_elasticsearch_config', + i18n.translate( + 'xpack.securitySolution.endpoint.hostDetails.policyResponse.readElasticSearchConfig', + { + defaultMessage: 'Read ElasticSearch Config', + } + ) +); +responseMap.set( + 'read_events_config', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.readEventsConfig', { + defaultMessage: 'Read Events Config', + }) +); +responseMap.set( + 'read_kernel_config', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.readKernelConfig', { + defaultMessage: 'Read Kernel Config', + }) +); +responseMap.set( + 'read_logging_config', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.readLoggingConfig', { + defaultMessage: 'Read Logging Config', + }) +); +responseMap.set( + 'read_malware_config', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.readMalwareConfig', { + defaultMessage: 'Read Malware Config', + }) +); +responseMap.set( + 'workflow', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.workflow', { + defaultMessage: 'Workflow', + }) +); +responseMap.set( + 'download_model', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.downloadModel', { + defaultMessage: 'Download Model', + }) +); +responseMap.set( + 'ingest_events_config', + i18n.translate('xpack.securitySolution.endpoint.hostDetails.policyResponse.injestEventsConfig', { + defaultMessage: 'Injest Events Config', + }) +); + +/** + * Maps a server provided value to corresponding i18n'd string. + */ +export function formatResponse(responseString: string) { + if (responseMap.has(responseString)) { + return responseMap.get(responseString); + } + return responseString; +} diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/hooks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts similarity index 74% rename from x-pack/plugins/siem/public/endpoint_hosts/view/hooks.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts index 78fd679f818b6..ddba6d7344ce5 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts @@ -7,12 +7,18 @@ import { useSelector } from 'react-redux'; import { useMemo } from 'react'; import { HostState } from '../types'; -import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; -import { State } from '../../common/store/types'; +import { + MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, + MANAGEMENT_STORE_GLOBAL_NAMESPACE, +} from '../../../common/constants'; +import { useKibana } from '../../../../common/lib/kibana'; +import { State } from '../../../../common/store'; export function useHostSelector(selector: (state: HostState) => TSelected) { return useSelector(function (state: State) { - return selector(state.hostList as HostState); + return selector( + state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_ENDPOINTS_NAMESPACE] as HostState + ); }); } diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/host_constants.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts similarity index 95% rename from x-pack/plugins/siem/public/endpoint_hosts/view/host_constants.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts index efad4e3a468d8..645a4896770ee 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/host_constants.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HostStatus, HostPolicyResponseActionStatus } from '../../../common/endpoint/types'; +import { HostStatus, HostPolicyResponseActionStatus } from '../../../../../common/endpoint/types'; export const HOST_STATUS_TO_HEALTH_COLOR = Object.freeze< { diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx similarity index 97% rename from x-pack/plugins/siem/public/endpoint_hosts/view/index.test.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 5e0e3e7e163e5..7d84bb52238a2 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -9,14 +9,14 @@ import * as reactTestingLibrary from '@testing-library/react'; import { HostList } from './index'; import { mockHostDetailsApiResult, mockHostResultList } from '../store/mock_host_result_list'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../common/mock/endpoint'; +import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; import { HostInfo, HostStatus, HostPolicyResponseActionStatus, -} from '../../../common/endpoint/types'; -import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; -import { AppAction } from '../../common/store/actions'; +} from '../../../../../common/endpoint/types'; +import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; +import { AppAction } from '../../../../common/store/actions'; describe('when on the hosts page', () => { const docGenerator = new EndpointDocGenerator(); @@ -202,7 +202,7 @@ describe('when on the hosts page', () => { const policyStatusLink = await renderResult.findByTestId('policyStatusValue'); expect(policyStatusLink).not.toBeNull(); expect(policyStatusLink.getAttribute('href')).toEqual( - '?page_index=0&page_size=10&selected_host=1&show=policy_response' + '#/management/endpoints?page_index=0&page_size=10&selected_host=1&show=policy_response' ); }); it('should update the URL when policy status link is clicked', async () => { @@ -381,7 +381,7 @@ describe('when on the hosts page', () => { const subHeaderBackLink = await renderResult.findByTestId('flyoutSubHeaderBackButton'); expect(subHeaderBackLink.textContent).toBe('Endpoint Details'); expect(subHeaderBackLink.getAttribute('href')).toBe( - '?page_index=0&page_size=10&selected_host=1' + '#/management/endpoints?page_index=0&page_size=10&selected_host=1' ); }); it('should update URL when back to details link is clicked', async () => { diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx similarity index 67% rename from x-pack/plugins/siem/public/endpoint_hosts/view/index.tsx rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 10a7a7ea0d445..125723e9bcea6 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -22,17 +22,19 @@ import { createStructuredSelector } from 'reselect'; import { HostDetailsFlyout } from './details'; import * as selectors from '../store/selectors'; import { useHostSelector } from './hooks'; -import { urlFromQueryParams } from './url_from_query_params'; import { HOST_STATUS_TO_HEALTH_COLOR } from './host_constants'; -import { useNavigateByRouterEventHandler } from '../../common/hooks/endpoint/use_navigate_by_router_event_handler'; -import { CreateStructuredSelector } from '../../common/store'; -import { Immutable, HostInfo } from '../../../common/endpoint/types'; -import { PageView } from '../../common/components/endpoint/page_view'; +import { useNavigateByRouterEventHandler } from '../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; +import { CreateStructuredSelector } from '../../../../common/store'; +import { Immutable, HostInfo } from '../../../../../common/endpoint/types'; +import { SpyRoute } from '../../../../common/utils/route/spy_routes'; +import { ManagementPageView } from '../../../components/management_page_view'; +import { getManagementUrl } from '../../..'; +import { FormattedDate } from '../../../../common/components/formatted_date'; const HostLink = memo<{ name: string; href: string; - route: ReturnType; + route: string; }>(({ name, href, route }) => { const clickHandler = useNavigateByRouterEventHandler(route); @@ -77,8 +79,11 @@ export const HostList = () => { const onTableChange = useCallback( ({ page }: { page: { index: number; size: number } }) => { const { index, size } = page; + // FIXME: PT: if host details is open, table is not displaying correct number of rows history.push( - urlFromQueryParams({ + getManagementUrl({ + name: 'endpointList', + excludePrefix: true, ...queryParams, page_index: JSON.stringify(index), page_size: JSON.stringify(size), @@ -89,22 +94,34 @@ export const HostList = () => { ); const columns: Array>> = useMemo(() => { + const lastActiveColumnName = i18n.translate('xpack.securitySolution.endpointList.lastActive', { + defaultMessage: 'Last Active', + }); + return [ { field: 'metadata.host', - name: i18n.translate('xpack.siem.endpoint.host.list.hostname', { + name: i18n.translate('xpack.securitySolution.endpointList.hostname', { defaultMessage: 'Hostname', }), render: ({ hostname, id }: HostInfo['metadata']['host']) => { - const newQueryParams = urlFromQueryParams({ ...queryParams, selected_host: id }); - return ( - - ); + const toRoutePath = getManagementUrl({ + ...queryParams, + name: 'endpointDetails', + selected_host: id, + excludePrefix: true, + }); + const toRouteUrl = getManagementUrl({ + ...queryParams, + name: 'endpointDetails', + selected_host: id, + }); + return ; }, }, { field: 'host_status', - name: i18n.translate('xpack.siem.endpoint.host.list.hostStatus', { + name: i18n.translate('xpack.securitySolution.endpointList.hostStatus', { defaultMessage: 'Host Status', }), // eslint-disable-next-line react/display-name @@ -116,7 +133,7 @@ export const HostList = () => { className="eui-textTruncate" > @@ -126,7 +143,7 @@ export const HostList = () => { }, { field: '', - name: i18n.translate('xpack.siem.endpoint.host.list.policy', { + name: i18n.translate('xpack.securitySolution.endpointList.policy', { defaultMessage: 'Policy', }), truncateText: true, @@ -137,7 +154,7 @@ export const HostList = () => { }, { field: '', - name: i18n.translate('xpack.siem.endpoint.host.list.policyStatus', { + name: i18n.translate('xpack.securitySolution.endpointList.policyStatus', { defaultMessage: 'Policy Status', }), // eslint-disable-next-line react/display-name @@ -145,7 +162,7 @@ export const HostList = () => { return ( @@ -154,7 +171,7 @@ export const HostList = () => { }, { field: '', - name: i18n.translate('xpack.siem.endpoint.host.list.alerts', { + name: i18n.translate('xpack.securitySolution.endpointList.alerts', { defaultMessage: 'Alerts', }), dataType: 'number', @@ -164,14 +181,14 @@ export const HostList = () => { }, { field: 'metadata.host.os.name', - name: i18n.translate('xpack.siem.endpoint.host.list.os', { + name: i18n.translate('xpack.securitySolution.endpointList.os', { defaultMessage: 'Operating System', }), truncateText: true, }, { field: 'metadata.host.ip', - name: i18n.translate('xpack.siem.endpoint.host.list.ip', { + name: i18n.translate('xpack.securitySolution.endpointList.ip', { defaultMessage: 'IP Address', }), // eslint-disable-next-line react/display-name @@ -189,33 +206,38 @@ export const HostList = () => { }, { field: 'metadata.agent.version', - name: i18n.translate('xpack.siem.endpoint.host.list.endpointVersion', { + name: i18n.translate('xpack.securitySolution.endpointList.endpointVersion', { defaultMessage: 'Version', }), }, { - field: '', - name: i18n.translate('xpack.siem.endpoint.host.list.lastActive', { - defaultMessage: 'Last Active', - }), - dataType: 'date', - render: () => { - return 'xxxx'; + field: 'metadata.@timestamp', + name: lastActiveColumnName, + render(dateValue: HostInfo['metadata']['@timestamp']) { + return ( + + ); }, }, ]; }, [queryParams]); return ( - {hasSelectedHost && } @@ -230,6 +252,7 @@ export const HostList = () => { pagination={paginationSetup} onChange={onTableChange} /> - + + ); }; diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/url_from_query_params.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts similarity index 89% rename from x-pack/plugins/siem/public/endpoint_hosts/view/url_from_query_params.ts rename to x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts index e3728d63aea7c..a14f1d0d0dd6c 100644 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/url_from_query_params.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts @@ -8,7 +8,7 @@ import querystring from 'querystring'; import { HostIndexUIQueryParams } from '../types'; -import { AppLocation } from '../../../common/endpoint/types'; +import { AppLocation } from '../../../../../common/endpoint/types'; export function urlFromQueryParams(queryParams: HostIndexUIQueryParams): Partial { const search = querystring.stringify(queryParams); diff --git a/x-pack/plugins/siem/public/management/pages/index.tsx b/x-pack/plugins/security_solution/public/management/pages/index.tsx similarity index 66% rename from x-pack/plugins/siem/public/management/pages/index.tsx rename to x-pack/plugins/security_solution/public/management/pages/index.tsx index aba482db86519..588b267763234 100644 --- a/x-pack/plugins/siem/public/management/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/index.tsx @@ -6,34 +6,27 @@ import React, { memo } from 'react'; import { Redirect, Route, Switch } from 'react-router-dom'; -import { SpyRoute } from '../../common/utils/route/spy_routes'; import { PolicyContainer } from './policy'; import { MANAGEMENT_ROUTING_ENDPOINTS_PATH, MANAGEMENT_ROUTING_POLICIES_PATH, MANAGEMENT_ROUTING_ROOT_PATH, } from '../common/constants'; -import { ManagementPageView } from '../components/management_page_view'; import { NotFoundPage } from '../../app/404'; - -const TmpEndpoints = () => { - return ( - -

{'Endpoints will go here'}

- -
- ); -}; +import { EndpointsContainer } from './endpoint_hosts'; +import { getManagementUrl } from '..'; export const ManagementContainer = memo(() => { return ( - + } + render={() => ( + + )} /> diff --git a/x-pack/plugins/siem/public/management/pages/policy/index.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/index.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/index.tsx diff --git a/x-pack/plugins/siem/public/management/pages/policy/models/policy_details_config.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/models/policy_details_config.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_details/action.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_details/action.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_details/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_details/index.test.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_details/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_details/index.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_details/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_details/middleware.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_details/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_details/reducer.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_details/selectors.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_details/selectors.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/action.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/action.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/action.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/action.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/index.test.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/index.test.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/index.test.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/index.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/index.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/index.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/middleware.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/middleware.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/middleware.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/mock_policy_result_list.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/mock_policy_result_list.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/mock_policy_result_list.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/mock_policy_result_list.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/reducer.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/reducer.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/selectors.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/selectors.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/selectors.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/services/ingest.test.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/services/ingest.test.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/services/ingest.test.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/services/ingest.test.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/services/ingest.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/services/ingest.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/services/ingest.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/services/ingest.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/store/policy_list/test_mock_utils.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/test_mock_utils.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/store/policy_list/test_mock_utils.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/test_mock_utils.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/types.ts b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/types.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/types.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/agents_summary.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/agents_summary.tsx similarity index 71% rename from x-pack/plugins/siem/public/management/pages/policy/view/agents_summary.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/agents_summary.tsx index c1ba47c81564f..fca3408b79c54 100644 --- a/x-pack/plugins/siem/public/management/pages/policy/view/agents_summary.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/agents_summary.tsx @@ -31,30 +31,42 @@ export const AgentsSummary = memo((props) => { return [ { key: 'total', - title: i18n.translate('xpack.siem.endpoint.policyDetails.agentsSummary.totalTitle', { - defaultMessage: 'Hosts', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetails.agentsSummary.totalTitle', + { + defaultMessage: 'Hosts', + } + ), health: '', }, { key: 'online', - title: i18n.translate('xpack.siem.endpoint.policyDetails.agentsSummary.onlineTitle', { - defaultMessage: 'Online', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetails.agentsSummary.onlineTitle', + { + defaultMessage: 'Online', + } + ), health: 'success', }, { key: 'offline', - title: i18n.translate('xpack.siem.endpoint.policyDetails.agentsSummary.offlineTitle', { - defaultMessage: 'Offline', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetails.agentsSummary.offlineTitle', + { + defaultMessage: 'Offline', + } + ), health: 'warning', }, { key: 'error', - title: i18n.translate('xpack.siem.endpoint.policyDetails.agentsSummary.errorTitle', { - defaultMessage: 'Error', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetails.agentsSummary.errorTitle', + { + defaultMessage: 'Error', + } + ), health: 'danger', }, ]; diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/index.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/view/index.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/view/index.ts diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/ingest_manager_integration/configure_datasource.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/configure_datasource.tsx similarity index 92% rename from x-pack/plugins/siem/public/management/pages/policy/view/ingest_manager_integration/configure_datasource.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/configure_datasource.tsx index bbdeb21254536..ebcb46c3fb5b7 100644 --- a/x-pack/plugins/siem/public/management/pages/policy/view/ingest_manager_integration/configure_datasource.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/configure_datasource.tsx @@ -51,13 +51,13 @@ export const ConfigureEndpointDatasource = memo ) : ( )} diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/policy_details.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/view/policy_details.test.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/policy_details.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx similarity index 84% rename from x-pack/plugins/siem/public/management/pages/policy/view/policy_details.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx index bddbd378f9427..f4c4b36ce153f 100644 --- a/x-pack/plugins/siem/public/management/pages/policy/view/policy_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx @@ -61,12 +61,15 @@ export const PolicyDetails = React.memo(() => { if (policyUpdateStatus.success) { notifications.toasts.success({ toastLifeTimeMs: 10000, - title: i18n.translate('xpack.siem.endpoint.policy.details.updateSuccessTitle', { - defaultMessage: 'Success!', - }), + title: i18n.translate( + 'xpack.securitySolution.endpoint.policy.details.updateSuccessTitle', + { + defaultMessage: 'Success!', + } + ), body: ( @@ -75,7 +78,7 @@ export const PolicyDetails = React.memo(() => { } else { notifications.toasts.danger({ toastLifeTimeMs: 10000, - title: i18n.translate('xpack.siem.endpoint.policy.details.updateErrorTitle', { + title: i18n.translate('xpack.securitySolution.endpoint.policy.details.updateErrorTitle', { defaultMessage: 'Failed!', }), body: <>{policyUpdateStatus.error!.message}, @@ -131,7 +134,7 @@ export const PolicyDetails = React.memo(() => { href={getManagementUrl({ name: 'policyList' })} >
@@ -158,7 +161,7 @@ export const PolicyDetails = React.memo(() => { data-test-subj="policyDetailsCancelButton" > @@ -171,7 +174,10 @@ export const PolicyDetails = React.memo(() => { onClick={handleSaveOnClick} isLoading={isPolicyLoading} > - +
@@ -195,7 +201,7 @@ export const PolicyDetails = React.memo(() => {

@@ -206,7 +212,7 @@ export const PolicyDetails = React.memo(() => {

@@ -234,19 +240,22 @@ const ConfirmUpdate = React.memo<{ @@ -275,7 +284,7 @@ const ConfirmUpdate = React.memo<{ )}

diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/config_form.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/config_form.tsx similarity index 92% rename from x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/config_form.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/config_form.tsx index a888aa6b4cd6e..763931bc2d3d7 100644 --- a/x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/config_form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/config_form.tsx @@ -52,7 +52,10 @@ export const ConfigForm: React.FC<{
- +
@@ -65,7 +68,7 @@ export const ConfigForm: React.FC<{
diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/checkbox.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/checkbox.tsx similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/checkbox.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/checkbox.tsx diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/index.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/index.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/index.tsx diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/linux.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx similarity index 70% rename from x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/linux.tsx rename to x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx index a4f5bb83b6ef3..d0ddd5cb6fe2f 100644 --- a/x-pack/plugins/siem/public/management/pages/policy/view/policy_forms/events/linux.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx @@ -27,23 +27,32 @@ export const LinuxEvents = React.memo(() => { protectionField: keyof UIPolicyConfig['linux']['events']; }> = [ { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.linux.events.file', { - defaultMessage: 'File', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.linux.events.file', + { + defaultMessage: 'File', + } + ), os: OS.linux, protectionField: 'file', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.linux.events.process', { - defaultMessage: 'Process', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.linux.events.process', + { + defaultMessage: 'Process', + } + ), os: OS.linux, protectionField: 'process', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.linux.events.network', { - defaultMessage: 'Network', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.linux.events.network', + { + defaultMessage: 'Network', + } + ), os: OS.linux, protectionField: 'network', }, @@ -53,7 +62,7 @@ export const LinuxEvents = React.memo(() => {
@@ -79,7 +88,7 @@ export const LinuxEvents = React.memo(() => { return ( @@ -89,13 +98,16 @@ export const LinuxEvents = React.memo(() => { return ( { protectionField: keyof UIPolicyConfig['mac']['events']; }> = [ { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.mac.events.file', { - defaultMessage: 'File', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.mac.events.file', + { + defaultMessage: 'File', + } + ), os: OS.mac, protectionField: 'file', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.mac.events.process', { - defaultMessage: 'Process', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.mac.events.process', + { + defaultMessage: 'Process', + } + ), os: OS.mac, protectionField: 'process', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.mac.events.network', { - defaultMessage: 'Network', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.mac.events.network', + { + defaultMessage: 'Network', + } + ), os: OS.mac, protectionField: 'network', }, @@ -53,7 +62,7 @@ export const MacEvents = React.memo(() => {
@@ -79,7 +88,7 @@ export const MacEvents = React.memo(() => { return ( @@ -89,13 +98,16 @@ export const MacEvents = React.memo(() => { return ( { }>> = [ { name: i18n.translate( - 'xpack.siem.endpoint.policyDetailsConfig.windows.events.dllDriverLoad', + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.dllDriverLoad', { defaultMessage: 'DLL and Driver Load', } @@ -37,44 +37,62 @@ export const WindowsEvents = React.memo(() => { protectionField: 'dll_and_driver_load', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.windows.events.dns', { - defaultMessage: 'DNS', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.dns', + { + defaultMessage: 'DNS', + } + ), os: OS.windows, protectionField: 'dns', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.windows.events.file', { - defaultMessage: 'File', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.file', + { + defaultMessage: 'File', + } + ), os: OS.windows, protectionField: 'file', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.windows.events.network', { - defaultMessage: 'Network', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.network', + { + defaultMessage: 'Network', + } + ), os: OS.windows, protectionField: 'network', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.windows.events.process', { - defaultMessage: 'Process', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.process', + { + defaultMessage: 'Process', + } + ), os: OS.windows, protectionField: 'process', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.windows.events.registry', { - defaultMessage: 'Registry', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.registry', + { + defaultMessage: 'Registry', + } + ), os: OS.windows, protectionField: 'registry', }, { - name: i18n.translate('xpack.siem.endpoint.policyDetailsConfig.windows.events.security', { - defaultMessage: 'Security', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.policyDetailsConfig.windows.events.security', + { + defaultMessage: 'Security', + } + ), os: OS.windows, protectionField: 'security', }, @@ -84,7 +102,7 @@ export const WindowsEvents = React.memo(() => {
@@ -110,7 +128,7 @@ export const WindowsEvents = React.memo(() => { return ( @@ -120,13 +138,13 @@ export const WindowsEvents = React.memo(() => { return ( { return [ { id: ProtectionModes.detect, - label: i18n.translate('xpack.siem.endpoint.policy.details.detect', { + label: i18n.translate('xpack.securitySolution.endpoint.policy.details.detect', { defaultMessage: 'Detect', }), protection: 'malware', }, { id: ProtectionModes.prevent, - label: i18n.translate('xpack.siem.endpoint.policy.details.prevent', { + label: i18n.translate('xpack.securitySolution.endpoint.policy.details.prevent', { defaultMessage: 'Prevent', }), protection: 'malware', }, { id: ProtectionModes.preventNotify, - label: i18n.translate('xpack.siem.endpoint.policy.details.preventAndNotify', { + label: i18n.translate('xpack.securitySolution.endpoint.policy.details.preventAndNotify', { defaultMessage: 'Prevent and notify user', }), protection: 'malware', @@ -133,7 +133,7 @@ export const MalwareProtections = React.memo(() => {
@@ -157,12 +157,15 @@ export const MalwareProtections = React.memo(() => { const protectionSwitch = useMemo(() => { return ( @@ -171,14 +174,14 @@ export const MalwareProtections = React.memo(() => { return ( @@ -147,7 +147,7 @@ export const PolicyList = React.memo(() => { () => [ { field: 'name', - name: i18n.translate('xpack.siem.endpoint.policyList.nameField', { + name: i18n.translate('xpack.securitySolution.endpoint.policyList.nameField', { defaultMessage: 'Policy Name', }), // eslint-disable-next-line react/display-name @@ -166,7 +166,7 @@ export const PolicyList = React.memo(() => { @@ -178,14 +178,14 @@ export const PolicyList = React.memo(() => { }, { field: 'created_by', - name: i18n.translate('xpack.siem.endpoint.policyList.createdBy', { + name: i18n.translate('xpack.securitySolution.endpoint.policyList.createdBy', { defaultMessage: 'Created By', }), truncateText: true, }, { field: 'created_at', - name: i18n.translate('xpack.siem.endpoint.policyList.createdAt', { + name: i18n.translate('xpack.securitySolution.endpoint.policyList.createdAt', { defaultMessage: 'Created Date', }), render(createdAt: string) { @@ -194,14 +194,14 @@ export const PolicyList = React.memo(() => { }, { field: 'updated_by', - name: i18n.translate('xpack.siem.endpoint.policyList.updatedBy', { + name: i18n.translate('xpack.securitySolution.endpoint.policyList.updatedBy', { defaultMessage: 'Last Updated By', }), truncateText: true, }, { field: 'updated_at', - name: i18n.translate('xpack.siem.endpoint.policyList.updatedAt', { + name: i18n.translate('xpack.securitySolution.endpoint.policyList.updatedAt', { defaultMessage: 'Last Updated', }), render(updatedAt: string) { @@ -210,11 +210,11 @@ export const PolicyList = React.memo(() => { }, { field: 'package', - name: i18n.translate('xpack.siem.endpoint.policyList.versionFieldLabel', { + name: i18n.translate('xpack.securitySolution.endpoint.policyList.versionFieldLabel', { defaultMessage: 'Version', }), render(pkg: Immutable) { - return i18n.translate('xpack.siem.endpoint.policyList.versionField', { + return i18n.translate('xpack.securitySolution.endpoint.policyList.versionField', { defaultMessage: '{title} v{version}', values: { title: pkg.title, @@ -243,7 +243,7 @@ export const PolicyList = React.memo(() => { }`} > @@ -263,13 +263,13 @@ export const PolicyList = React.memo(() => { diff --git a/x-pack/plugins/siem/public/management/pages/policy/view/vertical_divider.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/vertical_divider.ts similarity index 100% rename from x-pack/plugins/siem/public/management/pages/policy/view/vertical_divider.ts rename to x-pack/plugins/security_solution/public/management/pages/policy/view/vertical_divider.ts diff --git a/x-pack/plugins/siem/public/management/routes.tsx b/x-pack/plugins/security_solution/public/management/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/management/routes.tsx rename to x-pack/plugins/security_solution/public/management/routes.tsx diff --git a/x-pack/plugins/security_solution/public/management/store/middleware.ts b/x-pack/plugins/security_solution/public/management/store/middleware.ts new file mode 100644 index 0000000000000..9ca170cce8b3d --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/store/middleware.ts @@ -0,0 +1,44 @@ +/* + * 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 { + substateMiddlewareFactory, + SecuritySubPluginMiddlewareFactory, + State, +} from '../../common/store'; +import { policyListMiddlewareFactory } from '../pages/policy/store/policy_list'; +import { policyDetailsMiddlewareFactory } from '../pages/policy/store/policy_details'; +import { + MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, + MANAGEMENT_STORE_GLOBAL_NAMESPACE, + MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE, + MANAGEMENT_STORE_POLICY_LIST_NAMESPACE, +} from '../common/constants'; +import { hostMiddlewareFactory } from '../pages/endpoint_hosts/store/middleware'; + +const policyListSelector = (state: State) => + state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_POLICY_LIST_NAMESPACE]; +const policyDetailsSelector = (state: State) => + state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE]; +const endpointsSelector = (state: State) => + state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_ENDPOINTS_NAMESPACE]; + +export const managementMiddlewareFactory: SecuritySubPluginMiddlewareFactory = ( + coreStart, + depsStart +) => { + return [ + substateMiddlewareFactory( + policyListSelector, + policyListMiddlewareFactory(coreStart, depsStart) + ), + substateMiddlewareFactory( + policyDetailsSelector, + policyDetailsMiddlewareFactory(coreStart, depsStart) + ), + substateMiddlewareFactory(endpointsSelector, hostMiddlewareFactory(coreStart, depsStart)), + ]; +}; diff --git a/x-pack/plugins/siem/public/management/store/reducer.ts b/x-pack/plugins/security_solution/public/management/store/reducer.ts similarity index 70% rename from x-pack/plugins/siem/public/management/store/reducer.ts rename to x-pack/plugins/security_solution/public/management/store/reducer.ts index 64b2ab5c05f96..e00b3ec9e0f5b 100644 --- a/x-pack/plugins/siem/public/management/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/store/reducer.ts @@ -14,18 +14,24 @@ import { initialPolicyListState, } from '../pages/policy/store/policy_list/reducer'; import { + MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE, MANAGEMENT_STORE_POLICY_LIST_NAMESPACE, } from '../common/constants'; import { ImmutableCombineReducers } from '../../common/store'; import { Immutable } from '../../../common/endpoint/types'; import { ManagementState } from '../types'; +import { hostListReducer, initialHostListState } from '../pages/endpoint_hosts/store/reducer'; const immutableCombineReducers: ImmutableCombineReducers = combineReducers; +/** + * Returns the initial state of the store for the SIEM Management section + */ export const mockManagementState: Immutable = { - policyList: initialPolicyListState(), - policyDetails: initialPolicyDetailsState(), + [MANAGEMENT_STORE_POLICY_LIST_NAMESPACE]: initialPolicyListState(), + [MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE]: initialPolicyDetailsState(), + [MANAGEMENT_STORE_ENDPOINTS_NAMESPACE]: initialHostListState, }; /** @@ -34,4 +40,6 @@ export const mockManagementState: Immutable = { export const managementReducer = immutableCombineReducers({ [MANAGEMENT_STORE_POLICY_LIST_NAMESPACE]: policyListReducer, [MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE]: policyDetailsReducer, + // @ts-ignore + [MANAGEMENT_STORE_ENDPOINTS_NAMESPACE]: hostListReducer, }); diff --git a/x-pack/plugins/siem/public/management/types.ts b/x-pack/plugins/security_solution/public/management/types.ts similarity index 94% rename from x-pack/plugins/siem/public/management/types.ts rename to x-pack/plugins/security_solution/public/management/types.ts index eeeafb4cbe150..fd6b9f6e6a824 100644 --- a/x-pack/plugins/siem/public/management/types.ts +++ b/x-pack/plugins/security_solution/public/management/types.ts @@ -7,6 +7,7 @@ import { CombinedState } from 'redux'; import { SiemPageName } from '../app/types'; import { PolicyListState, PolicyDetailsState } from './pages/policy/types'; +import { HostState } from './pages/endpoint_hosts/types'; /** * The type for the management store global namespace. Used mostly internally to reference @@ -17,6 +18,7 @@ export type ManagementStoreGlobalNamespace = 'management'; export type ManagementState = CombinedState<{ policyList: PolicyListState; policyDetails: PolicyDetailsState; + endpoints: HostState; }>; /** diff --git a/x-pack/plugins/siem/public/network/components/arrows/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/arrows/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/arrows/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/arrows/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/arrows/helpers.test.ts b/x-pack/plugins/security_solution/public/network/components/arrows/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/arrows/helpers.test.ts rename to x-pack/plugins/security_solution/public/network/components/arrows/helpers.test.ts diff --git a/x-pack/plugins/siem/public/network/components/arrows/helpers.ts b/x-pack/plugins/security_solution/public/network/components/arrows/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/arrows/helpers.ts rename to x-pack/plugins/security_solution/public/network/components/arrows/helpers.ts diff --git a/x-pack/plugins/siem/public/network/components/arrows/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/arrows/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/arrows/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/arrows/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/arrows/index.tsx b/x-pack/plugins/security_solution/public/network/components/arrows/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/arrows/index.tsx rename to x-pack/plugins/security_solution/public/network/components/arrows/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/direction/direction.test.tsx b/x-pack/plugins/security_solution/public/network/components/direction/direction.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/direction/direction.test.tsx rename to x-pack/plugins/security_solution/public/network/components/direction/direction.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/direction/index.tsx b/x-pack/plugins/security_solution/public/network/components/direction/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/direction/index.tsx rename to x-pack/plugins/security_solution/public/network/components/direction/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/__mocks__/mock.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/__mocks__/mock.ts rename to x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts diff --git a/x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap similarity index 87% rename from x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap index 2f063bfbea288..30f7df940fa99 100644 --- a/x-pack/plugins/siem/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap @@ -17,7 +17,7 @@ exports[`IndexPatternsMissingPrompt renders correctly against snapshot 1`] = `

- siem:defaultIndex + securitySolution:defaultIndex , "example": ./packetbeat setup @@ -47,7 +47,7 @@ exports[`IndexPatternsMissingPrompt renders correctly against snapshot 1`] = `

diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embeddable.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embeddable.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embeddable.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embeddable.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embeddable_header.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embeddable_header.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embeddable_header.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embeddable_header.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embeddable_header.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embeddable_header.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embeddable_header.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embeddable_header.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embedded_map.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embedded_map.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embedded_map.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx similarity index 87% rename from x-pack/plugins/siem/public/network/components/embeddables/embedded_map.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx index 2e9e13839d769..5e0aa76e1d139 100644 --- a/x-pack/plugins/siem/public/network/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx @@ -9,10 +9,7 @@ import React, { useEffect, useState } from 'react'; import { createPortalNode, InPortal } from 'react-reverse-portal'; import styled, { css } from 'styled-components'; -import { - EmbeddablePanel, - ErrorEmbeddable, -} from '../../../../../../../src/plugins/embeddable/public'; +import { ErrorEmbeddable } from '../../../../../../../src/plugins/embeddable/public'; import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { getIndexPatternTitleIdMapping } from '../../../common/hooks/api/helpers'; import { useIndexPatterns } from '../../../common/hooks/use_index_patterns'; @@ -28,7 +25,6 @@ import { SetQuery } from './types'; import { MapEmbeddable } from '../../../../../../legacy/plugins/maps/public'; import { Query, Filter } from '../../../../../../../src/plugins/data/public'; import { useKibana, useUiSetting$ } from '../../../common/lib/kibana'; -import { getSavedObjectFinder } from '../../../../../../../src/plugins/saved_objects/public'; interface EmbeddableMapProps { maintainRatio?: boolean; @@ -109,7 +105,7 @@ export const EmbeddedMapComponent = ({ useEffect(() => { let isSubscribed = true; async function setupEmbeddable() { - // Ensure at least one `siem:defaultIndex` kibana index pattern exists before creating embeddable + // Ensure at least one `securitySolution:defaultIndex` kibana index pattern exists before creating embeddable const matchingIndexPatterns = findMatchingIndexPatterns({ kibanaIndexPatterns, siemDefaultIndices, @@ -198,18 +194,7 @@ export const EmbeddedMapComponent = ({ {embeddable != null ? ( - + ) : !isLoading && isIndexError ? ( ) : ( diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embedded_map_helpers.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embedded_map_helpers.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/embedded_map_helpers.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/embedded_map_helpers.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/index_patterns_missing_prompt.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.tsx similarity index 90% rename from x-pack/plugins/siem/public/network/components/embeddables/index_patterns_missing_prompt.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.tsx index f972acc142d25..62ffad515f424 100644 --- a/x-pack/plugins/siem/public/network/components/embeddables/index_patterns_missing_prompt.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.tsx @@ -25,7 +25,7 @@ export const IndexPatternsMissingPromptComponent = () => {

{ rel="noopener noreferrer" target="_blank" > - {'siem:defaultIndex'} + {'securitySolution:defaultIndex'} ), beats: ( @@ -54,7 +54,7 @@ export const IndexPatternsMissingPromptComponent = () => {

diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_config.test.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.test.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_config.test.ts rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_config.test.ts diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_config.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_config.ts rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/tooltip_footer.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/map_tool_tip/tooltip_footer.tsx rename to x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.tsx diff --git a/x-pack/plugins/siem/public/network/components/embeddables/translations.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/translations.ts similarity index 56% rename from x-pack/plugins/siem/public/network/components/embeddables/translations.ts rename to x-pack/plugins/security_solution/public/network/components/embeddables/translations.ts index 1e99a7219d427..88a0227e34278 100644 --- a/x-pack/plugins/siem/public/network/components/embeddables/translations.ts +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/translations.ts @@ -7,210 +7,210 @@ import { i18n } from '@kbn/i18n'; export const EMBEDDABLE_HEADER_TITLE = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.embeddableHeaderTitle', + 'xpack.securitySolution.components.embeddables.embeddedMap.embeddableHeaderTitle', { defaultMessage: 'Network map', } ); export const EMBEDDABLE_HEADER_HELP = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.embeddableHeaderHelp', + 'xpack.securitySolution.components.embeddables.embeddedMap.embeddableHeaderHelp', { defaultMessage: 'Map configuration help', } ); export const MAP_TITLE = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.embeddablePanelTitle', + 'xpack.securitySolution.components.embeddables.embeddedMap.embeddablePanelTitle', { defaultMessage: 'Source -> Destination Point-to-Point Map', } ); export const SOURCE_LAYER = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.sourceLayerLabel', + 'xpack.securitySolution.components.embeddables.embeddedMap.sourceLayerLabel', { defaultMessage: 'Source Point', } ); export const DESTINATION_LAYER = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.destinationLayerLabel', + 'xpack.securitySolution.components.embeddables.embeddedMap.destinationLayerLabel', { defaultMessage: 'Destination Point', } ); export const CLIENT_LAYER = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.clientLayerLabel', + 'xpack.securitySolution.components.embeddables.embeddedMap.clientLayerLabel', { defaultMessage: 'Client Point', } ); export const SERVER_LAYER = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.serverLayerLabel', + 'xpack.securitySolution.components.embeddables.embeddedMap.serverLayerLabel', { defaultMessage: 'Server Point', } ); export const LINE_LAYER = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.lineLayerLabel', + 'xpack.securitySolution.components.embeddables.embeddedMap.lineLayerLabel', { defaultMessage: 'Line', } ); export const ERROR_CONFIGURING_EMBEDDABLES_API = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.errorConfiguringEmbeddableApiTitle', + 'xpack.securitySolution.components.embeddables.embeddedMap.errorConfiguringEmbeddableApiTitle', { defaultMessage: 'Error configuring Embeddables API', } ); export const ERROR_CREATING_EMBEDDABLE = i18n.translate( - 'xpack.siem.components.embeddables.embeddedMap.errorCreatingMapEmbeddableTitle', + 'xpack.securitySolution.components.embeddables.embeddedMap.errorCreatingMapEmbeddableTitle', { defaultMessage: 'Error creating Map Embeddable', } ); export const ERROR_TITLE = i18n.translate( - 'xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorTitle', + 'xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorTitle', { defaultMessage: 'Required index patterns not configured', } ); export const ERROR_BUTTON = i18n.translate( - 'xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel', + 'xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel', { defaultMessage: 'Configure index patterns', } ); export const FILTER_FOR_VALUE = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.filterForValueHoverAction', + 'xpack.securitySolution.components.embeddables.mapToolTip.filterForValueHoverAction', { defaultMessage: 'Filter for value', } ); export const MAP_TOOL_TIP_ERROR = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.errorTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.errorTitle', { defaultMessage: 'Error loading map features', } ); export const MAP_TOOL_TIP_FEATURES_FOOTER = (currentFeature: number, totalFeatures: number) => - i18n.translate('xpack.siem.components.embeddables.mapToolTip.footerLabel', { + i18n.translate('xpack.securitySolution.components.embeddables.mapToolTip.footerLabel', { values: { currentFeature, totalFeatures }, defaultMessage: '{currentFeature} of {totalFeatures} {totalFeatures, plural, =1 {feature} other {features}}', }); export const HOST = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.hostTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.hostTitle', { defaultMessage: 'Host', } ); export const SOURCE_IP = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.sourceIPTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.sourceIPTitle', { defaultMessage: 'Source IP', } ); export const DESTINATION_IP = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.destinationIPTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.destinationIPTitle', { defaultMessage: 'Destination IP', } ); export const CLIENT_IP = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.clientIPTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.clientIPTitle', { defaultMessage: 'Client IP', } ); export const SERVER_IP = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.serverIPTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.serverIPTitle', { defaultMessage: 'Server IP', } ); export const SOURCE_DOMAIN = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.sourceDomainTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.sourceDomainTitle', { defaultMessage: 'Source domain', } ); export const DESTINATION_DOMAIN = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.destinationDomainTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.destinationDomainTitle', { defaultMessage: 'Destination domain', } ); export const CLIENT_DOMAIN = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.clientDomainTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.clientDomainTitle', { defaultMessage: 'Client domain', } ); export const SERVER_DOMAIN = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.serverDomainTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.serverDomainTitle', { defaultMessage: 'Server domain', } ); export const LOCATION = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.locationTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.locationTitle', { defaultMessage: 'Location', } ); export const ASN = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.pointContent.asnTitle', + 'xpack.securitySolution.components.embeddables.mapToolTip.pointContent.asnTitle', { defaultMessage: 'ASN', } ); export const SOURCE = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.lineContent.sourceLabel', + 'xpack.securitySolution.components.embeddables.mapToolTip.lineContent.sourceLabel', { defaultMessage: 'Source', } ); export const DESTINATION = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.lineContent.destinationLabel', + 'xpack.securitySolution.components.embeddables.mapToolTip.lineContent.destinationLabel', { defaultMessage: 'Destination', } ); export const CLIENT = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.lineContent.clientLabel', + 'xpack.securitySolution.components.embeddables.mapToolTip.lineContent.clientLabel', { defaultMessage: 'Client', } ); export const SERVER = i18n.translate( - 'xpack.siem.components.embeddables.mapToolTip.lineContent.serverLabel', + 'xpack.securitySolution.components.embeddables.mapToolTip.lineContent.serverLabel', { defaultMessage: 'Server', } diff --git a/x-pack/plugins/siem/public/network/components/embeddables/types.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/types.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/embeddables/types.ts rename to x-pack/plugins/security_solution/public/network/components/embeddables/types.ts diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/flow_direction_select.test.tsx b/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_controls/flow_direction_select.test.tsx rename to x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/flow_direction_select.tsx b/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_controls/flow_direction_select.tsx rename to x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.tsx diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/flow_target_select.test.tsx b/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_controls/flow_target_select.test.tsx rename to x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/flow_target_select.tsx b/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_controls/flow_target_select.tsx rename to x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx diff --git a/x-pack/plugins/siem/public/network/components/flow_controls/translations.ts b/x-pack/plugins/security_solution/public/network/components/flow_controls/translations.ts similarity index 57% rename from x-pack/plugins/siem/public/network/components/flow_controls/translations.ts rename to x-pack/plugins/security_solution/public/network/components/flow_controls/translations.ts index 11b87dcfbba18..ad85a96b32168 100644 --- a/x-pack/plugins/siem/public/network/components/flow_controls/translations.ts +++ b/x-pack/plugins/security_solution/public/network/components/flow_controls/translations.ts @@ -7,42 +7,42 @@ import { i18n } from '@kbn/i18n'; export const SOURCE = i18n.translate( - 'xpack.siem.components.flowControls.selectFlowTarget.sourceDropDownOptionLabel', + 'xpack.securitySolution.components.flowControls.selectFlowTarget.sourceDropDownOptionLabel', { defaultMessage: 'Source', } ); export const DESTINATION = i18n.translate( - 'xpack.siem.components.flowControls.selectFlowTarget.destinationDropDownOptionLabel', + 'xpack.securitySolution.components.flowControls.selectFlowTarget.destinationDropDownOptionLabel', { defaultMessage: 'Destination', } ); export const CLIENT = i18n.translate( - 'xpack.siem.components.flowControls.selectFlowTarget.clientDropDownOptionLabel', + 'xpack.securitySolution.components.flowControls.selectFlowTarget.clientDropDownOptionLabel', { defaultMessage: 'CLIENT', } ); export const SERVER = i18n.translate( - 'xpack.siem.components.flowControls.selectFlowTarget.serverDropDownOptionLabel', + 'xpack.securitySolution.components.flowControls.selectFlowTarget.serverDropDownOptionLabel', { defaultMessage: 'SERVER', } ); export const UNIDIRECTIONAL = i18n.translate( - 'xpack.siem.components.flowControls.selectFlowDirection.unidirectionalButtonLabel', + 'xpack.securitySolution.components.flowControls.selectFlowDirection.unidirectionalButtonLabel', { defaultMessage: 'Unidirectional', } ); export const BIDIRECTIONAL = i18n.translate( - 'xpack.siem.components.flowControls.selectFlowDirection.bidirectionalButtonLabel', + 'xpack.securitySolution.components.flowControls.selectFlowDirection.bidirectionalButtonLabel', { defaultMessage: 'Bidirectional', } diff --git a/x-pack/plugins/siem/public/network/components/flow_target_select_connected/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_target_select_connected/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/flow_target_select_connected/index.tsx b/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/flow_target_select_connected/index.tsx rename to x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/ip/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/ip/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/ip/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/ip/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/ip/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/ip/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/ip/index.tsx b/x-pack/plugins/security_solution/public/network/components/ip/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip/index.tsx rename to x-pack/plugins/security_solution/public/network/components/ip/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/ip_overview/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/ip_overview/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip_overview/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/ip_overview/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/ip_overview/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/ip_overview/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip_overview/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/ip_overview/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/ip_overview/index.tsx b/x-pack/plugins/security_solution/public/network/components/ip_overview/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip_overview/index.tsx rename to x-pack/plugins/security_solution/public/network/components/ip_overview/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/ip_overview/mock.ts b/x-pack/plugins/security_solution/public/network/components/ip_overview/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/ip_overview/mock.ts rename to x-pack/plugins/security_solution/public/network/components/ip_overview/mock.ts diff --git a/x-pack/plugins/security_solution/public/network/components/ip_overview/translations.ts b/x-pack/plugins/security_solution/public/network/components/ip_overview/translations.ts new file mode 100644 index 0000000000000..e8ef6c2d50114 --- /dev/null +++ b/x-pack/plugins/security_solution/public/network/components/ip_overview/translations.ts @@ -0,0 +1,111 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const LOCATION = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.locationTitle', + { + defaultMessage: 'Location', + } +); + +export const AUTONOMOUS_SYSTEM = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.autonomousSystemTitle', + { + defaultMessage: 'Autonomous system', + } +); + +export const MAX_ANOMALY_SCORE_BY_JOB = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.maxAnomalyScoreByJobTitle', + { + defaultMessage: 'Max anomaly score by job', + } +); + +export const FIRST_SEEN = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.firstSeenTitle', + { + defaultMessage: 'First seen', + } +); + +export const LAST_SEEN = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.lastSeenTitle', + { + defaultMessage: 'Last seen', + } +); + +export const HOST_ID = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.hostIdTitle', + { + defaultMessage: 'Host ID', + } +); + +export const HOST_NAME = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.hostNameTitle', + { + defaultMessage: 'Host name', + } +); + +export const WHOIS = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.whoIsTitle', + { + defaultMessage: 'WhoIs', + } +); + +export const VIEW_WHOIS = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.viewWhoisTitle', + { + defaultMessage: 'iana.org', + } +); + +export const REPUTATION = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.ipReputationTitle', + { + defaultMessage: 'Reputation', + } +); + +export const VIEW_VIRUS_TOTAL = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.viewVirusTotalTitle.', + { + defaultMessage: 'virustotal.com', + } +); + +export const VIEW_TALOS_INTELLIGENCE = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.viewTalosIntelligenceTitle', + { + defaultMessage: 'talosIntelligence.com', + } +); + +export const AS_SOURCE = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.asSourceDropDownOptionLabel', + { + defaultMessage: 'As Source', + } +); +export const AS_DESTINATION = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.asDestinationDropDownOptionLabel', + { + defaultMessage: 'As Destination', + } +); + +export const INSPECT_TITLE = i18n.translate( + 'xpack.securitySolution.network.ipDetails.ipOverview.inspectTitle', + { + defaultMessage: 'IP overview', + } +); diff --git a/x-pack/plugins/siem/public/network/components/kpi_network/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/kpi_network/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/kpi_network/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/kpi_network/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/kpi_network/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/kpi_network/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/kpi_network/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/kpi_network/index.tsx rename to x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/kpi_network/mock.ts b/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/kpi_network/mock.ts rename to x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/translations.ts b/x-pack/plugins/security_solution/public/network/components/kpi_network/translations.ts new file mode 100644 index 0000000000000..292077c1578d3 --- /dev/null +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/translations.ts @@ -0,0 +1,67 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const NETWORK_EVENTS = i18n.translate( + 'xpack.securitySolution.kpiNetwork.networkEvents.title', + { + defaultMessage: 'Network events', + } +); + +export const UNIQUE_FLOW_IDS = i18n.translate( + 'xpack.securitySolution.kpiNetwork.uniqueFlowIds.title', + { + defaultMessage: 'Unique flow IDs', + } +); + +export const DNS_QUERIES = i18n.translate('xpack.securitySolution.kpiNetwork.dnsQueries.title', { + defaultMessage: 'DNS queries', +}); + +export const TLS_HANDSHAKES = i18n.translate( + 'xpack.securitySolution.kpiNetwork.tlsHandshakes.title', + { + defaultMessage: 'TLS handshakes', + } +); + +export const UNIQUE_PRIVATE_IPS = i18n.translate( + 'xpack.securitySolution.kpiNetwork.uniquePrivateIps.title', + { + defaultMessage: 'Unique private IPs', + } +); + +export const SOURCE_UNIT_LABEL = i18n.translate( + 'xpack.securitySolution.kpiNetwork.uniquePrivateIps.sourceUnitLabel', + { + defaultMessage: 'source', + } +); + +export const DESTINATION_UNIT_LABEL = i18n.translate( + 'xpack.securitySolution.kpiNetwork.uniquePrivateIps.destinationUnitLabel', + { + defaultMessage: 'destination', + } +); + +export const SOURCE_CHART_LABEL = i18n.translate( + 'xpack.securitySolution.kpiNetwork.uniquePrivateIps.sourceChartLabel', + { + defaultMessage: 'Src.', + } +); + +export const DESTINATION_CHART_LABEL = i18n.translate( + 'xpack.securitySolution.kpiNetwork.uniquePrivateIps.destinationChartLabel', + { + defaultMessage: 'Dest.', + } +); diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/columns.tsx rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/index.tsx rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/is_ptr_included.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/is_ptr_included.test.tsx rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/is_ptr_included.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/is_ptr_included.tsx rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_dns_table/mock.ts rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts diff --git a/x-pack/plugins/siem/public/network/components/network_dns_table/translations.ts b/x-pack/plugins/security_solution/public/network/components/network_dns_table/translations.ts similarity index 50% rename from x-pack/plugins/siem/public/network/components/network_dns_table/translations.ts rename to x-pack/plugins/security_solution/public/network/components/network_dns_table/translations.ts index 86e050e09d6a0..8fcedaee19349 100644 --- a/x-pack/plugins/siem/public/network/components/network_dns_table/translations.ts +++ b/x-pack/plugins/security_solution/public/network/components/network_dns_table/translations.ts @@ -6,60 +6,69 @@ import { i18n } from '@kbn/i18n'; -export const TOP_DNS_DOMAINS = i18n.translate('xpack.siem.networkDnsTable.title', { +export const TOP_DNS_DOMAINS = i18n.translate('xpack.securitySolution.networkDnsTable.title', { defaultMessage: 'Top DNS domains', }); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.networkDnsTable.unit', { + i18n.translate('xpack.securitySolution.networkDnsTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {domain} other {domains}}`, }); -export const TOOLTIP = i18n.translate('xpack.siem.networkDnsTable.helperTooltip', { +export const TOOLTIP = i18n.translate('xpack.securitySolution.networkDnsTable.helperTooltip', { defaultMessage: 'This shows DNS protocol traffic only and can be useful for hunting domains used in DNS data exfiltration.', }); export const REGISTERED_DOMAIN = i18n.translate( - 'xpack.siem.networkDnsTable.column.registeredDomain', + 'xpack.securitySolution.networkDnsTable.column.registeredDomain', { defaultMessage: 'Registered domain', } ); -export const TOTAL_QUERIES = i18n.translate('xpack.siem.networkDnsTable.column.TotalQueriesTitle', { - defaultMessage: 'Total queries', -}); +export const TOTAL_QUERIES = i18n.translate( + 'xpack.securitySolution.networkDnsTable.column.TotalQueriesTitle', + { + defaultMessage: 'Total queries', + } +); export const UNIQUE_DOMAINS = i18n.translate( - 'xpack.siem.networkDnsTable.column.uniqueDomainsTitle', + 'xpack.securitySolution.networkDnsTable.column.uniqueDomainsTitle', { defaultMessage: 'Unique domains', } ); -export const DNS_BYTES_IN = i18n.translate('xpack.siem.networkDnsTable.column.bytesInTitle', { - defaultMessage: 'DNS bytes in', -}); +export const DNS_BYTES_IN = i18n.translate( + 'xpack.securitySolution.networkDnsTable.column.bytesInTitle', + { + defaultMessage: 'DNS bytes in', + } +); -export const DNS_BYTES_OUT = i18n.translate('xpack.siem.networkDnsTable.column.bytesOutTitle', { - defaultMessage: 'DNS bytes out', -}); +export const DNS_BYTES_OUT = i18n.translate( + 'xpack.securitySolution.networkDnsTable.column.bytesOutTitle', + { + defaultMessage: 'DNS bytes out', + } +); export const INCLUDE_PTR_RECORDS = i18n.translate( - 'xpack.siem.networkDnsTable.select.includePtrRecords', + 'xpack.securitySolution.networkDnsTable.select.includePtrRecords', { defaultMessage: 'Include PTR records', } ); -export const ROWS_5 = i18n.translate('xpack.siem.networkDnsTable.rows', { +export const ROWS_5 = i18n.translate('xpack.securitySolution.networkDnsTable.rows', { values: { numRows: 5 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); -export const ROWS_10 = i18n.translate('xpack.siem.networkDnsTable.rows', { +export const ROWS_10 = i18n.translate('xpack.securitySolution.networkDnsTable.rows', { values: { numRows: 10 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); diff --git a/x-pack/plugins/siem/public/network/components/network_http_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/network_http_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_http_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/network_http_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/network_http_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_http_table/columns.tsx rename to x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_http_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_http_table/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_http_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_http_table/index.tsx rename to x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_http_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_http_table/mock.ts rename to x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/translations.ts b/x-pack/plugins/security_solution/public/network/components/network_http_table/translations.ts new file mode 100644 index 0000000000000..5caad5af62db4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/network/components/network_http_table/translations.ts @@ -0,0 +1,63 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const HTTP_REQUESTS = i18n.translate('xpack.securitySolution.networkHttpTable.title', { + defaultMessage: 'HTTP Requests', +}); + +export const UNIT = (totalCount: number) => + i18n.translate('xpack.securitySolution.networkHttpTable.unit', { + values: { totalCount }, + defaultMessage: `{totalCount, plural, =1 {request} other {requests}}`, + }); + +export const METHOD = i18n.translate('xpack.securitySolution.networkHttpTable.column.methodTitle', { + defaultMessage: 'Method', +}); +export const DOMAIN = i18n.translate('xpack.securitySolution.networkHttpTable.column.domainTitle', { + defaultMessage: 'Domain', +}); + +export const PATH = i18n.translate('xpack.securitySolution.networkHttpTable.column.pathTitle', { + defaultMessage: 'Path', +}); + +export const STATUS = i18n.translate('xpack.securitySolution.networkHttpTable.column.statusTitle', { + defaultMessage: 'Status', +}); + +export const LAST_HOST = i18n.translate( + 'xpack.securitySolution.networkHttpTable.column.lastHostTitle', + { + defaultMessage: 'Last host', + } +); + +export const LAST_SOURCE_IP = i18n.translate( + 'xpack.securitySolution.networkHttpTable.column.lastSourceIpTitle', + { + defaultMessage: 'Last source Ip', + } +); + +export const REQUESTS = i18n.translate( + 'xpack.securitySolution.networkHttpTable.column.requestsTitle', + { + defaultMessage: 'Requests', + } +); + +export const ROWS_5 = i18n.translate('xpack.securitySolution.networkHttpTable.rows', { + values: { numRows: 5 }, + defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', +}); + +export const ROWS_10 = i18n.translate('xpack.securitySolution.networkHttpTable.rows', { + values: { numRows: 10 }, + defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', +}); diff --git a/x-pack/plugins/siem/public/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/network_top_countries_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_countries_table/columns.tsx rename to x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_top_countries_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_countries_table/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_top_countries_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_countries_table/index.tsx rename to x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_top_countries_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_countries_table/mock.ts rename to x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/translations.ts b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/translations.ts new file mode 100644 index 0000000000000..b76cb9f9d0cac --- /dev/null +++ b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/translations.ts @@ -0,0 +1,79 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const UNIT = (totalCount: number) => + i18n.translate('xpack.securitySolution.networkTopCountriesTable.heading.unit', { + values: { totalCount }, + defaultMessage: `{totalCount, plural, =1 {Country} other {Countries}}`, + }); + +export const COUNTRY = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.column.countryTitle', + { + defaultMessage: 'Country', + } +); + +export const BYTES_IN = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.column.bytesInTitle', + { + defaultMessage: 'Bytes in', + } +); + +export const BYTES_OUT = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.column.bytesOutTitle', + { + defaultMessage: 'Bytes out', + } +); + +export const FLOWS = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.column.flows', + { + defaultMessage: 'Flows', + } +); + +export const DESTINATION_COUNTRIES = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.heading.destinationCountries', + { + defaultMessage: 'Destination countries', + } +); + +export const SOURCE_COUNTRIES = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.heading.sourceCountries', + { + defaultMessage: 'Source countries', + } +); + +export const DESTINATION_IPS = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.column.destinationIps', + { + defaultMessage: 'Destination IPs', + } +); + +export const SOURCE_IPS = i18n.translate( + 'xpack.securitySolution.networkTopCountriesTable.column.sourceIps', + { + defaultMessage: 'Source IPs', + } +); + +export const ROWS_5 = i18n.translate('xpack.securitySolution.networkTopCountriesTable.rows', { + values: { numRows: 5 }, + defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', +}); + +export const ROWS_10 = i18n.translate('xpack.securitySolution.networkTopCountriesTable.rows', { + values: { numRows: 10 }, + defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', +}); diff --git a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_n_flow_table/columns.tsx rename to x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_n_flow_table/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_n_flow_table/index.tsx rename to x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/network_top_n_flow_table/mock.ts rename to x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/translations.ts b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/translations.ts new file mode 100644 index 0000000000000..69fd056613af1 --- /dev/null +++ b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/translations.ts @@ -0,0 +1,87 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const UNIT = (totalCount: number) => + i18n.translate('xpack.securitySolution.networkTopNFlowTable.unit', { + values: { totalCount }, + defaultMessage: `{totalCount, plural, =1 {IP} other {IPs}}`, + }); + +export const SOURCE_IP = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.sourceIpTitle', + { + defaultMessage: 'Source IPs', + } +); + +export const DESTINATION_IP = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.destinationIpTitle', + { + defaultMessage: 'Destination IPs', + } +); + +export const IP_TITLE = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.IpTitle', + { + defaultMessage: 'IP', + } +); + +export const DOMAIN = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.domainTitle', + { + defaultMessage: 'Domain', + } +); + +export const BYTES_IN = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.bytesInTitle', + { + defaultMessage: 'Bytes in', + } +); + +export const BYTES_OUT = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.bytesOutTitle', + { + defaultMessage: 'Bytes out', + } +); + +export const AUTONOMOUS_SYSTEM = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.column.asTitle', + { + defaultMessage: 'Autonomous system', + } +); + +export const FLOWS = i18n.translate('xpack.securitySolution.networkTopNFlowTable.flows', { + defaultMessage: 'Flows', +}); + +export const DESTINATION_IPS = i18n.translate( + 'xpack.securitySolution.networkTopNFlowTable.destinationIps', + { + defaultMessage: 'Destination IPs', + } +); + +export const SOURCE_IPS = i18n.translate('xpack.securitySolution.networkTopNFlowTable.sourceIps', { + defaultMessage: 'Source IPs', +}); + +export const ROWS_5 = i18n.translate('xpack.securitySolution.networkTopNFlowTable.rows', { + values: { numRows: 5 }, + defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', +}); + +export const ROWS_10 = i18n.translate('xpack.securitySolution.networkTopNFlowTable.rows', { + values: { numRows: 10 }, + defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', +}); diff --git a/x-pack/plugins/siem/public/network/components/port/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/port/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/port/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/port/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/port/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/port/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/port/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/port/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/port/index.tsx b/x-pack/plugins/security_solution/public/network/components/port/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/port/index.tsx rename to x-pack/plugins/security_solution/public/network/components/port/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/source_destination/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/source_destination/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/source_destination/country_flag.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/country_flag.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/country_flag.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/country_flag.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/field_names.ts b/x-pack/plugins/security_solution/public/network/components/source_destination/field_names.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/field_names.ts rename to x-pack/plugins/security_solution/public/network/components/source_destination/field_names.ts diff --git a/x-pack/plugins/siem/public/network/components/source_destination/geo_fields.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/geo_fields.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/index.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/index.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/ip_with_port.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/ip_with_port.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/ip_with_port.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/ip_with_port.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/label.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/label.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/label.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/label.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/network.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/network.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/network.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/network.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/source_destination_arrows.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_arrows.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/source_destination_arrows.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_arrows.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/source_destination_ip.test.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/source_destination_ip.test.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/source_destination_ip.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/source_destination_ip.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/source_destination_with_arrows.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/source_destination_with_arrows.tsx rename to x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx diff --git a/x-pack/plugins/siem/public/network/components/source_destination/translations.ts b/x-pack/plugins/security_solution/public/network/components/source_destination/translations.ts similarity index 75% rename from x-pack/plugins/siem/public/network/components/source_destination/translations.ts rename to x-pack/plugins/security_solution/public/network/components/source_destination/translations.ts index 8b4632014949f..0368ecd611a50 100644 --- a/x-pack/plugins/siem/public/network/components/source_destination/translations.ts +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/translations.ts @@ -6,6 +6,6 @@ import { i18n } from '@kbn/i18n'; -export const PACKETS = i18n.translate('xpack.siem.source.destination.packetsLabel', { +export const PACKETS = i18n.translate('xpack.securitySolution.source.destination.packetsLabel', { defaultMessage: 'pkts', }); diff --git a/x-pack/plugins/siem/public/network/components/source_destination/types.ts b/x-pack/plugins/security_solution/public/network/components/source_destination/types.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/source_destination/types.ts rename to x-pack/plugins/security_solution/public/network/components/source_destination/types.ts diff --git a/x-pack/plugins/siem/public/network/components/tls_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/tls_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/tls_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/tls_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/tls_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/tls_table/columns.tsx rename to x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx diff --git a/x-pack/plugins/siem/public/network/components/tls_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/tls_table/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/tls_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/tls_table/index.tsx rename to x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/tls_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/tls_table/mock.ts rename to x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts diff --git a/x-pack/plugins/siem/public/network/components/tls_table/translations.ts b/x-pack/plugins/security_solution/public/network/components/tls_table/translations.ts similarity index 58% rename from x-pack/plugins/siem/public/network/components/tls_table/translations.ts rename to x-pack/plugins/security_solution/public/network/components/tls_table/translations.ts index ff714204144ec..157bdcb1012e6 100644 --- a/x-pack/plugins/siem/public/network/components/tls_table/translations.ts +++ b/x-pack/plugins/security_solution/public/network/components/tls_table/translations.ts @@ -7,58 +7,61 @@ import { i18n } from '@kbn/i18n'; export const TRANSPORT_LAYER_SECURITY = i18n.translate( - 'xpack.siem.network.ipDetails.tlsTable.transportLayerSecurityTitle', + 'xpack.securitySolution.network.ipDetails.tlsTable.transportLayerSecurityTitle', { defaultMessage: 'Transport Layer Security', } ); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.network.ipDetails.tlsTable.unit', { + i18n.translate('xpack.securitySolution.network.ipDetails.tlsTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {server certificate} other {server certificates}}`, }); // Columns -export const ISSUER = i18n.translate('xpack.siem.network.ipDetails.tlsTable.columns.issuerTitle', { - defaultMessage: 'Issuer', -}); +export const ISSUER = i18n.translate( + 'xpack.securitySolution.network.ipDetails.tlsTable.columns.issuerTitle', + { + defaultMessage: 'Issuer', + } +); export const SUBJECT = i18n.translate( - 'xpack.siem.network.ipDetails.tlsTable.columns.subjectTitle', + 'xpack.securitySolution.network.ipDetails.tlsTable.columns.subjectTitle', { defaultMessage: 'Subject', } ); export const SHA1_FINGERPRINT = i18n.translate( - 'xpack.siem.network.ipDetails.tlsTable.columns.sha1FingerPrintTitle', + 'xpack.securitySolution.network.ipDetails.tlsTable.columns.sha1FingerPrintTitle', { defaultMessage: 'SHA1 fingerprint', } ); export const JA3_FINGERPRINT = i18n.translate( - 'xpack.siem.network.ipDetails.tlsTable.columns.ja3FingerPrintTitle', + 'xpack.securitySolution.network.ipDetails.tlsTable.columns.ja3FingerPrintTitle', { defaultMessage: 'JA3 fingerprint', } ); export const VALID_UNTIL = i18n.translate( - 'xpack.siem.network.ipDetails.tlsTable.columns.validUntilTitle', + 'xpack.securitySolution.network.ipDetails.tlsTable.columns.validUntilTitle', { defaultMessage: 'Valid until', } ); // Row Select -export const ROWS_5 = i18n.translate('xpack.siem.network.ipDetails.tlsTable.rows', { +export const ROWS_5 = i18n.translate('xpack.securitySolution.network.ipDetails.tlsTable.rows', { values: { numRows: 5 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); -export const ROWS_10 = i18n.translate('xpack.siem.network.ipDetails.tlsTable.rows', { +export const ROWS_10 = i18n.translate('xpack.securitySolution.network.ipDetails.tlsTable.rows', { values: { numRows: 10 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); diff --git a/x-pack/plugins/siem/public/network/components/users_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/components/users_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/components/users_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/components/users_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/components/users_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/users_table/columns.tsx rename to x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx diff --git a/x-pack/plugins/siem/public/network/components/users_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/users_table/index.test.tsx rename to x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/components/users_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/components/users_table/index.tsx rename to x-pack/plugins/security_solution/public/network/components/users_table/index.tsx diff --git a/x-pack/plugins/siem/public/network/components/users_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/network/components/users_table/mock.ts rename to x-pack/plugins/security_solution/public/network/components/users_table/mock.ts diff --git a/x-pack/plugins/siem/public/network/components/users_table/translations.ts b/x-pack/plugins/security_solution/public/network/components/users_table/translations.ts similarity index 57% rename from x-pack/plugins/siem/public/network/components/users_table/translations.ts rename to x-pack/plugins/security_solution/public/network/components/users_table/translations.ts index 7fa80a1349ab8..a878a49bbf221 100644 --- a/x-pack/plugins/siem/public/network/components/users_table/translations.ts +++ b/x-pack/plugins/security_solution/public/network/components/users_table/translations.ts @@ -6,59 +6,62 @@ import { i18n } from '@kbn/i18n'; -export const USERS = i18n.translate('xpack.siem.network.ipDetails.usersTable.usersTitle', { - defaultMessage: 'Users', -}); +export const USERS = i18n.translate( + 'xpack.securitySolution.network.ipDetails.usersTable.usersTitle', + { + defaultMessage: 'Users', + } +); export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.network.ipDetails.usersTable.unit', { + i18n.translate('xpack.securitySolution.network.ipDetails.usersTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {user} other {users}}`, }); // Columns export const USER_NAME = i18n.translate( - 'xpack.siem.network.ipDetails.usersTable.columns.userNameTitle', + 'xpack.securitySolution.network.ipDetails.usersTable.columns.userNameTitle', { defaultMessage: 'User', } ); export const USER_ID = i18n.translate( - 'xpack.siem.network.ipDetails.usersTable.columns.userIdTitle', + 'xpack.securitySolution.network.ipDetails.usersTable.columns.userIdTitle', { defaultMessage: 'ID', } ); export const GROUP_NAME = i18n.translate( - 'xpack.siem.network.ipDetails.usersTable.columns.groupNameTitle', + 'xpack.securitySolution.network.ipDetails.usersTable.columns.groupNameTitle', { defaultMessage: 'Group name', } ); export const GROUP_ID = i18n.translate( - 'xpack.siem.network.ipDetails.usersTable.columns.groupIdTitle', + 'xpack.securitySolution.network.ipDetails.usersTable.columns.groupIdTitle', { defaultMessage: 'Group ID', } ); export const DOCUMENT_COUNT = i18n.translate( - 'xpack.siem.network.ipDetails.usersTable.columns.documentCountTitle', + 'xpack.securitySolution.network.ipDetails.usersTable.columns.documentCountTitle', { defaultMessage: 'Document count', } ); // Row Select -export const ROWS_5 = i18n.translate('xpack.siem.network.ipDetails.usersTable.rows', { +export const ROWS_5 = i18n.translate('xpack.securitySolution.network.ipDetails.usersTable.rows', { values: { numRows: 5 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); -export const ROWS_10 = i18n.translate('xpack.siem.network.ipDetails.usersTable.rows', { +export const ROWS_10 = i18n.translate('xpack.securitySolution.network.ipDetails.usersTable.rows', { values: { numRows: 10 }, defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', }); diff --git a/x-pack/plugins/siem/public/network/containers/ip_overview/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/ip_overview/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/ip_overview/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/ip_overview/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/ip_overview/index.tsx b/x-pack/plugins/security_solution/public/network/containers/ip_overview/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/ip_overview/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/ip_overview/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/kpi_network/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/kpi_network/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/kpi_network/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/kpi_network/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/kpi_network/index.tsx b/x-pack/plugins/security_solution/public/network/containers/kpi_network/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/kpi_network/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/kpi_network/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/network_dns/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/network_dns/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_dns/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/network_dns/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/network_dns/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_dns/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/network_http/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/network_http/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_http/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/network_http/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/network_http/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_http/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/network_top_countries/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_top_countries/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/network_top_countries/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_top_countries/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/network_top_n_flow/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_top_n_flow/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/network_top_n_flow/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/network_top_n_flow/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/tls/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/tls/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/tls/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/tls/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/tls/index.tsx b/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/tls/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/tls/index.tsx diff --git a/x-pack/plugins/siem/public/network/containers/users/index.gql_query.ts b/x-pack/plugins/security_solution/public/network/containers/users/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/network/containers/users/index.gql_query.ts rename to x-pack/plugins/security_solution/public/network/containers/users/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/network/containers/users/index.tsx b/x-pack/plugins/security_solution/public/network/containers/users/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/containers/users/index.tsx rename to x-pack/plugins/security_solution/public/network/containers/users/index.tsx diff --git a/x-pack/plugins/siem/public/network/index.ts b/x-pack/plugins/security_solution/public/network/index.ts similarity index 100% rename from x-pack/plugins/siem/public/network/index.ts rename to x-pack/plugins/security_solution/public/network/index.ts diff --git a/x-pack/plugins/siem/public/network/pages/index.tsx b/x-pack/plugins/security_solution/public/network/pages/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/index.tsx rename to x-pack/plugins/security_solution/public/network/pages/index.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/network/pages/ip_details/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/network/pages/ip_details/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/index.test.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/index.test.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/index.test.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/index.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/index.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/index.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/network_http_query_table.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/network_http_query_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/network_http_query_table.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/network_http_query_table.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/network_top_countries_query_table.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/network_top_countries_query_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/network_top_countries_query_table.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/network_top_countries_query_table.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/network_top_n_flow_query_table.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/network_top_n_flow_query_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/network_top_n_flow_query_table.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/network_top_n_flow_query_table.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/tls_query_table.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/tls_query_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/tls_query_table.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/tls_query_table.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/types.ts b/x-pack/plugins/security_solution/public/network/pages/ip_details/types.ts similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/types.ts rename to x-pack/plugins/security_solution/public/network/pages/ip_details/types.ts diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/users_query_table.tsx b/x-pack/plugins/security_solution/public/network/pages/ip_details/users_query_table.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/users_query_table.tsx rename to x-pack/plugins/security_solution/public/network/pages/ip_details/users_query_table.tsx diff --git a/x-pack/plugins/siem/public/network/pages/ip_details/utils.ts b/x-pack/plugins/security_solution/public/network/pages/ip_details/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/network/pages/ip_details/utils.ts rename to x-pack/plugins/security_solution/public/network/pages/ip_details/utils.ts diff --git a/x-pack/plugins/siem/public/network/pages/navigation/alerts_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/alerts_query_tab_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/alerts_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/alerts_query_tab_body.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/conditional_flex_group.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/conditional_flex_group.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/conditional_flex_group.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/conditional_flex_group.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/countries_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/countries_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/dns_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/dns_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/http_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/http_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/index.ts b/x-pack/plugins/security_solution/public/network/pages/navigation/index.ts similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/index.ts rename to x-pack/plugins/security_solution/public/network/pages/navigation/index.ts diff --git a/x-pack/plugins/siem/public/network/pages/navigation/ips_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/ips_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/nav_tabs.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/network_routes.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/network_routes.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/network_routes_loading.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes_loading.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/network_routes_loading.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/network_routes_loading.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/tls_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/tls_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx diff --git a/x-pack/plugins/siem/public/network/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/types.ts rename to x-pack/plugins/security_solution/public/network/pages/navigation/types.ts diff --git a/x-pack/plugins/siem/public/network/pages/navigation/utils.ts b/x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts similarity index 100% rename from x-pack/plugins/siem/public/network/pages/navigation/utils.ts rename to x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts diff --git a/x-pack/plugins/siem/public/network/pages/network.test.tsx b/x-pack/plugins/security_solution/public/network/pages/network.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/network.test.tsx rename to x-pack/plugins/security_solution/public/network/pages/network.test.tsx diff --git a/x-pack/plugins/siem/public/network/pages/network.tsx b/x-pack/plugins/security_solution/public/network/pages/network.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/pages/network.tsx rename to x-pack/plugins/security_solution/public/network/pages/network.tsx diff --git a/x-pack/plugins/siem/public/network/pages/network_empty_page.tsx b/x-pack/plugins/security_solution/public/network/pages/network_empty_page.tsx similarity index 90% rename from x-pack/plugins/siem/public/network/pages/network_empty_page.tsx rename to x-pack/plugins/security_solution/public/network/pages/network_empty_page.tsx index 5fd6832e1990f..dce3f85797f12 100644 --- a/x-pack/plugins/siem/public/network/pages/network_empty_page.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/network_empty_page.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { useKibana } from '../../common/lib/kibana'; import { EmptyPage } from '../../common/components/empty_page'; import * as i18n from '../../common/translations'; +import { ADD_DATA_PATH } from '../../../common/constants'; export const NetworkEmptyPage = React.memo(() => { const { http, docLinks } = useKibana().services; @@ -18,7 +19,7 @@ export const NetworkEmptyPage = React.memo(() => { + i18n.translate('xpack.securitySolution.network.dns.stackByUniqueSubdomain', { + values: { groupByField }, + defaultMessage: 'Top domains by {groupByField}', + }); diff --git a/x-pack/plugins/siem/public/network/pages/types.ts b/x-pack/plugins/security_solution/public/network/pages/types.ts similarity index 100% rename from x-pack/plugins/siem/public/network/pages/types.ts rename to x-pack/plugins/security_solution/public/network/pages/types.ts diff --git a/x-pack/plugins/siem/public/network/routes.tsx b/x-pack/plugins/security_solution/public/network/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/network/routes.tsx rename to x-pack/plugins/security_solution/public/network/routes.tsx diff --git a/x-pack/plugins/siem/public/network/store/actions.ts b/x-pack/plugins/security_solution/public/network/store/actions.ts similarity index 90% rename from x-pack/plugins/siem/public/network/store/actions.ts rename to x-pack/plugins/security_solution/public/network/store/actions.ts index 2a9766f959222..44a0b7ce1ad10 100644 --- a/x-pack/plugins/siem/public/network/store/actions.ts +++ b/x-pack/plugins/security_solution/public/network/store/actions.ts @@ -7,7 +7,7 @@ import actionCreatorFactory from 'typescript-fsa'; import { networkModel } from '.'; -const actionCreator = actionCreatorFactory('x-pack/siem/local/network'); +const actionCreator = actionCreatorFactory('x-pack/security_solution/local/network'); export const updateNetworkTable = actionCreator<{ networkType: networkModel.NetworkType; diff --git a/x-pack/plugins/siem/public/network/store/helpers.test.ts b/x-pack/plugins/security_solution/public/network/store/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/network/store/helpers.test.ts rename to x-pack/plugins/security_solution/public/network/store/helpers.test.ts diff --git a/x-pack/plugins/siem/public/network/store/helpers.ts b/x-pack/plugins/security_solution/public/network/store/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/network/store/helpers.ts rename to x-pack/plugins/security_solution/public/network/store/helpers.ts diff --git a/x-pack/plugins/siem/public/network/store/index.ts b/x-pack/plugins/security_solution/public/network/store/index.ts similarity index 100% rename from x-pack/plugins/siem/public/network/store/index.ts rename to x-pack/plugins/security_solution/public/network/store/index.ts diff --git a/x-pack/plugins/siem/public/network/store/model.ts b/x-pack/plugins/security_solution/public/network/store/model.ts similarity index 100% rename from x-pack/plugins/siem/public/network/store/model.ts rename to x-pack/plugins/security_solution/public/network/store/model.ts diff --git a/x-pack/plugins/siem/public/network/store/reducer.ts b/x-pack/plugins/security_solution/public/network/store/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/network/store/reducer.ts rename to x-pack/plugins/security_solution/public/network/store/reducer.ts diff --git a/x-pack/plugins/siem/public/network/store/selectors.ts b/x-pack/plugins/security_solution/public/network/store/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/network/store/selectors.ts rename to x-pack/plugins/security_solution/public/network/store/selectors.ts diff --git a/x-pack/plugins/siem/public/overview/components/alerts_by_category/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/alerts_by_category/index.test.tsx rename to x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx diff --git a/x-pack/plugins/siem/public/overview/components/alerts_by_category/index.tsx b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/alerts_by_category/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/event_counts/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/event_counts/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/event_counts/index.test.tsx rename to x-pack/plugins/security_solution/public/overview/components/event_counts/index.test.tsx diff --git a/x-pack/plugins/siem/public/overview/components/event_counts/index.tsx b/x-pack/plugins/security_solution/public/overview/components/event_counts/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/event_counts/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/event_counts/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/events_by_dataset/__mocks__/index.tsx b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/__mocks__/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/events_by_dataset/__mocks__/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/events_by_dataset/__mocks__/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/events_by_dataset/index.tsx b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/events_by_dataset/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/host_overview/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/overview/components/host_overview/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/overview/components/host_overview/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/overview/components/host_overview/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/overview/components/host_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/host_overview/index.test.tsx rename to x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx diff --git a/x-pack/plugins/siem/public/overview/components/host_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/host_overview/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/host_overview/mock.ts b/x-pack/plugins/security_solution/public/overview/components/host_overview/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/components/host_overview/mock.ts rename to x-pack/plugins/security_solution/public/overview/components/host_overview/mock.ts diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/translations.ts b/x-pack/plugins/security_solution/public/overview/components/host_overview/translations.ts new file mode 100644 index 0000000000000..f66b6091ebb28 --- /dev/null +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/translations.ts @@ -0,0 +1,98 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const HOST_ID = i18n.translate('xpack.securitySolution.host.details.overview.hostIdTitle', { + defaultMessage: 'Host ID', +}); + +export const FIRST_SEEN = i18n.translate('xpack.securitySolution.host.details.firstSeenTitle', { + defaultMessage: 'First seen', +}); + +export const LAST_SEEN = i18n.translate('xpack.securitySolution.host.details.lastSeenTitle', { + defaultMessage: 'Last seen', +}); + +export const MAX_ANOMALY_SCORE_BY_JOB = i18n.translate( + 'xpack.securitySolution.host.details.overview.maxAnomalyScoreByJobTitle', + { + defaultMessage: 'Max anomaly score by job', + } +); + +export const IP_ADDRESSES = i18n.translate( + 'xpack.securitySolution.host.details.overview.ipAddressesTitle', + { + defaultMessage: 'IP addresses', + } +); + +export const MAC_ADDRESSES = i18n.translate( + 'xpack.securitySolution.host.details.overview.macAddressesTitle', + { + defaultMessage: 'MAC addresses', + } +); + +export const PLATFORM = i18n.translate( + 'xpack.securitySolution.host.details.overview.platformTitle', + { + defaultMessage: 'Platform', + } +); + +export const OS = i18n.translate('xpack.securitySolution.host.details.overview.osTitle', { + defaultMessage: 'Operating system', +}); + +export const FAMILY = i18n.translate('xpack.securitySolution.host.details.overview.familyTitle', { + defaultMessage: 'Family', +}); + +export const VERSION = i18n.translate('xpack.securitySolution.host.details.versionLabel', { + defaultMessage: 'Version', +}); + +export const ARCHITECTURE = i18n.translate( + 'xpack.securitySolution.host.details.architectureLabel', + { + defaultMessage: 'Architecture', + } +); + +export const CLOUD_PROVIDER = i18n.translate( + 'xpack.securitySolution.host.details.overview.cloudProviderTitle', + { + defaultMessage: 'Cloud provider', + } +); + +export const REGION = i18n.translate('xpack.securitySolution.host.details.overview.regionTitle', { + defaultMessage: 'Region', +}); + +export const INSTANCE_ID = i18n.translate( + 'xpack.securitySolution.host.details.overview.instanceIdTitle', + { + defaultMessage: 'Instance ID', + } +); + +export const MACHINE_TYPE = i18n.translate( + 'xpack.securitySolution.host.details.overview.machineTypeTitle', + { + defaultMessage: 'Machine type', + } +); + +export const INSPECT_TITLE = i18n.translate( + 'xpack.securitySolution.host.details.overview.inspectTitle', + { + defaultMessage: 'Host overview', + } +); diff --git a/x-pack/plugins/siem/public/overview/components/loading_placeholders/index.tsx b/x-pack/plugins/security_solution/public/overview/components/loading_placeholders/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/loading_placeholders/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/loading_placeholders/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/overview_empty/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.tsx similarity index 90% rename from x-pack/plugins/siem/public/overview/components/overview_empty/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_empty/index.tsx index a4540e26fc09f..00db437bce11e 100644 --- a/x-pack/plugins/siem/public/overview/components/overview_empty/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import * as i18nCommon from '../../../common/translations'; import { EmptyPage } from '../../../common/components/empty_page'; import { useKibana } from '../../../common/lib/kibana'; +import { ADD_DATA_PATH } from '../../../../common/constants'; const OverviewEmptyComponent: React.FC = () => { const { http, docLinks } = useKibana().services; @@ -18,7 +19,7 @@ const OverviewEmptyComponent: React.FC = () => { = ({ const hostPageButton = useMemo( () => ( - + ), [urlSearch] @@ -85,7 +88,7 @@ const OverviewHostComponent: React.FC = ({ !isEmpty(overviewHost) ? ( = ({ } title={ } diff --git a/x-pack/plugins/siem/public/overview/components/overview_host_stats/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/__snapshots__/index.test.tsx.snap similarity index 91% rename from x-pack/plugins/siem/public/overview/components/overview_host_stats/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/overview/components/overview_host_stats/__snapshots__/index.test.tsx.snap index a10f5ea512dac..8742e3f3a1c0d 100644 --- a/x-pack/plugins/siem/public/overview/components/overview_host_stats/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/__snapshots__/index.test.tsx.snap @@ -20,7 +20,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -57,7 +57,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -89,7 +89,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -121,7 +121,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -153,7 +153,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -185,7 +185,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -217,7 +217,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -253,7 +253,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -290,7 +290,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -322,7 +322,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -354,7 +354,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -386,7 +386,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -418,7 +418,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -450,7 +450,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -482,7 +482,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -518,7 +518,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -555,7 +555,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -591,7 +591,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -628,7 +628,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt @@ -660,7 +660,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt diff --git a/x-pack/plugins/siem/public/overview/components/overview_host_stats/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/overview_host_stats/index.test.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.test.tsx diff --git a/x-pack/plugins/siem/public/overview/components/overview_host_stats/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx similarity index 73% rename from x-pack/plugins/siem/public/overview/components/overview_host_stats/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx index 33fb8af95b6f7..92250ed3c549b 100644 --- a/x-pack/plugins/siem/public/overview/components/overview_host_stats/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx @@ -21,14 +21,19 @@ interface OverviewHostProps { export const getOverviewHostStats = (data: OverviewHostData): FormattedStat[] => [ { count: data.auditbeatAuditd ?? 0, - title: , + title: ( + + ), id: 'auditbeatAuditd', }, { count: data.auditbeatFIM ?? 0, title: ( ), @@ -36,43 +41,66 @@ export const getOverviewHostStats = (data: OverviewHostData): FormattedStat[] => }, { count: data.auditbeatLogin ?? 0, - title: , + title: ( + + ), id: 'auditbeatLogin', }, { count: data.auditbeatPackage ?? 0, title: ( - + ), id: 'auditbeatPackage', }, { count: data.auditbeatProcess ?? 0, title: ( - + ), id: 'auditbeatProcess', }, { count: data.auditbeatUser ?? 0, - title: , + title: ( + + ), id: 'auditbeatUser', }, { count: data.endgameDns ?? 0, - title: , + title: ( + + ), id: 'endgameDns', }, { count: data.endgameFile ?? 0, - title: , + title: ( + + ), id: 'endgameFile', }, { count: data.endgameImageLoad ?? 0, title: ( ), @@ -81,28 +109,40 @@ export const getOverviewHostStats = (data: OverviewHostData): FormattedStat[] => { count: data.endgameNetwork ?? 0, title: ( - + ), id: 'endgameNetwork', }, { count: data.endgameProcess ?? 0, title: ( - + ), id: 'endgameProcess', }, { count: data.endgameRegistry ?? 0, title: ( - + ), id: 'endgameRegistry', }, { count: data.endgameSecurity ?? 0, title: ( - + ), id: 'endgameSecurity', }, @@ -110,7 +150,7 @@ export const getOverviewHostStats = (data: OverviewHostData): FormattedStat[] => count: data.filebeatSystemModule ?? 0, title: ( ), @@ -120,7 +160,7 @@ export const getOverviewHostStats = (data: OverviewHostData): FormattedStat[] => count: data.winlogbeatSecurity ?? 0, title: ( ), @@ -130,7 +170,7 @@ export const getOverviewHostStats = (data: OverviewHostData): FormattedStat[] => count: data.winlogbeatMWSysmonOperational ?? 0, title: ( ), @@ -149,7 +189,7 @@ const hostStatGroups: StatGroup[] = [ groupId: 'auditbeat', name: ( ), @@ -166,7 +206,7 @@ const hostStatGroups: StatGroup[] = [ groupId: 'endgame', name: ( ), @@ -183,7 +223,10 @@ const hostStatGroups: StatGroup[] = [ { groupId: 'filebeat', name: ( - + ), statIds: ['filebeatSystemModule'], }, @@ -191,7 +234,7 @@ const hostStatGroups: StatGroup[] = [ groupId: 'winlogbeat', name: ( ), diff --git a/x-pack/plugins/siem/public/overview/components/overview_host_stats/mock.ts b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/components/overview_host_stats/mock.ts rename to x-pack/plugins/security_solution/public/overview/components/overview_host_stats/mock.ts diff --git a/x-pack/plugins/siem/public/overview/components/overview_network/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/overview_network/index.test.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx diff --git a/x-pack/plugins/siem/public/overview/components/overview_network/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx similarity index 93% rename from x-pack/plugins/siem/public/overview/components/overview_network/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx index cd70831fddfba..94a3c13e39947 100644 --- a/x-pack/plugins/siem/public/overview/components/overview_network/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx @@ -56,7 +56,10 @@ const OverviewNetworkComponent: React.FC = ({ const networkPageButton = useMemo( () => ( - + ), [urlSearch] @@ -89,7 +92,7 @@ const OverviewNetworkComponent: React.FC = ({ !isEmpty(overviewNetwork) ? ( = ({ } title={ } diff --git a/x-pack/plugins/siem/public/overview/components/overview_network_stats/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/__snapshots__/index.test.tsx.snap similarity index 91% rename from x-pack/plugins/siem/public/overview/components/overview_network_stats/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/overview/components/overview_network_stats/__snapshots__/index.test.tsx.snap index 55db73a9bf7f2..4bc02aa54a455 100644 --- a/x-pack/plugins/siem/public/overview/components/overview_network_stats/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/__snapshots__/index.test.tsx.snap @@ -20,7 +20,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -57,7 +57,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -93,7 +93,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -130,7 +130,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -162,7 +162,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -194,7 +194,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -226,7 +226,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -258,7 +258,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -294,7 +294,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -331,7 +331,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -363,7 +363,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet @@ -395,7 +395,7 @@ exports[`Overview Network Stat Data rendering it renders the default OverviewNet diff --git a/x-pack/plugins/siem/public/overview/components/overview_network_stats/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/overview_network_stats/index.test.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.test.tsx diff --git a/x-pack/plugins/siem/public/overview/components/overview_network_stats/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx similarity index 78% rename from x-pack/plugins/siem/public/overview/components/overview_network_stats/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx index 1aeccbc8d0ab3..d3e16af7115ac 100644 --- a/x-pack/plugins/siem/public/overview/components/overview_network_stats/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx @@ -22,19 +22,30 @@ export const getOverviewNetworkStats = (data: OverviewNetworkData): FormattedSta { count: data.auditbeatSocket ?? 0, title: ( - + ), id: 'auditbeatSocket', }, { count: data.filebeatCisco ?? 0, - title: , + title: ( + + ), id: 'filebeatCisco', }, { count: data.filebeatNetflow ?? 0, title: ( - + ), id: 'filebeatNetflow', }, @@ -42,7 +53,7 @@ export const getOverviewNetworkStats = (data: OverviewNetworkData): FormattedSta count: data.filebeatPanw ?? 0, title: ( ), @@ -51,28 +62,51 @@ export const getOverviewNetworkStats = (data: OverviewNetworkData): FormattedSta { count: data.filebeatSuricata ?? 0, title: ( - + ), id: 'filebeatSuricata', }, { count: data.filebeatZeek ?? 0, - title: , + title: ( + + ), id: 'filebeatZeek', }, { count: data.packetbeatDNS ?? 0, - title: , + title: ( + + ), id: 'packetbeatDNS', }, { count: data.packetbeatFlow ?? 0, - title: , + title: ( + + ), id: 'packetbeatFlow', }, { count: data.packetbeatTLS ?? 0, - title: , + title: ( + + ), id: 'packetbeatTLS', }, ]; @@ -82,7 +116,7 @@ const networkStatGroups: StatGroup[] = [ groupId: 'auditbeat', name: ( ), @@ -92,7 +126,7 @@ const networkStatGroups: StatGroup[] = [ groupId: 'filebeat', name: ( ), @@ -108,7 +142,7 @@ const networkStatGroups: StatGroup[] = [ groupId: 'packetbeat', name: ( ), diff --git a/x-pack/plugins/siem/public/overview/components/overview_network_stats/mock.ts b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/mock.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/components/overview_network_stats/mock.ts rename to x-pack/plugins/security_solution/public/overview/components/overview_network_stats/mock.ts diff --git a/x-pack/plugins/siem/public/overview/components/recent_cases/filters/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_cases/filters/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_cases/filters/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_cases/filters/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_cases/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_cases/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_cases/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_cases/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_cases/no_cases/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_cases/no_cases/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_cases/no_cases/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_cases/no_cases/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_cases/recent_cases.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_cases/recent_cases.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_cases/recent_cases.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_cases/recent_cases.tsx diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts b/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts new file mode 100644 index 0000000000000..f9b3e05ad9595 --- /dev/null +++ b/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts @@ -0,0 +1,43 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const COMMENTS = i18n.translate('xpack.securitySolution.recentCases.commentsTooltip', { + defaultMessage: 'Comments', +}); + +export const MY_RECENTLY_REPORTED_CASES = i18n.translate( + 'xpack.securitySolution.overview.myRecentlyReportedCasesButtonLabel', + { + defaultMessage: 'My recently reported cases', + } +); + +export const NO_CASES = i18n.translate('xpack.securitySolution.recentCases.noCasesMessage', { + defaultMessage: 'No cases have been created yet. Put your detective hat on and', +}); + +export const RECENTLY_CREATED_CASES = i18n.translate( + 'xpack.securitySolution.overview.recentlyCreatedCasesButtonLabel', + { + defaultMessage: 'Recently created cases', + } +); + +export const START_A_NEW_CASE = i18n.translate( + 'xpack.securitySolution.recentCases.startNewCaseLink', + { + defaultMessage: 'start a new case', + } +); + +export const VIEW_ALL_CASES = i18n.translate( + 'xpack.securitySolution.recentCases.viewAllCasesLink', + { + defaultMessage: 'View all cases', + } +); diff --git a/x-pack/plugins/siem/public/overview/components/recent_cases/types.ts b/x-pack/plugins/security_solution/public/overview/components/recent_cases/types.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_cases/types.ts rename to x-pack/plugins/security_solution/public/overview/components/recent_cases/types.ts diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/counts/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/counts/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_timelines/counts/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_timelines/counts/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/filters/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_timelines/filters/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/header/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/header/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_timelines/header/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_timelines/header/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_timelines/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/recent_timelines.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/recent_timelines.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_timelines/recent_timelines.tsx rename to x-pack/plugins/security_solution/public/overview/components/recent_timelines/recent_timelines.tsx diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts new file mode 100644 index 0000000000000..3b97800ce3b43 --- /dev/null +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts @@ -0,0 +1,76 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ERROR_RETRIEVING_USER_DETAILS = i18n.translate( + 'xpack.securitySolution.recentTimelines.errorRetrievingUserDetailsMessage', + { + defaultMessage: 'Recent Timelines: An error occurred while retrieving user details', + } +); + +export const FAVORITES = i18n.translate( + 'xpack.securitySolution.recentTimelines.favoritesButtonLabel', + { + defaultMessage: 'Favorites', + } +); + +export const NO_FAVORITE_TIMELINES = i18n.translate( + 'xpack.securitySolution.recentTimelines.noFavoriteTimelinesMessage', + { + defaultMessage: + "You haven't favorited any timelines yet. Get out there and start threat hunting!", + } +); + +export const LAST_UPDATED = i18n.translate( + 'xpack.securitySolution.recentTimelines.lastUpdatedButtonLabel', + { + defaultMessage: 'Last updated', + } +); + +export const NO_TIMELINES = i18n.translate( + 'xpack.securitySolution.recentTimelines.noTimelinesMessage', + { + defaultMessage: + "You haven't created any timelines yet. Get out there and start threat hunting!", + } +); + +export const NOTES = i18n.translate('xpack.securitySolution.recentTimelines.notesTooltip', { + defaultMessage: 'Notes', +}); + +export const OPEN_AS_DUPLICATE = i18n.translate( + 'xpack.securitySolution.recentTimelines.openAsDuplicateTooltip', + { + defaultMessage: 'Open as a duplicate timeline', + } +); + +export const PINNED_EVENTS = i18n.translate( + 'xpack.securitySolution.recentTimelines.pinnedEventsTooltip', + { + defaultMessage: 'Pinned events', + } +); + +export const UNTITLED_TIMELINE = i18n.translate( + 'xpack.securitySolution.recentTimelines.untitledTimelineLabel', + { + defaultMessage: 'Untitled timeline', + } +); + +export const VIEW_ALL_TIMELINES = i18n.translate( + 'xpack.securitySolution.recentTimelines.viewAllTimelinesLink', + { + defaultMessage: 'View all timelines', + } +); diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/types.ts b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/types.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/components/recent_timelines/types.ts rename to x-pack/plugins/security_solution/public/overview/components/recent_timelines/types.ts diff --git a/x-pack/plugins/siem/public/overview/components/sidebar/index.tsx b/x-pack/plugins/security_solution/public/overview/components/sidebar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/sidebar/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/sidebar/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/sidebar/sidebar.tsx b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/sidebar/sidebar.tsx rename to x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.tsx diff --git a/x-pack/plugins/siem/public/overview/components/signals_by_category/index.tsx b/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/signals_by_category/index.tsx rename to x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx diff --git a/x-pack/plugins/siem/public/overview/components/stat_value.tsx b/x-pack/plugins/security_solution/public/overview/components/stat_value.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/components/stat_value.tsx rename to x-pack/plugins/security_solution/public/overview/components/stat_value.tsx diff --git a/x-pack/plugins/siem/public/overview/components/types.ts b/x-pack/plugins/security_solution/public/overview/components/types.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/components/types.ts rename to x-pack/plugins/security_solution/public/overview/components/types.ts diff --git a/x-pack/plugins/siem/public/overview/containers/overview_host/index.gql_query.ts b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/containers/overview_host/index.gql_query.ts rename to x-pack/plugins/security_solution/public/overview/containers/overview_host/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/overview/containers/overview_host/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/containers/overview_host/index.tsx rename to x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx diff --git a/x-pack/plugins/siem/public/overview/containers/overview_network/index.gql_query.ts b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/containers/overview_network/index.gql_query.ts rename to x-pack/plugins/security_solution/public/overview/containers/overview_network/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/overview/containers/overview_network/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/containers/overview_network/index.tsx rename to x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx diff --git a/x-pack/plugins/siem/public/overview/index.ts b/x-pack/plugins/security_solution/public/overview/index.ts similarity index 100% rename from x-pack/plugins/siem/public/overview/index.ts rename to x-pack/plugins/security_solution/public/overview/index.ts diff --git a/x-pack/plugins/siem/public/overview/pages/index.tsx b/x-pack/plugins/security_solution/public/overview/pages/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/pages/index.tsx rename to x-pack/plugins/security_solution/public/overview/pages/index.tsx diff --git a/x-pack/plugins/siem/public/overview/pages/overview.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/pages/overview.test.tsx rename to x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx diff --git a/x-pack/plugins/siem/public/overview/pages/overview.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/pages/overview.tsx rename to x-pack/plugins/security_solution/public/overview/pages/overview.tsx diff --git a/x-pack/plugins/siem/public/overview/pages/summary.tsx b/x-pack/plugins/security_solution/public/overview/pages/summary.tsx similarity index 75% rename from x-pack/plugins/siem/public/overview/pages/summary.tsx rename to x-pack/plugins/security_solution/public/overview/pages/summary.tsx index 1e08a2cdca8e7..0f20e8bea9dc5 100644 --- a/x-pack/plugins/siem/public/overview/pages/summary.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/summary.tsx @@ -8,6 +8,8 @@ import React from 'react'; import { EuiFlexItem, EuiLink, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; +import { ADD_DATA_PATH } from '../../../common/constants'; + import { useKibana } from '../../common/lib/kibana'; export const Summary = React.memo(() => { @@ -18,28 +20,28 @@ export const Summary = React.memo(() => {

), data: ( - + @@ -47,7 +49,7 @@ export const Summary = React.memo(() => { siemSolution: ( @@ -57,18 +59,21 @@ export const Summary = React.memo(() => {

- +

diff --git a/x-pack/plugins/security_solution/public/overview/pages/translations.ts b/x-pack/plugins/security_solution/public/overview/pages/translations.ts new file mode 100644 index 0000000000000..bf13a57f0b642 --- /dev/null +++ b/x-pack/plugins/security_solution/public/overview/pages/translations.ts @@ -0,0 +1,65 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ALERTS_GRAPH_TITLE = i18n.translate( + 'xpack.securitySolution.overview.alertsGraphTitle', + { + defaultMessage: 'External alert count', + } +); + +export const EVENTS = i18n.translate('xpack.securitySolution.overview.eventsTitle', { + defaultMessage: 'Event count', +}); + +export const NEWS_FEED_TITLE = i18n.translate( + 'xpack.securitySolution.overview.newsFeedSidebarTitle', + { + defaultMessage: 'Security news', + } +); + +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.overview.pageTitle', { + defaultMessage: 'Security', +}); + +export const PAGE_SUBTITLE = i18n.translate('xpack.securitySolution.overview.pageSubtitle', { + defaultMessage: 'Security Information & Event Management with the Elastic Stack', +}); + +export const RECENT_CASES = i18n.translate( + 'xpack.securitySolution.overview.recentCasesSidebarTitle', + { + defaultMessage: 'Recent cases', + } +); + +export const RECENT_TIMELINES = i18n.translate( + 'xpack.securitySolution.overview.recentTimelinesSidebarTitle', + { + defaultMessage: 'Recent timelines', + } +); + +export const ALERT_COUNT = i18n.translate('xpack.securitySolution.overview.signalCountTitle', { + defaultMessage: 'Alert count', +}); + +export const TOP = (fieldName: string) => + i18n.translate('xpack.securitySolution.overview.topNLabel', { + values: { fieldName }, + defaultMessage: `Top {fieldName}`, + }); + +export const VIEW_ALERTS = i18n.translate('xpack.securitySolution.overview.viewAlertsButtonLabel', { + defaultMessage: 'View alerts', +}); + +export const VIEW_EVENTS = i18n.translate('xpack.securitySolution.overview.viewEventsButtonLabel', { + defaultMessage: 'View events', +}); diff --git a/x-pack/plugins/siem/public/overview/routes.tsx b/x-pack/plugins/security_solution/public/overview/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/overview/routes.tsx rename to x-pack/plugins/security_solution/public/overview/routes.tsx diff --git a/x-pack/plugins/siem/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx similarity index 89% rename from x-pack/plugins/siem/public/plugin.tsx rename to x-pack/plugins/security_solution/public/plugin.tsx index b4e0de4ff316d..e3d3062ee9cf7 100644 --- a/x-pack/plugins/siem/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -34,10 +34,10 @@ export class Plugin implements IPlugin {' '} diff --git a/x-pack/plugins/siem/public/resolver/view/panel.tsx b/x-pack/plugins/security_solution/public/resolver/view/panel.tsx similarity index 81% rename from x-pack/plugins/siem/public/resolver/view/panel.tsx rename to x-pack/plugins/security_solution/public/resolver/view/panel.tsx index e8b52b17c9d26..2b67a4ac16d4e 100644 --- a/x-pack/plugins/siem/public/resolver/view/panel.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panel.tsx @@ -99,16 +99,19 @@ export const Panel = memo(function Event({ className }: { className?: string }) () => [ { field: 'name', - name: i18n.translate('xpack.siem.endpoint.resolver.panel.tabel.row.processNameTitle', { - defaultMessage: 'Process Name', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.panel.tabel.row.processNameTitle', + { + defaultMessage: 'Process Name', + } + ), sortable: true, truncateText: true, render(name: string) { return name === '' ? ( {i18n.translate( - 'xpack.siem.endpoint.resolver.panel.table.row.valueMissingDescription', + 'xpack.securitySolution.endpoint.resolver.panel.table.row.valueMissingDescription', { defaultMessage: 'Value is missing', } @@ -121,9 +124,12 @@ export const Panel = memo(function Event({ className }: { className?: string }) }, { field: 'timestamp', - name: i18n.translate('xpack.siem.endpoint.resolver.panel.tabel.row.timestampTitle', { - defaultMessage: 'Timestamp', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.panel.tabel.row.timestampTitle', + { + defaultMessage: 'Timestamp', + } + ), dataType: 'date', sortable: true, render(eventDate?: Date) { @@ -132,7 +138,7 @@ export const Panel = memo(function Event({ className }: { className?: string }) ) : ( {i18n.translate( - 'xpack.siem.endpoint.resolver.panel.tabel.row.timestampInvalidLabel', + 'xpack.securitySolution.endpoint.resolver.panel.tabel.row.timestampInvalidLabel', { defaultMessage: 'invalid', } @@ -142,19 +148,22 @@ export const Panel = memo(function Event({ className }: { className?: string }) }, }, { - name: i18n.translate('xpack.siem.endpoint.resolver.panel.tabel.row.actionsTitle', { - defaultMessage: 'Actions', - }), + name: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.panel.tabel.row.actionsTitle', + { + defaultMessage: 'Actions', + } + ), actions: [ { name: i18n.translate( - 'xpack.siem.endpoint.resolver.panel.tabel.row.actions.bringIntoViewButtonLabel', + 'xpack.securitySolution.endpoint.resolver.panel.tabel.row.actions.bringIntoViewButtonLabel', { defaultMessage: 'Bring into view', } ), description: i18n.translate( - 'xpack.siem.endpoint.resolver.panel.tabel.row.bringIntoViewLabel', + 'xpack.securitySolution.endpoint.resolver.panel.tabel.row.bringIntoViewLabel', { defaultMessage: 'Bring the process into view on the map.', } @@ -172,7 +181,7 @@ export const Panel = memo(function Event({ className }: { className?: string })

- {i18n.translate('xpack.siem.endpoint.resolver.panel.title', { + {i18n.translate('xpack.securitySolution.endpoint.resolver.panel.title', { defaultMessage: 'Processes', })}

diff --git a/x-pack/plugins/siem/public/resolver/view/process_event_dot.tsx b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx similarity index 78% rename from x-pack/plugins/siem/public/resolver/view/process_event_dot.tsx rename to x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx index 342629804b6f4..0d86cf45405a9 100644 --- a/x-pack/plugins/siem/public/resolver/view/process_event_dot.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx @@ -36,7 +36,7 @@ const nodeAssets = { cubeSymbol: `#${SymbolIds.runningProcessCube}`, labelBackground: NamedColors.labelBackgroundRunningProcess, descriptionFill: NamedColors.empty, - descriptionText: i18n.translate('xpack.siem.endpoint.resolver.runningProcess', { + descriptionText: i18n.translate('xpack.securitySolution.endpoint.resolver.runningProcess', { defaultMessage: 'Running Process', }), }, @@ -44,7 +44,7 @@ const nodeAssets = { cubeSymbol: `#${SymbolIds.runningTriggerCube}`, labelBackground: NamedColors.labelBackgroundRunningTrigger, descriptionFill: NamedColors.empty, - descriptionText: i18n.translate('xpack.siem.endpoint.resolver.runningTrigger', { + descriptionText: i18n.translate('xpack.securitySolution.endpoint.resolver.runningTrigger', { defaultMessage: 'Running Trigger', }), }, @@ -52,7 +52,7 @@ const nodeAssets = { cubeSymbol: `#${SymbolIds.terminatedProcessCube}`, labelBackground: NamedColors.labelBackgroundTerminatedProcess, descriptionFill: NamedColors.empty, - descriptionText: i18n.translate('xpack.siem.endpoint.resolver.terminatedProcess', { + descriptionText: i18n.translate('xpack.securitySolution.endpoint.resolver.terminatedProcess', { defaultMessage: 'Terminated Process', }), }, @@ -60,7 +60,7 @@ const nodeAssets = { cubeSymbol: `#${SymbolIds.terminatedTriggerCube}`, labelBackground: NamedColors.labelBackgroundTerminatedTrigger, descriptionFill: NamedColors.empty, - descriptionText: i18n.translate('xpack.siem.endpoint.resolver.terminatedTrigger', { + descriptionText: i18n.translate('xpack.securitySolution.endpoint.resolver.terminatedTrigger', { defaultMessage: 'Terminated Trigger', }), }, @@ -73,121 +73,166 @@ const getDisplayName: (schemaName: string) => string = function nameInSchemaToDi schemaName: string ) { const displayNameRecord: Record = { - application: i18n.translate('xpack.siem.endpoint.resolver.applicationEventTypeDisplayName', { - defaultMessage: 'Application', - }), - apm: i18n.translate('xpack.siem.endpoint.resolver.apmEventTypeDisplayName', { + application: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.applicationEventTypeDisplayName', + { + defaultMessage: 'Application', + } + ), + apm: i18n.translate('xpack.securitySolution.endpoint.resolver.apmEventTypeDisplayName', { defaultMessage: 'APM', }), - audit: i18n.translate('xpack.siem.endpoint.resolver.auditEventTypeDisplayName', { + audit: i18n.translate('xpack.securitySolution.endpoint.resolver.auditEventTypeDisplayName', { defaultMessage: 'Audit', }), authentication: i18n.translate( - 'xpack.siem.endpoint.resolver.authenticationEventTypeDisplayName', + 'xpack.securitySolution.endpoint.resolver.authenticationEventTypeDisplayName', { defaultMessage: 'Authentication', } ), - certificate: i18n.translate('xpack.siem.endpoint.resolver.certificateEventTypeDisplayName', { - defaultMessage: 'Certificate', - }), - cloud: i18n.translate('xpack.siem.endpoint.resolver.cloudEventTypeDisplayName', { + certificate: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.certificateEventTypeDisplayName', + { + defaultMessage: 'Certificate', + } + ), + cloud: i18n.translate('xpack.securitySolution.endpoint.resolver.cloudEventTypeDisplayName', { defaultMessage: 'Cloud', }), - database: i18n.translate('xpack.siem.endpoint.resolver.databaseEventTypeDisplayName', { - defaultMessage: 'Database', - }), - driver: i18n.translate('xpack.siem.endpoint.resolver.driverEventTypeDisplayName', { + database: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.databaseEventTypeDisplayName', + { + defaultMessage: 'Database', + } + ), + driver: i18n.translate('xpack.securitySolution.endpoint.resolver.driverEventTypeDisplayName', { defaultMessage: 'Driver', }), - email: i18n.translate('xpack.siem.endpoint.resolver.emailEventTypeDisplayName', { + email: i18n.translate('xpack.securitySolution.endpoint.resolver.emailEventTypeDisplayName', { defaultMessage: 'Email', }), - file: i18n.translate('xpack.siem.endpoint.resolver.fileEventTypeDisplayName', { + file: i18n.translate('xpack.securitySolution.endpoint.resolver.fileEventTypeDisplayName', { defaultMessage: 'File', }), - host: i18n.translate('xpack.siem.endpoint.resolver.hostEventTypeDisplayName', { + host: i18n.translate('xpack.securitySolution.endpoint.resolver.hostEventTypeDisplayName', { defaultMessage: 'Host', }), - iam: i18n.translate('xpack.siem.endpoint.resolver.iamEventTypeDisplayName', { + iam: i18n.translate('xpack.securitySolution.endpoint.resolver.iamEventTypeDisplayName', { defaultMessage: 'IAM', }), - iam_group: i18n.translate('xpack.siem.endpoint.resolver.iam_groupEventTypeDisplayName', { - defaultMessage: 'IAM Group', - }), + iam_group: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.iam_groupEventTypeDisplayName', + { + defaultMessage: 'IAM Group', + } + ), intrusion_detection: i18n.translate( - 'xpack.siem.endpoint.resolver.intrusion_detectionEventTypeDisplayName', + 'xpack.securitySolution.endpoint.resolver.intrusion_detectionEventTypeDisplayName', { defaultMessage: 'Intrusion Detection', } ), - malware: i18n.translate('xpack.siem.endpoint.resolver.malwareEventTypeDisplayName', { - defaultMessage: 'Malware', - }), - network_flow: i18n.translate('xpack.siem.endpoint.resolver.network_flowEventTypeDisplayName', { - defaultMessage: 'Network Flow', - }), - network: i18n.translate('xpack.siem.endpoint.resolver.networkEventTypeDisplayName', { - defaultMessage: 'Network', - }), - package: i18n.translate('xpack.siem.endpoint.resolver.packageEventTypeDisplayName', { - defaultMessage: 'Package', - }), - process: i18n.translate('xpack.siem.endpoint.resolver.processEventTypeDisplayName', { - defaultMessage: 'Process', - }), - registry: i18n.translate('xpack.siem.endpoint.resolver.registryEventTypeDisplayName', { - defaultMessage: 'Registry', - }), - session: i18n.translate('xpack.siem.endpoint.resolver.sessionEventTypeDisplayName', { - defaultMessage: 'Session', - }), - service: i18n.translate('xpack.siem.endpoint.resolver.serviceEventTypeDisplayName', { - defaultMessage: 'Service', - }), - socket: i18n.translate('xpack.siem.endpoint.resolver.socketEventTypeDisplayName', { + malware: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.malwareEventTypeDisplayName', + { + defaultMessage: 'Malware', + } + ), + network_flow: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.network_flowEventTypeDisplayName', + { + defaultMessage: 'Network Flow', + } + ), + network: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.networkEventTypeDisplayName', + { + defaultMessage: 'Network', + } + ), + package: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.packageEventTypeDisplayName', + { + defaultMessage: 'Package', + } + ), + process: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.processEventTypeDisplayName', + { + defaultMessage: 'Process', + } + ), + registry: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.registryEventTypeDisplayName', + { + defaultMessage: 'Registry', + } + ), + session: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.sessionEventTypeDisplayName', + { + defaultMessage: 'Session', + } + ), + service: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.serviceEventTypeDisplayName', + { + defaultMessage: 'Service', + } + ), + socket: i18n.translate('xpack.securitySolution.endpoint.resolver.socketEventTypeDisplayName', { defaultMessage: 'Socket', }), vulnerability: i18n.translate( - 'xpack.siem.endpoint.resolver.vulnerabilityEventTypeDisplayName', + 'xpack.securitySolution.endpoint.resolver.vulnerabilityEventTypeDisplayName', { defaultMessage: 'Vulnerability', } ), - web: i18n.translate('xpack.siem.endpoint.resolver.webEventTypeDisplayName', { + web: i18n.translate('xpack.securitySolution.endpoint.resolver.webEventTypeDisplayName', { defaultMessage: 'Web', }), - alert: i18n.translate('xpack.siem.endpoint.resolver.alertEventTypeDisplayName', { + alert: i18n.translate('xpack.securitySolution.endpoint.resolver.alertEventTypeDisplayName', { defaultMessage: 'Alert', }), - security: i18n.translate('xpack.siem.endpoint.resolver.securityEventTypeDisplayName', { - defaultMessage: 'Security', - }), - dns: i18n.translate('xpack.siem.endpoint.resolver.dnsEventTypeDisplayName', { + security: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.securityEventTypeDisplayName', + { + defaultMessage: 'Security', + } + ), + dns: i18n.translate('xpack.securitySolution.endpoint.resolver.dnsEventTypeDisplayName', { defaultMessage: 'DNS', }), - clr: i18n.translate('xpack.siem.endpoint.resolver.clrEventTypeDisplayName', { + clr: i18n.translate('xpack.securitySolution.endpoint.resolver.clrEventTypeDisplayName', { defaultMessage: 'CLR', }), - image_load: i18n.translate('xpack.siem.endpoint.resolver.image_loadEventTypeDisplayName', { - defaultMessage: 'Image Load', - }), - powershell: i18n.translate('xpack.siem.endpoint.resolver.powershellEventTypeDisplayName', { - defaultMessage: 'Powershell', - }), - wmi: i18n.translate('xpack.siem.endpoint.resolver.wmiEventTypeDisplayName', { + image_load: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.image_loadEventTypeDisplayName', + { + defaultMessage: 'Image Load', + } + ), + powershell: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.powershellEventTypeDisplayName', + { + defaultMessage: 'Powershell', + } + ), + wmi: i18n.translate('xpack.securitySolution.endpoint.resolver.wmiEventTypeDisplayName', { defaultMessage: 'WMI', }), - api: i18n.translate('xpack.siem.endpoint.resolver.apiEventTypeDisplayName', { + api: i18n.translate('xpack.securitySolution.endpoint.resolver.apiEventTypeDisplayName', { defaultMessage: 'API', }), - user: i18n.translate('xpack.siem.endpoint.resolver.userEventTypeDisplayName', { + user: i18n.translate('xpack.securitySolution.endpoint.resolver.userEventTypeDisplayName', { defaultMessage: 'User', }), }; return ( displayNameRecord[schemaName] || - i18n.translate('xpack.siem.endpoint.resolver.userEventTypeDisplayUnknown', { + i18n.translate('xpack.securitySolution.endpoint.resolver.userEventTypeDisplayUnknown', { defaultMessage: 'Unknown', }) ); diff --git a/x-pack/plugins/siem/public/resolver/view/side_effect_context.ts b/x-pack/plugins/security_solution/public/resolver/view/side_effect_context.ts similarity index 100% rename from x-pack/plugins/siem/public/resolver/view/side_effect_context.ts rename to x-pack/plugins/security_solution/public/resolver/view/side_effect_context.ts diff --git a/x-pack/plugins/siem/public/resolver/view/side_effect_simulator.ts b/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator.ts similarity index 100% rename from x-pack/plugins/siem/public/resolver/view/side_effect_simulator.ts rename to x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator.ts diff --git a/x-pack/plugins/siem/public/resolver/view/submenu.tsx b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx similarity index 92% rename from x-pack/plugins/siem/public/resolver/view/submenu.tsx rename to x-pack/plugins/security_solution/public/resolver/view/submenu.tsx index f59b1d6a4313d..6f69725c8677a 100644 --- a/x-pack/plugins/siem/public/resolver/view/submenu.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx @@ -15,19 +15,22 @@ import styled from 'styled-components'; * menuError: if the submenu requested data, but received an error */ export const subMenuAssets = { - initialMenuStatus: i18n.translate('xpack.siem.endpoint.resolver.relatedNotRetrieved', { - defaultMessage: 'Related Events have not yet been retrieved.', - }), - menuError: i18n.translate('xpack.siem.endpoint.resolver.relatedRetrievalError', { + initialMenuStatus: i18n.translate( + 'xpack.securitySolution.endpoint.resolver.relatedNotRetrieved', + { + defaultMessage: 'Related Events have not yet been retrieved.', + } + ), + menuError: i18n.translate('xpack.securitySolution.endpoint.resolver.relatedRetrievalError', { defaultMessage: 'There was an error retrieving related events.', }), relatedAlerts: { - title: i18n.translate('xpack.siem.endpoint.resolver.relatedAlerts', { + title: i18n.translate('xpack.securitySolution.endpoint.resolver.relatedAlerts', { defaultMessage: 'Related Alerts', }), }, relatedEvents: { - title: i18n.translate('xpack.siem.endpoint.resolver.relatedEvents', { + title: i18n.translate('xpack.securitySolution.endpoint.resolver.relatedEvents', { defaultMessage: 'Events', }), }, diff --git a/x-pack/plugins/siem/public/resolver/view/use_camera.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/use_camera.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/resolver/view/use_camera.test.tsx rename to x-pack/plugins/security_solution/public/resolver/view/use_camera.test.tsx diff --git a/x-pack/plugins/siem/public/resolver/view/use_camera.ts b/x-pack/plugins/security_solution/public/resolver/view/use_camera.ts similarity index 100% rename from x-pack/plugins/siem/public/resolver/view/use_camera.ts rename to x-pack/plugins/security_solution/public/resolver/view/use_camera.ts diff --git a/x-pack/plugins/siem/public/resolver/view/use_resolver_dispatch.ts b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_dispatch.ts similarity index 100% rename from x-pack/plugins/siem/public/resolver/view/use_resolver_dispatch.ts rename to x-pack/plugins/security_solution/public/resolver/view/use_resolver_dispatch.ts diff --git a/x-pack/plugins/siem/public/shared_imports.ts b/x-pack/plugins/security_solution/public/shared_imports.ts similarity index 100% rename from x-pack/plugins/siem/public/shared_imports.ts rename to x-pack/plugins/security_solution/public/shared_imports.ts diff --git a/x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/index.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/translations.ts new file mode 100644 index 0000000000000..51112e6422e3b --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/certificate_fingerprint/translations.ts @@ -0,0 +1,21 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const CLIENT_CERT = i18n.translate( + 'xpack.securitySolution.certificate.fingerprint.clientCertLabel', + { + defaultMessage: 'client cert', + } +); + +export const SERVER_CERT = i18n.translate( + 'xpack.securitySolution.certificate.fingerprint.serverCertLabel', + { + defaultMessage: 'server cert', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/duration/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/duration/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/duration/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/duration/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/duration/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/duration/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/duration/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/duration/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/edit_data_provider/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/edit_data_provider/helpers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/edit_data_provider/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/edit_data_provider/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/edit_data_provider/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/edit_data_provider/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/edit_data_provider/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/edit_data_provider/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/translations.ts new file mode 100644 index 0000000000000..2595826ae4a95 --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/translations.ts @@ -0,0 +1,60 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const DOES_NOT_EXIST = i18n.translate( + 'xpack.securitySolution.editDataProvider.doesNotExistLabel', + { + defaultMessage: 'does not exist', + } +); + +export const EXISTS = i18n.translate('xpack.securitySolution.editDataProvider.existsLabel', { + defaultMessage: 'exists', +}); + +export const FIELD = i18n.translate('xpack.securitySolution.editDataProvider.fieldLabel', { + defaultMessage: 'Field', +}); + +export const FIELD_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.editDataProvider.placeholder', + { + defaultMessage: 'Select a field', + } +); + +export const IS = i18n.translate('xpack.securitySolution.editDataProvider.isLabel', { + defaultMessage: 'is', +}); + +export const IS_NOT = i18n.translate('xpack.securitySolution.editDataProvider.isNotLabel', { + defaultMessage: 'is not', +}); + +export const OPERATOR = i18n.translate('xpack.securitySolution.editDataProvider.operatorLabel', { + defaultMessage: 'Operator', +}); + +export const SAVE = i18n.translate('xpack.securitySolution.editDataProvider.saveButton', { + defaultMessage: 'Save', +}); + +export const VALUE = i18n.translate('xpack.securitySolution.editDataProvider.valuePlaceholder', { + defaultMessage: 'value', +}); + +export const VALUE_LABEL = i18n.translate('xpack.securitySolution.editDataProvider.valueLabel', { + defaultMessage: 'Value', +}); + +export const SELECT_AN_OPERATOR = i18n.translate( + 'xpack.securitySolution.editDataProvider.selectAnOperatorPlaceholder', + { + defaultMessage: 'Select an operator', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/field_renderers/field_renderers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/field_renderers/field_renderers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/field_renderers/field_renderers.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx similarity index 99% rename from x-pack/plugins/siem/public/timelines/components/field_renderers/field_renderers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx index 5a42ee329d7e5..7296e0ee4b971 100644 --- a/x-pack/plugins/siem/public/timelines/components/field_renderers/field_renderers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx @@ -266,7 +266,7 @@ export const DefaultFieldRendererOverflow = React.memo setIsOpen(!isOpen)}> {`+${rowItems.length - overflowIndexStart} `} diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/categories_pane.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/categories_pane.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/categories_pane.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/categories_pane.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/categories_pane.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/categories_pane.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/categories_pane.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/categories_pane.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/category.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/category.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/category.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/category.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/category.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/category.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/category.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/category.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/category_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_columns.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/category_columns.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_columns.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/category_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/category_columns.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_columns.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/category_title.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_title.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/category_title.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_title.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/category_title.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_title.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/category_title.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/category_title.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/field_browser.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_browser.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/field_browser.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_browser.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/field_browser.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_browser.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/field_browser.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_browser.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/field_items.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/field_items.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/field_items.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/field_items.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/field_name.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/field_name.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/field_name.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/field_name.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/fields_pane.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/fields_pane.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/fields_pane.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/fields_pane.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/fields_pane.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/fields_pane.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/fields_pane.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/fields_pane.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/header.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/header.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/header.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/header.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/header.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/header.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/header.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/header.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/helpers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/translations.ts new file mode 100644 index 0000000000000..c92778e8c84ab --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/translations.ts @@ -0,0 +1,94 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const CATEGORY = i18n.translate('xpack.securitySolution.fieldBrowser.categoryLabel', { + defaultMessage: 'Category', +}); + +export const CATEGORIES = i18n.translate('xpack.securitySolution.fieldBrowser.categoriesTitle', { + defaultMessage: 'Categories', +}); + +export const CATEGORIES_COUNT = (totalCount: number) => + i18n.translate('xpack.securitySolution.fieldBrowser.categoriesCountTitle', { + values: { totalCount }, + defaultMessage: '{totalCount} {totalCount, plural, =1 {category} other {categories}}', + }); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.fieldBrowser.copyToClipboard', + { + defaultMessage: 'Copy to Clipboard', + } +); + +export const CUSTOMIZE_COLUMNS = i18n.translate( + 'xpack.securitySolution.fieldBrowser.customizeColumnsTitle', + { + defaultMessage: 'Customize Columns', + } +); + +export const DESCRIPTION = i18n.translate('xpack.securitySolution.fieldBrowser.descriptionLabel', { + defaultMessage: 'Description', +}); + +export const FIELD = i18n.translate('xpack.securitySolution.fieldBrowser.fieldLabel', { + defaultMessage: 'Field', +}); + +export const FIELDS = i18n.translate('xpack.securitySolution.fieldBrowser.fieldsTitle', { + defaultMessage: 'Columns', +}); + +export const FIELDS_COUNT = (totalCount: number) => + i18n.translate('xpack.securitySolution.fieldBrowser.fieldsCountTitle', { + values: { totalCount }, + defaultMessage: '{totalCount} {totalCount, plural, =1 {field} other {fields}}', + }); + +export const FILTER_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.fieldBrowser.filterPlaceholder', + { + defaultMessage: 'Field name', + } +); + +export const NO_FIELDS_MATCH = i18n.translate( + 'xpack.securitySolution.fieldBrowser.noFieldsMatchLabel', + { + defaultMessage: 'No fields match', + } +); + +export const NO_FIELDS_MATCH_INPUT = (searchInput: string) => + i18n.translate('xpack.securitySolution.fieldBrowser.noFieldsMatchInputLabel', { + defaultMessage: 'No fields match {searchInput}', + values: { + searchInput, + }, + }); + +export const RESET_FIELDS = i18n.translate('xpack.securitySolution.fieldBrowser.resetFieldsLink', { + defaultMessage: 'Reset Fields', +}); + +export const TOGGLE_COLUMN_TOOLTIP = i18n.translate( + 'xpack.securitySolution.fieldBrowser.toggleColumnTooltip', + { + defaultMessage: 'Toggle column', + } +); + +export const VIEW_CATEGORY = (categoryId: string) => + i18n.translate('xpack.securitySolution.fieldBrowser.viewCategoryTooltip', { + defaultMessage: 'View all {categoryId} fields', + values: { + categoryId, + }, + }); diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/types.ts b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/types.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/fields_browser/types.ts rename to x-pack/plugins/security_solution/public/timelines/components/fields_browser/types.ts diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/flyout/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/flyout/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/button/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/button/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/button/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/button/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/button/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/button/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/button/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/button/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/flyout/button/translations.ts similarity index 65% rename from x-pack/plugins/siem/public/timelines/components/flyout/button/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/flyout/button/translations.ts index 1660c38de123a..471b95971d89b 100644 --- a/x-pack/plugins/siem/public/timelines/components/flyout/button/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/button/translations.ts @@ -6,10 +6,10 @@ import { i18n } from '@kbn/i18n'; -export const TIMELINE = i18n.translate('xpack.siem.flyout.button.timeline', { +export const TIMELINE = i18n.translate('xpack.securitySolution.flyout.button.timeline', { defaultMessage: 'timeline', }); -export const FLYOUT_BUTTON = i18n.translate('xpack.siem.flyout.button.text', { +export const FLYOUT_BUTTON = i18n.translate('xpack.securitySolution.flyout.button.text', { defaultMessage: 'Timeline', }); diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/header/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/translations.ts similarity index 83% rename from x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/translations.ts index 7fcffc9c1f0b4..f35193bfb8d6f 100644 --- a/x-pack/plugins/siem/public/timelines/components/flyout/header_with_close_button/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header_with_close_button/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const CLOSE_TIMELINE = i18n.translate( - 'xpack.siem.timeline.flyout.header.closeTimelineButtonLabel', + 'xpack.securitySolution.timeline.flyout.header.closeTimelineButtonLabel', { defaultMessage: 'Close timeline', } diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/pane/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/pane/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/flyout/pane/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/pane/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/pane/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/pane/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/pane/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/pane/timeline_resize_handle.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/timeline_resize_handle.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/flyout/pane/timeline_resize_handle.tsx rename to x-pack/plugins/security_solution/public/timelines/components/flyout/pane/timeline_resize_handle.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/flyout/pane/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/translations.ts similarity index 83% rename from x-pack/plugins/siem/public/timelines/components/flyout/pane/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/flyout/pane/translations.ts index 0c31cdb81e8e1..dea1739207642 100644 --- a/x-pack/plugins/siem/public/timelines/components/flyout/pane/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const TIMELINE_DESCRIPTION = i18n.translate( - 'xpack.siem.timeline.flyout.pane.timelinePropertiesAriaLabel', + 'xpack.securitySolution.timeline.flyout.pane.timelinePropertiesAriaLabel', { defaultMessage: 'Timeline Properties', } diff --git a/x-pack/plugins/siem/public/timelines/components/formatted_duration/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/formatted_duration/helpers.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/formatted_duration/helpers.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/formatted_duration/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/formatted_duration/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/formatted_duration/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/formatted_duration/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/formatted_duration/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/formatted_duration/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/formatted_duration/tooltip/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/tooltip/index.tsx similarity index 92% rename from x-pack/plugins/siem/public/timelines/components/formatted_duration/tooltip/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/formatted_duration/tooltip/index.tsx index 6c11a7aad7ad2..08ed1d6235b72 100644 --- a/x-pack/plugins/siem/public/timelines/components/formatted_duration/tooltip/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/tooltip/index.tsx @@ -25,7 +25,10 @@ export const FormattedDurationTooltipContent = React.memo<{ {tooltipTitle != null ?

{tooltipTitle}

: null}

{getHumanizedDuration(maybeDurationNanoseconds)}

- + {': '} {maybeDurationNanoseconds}

diff --git a/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/translations.ts new file mode 100644 index 0000000000000..6cd6ca0e8491f --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/formatted_duration/translations.ts @@ -0,0 +1,60 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const NO_DURATION = i18n.translate( + 'xpack.securitySolution.formatted.duration.noDurationTooltip', + { + defaultMessage: 'no duration', + } +); + +export const INVALID_DURATION = i18n.translate( + 'xpack.securitySolution.formatted.duration.invalidDurationTooltip', + { + defaultMessage: 'invalid duration', + } +); + +export const A_NANOSECOND = i18n.translate( + 'xpack.securitySolution.formatted.duration.aNanosecondTooltip', + { + defaultMessage: 'a nanosecond', + } +); + +export const A_FEW_NANOSECONDS = i18n.translate( + 'xpack.securitySolution.formatted.duration.aFewNanosecondsTooltip', + { + defaultMessage: 'a few nanoseconds', + } +); + +export const A_MILLISECOND = i18n.translate( + 'xpack.securitySolution.formatted.duration.aMillisecondTooltip', + { + defaultMessage: 'a millisecond', + } +); + +export const A_FEW_MILLISECONDS = i18n.translate( + 'xpack.securitySolution.formatted.duration.aFewMillisecondsTooltip', + { + defaultMessage: 'a few milliseconds', + } +); + +export const A_SECOND = i18n.translate('xpack.securitySolution.formatted.duration.aSecondTooltip', { + defaultMessage: 'a second', +}); + +export const ZERO_NANOSECONDS = i18n.translate( + 'xpack.securitySolution.formatted.duration.zeroNanosecondsTooltip', + { + defaultMessage: 'zero nanoseconds', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/formatted_ip/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/formatted_ip/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/translations.ts similarity index 85% rename from x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/translations.ts index a037bfa86fdb1..06218fdfb4f8d 100644 --- a/x-pack/plugins/siem/public/timelines/components/ja3_fingerprint/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/ja3_fingerprint/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const JA3_FINGERPRINT_LABEL = i18n.translate( - 'xpack.siem.ja3.fingerprint.ja3.fingerprintLabel', + 'xpack.securitySolution.ja3.fingerprint.ja3.fingerprintLabel', { defaultMessage: 'ja3', } diff --git a/x-pack/plugins/siem/public/timelines/components/lazy_accordion/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/lazy_accordion/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/lazy_accordion/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/lazy_accordion/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/loading/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/loading/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/loading/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/loading/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/manage_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/manage_timeline/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/manage_timeline/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/manage_timeline/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/fingerprints/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/fingerprints/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/fingerprints/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/netflow/fingerprints/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/netflow/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/duration_event_start_end.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/duration_event_start_end.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/duration_event_start_end.tsx rename to x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/duration_event_start_end.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/types.ts b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/types.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/types.ts rename to x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/types.ts diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/user_process.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/user_process.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/netflow_columns/user_process.tsx rename to x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/user_process.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/netflow/types.ts b/x-pack/plugins/security_solution/public/timelines/components/netflow/types.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/netflow/types.ts rename to x-pack/plugins/security_solution/public/timelines/components/netflow/types.ts diff --git a/x-pack/plugins/siem/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/notes/add_note/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/add_note/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/add_note/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/add_note/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/add_note/new_note.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/add_note/new_note.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/add_note/new_note.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/add_note/new_note.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/columns.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/columns.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/columns.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_body.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_body.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_body.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_body.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_body.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_body.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_body.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_header.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_header.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_header.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_header.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_header.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_header.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/note_card_header.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_card_header.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/note_created.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_created.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/note_created.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_created.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_card/note_created.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_created.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_card/note_created.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_card/note_created.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_cards/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_cards/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/notes/note_cards/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/notes/note_cards/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/notes/translations.ts new file mode 100644 index 0000000000000..4827481c7c5f3 --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/translations.ts @@ -0,0 +1,52 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const ADD_NOTE = i18n.translate('xpack.securitySolution.notes.addNoteButtonLabel', { + defaultMessage: 'Add Note', +}); + +export const ADD_A_NOTE = i18n.translate('xpack.securitySolution.notes.addANotePlaceholder', { + defaultMessage: 'Add a Note', +}); + +export const ADDED_A_NOTE = i18n.translate('xpack.securitySolution.notes.addedANoteLabel', { + defaultMessage: 'Added a Note', +}); + +export const NOTE = i18n.translate('xpack.securitySolution.notes.noteLabel', { + defaultMessage: 'Note', +}); + +export const NOTES = i18n.translate('xpack.securitySolution.notes.notesTitle', { + defaultMessage: 'Notes', +}); + +export const PREVIEW_MARKDOWN = i18n.translate( + 'xpack.securitySolution.notes.previewMarkdownTitle', + { + defaultMessage: 'Preview (Markdown)', + } +); + +export const SEARCH_PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.notes.search.FilterByUserOrNotePlaceholder', + { + defaultMessage: 'Filter by User or Note', + } +); + +export const CANCEL = i18n.translate('xpack.securitySolution.notes.cancelButtonLabel', { + defaultMessage: 'Cancel', +}); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.notes.copyToClipboardButtonLabel', + { + defaultMessage: 'Copy to Clipboard', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/open_timeline/constants.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/open_timeline/constants.ts rename to x-pack/plugins/security_solution/public/timelines/components/open_timeline/constants.ts diff --git a/x-pack/plugins/siem/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx similarity index 95% rename from x-pack/plugins/siem/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx rename to x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx index 026c43feeff9b..f6d6dcfae6fda 100644 --- a/x-pack/plugins/siem/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx @@ -28,7 +28,7 @@ export const DeleteTimelineModal = React.memo(({ title, closeModal, onDel const titleResult = !isEmpty(trimmedTitle) ? trimmedTitle : i18n.UNTITLED_TIMELINE; return ( ( const nTimelines = useMemo( () => ( + i18n.translate('xpack.securitySolution.open.timeline.selectedTimelinesTitle', { + values: { selectedTimelines }, + defaultMessage: + 'Selected {selectedTimelines} {selectedTimelines, plural, =1 {timeline} other {timelines}}', + }); + +export const SHOWING = i18n.translate('xpack.securitySolution.open.timeline.showingLabel', { + defaultMessage: 'Showing:', +}); + +export const SUCCESSFULLY_EXPORTED_TIMELINES = (totalTimelines: number) => + i18n.translate('xpack.securitySolution.open.timeline.successfullyExportedTimelinesTitle', { + values: { totalTimelines }, + defaultMessage: + 'Successfully exported {totalTimelines, plural, =0 {all timelines} =1 {{totalTimelines} timeline} other {{totalTimelines} timelines}}', + }); + +export const FILTER_TIMELINES = (timelineType: string) => + i18n.translate('xpack.securitySolution.open.timeline.filterByTimelineTypesTitle', { + values: { timelineType }, + defaultMessage: 'Only {timelineType}', + }); + +export const TAB_TIMELINES = i18n.translate( + 'xpack.securitySolution.timelines.components.tabs.timelinesTitle', + { + defaultMessage: 'Timelines', + } +); + +export const TAB_TEMPLATES = i18n.translate( + 'xpack.securitySolution.timelines.components.tabs.templatesTitle', + { + defaultMessage: 'Templates', + } +); + +export const IMPORT_TIMELINE_BTN_TITLE = i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.importTimelineTitle', + { + defaultMessage: 'Import timeline', + } +); + +export const SELECT_TIMELINE = i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.selectTimelineDescription', + { + defaultMessage: 'Select a SIEM timeline (as exported from the Timeline view) to import', + } +); + +export const INITIAL_PROMPT_TEXT = i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.initialPromptTextDescription', + { + defaultMessage: 'Select or drag and drop a valid timelines_export.ndjson file', + } +); + +export const OVERWRITE_WITH_SAME_NAME = i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.overwriteDescription', + { + defaultMessage: 'Automatically overwrite saved objects with the same timeline ID', + } +); + +export const SUCCESSFULLY_IMPORTED_TIMELINES = (totalCount: number) => + i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.successfullyImportedTimelinesTitle', + { + values: { totalCount }, + defaultMessage: + 'Successfully imported {totalCount} {totalCount, plural, =1 {timeline} other {timelines}}', + } + ); + +export const IMPORT_FAILED = i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.importFailedTitle', + { + defaultMessage: 'Failed to import timelines', + } +); + +export const IMPORT_TIMELINE = i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.importTitle', + { + defaultMessage: 'Import timeline…', + } +); + +export const IMPORT_FAILED_DETAILED = (id: string, statusCode: number, message: string) => + i18n.translate( + 'xpack.securitySolution.timelines.components.importTimelineModal.importFailedDetailedTitle', + { + values: { id, statusCode, message }, + defaultMessage: 'Timeline ID: {id}\n Status Code: {statusCode}\n Message: {message}', + } + ); diff --git a/x-pack/plugins/siem/public/timelines/components/open_timeline/types.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/open_timeline/types.ts rename to x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts diff --git a/x-pack/plugins/siem/public/timelines/components/open_timeline/use_timeline_types.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/open_timeline/use_timeline_types.tsx rename to x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/auto_save_warning/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/auto_save_warning/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/index.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/translations.ts new file mode 100644 index 0000000000000..26b336261d78d --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/translations.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const TITLE = i18n.translate('xpack.securitySolution.timeline.autosave.warning.title', { + defaultMessage: 'Auto-save disabled until refresh', +}); + +export const DESCRIPTION = i18n.translate( + 'xpack.securitySolution.timeline.autosave.warning.description', + { + defaultMessage: + 'Another user has made changes to this timeline. Any changes you make will not be auto-saved until you have refreshed this timeline to absorb those changes.', + } +); + +export const REFRESH_TIMELINE = i18n.translate( + 'xpack.securitySolution.timeline.autosave.warning.refresh.title', + { + defaultMessage: 'Refresh timeline', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/actions/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/actions/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/actions/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/actions/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/actions/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/actions/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/column_header.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/column_header.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/column_header.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/column_header.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/common/styles.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/styles.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/common/styles.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/styles.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/default_headers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/default_headers.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/index.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/translations.ts new file mode 100644 index 0000000000000..e6ded2afcc98d --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/events_select/translations.ts @@ -0,0 +1,49 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const PIN_SELECTED = i18n.translate( + 'xpack.securitySolution.timeline.eventsSelect.actions.pinSelected', + { + defaultMessage: 'Pin selected', + } +); + +export const SELECT_ALL = i18n.translate( + 'xpack.securitySolution.timeline.eventsSelect.actions.selectAll', + { + defaultMessage: 'All', + } +); + +export const SELECT_NONE = i18n.translate( + 'xpack.securitySolution.timeline.eventsSelect.actions.selectNone', + { + defaultMessage: 'None', + } +); + +export const SELECT_PINNED = i18n.translate( + 'xpack.securitySolution.timeline.eventsSelect.actions.selectPinned', + { + defaultMessage: 'Pinned', + } +); + +export const SELECT_UNPINNED = i18n.translate( + 'xpack.securitySolution.timeline.eventsSelect.actions.selectUnpinned', + { + defaultMessage: 'Unpinned', + } +); + +export const UNPIN_SELECTED = i18n.translate( + 'xpack.securitySolution.timeline.eventsSelect.actions.unpinSelected', + { + defaultMessage: 'Unpin selected', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/filter/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/header_content.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/header_content.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/header_content.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/header_content.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/helpers.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/helpers.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/helpers.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/helpers.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/ranges.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/ranges.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/ranges.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/ranges.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/translations.ts similarity index 51% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/translations.ts index 637232f708167..6f6ef4364fc3a 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/range_picker/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/translations.ts @@ -6,18 +6,18 @@ import { i18n } from '@kbn/i18n'; -export const ONE_DAY = i18n.translate('xpack.siem.timeline.rangePicker.oneDay', { +export const ONE_DAY = i18n.translate('xpack.securitySolution.timeline.rangePicker.oneDay', { defaultMessage: '1 Day', }); -export const ONE_WEEK = i18n.translate('xpack.siem.timeline.rangePicker.oneWeek', { +export const ONE_WEEK = i18n.translate('xpack.securitySolution.timeline.rangePicker.oneWeek', { defaultMessage: '1 Week', }); -export const ONE_MONTH = i18n.translate('xpack.siem.timeline.rangePicker.oneMonth', { +export const ONE_MONTH = i18n.translate('xpack.securitySolution.timeline.rangePicker.oneMonth', { defaultMessage: '1 Month', }); -export const ONE_YEAR = i18n.translate('xpack.siem.timeline.rangePicker.oneYear', { +export const ONE_YEAR = i18n.translate('xpack.securitySolution.timeline.rangePicker.oneYear', { defaultMessage: '1 Year', }); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/text_filter/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/text_filter/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/translations.ts similarity index 53% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/translations.ts index 2cc280c7157df..becdece2c7612 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/translations.ts @@ -6,24 +6,24 @@ import { i18n } from '@kbn/i18n'; -export const CATEGORY = i18n.translate('xpack.siem.timeline.categoryTooltip', { +export const CATEGORY = i18n.translate('xpack.securitySolution.timeline.categoryTooltip', { defaultMessage: 'Category', }); -export const DESCRIPTION = i18n.translate('xpack.siem.timeline.descriptionTooltip', { +export const DESCRIPTION = i18n.translate('xpack.securitySolution.timeline.descriptionTooltip', { defaultMessage: 'Description', }); -export const FIELD = i18n.translate('xpack.siem.timeline.fieldTooltip', { +export const FIELD = i18n.translate('xpack.securitySolution.timeline.fieldTooltip', { defaultMessage: 'Field', }); -export const TYPE = i18n.translate('xpack.siem.timeline.typeTooltip', { +export const TYPE = i18n.translate('xpack.securitySolution.timeline.typeTooltip', { defaultMessage: 'Type', }); export const REMOVE_COLUMN = i18n.translate( - 'xpack.siem.timeline.flyout.pane.removeColumnButtonLabel', + 'xpack.securitySolution.timeline.flyout.pane.removeColumnButtonLabel', { defaultMessage: 'Remove column', } diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_id.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_id.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/column_id.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_id.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/constants.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/constants.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/constants.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/constants.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/data_driven_columns/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/data_driven_columns/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/data_driven_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/data_driven_columns/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/events/event_column_view.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/events/event_column_view.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/events/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/events/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/events/stateful_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/events/stateful_event.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/helpers.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/helpers.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/mini_map/date_ranges.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/mini_map/date_ranges.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/args.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/args.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/args.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/args.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/args.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/args.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/args.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/args.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/translations.ts new file mode 100644 index 0000000000000..c916ff449a37e --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/translations.ts @@ -0,0 +1,792 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +// Note for translators and programmers +// Examples of these strings are all of the form +// Session {session.id} {primary} as {secondary}@{hostname} in {folder} was authorized to use {executable} with result {result.success/failure} +// E.x. Session 5 Frank as root@server-1 in /root was authorized to use wget with result success + +// However, the strings can be dropped depending on the circumstances of the variables. For example, with no data at all +// Session 10 +// Example with just a user name and hostname +// Session 20 frank@server-1 +// Example with user name, hostname, but no result +// Session 20 frank@server-1 acquired credentials to curl + +export const SESSION = i18n.translate('xpack.securitySolution.auditd.sessionDescription', { + defaultMessage: 'Session', +}); + +export const WAS_AUTHORIZED_TO_USE = i18n.translate( + 'xpack.securitySolution.auditd.wasAuthorizedToUseDescription', + { + defaultMessage: 'was authorized to use', + } +); + +export const ACQUIRED_CREDENTIALS_TO = i18n.translate( + 'xpack.securitySolution.auditd.acquiredCredentialsDescription', + { + defaultMessage: 'acquired credentials to', + } +); + +export const ENDED_FROM = i18n.translate('xpack.securitySolution.auditd.endedFromDescription', { + defaultMessage: 'ended from', +}); + +export const STARTED = i18n.translate('xpack.securitySolution.auditd.startedAtDescription', { + defaultMessage: 'started', +}); + +export const DISPOSED_CREDENTIALS_TO = i18n.translate( + 'xpack.securitySolution.auditd.disposedCredentialsDescription', + { + defaultMessage: 'disposed credentials to', + } +); + +export const ATTEMPTED_LOGIN = i18n.translate( + 'xpack.securitySolution.auditd.attemptedLoginDescription', + { + defaultMessage: 'attempted a login via', + } +); + +export const WITH_RESULT = i18n.translate('xpack.securitySolution.auditd.withResultDescription', { + defaultMessage: 'with result', +}); + +export const EXECUTED = i18n.translate('xpack.securitySolution.auditd.executedDescription', { + defaultMessage: 'executed', +}); + +export const AS = i18n.translate('xpack.securitySolution.auditd.asDescription', { + defaultMessage: 'as', +}); + +export const CONNECTED_USING = i18n.translate( + 'xpack.securitySolution.auditd.connectedUsingDescription', + { + defaultMessage: 'connected using', + } +); + +export const USING = i18n.translate('xpack.securitySolution.auditd.usingDescription', { + defaultMessage: 'using', +}); + +export const OPENED_FILE = i18n.translate('xpack.securitySolution.auditd.OpenedFileDescription', { + defaultMessage: 'opened file', +}); + +export const CHANGED_FILE_ATTRIBUTES_OF = i18n.translate( + 'xpack.securitySolution.auditd.ChangedFileAttributesOfDescription', + { + defaultMessage: 'changed file attributes of', + } +); + +export const CHANGED_FILE_PERMISSIONS_OF = i18n.translate( + 'xpack.securitySolution.auditd.changedFilePermissionOfDescription', + { + defaultMessage: 'changed file permissions of', + } +); + +export const CHANGED_FILE_OWNERSHIP_OF = i18n.translate( + 'xpack.securitySolution.auditd.changeidleOwernshipOfDescription', + { + defaultMessage: 'changed file ownership of', + } +); + +export const LOADED_KERNEL_MODULE = i18n.translate( + 'xpack.securitySolution.auditd.loaedKernelModuleOfDescription', + { + defaultMessage: 'loaded kernel module of', + } +); + +export const UNLOADED_KERNEL_MODULE_OF = i18n.translate( + 'xpack.securitySolution.auditd.unloadedKernelModuleOfDescription', + { + defaultMessage: 'unloaded kernel module of', + } +); + +export const CREATED_DIRECTORY = i18n.translate( + 'xpack.securitySolution.auditd.createdDirectoryDescription', + { + defaultMessage: 'created directory', + } +); + +export const MOUNTED = i18n.translate('xpack.securitySolution.auditd.mountedDescription', { + defaultMessage: 'mounted', +}); + +export const RENAMED = i18n.translate('xpack.securitySolution.auditd.renamedDescription', { + defaultMessage: 'renamed', +}); + +export const CHECKED_METADATA_OF = i18n.translate( + 'xpack.securitySolution.auditd.chedckedMetaDataOfDescription', + { + defaultMessage: 'checked metadata of', + } +); + +export const CHECKED_FILE_SYSTEM_METADATA_OF = i18n.translate( + 'xpack.securitySolution.auditd.checkedFileSystemMetadataOfDescription', + { + defaultMessage: 'checked filesystem metadata of', + } +); + +export const SYMLINKED = i18n.translate('xpack.securitySolution.auditd.symLinkedDescription', { + defaultMessage: 'symbolically linked', +}); + +export const UNMOUNTED = i18n.translate('xpack.securitySolution.auditd.unmountedDescription', { + defaultMessage: 'unmounted', +}); + +export const DELETED = i18n.translate('xpack.securitySolution.auditd.deletedDescription', { + defaultMessage: 'deleted', +}); + +export const CHANGED_TIME_STAMP_OF = i18n.translate( + 'xpack.securitySolution.auditd.changedTimeStampOfDescription', + { + defaultMessage: 'changed time stamp of', + } +); + +export const LISTEN_FOR_CONNECTIONS = i18n.translate( + 'xpack.securitySolution.auditd.ListeningForConnectionsUsingDescription', + { + defaultMessage: 'listening for connections using', + } +); + +export const BOUND_SOCKET_FROM = i18n.translate( + 'xpack.securitySolution.auditd.boundSocketFromDescription', + { + defaultMessage: 'bound socket from', + } +); + +export const RECEIVED_FROM = i18n.translate( + 'xpack.securitySolution.auditd.receivedFromDescription', + { + defaultMessage: 'received from', + } +); + +export const SENT_TO = i18n.translate('xpack.securitySolution.auditd.sentToDescription', { + defaultMessage: 'sent to', +}); + +export const KILLED_PROCESS_ID_OF = i18n.translate( + 'xpack.securitySolution.auditd.killedProcessIdDescription', + { + defaultMessage: 'killed process id of', + } +); + +export const CHANGED_IDENTITY_USING = i18n.translate( + 'xpack.securitySolution.auditd.changedIdentityUsingDescription', + { + defaultMessage: 'changed identity using', + } +); + +export const CHANGED_SYSTEM_TIME_WITH = i18n.translate( + 'xpack.securitySolution.auditd.changedSystemTimeWithDescription', + { + defaultMessage: 'changed system time with', + } +); + +export const MADE_DEVICE_WITH = i18n.translate( + 'xpack.securitySolution.auditd.madeDeviceWithDescription', + { + defaultMessage: 'made device with', + } +); + +export const CHANGED_SYSTEM_NAME = i18n.translate( + 'xpack.securitySolution.auditd.changedSystemNameDescription', + { + defaultMessage: 'changed system name', + } +); + +export const ALLOCATED_MEMORY_FOR = i18n.translate( + 'xpack.securitySolution.auditd.allocatedMemoryForDescription', + { + defaultMessage: 'allocated memory for', + } +); + +export const SCHEDULED_POLICY_OF = i18n.translate( + 'xpack.securitySolution.auditd.scheduledPolicyOFDescription', + { + defaultMessage: 'scheduled policy of', + } +); + +export const ADDED_USER_ACCOUNT = i18n.translate( + 'xpack.securitySolution.auditd.addedUserAccountDescription', + { + defaultMessage: 'added user account', + } +); + +export const CAUSED_MAC_POLICY_ERROR = i18n.translate( + 'xpack.securitySolution.auditd.causedMacPolicyErrorDescription', + { + defaultMessage: 'caused mac policy error', + } +); + +export const LOADED_FIREWALL_RULE = i18n.translate( + 'xpack.securitySolution.auditd.loadedFirewallRuleDescription', + { + defaultMessage: 'loaded firewall rule', + } +); + +export const CHANGED_PROMISCUOUS_MODE = i18n.translate( + 'xpack.securitySolution.auditd.promiscuousModeDescription', + { + defaultMessage: 'changed promiscuous mode on the device using', + } +); + +export const LOCKED_ACCOUNT = i18n.translate( + 'xpack.securitySolution.auditd.lockedAccountDescription', + { + defaultMessage: 'locked account', + } +); + +export const UNLOCKED_ACCOUNT = i18n.translate( + 'xpack.securitySolution.auditd.unlockedAccountDescription', + { + defaultMessage: 'unlocked account', + } +); + +export const ADDED_GROUP_ACCOUNT_USING = i18n.translate( + 'xpack.securitySolution.auditd.adddedGroupAccountUsingDescription', + { + defaultMessage: 'added group account using', + } +); + +export const CRASHED_PROGRAM = i18n.translate( + 'xpack.securitySolution.auditd.crashedProgramDescription', + { + defaultMessage: 'crashed program', + } +); + +export const EXECUTION_OF_FORBIDDEN_PROGRAM = i18n.translate( + 'xpack.securitySolution.auditd.executionOfForbiddenProgramDescription', + { + defaultMessage: 'execution of forbidden program', + } +); + +export const USED_SUSPICIOUS_PROGRAM = i18n.translate( + 'xpack.securitySolution.auditd.suspiciousProgramDescription', + { + defaultMessage: 'used suspicious program', + } +); + +export const FAILED_LOGIN_TOO_MANY_TIMES = i18n.translate( + 'xpack.securitySolution.auditd.failedLoginTooManyTimesDescription', + { + defaultMessage: 'failed login due to logging in too many times', + } +); + +export const ATTEMPTED_LOGIN_FROM_UNUSUAL_PLACE = i18n.translate( + 'xpack.securitySolution.auditd.attemptedLoginFromUnusalPlaceDescription', + { + defaultMessage: 'attempted login from unusual place', + } +); + +export const OPENED_TOO_MANY_SESSIONS = i18n.translate( + 'xpack.securitySolution.auditd.openedTooManySessionsDescription', + { + defaultMessage: 'opened too many sessions', + } +); + +export const ATTEMPTED_LOGIN_FROM_UNUSUAL_HOUR = i18n.translate( + 'xpack.securitySolution.auditd.attemptedLoginFromUnusualHourDescription', + { + defaultMessage: 'attempted login from unusual hour', + } +); + +export const TESTED_FILE_SYSTEM_INTEGRITY = i18n.translate( + 'xpack.securitySolution.auditd.testedFileSystemIntegrityDescription', + { + defaultMessage: 'tested file system integrity', + } +); + +export const VIOLATED_SELINUX_POLICY = i18n.translate( + 'xpack.securitySolution.auditd.violatedSeLinuxPolicyDescription', + { + defaultMessage: 'violated selinux policy', + } +); + +export const VIOLATED_APP_ARMOR_POLICY_FROM = i18n.translate( + 'xpack.securitySolution.auditd.violatedAppArmorPolicyFromDescription', + { + defaultMessage: 'violated app armor policy from', + } +); + +export const CHANGED_GROUP = i18n.translate( + 'xpack.securitySolution.auditd.changedGroupDescription', + { + defaultMessage: 'changed group', + } +); + +export const CHANGED_USER_ID = i18n.translate( + 'xpack.securitySolution.auditd.changedUserIdDescription', + { + defaultMessage: 'changed user id', + } +); + +export const CHANGED_AUDIT_CONFIGURATION = i18n.translate( + 'xpack.securitySolution.auditd.changedAuditConfigurationDescription', + { + defaultMessage: 'changed audit configuration', + } +); + +export const REFRESHED_CREDENTIALS_FOR = i18n.translate( + 'xpack.securitySolution.auditd.refreshedCredentialsForDescription', + { + defaultMessage: 'refreshed credentials for', + } +); + +export const NEGOTIATED_CRYPTO_KEY = i18n.translate( + 'xpack.securitySolution.auditd.negotiatedCryptoKeyDescription', + { + defaultMessage: 'negotiated crypto key', + } +); + +export const CRYPTO_OFFICER_LOGGED_IN = i18n.translate( + 'xpack.securitySolution.auditd.cryptoOfficerLoggedInDescription', + { + defaultMessage: 'crypto officer logged in', + } +); + +export const CRYPTO_OFFICER_LOGGED_OUT = i18n.translate( + 'xpack.securitySolution.auditd.cryptoOfficerLoggedOutDescription', + { + defaultMessage: 'crypto officer logged out', + } +); + +export const STARTED_CRYPTO_SESSION = i18n.translate( + 'xpack.securitySolution.auditd.startedCryptoSessionDescription', + { + defaultMessage: 'started crypto session', + } +); + +export const ACCESS_RESULT = i18n.translate( + 'xpack.securitySolution.auditd.accessResultDescription', + { + defaultMessage: 'access result', + } +); + +export const ABORTED_AUDIT_STARTUP = i18n.translate( + 'xpack.securitySolution.auditd.abortedAuditStartupDescription', + { + defaultMessage: 'aborted audit startup', + } +); + +export const REMOTE_AUDIT_CONNECTED = i18n.translate( + 'xpack.securitySolution.auditd.remoteAuditConnectedDescription', + { + defaultMessage: 'remote audit connected', + } +); + +export const REMOTE_AUDIT_DISCONNECTED = i18n.translate( + 'xpack.securitySolution.auditd.remoteAuditDisconnectedDescription', + { + defaultMessage: 'remote audit disconnected', + } +); + +export const SHUTDOWN_AUDIT = i18n.translate( + 'xpack.securitySolution.auditd.shutDownAuditDescription', + { + defaultMessage: 'shutdown audit', + } +); + +export const AUDIT_ERROR = i18n.translate('xpack.securitySolution.auditd.auditErrorDescription', { + defaultMessage: 'audit error', +}); + +export const RECONFIGURED_AUDIT = i18n.translate( + 'xpack.securitySolution.auditd.reconfiguredAuditDescription', + { + defaultMessage: 'reconfigured audit', + } +); + +export const RESUMED_AUDIT_LOGGING = i18n.translate( + 'xpack.securitySolution.auditd.resumedAuditLoggingDescription', + { + defaultMessage: 'resumed audit logging', + } +); + +export const ROTATED_AUDIT_LOGS = i18n.translate( + 'xpack.securitySolution.auditd.rotatedAuditLogsDescription', + { + defaultMessage: 'rotated-audit-logs', + } +); + +export const STARTED_AUDIT = i18n.translate( + 'xpack.securitySolution.auditd.startedAuditDescription', + { + defaultMessage: 'started audit', + } +); + +export const DELETED_GROUP_ACCOUNT_USING = i18n.translate( + 'xpack.securitySolution.auditd.deletedGroupAccountUsingDescription', + { + defaultMessage: 'deleted group account using', + } +); + +export const DELETED_USER_ACCOUNT_USING = i18n.translate( + 'xpack.securitySolution.auditd.deletedUserAccountUsingDescription', + { + defaultMessage: 'deleted user account using', + } +); + +export const CHANGED_AUDIT_FEATURE = i18n.translate( + 'xpack.securitySolution.auditd.changedAuditFeatureDescription', + { + defaultMessage: 'changed audit feature', + } +); + +export const RELABELED_FILESYSTEM = i18n.translate( + 'xpack.securitySolution.auditd.relabeledFileSystemDescription', + { + defaultMessage: 'relabeled filesystem', + } +); + +export const AUTHENTICATED_TO_GROUP = i18n.translate( + 'xpack.securitySolution.auditd.authenticatedToGroupDescription', + { + defaultMessage: 'authenticated to group', + } +); + +export const CHANGED_GROUP_PASSWORD = i18n.translate( + 'xpack.securitySolution.auditd.changedGroupPasswordDescription', + { + defaultMessage: 'changed group password', + } +); + +export const MODIFIED_GROUP_ACCOUNT = i18n.translate( + 'xpack.securitySolution.auditd.modifiedGroupAccountDescription', + { + defaultMessage: 'modified group account', + } +); + +export const INITIALIZED_AUDIT_SUBSYSTEM = i18n.translate( + 'xpack.securitySolution.auditd.initializedAuditSubsystemDescription', + { + defaultMessage: 'initialized audit subsystem', + } +); + +export const MODIFIED_LEVEL_OF = i18n.translate( + 'xpack.securitySolution.auditd.modifiedLevelOfDescription', + { + defaultMessage: 'modified level of', + } +); + +export const OVERRODE_LABEL_OF = i18n.translate( + 'xpack.securitySolution.auditd.overrodeLabelOfDescription', + { + defaultMessage: 'overrode label of', + } +); + +export const CHANGED_LOGIN_ID_TO = i18n.translate( + 'xpack.securitySolution.auditd.changedLoginIdToDescription', + { + defaultMessage: 'changed login id to', + } +); + +export const MAC_PERMISSION = i18n.translate( + 'xpack.securitySolution.auditd.macPermissionDescription', + { + defaultMessage: 'mac permission', + } +); + +export const CHANGED_SELINUX_BOOLEAN = i18n.translate( + 'xpack.securitySolution.auditd.changedSeLinuxBooleanDescription', + { + defaultMessage: 'changed selinux boolean', + } +); + +export const LOADED_SELINUX_POLICY = i18n.translate( + 'xpack.securitySolution.auditd.loadedSeLinuxPolicyDescription', + { + defaultMessage: 'loaded selinux policy', + } +); + +export const CHANGED_SELINUX_ENFORCEMENT = i18n.translate( + 'xpack.securitySolution.auditd.changedSelinuxEnforcementDescription', + { + defaultMessage: 'changed selinux enforcement', + } +); + +export const ASSIGNED_USER_ROLE_TO = i18n.translate( + 'xpack.securitySolution.auditd.assignedUserRoleToDescription', + { + defaultMessage: 'assigned user role to', + } +); + +export const MODIFIED_ROLE = i18n.translate( + 'xpack.securitySolution.auditd.modifiedRoleDescription', + { + defaultMessage: 'modified role', + } +); + +export const REMOVED_USER_ROLE_FROM = i18n.translate( + 'xpack.securitySolution.auditd.removedUserRoleFromDescription', + { + defaultMessage: 'removed user role from', + } +); + +export const VIOLATED_SECCOMP_POLICY_WITH = i18n.translate( + 'xpack.securitySolution.auditd.violatedSeccompPolicyWithDescription', + { + defaultMessage: 'violated seccomp policy with', + } +); + +export const STARTED_SERVICE = i18n.translate( + 'xpack.securitySolution.auditd.startedServiceDescription', + { + defaultMessage: 'started service', + } +); + +export const STOPPED_SERVICE = i18n.translate( + 'xpack.securitySolution.auditd.stoppedServiceDescription', + { + defaultMessage: 'stopped service', + } +); + +export const BOOTED_SYSTEM = i18n.translate( + 'xpack.securitySolution.auditd.bootedSystemDescription', + { + defaultMessage: 'booted system', + } +); + +export const CHANGED_TO_RUN_LEVEL_WITH = i18n.translate( + 'xpack.securitySolution.auditd.changedToRunLevelWithDescription', + { + defaultMessage: 'changed to run level with', + } +); + +export const SHUTDOWN_SYSTEM = i18n.translate( + 'xpack.securitySolution.auditd.shutdownSystemDescription', + { + defaultMessage: 'shutdown system', + } +); + +export const SENT_TEST = i18n.translate('xpack.securitySolution.auditd.sentTestDescription', { + defaultMessage: 'sent test', +}); + +export const UNKNOWN = i18n.translate('xpack.securitySolution.auditd.unknownDescription', { + defaultMessage: 'unknown', +}); + +export const SENT_MESSAGE = i18n.translate('xpack.securitySolution.auditd.sentMessageDescription', { + defaultMessage: 'sent message', +}); + +export const ACCESS_PERMISSION = i18n.translate( + 'xpack.securitySolution.auditd.accessPermissionDescription', + { + defaultMessage: 'access permission', + } +); + +export const AUTHENTICATED_USING = i18n.translate( + 'xpack.securitySolution.auditd.authenticatedUsingDescription', + { + defaultMessage: 'authenticated using', + } +); + +export const CHANGED_PASSWORD_WITH = i18n.translate( + 'xpack.securitySolution.auditd.changedPasswordWithDescription', + { + defaultMessage: 'changed password with', + } +); + +export const RAN_COMMAND = i18n.translate('xpack.securitySolution.auditd.ranCommandDescription', { + defaultMessage: 'ran command', +}); + +export const ERROR_FROM = i18n.translate('xpack.securitySolution.auditd.errorFromDescription', { + defaultMessage: 'error from', +}); + +export const LOGGED_OUT = i18n.translate('xpack.securitySolution.auditd.loggedOutDescription', { + defaultMessage: 'logged out', +}); + +export const CHANGED_MAC_CONFIGURATION = i18n.translate( + 'xpack.securitySolution.auditd.changedMacConfigurationDescription', + { + defaultMessage: 'changed mac configuration', + } +); + +export const LOADED_MAC_POLICY = i18n.translate( + 'xpack.securitySolution.auditd.loadedMacPolicyDescription', + { + defaultMessage: 'loaded mac policy', + } +); + +export const MODIFIED_USER_ACCOUNT = i18n.translate( + 'xpack.securitySolution.auditd.modifiedUserAccountDescription', + { + defaultMessage: 'modified user account', + } +); +export const CHANGED_ROLE_USING = i18n.translate( + 'xpack.securitySolution.auditd.changedRoleUsingDescription', + { + defaultMessage: 'changed role using', + } +); + +export const ACCESS_ERROR = i18n.translate('xpack.securitySolution.auditd.accessErrorDescription', { + defaultMessage: 'access error', +}); + +export const CHANGED_CONFIGURATION_WITH = i18n.translate( + 'xpack.securitySolution.auditd.changedConfigurationWIthDescription', + { + defaultMessage: 'changed configuration with', + } +); + +export const ISSUED_VM_CONTROL = i18n.translate( + 'xpack.securitySolution.auditd.issuedVmControlDescription', + { + defaultMessage: 'issued vm control', + } +); + +export const CREATED_VM_IMAGE = i18n.translate( + 'xpack.securitySolution.auditd.createdVmImageDescription', + { + defaultMessage: 'created vm image', + } +); + +export const DELETED_VM_IMAGE = i18n.translate( + 'xpack.securitySolution.auditd.deletedVmImageDescription', + { + defaultMessage: 'deleted vm image', + } +); + +export const CHECKED_INTEGRITY_OF = i18n.translate( + 'xpack.securitySolution.auditd.checkedIntegrityOfDescription', + { + defaultMessage: 'checked integrity of', + } +); + +export const ASSIGNED_VM_ID = i18n.translate( + 'xpack.securitySolution.auditd.assignedVmIdDescription', + { + defaultMessage: 'assigned vm id', + } +); + +export const MIGRATED_VM_FROM = i18n.translate( + 'xpack.securitySolution.auditd.migratedVmFromDescription', + { + defaultMessage: 'migrated vm from', + } +); + +export const MIGRATED_VM_TO = i18n.translate( + 'xpack.securitySolution.auditd.migratedVmToDescription', + { + defaultMessage: 'migrated vm to', + } +); + +export const ASSIGNED_VM_RESOURCE = i18n.translate( + 'xpack.securitySolution.auditd.assignedVMResourceDescription', + { + defaultMessage: 'assigned vm resource', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/bytes/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/bytes/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/bytes/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/bytes/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/bytes/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/bytes/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/bytes/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/bytes/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/column_renderer.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/constants.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/constants.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/constants.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/constants.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/translations.ts similarity index 59% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/translations.ts index b86b88370cdf5..53ad93d20a3da 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/dns/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/translations.ts @@ -7,32 +7,35 @@ import { i18n } from '@kbn/i18n'; export const ASKED_FOR = i18n.translate( - 'xpack.siem.timeline.body.renderers.dns.askedForDescription', + 'xpack.securitySolution.timeline.body.renderers.dns.askedForDescription', { defaultMessage: 'asked for', } ); export const RESPONSE_CODE = i18n.translate( - 'xpack.siem.timeline.body.renderers.dns.responseCodeDescription', + 'xpack.securitySolution.timeline.body.renderers.dns.responseCodeDescription', { defaultMessage: 'response code:', } ); -export const VIA = i18n.translate('xpack.siem.timeline.body.renderers.dns.viaDescription', { - defaultMessage: 'via', -}); +export const VIA = i18n.translate( + 'xpack.securitySolution.timeline.body.renderers.dns.viaDescription', + { + defaultMessage: 'via', + } +); export const WHICH_RESOLVED_TO = i18n.translate( - 'xpack.siem.timeline.body.renderers.dns.whichResolvedToDescription', + 'xpack.securitySolution.timeline.body.renderers.dns.whichResolvedToDescription', { defaultMessage: ', which resolved to', } ); export const WITH_QUESTION_TYPE = i18n.translate( - 'xpack.siem.timeline.body.renderers.dns.withQuestionTypeDescription', + 'xpack.securitySolution.timeline.body.renderers.dns.withQuestionTypeDescription', { defaultMessage: 'with question type', } diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/helpers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/helpers.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/helpers.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/translations.ts similarity index 53% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/translations.ts index b8c534bc1356c..0fdef7676cd61 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/endgame/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/translations.ts @@ -7,127 +7,133 @@ import { i18n } from '@kbn/i18n'; export const A_LOGIN_WAS_ATTEMPTED_USING_EXPLICIT_CREDENTIALS = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.aLoginWasAttemptedUsingExplicitCredentialsDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.aLoginWasAttemptedUsingExplicitCredentialsDescription', { defaultMessage: 'A login was attempted using explicit credentials', } ); export const AS_REQUESTED_BY_SUBJECT = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.asRequestedBySubjectDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.asRequestedBySubjectDescription', { defaultMessage: 'as requested by subject', } ); export const LOGGED_OFF = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.loggedOffDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.loggedOffDescription', { defaultMessage: 'logged off', } ); export const LOGON_TYPE_BATCH = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeBatchDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeBatchDescription', { defaultMessage: 'Batch', } ); export const LOGON_TYPE_CACHED_INTERACTIVE = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeCachedInteractiveDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeCachedInteractiveDescription', { defaultMessage: 'Cached Interactive', } ); export const LOGON_TYPE_INTERACTIVE = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeInteractiveDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeInteractiveDescription', { defaultMessage: 'Interactive', } ); export const LOGON_TYPE_NETWORK = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeNetworkDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNetworkDescription', { defaultMessage: 'Network', } ); export const LOGON_TYPE_NETWORK_CLEARTEXT = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeNetworkCleartextDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNetworkCleartextDescription', { defaultMessage: 'Network Cleartext', } ); export const LOGON_TYPE_NEW_CREDENTIALS = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeNewCredentialsDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNewCredentialsDescription', { defaultMessage: 'New Credentials', } ); export const LOGON_TYPE_REMOTE_INTERACTIVE = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeRemoteInteractiveDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeRemoteInteractiveDescription', { defaultMessage: 'Remote Interactive', } ); export const LOGON_TYPE_SERVICE = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeServiceDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeServiceDescription', { defaultMessage: 'Service', } ); export const LOGON_TYPE_UNLOCK = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.logonTypeUnlockDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.logonTypeUnlockDescription', { defaultMessage: 'Unlock', } ); export const SUBJECT_LOGON_ID = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.subjectLogonIdDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.subjectLogonIdDescription', { defaultMessage: 'subject logon ID', } ); export const SUCCESSFULLY_LOGGED_IN = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.successfullyLoggedInDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.successfullyLoggedInDescription', { defaultMessage: 'successfully logged in', } ); export const TARGET_LOGON_ID = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.targetLogonIdDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.targetLogonIdDescription', { defaultMessage: 'target logon ID', } ); -export const TO = i18n.translate('xpack.siem.timeline.body.renderers.endgame.toDescription', { - defaultMessage: 'to', -}); +export const TO = i18n.translate( + 'xpack.securitySolution.timeline.body.renderers.endgame.toDescription', + { + defaultMessage: 'to', + } +); export const USING_LOGON_TYPE = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.usingLogonTypeDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.usingLogonTypeDescription', { defaultMessage: 'using logon type', } ); -export const VIA = i18n.translate('xpack.siem.timeline.body.renderers.endgame.viaDescription', { - defaultMessage: 'via', -}); +export const VIA = i18n.translate( + 'xpack.securitySolution.timeline.body.renderers.endgame.viaDescription', + { + defaultMessage: 'via', + } +); export const WITH_SPECIAL_PRIVILEGES = i18n.translate( - 'xpack.siem.timeline.body.renderers.endgame.withSpecialPrivilegesDescription', + 'xpack.securitySolution.timeline.body.renderers.endgame.withSpecialPrivilegesDescription', { defaultMessage: 'With special privileges,', } diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/exit_code_draggable.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/exit_code_draggable.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/exit_code_draggable.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/exit_code_draggable.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/exit_code_draggable.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/exit_code_draggable.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/exit_code_draggable.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/exit_code_draggable.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/file_draggable.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/file_draggable.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/file_draggable.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/file_draggable.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/file_draggable.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/file_draggable.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/file_draggable.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/file_draggable.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/formatted_field.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/formatted_field.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/formatted_field.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_column_renderer.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_row_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/get_row_renderer.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/helpers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/host_working_dir.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_working_dir.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/host_working_dir.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_working_dir.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/host_working_dir.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_working_dir.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/host_working_dir.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_working_dir.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/index.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/index.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parent_process_draggable.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parent_process_draggable.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parent_process_draggable.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parent_process_draggable.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parent_process_draggable.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parent_process_draggable.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parent_process_draggable.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parent_process_draggable.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_query_value.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_query_value.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_query_value.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_query_value.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_query_value.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_query_value.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_query_value.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_query_value.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_value.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_value.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_value.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_value.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_value.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_value.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/parse_value.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/parse_value.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_draggable.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_draggable.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_draggable.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_draggable.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_draggable.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_draggable.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_draggable.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_draggable.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_hash.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_hash.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_hash.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_hash.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_hash.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_hash.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/process_hash.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/process_hash.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_links.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_links.test.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.test.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_refs.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_refs.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_refs.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_refs.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/auth_ssh.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/auth_ssh.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/auth_ssh.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/auth_ssh.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/auth_ssh.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/auth_ssh.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/auth_ssh.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/auth_ssh.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_file_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_file_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/package.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/package.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/package.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/package.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/package.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/package.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/package.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/package.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/translations.ts new file mode 100644 index 0000000000000..f510420b80920 --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/translations.ts @@ -0,0 +1,214 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +// Note for translators and programmers +// Examples of these strings are all of the form +// Session {user.name}@{hostname} in {folder} was authorized to use {executable} with result {result.success/failure} +// E.x. Frank@server-1 in /root was authorized to use wget with result success + +// However, the strings can be dropped depending on the circumstances of the variables. For example, with no data at all +// Example with just a user name and hostname +// Session 20 frank@server-1 +// Example with user name, hostname, but no result +// Session 20 frank@server-1 started process curl + +export const SESSION = i18n.translate('xpack.securitySolution.system.systemDescription', { + defaultMessage: 'System', +}); + +export const WITH_RESULT = i18n.translate('xpack.securitySolution.system.withResultDescription', { + defaultMessage: 'with result', +}); + +export const WAS_AUTHORIZED_TO_USE = i18n.translate( + 'xpack.securitySolution.system.wasAuthorizedToUseDescription', + { + defaultMessage: 'was authorized to use', + } +); + +export const ACCEPTED_A_CONNECTION_VIA = i18n.translate( + 'xpack.securitySolution.system.acceptedAConnectionViaDescription', + { + defaultMessage: 'accepted a connection via', + } +); + +export const ATTEMPTED_LOGIN = i18n.translate( + 'xpack.securitySolution.system.attemptedLoginDescription', + { + defaultMessage: 'attempted a login via', + } +); + +export const DISCONNECTED_VIA = i18n.translate( + 'xpack.securitySolution.system.disconnectedViaDescription', + { + defaultMessage: 'disconnected via', + } +); + +export const LOGGED_OUT = i18n.translate('xpack.securitySolution.system.loggedOutDescription', { + defaultMessage: 'logged out via', +}); + +export const USING = i18n.translate('xpack.securitySolution.system.usingDescription', { + defaultMessage: 'using', +}); + +export const PROCESS_STARTED = i18n.translate( + 'xpack.securitySolution.system.processStartedDescription', + { + defaultMessage: 'started process', + } +); + +export const PROCESS_STOPPED = i18n.translate( + 'xpack.securitySolution.system.processStoppedDescription', + { + defaultMessage: 'stopped process', + } +); + +export const TERMINATED_PROCESS = i18n.translate( + 'xpack.securitySolution.system.terminatedProcessDescription', + { + defaultMessage: 'terminated process', + } +); + +export const CREATED_FILE = i18n.translate('xpack.securitySolution.system.createdFileDescription', { + defaultMessage: 'created a file', +}); + +export const DELETED_FILE = i18n.translate('xpack.securitySolution.system.deletedFileDescription', { + defaultMessage: 'deleted a file', +}); + +export const EXISTING_PROCESS = i18n.translate( + 'xpack.securitySolution.system.existingProcessDescription', + { + defaultMessage: 'is running process', + } +); + +export const SOCKET_OPENED = i18n.translate( + 'xpack.securitySolution.system.socketOpenedDescription', + { + defaultMessage: 'opened a socket with', + } +); + +export const SOCKET_CLOSED = i18n.translate( + 'xpack.securitySolution.system.socketClosedDescription', + { + defaultMessage: 'closed a socket with', + } +); + +export const EXISTING_USER = i18n.translate( + 'xpack.securitySolution.system.existingUserDescription', + { + defaultMessage: 'is an existing user', + } +); + +export const EXISTING_SOCKET = i18n.translate( + 'xpack.securitySolution.system.existingSocketDescription', + { + defaultMessage: 'is using an existing socket from', + } +); + +export const EXISTING_PACKAGE = i18n.translate( + 'xpack.securitySolution.system.existingPackageDescription', + { + defaultMessage: 'is using an existing package', + } +); + +export const INVALID = i18n.translate('xpack.securitySolution.system.invalidDescription', { + defaultMessage: 'attempted invalid usage of', +}); + +export const USER_CHANGED = i18n.translate('xpack.securitySolution.system.userChangedDescription', { + defaultMessage: 'user has changed', +}); + +export const HOST_CHANGED = i18n.translate('xpack.securitySolution.system.hostDescription', { + defaultMessage: 'host information', +}); + +export const USER_ADDED = i18n.translate('xpack.securitySolution.system.userAddedDescription', { + defaultMessage: 'user was added', +}); + +export const PROCESS_ERROR = i18n.translate( + 'xpack.securitySolution.system.processErrorDescription', + { + defaultMessage: 'encountered a process error with', + } +); + +export const ERROR = i18n.translate('xpack.securitySolution.system.errorDescription', { + defaultMessage: 'encountered an error with', +}); + +export const PACKAGE_INSTALLED = i18n.translate( + 'xpack.securitySolution.system.packageInstalledDescription', + { + defaultMessage: 'installed package', + } +); + +export const BOOT = i18n.translate( + 'xpack.securitySolution.system.packageSystemStartedDescription', + { + defaultMessage: 'system started', + } +); + +export const ACCEPTED = i18n.translate('xpack.securitySolution.system.acceptedDescription', { + defaultMessage: 'accepted the user via', +}); + +export const PACKAGE_UPDATED = i18n.translate( + 'xpack.securitySolution.system.packageUpdatedDescription', + { + defaultMessage: 'updated package', + } +); + +export const PACKAGE_REMOVED = i18n.translate( + 'xpack.securitySolution.system.packageRemovedDescription', + { + defaultMessage: 'removed package', + } +); + +export const USER_REMOVED = i18n.translate('xpack.securitySolution.system.userRemovedDescription', { + defaultMessage: 'was removed', +}); + +export const VIA = i18n.translate('xpack.securitySolution.system.viaDescription', { + defaultMessage: 'via', +}); + +export const VIA_PARENT_PROCESS = i18n.translate( + 'xpack.securitySolution.system.viaParentProcessDescription', + { + defaultMessage: 'via parent process', + } +); + +export const WITH_EXIT_CODE = i18n.translate( + 'xpack.securitySolution.system.withExitCodeDescription', + { + defaultMessage: 'with exit code', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts similarity index 50% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts index 5bdeccbd0f4ba..92ebd9c2b0e36 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts @@ -6,32 +6,32 @@ import { i18n } from '@kbn/i18n'; -export const TCP = i18n.translate('xpack.siem.timeline.tcp', { +export const TCP = i18n.translate('xpack.securitySolution.timeline.tcp', { defaultMessage: 'TCP', }); -export const DESTINATION = i18n.translate('xpack.siem.timeline.destination', { +export const DESTINATION = i18n.translate('xpack.securitySolution.timeline.destination', { defaultMessage: 'Destination', }); -export const PROTOCOL = i18n.translate('xpack.siem.timeline.protocol', { +export const PROTOCOL = i18n.translate('xpack.securitySolution.timeline.protocol', { defaultMessage: 'Protocol', }); -export const SOURCE = i18n.translate('xpack.siem.timeline.source', { +export const SOURCE = i18n.translate('xpack.securitySolution.timeline.source', { defaultMessage: 'Source', }); -export const IN = i18n.translate('xpack.siem.auditd.inDescription', { +export const IN = i18n.translate('xpack.securitySolution.auditd.inDescription', { defaultMessage: 'in', }); -export const NON_EXISTENT = i18n.translate('xpack.siem.auditd.nonExistentDescription', { +export const NON_EXISTENT = i18n.translate('xpack.securitySolution.auditd.nonExistentDescription', { defaultMessage: 'an unknown process', }); export const LINK_ELASTIC_ENDPOINT_SECURITY = i18n.translate( - 'xpack.siem.event.module.linkToElasticEndpointSecurityDescription', + 'xpack.securitySolution.event.module.linkToElasticEndpointSecurityDescription', { defaultMessage: 'Open in Elastic Endpoint Security', } diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/user_host_working_dir.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_host_working_dir.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/user_host_working_dir.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_host_working_dir.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/user_host_working_dir.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_host_working_dir.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/user_host_working_dir.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_host_working_dir.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/translations.ts similarity index 58% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/translations.ts index b45e7878b12ba..b972f0d93d6b3 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/translations.ts @@ -8,57 +8,57 @@ import { i18n } from '@kbn/i18n'; // English Text for these codes are shortened from // https://docs.zeek.org/en/stable/scripts/base/protocols/conn/main.bro.html -export const S0 = i18n.translate('xpack.siem.zeek.s0Description', { +export const S0 = i18n.translate('xpack.securitySolution.zeek.s0Description', { defaultMessage: 'Connection attempt seen, no reply', }); -export const S1 = i18n.translate('xpack.siem.zeek.s1Description', { +export const S1 = i18n.translate('xpack.securitySolution.zeek.s1Description', { defaultMessage: 'Connection established, not terminated', }); -export const S2 = i18n.translate('xpack.siem.zeek.s2Description', { +export const S2 = i18n.translate('xpack.securitySolution.zeek.s2Description', { defaultMessage: 'Connection established and close attempt by originator seen (but no reply from responder)', }); -export const S3 = i18n.translate('xpack.siem.zeek.s3Description', { +export const S3 = i18n.translate('xpack.securitySolution.zeek.s3Description', { defaultMessage: 'Connection established and close attempt by responder seen (but no reply from originator)', }); -export const SF = i18n.translate('xpack.siem.zeek.sfDescription', { +export const SF = i18n.translate('xpack.securitySolution.zeek.sfDescription', { defaultMessage: 'Normal SYN/FIN completion', }); -export const REJ = i18n.translate('xpack.siem.zeek.rejDescription', { +export const REJ = i18n.translate('xpack.securitySolution.zeek.rejDescription', { defaultMessage: 'Connection attempt rejected', }); -export const RSTO = i18n.translate('xpack.siem.zeek.rstoODescription', { +export const RSTO = i18n.translate('xpack.securitySolution.zeek.rstoODescription', { defaultMessage: 'Connection established, originator aborted (sent a RST)', }); -export const RSTR = i18n.translate('xpack.siem.zeek.rstrDescription', { +export const RSTR = i18n.translate('xpack.securitySolution.zeek.rstrDescription', { defaultMessage: 'Established, responder aborted', }); -export const RSTOS0 = i18n.translate('xpack.siem.zeek.rstosoDescription', { +export const RSTOS0 = i18n.translate('xpack.securitySolution.zeek.rstosoDescription', { defaultMessage: 'Originator sent a SYN followed by a RST, no SYN-ACK from the responder', }); -export const RSTRH = i18n.translate('xpack.siem.zeek.rstrhDescription', { +export const RSTRH = i18n.translate('xpack.securitySolution.zeek.rstrhDescription', { defaultMessage: 'Responder sent a SYN ACK followed by a RST, no SYN from the (purported) originator', }); -export const SH = i18n.translate('xpack.siem.zeek.shDescription', { +export const SH = i18n.translate('xpack.securitySolution.zeek.shDescription', { defaultMessage: 'Originator sent a SYN followed by a FIN, no SYN ACK from the responder', }); -export const SHR = i18n.translate('xpack.siem.zeek.shrDescription', { +export const SHR = i18n.translate('xpack.securitySolution.zeek.shrDescription', { defaultMessage: 'Responder sent a SYN ACK followed by a FIN, no SYN from the originator', }); -export const OTH = i18n.translate('xpack.siem.zeek.othDescription', { +export const OTH = i18n.translate('xpack.securitySolution.zeek.othDescription', { defaultMessage: 'No SYN seen, just midstream traffic', }); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_details.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_details.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/sort/index.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/index.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/sort/index.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/index.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/sort/sort_indicator.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/sort/sort_indicator.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/sort/sort_indicator.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/sort/sort_indicator.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/stateful_body.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/stateful_body.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/stateful_body.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/stateful_body.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/stateful_body.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/stateful_body.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/body/stateful_body.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/body/stateful_body.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/translations.ts new file mode 100644 index 0000000000000..98f544f30ae8b --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/translations.ts @@ -0,0 +1,53 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const NOTES_TOOLTIP = i18n.translate( + 'xpack.securitySolution.timeline.body.notes.addOrViewNotesForThisEventTooltip', + { + defaultMessage: 'Add or view notes for this event', + } +); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.timeline.body.copyToClipboardButtonLabel', + { + defaultMessage: 'Copy to Clipboard', + } +); + +export const UNPINNED = i18n.translate( + 'xpack.securitySolution.timeline.body.pinning.unpinnedTooltip', + { + defaultMessage: 'Unpinned event', + } +); + +export const PINNED = i18n.translate('xpack.securitySolution.timeline.body.pinning.pinnedTooltip', { + defaultMessage: 'Pinned event', +}); + +export const PINNED_WITH_NOTES = i18n.translate( + 'xpack.securitySolution.timeline.body.pinning.pinnnedWithNotesTooltip', + { + defaultMessage: 'This event cannot be unpinned because it has notes', + } +); + +export const EXPAND = i18n.translate( + 'xpack.securitySolution.timeline.body.actions.expandAriaLabel', + { + defaultMessage: 'Expand', + } +); + +export const COLLAPSE = i18n.translate( + 'xpack.securitySolution.timeline.body.actions.collapseAriaLabel', + { + defaultMessage: 'Collapse', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/data_provider.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/data_provider.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/data_provider.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/data_provider.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/data_providers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/data_providers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/data_providers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/data_providers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/empty.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/empty.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/empty.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx similarity index 97% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/empty.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx index 240b336f4ecce..691c919029261 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/empty.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx @@ -8,7 +8,7 @@ import { EuiBadge, EuiText } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { AndOrBadge } from '../and_or_badge'; +import { AndOrBadge } from '../../../../common/components/and_or_badge'; import * as i18n from './translations'; diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx similarity index 97% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/helpers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx index 299a947503c96..61b4c2b23c267 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx @@ -356,7 +356,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); @@ -461,7 +461,7 @@ describe('helpers', () => { [dataProviderGroups[0][moveProviderFromSourceIndex]], ]), }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }) ); @@ -506,7 +506,7 @@ describe('helpers', () => { ), ]), }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }) ) @@ -558,7 +558,7 @@ describe('helpers', () => { ), ]), }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }) ) @@ -639,7 +639,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); @@ -759,7 +759,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); @@ -840,7 +840,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); }); @@ -960,7 +960,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); @@ -1016,7 +1016,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); @@ -1081,7 +1081,7 @@ describe('helpers', () => { }, ], }, - type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS', + type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS', }); }); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider_badge.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_badge.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider_badge.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_badge.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider_item_actions.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider_item_actions.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider_item_badge.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/provider_item_badge.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/providers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/providers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/providers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx similarity index 99% rename from x-pack/plugins/siem/public/timelines/components/timeline/data_providers/providers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx index bdd5e25eb3a9f..b5d44cf854458 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/providers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx @@ -10,7 +10,7 @@ import React, { useMemo } from 'react'; import { Draggable, DraggingStyle, Droppable, NotDraggingStyle } from 'react-beautiful-dnd'; import styled, { css } from 'styled-components'; -import { AndOrBadge } from '../and_or_badge'; +import { AndOrBadge } from '../../../../common/components/and_or_badge'; import { BrowserFields } from '../../../../common/containers/source'; import { getTimelineProviderDroppableId, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/translations.ts new file mode 100644 index 0000000000000..104ff44cb9b7c --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/translations.ts @@ -0,0 +1,150 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const AND = i18n.translate('xpack.securitySolution.dataProviders.and', { + defaultMessage: 'AND', +}); + +export const COPY_TO_CLIPBOARD = i18n.translate( + 'xpack.securitySolution.dataProviders.copyToClipboardTooltip', + { + defaultMessage: 'Copy to Clipboard', + } +); + +export const DELETE_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.deleteDataProvider', + { + defaultMessage: 'Delete', + } +); +export const DROP_HERE_TO_ADD_AN = i18n.translate( + 'xpack.securitySolution.dataProviders.dropHereToAddAnLabel', + { + defaultMessage: 'Drop here to add an', + } +); + +export const DROP_HERE = i18n.translate('xpack.securitySolution.dataProviders.dropHere', { + defaultMessage: 'Drop here', +}); + +export const DROP_ANYTHING = i18n.translate('xpack.securitySolution.dataProviders.dropAnything', { + defaultMessage: 'Drop anything', +}); + +export const EDIT = i18n.translate('xpack.securitySolution.dataProviders.edit', { + defaultMessage: 'Edit', +}); + +export const EDIT_MENU_ITEM = i18n.translate('xpack.securitySolution.dataProviders.editMenuItem', { + defaultMessage: 'Edit filter', +}); + +export const EDIT_TITLE = i18n.translate('xpack.securitySolution.dataProviders.editTitle', { + defaultMessage: 'EDIT FILTER', +}); + +export const EXCLUDE_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.excludeDataProvider', + { + defaultMessage: 'Exclude results', + } +); + +export const EXISTS_LABEL = i18n.translate('xpack.securitySolution.dataProviders.existsLabel', { + defaultMessage: 'exists', +}); + +export const FIELD = i18n.translate('xpack.securitySolution.dataProviders.fieldLabel', { + defaultMessage: 'Field', +}); + +export const FILTER_FOR_FIELD_PRESENT = i18n.translate( + 'xpack.securitySolution.dataProviders.filterForFieldPresentLabel', + { + defaultMessage: 'Filter for field present', + } +); + +export const HIGHLIGHTED = i18n.translate('xpack.securitySolution.dataProviders.highlighted', { + defaultMessage: 'highlighted', +}); + +export const HERE_TO_BUILD_AN = i18n.translate( + 'xpack.securitySolution.dataProviders.hereToBuildAn', + { + defaultMessage: 'here to build an', + } +); + +export const TO_BUILD_AN = i18n.translate('xpack.securitySolution.dataProviders.toBuildAn', { + defaultMessage: 'to build an', +}); + +export const INCLUDE_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.includeDataProvider', + { + defaultMessage: 'Include results', + } +); + +export const NOT = i18n.translate('xpack.securitySolution.dataProviders.not', { + defaultMessage: 'NOT', +}); + +export const OR = i18n.translate('xpack.securitySolution.dataProviders.or', { + defaultMessage: 'or', +}); + +export const QUERY = i18n.translate('xpack.securitySolution.dataProviders.query', { + defaultMessage: 'query', +}); + +export const TOGGLE = i18n.translate('xpack.securitySolution.dataProviders.toggle', { + defaultMessage: 'toggle', +}); + +export const RE_ENABLE_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.reEnableDataProvider', + { + defaultMessage: 'Re-enable', + } +); + +export const REMOVE_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.removeDataProvider', + { + defaultMessage: 'Remove Data Provider', + } +); + +export const SHOW_OPTIONS_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.showOptionsDataProvider', + { + defaultMessage: 'Show options for', + } +); + +export const TEMPORARILY_DISABLE_DATA_PROVIDER = i18n.translate( + 'xpack.securitySolution.dataProviders.temporaryDisableDataProvider', + { + defaultMessage: 'Temporarily disable', + } +); + +export const VALUE = i18n.translate('xpack.securitySolution.dataProviders.valuePlaceholder', { + defaultMessage: 'value', +}); + +export const VALUE_ARIA_LABEL = i18n.translate( + 'xpack.securitySolution.dataProviders.valueAriaLabel', + { + defaultMessage: 'value', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/events.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/events.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/expandable_event/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/expandable_event/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/expandable_event/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/expandable_event/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/expandable_event/translations.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/expandable_event/translations.tsx similarity index 62% rename from x-pack/plugins/siem/public/timelines/components/timeline/expandable_event/translations.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/expandable_event/translations.tsx index bc851cb200515..19b360b24391d 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/expandable_event/translations.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/expandable_event/translations.tsx @@ -7,12 +7,15 @@ import { i18n } from '@kbn/i18n'; export const COPY_TO_CLIPBOARD = i18n.translate( - 'xpack.siem.timeline.expandableEvent.copyToClipboardToolTip', + 'xpack.securitySolution.timeline.expandableEvent.copyToClipboardToolTip', { defaultMessage: 'Copy to Clipboard', } ); -export const EVENT = i18n.translate('xpack.siem.timeline.expandableEvent.eventToolTipTitle', { - defaultMessage: 'Event', -}); +export const EVENT = i18n.translate( + 'xpack.securitySolution.timeline.expandableEvent.eventToolTipTitle', + { + defaultMessage: 'Event', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/fetch_kql_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/fetch_kql_timeline.tsx similarity index 97% rename from x-pack/plugins/siem/public/timelines/components/timeline/fetch_kql_timeline.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/fetch_kql_timeline.tsx index e75f87e0d6011..77bd9aeba3ed2 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/fetch_kql_timeline.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/fetch_kql_timeline.tsx @@ -30,6 +30,7 @@ const TimelineKqlFetchComponent = memo( inputId, inspect: null, loading: false, + /* eslint-disable-next-line react-hooks/rules-of-hooks */ refetch: useUpdateKql({ indexPattern, kueryFilterQuery, diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/footer/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/footer/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/footer/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/footer/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/footer/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/footer/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx similarity index 99% rename from x-pack/plugins/siem/public/timelines/components/timeline/footer/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx index 19d474f09eadf..607e004a8294e 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/footer/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx @@ -341,7 +341,7 @@ export const FooterComponent = ({ color="subdued" content={ { test('Build KQL query with one data provider', () => { - const dataProviders = mockDataProviders.slice(0, 1); + const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); expect(cleanUpKqlQuery(kqlQuery)).toEqual('name : "Provider 1"'); }); @@ -56,18 +56,40 @@ describe('Build KQL Query', () => { }); test('Build KQL query with two data provider', () => { - const dataProviders = mockDataProviders.slice(0, 2); + const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); + const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); + expect(cleanUpKqlQuery(kqlQuery)).toEqual('(name : "Provider 1") or (name : "Provider 2")'); + }); + + test('Build KQL query with two data provider and first is disabled', () => { + const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); + dataProviders[0].enabled = false; + const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); + expect(cleanUpKqlQuery(kqlQuery)).toEqual('name : "Provider 2"'); + }); + + test('Build KQL query with two data provider and second is disabled', () => { + const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); + dataProviders[1].enabled = false; const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); - expect(cleanUpKqlQuery(kqlQuery)).toEqual('(name : "Provider 1" ) or (name : "Provider 2" )'); + expect(cleanUpKqlQuery(kqlQuery)).toEqual('name : "Provider 1"'); }); test('Build KQL query with one data provider and one and', () => { const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); - dataProviders[0].and = mockDataProviders.slice(1, 2); + dataProviders[0].and = cloneDeep(mockDataProviders.slice(1, 2)); const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); expect(cleanUpKqlQuery(kqlQuery)).toEqual('name : "Provider 1" and name : "Provider 2"'); }); + test('Build KQL query with one disabled data provider and one and', () => { + const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); + dataProviders[0].enabled = false; + dataProviders[0].and = cloneDeep(mockDataProviders.slice(1, 2)); + const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); + expect(cleanUpKqlQuery(kqlQuery)).toEqual('name : "Provider 2"'); + }); + test('Build KQL query with one data provider and one and as timestamp (string input)', () => { const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); dataProviders[0].and = cloneDeep(mockDataProviders.slice(1, 2)); @@ -106,28 +128,50 @@ describe('Build KQL Query', () => { test('Build KQL query with two data provider and multiple and', () => { const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); - dataProviders[0].and = mockDataProviders.slice(2, 4); - dataProviders[1].and = mockDataProviders.slice(4, 5); + dataProviders[0].and = cloneDeep(mockDataProviders.slice(2, 4)); + dataProviders[1].and = cloneDeep(mockDataProviders.slice(4, 5)); const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); expect(cleanUpKqlQuery(kqlQuery)).toEqual( '(name : "Provider 1" and name : "Provider 3" and name : "Provider 4") or (name : "Provider 2" and name : "Provider 5")' ); }); + test('Build KQL query with two data provider and multiple and and first data provider is disabled', () => { + const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); + dataProviders[0].enabled = false; + dataProviders[0].and = cloneDeep(mockDataProviders.slice(2, 4)); + dataProviders[1].and = cloneDeep(mockDataProviders.slice(4, 5)); + const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); + expect(cleanUpKqlQuery(kqlQuery)).toEqual( + '(name : "Provider 3" and name : "Provider 4") or (name : "Provider 2" and name : "Provider 5")' + ); + }); + + test('Build KQL query with two data provider and multiple and and first and provider is disabled', () => { + const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); + dataProviders[0].and = cloneDeep(mockDataProviders.slice(2, 4)); + dataProviders[0].and[0].enabled = false; + dataProviders[1].and = cloneDeep(mockDataProviders.slice(4, 5)); + const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); + expect(cleanUpKqlQuery(kqlQuery)).toEqual( + '(name : "Provider 1" and name : "Provider 4") or (name : "Provider 2" and name : "Provider 5")' + ); + }); + test('Build KQL query with all data provider', () => { const kqlQuery = buildGlobalQuery(mockDataProviders, mockBrowserFields); expect(cleanUpKqlQuery(kqlQuery)).toEqual( - '(name : "Provider 1" ) or (name : "Provider 2" ) or (name : "Provider 3" ) or (name : "Provider 4" ) or (name : "Provider 5" ) or (name : "Provider 6" ) or (name : "Provider 7" ) or (name : "Provider 8" ) or (name : "Provider 9" ) or (name : "Provider 10" )' + '(name : "Provider 1") or (name : "Provider 2") or (name : "Provider 3") or (name : "Provider 4") or (name : "Provider 5") or (name : "Provider 6") or (name : "Provider 7") or (name : "Provider 8") or (name : "Provider 9") or (name : "Provider 10")' ); }); test('Build complex KQL query with and and or', () => { const dataProviders = cloneDeep(mockDataProviders); - dataProviders[0].and = mockDataProviders.slice(2, 4); - dataProviders[1].and = mockDataProviders.slice(4, 5); + dataProviders[0].and = cloneDeep(mockDataProviders.slice(2, 4)); + dataProviders[1].and = cloneDeep(mockDataProviders.slice(4, 5)); const kqlQuery = buildGlobalQuery(dataProviders, mockBrowserFields); expect(cleanUpKqlQuery(kqlQuery)).toEqual( - '(name : "Provider 1" and name : "Provider 3" and name : "Provider 4") or (name : "Provider 2" and name : "Provider 5") or (name : "Provider 3" ) or (name : "Provider 4" ) or (name : "Provider 5" ) or (name : "Provider 6" ) or (name : "Provider 7" ) or (name : "Provider 8" ) or (name : "Provider 9" ) or (name : "Provider 10" )' + '(name : "Provider 1" and name : "Provider 3" and name : "Provider 4") or (name : "Provider 2" and name : "Provider 5") or (name : "Provider 3") or (name : "Provider 4") or (name : "Provider 5") or (name : "Provider 6") or (name : "Provider 7") or (name : "Provider 8") or (name : "Provider 9") or (name : "Provider 10")' ); }); }); @@ -223,7 +267,7 @@ describe('Combined Queries', () => { }); test('Only Data Provider', () => { - const dataProviders = mockDataProviders.slice(0, 1); + const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); const { filterQuery } = combineQueries({ config, dataProviders, @@ -338,7 +382,7 @@ describe('Combined Queries', () => { }); test('Data Provider & KQL search query', () => { - const dataProviders = mockDataProviders.slice(0, 1); + const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); const { filterQuery } = combineQueries({ config, dataProviders, @@ -356,7 +400,7 @@ describe('Combined Queries', () => { }); test('Data Provider & KQL filter query', () => { - const dataProviders = mockDataProviders.slice(0, 1); + const dataProviders = cloneDeep(mockDataProviders.slice(0, 1)); const { filterQuery } = combineQueries({ config, dataProviders, @@ -375,8 +419,8 @@ describe('Combined Queries', () => { test('Data Provider & KQL search query multiple', () => { const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); - dataProviders[0].and = mockDataProviders.slice(2, 4); - dataProviders[1].and = mockDataProviders.slice(4, 5); + dataProviders[0].and = cloneDeep(mockDataProviders.slice(2, 4)); + dataProviders[1].and = cloneDeep(mockDataProviders.slice(4, 5)); const { filterQuery } = combineQueries({ config, dataProviders, @@ -395,8 +439,8 @@ describe('Combined Queries', () => { test('Data Provider & KQL filter query multiple', () => { const dataProviders = cloneDeep(mockDataProviders.slice(0, 2)); - dataProviders[0].and = mockDataProviders.slice(2, 4); - dataProviders[1].and = mockDataProviders.slice(4, 5); + dataProviders[0].and = cloneDeep(mockDataProviders.slice(2, 4)); + dataProviders[1].and = cloneDeep(mockDataProviders.slice(4, 5)); const { filterQuery } = combineQueries({ config, dataProviders, diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx similarity index 82% rename from x-pack/plugins/siem/public/timelines/components/timeline/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx index da74d22575f85..b5481e9d4eee2 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx @@ -63,35 +63,30 @@ const buildQueryMatch = ( : `${dataProvider.queryMatch.field} ${EXISTS_OPERATOR}` }`.trim(); -const buildQueryForAndProvider = ( - dataAndProviders: DataProvidersAnd[], - browserFields: BrowserFields -) => - dataAndProviders - .reduce((andQuery, andDataProvider) => { - const prepend = (q: string) => `${q !== '' ? `${q} and ` : ''}`; - return andDataProvider.enabled - ? `${prepend(andQuery)} ${buildQueryMatch(andDataProvider, browserFields)}` - : andQuery; - }, '') - .trim(); - export const buildGlobalQuery = (dataProviders: DataProvider[], browserFields: BrowserFields) => dataProviders - .reduce((query, dataProvider: DataProvider, i) => { - const prepend = (q: string) => `${q !== '' ? `${q} or ` : ''}`; - const openParen = i >= 0 && dataProviders.length > 1 ? '(' : ''; - const closeParen = i >= 0 && dataProviders.length > 1 ? ')' : ''; - return dataProvider.enabled - ? `${prepend(query)}${openParen}${buildQueryMatch(dataProvider, browserFields)} - ${ - dataProvider.and.length > 0 - ? ` and ${buildQueryForAndProvider(dataProvider.and, browserFields)}` - : '' - }${closeParen}`.trim() - : query; - }, '') - .trim(); + .reduce((queries: string[], dataProvider: DataProvider) => { + const flatDataProviders = [dataProvider, ...dataProvider.and]; + const activeDataProviders = flatDataProviders.filter( + (flatDataProvider) => flatDataProvider.enabled + ); + + if (!activeDataProviders.length) return queries; + + const activeDataProvidersQueries = activeDataProviders.map((activeDataProvider) => + buildQueryMatch(activeDataProvider, browserFields) + ); + + const activeDataProvidersQueryMatch = activeDataProvidersQueries.join(' and '); + + return [...queries, activeDataProvidersQueryMatch]; + }, []) + .filter((queriesItem) => !isEmpty(queriesItem)) + .reduce((globalQuery: string, queryMatch: string, index: number, queries: string[]) => { + if (queries.length <= 1) return queryMatch; + + return !index ? `(${queryMatch})` : `${globalQuery} or (${queryMatch})`; + }, ''); export const combineQueries = ({ config, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx new file mode 100644 index 0000000000000..581fa125d21e2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx @@ -0,0 +1,133 @@ +/* + * 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 { mount } from 'enzyme'; +import React from 'react'; +import { MockedProvider } from 'react-apollo/test-utils'; +import { act } from 'react-dom/test-utils'; +import useResizeObserver from 'use-resize-observer/polyfilled'; + +import { + useSignalIndex, + ReturnSignalIndex, +} from '../../../alerts/containers/detection_engine/alerts/use_signal_index'; +import { mocksSource } from '../../../common/containers/source/mock'; +import { wait } from '../../../common/lib/helpers'; +import { defaultHeaders, mockTimelineData, TestProviders } from '../../../common/mock'; +import { Direction } from '../../../graphql/types'; +import { timelineQuery } from '../../containers/index.gql_query'; +import { timelineActions } from '../../store/timeline'; + +import { Sort } from './body/sort'; +import { mockDataProviders } from './data_providers/mock/mock_data_providers'; +import { StatefulTimeline, Props as StatefulTimelineProps } from './index'; +import { Timeline } from './timeline'; + +jest.mock('../../../common/lib/kibana'); + +const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock; +jest.mock('use-resize-observer/polyfilled'); +mockUseResizeObserver.mockImplementation(() => ({})); + +const mockUseSignalIndex: jest.Mock = useSignalIndex as jest.Mock; +jest.mock('../../../alerts/containers/detection_engine/alerts/use_signal_index'); + +describe('StatefulTimeline', () => { + let props = {} as StatefulTimelineProps; + const sort: Sort = { + columnId: '@timestamp', + sortDirection: Direction.desc, + }; + const startDate = new Date('2018-03-23T18:49:23.132Z').valueOf(); + const endDate = new Date('2018-03-24T03:33:52.253Z').valueOf(); + + const mocks = [ + { request: { query: timelineQuery }, result: { data: { events: mockTimelineData } } }, + ...mocksSource, + ]; + + beforeEach(() => { + props = { + addProvider: timelineActions.addProvider, + columns: defaultHeaders, + createTimeline: timelineActions.createTimeline, + dataProviders: mockDataProviders, + eventType: 'raw', + end: endDate, + filters: [], + id: 'foo', + isLive: false, + itemsPerPage: 5, + itemsPerPageOptions: [5, 10, 20], + kqlMode: 'search', + kqlQueryExpression: '', + onClose: jest.fn(), + onDataProviderEdited: timelineActions.dataProviderEdited, + removeColumn: timelineActions.removeColumn, + removeProvider: timelineActions.removeProvider, + show: true, + showCallOutUnauthorizedMsg: false, + sort, + start: startDate, + updateColumns: timelineActions.updateColumns, + updateDataProviderEnabled: timelineActions.updateDataProviderEnabled, + updateDataProviderExcluded: timelineActions.updateDataProviderExcluded, + updateDataProviderKqlQuery: timelineActions.updateDataProviderKqlQuery, + updateHighlightedDropAndProviderId: timelineActions.updateHighlightedDropAndProviderId, + updateItemsPerPage: timelineActions.updateItemsPerPage, + updateItemsPerPageOptions: timelineActions.updateItemsPerPageOptions, + updateSort: timelineActions.updateSort, + upsertColumn: timelineActions.upsertColumn, + usersViewing: ['elastic'], + }; + }); + + describe('indexToAdd', () => { + test('Make sure that indexToAdd return an unknown index if signalIndex does not exist', async () => { + mockUseSignalIndex.mockImplementation(() => ({ + loading: false, + signalIndexExists: false, + signalIndexName: undefined, + })); + const wrapper = mount( + + + + + + ); + await act(async () => { + await wait(); + wrapper.update(); + const timeline = wrapper.find(Timeline); + expect(timeline.props().indexToAdd).toEqual([ + 'no-alert-index-049FC71A-4C2C-446F-9901-37XMC5024C51', + ]); + }); + }); + + test('Make sure that indexToAdd return siem signal index if signalIndex exist', async () => { + mockUseSignalIndex.mockImplementation(() => ({ + loading: false, + signalIndexExists: true, + signalIndexName: 'mock-siem-signals-index', + })); + const wrapper = mount( + + + + + + ); + await act(async () => { + await wait(); + wrapper.update(); + const timeline = wrapper.find(Timeline); + expect(timeline.props().indexToAdd).toEqual(['mock-siem-signals-index']); + }); + }); + }); +}); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx similarity index 97% rename from x-pack/plugins/siem/public/timelines/components/timeline/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx index c52be64f94bf1..42fd6422d3a38 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx @@ -8,6 +8,7 @@ import React, { useEffect, useCallback, useMemo } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import deepEqual from 'fast-deep-equal'; +import { NO_ALERT_INDEX } from '../../../../common/constants'; import { WithSource } from '../../../common/containers/source'; import { useSignalIndex } from '../../../alerts/containers/detection_engine/alerts/use_signal_index'; import { inputsModel, inputsSelectors, State } from '../../../common/store'; @@ -30,7 +31,7 @@ export interface OwnProps { usersViewing: string[]; } -type Props = OwnProps & PropsFromRedux; +export type Props = OwnProps & PropsFromRedux; const StatefulTimelineComponent = React.memo( ({ @@ -67,11 +68,11 @@ const StatefulTimelineComponent = React.memo( eventType && signalIndexExists && signalIndexName != null && - ['signal', 'all'].includes(eventType) + ['signal', 'alert', 'all'].includes(eventType) ) { return [signalIndexName]; } - return []; + return [NO_ALERT_INDEX]; // Following index does not exist so we won't show any events; }, [eventType, signalIndexExists, signalIndexName]); const onDataProviderRemoved: OnDataProviderRemoved = useCallback( diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.test.tsx similarity index 96% rename from x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.test.tsx index d5cfc397e1990..0a70413b7ea29 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.test.tsx @@ -52,7 +52,7 @@ describe('Insert timeline popover ', () => { mount(); expect(mockDispatch).toBeCalledWith({ payload: { id: 'timeline-id', show: false }, - type: 'x-pack/siem/local/timeline/SHOW_TIMELINE', + type: 'x-pack/security_solution/local/timeline/SHOW_TIMELINE', }); expect(onTimelineChange).toBeCalledWith('Timeline title', '34578-3497-5893-47589-34759'); }); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/use_insert_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/use_insert_timeline.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/insert_timeline_popover/use_insert_timeline.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/use_insert_timeline.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/pin/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/pin/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/pin/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/pin/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/notes_size.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/notes_size.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/notes_size.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/notes_size.ts diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/properties_left.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/properties_left.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/properties_left.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/properties_left.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/properties_right.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/properties_right.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/properties_right.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/properties_right.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/styles.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/styles.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/properties/styles.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/properties/styles.tsx diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts new file mode 100644 index 0000000000000..88cbd3b1503f6 --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/translations.ts @@ -0,0 +1,154 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const TIMELINE_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.timeline.properties.timelineDescription', + { + defaultMessage: 'Timeline Description', + } +); + +export const TITLE = i18n.translate('xpack.securitySolution.timeline.properties.titleTitle', { + defaultMessage: 'Title', +}); + +export const FAVORITE = i18n.translate( + 'xpack.securitySolution.timeline.properties.favoriteTooltip', + { + defaultMessage: 'Favorite', + } +); + +export const NOT_A_FAVORITE = i18n.translate( + 'xpack.securitySolution.timeline.properties.notAFavoriteTooltip', + { + defaultMessage: 'Not a Favorite', + } +); + +export const TIMELINE_TITLE = i18n.translate( + 'xpack.securitySolution.timeline.properties.timelineTitleAriaLabel', + { + defaultMessage: 'Timeline title', + } +); + +export const INSPECT_TIMELINE_TITLE = i18n.translate( + 'xpack.securitySolution.timeline.properties.inspectTimelineTitle', + { + defaultMessage: 'Timeline', + } +); + +export const UNTITLED_TIMELINE = i18n.translate( + 'xpack.securitySolution.timeline.properties.untitledTimelinePlaceholder', + { + defaultMessage: 'Untitled timeline', + } +); + +export const DESCRIPTION = i18n.translate( + 'xpack.securitySolution.timeline.properties.descriptionPlaceholder', + { + defaultMessage: 'Description', + } +); + +export const DESCRIPTION_TOOL_TIP = i18n.translate( + 'xpack.securitySolution.timeline.properties.descriptionTooltip', + { + defaultMessage: 'A summary of the events and notes in this Timeline', + } +); + +export const HISTORY = i18n.translate('xpack.securitySolution.timeline.properties.historyLabel', { + defaultMessage: 'History', +}); + +export const IS_VIEWING = i18n.translate( + 'xpack.securitySolution.timeline.properties.isViewingTooltip', + { + defaultMessage: 'is viewing this Timeline', + } +); + +export const NOTES = i18n.translate('xpack.securitySolution.timeline.properties.notesButtonLabel', { + defaultMessage: 'Notes', +}); + +export const NOTES_TOOL_TIP = i18n.translate( + 'xpack.securitySolution.timeline.properties.notesToolTip', + { + defaultMessage: 'Add and review notes about this Timeline. Notes may also be added to events.', + } +); + +export const HISTORY_TOOL_TIP = i18n.translate( + 'xpack.securitySolution.timeline.properties.historyToolTip', + { + defaultMessage: 'The chronological history of actions related to this timeline', + } +); + +export const STREAM_LIVE_TOOL_TIP = i18n.translate( + 'xpack.securitySolution.timeline.properties.streamLiveToolTip', + { + defaultMessage: 'Update the Timeline as new data arrives', + } +); + +export const NEW_TIMELINE = i18n.translate( + 'xpack.securitySolution.timeline.properties.newTimelineButtonLabel', + { + defaultMessage: 'Create new timeline', + } +); + +export const ATTACH_TIMELINE_TO_NEW_CASE = i18n.translate( + 'xpack.securitySolution.timeline.properties.newCaseButtonLabel', + { + defaultMessage: 'Attach timeline to new case', + } +); + +export const STREAM_LIVE = i18n.translate( + 'xpack.securitySolution.timeline.properties.streamLiveButtonLabel', + { + defaultMessage: 'Stream Live', + } +); + +export const LOCK_SYNC_MAIN_DATE_PICKER_TOOL_TIP = i18n.translate( + 'xpack.securitySolution.timeline.properties.lockDatePickerTooltip', + { + defaultMessage: + 'Disable syncing of date/time range between the currently viewed page and your timeline', + } +); + +export const UNLOCK_SYNC_MAIN_DATE_PICKER_TOOL_TIP = i18n.translate( + 'xpack.securitySolution.timeline.properties.unlockDatePickerTooltip', + { + defaultMessage: + 'Enable syncing of date/time range between the currently viewed page and your timeline', + } +); + +export const LOCK_SYNC_MAIN_DATE_PICKER_ARIA = i18n.translate( + 'xpack.securitySolution.timeline.properties.lockDatePickerDescription', + { + defaultMessage: 'Lock date picker to global date picker', + } +); + +export const UNLOCK_SYNC_MAIN_DATE_PICKER_ARIA = i18n.translate( + 'xpack.securitySolution.timeline.properties.unlockDatePickerDescription', + { + defaultMessage: 'Unlock date picker to global date picker', + } +); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/query_bar/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/query_bar/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/query_bar/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/refetch_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/refetch_timeline.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/refetch_timeline.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/refetch_timeline.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/helpers.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx similarity index 97% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/helpers.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx index 77257e367c6f5..beadc13811395 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx @@ -8,7 +8,7 @@ import { EuiSpacer, EuiText } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { AndOrBadge } from '../and_or_badge'; +import { AndOrBadge } from '../../../../common/components/and_or_badge'; import * as i18n from './translations'; import { KqlMode } from '../../../../timelines/store/timeline/model'; diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/pick_events.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/pick_events.tsx similarity index 96% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/pick_events.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/pick_events.tsx index 5a3805af0ca43..b0682290ee849 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/pick_events.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/pick_events.tsx @@ -79,7 +79,7 @@ const PickEventTypeComponents: React.FC = ({ diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/translations.ts similarity index 59% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/translations.ts index c34b6b08ffd39..769bcedb7aae3 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/search_or_filter/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/translations.ts @@ -7,35 +7,35 @@ import { i18n } from '@kbn/i18n'; export const FILTER_DESCRIPTION = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.filterDescription', + 'xpack.securitySolution.timeline.searchOrFilter.filterDescription', { defaultMessage: 'Events from the data providers above are filtered by the adjacent KQL', } ); export const FILTER_KQL_TOOLTIP = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.filterKqlTooltip', + 'xpack.securitySolution.timeline.searchOrFilter.filterKqlTooltip', { defaultMessage: 'Events from the data providers above are filtered by this KQL', } ); export const FILTER_KQL_PLACEHOLDER = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.filterKqlPlaceholder', + 'xpack.securitySolution.timeline.searchOrFilter.filterKqlPlaceholder', { defaultMessage: 'Filter events', } ); export const FILTER_KQL_SELECTED_TEXT = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.filterKqlSelectedText', + 'xpack.securitySolution.timeline.searchOrFilter.filterKqlSelectedText', { defaultMessage: 'Filter', } ); export const SEARCH_DESCRIPTION = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.searchDescription', + 'xpack.securitySolution.timeline.searchOrFilter.searchDescription', { defaultMessage: 'Events from the data providers above are combined with results from the adjacent KQL', @@ -43,43 +43,49 @@ export const SEARCH_DESCRIPTION = i18n.translate( ); export const SEARCH_KQL_TOOLTIP = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.searchKqlTooltip', + 'xpack.securitySolution.timeline.searchOrFilter.searchKqlTooltip', { defaultMessage: 'Events from the data providers above are combined with results from this KQL', } ); export const SEARCH_KQL_PLACEHOLDER = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.searchKqlPlaceholder', + 'xpack.securitySolution.timeline.searchOrFilter.searchKqlPlaceholder', { defaultMessage: 'Search events', } ); export const SEARCH_KQL_SELECTED_TEXT = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.searchKqlSelectedText', + 'xpack.securitySolution.timeline.searchOrFilter.searchKqlSelectedText', { defaultMessage: 'Search', } ); export const FILTER_OR_SEARCH_WITH_KQL = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.filterOrSearchWithKql', + 'xpack.securitySolution.timeline.searchOrFilter.filterOrSearchWithKql', { defaultMessage: 'Filter or Search with KQL', } ); -export const ALL_EVENT = i18n.translate('xpack.siem.timeline.searchOrFilter.eventTypeAllEvent', { - defaultMessage: 'All events', -}); +export const ALL_EVENT = i18n.translate( + 'xpack.securitySolution.timeline.searchOrFilter.eventTypeAllEvent', + { + defaultMessage: 'All events', + } +); -export const RAW_EVENT = i18n.translate('xpack.siem.timeline.searchOrFilter.eventTypeRawEvent', { - defaultMessage: 'Raw events', -}); +export const RAW_EVENT = i18n.translate( + 'xpack.securitySolution.timeline.searchOrFilter.eventTypeRawEvent', + { + defaultMessage: 'Raw events', + } +); export const SIGNAL_EVENT = i18n.translate( - 'xpack.siem.timeline.searchOrFilter.eventTypeSignalEvent', + 'xpack.securitySolution.timeline.searchOrFilter.eventTypeSignalEvent', { defaultMessage: 'Signal events', } diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/search_super_select/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_super_select/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/search_super_select/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/search_super_select/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/selectable_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/selectable_timeline/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/selectable_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/selectable_timeline/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/skeleton_row/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/skeleton_row/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/skeleton_row/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/timelines/components/timeline/skeleton_row/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/skeleton_row/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/skeleton_row/index.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/skeleton_row/index.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/skeleton_row/index.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/skeleton_row/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/skeleton_row/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/skeleton_row/index.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/skeleton_row/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/styles.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/styles.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/timeline.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/timeline.test.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/timeline.test.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/timeline.test.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/timeline.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/components/timeline/timeline.tsx rename to x-pack/plugins/security_solution/public/timelines/components/timeline/timeline.tsx diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts similarity index 62% rename from x-pack/plugins/siem/public/timelines/components/timeline/translations.ts rename to x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts index a7d656b69c539..ebd27f9bffa5e 100644 --- a/x-pack/plugins/siem/public/timelines/components/timeline/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts @@ -7,23 +7,29 @@ import { i18n } from '@kbn/i18n'; import { TimelineTypeLiteral, TimelineType } from '../../../../common/types/timeline'; -export const DEFAULT_TIMELINE_TITLE = i18n.translate('xpack.siem.timeline.defaultTimelineTitle', { - defaultMessage: 'None', -}); +export const DEFAULT_TIMELINE_TITLE = i18n.translate( + 'xpack.securitySolution.timeline.defaultTimelineTitle', + { + defaultMessage: 'None', + } +); export const DEFAULT_TIMELINE_DESCRIPTION = i18n.translate( - 'xpack.siem.timeline.defaultTimelineDescription', + 'xpack.securitySolution.timeline.defaultTimelineDescription', { defaultMessage: 'Timeline offered by default when creating new timeline.', } ); export const SEARCH_BOX_TIMELINE_PLACEHOLDER = (timelineType: TimelineTypeLiteral) => - i18n.translate('xpack.siem.timeline.searchBoxPlaceholder', { + i18n.translate('xpack.securitySolution.timeline.searchBoxPlaceholder', { values: { timeline: timelineType === TimelineType.template ? 'Template timeline' : 'Timeline' }, defaultMessage: 'e.g. {timeline} name or description', }); -export const INSERT_TIMELINE = i18n.translate('xpack.siem.insert.timeline.insertTimelineButton', { - defaultMessage: 'Insert timeline link', -}); +export const INSERT_TIMELINE = i18n.translate( + 'xpack.securitySolution.insert.timeline.insertTimelineButton', + { + defaultMessage: 'Insert timeline link', + } +); diff --git a/x-pack/plugins/siem/public/timelines/containers/all/index.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/all/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/all/index.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/all/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/all/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/all/index.tsx rename to x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/containers/api.ts b/x-pack/plugins/security_solution/public/timelines/containers/api.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/api.ts rename to x-pack/plugins/security_solution/public/timelines/containers/api.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/delete/persist.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/delete/persist.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/delete/persist.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/delete/persist.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/details/index.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/details/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/details/index.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/details/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/details/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/details/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/details/index.tsx rename to x-pack/plugins/security_solution/public/timelines/containers/details/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/containers/favorite/persist.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/favorite/persist.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/favorite/persist.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/favorite/persist.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/index.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/index.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/index.tsx similarity index 98% rename from x-pack/plugins/siem/public/timelines/containers/index.tsx rename to x-pack/plugins/security_solution/public/timelines/containers/index.tsx index 5efcb84539123..7363a60974275 100644 --- a/x-pack/plugins/siem/public/timelines/containers/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/index.tsx @@ -92,7 +92,7 @@ class TimelineQueryComponent extends QueryTemplate< indexPattern == null || (indexPattern != null && indexPattern.title === '') ? [ ...(['all', 'raw'].includes(eventType) ? defaultKibanaIndex : []), - ...(['all', 'signal'].includes(eventType) ? indexToAdd : []), + ...(['all', 'alert', 'signal'].includes(eventType) ? indexToAdd : []), ] : indexPattern?.title.split(',') ?? []; const variables: GetTimelineQuery.Variables = { diff --git a/x-pack/plugins/siem/public/timelines/containers/notes/persist.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/notes/persist.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/notes/persist.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/notes/persist.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/one/index.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/one/index.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/one/index.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/one/index.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/persist.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/persist.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/persist.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/persist.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/containers/pinned_event/persist.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/pinned_event/persist.gql_query.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/containers/pinned_event/persist.gql_query.ts rename to x-pack/plugins/security_solution/public/timelines/containers/pinned_event/persist.gql_query.ts diff --git a/x-pack/plugins/siem/public/timelines/index.ts b/x-pack/plugins/security_solution/public/timelines/index.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/index.ts rename to x-pack/plugins/security_solution/public/timelines/index.ts diff --git a/x-pack/plugins/siem/public/timelines/pages/index.tsx b/x-pack/plugins/security_solution/public/timelines/pages/index.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/pages/index.tsx rename to x-pack/plugins/security_solution/public/timelines/pages/index.tsx diff --git a/x-pack/plugins/siem/public/timelines/pages/timelines_page.test.tsx b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx similarity index 97% rename from x-pack/plugins/siem/public/timelines/pages/timelines_page.test.tsx rename to x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx index 0338163d8b79f..1fc3a33fbca08 100644 --- a/x-pack/plugins/siem/public/timelines/pages/timelines_page.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx @@ -28,7 +28,7 @@ describe('TimelinesPageComponent', () => { services: { application: { capabilities: { - siem: { + securitySolution: { crud: true, }, }, @@ -66,7 +66,7 @@ describe('TimelinesPageComponent', () => { services: { application: { capabilities: { - siem: { + securitySolution: { crud: false, }, }, diff --git a/x-pack/plugins/siem/public/timelines/pages/timelines_page.tsx b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx similarity index 95% rename from x-pack/plugins/siem/public/timelines/pages/timelines_page.tsx rename to x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx index d00aef6420451..fd734d10ecba0 100644 --- a/x-pack/plugins/siem/public/timelines/pages/timelines_page.tsx +++ b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx @@ -35,7 +35,9 @@ export const TimelinesPageComponent: React.FC = ({ apolloClient }) => const uiCapabilities = useKibana().services.application.capabilities; const capabilitiesCanUserCRUD: boolean = - typeof uiCapabilities.siem.crud === 'boolean' ? uiCapabilities.siem.crud : false; + typeof uiCapabilities.securitySolution.crud === 'boolean' + ? uiCapabilities.securitySolution.crud + : false; return ( <> diff --git a/x-pack/plugins/siem/public/timelines/pages/translations.ts b/x-pack/plugins/security_solution/public/timelines/pages/translations.ts similarity index 68% rename from x-pack/plugins/siem/public/timelines/pages/translations.ts rename to x-pack/plugins/security_solution/public/timelines/pages/translations.ts index 304474bbff2c5..3ec98d47c67ea 100644 --- a/x-pack/plugins/siem/public/timelines/pages/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/pages/translations.ts @@ -6,26 +6,26 @@ import { i18n } from '@kbn/i18n'; -export const PAGE_TITLE = i18n.translate('xpack.siem.timelines.pageTitle', { +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.timelines.pageTitle', { defaultMessage: 'Timelines', }); export const ALL_TIMELINES_PANEL_TITLE = i18n.translate( - 'xpack.siem.timelines.allTimelines.panelTitle', + 'xpack.securitySolution.timelines.allTimelines.panelTitle', { defaultMessage: 'All timelines', } ); export const ALL_TIMELINES_IMPORT_TIMELINE_TITLE = i18n.translate( - 'xpack.siem.timelines.allTimelines.importTimelineTitle', + 'xpack.securitySolution.timelines.allTimelines.importTimelineTitle', { defaultMessage: 'Import Timeline', } ); export const ERROR_FETCHING_TIMELINES_TITLE = i18n.translate( - 'xpack.siem.timelines.allTimelines.errorFetchingTimelinesTitle', + 'xpack.securitySolution.timelines.allTimelines.errorFetchingTimelinesTitle', { defaultMessage: 'Failed to query all timelines data', } diff --git a/x-pack/plugins/siem/public/timelines/routes.tsx b/x-pack/plugins/security_solution/public/timelines/routes.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/routes.tsx rename to x-pack/plugins/security_solution/public/timelines/routes.tsx diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/actions.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts similarity index 98% rename from x-pack/plugins/siem/public/timelines/store/timeline/actions.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts index ba62c5b93012d..e11d1bcc72e09 100644 --- a/x-pack/plugins/siem/public/timelines/store/timeline/actions.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts @@ -17,7 +17,7 @@ import { KueryFilterQuery, SerializedFilterQuery } from '../../../common/store/t import { EventType, KqlMode, TimelineModel, ColumnHeaderOptions } from './model'; import { TimelineNonEcsData } from '../../../graphql/types'; -const actionCreator = actionCreatorFactory('x-pack/siem/local/timeline'); +const actionCreator = actionCreatorFactory('x-pack/security_solution/local/timeline'); export const addHistory = actionCreator<{ id: string; historyId: string }>('ADD_HISTORY'); diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/defaults.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/defaults.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/epic.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/epic.test.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/epic.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/epic.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/epic_dispatcher_timeline_persistence_queue.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_dispatcher_timeline_persistence_queue.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/epic_dispatcher_timeline_persistence_queue.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/epic_dispatcher_timeline_persistence_queue.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/epic_favorite.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_favorite.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/epic_favorite.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/epic_favorite.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/epic_note.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_note.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/epic_note.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/epic_note.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/epic_pinned_event.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_pinned_event.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/epic_pinned_event.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/epic_pinned_event.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/helpers.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/helpers.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/index.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/index.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/index.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/index.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/manage_timeline_id.tsx b/x-pack/plugins/security_solution/public/timelines/store/timeline/manage_timeline_id.tsx similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/manage_timeline_id.tsx rename to x-pack/plugins/security_solution/public/timelines/store/timeline/manage_timeline_id.tsx diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/model.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts similarity index 98% rename from x-pack/plugins/siem/public/timelines/store/timeline/model.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts index f7e848e8a9e1b..caad70226365a 100644 --- a/x-pack/plugins/siem/public/timelines/store/timeline/model.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts @@ -18,7 +18,7 @@ import { KueryFilterQuery, SerializedFilterQuery } from '../../../common/store/t export const DEFAULT_PAGE_COUNT = 2; // Eui Pager will not render unless this is a minimum of 2 pages export type KqlMode = 'filter' | 'search'; -export type EventType = 'all' | 'raw' | 'alert'; +export type EventType = 'all' | 'raw' | 'alert' | 'signal'; export type ColumnHeaderType = 'not-filtered' | 'text-filter'; diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/my_epic_timeline_id.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/my_epic_timeline_id.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/my_epic_timeline_id.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/my_epic_timeline_id.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/reducer.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/reducer.test.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/reducer.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/reducer.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/refetch_queries.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/refetch_queries.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/refetch_queries.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/refetch_queries.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/selectors.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/selectors.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/selectors.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/selectors.ts diff --git a/x-pack/plugins/siem/public/timelines/store/timeline/types.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/types.ts similarity index 100% rename from x-pack/plugins/siem/public/timelines/store/timeline/types.ts rename to x-pack/plugins/security_solution/public/timelines/store/timeline/types.ts diff --git a/x-pack/plugins/siem/public/types.ts b/x-pack/plugins/security_solution/public/types.ts similarity index 100% rename from x-pack/plugins/siem/public/types.ts rename to x-pack/plugins/security_solution/public/types.ts diff --git a/x-pack/plugins/siem/scripts/check_circular_deps.js b/x-pack/plugins/security_solution/scripts/check_circular_deps.js similarity index 100% rename from x-pack/plugins/siem/scripts/check_circular_deps.js rename to x-pack/plugins/security_solution/scripts/check_circular_deps.js diff --git a/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js b/x-pack/plugins/security_solution/scripts/check_circular_deps/run_check_circular_deps_cli.js similarity index 100% rename from x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js rename to x-pack/plugins/security_solution/scripts/check_circular_deps/run_check_circular_deps_cli.js diff --git a/x-pack/plugins/siem/scripts/combined_schema.ts b/x-pack/plugins/security_solution/scripts/combined_schema.ts similarity index 100% rename from x-pack/plugins/siem/scripts/combined_schema.ts rename to x-pack/plugins/security_solution/scripts/combined_schema.ts diff --git a/x-pack/plugins/siem/scripts/convert_saved_search_to_rules.js b/x-pack/plugins/security_solution/scripts/convert_saved_search_to_rules.js similarity index 96% rename from x-pack/plugins/siem/scripts/convert_saved_search_to_rules.js rename to x-pack/plugins/security_solution/scripts/convert_saved_search_to_rules.js index 34ed4c480902e..fe9c0c45465db 100644 --- a/x-pack/plugins/siem/scripts/convert_saved_search_to_rules.js +++ b/x-pack/plugins/security_solution/scripts/convert_saved_search_to_rules.js @@ -42,8 +42,8 @@ const ENABLED = false; // For converting, if you want to use these instead of rely on the defaults then // comment these in and use them for the script. Otherwise this is commented out // so we can utilize the defaults of input and output which are based on saved objects -// of siem:defaultIndex and your kibana.dev.yml setting of xpack.siem.signalsIndex. If -// the setting of xpack.siem.signalsIndex is not set it defaults to .siem-signals +// of securitySolution:defaultIndex and your kibana.dev.yml setting of xpack.securitySolution.signalsIndex. If +// the setting of xpack.securitySolution.signalsIndex is not set it defaults to .siem-signals // const INDEX = ['auditbeat-*', 'filebeat-*', 'packetbeat-*', 'winlogbeat-*']; // const OUTPUT_INDEX = '.siem-signals-some-other-index'; diff --git a/x-pack/plugins/siem/scripts/endpoint/README.md b/x-pack/plugins/security_solution/scripts/endpoint/README.md similarity index 97% rename from x-pack/plugins/siem/scripts/endpoint/README.md rename to x-pack/plugins/security_solution/scripts/endpoint/README.md index 5a1f2982b22ec..e97bd9be61d3b 100644 --- a/x-pack/plugins/siem/scripts/endpoint/README.md +++ b/x-pack/plugins/security_solution/scripts/endpoint/README.md @@ -13,7 +13,7 @@ Example command sequence to get ES and kibana running with sample data after ins `yarn es snapshot` -> starts ES -`npx yarn start --xpack.siem.endpoint.enabled=true --no-base-path` -> starts kibana +`npx yarn start --xpack.securitySolution.endpoint.enabled=true --no-base-path` -> starts kibana `cd ~/path/to/kibana/x-pack/plugins/endpoint` diff --git a/x-pack/plugins/siem/scripts/endpoint/alert_mapping.json b/x-pack/plugins/security_solution/scripts/endpoint/alert_mapping.json similarity index 100% rename from x-pack/plugins/siem/scripts/endpoint/alert_mapping.json rename to x-pack/plugins/security_solution/scripts/endpoint/alert_mapping.json diff --git a/x-pack/plugins/siem/scripts/endpoint/cli_tsconfig.json b/x-pack/plugins/security_solution/scripts/endpoint/cli_tsconfig.json similarity index 100% rename from x-pack/plugins/siem/scripts/endpoint/cli_tsconfig.json rename to x-pack/plugins/security_solution/scripts/endpoint/cli_tsconfig.json diff --git a/x-pack/plugins/siem/scripts/endpoint/event_mapping.json b/x-pack/plugins/security_solution/scripts/endpoint/event_mapping.json similarity index 100% rename from x-pack/plugins/siem/scripts/endpoint/event_mapping.json rename to x-pack/plugins/security_solution/scripts/endpoint/event_mapping.json diff --git a/x-pack/plugins/siem/scripts/endpoint/metadata_mapping.json b/x-pack/plugins/security_solution/scripts/endpoint/metadata_mapping.json similarity index 100% rename from x-pack/plugins/siem/scripts/endpoint/metadata_mapping.json rename to x-pack/plugins/security_solution/scripts/endpoint/metadata_mapping.json diff --git a/x-pack/plugins/siem/scripts/endpoint/policy_mapping.json b/x-pack/plugins/security_solution/scripts/endpoint/policy_mapping.json similarity index 100% rename from x-pack/plugins/siem/scripts/endpoint/policy_mapping.json rename to x-pack/plugins/security_solution/scripts/endpoint/policy_mapping.json diff --git a/x-pack/plugins/siem/scripts/endpoint/resolver_generator.ts b/x-pack/plugins/security_solution/scripts/endpoint/resolver_generator.ts similarity index 100% rename from x-pack/plugins/siem/scripts/endpoint/resolver_generator.ts rename to x-pack/plugins/security_solution/scripts/endpoint/resolver_generator.ts diff --git a/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js b/x-pack/plugins/security_solution/scripts/extract_tactics_techniques_mitre.js similarity index 94% rename from x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js rename to x-pack/plugins/security_solution/scripts/extract_tactics_techniques_mitre.js index ea94d7e491d98..344d0f0e5131a 100644 --- a/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js +++ b/x-pack/plugins/security_solution/scripts/extract_tactics_techniques_mitre.js @@ -23,7 +23,7 @@ const getTacticsOptions = (tactics) => name: '${t.name}', reference: '${t.reference}', text: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTactics.${camelCase(t.name)}Description', { + 'xpack.securitySolution.detectionEngine.mitreAttackTactics.${camelCase(t.name)}Description', { defaultMessage: '${t.name} (${t.id})' }), value: '${camelCase(t.name)}' @@ -34,7 +34,9 @@ const getTechniquesOptions = (techniques) => techniques.map((t) => `{ label: i18n.translate( - 'xpack.siem.detectionEngine.mitreAttackTechniques.${camelCase(t.name)}Description', { + 'xpack.securitySolution.detectionEngine.mitreAttackTechniques.${camelCase( + t.name + )}Description', { defaultMessage: '${t.name} (${t.id})' }), id: '${t.id}', diff --git a/x-pack/plugins/siem/scripts/generate_types_from_graphql.js b/x-pack/plugins/security_solution/scripts/generate_types_from_graphql.js similarity index 100% rename from x-pack/plugins/siem/scripts/generate_types_from_graphql.js rename to x-pack/plugins/security_solution/scripts/generate_types_from_graphql.js diff --git a/x-pack/plugins/siem/scripts/loop_cypress_tests.js b/x-pack/plugins/security_solution/scripts/loop_cypress_tests.js similarity index 98% rename from x-pack/plugins/siem/scripts/loop_cypress_tests.js rename to x-pack/plugins/security_solution/scripts/loop_cypress_tests.js index 8ba201162c59e..2da3db98cbab2 100644 --- a/x-pack/plugins/siem/scripts/loop_cypress_tests.js +++ b/x-pack/plugins/security_solution/scripts/loop_cypress_tests.js @@ -44,7 +44,7 @@ const spawnChild = async () => { const child = spawn('node', [ 'scripts/functional_tests', '--config', - 'x-pack/test/siem_cypress/config.ts', + 'x-pack/test/security_solution_cypress/config.ts', ]); for await (const chunk of child.stdout) { console.log(chunk.toString()); diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig.js b/x-pack/plugins/security_solution/scripts/optimize_tsconfig.js similarity index 100% rename from x-pack/plugins/siem/scripts/optimize_tsconfig.js rename to x-pack/plugins/security_solution/scripts/optimize_tsconfig.js diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/README.md similarity index 84% rename from x-pack/plugins/siem/scripts/optimize_tsconfig/README.md rename to x-pack/plugins/security_solution/scripts/optimize_tsconfig/README.md index fbcd3329312aa..b711b8bf1dbc2 100644 --- a/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md +++ b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/README.md @@ -8,9 +8,9 @@ Kibana and X-Pack are very large TypeScript projects, and it comes at a cost. Ed To run the optimization: -`$ node x-pack/plugins/siem/scripts/optimize_tsconfig` +`$ node x-pack/plugins/security_solution/scripts/optimize_tsconfig` To undo the optimization: -`$ node x-pack/plugins/siem/scripts/unoptimize_tsconfig` +`$ node x-pack/plugins/security_solution/scripts/unoptimize_tsconfig` diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/optimize.js b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/optimize.js similarity index 100% rename from x-pack/plugins/siem/scripts/optimize_tsconfig/optimize.js rename to x-pack/plugins/security_solution/scripts/optimize_tsconfig/optimize.js diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/paths.js similarity index 100% rename from x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js rename to x-pack/plugins/security_solution/scripts/optimize_tsconfig/paths.js diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/tsconfig.json similarity index 75% rename from x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json rename to x-pack/plugins/security_solution/scripts/optimize_tsconfig/tsconfig.json index fb838d82f14ed..dcce9746086e0 100644 --- a/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json +++ b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/tsconfig.json @@ -1,7 +1,7 @@ { "include": [ "typings/**/*", - "plugins/siem/**/*", + "plugins/security_solution/**/*", "plugins/apm/typings/numeral.d.ts", "plugins/canvas/types/webpack.d.ts", "plugins/triggers_actions_ui/**/*" @@ -9,7 +9,7 @@ "exclude": [ "test/**/*", "**/__fixtures__/**/*", - "plugins/siem/cypress/**/*", + "plugins/security_solution/cypress/**/*", "**/typespec_tests.ts" ] } diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/unoptimize.js b/x-pack/plugins/security_solution/scripts/optimize_tsconfig/unoptimize.js similarity index 100% rename from x-pack/plugins/siem/scripts/optimize_tsconfig/unoptimize.js rename to x-pack/plugins/security_solution/scripts/optimize_tsconfig/unoptimize.js diff --git a/x-pack/plugins/siem/scripts/storybook.js b/x-pack/plugins/security_solution/scripts/storybook.js similarity index 79% rename from x-pack/plugins/siem/scripts/storybook.js rename to x-pack/plugins/security_solution/scripts/storybook.js index 6566236704936..5f06f2a4ebb12 100644 --- a/x-pack/plugins/siem/scripts/storybook.js +++ b/x-pack/plugins/security_solution/scripts/storybook.js @@ -9,5 +9,5 @@ import { join } from 'path'; // eslint-disable-next-line require('@kbn/storybook').runStorybookCli({ name: 'siem', - storyGlobs: [join(__dirname, '..', 'public', 'components', '**', '*.stories.tsx')], + storyGlobs: [join(__dirname, '..', 'public', '**', 'components', '**', '*.stories.tsx')], }); diff --git a/x-pack/plugins/siem/scripts/unoptimize_tsconfig.js b/x-pack/plugins/security_solution/scripts/unoptimize_tsconfig.js similarity index 100% rename from x-pack/plugins/siem/scripts/unoptimize_tsconfig.js rename to x-pack/plugins/security_solution/scripts/unoptimize_tsconfig.js diff --git a/x-pack/plugins/siem/server/client/client.test.ts b/x-pack/plugins/security_solution/server/client/client.test.ts similarity index 88% rename from x-pack/plugins/siem/server/client/client.test.ts rename to x-pack/plugins/security_solution/server/client/client.test.ts index c0ae15cb73f4e..329b1fd062e83 100644 --- a/x-pack/plugins/siem/server/client/client.test.ts +++ b/x-pack/plugins/security_solution/server/client/client.test.ts @@ -6,7 +6,7 @@ import { SIGNALS_INDEX_KEY } from '../../common/constants'; import { createMockConfig } from '../lib/detection_engine/routes/__mocks__'; -import { SiemClient } from './client'; +import { AppClient } from './client'; describe('SiemClient', () => { describe('#getSignalsIndex', () => { @@ -16,7 +16,7 @@ describe('SiemClient', () => { [SIGNALS_INDEX_KEY]: 'mockSignalsIndex', }; const spaceId = 'fooSpace'; - const client = new SiemClient(spaceId, mockConfig); + const client = new AppClient(spaceId, mockConfig); expect(client.getSignalsIndex()).toEqual('mockSignalsIndex-fooSpace'); }); diff --git a/x-pack/plugins/siem/server/client/client.ts b/x-pack/plugins/security_solution/server/client/client.ts similarity index 95% rename from x-pack/plugins/siem/server/client/client.ts rename to x-pack/plugins/security_solution/server/client/client.ts index 5780bb4173f79..d10f85ef7517d 100644 --- a/x-pack/plugins/siem/server/client/client.ts +++ b/x-pack/plugins/security_solution/server/client/client.ts @@ -6,7 +6,7 @@ import { ConfigType } from '../config'; -export class SiemClient { +export class AppClient { private readonly signalsIndex: string; constructor(private spaceId: string, private config: ConfigType) { diff --git a/x-pack/plugins/siem/server/client/factory.test.ts b/x-pack/plugins/security_solution/server/client/factory.test.ts similarity index 76% rename from x-pack/plugins/siem/server/client/factory.test.ts rename to x-pack/plugins/security_solution/server/client/factory.test.ts index f0cddc5f09747..8a3df468a1e8b 100644 --- a/x-pack/plugins/siem/server/client/factory.test.ts +++ b/x-pack/plugins/security_solution/server/client/factory.test.ts @@ -6,16 +6,16 @@ import { httpServerMock } from '../../../../../src/core/server/mocks'; import { createMockConfig } from '../lib/detection_engine/routes/__mocks__'; -import { SiemClientFactory } from './factory'; -import { SiemClient } from './client'; +import { AppClientFactory } from './factory'; +import { AppClient } from './client'; jest.mock('./client'); -const mockClient = SiemClient as jest.Mock; +const mockClient = AppClient as jest.Mock; -describe('SiemClientFactory', () => { +describe('AppClientFactory', () => { describe('#create', () => { it('constructs a client with the current spaceId', () => { - const factory = new SiemClientFactory(); + const factory = new AppClientFactory(); const mockRequest = httpServerMock.createKibanaRequest(); factory.setup({ getSpaceId: () => 'mockSpace', config: createMockConfig() }); factory.create(mockRequest); @@ -24,7 +24,7 @@ describe('SiemClientFactory', () => { }); it('constructs a client with the default spaceId if spaces are disabled', () => { - const factory = new SiemClientFactory(); + const factory = new AppClientFactory(); const mockRequest = httpServerMock.createKibanaRequest(); factory.setup({ getSpaceId: undefined, config: createMockConfig() }); factory.create(mockRequest); @@ -33,10 +33,10 @@ describe('SiemClientFactory', () => { }); it('cannot call create without calling setup first', () => { - const factory = new SiemClientFactory(); + const factory = new AppClientFactory(); const mockRequest = httpServerMock.createKibanaRequest(); expect(() => factory.create(mockRequest)).toThrow( - 'Cannot create SiemClient as config is not present. Did you forget to call setup()?' + 'Cannot create AppClient as config is not present. Did you forget to call setup()?' ); }); }); diff --git a/x-pack/plugins/siem/server/client/factory.ts b/x-pack/plugins/security_solution/server/client/factory.ts similarity index 75% rename from x-pack/plugins/siem/server/client/factory.ts rename to x-pack/plugins/security_solution/server/client/factory.ts index 69db4d7eed98f..dfc9328c7de1e 100644 --- a/x-pack/plugins/siem/server/client/factory.ts +++ b/x-pack/plugins/security_solution/server/client/factory.ts @@ -5,7 +5,7 @@ */ import { KibanaRequest } from '../../../../../src/core/server'; -import { SiemClient } from './client'; +import { AppClient } from './client'; import { ConfigType } from '../config'; interface SetupDependencies { @@ -13,7 +13,7 @@ interface SetupDependencies { config: ConfigType; } -export class SiemClientFactory { +export class AppClientFactory { private getSpaceId?: SetupDependencies['getSpaceId']; private config?: SetupDependencies['config']; @@ -22,14 +22,14 @@ export class SiemClientFactory { this.config = config; } - public create(request: KibanaRequest): SiemClient { + public create(request: KibanaRequest): AppClient { if (this.config == null) { throw new Error( - 'Cannot create SiemClient as config is not present. Did you forget to call setup()?' + 'Cannot create AppClient as config is not present. Did you forget to call setup()?' ); } const spaceId = this.getSpaceId?.(request) ?? 'default'; - return new SiemClient(spaceId, this.config); + return new AppClient(spaceId, this.config); } } diff --git a/x-pack/plugins/security_solution/server/client/index.ts b/x-pack/plugins/security_solution/server/client/index.ts new file mode 100644 index 0000000000000..f2f256536c249 --- /dev/null +++ b/x-pack/plugins/security_solution/server/client/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { AppClient } from './client'; +export { AppClientFactory } from './factory'; diff --git a/x-pack/plugins/siem/server/config.ts b/x-pack/plugins/security_solution/server/config.ts similarity index 100% rename from x-pack/plugins/siem/server/config.ts rename to x-pack/plugins/security_solution/server/config.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/alerts.test.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/alerts.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/alerts.test.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/alerts.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/details/index.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/details/index.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/details/index.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/details/index.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/details/lib/pagination.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/details/lib/pagination.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/details/lib/pagination.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/details/lib/pagination.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/details/schemas.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/details/schemas.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/details/schemas.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/details/schemas.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/index_pattern.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/index_pattern.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/index_pattern.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/index_pattern.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/alert_id.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/alert_id.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/alert_id.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/alert_id.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/error.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/error.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/error.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/error.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/index.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/index.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/index.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/index.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/pagination.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/pagination.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/lib/pagination.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/lib/pagination.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/list/index.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/list/index.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/list/index.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/list/index.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/list/lib/index.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/list/lib/index.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/list/lib/index.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/list/lib/index.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/handlers/list/lib/pagination.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/handlers/list/lib/pagination.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/handlers/list/lib/pagination.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/handlers/list/lib/pagination.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/index_pattern.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/index_pattern.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/index_pattern.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/index_pattern.ts diff --git a/x-pack/plugins/siem/server/endpoint/alerts/routes.ts b/x-pack/plugins/security_solution/server/endpoint/alerts/routes.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/alerts/routes.ts rename to x-pack/plugins/security_solution/server/endpoint/alerts/routes.ts diff --git a/x-pack/plugins/siem/server/endpoint/config.test.ts b/x-pack/plugins/security_solution/server/endpoint/config.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/config.test.ts rename to x-pack/plugins/security_solution/server/endpoint/config.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/config.ts b/x-pack/plugins/security_solution/server/endpoint/config.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/config.ts rename to x-pack/plugins/security_solution/server/endpoint/config.ts diff --git a/x-pack/plugins/siem/server/endpoint/endpoint_app_context_services.test.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/endpoint_app_context_services.test.ts rename to x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/endpoint_app_context_services.ts rename to x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts diff --git a/x-pack/plugins/siem/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/mocks.ts rename to x-pack/plugins/security_solution/server/endpoint/mocks.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/metadata/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/metadata/index.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/metadata/metadata.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/metadata/query_builders.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/metadata/query_builders.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/metadata/query_builders.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/metadata/query_builders.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/policy/handlers.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/policy/handlers.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/policy/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/policy/handlers.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/policy/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/policy/index.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/policy/service.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/policy/service.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/policy/service.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/policy/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/policy/service.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/ancestry.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/ancestry.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/ancestry.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/ancestry.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/children.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/children.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/children.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/children.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/events.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/events.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/events.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/events.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/base.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/base.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/base.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/base.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/children.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/children.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/children.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/children.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/children.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/children.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/children.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/children.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/events.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/events.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/events.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/events.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/legacy_event_index_pattern.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/legacy_event_index_pattern.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/legacy_event_index_pattern.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/legacy_event_index_pattern.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/lifecycle.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/lifecycle.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/lifecycle.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/lifecycle.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/lifecycle.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/lifecycle.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/lifecycle.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/lifecycle.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/multi_searcher.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/multi_searcher.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/multi_searcher.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/multi_searcher.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/stats.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/stats.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/queries/stats.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/stats.test.ts diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/stats.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/stats.ts new file mode 100644 index 0000000000000..359445f514b77 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/stats.ts @@ -0,0 +1,242 @@ +/* + * 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 { SearchResponse } from 'elasticsearch'; +import { ResolverQuery } from './base'; +import { ResolverEvent, EventStats } from '../../../../../common/endpoint/types'; +import { JsonObject } from '../../../../../../../../src/plugins/kibana_utils/public'; +import { AggBucket } from '../utils/pagination'; + +export interface StatsResult { + alerts: Record; + events: Record; +} + +interface CategoriesAgg extends AggBucket { + /** + * The reason categories is optional here is because if no data was returned in the query the categories aggregation + * will not be defined on the response (because it's a sub aggregation). + */ + categories?: { + buckets?: AggBucket[]; + }; +} + +export class StatsQuery extends ResolverQuery { + protected legacyQuery(endpointID: string, uniquePIDs: string[]): JsonObject { + return { + size: 0, + query: { + bool: { + filter: [ + { + term: { 'agent.id': endpointID }, + }, + { + bool: { + should: [ + { + bool: { + filter: [ + { term: { 'event.kind': 'event' } }, + { terms: { 'endgame.unique_pid': uniquePIDs } }, + { + bool: { + must_not: { + term: { 'event.category': 'process' }, + }, + }, + }, + ], + }, + }, + { + bool: { + filter: [ + { term: { 'event.kind': 'alert' } }, + { + terms: { + 'endgame.data.alert_details.acting_process.unique_pid': uniquePIDs, + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + aggs: { + alerts: { + filter: { term: { 'event.kind': 'alert' } }, + aggs: { + ids: { + terms: { + field: 'endgame.data.alert_details.acting_process.unique_pid', + size: uniquePIDs.length, + }, + }, + }, + }, + events: { + filter: { term: { 'event.kind': 'event' } }, + aggs: { + ids: { + terms: { field: 'endgame.unique_pid', size: uniquePIDs.length }, + aggs: { + categories: { + terms: { field: 'event.category', size: 1000 }, + }, + }, + }, + }, + }, + }, + }; + } + + protected query(entityIDs: string[]): JsonObject { + return { + size: 0, + query: { + bool: { + filter: [ + { terms: { 'process.entity_id': entityIDs } }, + { + bool: { + should: [ + { + bool: { + filter: [ + { term: { 'event.kind': 'event' } }, + { + bool: { + must_not: { + term: { 'event.category': 'process' }, + }, + }, + }, + ], + }, + }, + { term: { 'event.kind': 'alert' } }, + ], + }, + }, + ], + }, + }, + aggs: { + alerts: { + filter: { term: { 'event.kind': 'alert' } }, + aggs: { + ids: { terms: { field: 'process.entity_id', size: entityIDs.length } }, + }, + }, + events: { + filter: { term: { 'event.kind': 'event' } }, + aggs: { + ids: { + // The entityIDs array will be made up of alert and event entity_ids, so we're guaranteed that there + // won't be anymore unique process.entity_ids than the size of the array passed in + terms: { field: 'process.entity_id', size: entityIDs.length }, + aggs: { + categories: { + // Currently ECS defines a small number of valid categories (under 10 right now), as ECS grows it's possible that the + // valid categories could exceed this hardcoded limit. If that happens we might want to revisit this + // and transition it to a composite aggregation so that we can paginate through all the possible response + terms: { field: 'event.category', size: 1000 }, + }, + }, + }, + }, + }, + }, + }; + } + + private static getEventStats(catAgg: CategoriesAgg): EventStats { + const total = catAgg.doc_count; + if (!catAgg.categories?.buckets) { + return { + total, + byCategory: {}, + }; + } + + const byCategory: Record = catAgg.categories.buckets.reduce( + (cummulative: Record, bucket: AggBucket) => ({ + ...cummulative, + [bucket.key]: bucket.doc_count, + }), + {} + ); + return { + total, + byCategory, + }; + } + + public formatResponse(response: SearchResponse): StatsResult { + let alerts: Record = {}; + + if (response.aggregations?.alerts?.ids?.buckets) { + alerts = response.aggregations.alerts.ids.buckets.reduce( + (cummulative: Record, bucket: AggBucket) => ({ + ...cummulative, + [bucket.key]: bucket.doc_count, + }), + {} + ); + } + + /** + * The response for the events ids aggregation should look like this: + * "aggregations" : { + * "ids" : { + * "doc_count_error_upper_bound" : 0, + * "sum_other_doc_count" : 0, + * "buckets" : [ + * { + * "key" : "entity_id1", + * "doc_count" : 3, + * "categories" : { + * "doc_count_error_upper_bound" : 0, + * "sum_other_doc_count" : 0, + * "buckets" : [ + * { + * "key" : "session", + * "doc_count" : 3 + * }, + * { + * "key" : "authentication", + * "doc_count" : 2 + * } + * ] + * } + * }, + * + * Which would indicate that entity_id1 had 3 related events. 3 of the related events had category session, + * and 2 had authentication + */ + let events: Record = {}; + if (response.aggregations?.events?.ids?.buckets) { + events = response.aggregations.events.ids.buckets.reduce( + (cummulative: Record, bucket: CategoriesAgg) => ({ + ...cummulative, + [bucket.key]: StatsQuery.getEventStats(bucket), + }), + {} + ); + } + + return { + alerts, + events, + }; + } +} diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/tree.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/tree.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/children_helper.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/children_helper.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/children_helper.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/children_helper.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/children_helper.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/children_helper.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/children_helper.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/children_helper.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/fetch.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/fetch.ts similarity index 96% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/fetch.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/fetch.ts index 4b14c555d49b7..4ac8e206d4f3b 100644 --- a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/fetch.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/fetch.ts @@ -173,10 +173,13 @@ export class Fetcher { const statsQuery = new StatsQuery(this.indexPattern, this.endpointID); const ids = tree.ids(); const res = await statsQuery.search(this.client, ids); - const alerts = res?.alerts || {}; - const events = res?.events || {}; + const alerts = res.alerts; + const events = res.events; ids.forEach((id) => { - tree.addStats(id, { totalAlerts: alerts[id] || 0, totalEvents: events[id] || 0 }); + tree.addStats(id, { + totalAlerts: alerts[id] || 0, + events: events[id] || { total: 0, byCategory: {} }, + }); }); } } diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/node.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/node.ts similarity index 96% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/node.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/node.ts index ae078b5368a96..2fe7e364bb460 100644 --- a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/node.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/node.ts @@ -81,7 +81,10 @@ export function createTree(entityID: string): ResolverTree { }, stats: { totalAlerts: 0, - totalEvents: 0, + events: { + total: 0, + byCategory: {}, + }, }, }; } diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/pagination.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/pagination.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/pagination.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/pagination.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/tree.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/tree.test.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/tree.test.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/tree.test.ts diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/utils/tree.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/tree.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/routes/resolver/utils/tree.ts rename to x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/tree.ts diff --git a/x-pack/plugins/siem/server/endpoint/test_data/all_metadata_data.json b/x-pack/plugins/security_solution/server/endpoint/test_data/all_metadata_data.json similarity index 100% rename from x-pack/plugins/siem/server/endpoint/test_data/all_metadata_data.json rename to x-pack/plugins/security_solution/server/endpoint/test_data/all_metadata_data.json diff --git a/x-pack/plugins/siem/server/endpoint/types.ts b/x-pack/plugins/security_solution/server/endpoint/types.ts similarity index 100% rename from x-pack/plugins/siem/server/endpoint/types.ts rename to x-pack/plugins/security_solution/server/endpoint/types.ts diff --git a/x-pack/plugins/siem/server/graphql/authentications/index.ts b/x-pack/plugins/security_solution/server/graphql/authentications/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/authentications/index.ts rename to x-pack/plugins/security_solution/server/graphql/authentications/index.ts diff --git a/x-pack/plugins/siem/server/graphql/authentications/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/authentications/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/authentications/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/authentications/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/authentications/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/authentications/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/authentications/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/authentications/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/ecs/index.ts b/x-pack/plugins/security_solution/server/graphql/ecs/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/ecs/index.ts rename to x-pack/plugins/security_solution/server/graphql/ecs/index.ts diff --git a/x-pack/plugins/siem/server/graphql/ecs/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/ecs/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/ecs/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/ecs/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/ecs/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/ecs/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/ecs/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/ecs/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/events/index.ts b/x-pack/plugins/security_solution/server/graphql/events/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/events/index.ts rename to x-pack/plugins/security_solution/server/graphql/events/index.ts diff --git a/x-pack/plugins/siem/server/graphql/events/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/events/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/events/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/events/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/events/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/events/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/events/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/events/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/hosts/index.ts b/x-pack/plugins/security_solution/server/graphql/hosts/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/hosts/index.ts rename to x-pack/plugins/security_solution/server/graphql/hosts/index.ts diff --git a/x-pack/plugins/siem/server/graphql/hosts/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/hosts/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/hosts/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/hosts/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/hosts/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/hosts/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/hosts/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/hosts/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/index.ts b/x-pack/plugins/security_solution/server/graphql/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/index.ts rename to x-pack/plugins/security_solution/server/graphql/index.ts diff --git a/x-pack/plugins/siem/server/graphql/ip_details/index.ts b/x-pack/plugins/security_solution/server/graphql/ip_details/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/ip_details/index.ts rename to x-pack/plugins/security_solution/server/graphql/ip_details/index.ts diff --git a/x-pack/plugins/siem/server/graphql/ip_details/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/ip_details/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/ip_details/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/ip_details/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/ip_details/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/ip_details/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/ip_details/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/ip_details/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/kpi_hosts/index.ts b/x-pack/plugins/security_solution/server/graphql/kpi_hosts/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/kpi_hosts/index.ts rename to x-pack/plugins/security_solution/server/graphql/kpi_hosts/index.ts diff --git a/x-pack/plugins/siem/server/graphql/kpi_hosts/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/kpi_hosts/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/kpi_hosts/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/kpi_hosts/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/kpi_hosts/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/kpi_hosts/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/kpi_network/index.ts b/x-pack/plugins/security_solution/server/graphql/kpi_network/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/kpi_network/index.ts rename to x-pack/plugins/security_solution/server/graphql/kpi_network/index.ts diff --git a/x-pack/plugins/siem/server/graphql/kpi_network/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/kpi_network/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/kpi_network/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/kpi_network/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/kpi_network/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/kpi_network/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/kpi_network/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/kpi_network/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/matrix_histogram/index.ts b/x-pack/plugins/security_solution/server/graphql/matrix_histogram/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/matrix_histogram/index.ts rename to x-pack/plugins/security_solution/server/graphql/matrix_histogram/index.ts diff --git a/x-pack/plugins/siem/server/graphql/matrix_histogram/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/matrix_histogram/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/matrix_histogram/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/matrix_histogram/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/matrix_histogram/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/matrix_histogram/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/network/index.ts b/x-pack/plugins/security_solution/server/graphql/network/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/network/index.ts rename to x-pack/plugins/security_solution/server/graphql/network/index.ts diff --git a/x-pack/plugins/siem/server/graphql/network/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/network/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/network/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/network/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/network/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/network/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/network/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/network/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/note/index.ts b/x-pack/plugins/security_solution/server/graphql/note/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/note/index.ts rename to x-pack/plugins/security_solution/server/graphql/note/index.ts diff --git a/x-pack/plugins/siem/server/graphql/note/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/note/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/note/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/note/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/note/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/note/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/note/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/note/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/overview/index.ts b/x-pack/plugins/security_solution/server/graphql/overview/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/overview/index.ts rename to x-pack/plugins/security_solution/server/graphql/overview/index.ts diff --git a/x-pack/plugins/siem/server/graphql/overview/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/overview/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/overview/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/overview/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/overview/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/overview/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/overview/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/overview/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/pinned_event/index.ts b/x-pack/plugins/security_solution/server/graphql/pinned_event/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/pinned_event/index.ts rename to x-pack/plugins/security_solution/server/graphql/pinned_event/index.ts diff --git a/x-pack/plugins/siem/server/graphql/pinned_event/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/pinned_event/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/pinned_event/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/pinned_event/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/pinned_event/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/pinned_event/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/pinned_event/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/pinned_event/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_date/index.ts b/x-pack/plugins/security_solution/server/graphql/scalar_date/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_date/index.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_date/index.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_date/resolvers.test.ts b/x-pack/plugins/security_solution/server/graphql/scalar_date/resolvers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_date/resolvers.test.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_date/resolvers.test.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_date/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/scalar_date/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_date/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_date/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_date/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/scalar_date/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_date/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_date/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_any/index.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_any/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_any/index.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_any/index.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_any/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_any/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_any/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_any/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_any/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_any/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/index.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/resolvers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/resolvers.test.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_boolean_array/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_date_array/index.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_date_array/index.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/index.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/resolvers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/resolvers.test.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_date_array/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_number_array/index.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_number_array/index.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/index.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/resolvers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/resolvers.test.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/scalar_to_number_array/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/source_status/index.ts b/x-pack/plugins/security_solution/server/graphql/source_status/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/source_status/index.ts rename to x-pack/plugins/security_solution/server/graphql/source_status/index.ts diff --git a/x-pack/plugins/siem/server/graphql/source_status/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/source_status/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/source_status/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/source_status/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/source_status/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/source_status/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/source_status/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/source_status/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/sources/index.ts b/x-pack/plugins/security_solution/server/graphql/sources/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/sources/index.ts rename to x-pack/plugins/security_solution/server/graphql/sources/index.ts diff --git a/x-pack/plugins/siem/server/graphql/sources/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/sources/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/sources/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/sources/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/sources/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/sources/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/sources/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/sources/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/timeline/index.ts b/x-pack/plugins/security_solution/server/graphql/timeline/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/timeline/index.ts rename to x-pack/plugins/security_solution/server/graphql/timeline/index.ts diff --git a/x-pack/plugins/siem/server/graphql/timeline/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/timeline/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/timeline/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/timeline/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/timeline/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/timeline/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/timeline/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/timeline/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/tls/index.ts b/x-pack/plugins/security_solution/server/graphql/tls/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/tls/index.ts rename to x-pack/plugins/security_solution/server/graphql/tls/index.ts diff --git a/x-pack/plugins/siem/server/graphql/tls/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/tls/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/tls/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/tls/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/tls/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/tls/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/tls/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/tls/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/types.ts b/x-pack/plugins/security_solution/server/graphql/types.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/types.ts rename to x-pack/plugins/security_solution/server/graphql/types.ts diff --git a/x-pack/plugins/siem/server/graphql/uncommon_processes/index.ts b/x-pack/plugins/security_solution/server/graphql/uncommon_processes/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/uncommon_processes/index.ts rename to x-pack/plugins/security_solution/server/graphql/uncommon_processes/index.ts diff --git a/x-pack/plugins/siem/server/graphql/uncommon_processes/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/uncommon_processes/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/uncommon_processes/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/uncommon_processes/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/uncommon_processes/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/uncommon_processes/schema.gql.ts diff --git a/x-pack/plugins/siem/server/graphql/who_am_i/index.ts b/x-pack/plugins/security_solution/server/graphql/who_am_i/index.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/who_am_i/index.ts rename to x-pack/plugins/security_solution/server/graphql/who_am_i/index.ts diff --git a/x-pack/plugins/siem/server/graphql/who_am_i/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/who_am_i/resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/who_am_i/resolvers.ts rename to x-pack/plugins/security_solution/server/graphql/who_am_i/resolvers.ts diff --git a/x-pack/plugins/siem/server/graphql/who_am_i/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/who_am_i/schema.gql.ts similarity index 100% rename from x-pack/plugins/siem/server/graphql/who_am_i/schema.gql.ts rename to x-pack/plugins/security_solution/server/graphql/who_am_i/schema.gql.ts diff --git a/x-pack/plugins/siem/server/index.ts b/x-pack/plugins/security_solution/server/index.ts similarity index 100% rename from x-pack/plugins/siem/server/index.ts rename to x-pack/plugins/security_solution/server/index.ts diff --git a/x-pack/plugins/siem/server/init_server.ts b/x-pack/plugins/security_solution/server/init_server.ts similarity index 97% rename from x-pack/plugins/siem/server/init_server.ts rename to x-pack/plugins/security_solution/server/init_server.ts index 6158a33c25cfa..1463d7f0da284 100644 --- a/x-pack/plugins/siem/server/init_server.ts +++ b/x-pack/plugins/security_solution/server/init_server.ts @@ -63,5 +63,5 @@ export const initServer = (libs: AppBackendLibs) => { typeDefs: schemas, }); - libs.framework.registerGraphQLEndpoint('/api/siem/graphql', schema); + libs.framework.registerGraphQLEndpoint('/api/solutions/security/graphql', schema); }; diff --git a/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/authentications/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/authentications/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/authentications/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/authentications/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/authentications/index.ts b/x-pack/plugins/security_solution/server/lib/authentications/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/authentications/index.ts rename to x-pack/plugins/security_solution/server/lib/authentications/index.ts diff --git a/x-pack/plugins/siem/server/lib/authentications/query.dsl.ts b/x-pack/plugins/security_solution/server/lib/authentications/query.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/authentications/query.dsl.ts rename to x-pack/plugins/security_solution/server/lib/authentications/query.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/authentications/types.ts b/x-pack/plugins/security_solution/server/lib/authentications/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/authentications/types.ts rename to x-pack/plugins/security_solution/server/lib/authentications/types.ts diff --git a/x-pack/plugins/siem/server/lib/compose/kibana.ts b/x-pack/plugins/security_solution/server/lib/compose/kibana.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/compose/kibana.ts rename to x-pack/plugins/security_solution/server/lib/compose/kibana.ts diff --git a/x-pack/plugins/siem/server/lib/configuration/adapter_types.ts b/x-pack/plugins/security_solution/server/lib/configuration/adapter_types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/configuration/adapter_types.ts rename to x-pack/plugins/security_solution/server/lib/configuration/adapter_types.ts diff --git a/x-pack/plugins/siem/server/lib/configuration/index.ts b/x-pack/plugins/security_solution/server/lib/configuration/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/configuration/index.ts rename to x-pack/plugins/security_solution/server/lib/configuration/index.ts diff --git a/x-pack/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts b/x-pack/plugins/security_solution/server/lib/configuration/inmemory_configuration_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts rename to x-pack/plugins/security_solution/server/lib/configuration/inmemory_configuration_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/README.md similarity index 88% rename from x-pack/plugins/siem/server/lib/detection_engine/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/README.md index 4c90869a9fe84..7a48df72d6bde 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/README.md +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/README.md @@ -35,7 +35,7 @@ source ~/.zshrc Open your `kibana.dev.yml` file and add these lines: ```sh -xpack.siem.signalsIndex: .siem-signals-${your user id} +xpack.security_solution.signalsIndex: .siem-signals-${your user id} ``` Restart Kibana and ensure that you are using `--no-base-path` as changing the base path is a feature but will @@ -46,7 +46,7 @@ server log [22:05:22.277] [info][status][plugin:alerting@8.0.0] Status changed f server log [22:05:22.270] [info][status][plugin:actions@8.0.0] Status changed from uninitialized to green - Ready ``` -Go to the scripts folder `cd kibana/x-pack/plugins/siem/server/lib/detection_engine/scripts` and run: +Go to the scripts folder `cd kibana/x-pack/plugins/security_solution/server/lib/detection_engine/scripts` and run: ```sh ./hard_reset.sh @@ -59,7 +59,7 @@ which will: - Delete any existing alerts you have - Delete any existing alert tasks you have - Delete any existing signal mapping, policies, and template, you might have previously had. -- Add the latest signal index and its mappings using your settings from `kibana.dev.yml` environment variable of `xpack.siem.signalsIndex`. +- Add the latest signal index and its mappings using your settings from `kibana.dev.yml` environment variable of `xpack.security_solution.signalsIndex`. - Posts the sample rule from `./rules/queries/query_with_rule_id.json` - The sample rule checks for root or admin every 5 minutes and reports that as a signal if it is a positive hit @@ -144,7 +144,7 @@ engine logging.verbose: true logging.events: { - log: ['siem', 'info', 'warning', 'error', 'fatal'], + log: ['security_solution', 'info', 'warning', 'error', 'fatal'], request: ['info', 'warning', 'error', 'fatal'], error: '*', ops: __no-ops__, @@ -159,7 +159,7 @@ https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions To update the status of a signal or group of signals, the following scripts provide an example of how to go about doing so. -`cd x-pack/plugins/siem/server/lib/detection_engine/scripts` +`cd x-pack/plugins/security_solution/server/lib/detection_engine/scripts` `./signals/put_signal_doc.sh` will post a sample signal doc into the signals index to play with `./signals/set_status_with_id.sh closed` will update the status of the sample signal to closed `./signals/set_status_with_id.sh open` will update the status of the sample signal to open @@ -170,7 +170,7 @@ go about doing so. To test out the functionality of large lists with rules, the user will need to import a list and post a rule with a reference to that exception list. The following outlines an example using the sample json rule provided in the repo. -* First, set the appropriate env var in order to enable exceptions features`export ELASTIC_XPACK_SIEM_LISTS_FEATURE=true` and `export ELASTIC_XPACK_SIEM_EXCEPTIONS_LISTS=true` and start kibana +* First, set the appropriate env var in order to enable exceptions features`export ELASTIC_XPACK_SECURITY_SOLUTION_LISTS_FEATURE=true` and `export ELASTIC_XPACK_SECURITY_SOLUTION_EXCEPTIONS_LISTS=true` and start kibana * Second, import a list of ips from a file called `ci-badguys.txt`. The command should look like this: `cd $HOME/kibana/x-pack/plugins/lists/server/scripts && ./import_list_items_by_filename.sh ip ~/ci-badguys.txt` -* Then, from the detection engine scripts folder (`cd kibana/x-pack/plugins/siem/server/lib/detection_engine/scripts`) run `./post_rule.sh rules/queries/lists/query_with_list_plugin.json` +* Then, from the detection engine scripts folder (`cd kibana/x-pack/plugins/security_solution/server/lib/detection_engine/scripts`) run `./post_rule.sh rules/queries/lists/query_with_list_plugin.json` diff --git a/x-pack/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/errors/bad_request_error.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/errors/bad_request_error.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/feature_flags.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/feature_flags.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/feature_flags.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/feature_flags.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/feature_flags.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/feature_flags.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/feature_flags.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/feature_flags.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/create_bootstrap_index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/create_bootstrap_index.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/delete_all_index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/delete_all_index.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/delete_policy.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/delete_policy.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/delete_policy.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/delete_policy.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/delete_template.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/delete_template.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/delete_template.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/delete_template.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/get_index_exists.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/get_index_exists.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/get_index_exists.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/get_index_exists.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/get_policy_exists.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/get_policy_exists.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/get_template_exists.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/get_template_exists.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/read_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/read_index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/read_index.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/read_index.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/set_policy.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/set_policy.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/set_policy.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/set_policy.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/index/set_template.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/index/set_template.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/index/set_template.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/index/set_template.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/add_tags.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/add_tags.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/add_tags.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/add_tags.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/build_signals_query.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/build_signals_query.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/build_signals_query.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/build_signals_query.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/create_notifications.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/delete_notifications.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/find_notifications.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals_count.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals_count.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/read_notifications.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/rules_notification_alert_type.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/types.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/types.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/update_notifications.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/privileges/read_privileges.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/privileges/read_privileges.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/index.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts similarity index 93% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts index 65f38507605a5..7289eb6dea161 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -19,7 +19,7 @@ const createMockClients = () => ({ clusterClient: elasticsearchServiceMock.createScopedClusterClient(), licensing: { license: licensingMock.createLicenseMock() }, savedObjectsClient: savedObjectsClientMock.create(), - siemClient: siemMock.createClient(), + appClient: siemMock.createClient(), }); const createRequestContextMock = ( @@ -36,7 +36,7 @@ const createRequestContextMock = ( savedObjects: { client: clients.savedObjectsClient }, }, licensing: clients.licensing, - siem: { getSiemClient: jest.fn(() => clients.siemClient) }, + securitySolution: { getAppClient: jest.fn(() => clients.appClient) }, } as unknown) as RequestHandlerContext; }; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/response_factory.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/response_factory.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/server.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/server.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/test_adapters.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/test_adapters.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts similarity index 95% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts index 02a2545a93826..a09fd9e0c9bd9 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts @@ -22,7 +22,7 @@ export const createIndexRoute = (router: IRouter) => { path: DETECTION_ENGINE_INDEX_URL, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -30,7 +30,7 @@ export const createIndexRoute = (router: IRouter) => { try { const clusterClient = context.core.elasticsearch.legacy.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); const callCluster = clusterClient.callAsCurrentUser; if (!siemClient) { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/delete_index_route.ts similarity index 95% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/delete_index_route.ts index 9d03accff0c4a..b58103bf15f3b 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/delete_index_route.ts @@ -30,7 +30,7 @@ export const deleteIndexRoute = (router: IRouter) => { path: DETECTION_ENGINE_INDEX_URL, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -38,7 +38,7 @@ export const deleteIndexRoute = (router: IRouter) => { try { const clusterClient = context.core.elasticsearch.legacy.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/ecs_mapping.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/ecs_mapping.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts similarity index 93% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts index 5c2ffe53b9864..7debe0931abd6 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts @@ -15,7 +15,7 @@ export const readIndexRoute = (router: IRouter) => { path: DETECTION_ENGINE_INDEX_URL, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -23,7 +23,7 @@ export const readIndexRoute = (router: IRouter) => { try { const clusterClient = context.core.elasticsearch.legacy.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/signals_mapping.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/signals_mapping.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/signals_policy.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/signals_policy.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts similarity index 96% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts index ce44f71ef7217..cb4ec99748e47 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts @@ -64,8 +64,8 @@ describe('read_privileges route', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(getPrivilegeRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject(getPrivilegeRequest(), contextWithoutSecuritySolution); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.ts similarity index 94% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.ts index 011d01f841ee7..715a5be7462d1 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/privileges/read_privileges_route.ts @@ -22,7 +22,7 @@ export const readPrivilegesRoute = ( path: DETECTION_ENGINE_PRIVILEGES_URL, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -30,7 +30,7 @@ export const readPrivilegesRoute = ( try { const clusterClient = context.core.elasticsearch.legacy.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts similarity index 95% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts index f0b975379388f..241d362753d53 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts @@ -98,8 +98,11 @@ describe('add_prepackaged_rules_route', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(addPrepackagedRulesRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject( + addPrepackagedRulesRequest(), + contextWithoutSecuritySolution + ); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts similarity index 96% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index 6268451042da1..d5628877ee16e 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -26,7 +26,7 @@ export const addPrepackedRulesRoute = (router: IRouter) => { path: DETECTION_ENGINE_PREPACKAGED_URL, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -36,7 +36,7 @@ export const addPrepackedRulesRoute = (router: IRouter) => { const alertsClient = context.alerting?.getAlertsClient(); const clusterClient = context.core.elasticsearch.legacy.client; const savedObjectsClient = context.core.savedObjects.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient || !alertsClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts index 473d183c8a8f2..6875b0fc76ecc 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts @@ -62,8 +62,8 @@ describe('create_rules_bulk', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(getReadBulkRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject(getReadBulkRequest(), contextWithoutSecuritySolution); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index d88cc7fcde504..dc0b65cef61d0 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -35,7 +35,7 @@ export const createRulesBulkRoute = (router: IRouter, ml: SetupPlugins['ml']) => body: buildRouteValidation(createRulesBulkSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -43,7 +43,7 @@ export const createRulesBulkRoute = (router: IRouter, ml: SetupPlugins['ml']) => const alertsClient = context.alerting?.getAlertsClient(); const clusterClient = context.core.elasticsearch.legacy.client; const savedObjectsClient = context.core.savedObjects.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient || !alertsClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts index afdcda7da251d..7984b84729821 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts @@ -71,8 +71,8 @@ describe('create_rules', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(getCreateRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject(getCreateRequest(), contextWithoutSecuritySolution); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts similarity index 97% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts index 4ddecd94676cb..6138db4dcb0ff 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -29,7 +29,7 @@ export const createRulesRoute = (router: IRouter, ml: SetupPlugins['ml']): void body: buildRouteValidation(createRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -71,7 +71,7 @@ export const createRulesRoute = (router: IRouter, ml: SetupPlugins['ml']): void const alertsClient = context.alerting?.getAlertsClient(); const clusterClient = context.core.elasticsearch.legacy.client; const savedObjectsClient = context.core.savedObjects.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient || !alertsClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts index 01ad3c7d4e726..c1e359b36caa1 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts @@ -27,7 +27,7 @@ export const deleteRulesBulkRoute = (router: IRouter) => { }, path: `${DETECTION_ENGINE_RULES_URL}/_bulk_delete`, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }; const handler: Handler = async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts index 1290fa4b24907..a2256b8338d2f 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts @@ -24,7 +24,7 @@ export const deleteRulesRoute = (router: IRouter) => { query: buildRouteValidation(queryRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts index bc4568dd0a40b..ad0b3c87ff145 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -23,7 +23,7 @@ export const exportRulesRoute = (router: IRouter, config: ConfigType) => { body: buildRouteValidation(exportRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts index 2a64b8fb7989d..7d99be908d064 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts @@ -22,7 +22,7 @@ export const findRulesRoute = (router: IRouter) => { query: buildRouteValidation(findRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.ts index 1f095b9f0a56f..a923c1bb49200 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.ts @@ -28,7 +28,7 @@ export const findRulesStatusesRoute = (router: IRouter) => { body: buildRouteValidation(findRulesStatusesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts index 90380b0483c82..31aad769d5a3d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts @@ -24,7 +24,7 @@ export const getPrepackagedRulesStatusRoute = (router: IRouter) => { path: `${DETECTION_ENGINE_PREPACKAGED_URL}/_status`, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index 65b6bd749d672..a7d5e579b074d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -72,8 +72,8 @@ describe('import_rules_route', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(request, contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject(request, contextWithoutSecuritySolution); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); @@ -118,7 +118,7 @@ describe('import_rules_route', () => { }); test('returns an error if the index does not exist', async () => { - clients.siemClient.getSignalsIndex.mockReturnValue('mockSignalsIndex'); + clients.appClient.getSignalsIndex.mockReturnValue('mockSignalsIndex'); clients.clusterClient.callAsCurrentUser.mockResolvedValue(getEmptyIndex()); const response = await server.inject(request, context); expect(response.status).toEqual(400); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts index 311149087cc49..cbe583a11d1c1 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -52,7 +52,7 @@ export const importRulesRoute = (router: IRouter, config: ConfigType, ml: SetupP body: buildRouteValidation(importRulesPayloadSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], body: { maxBytes: config.maxRuleImportPayloadBytes, output: 'stream', @@ -66,7 +66,7 @@ export const importRulesRoute = (router: IRouter, config: ConfigType, ml: SetupP const alertsClient = context.alerting?.getAlertsClient(); const clusterClient = context.core.elasticsearch.legacy.client; const savedObjectsClient = context.core.savedObjects.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient || !alertsClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts similarity index 99% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts index e9c0ca08c88ee..d1347786ddc1b 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts @@ -28,7 +28,7 @@ export const patchRulesBulkRoute = (router: IRouter, ml: SetupPlugins['ml']) => body: buildRouteValidation(patchRulesBulkSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts similarity index 99% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts index 2a1ac9862e7d0..8f0d222ebaa64 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts @@ -27,7 +27,7 @@ export const patchRulesRoute = (router: IRouter, ml: SetupPlugins['ml']) => { body: buildRouteValidation(patchRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts index cedd7ccd1a411..c9b218a3f0898 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts @@ -23,7 +23,7 @@ export const readRulesRoute = (router: IRouter) => { query: buildRouteValidation(queryRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts index e48c72ce9579e..74b135bcb4d8c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts @@ -76,8 +76,8 @@ describe('update_rules_bulk', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(getUpdateBulkRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject(getUpdateBulkRequest(), contextWithoutSecuritySolution); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts index 335684dc38b32..ec2b0168c18bf 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts @@ -27,7 +27,7 @@ export const updateRulesBulkRoute = (router: IRouter, ml: SetupPlugins['ml']) => body: buildRouteValidation(updateRulesBulkSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -35,7 +35,7 @@ export const updateRulesBulkRoute = (router: IRouter, ml: SetupPlugins['ml']) => const alertsClient = context.alerting?.getAlertsClient(); const savedObjectsClient = context.core.savedObjects.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); if (!siemClient || !alertsClient) { return siemResponse.error({ statusCode: 404 }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts index ce25a0204a606..25556d8d10fd4 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts @@ -83,8 +83,8 @@ describe('update_rules', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(getUpdateRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject(getUpdateRequest(), contextWithoutSecuritySolution); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts similarity index 97% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts index f15154a09657d..2680db8abdd4d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -26,7 +26,7 @@ export const updateRulesRoute = (router: IRouter, ml: SetupPlugins['ml']) => { body: buildRouteValidation(updateRulesSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -69,7 +69,7 @@ export const updateRulesRoute = (router: IRouter, ml: SetupPlugins['ml']) => { try { const alertsClient = context.alerting?.getAlertsClient(); const savedObjectsClient = context.core.savedObjects.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); const ruleStatusClient = ruleStatusSavedObjectsClientFactory(savedObjectsClient); if (!siemClient || !alertsClient) { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/create_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/export_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/export_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/find_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/find_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/import_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/import_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/schemas.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/schemas.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/schemas/update_rules_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts similarity index 96% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts index 72f3c89f660c7..a8819bbd7432c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts @@ -50,8 +50,11 @@ describe('set signal status', () => { }); it('returns 404 if siem client is unavailable', async () => { - const { siem, ...contextWithoutSiem } = context; - const response = await server.inject(getSetSignalStatusByQueryRequest(), contextWithoutSiem); + const { securitySolution, ...contextWithoutSecuritySolution } = context; + const response = await server.inject( + getSetSignalStatusByQueryRequest(), + contextWithoutSecuritySolution + ); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts similarity index 95% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts index 0d174edb0e36b..e3e19d83d8f0d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts @@ -18,13 +18,13 @@ export const setSignalsStatusRoute = (router: IRouter) => { body: buildRouteValidation(setSignalsStatusSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { const { signal_ids: signalIds, query, status } = request.body; const clusterClient = context.core.elasticsearch.legacy.client; - const siemClient = context.siem?.getSiemClient(); + const siemClient = context.securitySolution?.getAppClient(); const siemResponse = buildSiemResponse(response); if (!siemClient) { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts similarity index 93% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts index 5153ef2048c99..a93f4ebff58d4 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts @@ -18,13 +18,13 @@ export const querySignalsRoute = (router: IRouter) => { body: buildRouteValidation(querySignalsSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { const { query, aggs, _source, track_total_hits, size } = request.body; const clusterClient = context.core.elasticsearch.legacy.client; - const siemClient = context.siem!.getSiemClient(); + const siemClient = context.securitySolution!.getAppClient(); const siemResponse = buildSiemResponse(response); try { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/tags/read_tags_route.ts similarity index 96% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/tags/read_tags_route.ts index 2b885385521dd..9c508f99244cb 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/tags/read_tags_route.ts @@ -15,7 +15,7 @@ export const readTagsRoute = (router: IRouter) => { path: DETECTION_ENGINE_TAGS_URL, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/utils.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/saved_object_mappings.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/saved_object_mappings.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/types.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/add_tags.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/add_tags.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/add_tags.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/add_tags.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/index.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_iptables_or_firewall.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_iptables_or_firewall.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_iptables_or_firewall.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_iptables_or_firewall.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_syslog_service.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_syslog_service.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_syslog_service.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_attempt_to_disable_syslog_service.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_base16_or_base32_encoding_or_decoding_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_base16_or_base32_encoding_or_decoding_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_base16_or_base32_encoding_or_decoding_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_base16_or_base32_encoding_or_decoding_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_base64_encoding_or_decoding_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_base64_encoding_or_decoding_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_base64_encoding_or_decoding_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_base64_encoding_or_decoding_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_disable_selinux_attempt.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_disable_selinux_attempt.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_disable_selinux_attempt.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_disable_selinux_attempt.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_file_deletion_via_shred.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_file_deletion_via_shred.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_file_deletion_via_shred.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_file_deletion_via_shred.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_file_mod_writable_dir.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_file_mod_writable_dir.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_file_mod_writable_dir.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_file_mod_writable_dir.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hex_encoding_or_decoding_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_hex_encoding_or_decoding_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hex_encoding_or_decoding_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_hex_encoding_or_decoding_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_enumeration.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_enumeration.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_enumeration.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_enumeration.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_removal.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_removal.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_removal.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_removal.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_perl_tty_shell.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_perl_tty_shell.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_perl_tty_shell.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_perl_tty_shell.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_python_tty_shell.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_python_tty_shell.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_python_tty_shell.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_python_tty_shell.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_setgid_bit_set_via_chmod.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_setgid_bit_set_via_chmod.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_setgid_bit_set_via_chmod.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_setgid_bit_set_via_chmod.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_setuid_bit_set_via_chmod.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_setuid_bit_set_via_chmod.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_setuid_bit_set_via_chmod.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_setuid_bit_set_via_chmod.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_sudoers_file_mod.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_sudoers_file_mod.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_sudoers_file_mod.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_sudoers_file_mod.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_external.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_external.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_external.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_external.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_internal.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_internal.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_internal.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_telnet_network_activity_internal.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_virtual_machine_fingerprinting.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_virtual_machine_fingerprinting.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_virtual_machine_fingerprinting.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_virtual_machine_fingerprinting.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/notice.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/notice.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/saved_object_mappings.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/saved_object_mappings.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts similarity index 91% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts index 8fceb8ef720b5..0dfe68f132b06 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts @@ -45,8 +45,5 @@ export const updateRulesNotifications = async ({ interval: ruleActions.alertThrottle, }); - // TODO: Workaround for https://github.com/elastic/kibana/issues/67290 - await alertsClient.updateApiKey({ id: ruleAlertId }); - return ruleActions; }; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/utils.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/rules/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/add_prepackaged_rules.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/add_prepackaged_rules.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/check_env_variables.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/check_env_variables.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_actions.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_actions.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_alerts.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_alerts.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_api_keys.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_api_keys.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_statuses.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_all_statuses.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_bulk.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_bulk.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_rule_by_id.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_rule_by_id.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_signal_index.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/delete_signal_index.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules_to_file.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/export_rules_to_file.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rule_by_filter.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rule_by_filter.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rules.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rules.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rules_sort.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rules_sort.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_saved_object.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/find_saved_object.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_action_instances.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_action_instances.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_action_types.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_action_types.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_instances.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_instances.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_tasks.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_tasks.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_types.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_alert_types.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_privileges.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_privileges.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_rule_by_id.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_rule_by_id.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_saved_objects.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_saved_objects.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_signal_index.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_signal_index.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_tags.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/get_tags.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/hard_reset.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/hard_reset.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/import_rules.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/import_rules.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/patch_rule.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/patch_rule.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/patch_rule_bulk.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/patch_rule_bulk.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule_bulk.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule_bulk.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_signal_index.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_signal_index.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_x_rules.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_x_rules.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/patch_names.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/bulk/patch_names.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/disable_rule.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/disable_rule.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_interval.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_interval.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_list.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_list.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_note.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_note.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_tags.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_tags.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_version.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/patches/update_version.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_and.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_and.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_and.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_and.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_excluded.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_excluded.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_excluded.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_excluded.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_exists.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_exists.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_exists.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_exists.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list_plugin.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list_plugin.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list_plugin.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_list_plugin.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match_all.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match_all.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match_all.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_match_all.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_or.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_or.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/lists/query_with_or.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/lists/query_with_or.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_disabled.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_disabled.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_lucene.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_lucene.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_note.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_note.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/simplest_query.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/simplest_query.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/README.md diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/disable_rule.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/disable_rule.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_interval.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_interval.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_list.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_list.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_note.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_note.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_tags.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_tags.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_version.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/updates/update_version.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signal_index_exists.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signal_index_exists.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/aggs_signals.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/aggs_signals.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/put_signal_doc.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/put_signal_doc.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/query_signals.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/query_signals.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/sample_signal.json similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/sample_signal.json diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/set_status_with_id.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/set_status_with_id.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/set_status_with_query.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/signals/set_status_with_query.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/update_rule.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/update_rule.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/update_rule_bulk.sh similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh rename to x-pack/plugins/security_solution/server/lib/detection_engine/scripts/update_rule_bulk.sh diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_bulk_body.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_bulk_body.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_bulk_body.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_bulk_body.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_exceptions_query.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_exceptions_query.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_exceptions_query.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_exceptions_query.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_exceptions_query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_exceptions_query.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_exceptions_query.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_exceptions_query.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_signal.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_signal.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_signal.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_signal.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/filter_events_with_list.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filter_events_with_list.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/filter_events_with_list.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/filter_events_with_list.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/filter_events_with_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filter_events_with_list.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/filter_events_with_list.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/filter_events_with_list.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/find_ml_signals.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/find_ml_signals.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts similarity index 94% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts index c001312fbf2f5..03a63fe315a33 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts @@ -16,7 +16,7 @@ export const getInputIndex = async ( return inputIndex; } else { const configuration = await services.savedObjectsClient.get<{ - 'siem:defaultIndex': string[]; + 'securitySolution:defaultIndex': string[]; }>('config', version); if (configuration.attributes != null && configuration.attributes[DEFAULT_INDEX_KEY] != null) { return configuration.attributes[DEFAULT_INDEX_KEY]; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_status_service.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_status_service.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_status_service.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_status_service.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts similarity index 67% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts index 50c63df14996b..46fdb739bf143 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts @@ -9,8 +9,11 @@ import { i18n } from '@kbn/i18n'; export const siemRuleActionGroups = [ { id: 'default', - name: i18n.translate('xpack.siem.detectionEngine.signalRuleAlert.actionGroups.default', { - defaultMessage: 'Default', - }), + name: i18n.translate( + 'xpack.securitySolution.detectionEngine.signalRuleAlert.actionGroups.default', + { + defaultMessage: 'Default', + } + ), }, ]; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_params_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_params_schema.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_bulk_create.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/utils.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/signals/utils.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.test.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts diff --git a/x-pack/plugins/siem/server/lib/detection_engine/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/detection_engine/types.ts rename to x-pack/plugins/security_solution/server/lib/detection_engine/types.ts diff --git a/x-pack/plugins/siem/server/lib/ecs_fields/extend_map.test.ts b/x-pack/plugins/security_solution/server/lib/ecs_fields/extend_map.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ecs_fields/extend_map.test.ts rename to x-pack/plugins/security_solution/server/lib/ecs_fields/extend_map.test.ts diff --git a/x-pack/plugins/siem/server/lib/ecs_fields/extend_map.ts b/x-pack/plugins/security_solution/server/lib/ecs_fields/extend_map.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ecs_fields/extend_map.ts rename to x-pack/plugins/security_solution/server/lib/ecs_fields/extend_map.ts diff --git a/x-pack/plugins/siem/server/lib/ecs_fields/index.ts b/x-pack/plugins/security_solution/server/lib/ecs_fields/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ecs_fields/index.ts rename to x-pack/plugins/security_solution/server/lib/ecs_fields/index.ts diff --git a/x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/events/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/events/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/events/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/events/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/events/index.ts b/x-pack/plugins/security_solution/server/lib/events/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/index.ts rename to x-pack/plugins/security_solution/server/lib/events/index.ts diff --git a/x-pack/plugins/siem/server/lib/events/mock.ts b/x-pack/plugins/security_solution/server/lib/events/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/mock.ts rename to x-pack/plugins/security_solution/server/lib/events/mock.ts diff --git a/x-pack/plugins/siem/server/lib/events/query.dsl.ts b/x-pack/plugins/security_solution/server/lib/events/query.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/query.dsl.ts rename to x-pack/plugins/security_solution/server/lib/events/query.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/events/query.last_event_time.dsl.ts b/x-pack/plugins/security_solution/server/lib/events/query.last_event_time.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/query.last_event_time.dsl.ts rename to x-pack/plugins/security_solution/server/lib/events/query.last_event_time.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/events/types.ts b/x-pack/plugins/security_solution/server/lib/events/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/events/types.ts rename to x-pack/plugins/security_solution/server/lib/events/types.ts diff --git a/x-pack/plugins/siem/server/lib/framework/index.ts b/x-pack/plugins/security_solution/server/lib/framework/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/framework/index.ts rename to x-pack/plugins/security_solution/server/lib/framework/index.ts diff --git a/x-pack/plugins/siem/server/lib/framework/kibana_framework_adapter.ts b/x-pack/plugins/security_solution/server/lib/framework/kibana_framework_adapter.ts similarity index 92% rename from x-pack/plugins/siem/server/lib/framework/kibana_framework_adapter.ts rename to x-pack/plugins/security_solution/server/lib/framework/kibana_framework_adapter.ts index d34703cb27cdf..6d9e9b13bc356 100644 --- a/x-pack/plugins/siem/server/lib/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/security_solution/server/lib/framework/kibana_framework_adapter.ts @@ -15,7 +15,7 @@ import { RequestHandlerContext, KibanaRequest, } from '../../../../../../src/core/server'; -import { IndexPatternsFetcher } from '../../../../../../src/plugins/data/server'; +import { IndexPatternsFetcher, UI_SETTINGS } from '../../../../../../src/plugins/data/server'; import { AuthenticatedUser } from '../../../../security/common/model'; import { SetupPlugins } from '../../plugin'; @@ -43,10 +43,10 @@ export class KibanaBackendFrameworkAdapter implements FrameworkAdapter { params: Record ) { const { elasticsearch, uiSettings } = req.context.core; - const includeFrozen = await uiSettings.client.get('search:includeFrozen'); + const includeFrozen = await uiSettings.client.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN); const maxConcurrentShardRequests = endpoint === 'msearch' - ? await uiSettings.client.get('courier:maxConcurrentShardRequests') + ? await uiSettings.client.get(UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS) : 0; return elasticsearch.legacy.client.callAsCurrentUser(endpoint, { @@ -64,7 +64,7 @@ export class KibanaBackendFrameworkAdapter implements FrameworkAdapter { path: routePath, validate: { body: configSchema.object({}, { unknowns: 'allow' }) }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { @@ -97,7 +97,7 @@ export class KibanaBackendFrameworkAdapter implements FrameworkAdapter { path: `${routePath}/graphiql`, validate: false, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/framework/types.ts b/x-pack/plugins/security_solution/server/lib/framework/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/framework/types.ts rename to x-pack/plugins/security_solution/server/lib/framework/types.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/hosts/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/hosts/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/hosts/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/hosts/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/hosts/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/helpers.test.ts rename to x-pack/plugins/security_solution/server/lib/hosts/helpers.test.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/helpers.ts b/x-pack/plugins/security_solution/server/lib/hosts/helpers.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/helpers.ts rename to x-pack/plugins/security_solution/server/lib/hosts/helpers.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/index.ts b/x-pack/plugins/security_solution/server/lib/hosts/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/index.ts rename to x-pack/plugins/security_solution/server/lib/hosts/index.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/mock.ts b/x-pack/plugins/security_solution/server/lib/hosts/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/mock.ts rename to x-pack/plugins/security_solution/server/lib/hosts/mock.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts b/x-pack/plugins/security_solution/server/lib/hosts/query.detail_host.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts rename to x-pack/plugins/security_solution/server/lib/hosts/query.detail_host.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/query.hosts.dsl.ts b/x-pack/plugins/security_solution/server/lib/hosts/query.hosts.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/query.hosts.dsl.ts rename to x-pack/plugins/security_solution/server/lib/hosts/query.hosts.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts b/x-pack/plugins/security_solution/server/lib/hosts/query.last_first_seen_host.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts rename to x-pack/plugins/security_solution/server/lib/hosts/query.last_first_seen_host.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/hosts/types.ts b/x-pack/plugins/security_solution/server/lib/hosts/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/hosts/types.ts rename to x-pack/plugins/security_solution/server/lib/hosts/types.ts diff --git a/x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/index_fields/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/index_fields/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/index_fields/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/index_fields/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/index_fields/index.ts b/x-pack/plugins/security_solution/server/lib/index_fields/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/index_fields/index.ts rename to x-pack/plugins/security_solution/server/lib/index_fields/index.ts diff --git a/x-pack/plugins/siem/server/lib/index_fields/mock.ts b/x-pack/plugins/security_solution/server/lib/index_fields/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/index_fields/mock.ts rename to x-pack/plugins/security_solution/server/lib/index_fields/mock.ts diff --git a/x-pack/plugins/siem/server/lib/index_fields/types.ts b/x-pack/plugins/security_solution/server/lib/index_fields/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/index_fields/types.ts rename to x-pack/plugins/security_solution/server/lib/index_fields/types.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/ip_details/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/ip_details/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/index.ts b/x-pack/plugins/security_solution/server/lib/ip_details/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/index.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/index.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/mock.ts b/x-pack/plugins/security_solution/server/lib/ip_details/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/mock.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/mock.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/query_overview.dsl.ts b/x-pack/plugins/security_solution/server/lib/ip_details/query_overview.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/query_overview.dsl.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/query_overview.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/query_users.dsl.ts b/x-pack/plugins/security_solution/server/lib/ip_details/query_users.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/query_users.dsl.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/query_users.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/ip_details/types.ts b/x-pack/plugins/security_solution/server/lib/ip_details/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/ip_details/types.ts rename to x-pack/plugins/security_solution/server/lib/ip_details/types.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/helpers.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/helpers.test.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/helpers.test.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/helpers.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/helpers.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/helpers.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/helpers.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/index.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/index.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/index.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/mock.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/query_authentication.dsl.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/query_authentication.dsl.test.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/query_authentication.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/query_authentication.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/query_hosts.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/query_hosts.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/query_unique_ips.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/query_unique_ips.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/types.ts b/x-pack/plugins/security_solution/server/lib/kpi_hosts/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_hosts/types.ts rename to x-pack/plugins/security_solution/server/lib/kpi_hosts/types.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/elastic_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/elastic_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/helpers.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/helpers.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/helpers.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/helpers.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/index.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/index.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/index.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/mock.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/mock.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/mock.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/query_dns.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/query_dns.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/query_network_events.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/query_network_events.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/query_network_events.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/query_network_events.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/query_tls_handshakes.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/query_tls_handshakes.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/query_unique_flow.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/query_unique_flow.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/query_unique_flow.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/query_unique_flow.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/query_unique_private_ips.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/query_unique_private_ips.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/kpi_network/types.ts b/x-pack/plugins/security_solution/server/lib/kpi_network/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/kpi_network/types.ts rename to x-pack/plugins/security_solution/server/lib/kpi_network/types.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/authz.test.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/authz.test.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/authz.test.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/authz.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts similarity index 93% rename from x-pack/plugins/siem/server/lib/machine_learning/authz.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts index fb74f46244361..9925970a0f637 100644 --- a/x-pack/plugins/siem/server/lib/machine_learning/authz.ts +++ b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts @@ -72,16 +72,16 @@ export const validateMlAuthz = async ({ let message: string | undefined; if (ml == null) { - message = i18n.translate('xpack.siem.authz.mlUnavailable', { + message = i18n.translate('xpack.securitySolution.authz.mlUnavailable', { defaultMessage: 'The machine learning plugin is not available. Try enabling the plugin.', }); } else if (!hasMlLicense(license)) { - message = i18n.translate('xpack.siem.licensing.unsupportedMachineLearningMessage', { + message = i18n.translate('xpack.securitySolution.licensing.unsupportedMachineLearningMessage', { defaultMessage: 'Your license does not support machine learning. Please upgrade your license.', }); } else if (!(await isMlAdmin({ ml, request }))) { - message = i18n.translate('xpack.siem.authz.userIsNotMlAdminMessage', { + message = i18n.translate('xpack.securitySolution.authz.userIsNotMlAdminMessage', { defaultMessage: 'The current user is not a machine learning administrator.', }); } diff --git a/x-pack/plugins/siem/server/lib/machine_learning/cache.test.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/cache.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/cache.test.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/cache.test.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/cache.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/cache.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/cache.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/cache.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/index.test.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/index.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/index.test.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/index.test.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/index.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/index.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/index.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/mocks.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/mocks.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/mocks.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/mocks.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/validation.test.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/validation.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/validation.test.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/validation.test.ts diff --git a/x-pack/plugins/siem/server/lib/machine_learning/validation.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/validation.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/machine_learning/validation.ts rename to x-pack/plugins/security_solution/server/lib/machine_learning/validation.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/elasticseatch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/elasticseatch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/index.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/index.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/index.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/mock.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/query.events_over_time.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/query.events_over_time.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/query_alerts.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/query_alerts.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/query_dns_histogram.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/query_dns_histogram.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/translations.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/translations.ts similarity index 81% rename from x-pack/plugins/siem/server/lib/matrix_histogram/translations.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/translations.ts index 9fdfc9ff7be0d..0e46f5cff1445 100644 --- a/x-pack/plugins/siem/server/lib/matrix_histogram/translations.ts +++ b/x-pack/plugins/security_solution/server/lib/matrix_histogram/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const ALL_OTHERS = i18n.translate( - 'xpack.siem.detectionEngine.alerts.histogram.allOthersGroupingLabel', + 'xpack.securitySolution.detectionEngine.alerts.histogram.allOthersGroupingLabel', { defaultMessage: 'All others', } diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/types.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/types.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/types.ts diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/utils.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/utils.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/matrix_histogram/utils.ts rename to x-pack/plugins/security_solution/server/lib/matrix_histogram/utils.ts diff --git a/x-pack/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap b/x-pack/plugins/security_solution/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap similarity index 100% rename from x-pack/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap rename to x-pack/plugins/security_solution/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap diff --git a/x-pack/plugins/siem/server/lib/network/elastic_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/network/elastic_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/elastic_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/network/elastic_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/network/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/network/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/network/index.ts b/x-pack/plugins/security_solution/server/lib/network/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/index.ts rename to x-pack/plugins/security_solution/server/lib/network/index.ts diff --git a/x-pack/plugins/siem/server/lib/network/mock.ts b/x-pack/plugins/security_solution/server/lib/network/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/mock.ts rename to x-pack/plugins/security_solution/server/lib/network/mock.ts diff --git a/x-pack/plugins/siem/server/lib/network/query_dns.dsl.ts b/x-pack/plugins/security_solution/server/lib/network/query_dns.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/query_dns.dsl.ts rename to x-pack/plugins/security_solution/server/lib/network/query_dns.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/network/query_http.dsl.ts b/x-pack/plugins/security_solution/server/lib/network/query_http.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/query_http.dsl.ts rename to x-pack/plugins/security_solution/server/lib/network/query_http.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/network/query_top_countries.dsl.ts b/x-pack/plugins/security_solution/server/lib/network/query_top_countries.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/query_top_countries.dsl.ts rename to x-pack/plugins/security_solution/server/lib/network/query_top_countries.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts b/x-pack/plugins/security_solution/server/lib/network/query_top_n_flow.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts rename to x-pack/plugins/security_solution/server/lib/network/query_top_n_flow.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/network/types.ts b/x-pack/plugins/security_solution/server/lib/network/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/network/types.ts rename to x-pack/plugins/security_solution/server/lib/network/types.ts diff --git a/x-pack/plugins/siem/server/lib/note/saved_object.ts b/x-pack/plugins/security_solution/server/lib/note/saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/note/saved_object.ts rename to x-pack/plugins/security_solution/server/lib/note/saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/note/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/note/saved_object_mappings.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/note/saved_object_mappings.ts rename to x-pack/plugins/security_solution/server/lib/note/saved_object_mappings.ts diff --git a/x-pack/plugins/siem/server/lib/overview/elastic_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/overview/elastic_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/overview/elastic_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/overview/elastic_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/overview/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/overview/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/overview/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/overview/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/overview/index.ts b/x-pack/plugins/security_solution/server/lib/overview/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/overview/index.ts rename to x-pack/plugins/security_solution/server/lib/overview/index.ts diff --git a/x-pack/plugins/siem/server/lib/overview/mock.ts b/x-pack/plugins/security_solution/server/lib/overview/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/overview/mock.ts rename to x-pack/plugins/security_solution/server/lib/overview/mock.ts diff --git a/x-pack/plugins/siem/server/lib/overview/query.dsl.ts b/x-pack/plugins/security_solution/server/lib/overview/query.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/overview/query.dsl.ts rename to x-pack/plugins/security_solution/server/lib/overview/query.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/overview/types.ts b/x-pack/plugins/security_solution/server/lib/overview/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/overview/types.ts rename to x-pack/plugins/security_solution/server/lib/overview/types.ts diff --git a/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts b/x-pack/plugins/security_solution/server/lib/pinned_event/saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts rename to x-pack/plugins/security_solution/server/lib/pinned_event/saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/pinned_event/saved_object_mappings.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts rename to x-pack/plugins/security_solution/server/lib/pinned_event/saved_object_mappings.ts diff --git a/x-pack/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/source_status/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/source_status/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/source_status/index.ts b/x-pack/plugins/security_solution/server/lib/source_status/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/source_status/index.ts rename to x-pack/plugins/security_solution/server/lib/source_status/index.ts diff --git a/x-pack/plugins/siem/server/lib/source_status/query.dsl.ts b/x-pack/plugins/security_solution/server/lib/source_status/query.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/source_status/query.dsl.ts rename to x-pack/plugins/security_solution/server/lib/source_status/query.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/source_status/types.ts b/x-pack/plugins/security_solution/server/lib/source_status/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/source_status/types.ts rename to x-pack/plugins/security_solution/server/lib/source_status/types.ts diff --git a/x-pack/plugins/siem/server/lib/sources/configuration.test.ts b/x-pack/plugins/security_solution/server/lib/sources/configuration.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/sources/configuration.test.ts rename to x-pack/plugins/security_solution/server/lib/sources/configuration.test.ts diff --git a/x-pack/plugins/siem/server/lib/sources/configuration.ts b/x-pack/plugins/security_solution/server/lib/sources/configuration.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/sources/configuration.ts rename to x-pack/plugins/security_solution/server/lib/sources/configuration.ts diff --git a/x-pack/plugins/siem/server/lib/sources/index.ts b/x-pack/plugins/security_solution/server/lib/sources/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/sources/index.ts rename to x-pack/plugins/security_solution/server/lib/sources/index.ts diff --git a/x-pack/plugins/siem/server/lib/sources/types.ts b/x-pack/plugins/security_solution/server/lib/sources/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/sources/types.ts rename to x-pack/plugins/security_solution/server/lib/sources/types.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/convert_saved_object_to_savedtimeline.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts rename to x-pack/plugins/security_solution/server/lib/timeline/convert_saved_object_to_savedtimeline.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/lib/timeline/create_timelines_stream_from_ndjson.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts rename to x-pack/plugins/security_solution/server/lib/timeline/create_timelines_stream_from_ndjson.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/default_timeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/default_timeline.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/default_timeline.ts rename to x-pack/plugins/security_solution/server/lib/timeline/default_timeline.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/default_timeline_headers.ts b/x-pack/plugins/security_solution/server/lib/timeline/default_timeline_headers.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/default_timeline_headers.ts rename to x-pack/plugins/security_solution/server/lib/timeline/default_timeline_headers.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/pick_saved_timeline.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts rename to x-pack/plugins/security_solution/server/lib/timeline/pick_saved_timeline.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/README.md b/x-pack/plugins/security_solution/server/lib/timeline/routes/README.md similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/README.md rename to x-pack/plugins/security_solution/server/lib/timeline/routes/README.md diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/__mocks__/import_timelines.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/__mocks__/import_timelines.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/__mocks__/request_responses.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/__mocks__/request_responses.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/clean_draft_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/clean_draft_timelines_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/clean_draft_timelines_route.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/clean_draft_timelines_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/clean_draft_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/clean_draft_timelines_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/timeline/routes/clean_draft_timelines_route.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/clean_draft_timelines_route.ts index ac962a848368b..30225da6b42cc 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/clean_draft_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/clean_draft_timelines_route.ts @@ -27,7 +27,7 @@ export const cleanDraftTimelinesRoute = ( body: buildRouteValidation(cleanDraftTimelineSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/create_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/create_timelines_route.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/create_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/timeline/routes/create_timelines_route.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.ts index c456ae31fb7da..d92f2ce0764c5 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/create_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.ts @@ -36,7 +36,7 @@ export const createTimelinesRoute = ( body: buildRouteValidation(createTimelineSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/export_timelines_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/export_timelines_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/export_timelines_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/export_timelines_route.ts index e74069fb748a5..1d16cd9261069 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/export_timelines_route.ts @@ -25,7 +25,7 @@ export const exportTimelinesRoute = (router: IRouter, config: ConfigType) => { body: buildRouteValidation(exportTimelinesRequestBodySchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/get_draft_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/get_draft_timelines_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/get_draft_timelines_route.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/get_draft_timelines_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/get_draft_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/get_draft_timelines_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/timeline/routes/get_draft_timelines_route.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/get_draft_timelines_route.ts index 137b2032b8e50..7b379741fc217 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/get_draft_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/get_draft_timelines_route.ts @@ -27,7 +27,7 @@ export const getDraftTimelinesRoute = ( query: buildRouteValidation(getDraftTimelineSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, async (context, request, response) => { diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts similarity index 99% rename from x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts index c16b73ff51b56..0f9e97cfc2106 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts @@ -56,7 +56,7 @@ export const importTimelinesRoute = ( body: buildRouteValidation(ImportTimelinesPayloadSchemaRt), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], body: { maxBytes: config.maxTimelineImportPayloadBytes, output: 'stream', diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/clean_draft_timelines_schema.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/clean_draft_timelines_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/clean_draft_timelines_schema.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/clean_draft_timelines_schema.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/create_timelines_schema.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/create_timelines_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/create_timelines_schema.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/create_timelines_schema.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/export_timelines_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/export_timelines_schema.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/get_draft_timelines_schema.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/get_draft_timelines_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/get_draft_timelines_schema.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/get_draft_timelines_schema.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/import_timelines_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/import_timelines_schema.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/schemas.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/schemas.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/schemas/update_timelines_schema.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/update_timelines_schema.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/schemas/update_timelines_schema.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/schemas/update_timelines_schema.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/update_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/update_timelines_route.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/update_timelines_route.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/update_timelines_route.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/update_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/update_timelines_route.ts similarity index 98% rename from x-pack/plugins/siem/server/lib/timeline/routes/update_timelines_route.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/update_timelines_route.ts index a0f3d11a1533d..a479c818cb01d 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/update_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/update_timelines_route.ts @@ -33,7 +33,7 @@ export const updateTimelinesRoute = ( body: buildRouteValidation(updateTimelineSchema), }, options: { - tags: ['access:siem'], + tags: ['access:securitySolution'], }, }, // eslint-disable-next-line complexity diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/utils/common.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/common.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/utils/common.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/utils/common.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/utils/create_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/utils/create_timelines.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/export_timelines.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/utils/export_timelines.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/import_timelines.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/utils/import_timelines.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/utils/update_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/update_timelines.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/routes/utils/update_timelines.ts rename to x-pack/plugins/security_solution/server/lib/timeline/routes/utils/update_timelines.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/saved_object.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/saved_object.test.ts rename to x-pack/plugins/security_solution/server/lib/timeline/saved_object.test.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/saved_object.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/saved_object.ts rename to x-pack/plugins/security_solution/server/lib/timeline/saved_object.ts diff --git a/x-pack/plugins/siem/server/lib/timeline/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/timeline/saved_object_mappings.ts rename to x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings.ts diff --git a/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/tls/index.ts b/x-pack/plugins/security_solution/server/lib/tls/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/tls/index.ts rename to x-pack/plugins/security_solution/server/lib/tls/index.ts diff --git a/x-pack/plugins/siem/server/lib/tls/mock.ts b/x-pack/plugins/security_solution/server/lib/tls/mock.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/tls/mock.ts rename to x-pack/plugins/security_solution/server/lib/tls/mock.ts diff --git a/x-pack/plugins/siem/server/lib/tls/query_tls.dsl.ts b/x-pack/plugins/security_solution/server/lib/tls/query_tls.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/tls/query_tls.dsl.ts rename to x-pack/plugins/security_solution/server/lib/tls/query_tls.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/tls/types.ts b/x-pack/plugins/security_solution/server/lib/tls/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/tls/types.ts rename to x-pack/plugins/security_solution/server/lib/tls/types.ts diff --git a/x-pack/plugins/siem/server/lib/types.ts b/x-pack/plugins/security_solution/server/lib/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/types.ts rename to x-pack/plugins/security_solution/server/lib/types.ts diff --git a/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts b/x-pack/plugins/security_solution/server/lib/uncommon_processes/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts rename to x-pack/plugins/security_solution/server/lib/uncommon_processes/elasticsearch_adapter.test.ts diff --git a/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/uncommon_processes/elasticsearch_adapter.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts rename to x-pack/plugins/security_solution/server/lib/uncommon_processes/elasticsearch_adapter.ts diff --git a/x-pack/plugins/siem/server/lib/uncommon_processes/index.ts b/x-pack/plugins/security_solution/server/lib/uncommon_processes/index.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/uncommon_processes/index.ts rename to x-pack/plugins/security_solution/server/lib/uncommon_processes/index.ts diff --git a/x-pack/plugins/siem/server/lib/uncommon_processes/query.dsl.ts b/x-pack/plugins/security_solution/server/lib/uncommon_processes/query.dsl.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/uncommon_processes/query.dsl.ts rename to x-pack/plugins/security_solution/server/lib/uncommon_processes/query.dsl.ts diff --git a/x-pack/plugins/siem/server/lib/uncommon_processes/types.ts b/x-pack/plugins/security_solution/server/lib/uncommon_processes/types.ts similarity index 100% rename from x-pack/plugins/siem/server/lib/uncommon_processes/types.ts rename to x-pack/plugins/security_solution/server/lib/uncommon_processes/types.ts diff --git a/x-pack/plugins/siem/server/mocks.ts b/x-pack/plugins/security_solution/server/mocks.ts similarity index 59% rename from x-pack/plugins/siem/server/mocks.ts rename to x-pack/plugins/security_solution/server/mocks.ts index 44c41be86b6ff..c3fd85247c696 100644 --- a/x-pack/plugins/siem/server/mocks.ts +++ b/x-pack/plugins/security_solution/server/mocks.ts @@ -4,14 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SiemClient } from './types'; +import { AppClient } from './types'; -type SiemClientMock = jest.Mocked; -const createSiemClientMock = (): SiemClientMock => +type AppClientMock = jest.Mocked; +const createAppClientMock = (): AppClientMock => (({ getSignalsIndex: jest.fn(), - } as unknown) as SiemClientMock); + } as unknown) as AppClientMock); export const siemMock = { - createClient: createSiemClientMock, + createClient: createAppClientMock, }; diff --git a/x-pack/plugins/siem/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts similarity index 87% rename from x-pack/plugins/siem/server/plugin.ts rename to x-pack/plugins/security_solution/server/plugin.ts index a8858c91d677c..00f2cba304c88 100644 --- a/x-pack/plugins/siem/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -33,7 +33,7 @@ import { rulesNotificationAlertType } from './lib/detection_engine/notifications import { isNotificationAlertExecutor } from './lib/detection_engine/notifications/types'; import { hasListsFeature, listsEnvFeatureFlagName } from './lib/detection_engine/feature_flags'; import { initSavedObjects, savedObjectTypes } from './saved_objects'; -import { SiemClientFactory } from './client'; +import { AppClientFactory } from './client'; import { createConfig$, ConfigType } from './config'; import { initUiSettings } from './ui_settings'; import { APP_ID, APP_ICON } from '../common/constants'; @@ -69,14 +69,14 @@ export class Plugin implements IPlugin; private context: PluginInitializerContext; - private siemClientFactory: SiemClientFactory; + private appClientFactory: AppClientFactory; private readonly endpointAppContextService = new EndpointAppContextService(); constructor(context: PluginInitializerContext) { this.context = context; this.logger = context.logger.get('plugins', APP_ID); this.config$ = createConfig$(context); - this.siemClientFactory = new SiemClientFactory(); + this.appClientFactory = new AppClientFactory(); this.logger.debug('plugin initialized'); } @@ -87,7 +87,7 @@ export class Plugin implements IPlugin ({ - getSiemClient: () => this.siemClientFactory.create(request), + getAppClient: () => this.appClientFactory.create(request), })); - this.siemClientFactory.setup({ + this.appClientFactory.setup({ getSpaceId: plugins.spaces?.spacesService?.getSpaceId, config, }); @@ -126,19 +126,19 @@ export class Plugin implements IPlugin SiemClient; +export interface AppRequestContext { + getAppClient: () => AppClient; } declare module 'src/core/server' { interface RequestHandlerContext { - siem?: SiemRequestContext; + securitySolution?: AppRequestContext; } } diff --git a/x-pack/plugins/siem/server/ui_settings.ts b/x-pack/plugins/security_solution/server/ui_settings.ts similarity index 54% rename from x-pack/plugins/siem/server/ui_settings.ts rename to x-pack/plugins/security_solution/server/ui_settings.ts index 26b7fd72571af..4b5261edcdfd0 100644 --- a/x-pack/plugins/siem/server/ui_settings.ts +++ b/x-pack/plugins/security_solution/server/ui_settings.ts @@ -12,8 +12,8 @@ import { DEFAULT_INDEX_KEY, DEFAULT_INDEX_PATTERN, DEFAULT_ANOMALY_SCORE, - DEFAULT_SIEM_TIME_RANGE, - DEFAULT_SIEM_REFRESH_INTERVAL, + DEFAULT_APP_TIME_RANGE, + DEFAULT_APP_REFRESH_INTERVAL, DEFAULT_INTERVAL_PAUSE, DEFAULT_INTERVAL_VALUE, DEFAULT_FROM, @@ -27,39 +27,42 @@ import { export const initUiSettings = (uiSettings: CoreSetup['uiSettings']) => { uiSettings.register({ - [DEFAULT_SIEM_REFRESH_INTERVAL]: { + [DEFAULT_APP_REFRESH_INTERVAL]: { type: 'json', - name: i18n.translate('xpack.siem.uiSettings.defaultRefreshIntervalLabel', { + name: i18n.translate('xpack.securitySolution.uiSettings.defaultRefreshIntervalLabel', { defaultMessage: 'Time filter refresh interval', }), value: `{ "pause": ${DEFAULT_INTERVAL_PAUSE}, "value": ${DEFAULT_INTERVAL_VALUE} }`, - description: i18n.translate('xpack.siem.uiSettings.defaultRefreshIntervalDescription', { - defaultMessage: - '

Default refresh interval for the SIEM time filter, in milliseconds.

', - }), - category: ['siem'], + description: i18n.translate( + 'xpack.securitySolution.uiSettings.defaultRefreshIntervalDescription', + { + defaultMessage: + '

Default refresh interval for the Security time filter, in milliseconds.

', + } + ), + category: ['securitySolution'], requiresPageReload: true, schema: schema.object({ value: schema.number(), pause: schema.boolean(), }), }, - [DEFAULT_SIEM_TIME_RANGE]: { + [DEFAULT_APP_TIME_RANGE]: { type: 'json', - name: i18n.translate('xpack.siem.uiSettings.defaultTimeRangeLabel', { + name: i18n.translate('xpack.securitySolution.uiSettings.defaultTimeRangeLabel', { defaultMessage: 'Time filter period', }), value: `{ "from": "${DEFAULT_FROM}", "to": "${DEFAULT_TO}" }`, - description: i18n.translate('xpack.siem.uiSettings.defaultTimeRangeDescription', { - defaultMessage: '

Default period of time in the SIEM time filter.

', + description: i18n.translate('xpack.securitySolution.uiSettings.defaultTimeRangeDescription', { + defaultMessage: '

Default period of time in the Security time filter.

', }), - category: ['siem'], + category: ['securitySolution'], requiresPageReload: true, schema: schema.object({ from: schema.string(), @@ -67,68 +70,74 @@ export const initUiSettings = (uiSettings: CoreSetup['uiSettings']) => { }), }, [DEFAULT_INDEX_KEY]: { - name: i18n.translate('xpack.siem.uiSettings.defaultIndexLabel', { + name: i18n.translate('xpack.securitySolution.uiSettings.defaultIndexLabel', { defaultMessage: 'Elasticsearch indices', }), value: DEFAULT_INDEX_PATTERN, - description: i18n.translate('xpack.siem.uiSettings.defaultIndexDescription', { + description: i18n.translate('xpack.securitySolution.uiSettings.defaultIndexDescription', { defaultMessage: - '

Comma-delimited list of Elasticsearch indices from which the SIEM app collects events.

', + '

Comma-delimited list of Elasticsearch indices from which the Security app collects events.

', }), - category: ['siem'], + category: ['securitySolution'], requiresPageReload: true, schema: schema.arrayOf(schema.string()), }, [DEFAULT_ANOMALY_SCORE]: { - name: i18n.translate('xpack.siem.uiSettings.defaultAnomalyScoreLabel', { + name: i18n.translate('xpack.securitySolution.uiSettings.defaultAnomalyScoreLabel', { defaultMessage: 'Anomaly threshold', }), value: 50, type: 'number', - description: i18n.translate('xpack.siem.uiSettings.defaultAnomalyScoreDescription', { - defaultMessage: - '

Value above which Machine Learning job anomalies are displayed in the SIEM app.

Valid values: 0 to 100.

', - }), - category: ['siem'], + description: i18n.translate( + 'xpack.securitySolution.uiSettings.defaultAnomalyScoreDescription', + { + defaultMessage: + '

Value above which Machine Learning job anomalies are displayed in the Security app.

Valid values: 0 to 100.

', + } + ), + category: ['securitySolution'], requiresPageReload: true, schema: schema.number(), }, [ENABLE_NEWS_FEED_SETTING]: { - name: i18n.translate('xpack.siem.uiSettings.enableNewsFeedLabel', { + name: i18n.translate('xpack.securitySolution.uiSettings.enableNewsFeedLabel', { defaultMessage: 'News feed', }), value: true, - description: i18n.translate('xpack.siem.uiSettings.enableNewsFeedDescription', { + description: i18n.translate('xpack.securitySolution.uiSettings.enableNewsFeedDescription', { defaultMessage: '

Enables the News feed

', }), type: 'boolean', - category: ['siem'], + category: ['securitySolution'], requiresPageReload: true, schema: schema.boolean(), }, [NEWS_FEED_URL_SETTING]: { - name: i18n.translate('xpack.siem.uiSettings.newsFeedUrl', { + name: i18n.translate('xpack.securitySolution.uiSettings.newsFeedUrl', { defaultMessage: 'News feed URL', }), value: NEWS_FEED_URL_SETTING_DEFAULT, - description: i18n.translate('xpack.siem.uiSettings.newsFeedUrlDescription', { + description: i18n.translate('xpack.securitySolution.uiSettings.newsFeedUrlDescription', { defaultMessage: '

News feed content will be retrieved from this URL

', }), - category: ['siem'], + category: ['securitySolution'], requiresPageReload: true, schema: schema.string(), }, [IP_REPUTATION_LINKS_SETTING]: { - name: i18n.translate('xpack.siem.uiSettings.ipReputationLinks', { + name: i18n.translate('xpack.securitySolution.uiSettings.ipReputationLinks', { defaultMessage: 'IP Reputation Links', }), value: IP_REPUTATION_LINKS_SETTING_DEFAULT, type: 'json', - description: i18n.translate('xpack.siem.uiSettings.ipReputationLinksDescription', { - defaultMessage: - 'Array of URL templates to build the list of reputation URLs to be displayed on the IP Details page.', - }), - category: ['siem'], + description: i18n.translate( + 'xpack.securitySolution.uiSettings.ipReputationLinksDescription', + { + defaultMessage: + 'Array of URL templates to build the list of reputation URLs to be displayed on the IP Details page.', + } + ), + category: ['securitySolution'], requiresPageReload: true, schema: schema.arrayOf( schema.object({ diff --git a/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/auditbeat.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/auditbeat.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/ecs.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/ecs.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/filebeat.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/filebeat.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/index.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/index.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/8.0.0/index.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/index.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/packetbeat.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/packetbeat.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/winlogbeat.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/8.0.0/winlogbeat.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/index.test.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/index.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/index.test.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/index.test.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/index.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/index.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/index.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/index.ts diff --git a/x-pack/plugins/siem/server/utils/beat_schema/type.ts b/x-pack/plugins/security_solution/server/utils/beat_schema/type.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/beat_schema/type.ts rename to x-pack/plugins/security_solution/server/utils/beat_schema/type.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts b/x-pack/plugins/security_solution/server/utils/build_query/calculate_timeseries_interval.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts rename to x-pack/plugins/security_solution/server/utils/build_query/calculate_timeseries_interval.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts b/x-pack/plugins/security_solution/server/utils/build_query/create_options.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/create_options.test.ts rename to x-pack/plugins/security_solution/server/utils/build_query/create_options.test.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/create_options.ts b/x-pack/plugins/security_solution/server/utils/build_query/create_options.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/create_options.ts rename to x-pack/plugins/security_solution/server/utils/build_query/create_options.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/field.mock.ts b/x-pack/plugins/security_solution/server/utils/build_query/field.mock.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/field.mock.ts rename to x-pack/plugins/security_solution/server/utils/build_query/field.mock.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/fields.test.ts b/x-pack/plugins/security_solution/server/utils/build_query/fields.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/fields.test.ts rename to x-pack/plugins/security_solution/server/utils/build_query/fields.test.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/fields.ts b/x-pack/plugins/security_solution/server/utils/build_query/fields.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/fields.ts rename to x-pack/plugins/security_solution/server/utils/build_query/fields.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/filters.ts b/x-pack/plugins/security_solution/server/utils/build_query/filters.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/filters.ts rename to x-pack/plugins/security_solution/server/utils/build_query/filters.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/index.ts b/x-pack/plugins/security_solution/server/utils/build_query/index.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/index.ts rename to x-pack/plugins/security_solution/server/utils/build_query/index.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts b/x-pack/plugins/security_solution/server/utils/build_query/merge_fields_with_hits.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts rename to x-pack/plugins/security_solution/server/utils/build_query/merge_fields_with_hits.test.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts b/x-pack/plugins/security_solution/server/utils/build_query/merge_fields_with_hits.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts rename to x-pack/plugins/security_solution/server/utils/build_query/merge_fields_with_hits.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/reduce_fields.test.ts b/x-pack/plugins/security_solution/server/utils/build_query/reduce_fields.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/reduce_fields.test.ts rename to x-pack/plugins/security_solution/server/utils/build_query/reduce_fields.test.ts diff --git a/x-pack/plugins/siem/server/utils/build_query/reduce_fields.ts b/x-pack/plugins/security_solution/server/utils/build_query/reduce_fields.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_query/reduce_fields.ts rename to x-pack/plugins/security_solution/server/utils/build_query/reduce_fields.ts diff --git a/x-pack/plugins/siem/server/utils/build_validation/route_validation.test.ts b/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_validation/route_validation.test.ts rename to x-pack/plugins/security_solution/server/utils/build_validation/route_validation.test.ts diff --git a/x-pack/plugins/siem/server/utils/build_validation/route_validation.ts b/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/build_validation/route_validation.ts rename to x-pack/plugins/security_solution/server/utils/build_validation/route_validation.ts diff --git a/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.test.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts rename to x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.test.ts diff --git a/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts rename to x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts diff --git a/x-pack/plugins/siem/server/utils/serialized_query.ts b/x-pack/plugins/security_solution/server/utils/serialized_query.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/serialized_query.ts rename to x-pack/plugins/security_solution/server/utils/serialized_query.ts diff --git a/x-pack/plugins/siem/server/utils/typed_elasticsearch_mappings.ts b/x-pack/plugins/security_solution/server/utils/typed_elasticsearch_mappings.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/typed_elasticsearch_mappings.ts rename to x-pack/plugins/security_solution/server/utils/typed_elasticsearch_mappings.ts diff --git a/x-pack/plugins/siem/server/utils/typed_resolvers.ts b/x-pack/plugins/security_solution/server/utils/typed_resolvers.ts similarity index 100% rename from x-pack/plugins/siem/server/utils/typed_resolvers.ts rename to x-pack/plugins/security_solution/server/utils/typed_resolvers.ts diff --git a/x-pack/plugins/siem/yarn.lock b/x-pack/plugins/security_solution/yarn.lock similarity index 100% rename from x-pack/plugins/siem/yarn.lock rename to x-pack/plugins/security_solution/yarn.lock diff --git a/x-pack/plugins/siem/.gitattributes b/x-pack/plugins/siem/.gitattributes deleted file mode 100644 index 8dc2df600b211..0000000000000 --- a/x-pack/plugins/siem/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -# Auto-collapse generated files in GitHub -# https://help.github.com/en/articles/customizing-how-changed-files-appear-on-github -x-pack/plugins/siem/server/graphql/types.ts linguist-generated=true -x-pack/plugins/siem/public/graphql/types.ts linguist-generated=true -x-pack/plugins/siem/public/graphql/introspection.json linguist-generated=true - diff --git a/x-pack/plugins/siem/cypress/cypress.json b/x-pack/plugins/siem/cypress/cypress.json deleted file mode 100644 index 7a4efba8c2d64..0000000000000 --- a/x-pack/plugins/siem/cypress/cypress.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "baseUrl": "http://localhost:5601", - "defaultCommandTimeout": 120000, - "screenshotsFolder": "../../../target/kibana-siem/cypress/screenshots", - "trashAssetsBeforeRuns": false, - "video": false, - "videosFolder": "../../../target/kibana-siem/cypress/videos" -} diff --git a/x-pack/plugins/siem/cypress/reporter_config.json b/x-pack/plugins/siem/cypress/reporter_config.json deleted file mode 100644 index e7e08eeae1dab..0000000000000 --- a/x-pack/plugins/siem/cypress/reporter_config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "reporterEnabled": "mochawesome, mocha-junit-reporter", - "reporterOptions": { - "html": false, - "json": true, - "mochaFile": "../../../target/kibana-siem/cypress/results/TEST-siem-cypress-[hash].xml", - "overwrite": false, - "reportDir": "../../../target/kibana-siem/cypress/results" - } -} diff --git a/x-pack/plugins/siem/cypress/urls/ml_conditional_links.ts b/x-pack/plugins/siem/cypress/urls/ml_conditional_links.ts deleted file mode 100644 index 655418fc98bf8..0000000000000 --- a/x-pack/plugins/siem/cypress/urls/ml_conditional_links.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -/* - * These links are for different test scenarios that try and capture different drill downs into - * ml-network and ml-hosts and are of the flavor of testing: - * A filter being null: (query:!n) - * A filter being set with single values: query=(query:%27process.name%20:%20%22conhost.exe%22%27,language:kuery) - * A filter being set with multiple values: query=(query:%27process.name%20:%20%22conhost.exe,sc.exe%22%27,language:kuery) - * A filter containing variables not replaced: query=(query:%27process.name%20:%20%$process.name$%22%27,language:kuery) - * - * In different combination with: - * network not being set: $ip$ - * host not being set: $host.name$ - * ...or... - * network being set normally: 127.0.0.1 - * host being set normally: suricata-iowa - * ...or... - * network having multiple values: 127.0.0.1,127.0.0.2 - * host having multiple values: suricata-iowa,siem-windows - */ - -// Single IP with a null for the Query: -export const mlNetworkSingleIpNullKqlQuery = - "/app/siem#/ml-network/ip/127.0.0.1?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; - -// Single IP with a value for the Query: -export const mlNetworkSingleIpKqlQuery = - "/app/siem#/ml-network/ip/127.0.0.1?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; - -// Multiple IPs with a null for the Query: -export const mlNetworkMultipleIpNullKqlQuery = - "/app/siem#/ml-network/ip/127.0.0.1,127.0.0.2?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; - -// Multiple IPs with a value for the Query: -export const mlNetworkMultipleIpKqlQuery = - "/app/siem#/ml-network/ip/127.0.0.1,127.0.0.2?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; - -// $ip$ with a null Query: -export const mlNetworkNullKqlQuery = - "/app/siem#/ml-network/ip/$ip$?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; - -// $ip$ with a value for the Query: -export const mlNetworkKqlQuery = - "/app/siem#/ml-network/ip/$ip$?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-28T11:00:00.000Z',kind:absolute,to:'2019-08-28T13:59:59.999Z')))"; - -// Single host name with a null for the Query: -export const mlHostSingleHostNullKqlQuery = - "/app/siem#/ml-hosts/siem-windows?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; - -// Single host name with a variable in the Query: -export const mlHostSingleHostKqlQueryVariable = - "/app/siem#/ml-hosts/siem-windows?query=(language:kuery,query:'process.name%20:%20%22$process.name$%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; - -// Single host name with a value for Query: -export const mlHostSingleHostKqlQuery = - "/app/siem#/ml-hosts/siem-windows?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; - -// Multiple host names with null for Query: -export const mlHostMultiHostNullKqlQuery = - "/app/siem#/ml-hosts/siem-windows,siem-suricata?query=!n&&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; - -// Multiple host names with a value for Query: -export const mlHostMultiHostKqlQuery = - "/app/siem#/ml-hosts/siem-windows,siem-suricata?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; - -// Undefined/null host name with a null for the KQL: -export const mlHostVariableHostNullKqlQuery = - "/app/siem#/ml-hosts/$host.name$?query=!n&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; - -// Undefined/null host name but with a value for Query: -export const mlHostVariableHostKqlQuery = - "/app/siem#/ml-hosts/$host.name$?query=(language:kuery,query:'process.name%20:%20%22conhost.exe,sc.exe%22')&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')),timeline:(linkTo:!(global),timerange:(from:'2019-06-06T06:00:00.000Z',kind:absolute,to:'2019-06-07T05:59:59.999Z')))"; diff --git a/x-pack/plugins/siem/cypress/urls/navigation.ts b/x-pack/plugins/siem/cypress/urls/navigation.ts deleted file mode 100644 index 263469a4dbaed..0000000000000 --- a/x-pack/plugins/siem/cypress/urls/navigation.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - -export const CASES = '/app/siem#/case'; -export const DETECTIONS = 'app/siem#/detections'; -export const HOSTS_PAGE = '/app/siem#/hosts/allHosts'; -export const HOSTS_PAGE_TAB_URLS = { - allHosts: '/app/siem#/hosts/allHosts', - anomalies: '/app/siem#/hosts/anomalies', - authentications: '/app/siem#/hosts/authentications', - events: '/app/siem#/hosts/events', - uncommonProcesses: '/app/siem#/hosts/uncommonProcesses', -}; -export const NETWORK_PAGE = '/app/siem#/network'; -export const OVERVIEW_PAGE = '/app/siem#/overview'; -export const TIMELINES_PAGE = '/app/siem#/timelines'; diff --git a/x-pack/plugins/siem/cypress/urls/state.ts b/x-pack/plugins/siem/cypress/urls/state.ts deleted file mode 100644 index 18f4628aa7137..0000000000000 --- a/x-pack/plugins/siem/cypress/urls/state.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -export const ABSOLUTE_DATE_RANGE = { - url: - '/app/siem#/network/?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))', - - urlUnlinked: - '/app/siem#/network/?timerange=(global:(linkTo:!(),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(),timerange:(from:1564776209186,kind:absolute,to:1564779809186)))', - urlKqlNetworkNetwork: `/app/siem#/network/?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, - urlKqlNetworkHosts: `/app/siem#/network/?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, - urlKqlHostsNetwork: `/app/siem#/hosts/allHosts?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, - urlKqlHostsHosts: `/app/siem#/hosts/allHosts?query=(language:kuery,query:'source.ip:%20"10.142.0.9"')&timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))`, - urlHost: - '/app/siem#/hosts/authentications?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))', - urlHostNew: - '/app/siem#/hosts/authentications?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1577914409186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1577914409186)))', -}; diff --git a/x-pack/plugins/siem/public/alerts/components/rules/description_step/translations.tsx b/x-pack/plugins/siem/public/alerts/components/rules/description_step/translations.tsx deleted file mode 100644 index b494d824679f3..0000000000000 --- a/x-pack/plugins/siem/public/alerts/components/rules/description_step/translations.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const FILTERS_LABEL = i18n.translate('xpack.siem.detectionEngine.createRule.filtersLabel', { - defaultMessage: 'Filters', -}); - -export const QUERY_LABEL = i18n.translate('xpack.siem.detectionEngine.createRule.QueryLabel', { - defaultMessage: 'Custom query', -}); - -export const SAVED_ID_LABEL = i18n.translate('xpack.siem.detectionEngine.createRule.savedIdLabel', { - defaultMessage: 'Saved query name', -}); - -export const ML_TYPE_DESCRIPTION = i18n.translate( - 'xpack.siem.detectionEngine.createRule.mlRuleTypeDescription', - { - defaultMessage: 'Machine Learning', - } -); - -export const QUERY_TYPE_DESCRIPTION = i18n.translate( - 'xpack.siem.detectionEngine.createRule.queryRuleTypeDescription', - { - defaultMessage: 'Query', - } -); - -export const ML_JOB_STARTED = i18n.translate( - 'xpack.siem.detectionEngine.ruleDescription.mlJobStartedDescription', - { - defaultMessage: 'Started', - } -); - -export const ML_JOB_STOPPED = i18n.translate( - 'xpack.siem.detectionEngine.ruleDescription.mlJobStoppedDescription', - { - defaultMessage: 'Stopped', - } -); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/mitre/translations.ts b/x-pack/plugins/siem/public/alerts/components/rules/mitre/translations.ts deleted file mode 100644 index bbc12800b7df5..0000000000000 --- a/x-pack/plugins/siem/public/alerts/components/rules/mitre/translations.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const TACTIC = i18n.translate('xpack.siem.detectionEngine.mitreAttack.tacticsDescription', { - defaultMessage: 'tactic', -}); - -export const TECHNIQUE = i18n.translate( - 'xpack.siem.detectionEngine.mitreAttack.techniquesDescription', - { - defaultMessage: 'techniques', - } -); - -export const ADD_MITRE_ATTACK = i18n.translate('xpack.siem.detectionEngine.mitreAttack.addTitle', { - defaultMessage: 'Add MITRE ATT&CK\\u2122 threat', -}); - -export const TECHNIQUES_PLACEHOLDER = i18n.translate( - 'xpack.siem.detectionEngine.mitreAttack.techniquesPlaceHolderDescription', - { - defaultMessage: 'Select techniques ...', - } -); - -export const TACTIC_PLACEHOLDER = i18n.translate( - 'xpack.siem.detectionEngine.mitreAttack.tacticPlaceHolderDescription', - { - defaultMessage: 'Select tactic ...', - } -); diff --git a/x-pack/plugins/siem/public/alerts/components/rules/rule_status/translations.ts b/x-pack/plugins/siem/public/alerts/components/rules/rule_status/translations.ts deleted file mode 100644 index d128696ec7253..0000000000000 --- a/x-pack/plugins/siem/public/alerts/components/rules/rule_status/translations.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const STATUS = i18n.translate('xpack.siem.detectionEngine.ruleStatus.statusDescription', { - defaultMessage: 'Last response', -}); - -export const STATUS_AT = i18n.translate( - 'xpack.siem.detectionEngine.ruleStatus.statusAtDescription', - { - defaultMessage: 'at', - } -); - -export const STATUS_DATE = i18n.translate( - 'xpack.siem.detectionEngine.ruleStatus.statusDateDescription', - { - defaultMessage: 'Status date', - } -); - -export const REFRESH = i18n.translate('xpack.siem.detectionEngine.ruleStatus.refreshButton', { - defaultMessage: 'Refresh', -}); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/create/translations.ts b/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/create/translations.ts deleted file mode 100644 index 615882d4a7e3b..0000000000000 --- a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/create/translations.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.createRule.pageTitle', { - defaultMessage: 'Create new rule', -}); - -export const BACK_TO_RULES = i18n.translate( - 'xpack.siem.detectionEngine.createRule.backToRulesDescription', - { - defaultMessage: 'Back to detection rules', - } -); - -export const EDIT_RULE = i18n.translate('xpack.siem.detectionEngine.createRule.editRuleButton', { - defaultMessage: 'Edit', -}); - -export const SUCCESSFULLY_CREATED_RULES = (ruleName: string) => - i18n.translate('xpack.siem.detectionEngine.rules.create.successfullyCreatedRuleTitle', { - values: { ruleName }, - defaultMessage: '{ruleName} was created', - }); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/edit/translations.ts b/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/edit/translations.ts deleted file mode 100644 index f6e56dca19c21..0000000000000 --- a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/edit/translations.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.editRule.pageTitle', { - defaultMessage: 'Edit rule settings', -}); - -export const CANCEL = i18n.translate('xpack.siem.detectionEngine.editRule.cancelTitle', { - defaultMessage: 'Cancel', -}); - -export const SAVE_CHANGES = i18n.translate('xpack.siem.detectionEngine.editRule.saveChangeTitle', { - defaultMessage: 'Save changes', -}); - -export const SORRY_ERRORS = i18n.translate( - 'xpack.siem.detectionEngine.editRule.errorMsgDescription', - { - defaultMessage: 'Sorry', - } -); - -export const BACK_TO = i18n.translate('xpack.siem.detectionEngine.editRule.backToDescription', { - defaultMessage: 'Back to', -}); - -export const SUCCESSFULLY_SAVED_RULE = (ruleName: string) => - i18n.translate('xpack.siem.detectionEngine.rules.update.successfullySavedRuleTitle', { - values: { ruleName }, - defaultMessage: '{ruleName} was saved', - }); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/translations.ts b/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/translations.ts deleted file mode 100644 index 0fe1106171054..0000000000000 --- a/x-pack/plugins/siem/public/alerts/pages/detection_engine/rules/translations.ts +++ /dev/null @@ -1,461 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const BACK_TO_ALERTS = i18n.translate('xpack.siem.detectionEngine.rules.backOptionsHeader', { - defaultMessage: 'Back to alerts', -}); - -export const IMPORT_RULE = i18n.translate('xpack.siem.detectionEngine.rules.importRuleTitle', { - defaultMessage: 'Import rule…', -}); - -export const ADD_NEW_RULE = i18n.translate('xpack.siem.detectionEngine.rules.addNewRuleTitle', { - defaultMessage: 'Create new rule', -}); - -export const PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.rules.pageTitle', { - defaultMessage: 'Detection rules', -}); - -export const ADD_PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.rules.addPageTitle', { - defaultMessage: 'Create', -}); - -export const EDIT_PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.rules.editPageTitle', { - defaultMessage: 'Edit', -}); - -export const REFRESH = i18n.translate('xpack.siem.detectionEngine.rules.allRules.refreshTitle', { - defaultMessage: 'Refresh', -}); - -export const BATCH_ACTIONS = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActionsTitle', - { - defaultMessage: 'Bulk actions', - } -); - -export const ACTIVE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.activeRuleDescription', - { - defaultMessage: 'active', - } -); - -export const INACTIVE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.inactiveRuleDescription', - { - defaultMessage: 'inactive', - } -); - -export const BATCH_ACTION_ACTIVATE_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.activateSelectedTitle', - { - defaultMessage: 'Activate selected', - } -); - -export const BATCH_ACTION_ACTIVATE_SELECTED_ERROR = (totalRules: number) => - i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle', - { - values: { totalRules }, - defaultMessage: 'Error activating {totalRules, plural, =1 {rule} other {rules}}…', - } - ); - -export const BATCH_ACTION_DEACTIVATE_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.deactivateSelectedTitle', - { - defaultMessage: 'Deactivate selected', - } -); - -export const BATCH_ACTION_DEACTIVATE_SELECTED_ERROR = (totalRules: number) => - i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle', - { - values: { totalRules }, - defaultMessage: 'Error deactivating {totalRules, plural, =1 {rule} other {rules}}…', - } - ); - -export const BATCH_ACTION_EXPORT_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.exportSelectedTitle', - { - defaultMessage: 'Export selected', - } -); - -export const BATCH_ACTION_DUPLICATE_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.duplicateSelectedTitle', - { - defaultMessage: 'Duplicate selected…', - } -); - -export const BATCH_ACTION_DELETE_SELECTED = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedTitle', - { - defaultMessage: 'Delete selected…', - } -); - -export const BATCH_ACTION_DELETE_SELECTED_IMMUTABLE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle', - { - defaultMessage: 'Selection contains immutable rules which cannot be deleted', - } -); - -export const BATCH_ACTION_DELETE_SELECTED_ERROR = (totalRules: number) => - i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle', - { - values: { totalRules }, - defaultMessage: 'Error deleting {totalRules, plural, =1 {rule} other {rules}}…', - } - ); - -export const EXPORT_FILENAME = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.exportFilenameTitle', - { - defaultMessage: 'rules_export', - } -); - -export const SUCCESSFULLY_EXPORTED_RULES = (totalRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.allRules.successfullyExportedRulesTitle', { - values: { totalRules }, - defaultMessage: - 'Successfully exported {totalRules, plural, =0 {all rules} =1 {{totalRules} rule} other {{totalRules} rules}}', - }); - -export const ALL_RULES = i18n.translate('xpack.siem.detectionEngine.rules.allRules.tableTitle', { - defaultMessage: 'All rules', -}); - -export const SEARCH_RULES = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.searchAriaLabel', - { - defaultMessage: 'Search rules', - } -); - -export const SEARCH_PLACEHOLDER = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.searchPlaceholder', - { - defaultMessage: 'e.g. rule name', - } -); - -export const SHOWING_RULES = (totalRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.allRules.showingRulesTitle', { - values: { totalRules }, - defaultMessage: 'Showing {totalRules} {totalRules, plural, =1 {rule} other {rules}}', - }); - -export const SELECTED_RULES = (selectedRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.allRules.selectedRulesTitle', { - values: { selectedRules }, - defaultMessage: 'Selected {selectedRules} {selectedRules, plural, =1 {rule} other {rules}}', - }); - -export const EDIT_RULE_SETTINGS = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.actions.editRuleSettingsDescription', - { - defaultMessage: 'Edit rule settings', - } -); - -export const DUPLICATE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.actions.duplicateTitle', - { - defaultMessage: 'Duplicate', - } -); - -export const DUPLICATE_RULE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleDescription', - { - defaultMessage: 'Duplicate rule…', - } -); - -export const SUCCESSFULLY_DUPLICATED_RULES = (totalRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.allRules.successfullyDuplicatedRulesTitle', { - values: { totalRules }, - defaultMessage: - 'Successfully duplicated {totalRules, plural, =1 {{totalRules} rule} other {{totalRules} rules}}', - }); - -export const DUPLICATE_RULE_ERROR = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription', - { - defaultMessage: 'Error duplicating rule…', - } -); - -export const EXPORT_RULE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.actions.exportRuleDescription', - { - defaultMessage: 'Export rule', - } -); - -export const DELETE_RULE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.actions.deleteeRuleDescription', - { - defaultMessage: 'Delete rule…', - } -); - -export const COLUMN_RULE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.ruleTitle', - { - defaultMessage: 'Rule', - } -); - -export const COLUMN_RISK_SCORE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.riskScoreTitle', - { - defaultMessage: 'Risk score', - } -); - -export const COLUMN_SEVERITY = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.severityTitle', - { - defaultMessage: 'Severity', - } -); - -export const COLUMN_LAST_COMPLETE_RUN = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.lastRunTitle', - { - defaultMessage: 'Last run', - } -); - -export const COLUMN_LAST_RESPONSE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.lastResponseTitle', - { - defaultMessage: 'Last response', - } -); - -export const COLUMN_TAGS = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.tagsTitle', - { - defaultMessage: 'Tags', - } -); - -export const COLUMN_ACTIVATE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.activateTitle', - { - defaultMessage: 'Activated', - } -); - -export const COLUMN_INDEXING_TIMES = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.indexingTimes', - { - defaultMessage: 'Indexing Time (ms)', - } -); - -export const COLUMN_QUERY_TIMES = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.queryTimes', - { - defaultMessage: 'Query Time (ms)', - } -); - -export const COLUMN_GAP = i18n.translate('xpack.siem.detectionEngine.rules.allRules.columns.gap', { - defaultMessage: 'Gap (if any)', -}); - -export const COLUMN_LAST_LOOKBACK_DATE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.lastLookBackDate', - { - defaultMessage: 'Last Look-Back Date', - } -); - -export const RULES_TAB = i18n.translate('xpack.siem.detectionEngine.rules.allRules.tabs.rules', { - defaultMessage: 'Rules', -}); - -export const MONITORING_TAB = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.tabs.monitoring', - { - defaultMessage: 'Monitoring', - } -); - -export const CUSTOM_RULES = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.filters.customRulesTitle', - { - defaultMessage: 'Custom rules', - } -); - -export const ELASTIC_RULES = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.filters.elasticRulesTitle', - { - defaultMessage: 'Elastic rules', - } -); - -export const TAGS = i18n.translate('xpack.siem.detectionEngine.rules.allRules.filters.tagsLabel', { - defaultMessage: 'Tags', -}); - -export const NO_TAGS_AVAILABLE = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.filters.noTagsAvailableDescription', - { - defaultMessage: 'No tags available', - } -); - -export const NO_RULES = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.filters.noRulesTitle', - { - defaultMessage: 'No rules found', - } -); - -export const NO_RULES_BODY = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.filters.noRulesBodyTitle', - { - defaultMessage: "We weren't able to find any rules with the above filters.", - } -); - -export const DEFINE_RULE = i18n.translate('xpack.siem.detectionEngine.rules.defineRuleTitle', { - defaultMessage: 'Define rule', -}); - -export const ABOUT_RULE = i18n.translate('xpack.siem.detectionEngine.rules.aboutRuleTitle', { - defaultMessage: 'About rule', -}); - -export const SCHEDULE_RULE = i18n.translate('xpack.siem.detectionEngine.rules.scheduleRuleTitle', { - defaultMessage: 'Schedule rule', -}); - -export const RULE_ACTIONS = i18n.translate('xpack.siem.detectionEngine.rules.ruleActionsTitle', { - defaultMessage: 'Rule actions', -}); - -export const DEFINITION = i18n.translate('xpack.siem.detectionEngine.rules.stepDefinitionTitle', { - defaultMessage: 'Definition', -}); - -export const ABOUT = i18n.translate('xpack.siem.detectionEngine.rules.stepAboutTitle', { - defaultMessage: 'About', -}); - -export const SCHEDULE = i18n.translate('xpack.siem.detectionEngine.rules.stepScheduleTitle', { - defaultMessage: 'Schedule', -}); - -export const ACTIONS = i18n.translate('xpack.siem.detectionEngine.rules.stepActionsTitle', { - defaultMessage: 'Actions', -}); - -export const OPTIONAL_FIELD = i18n.translate( - 'xpack.siem.detectionEngine.rules.optionalFieldDescription', - { - defaultMessage: 'Optional', - } -); - -export const CONTINUE = i18n.translate('xpack.siem.detectionEngine.rules.continueButtonTitle', { - defaultMessage: 'Continue', -}); - -export const UPDATE = i18n.translate('xpack.siem.detectionEngine.rules.updateButtonTitle', { - defaultMessage: 'Update', -}); - -export const DELETE = i18n.translate('xpack.siem.detectionEngine.rules.deleteDescription', { - defaultMessage: 'Delete', -}); - -export const LOAD_PREPACKAGED_RULES = i18n.translate( - 'xpack.siem.detectionEngine.rules.loadPrePackagedRulesButton', - { - defaultMessage: 'Load Elastic prebuilt rules', - } -); - -export const RELOAD_MISSING_PREPACKAGED_RULES = (missingRules: number) => - i18n.translate('xpack.siem.detectionEngine.rules.reloadMissingPrePackagedRulesButton', { - values: { missingRules }, - defaultMessage: - 'Install {missingRules} Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} ', - }); - -export const IMPORT_RULE_BTN_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.importRuleTitle', - { - defaultMessage: 'Import rule', - } -); - -export const SELECT_RULE = i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.selectRuleDescription', - { - defaultMessage: 'Select a SIEM rule (as exported from the Detection Engine view) to import', - } -); - -export const INITIAL_PROMPT_TEXT = i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.initialPromptTextDescription', - { - defaultMessage: 'Select or drag and drop a valid rules_export.ndjson file', - } -); - -export const OVERWRITE_WITH_SAME_NAME = i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.overwriteDescription', - { - defaultMessage: 'Automatically overwrite saved objects with the same rule ID', - } -); - -export const SUCCESSFULLY_IMPORTED_RULES = (totalRules: number) => - i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle', - { - values: { totalRules }, - defaultMessage: - 'Successfully imported {totalRules} {totalRules, plural, =1 {rule} other {rules}}', - } - ); - -export const IMPORT_FAILED = i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.importFailedTitle', - { - defaultMessage: 'Failed to import rules', - } -); - -export const IMPORT_FAILED_DETAILED = (ruleId: string, statusCode: number, message: string) => - i18n.translate( - 'xpack.siem.detectionEngine.components.importRuleModal.importFailedDetailedTitle', - { - values: { ruleId, statusCode, message }, - defaultMessage: 'Rule ID: {ruleId}\n Status Code: {statusCode}\n Message: {message}', - } - ); diff --git a/x-pack/plugins/siem/public/alerts/pages/detection_engine/translations.ts b/x-pack/plugins/siem/public/alerts/pages/detection_engine/translations.ts deleted file mode 100644 index 067399f68d51a..0000000000000 --- a/x-pack/plugins/siem/public/alerts/pages/detection_engine/translations.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const PAGE_TITLE = i18n.translate('xpack.siem.detectionEngine.detectionsPageTitle', { - defaultMessage: 'Alerts', -}); - -export const LAST_ALERT = i18n.translate('xpack.siem.detectionEngine.lastAlertTitle', { - defaultMessage: 'Last alert', -}); - -export const TOTAL_ALERT = i18n.translate('xpack.siem.detectionEngine.totalAlertTitle', { - defaultMessage: 'Total', -}); - -export const ALERT = i18n.translate('xpack.siem.detectionEngine.alertTitle', { - defaultMessage: 'Detected alerts', -}); - -export const BUTTON_MANAGE_RULES = i18n.translate('xpack.siem.detectionEngine.buttonManageRules', { - defaultMessage: 'Manage detection rules', -}); - -export const PANEL_SUBTITLE_SHOWING = i18n.translate( - 'xpack.siem.detectionEngine.panelSubtitleShowing', - { - defaultMessage: 'Showing', - } -); - -export const EMPTY_TITLE = i18n.translate('xpack.siem.detectionEngine.emptyTitle', { - defaultMessage: - 'It looks like you don’t have any indices relevant to the detection engine in the SIEM application', -}); - -export const EMPTY_ACTION_PRIMARY = i18n.translate( - 'xpack.siem.detectionEngine.emptyActionPrimary', - { - defaultMessage: 'View setup instructions', - } -); - -export const EMPTY_ACTION_SECONDARY = i18n.translate( - 'xpack.siem.detectionEngine.emptyActionSecondary', - { - defaultMessage: 'Go to documentation', - } -); - -export const NO_INDEX_TITLE = i18n.translate('xpack.siem.detectionEngine.noIndexTitle', { - defaultMessage: 'Let’s set up your detection engine', -}); - -export const NO_INDEX_MSG_BODY = i18n.translate('xpack.siem.detectionEngine.noIndexMsgBody', { - defaultMessage: - 'To use the detection engine, a user with the required cluster and index privileges must first access this page. For more help, contact your administrator.', -}); - -export const GO_TO_DOCUMENTATION = i18n.translate( - 'xpack.siem.detectionEngine.goToDocumentationButton', - { - defaultMessage: 'View documentation', - } -); - -export const USER_UNAUTHENTICATED_TITLE = i18n.translate( - 'xpack.siem.detectionEngine.userUnauthenticatedTitle', - { - defaultMessage: 'Detection engine permissions required', - } -); - -export const USER_UNAUTHENTICATED_MSG_BODY = i18n.translate( - 'xpack.siem.detectionEngine.userUnauthenticatedMsgBody', - { - defaultMessage: - 'You do not have the required permissions for viewing the detection engine. For more help, contact your administrator.', - } -); - -export const ML_RULES_DISABLED_MESSAGE = i18n.translate( - 'xpack.siem.detectionEngine.mlRulesDisabledMessageTitle', - { - defaultMessage: 'ML rules require Platinum License and ML Admin Permissions', - } -); - -export const ML_RULES_UNAVAILABLE = (totalRules: number) => - i18n.translate('xpack.siem.detectionEngine.mlUnavailableTitle', { - values: { totalRules }, - defaultMessage: - '{totalRules} {totalRules, plural, =1 {rule requires} other {rules require}} Machine Learning to enable.', - }); diff --git a/x-pack/plugins/siem/public/app/home/translations.ts b/x-pack/plugins/siem/public/app/home/translations.ts deleted file mode 100644 index 0cce45b4cef27..0000000000000 --- a/x-pack/plugins/siem/public/app/home/translations.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const OVERVIEW = i18n.translate('xpack.siem.navigation.overview', { - defaultMessage: 'Overview', -}); - -export const HOSTS = i18n.translate('xpack.siem.navigation.hosts', { - defaultMessage: 'Hosts', -}); - -export const NETWORK = i18n.translate('xpack.siem.navigation.network', { - defaultMessage: 'Network', -}); - -export const DETECTION_ENGINE = i18n.translate('xpack.siem.navigation.detectionEngine', { - defaultMessage: 'Detections', -}); - -export const TIMELINES = i18n.translate('xpack.siem.navigation.timelines', { - defaultMessage: 'Timelines', -}); - -export const CASE = i18n.translate('xpack.siem.navigation.case', { - defaultMessage: 'Cases', -}); - -export const MANAGEMENT = i18n.translate('xpack.siem.navigation.management', { - defaultMessage: 'Management', -}); diff --git a/x-pack/plugins/siem/public/cases/components/all_cases/translations.ts b/x-pack/plugins/siem/public/cases/components/all_cases/translations.ts deleted file mode 100644 index d6e044abb8e89..0000000000000 --- a/x-pack/plugins/siem/public/cases/components/all_cases/translations.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export * from '../../translations'; - -export const NO_CASES = i18n.translate('xpack.siem.case.caseTable.noCases.title', { - defaultMessage: 'No Cases', -}); -export const NO_CASES_BODY = i18n.translate('xpack.siem.case.caseTable.noCases.body', { - defaultMessage: - 'There are no cases to display. Please create a new case or change your filter settings above.', -}); - -export const ADD_NEW_CASE = i18n.translate('xpack.siem.case.caseTable.addNewCase', { - defaultMessage: 'Add New Case', -}); - -export const SHOWING_SELECTED_CASES = (totalRules: number) => - i18n.translate('xpack.siem.case.caseTable.selectedCasesTitle', { - values: { totalRules }, - defaultMessage: 'Selected {totalRules} {totalRules, plural, =1 {case} other {cases}}', - }); - -export const SHOWING_CASES = (totalRules: number) => - i18n.translate('xpack.siem.case.caseTable.showingCasesTitle', { - values: { totalRules }, - defaultMessage: 'Showing {totalRules} {totalRules, plural, =1 {case} other {cases}}', - }); - -export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.case.caseTable.unit', { - values: { totalCount }, - defaultMessage: `{totalCount, plural, =1 {case} other {cases}}`, - }); - -export const SEARCH_CASES = i18n.translate('xpack.siem.case.caseTable.searchAriaLabel', { - defaultMessage: 'Search cases', -}); - -export const BULK_ACTIONS = i18n.translate('xpack.siem.case.caseTable.bulkActions', { - defaultMessage: 'Bulk actions', -}); - -export const EXTERNAL_INCIDENT = i18n.translate('xpack.siem.case.caseTable.snIncident', { - defaultMessage: 'External Incident', -}); - -export const INCIDENT_MANAGEMENT_SYSTEM = i18n.translate( - 'xpack.siem.case.caseTable.incidentSystem', - { - defaultMessage: 'Incident Management System', - } -); - -export const SEARCH_PLACEHOLDER = i18n.translate('xpack.siem.case.caseTable.searchPlaceholder', { - defaultMessage: 'e.g. case name', -}); -export const OPEN_CASES = i18n.translate('xpack.siem.case.caseTable.openCases', { - defaultMessage: 'Open cases', -}); -export const CLOSED_CASES = i18n.translate('xpack.siem.case.caseTable.closedCases', { - defaultMessage: 'Closed cases', -}); - -export const CLOSED = i18n.translate('xpack.siem.case.caseTable.closed', { - defaultMessage: 'Closed', -}); - -export const DELETE = i18n.translate('xpack.siem.case.caseTable.delete', { - defaultMessage: 'Delete', -}); - -export const REQUIRES_UPDATE = i18n.translate('xpack.siem.case.caseTable.requiresUpdate', { - defaultMessage: ' requires update', -}); - -export const UP_TO_DATE = i18n.translate('xpack.siem.case.caseTable.upToDate', { - defaultMessage: ' is up to date', -}); -export const NOT_PUSHED = i18n.translate('xpack.siem.case.caseTable.notPushed', { - defaultMessage: 'Not pushed', -}); - -export const REFRESH = i18n.translate('xpack.siem.case.caseTable.refreshTitle', { - defaultMessage: 'Refresh', -}); - -export const SERVICENOW_LINK_ARIA = i18n.translate('xpack.siem.case.caseTable.serviceNowLinkAria', { - defaultMessage: 'click to view the incident on servicenow', -}); diff --git a/x-pack/plugins/siem/public/cases/components/case_header_page/translations.ts b/x-pack/plugins/siem/public/cases/components/case_header_page/translations.ts deleted file mode 100644 index 9fcad926c03b8..0000000000000 --- a/x-pack/plugins/siem/public/cases/components/case_header_page/translations.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const PAGE_BADGE_LABEL = i18n.translate('xpack.siem.case.caseView.pageBadgeLabel', { - defaultMessage: 'Beta', -}); - -export const PAGE_BADGE_TOOLTIP = i18n.translate('xpack.siem.case.caseView.pageBadgeTooltip', { - defaultMessage: - 'Case Workflow is still in beta. Please help us improve by reporting issues or bugs in the Kibana repo.', -}); diff --git a/x-pack/plugins/siem/public/cases/components/case_view/translations.ts b/x-pack/plugins/siem/public/cases/components/case_view/translations.ts deleted file mode 100644 index 907527a5d8208..0000000000000 --- a/x-pack/plugins/siem/public/cases/components/case_view/translations.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export * from '../../translations'; - -export const SHOWING_CASES = (actionDate: string, actionName: string, userName: string) => - i18n.translate('xpack.siem.case.caseView.actionHeadline', { - values: { - actionDate, - actionName, - userName, - }, - defaultMessage: '{userName} {actionName} on {actionDate}', - }); - -export const ADDED_FIELD = i18n.translate('xpack.siem.case.caseView.actionLabel.addedField', { - defaultMessage: 'added', -}); - -export const CHANGED_FIELD = i18n.translate('xpack.siem.case.caseView.actionLabel.changededField', { - defaultMessage: 'changed', -}); - -export const SELECTED_THIRD_PARTY = (thirdParty: string) => - i18n.translate('xpack.siem.case.caseView.actionLabel.selectedThirdParty', { - values: { - thirdParty, - }, - defaultMessage: 'selected { thirdParty } as incident management system', - }); - -export const REMOVED_THIRD_PARTY = i18n.translate( - 'xpack.siem.case.caseView.actionLabel.removedThirdParty', - { - defaultMessage: 'removed external incident management system', - } -); - -export const EDITED_FIELD = i18n.translate('xpack.siem.case.caseView.actionLabel.editedField', { - defaultMessage: 'edited', -}); - -export const REMOVED_FIELD = i18n.translate('xpack.siem.case.caseView.actionLabel.removedField', { - defaultMessage: 'removed', -}); - -export const VIEW_INCIDENT = (incidentNumber: string) => - i18n.translate('xpack.siem.case.caseView.actionLabel.viewIncident', { - defaultMessage: 'View {incidentNumber}', - values: { - incidentNumber, - }, - }); - -export const PUSHED_NEW_INCIDENT = i18n.translate( - 'xpack.siem.case.caseView.actionLabel.pushedNewIncident', - { - defaultMessage: 'pushed as new incident', - } -); - -export const UPDATE_INCIDENT = i18n.translate( - 'xpack.siem.case.caseView.actionLabel.updateIncident', - { - defaultMessage: 'updated incident', - } -); - -export const ADDED_DESCRIPTION = i18n.translate( - 'xpack.siem.case.caseView.actionLabel.addDescription', - { - defaultMessage: 'added description', - } -); - -export const EDIT_DESCRIPTION = i18n.translate('xpack.siem.case.caseView.edit.description', { - defaultMessage: 'Edit description', -}); - -export const QUOTE = i18n.translate('xpack.siem.case.caseView.edit.quote', { - defaultMessage: 'Quote', -}); - -export const EDIT_COMMENT = i18n.translate('xpack.siem.case.caseView.edit.comment', { - defaultMessage: 'Edit comment', -}); - -export const ON = i18n.translate('xpack.siem.case.caseView.actionLabel.on', { - defaultMessage: 'on', -}); - -export const ADDED_COMMENT = i18n.translate('xpack.siem.case.caseView.actionLabel.addComment', { - defaultMessage: 'added comment', -}); - -export const STATUS = i18n.translate('xpack.siem.case.caseView.statusLabel', { - defaultMessage: 'Status', -}); - -export const CASE = i18n.translate('xpack.siem.case.caseView.case', { - defaultMessage: 'case', -}); - -export const COMMENT = i18n.translate('xpack.siem.case.caseView.comment', { - defaultMessage: 'comment', -}); - -export const CASE_OPENED = i18n.translate('xpack.siem.case.caseView.caseOpened', { - defaultMessage: 'Case opened', -}); - -export const CASE_CLOSED = i18n.translate('xpack.siem.case.caseView.caseClosed', { - defaultMessage: 'Case closed', -}); - -export const CASE_REFRESH = i18n.translate('xpack.siem.case.caseView.caseRefresh', { - defaultMessage: 'Refresh case', -}); - -export const EMAIL_SUBJECT = (caseTitle: string) => - i18n.translate('xpack.siem.case.caseView.emailSubject', { - values: { caseTitle }, - defaultMessage: 'SIEM Case - {caseTitle}', - }); - -export const EMAIL_BODY = (caseUrl: string) => - i18n.translate('xpack.siem.case.caseView.emailBody', { - values: { caseUrl }, - defaultMessage: 'Case reference: {caseUrl}', - }); -export const UNKNOWN = i18n.translate('xpack.siem.case.caseView.unknown', { - defaultMessage: 'Unknown', -}); diff --git a/x-pack/plugins/siem/public/cases/components/configure_cases/translations.ts b/x-pack/plugins/siem/public/cases/components/configure_cases/translations.ts deleted file mode 100644 index 1e5a47d3f50fa..0000000000000 --- a/x-pack/plugins/siem/public/cases/components/configure_cases/translations.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const INCIDENT_MANAGEMENT_SYSTEM_TITLE = i18n.translate( - 'xpack.siem.case.configureCases.incidentManagementSystemTitle', - { - defaultMessage: 'Connect to external incident management system', - } -); - -export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate( - 'xpack.siem.case.configureCases.incidentManagementSystemDesc', - { - defaultMessage: - 'You may optionally connect SIEM cases to an external incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.', - } -); - -export const INCIDENT_MANAGEMENT_SYSTEM_LABEL = i18n.translate( - 'xpack.siem.case.configureCases.incidentManagementSystemLabel', - { - defaultMessage: 'Incident management system', - } -); - -export const NO_CONNECTOR = i18n.translate('xpack.siem.case.configureCases.noConnector', { - defaultMessage: 'No connector selected', -}); - -export const ADD_NEW_CONNECTOR = i18n.translate('xpack.siem.case.configureCases.addNewConnector', { - defaultMessage: 'Add new connector', -}); - -export const CASE_CLOSURE_OPTIONS_TITLE = i18n.translate( - 'xpack.siem.case.configureCases.caseClosureOptionsTitle', - { - defaultMessage: 'Case Closures', - } -); - -export const CASE_CLOSURE_OPTIONS_DESC = i18n.translate( - 'xpack.siem.case.configureCases.caseClosureOptionsDesc', - { - defaultMessage: - 'Define how you wish SIEM cases to be closed. Automated case closures require an established connection to an external incident management system.', - } -); - -export const CASE_CLOSURE_OPTIONS_LABEL = i18n.translate( - 'xpack.siem.case.configureCases.caseClosureOptionsLabel', - { - defaultMessage: 'Case closure options', - } -); - -export const CASE_CLOSURE_OPTIONS_MANUAL = i18n.translate( - 'xpack.siem.case.configureCases.caseClosureOptionsManual', - { - defaultMessage: 'Manually close SIEM cases', - } -); - -export const CASE_CLOSURE_OPTIONS_NEW_INCIDENT = i18n.translate( - 'xpack.siem.case.configureCases.caseClosureOptionsNewIncident', - { - defaultMessage: 'Automatically close SIEM cases when pushing new incident to external system', - } -); - -export const CASE_CLOSURE_OPTIONS_CLOSED_INCIDENT = i18n.translate( - 'xpack.siem.case.configureCases.caseClosureOptionsClosedIncident', - { - defaultMessage: 'Automatically close SIEM cases when incident is closed in external system', - } -); - -export const FIELD_MAPPING_TITLE = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingTitle', - { - defaultMessage: 'Field mappings', - } -); - -export const FIELD_MAPPING_DESC = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingDesc', - { - defaultMessage: - 'Map SIEM case fields when pushing data to a third-party. Field mappings require an established connection to an external incident management system.', - } -); - -export const FIELD_MAPPING_FIRST_COL = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingFirstCol', - { - defaultMessage: 'SIEM case field', - } -); - -export const FIELD_MAPPING_SECOND_COL = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingSecondCol', - { - defaultMessage: 'External incident field', - } -); - -export const FIELD_MAPPING_THIRD_COL = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingThirdCol', - { - defaultMessage: 'On edit and update', - } -); - -export const FIELD_MAPPING_EDIT_NOTHING = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingEditNothing', - { - defaultMessage: 'Nothing', - } -); - -export const FIELD_MAPPING_EDIT_OVERWRITE = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingEditOverwrite', - { - defaultMessage: 'Overwrite', - } -); - -export const FIELD_MAPPING_EDIT_APPEND = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingEditAppend', - { - defaultMessage: 'Append', - } -); - -export const CANCEL = i18n.translate('xpack.siem.case.configureCases.cancelButton', { - defaultMessage: 'Cancel', -}); - -export const WARNING_NO_CONNECTOR_TITLE = i18n.translate( - 'xpack.siem.case.configureCases.warningTitle', - { - defaultMessage: 'Warning', - } -); - -export const WARNING_NO_CONNECTOR_MESSAGE = i18n.translate( - 'xpack.siem.case.configureCases.warningMessage', - { - defaultMessage: - 'The selected connector has been deleted. Either select a different connector or create a new one.', - } -); - -export const MAPPING_FIELD_NOT_MAPPED = i18n.translate( - 'xpack.siem.case.configureCases.mappingFieldNotMapped', - { - defaultMessage: 'Not mapped', - } -); - -export const UPDATE_CONNECTOR = i18n.translate('xpack.siem.case.configureCases.updateConnector', { - defaultMessage: 'Update connector', -}); - -export const UPDATE_SELECTED_CONNECTOR = (connectorName: string): string => { - return i18n.translate('xpack.siem.case.configureCases.updateSelectedConnector', { - values: { connectorName }, - defaultMessage: 'Update { connectorName }', - }); -}; diff --git a/x-pack/plugins/siem/public/cases/pages/translations.ts b/x-pack/plugins/siem/public/cases/pages/translations.ts deleted file mode 100644 index 782ba9d9f32db..0000000000000 --- a/x-pack/plugins/siem/public/cases/pages/translations.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const SAVED_OBJECT_NO_PERMISSIONS_TITLE = i18n.translate( - 'xpack.siem.case.caseSavedObjectNoPermissionsTitle', - { - defaultMessage: 'Kibana feature privileges required', - } -); - -export const SAVED_OBJECT_NO_PERMISSIONS_MSG = i18n.translate( - 'xpack.siem.case.caseSavedObjectNoPermissionsMessage', - { - defaultMessage: - 'To view cases, you must have privileges for the Saved Object Management feature in the Kibana space. For more information, contact your Kibana administrator.', - } -); - -export const BACK_TO_ALL = i18n.translate('xpack.siem.case.caseView.backLabel', { - defaultMessage: 'Back to cases', -}); - -export const CANCEL = i18n.translate('xpack.siem.case.caseView.cancel', { - defaultMessage: 'Cancel', -}); - -export const DELETE_CASE = i18n.translate('xpack.siem.case.confirmDeleteCase.deleteCase', { - defaultMessage: 'Delete case', -}); - -export const DELETE_CASES = i18n.translate('xpack.siem.case.confirmDeleteCase.deleteCases', { - defaultMessage: 'Delete cases', -}); - -export const NAME = i18n.translate('xpack.siem.case.caseView.name', { - defaultMessage: 'Name', -}); - -export const OPENED_ON = i18n.translate('xpack.siem.case.caseView.openedOn', { - defaultMessage: 'Opened on', -}); - -export const CLOSED_ON = i18n.translate('xpack.siem.case.caseView.closedOn', { - defaultMessage: 'Closed on', -}); - -export const REPORTER = i18n.translate('xpack.siem.case.caseView.reporterLabel', { - defaultMessage: 'Reporter', -}); - -export const PARTICIPANTS = i18n.translate('xpack.siem.case.caseView.particpantsLabel', { - defaultMessage: 'Participants', -}); - -export const CREATE_BC_TITLE = i18n.translate('xpack.siem.case.caseView.breadcrumb', { - defaultMessage: 'Create', -}); - -export const CREATE_TITLE = i18n.translate('xpack.siem.case.caseView.create', { - defaultMessage: 'Create new case', -}); - -export const DESCRIPTION = i18n.translate('xpack.siem.case.caseView.description', { - defaultMessage: 'Description', -}); - -export const DESCRIPTION_REQUIRED = i18n.translate( - 'xpack.siem.case.createCase.descriptionFieldRequiredError', - { - defaultMessage: 'A description is required.', - } -); - -export const COMMENT_REQUIRED = i18n.translate( - 'xpack.siem.case.caseView.commentFieldRequiredError', - { - defaultMessage: 'A comment is required.', - } -); - -export const REQUIRED_FIELD = i18n.translate('xpack.siem.case.caseView.fieldRequiredError', { - defaultMessage: 'Required field', -}); - -export const EDIT = i18n.translate('xpack.siem.case.caseView.edit', { - defaultMessage: 'Edit', -}); - -export const OPTIONAL = i18n.translate('xpack.siem.case.caseView.optional', { - defaultMessage: 'Optional', -}); - -export const PAGE_TITLE = i18n.translate('xpack.siem.case.pageTitle', { - defaultMessage: 'Cases', -}); - -export const CREATE_CASE = i18n.translate('xpack.siem.case.caseView.createCase', { - defaultMessage: 'Create case', -}); - -export const CLOSED_CASE = i18n.translate('xpack.siem.case.caseView.closedCase', { - defaultMessage: 'Closed case', -}); - -export const CLOSE_CASE = i18n.translate('xpack.siem.case.caseView.closeCase', { - defaultMessage: 'Close case', -}); - -export const REOPEN_CASE = i18n.translate('xpack.siem.case.caseView.reopenCase', { - defaultMessage: 'Reopen case', -}); - -export const REOPENED_CASE = i18n.translate('xpack.siem.case.caseView.reopenedCase', { - defaultMessage: 'Reopened case', -}); - -export const CASE_NAME = i18n.translate('xpack.siem.case.caseView.caseName', { - defaultMessage: 'Case name', -}); - -export const TO = i18n.translate('xpack.siem.case.caseView.to', { - defaultMessage: 'to', -}); - -export const TAGS = i18n.translate('xpack.siem.case.caseView.tags', { - defaultMessage: 'Tags', -}); - -export const ACTIONS = i18n.translate('xpack.siem.case.allCases.actions', { - defaultMessage: 'Actions', -}); - -export const NO_TAGS_AVAILABLE = i18n.translate('xpack.siem.case.allCases.noTagsAvailable', { - defaultMessage: 'No tags available', -}); - -export const NO_REPORTERS_AVAILABLE = i18n.translate( - 'xpack.siem.case.caseView.noReportersAvailable', - { - defaultMessage: 'No reporters available.', - } -); - -export const COMMENTS = i18n.translate('xpack.siem.case.allCases.comments', { - defaultMessage: 'Comments', -}); - -export const TAGS_HELP = i18n.translate('xpack.siem.case.createCase.fieldTagsHelpText', { - defaultMessage: - 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', -}); - -export const NO_TAGS = i18n.translate('xpack.siem.case.caseView.noTags', { - defaultMessage: 'No tags are currently assigned to this case.', -}); - -export const TITLE_REQUIRED = i18n.translate('xpack.siem.case.createCase.titleFieldRequiredError', { - defaultMessage: 'A title is required.', -}); - -export const CONFIGURE_CASES_PAGE_TITLE = i18n.translate( - 'xpack.siem.case.configureCases.headerTitle', - { - defaultMessage: 'Configure cases', - } -); - -export const CONFIGURE_CASES_BUTTON = i18n.translate('xpack.siem.case.configureCasesButton', { - defaultMessage: 'Edit external connection', -}); - -export const ADD_COMMENT = i18n.translate('xpack.siem.case.caseView.comment.addComment', { - defaultMessage: 'Add comment', -}); - -export const ADD_COMMENT_HELP_TEXT = i18n.translate( - 'xpack.siem.case.caseView.comment.addCommentHelpText', - { - defaultMessage: 'Add a new comment...', - } -); - -export const SAVE = i18n.translate('xpack.siem.case.caseView.description.save', { - defaultMessage: 'Save', -}); - -export const GO_TO_DOCUMENTATION = i18n.translate( - 'xpack.siem.case.caseView.goToDocumentationButton', - { - defaultMessage: 'View documentation', - } -); - -export const CONNECTORS = i18n.translate('xpack.siem.case.caseView.connectors', { - defaultMessage: 'External incident management system', -}); - -export const EDIT_CONNECTOR = i18n.translate('xpack.siem.case.caseView.editConnector', { - defaultMessage: 'Change external incident management system', -}); diff --git a/x-pack/plugins/siem/public/cases/translations.ts b/x-pack/plugins/siem/public/cases/translations.ts deleted file mode 100644 index 782ba9d9f32db..0000000000000 --- a/x-pack/plugins/siem/public/cases/translations.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const SAVED_OBJECT_NO_PERMISSIONS_TITLE = i18n.translate( - 'xpack.siem.case.caseSavedObjectNoPermissionsTitle', - { - defaultMessage: 'Kibana feature privileges required', - } -); - -export const SAVED_OBJECT_NO_PERMISSIONS_MSG = i18n.translate( - 'xpack.siem.case.caseSavedObjectNoPermissionsMessage', - { - defaultMessage: - 'To view cases, you must have privileges for the Saved Object Management feature in the Kibana space. For more information, contact your Kibana administrator.', - } -); - -export const BACK_TO_ALL = i18n.translate('xpack.siem.case.caseView.backLabel', { - defaultMessage: 'Back to cases', -}); - -export const CANCEL = i18n.translate('xpack.siem.case.caseView.cancel', { - defaultMessage: 'Cancel', -}); - -export const DELETE_CASE = i18n.translate('xpack.siem.case.confirmDeleteCase.deleteCase', { - defaultMessage: 'Delete case', -}); - -export const DELETE_CASES = i18n.translate('xpack.siem.case.confirmDeleteCase.deleteCases', { - defaultMessage: 'Delete cases', -}); - -export const NAME = i18n.translate('xpack.siem.case.caseView.name', { - defaultMessage: 'Name', -}); - -export const OPENED_ON = i18n.translate('xpack.siem.case.caseView.openedOn', { - defaultMessage: 'Opened on', -}); - -export const CLOSED_ON = i18n.translate('xpack.siem.case.caseView.closedOn', { - defaultMessage: 'Closed on', -}); - -export const REPORTER = i18n.translate('xpack.siem.case.caseView.reporterLabel', { - defaultMessage: 'Reporter', -}); - -export const PARTICIPANTS = i18n.translate('xpack.siem.case.caseView.particpantsLabel', { - defaultMessage: 'Participants', -}); - -export const CREATE_BC_TITLE = i18n.translate('xpack.siem.case.caseView.breadcrumb', { - defaultMessage: 'Create', -}); - -export const CREATE_TITLE = i18n.translate('xpack.siem.case.caseView.create', { - defaultMessage: 'Create new case', -}); - -export const DESCRIPTION = i18n.translate('xpack.siem.case.caseView.description', { - defaultMessage: 'Description', -}); - -export const DESCRIPTION_REQUIRED = i18n.translate( - 'xpack.siem.case.createCase.descriptionFieldRequiredError', - { - defaultMessage: 'A description is required.', - } -); - -export const COMMENT_REQUIRED = i18n.translate( - 'xpack.siem.case.caseView.commentFieldRequiredError', - { - defaultMessage: 'A comment is required.', - } -); - -export const REQUIRED_FIELD = i18n.translate('xpack.siem.case.caseView.fieldRequiredError', { - defaultMessage: 'Required field', -}); - -export const EDIT = i18n.translate('xpack.siem.case.caseView.edit', { - defaultMessage: 'Edit', -}); - -export const OPTIONAL = i18n.translate('xpack.siem.case.caseView.optional', { - defaultMessage: 'Optional', -}); - -export const PAGE_TITLE = i18n.translate('xpack.siem.case.pageTitle', { - defaultMessage: 'Cases', -}); - -export const CREATE_CASE = i18n.translate('xpack.siem.case.caseView.createCase', { - defaultMessage: 'Create case', -}); - -export const CLOSED_CASE = i18n.translate('xpack.siem.case.caseView.closedCase', { - defaultMessage: 'Closed case', -}); - -export const CLOSE_CASE = i18n.translate('xpack.siem.case.caseView.closeCase', { - defaultMessage: 'Close case', -}); - -export const REOPEN_CASE = i18n.translate('xpack.siem.case.caseView.reopenCase', { - defaultMessage: 'Reopen case', -}); - -export const REOPENED_CASE = i18n.translate('xpack.siem.case.caseView.reopenedCase', { - defaultMessage: 'Reopened case', -}); - -export const CASE_NAME = i18n.translate('xpack.siem.case.caseView.caseName', { - defaultMessage: 'Case name', -}); - -export const TO = i18n.translate('xpack.siem.case.caseView.to', { - defaultMessage: 'to', -}); - -export const TAGS = i18n.translate('xpack.siem.case.caseView.tags', { - defaultMessage: 'Tags', -}); - -export const ACTIONS = i18n.translate('xpack.siem.case.allCases.actions', { - defaultMessage: 'Actions', -}); - -export const NO_TAGS_AVAILABLE = i18n.translate('xpack.siem.case.allCases.noTagsAvailable', { - defaultMessage: 'No tags available', -}); - -export const NO_REPORTERS_AVAILABLE = i18n.translate( - 'xpack.siem.case.caseView.noReportersAvailable', - { - defaultMessage: 'No reporters available.', - } -); - -export const COMMENTS = i18n.translate('xpack.siem.case.allCases.comments', { - defaultMessage: 'Comments', -}); - -export const TAGS_HELP = i18n.translate('xpack.siem.case.createCase.fieldTagsHelpText', { - defaultMessage: - 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', -}); - -export const NO_TAGS = i18n.translate('xpack.siem.case.caseView.noTags', { - defaultMessage: 'No tags are currently assigned to this case.', -}); - -export const TITLE_REQUIRED = i18n.translate('xpack.siem.case.createCase.titleFieldRequiredError', { - defaultMessage: 'A title is required.', -}); - -export const CONFIGURE_CASES_PAGE_TITLE = i18n.translate( - 'xpack.siem.case.configureCases.headerTitle', - { - defaultMessage: 'Configure cases', - } -); - -export const CONFIGURE_CASES_BUTTON = i18n.translate('xpack.siem.case.configureCasesButton', { - defaultMessage: 'Edit external connection', -}); - -export const ADD_COMMENT = i18n.translate('xpack.siem.case.caseView.comment.addComment', { - defaultMessage: 'Add comment', -}); - -export const ADD_COMMENT_HELP_TEXT = i18n.translate( - 'xpack.siem.case.caseView.comment.addCommentHelpText', - { - defaultMessage: 'Add a new comment...', - } -); - -export const SAVE = i18n.translate('xpack.siem.case.caseView.description.save', { - defaultMessage: 'Save', -}); - -export const GO_TO_DOCUMENTATION = i18n.translate( - 'xpack.siem.case.caseView.goToDocumentationButton', - { - defaultMessage: 'View documentation', - } -); - -export const CONNECTORS = i18n.translate('xpack.siem.case.caseView.connectors', { - defaultMessage: 'External incident management system', -}); - -export const EDIT_CONNECTOR = i18n.translate('xpack.siem.case.caseView.editConnector', { - defaultMessage: 'Change external incident management system', -}); diff --git a/x-pack/plugins/siem/public/common/components/alerts_viewer/translations.ts b/x-pack/plugins/siem/public/common/components/alerts_viewer/translations.ts deleted file mode 100644 index 79466251fc57b..0000000000000 --- a/x-pack/plugins/siem/public/common/components/alerts_viewer/translations.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ALERTS_DOCUMENT_TYPE = i18n.translate('xpack.siem.alertsView.alertsDocumentType', { - defaultMessage: 'External alerts', -}); - -export const TOTAL_COUNT_OF_ALERTS = i18n.translate('xpack.siem.alertsView.totalCountOfAlerts', { - defaultMessage: 'external alerts match the search criteria', -}); - -export const ALERTS_TABLE_TITLE = i18n.translate('xpack.siem.alertsView.alertsTableTitle', { - defaultMessage: 'External alerts', -}); - -export const ALERTS_GRAPH_TITLE = i18n.translate('xpack.siem.alertsView.alertsGraphTitle', { - defaultMessage: 'External alert count', -}); - -export const ALERTS_STACK_BY_MODULE = i18n.translate( - 'xpack.siem.alertsView.alertsStackByOptions.module', - { - defaultMessage: 'module', - } -); - -export const SHOWING = i18n.translate('xpack.siem.alertsView.showing', { - defaultMessage: 'Showing', -}); - -export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.alertsView.unit', { - values: { totalCount }, - defaultMessage: `external {totalCount, plural, =1 {alert} other {alerts}}`, - }); - -export const ERROR_FETCHING_ALERTS_DATA = i18n.translate( - 'xpack.siem.alertsView.errorFetchingAlertsData', - { - defaultMessage: 'Failed to query alerts data', - } -); - -export const CATEGORY = i18n.translate('xpack.siem.alertsView.categoryLabel', { - defaultMessage: 'category', -}); - -export const MODULE = i18n.translate('xpack.siem.alertsView.moduleLabel', { - defaultMessage: 'module', -}); diff --git a/x-pack/plugins/siem/public/common/components/charts/translation.ts b/x-pack/plugins/siem/public/common/components/charts/translation.ts deleted file mode 100644 index 891f59fc97bd1..0000000000000 --- a/x-pack/plugins/siem/public/common/components/charts/translation.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ALL_VALUES_ZEROS_TITLE = i18n.translate('xpack.siem.chart.dataAllValuesZerosTitle', { - defaultMessage: 'All values returned zero', -}); - -export const DATA_NOT_AVAILABLE_TITLE = i18n.translate('xpack.siem.chart.dataNotAvailableTitle', { - defaultMessage: 'Chart Data Not Available', -}); - -export const ALL_OTHERS = i18n.translate('xpack.siem.chart.allOthersGroupingLabel', { - defaultMessage: 'All others', -}); diff --git a/x-pack/plugins/siem/public/common/components/drag_and_drop/translations.ts b/x-pack/plugins/siem/public/common/components/drag_and_drop/translations.ts deleted file mode 100644 index cbcb34bd9f75e..0000000000000 --- a/x-pack/plugins/siem/public/common/components/drag_and_drop/translations.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ADD_TO_TIMELINE = i18n.translate('xpack.siem.dragAndDrop.addToTimeline', { - defaultMessage: 'Add to timeline investigation', -}); - -export const COPY_TO_CLIPBOARD = i18n.translate('xpack.siem.dragAndDrop.copyToClipboardTooltip', { - defaultMessage: 'Copy to Clipboard', -}); - -export const FIELD = i18n.translate('xpack.siem.dragAndDrop.fieldLabel', { - defaultMessage: 'Field', -}); - -export const FILTER_FOR_VALUE = i18n.translate('xpack.siem.dragAndDrop.filterForValueHoverAction', { - defaultMessage: 'Filter for value', -}); - -export const FILTER_OUT_VALUE = i18n.translate('xpack.siem.dragAndDrop.filterOutValueHoverAction', { - defaultMessage: 'Filter out value', -}); - -export const CLOSE = i18n.translate('xpack.siem.dragAndDrop.closeButtonLabel', { - defaultMessage: 'Close', -}); - -export const SHOW_TOP = (fieldName: string) => - i18n.translate('xpack.siem.overview.showTopTooltip', { - values: { fieldName }, - defaultMessage: `Show top {fieldName}`, - }); diff --git a/x-pack/plugins/siem/public/common/components/draggables/field_badge/translations.ts b/x-pack/plugins/siem/public/common/components/draggables/field_badge/translations.ts deleted file mode 100644 index d25459b97cf60..0000000000000 --- a/x-pack/plugins/siem/public/common/components/draggables/field_badge/translations.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const CATEGORY = i18n.translate('xpack.siem.draggables.field.categoryLabel', { - defaultMessage: 'Category', -}); - -export const COPY_TO_CLIPBOARD = i18n.translate('xpack.siem.eventDetails.copyToClipboardTooltip', { - defaultMessage: 'Copy to Clipboard', -}); - -export const FIELD = i18n.translate('xpack.siem.draggables.field.fieldLabel', { - defaultMessage: 'Field', -}); - -export const TYPE = i18n.translate('xpack.siem.draggables.field.typeLabel', { - defaultMessage: 'Type', -}); - -export const VIEW_CATEGORY = i18n.translate('xpack.siem.draggables.field.viewCategoryTooltip', { - defaultMessage: 'View Category', -}); diff --git a/x-pack/plugins/siem/public/common/components/event_details/translations.ts b/x-pack/plugins/siem/public/common/components/event_details/translations.ts deleted file mode 100644 index efaffaa3e5524..0000000000000 --- a/x-pack/plugins/siem/public/common/components/event_details/translations.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const TABLE = i18n.translate('xpack.siem.eventDetails.table', { - defaultMessage: 'Table', -}); - -export const JSON_VIEW = i18n.translate('xpack.siem.eventDetails.jsonView', { - defaultMessage: 'JSON View', -}); - -export const FIELD = i18n.translate('xpack.siem.eventDetails.field', { - defaultMessage: 'Field', -}); - -export const VALUE = i18n.translate('xpack.siem.eventDetails.value', { - defaultMessage: 'Value', -}); - -export const DESCRIPTION = i18n.translate('xpack.siem.eventDetails.description', { - defaultMessage: 'Description', -}); - -export const BLANK = i18n.translate('xpack.siem.eventDetails.blank', { - defaultMessage: ' ', -}); - -export const PLACEHOLDER = i18n.translate('xpack.siem.eventDetails.filter.placeholder', { - defaultMessage: 'Filter by Field, Value, or Description...', -}); - -export const COPY_TO_CLIPBOARD = i18n.translate('xpack.siem.eventDetails.copyToClipboard', { - defaultMessage: 'Copy to Clipboard', -}); - -export const TOGGLE_COLUMN_TOOLTIP = i18n.translate('xpack.siem.eventDetails.toggleColumnTooltip', { - defaultMessage: 'Toggle column', -}); diff --git a/x-pack/plugins/siem/public/common/components/inspect/translations.ts b/x-pack/plugins/siem/public/common/components/inspect/translations.ts deleted file mode 100644 index 43248773787ab..0000000000000 --- a/x-pack/plugins/siem/public/common/components/inspect/translations.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const INSPECT = i18n.translate('xpack.siem.inspectDescription', { - defaultMessage: 'Inspect', -}); - -export const CLOSE = i18n.translate('xpack.siem.inspect.modal.closeTitle', { - defaultMessage: 'Close', -}); - -export const SOMETHING_WENT_WRONG = i18n.translate( - 'xpack.siem.inspect.modal.somethingWentWrongDescription', - { - defaultMessage: 'Sorry about that, something went wrong.', - } -); -export const INDEX_PATTERN = i18n.translate('xpack.siem.inspect.modal.indexPatternLabel', { - defaultMessage: 'Index pattern', -}); - -export const INDEX_PATTERN_DESC = i18n.translate( - 'xpack.siem.inspect.modal.indexPatternDescription', - { - defaultMessage: - 'The index pattern that connected to the Elasticsearch indices. These indices can be configured in Kibana > Advanced Settings.', - } -); - -export const QUERY_TIME = i18n.translate('xpack.siem.inspect.modal.queryTimeLabel', { - defaultMessage: 'Query time', -}); - -export const QUERY_TIME_DESC = i18n.translate('xpack.siem.inspect.modal.queryTimeDescription', { - defaultMessage: - 'The time it took to process the query. Does not include the time to send the request or parse it in the browser.', -}); - -export const REQUEST_TIMESTAMP = i18n.translate('xpack.siem.inspect.modal.reqTimestampLabel', { - defaultMessage: 'Request timestamp', -}); - -export const REQUEST_TIMESTAMP_DESC = i18n.translate( - 'xpack.siem.inspect.modal.reqTimestampDescription', - { - defaultMessage: 'Time when the start of the request has been logged', - } -); diff --git a/x-pack/plugins/siem/public/common/components/markdown/translations.ts b/x-pack/plugins/siem/public/common/components/markdown/translations.ts deleted file mode 100644 index 4524d27739ea8..0000000000000 --- a/x-pack/plugins/siem/public/common/components/markdown/translations.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const MARKDOWN_HINT_HEADING = i18n.translate('xpack.siem.markdown.hint.headingLabel', { - defaultMessage: '# heading', -}); - -export const MARKDOWN_HINT_BOLD = i18n.translate('xpack.siem.markdown.hint.boldLabel', { - defaultMessage: '**bold**', -}); - -export const MARKDOWN_HINT_ITALICS = i18n.translate('xpack.siem.markdown.hint.italicsLabel', { - defaultMessage: '_italics_', -}); - -export const MARKDOWN_HINT_CODE = i18n.translate('xpack.siem.markdown.hint.codeLabel', { - defaultMessage: '`code`', -}); - -export const MARKDOWN_HINT_URL = i18n.translate('xpack.siem.markdown.hint.urlLabel', { - defaultMessage: '[link](url)', -}); - -export const MARKDOWN_HINT_BULLET = i18n.translate('xpack.siem.markdown.hint.bulletLabel', { - defaultMessage: '* bullet', -}); - -export const MARKDOWN_HINT_PREFORMATTED = i18n.translate( - 'xpack.siem.markdown.hint.preformattedLabel', - { - defaultMessage: '```preformatted```', - } -); - -export const MARKDOWN_HINT_QUOTE = i18n.translate('xpack.siem.markdown.hint.quoteLabel', { - defaultMessage: '>quote', -}); - -export const MARKDOWN_HINT_STRIKETHROUGH = i18n.translate( - 'xpack.siem.markdown.hint.strikethroughLabel', - { - defaultMessage: 'strikethrough', - } -); - -export const MARKDOWN_HINT_IMAGE_URL = i18n.translate('xpack.siem.markdown.hint.imageUrlLabel', { - defaultMessage: '![image](url)', -}); - -export const TIMELINE_ID = (timelineId: string) => - i18n.translate('xpack.siem.markdown.toolTip.timelineId', { - defaultMessage: 'Timeline id: { timelineId }', - values: { - timelineId, - }, - }); diff --git a/x-pack/plugins/siem/public/common/components/markdown_editor/translations.ts b/x-pack/plugins/siem/public/common/components/markdown_editor/translations.ts deleted file mode 100644 index 642c524c48be0..0000000000000 --- a/x-pack/plugins/siem/public/common/components/markdown_editor/translations.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const MARKDOWN_SYNTAX_HELP = i18n.translate('xpack.siem.markdownEditor.markdownInputHelp', { - defaultMessage: 'Markdown syntax help', -}); - -export const MARKDOWN = i18n.translate('xpack.siem.markdownEditor.markdown', { - defaultMessage: 'Markdown', -}); -export const PREVIEW = i18n.translate('xpack.siem.markdownEditor.preview', { - defaultMessage: 'Preview', -}); diff --git a/x-pack/plugins/siem/public/common/components/ml/score/translations.ts b/x-pack/plugins/siem/public/common/components/ml/score/translations.ts deleted file mode 100644 index cde596149efc7..0000000000000 --- a/x-pack/plugins/siem/public/common/components/ml/score/translations.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const INFLUENCED_BY = i18n.translate('xpack.siem.ml.score.influencedByTitle', { - defaultMessage: 'Influenced By', -}); - -export const MAX_ANOMALY_SCORE = i18n.translate('xpack.siem.ml.score.maxAnomalyScoreTitle', { - defaultMessage: 'Max Anomaly Score', -}); - -export const ANOMALY_JOB = i18n.translate('xpack.siem.ml.score.anomalyJobTitle', { - defaultMessage: 'Job', -}); - -export const VIEW_IN_MACHINE_LEARNING = i18n.translate( - 'xpack.siem.ml.score.viewInMachineLearningLink', - { - defaultMessage: 'View in Machine Learning', - } -); - -export const DETECTED = i18n.translate('xpack.siem.ml.score.detectedTitle', { - defaultMessage: 'Detected', -}); - -export const NARROW_TO_THIS_DATE_RANGE = i18n.translate( - 'xpack.siem.ml.score.narrowToThisDateRangeLink', - { - defaultMessage: 'Narrow to this date range', - } -); - -export const ANOMALOUS_ENTITY = i18n.translate('xpack.siem.ml.score.anomalousEntityTitle', { - defaultMessage: 'Anomalous Entity', -}); diff --git a/x-pack/plugins/siem/public/common/components/ml/tables/translations.ts b/x-pack/plugins/siem/public/common/components/ml/tables/translations.ts deleted file mode 100644 index ada2dbf34e518..0000000000000 --- a/x-pack/plugins/siem/public/common/components/ml/tables/translations.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const SHOWING = i18n.translate('xpack.siem.anomaliesTable.table.showingDescription', { - defaultMessage: 'Showing', -}); - -export const ANOMALIES = i18n.translate('xpack.siem.anomaliesTable.table.anomaliesDescription', { - defaultMessage: 'Anomalies', -}); - -export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.anomaliesTable.table.unit', { - values: { totalCount }, - defaultMessage: `{totalCount, plural, =1 {anomaly} other {anomalies}}`, - }); - -export const TOOLTIP = i18n.translate('xpack.siem.anomaliesTable.table.anomaliesTooltip', { - defaultMessage: 'The anomalies table is not filterable via the SIEM global KQL search.', -}); - -export const SCORE = i18n.translate('xpack.siem.ml.table.scoreTitle', { - defaultMessage: 'Anomaly score', -}); - -export const HOST_NAME = i18n.translate('xpack.siem.ml.table.hostNameTitle', { - defaultMessage: 'Host name', -}); - -export const INFLUENCED_BY = i18n.translate('xpack.siem.ml.table.influencedByTitle', { - defaultMessage: 'Influenced by', -}); - -export const ENTITY = i18n.translate('xpack.siem.ml.table.entityTitle', { - defaultMessage: 'Entity', -}); - -export const DETECTOR = i18n.translate('xpack.siem.ml.table.detectorTitle', { - defaultMessage: 'Job', -}); - -export const NETWORK_NAME = i18n.translate('xpack.siem.ml.table.networkNameTitle', { - defaultMessage: 'Network IP', -}); - -export const TIME_STAMP = i18n.translate('xpack.siem.ml.table.timestampTitle', { - defaultMessage: 'Timestamp', -}); diff --git a/x-pack/plugins/siem/public/common/components/ml_popover/translations.ts b/x-pack/plugins/siem/public/common/components/ml_popover/translations.ts deleted file mode 100644 index 613691e55dcfd..0000000000000 --- a/x-pack/plugins/siem/public/common/components/ml_popover/translations.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ML_JOB_SETTINGS = i18n.translate( - 'xpack.siem.components.mlPopup.mlJobSettingsButtonLabel', - { - defaultMessage: 'ML job settings', - } -); - -export const UPGRADE_TITLE = i18n.translate('xpack.siem.components.mlPopup.upgradeTitle', { - defaultMessage: 'Upgrade to Elastic Platinum', -}); - -export const UPGRADE_BUTTON = i18n.translate('xpack.siem.components.mlPopup.upgradeButtonLabel', { - defaultMessage: 'Subscription plans', -}); - -export const LICENSE_BUTTON = i18n.translate('xpack.siem.components.mlPopup.licenseButtonLabel', { - defaultMessage: 'Manage license', -}); - -export const MODULE_NOT_COMPATIBLE_TITLE = (incompatibleJobCount: number) => - i18n.translate('xpack.siem.components.mlPopup.moduleNotCompatibleTitle', { - values: { incompatibleJobCount }, - defaultMessage: - '{incompatibleJobCount} {incompatibleJobCount, plural, =1 {job} other {jobs}} are currently unavailable', - }); - -export const START_JOB_FAILURE = i18n.translate( - 'xpack.siem.components.mlPopup.errors.startJobFailureTitle', - { - defaultMessage: 'Start job failure', - } -); - -export const STOP_JOB_FAILURE = i18n.translate('xpack.siem.containers.errors.stopJobFailureTitle', { - defaultMessage: 'Stop job failure', -}); - -export const CREATE_JOB_FAILURE = i18n.translate( - 'xpack.siem.components.mlPopup.errors.createJobFailureTitle', - { - defaultMessage: 'Create job failure', - } -); diff --git a/x-pack/plugins/siem/public/common/components/paginated_table/translations.ts b/x-pack/plugins/siem/public/common/components/paginated_table/translations.ts deleted file mode 100644 index 2c381a7c43ca2..0000000000000 --- a/x-pack/plugins/siem/public/common/components/paginated_table/translations.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const SHOWING = i18n.translate('xpack.siem.paginatedTable.showingSubtitle', { - defaultMessage: 'Showing', -}); - -export const ROWS = i18n.translate('xpack.siem.paginatedTable.rowsButtonLabel', { - defaultMessage: 'Rows per page', -}); - -export const TOAST_TITLE = i18n.translate('xpack.siem.paginatedTable.tooManyResultsToastTitle', { - defaultMessage: ' - too many results', -}); - -export const TOAST_TEXT = i18n.translate('xpack.siem.paginatedTable.tooManyResultsToastText', { - defaultMessage: 'Narrow your query to better filter the results', -}); diff --git a/x-pack/plugins/siem/public/common/components/toasters/translations.ts b/x-pack/plugins/siem/public/common/components/toasters/translations.ts deleted file mode 100644 index 6ab8add70cdad..0000000000000 --- a/x-pack/plugins/siem/public/common/components/toasters/translations.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const SEE_ALL_ERRORS = i18n.translate('xpack.siem.modalAllErrors.seeAllErrors.button', { - defaultMessage: 'See the full error(s)', -}); - -export const TITLE_ERROR_MODAL = i18n.translate('xpack.siem.modalAllErrors.title', { - defaultMessage: 'Your visualization has error(s)', -}); - -export const CLOSE_ERROR_MODAL = i18n.translate('xpack.siem.modalAllErrors.close.button', { - defaultMessage: 'Close', -}); diff --git a/x-pack/plugins/siem/public/common/lib/clipboard/translations.ts b/x-pack/plugins/siem/public/common/lib/clipboard/translations.ts deleted file mode 100644 index 7e40fe863d14e..0000000000000 --- a/x-pack/plugins/siem/public/common/lib/clipboard/translations.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const COPY = i18n.translate('xpack.siem.clipboard.copy', { - defaultMessage: 'Copy', -}); - -export const COPIED = i18n.translate('xpack.siem.clipboard.copied', { - defaultMessage: 'Copied', -}); - -export const TO_THE_CLIPBOARD = i18n.translate('xpack.siem.clipboard.to.the.clipboard', { - defaultMessage: 'to the clipboard', -}); - -export const COPY_TO_THE_CLIPBOARD = i18n.translate('xpack.siem.clipboard.copy.to.the.clipboard', { - defaultMessage: 'Copy to the clipboard', -}); diff --git a/x-pack/plugins/siem/public/common/lib/connectors/jira/translations.ts b/x-pack/plugins/siem/public/common/lib/connectors/jira/translations.ts deleted file mode 100644 index f95663d402604..0000000000000 --- a/x-pack/plugins/siem/public/common/lib/connectors/jira/translations.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export * from '../translations'; - -export const JIRA_DESC = i18n.translate('xpack.siem.case.connectors.jira.selectMessageText', { - defaultMessage: 'Push or update SIEM case data to a new issue in Jira', -}); - -export const JIRA_TITLE = i18n.translate('xpack.siem.case.connectors.jira.actionTypeTitle', { - defaultMessage: 'Jira', -}); - -export const JIRA_PROJECT_KEY_LABEL = i18n.translate('xpack.siem.case.connectors.jira.projectKey', { - defaultMessage: 'Project key', -}); - -export const JIRA_PROJECT_KEY_REQUIRED = i18n.translate( - 'xpack.siem.case.connectors.jira.requiredProjectKeyTextField', - { - defaultMessage: 'Project key is required', - } -); - -export const MAPPING_FIELD_SUMMARY = i18n.translate( - 'xpack.siem.case.configureCases.mappingFieldSummary', - { - defaultMessage: 'Summary', - } -); diff --git a/x-pack/plugins/siem/public/endpoint_hosts/index.ts b/x-pack/plugins/siem/public/endpoint_hosts/index.ts deleted file mode 100644 index bd1c5f96f8cda..0000000000000 --- a/x-pack/plugins/siem/public/endpoint_hosts/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 { Reducer } from 'redux'; -import { SecuritySubPluginWithStore } from '../app/types'; -import { endpointHostsRoutes } from './routes'; -import { hostListReducer } from './store/reducer'; -import { HostState } from './types'; -import { hostMiddlewareFactory } from './store/middleware'; -import { CoreStart } from '../../../../../src/core/public'; -import { StartPlugins } from '../types'; -import { substateMiddlewareFactory } from '../common/store'; -import { AppAction } from '../common/store/actions'; - -/** - * Internally, our state is sometimes immutable, ignore that in our external - * interface. - */ -export interface EndpointHostsPluginState { - hostList: HostState; -} - -/** - * Internally, we use `ImmutableReducer`, but we present a regular reducer - * externally for compatibility w/ regular redux. - */ -export interface EndpointHostsPluginReducer { - hostList: Reducer; -} - -export class EndpointHosts { - public setup() {} - - public start( - core: CoreStart, - plugins: StartPlugins - ): SecuritySubPluginWithStore<'hostList', HostState> { - const { data, ingestManager } = plugins; - const middleware = [ - substateMiddlewareFactory( - (globalState) => globalState.hostList, - hostMiddlewareFactory(core, { data, ingestManager }) - ), - ]; - return { - routes: endpointHostsRoutes(), - store: { - initialState: { hostList: undefined }, - /** - * Cast the ImmutableReducer to a regular reducer for compatibility with - * the subplugin architecture (which expects plain redux reducers.) - */ - reducer: { hostList: hostListReducer } as EndpointHostsPluginReducer, - middleware, - }, - }; - } -} diff --git a/x-pack/plugins/siem/public/endpoint_hosts/view/details/policy_response_friendly_names.ts b/x-pack/plugins/siem/public/endpoint_hosts/view/details/policy_response_friendly_names.ts deleted file mode 100644 index 2f05840567a57..0000000000000 --- a/x-pack/plugins/siem/public/endpoint_hosts/view/details/policy_response_friendly_names.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -const responseMap = new Map(); -responseMap.set( - 'success', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.success', { - defaultMessage: 'Success', - }) -); -responseMap.set( - 'warning', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.warning', { - defaultMessage: 'Warning', - }) -); -responseMap.set( - 'failure', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.failed', { - defaultMessage: 'Failed', - }) -); -responseMap.set( - 'logging', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.logging', { - defaultMessage: 'Logging', - }) -); -responseMap.set( - 'streaming', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.streaming', { - defaultMessage: 'Streaming', - }) -); -responseMap.set( - 'malware', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.malware', { - defaultMessage: 'Malware', - }) -); -responseMap.set( - 'events', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.events', { - defaultMessage: 'Events', - }) -); -responseMap.set( - 'configure_elasticsearch_connection', - i18n.translate( - 'xpack.siem.endpoint.hostDetails.policyResponse.configureElasticSearchConnection', - { - defaultMessage: 'Configure Elastic Search Connection', - } - ) -); -responseMap.set( - 'configure_logging', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.configureLogging', { - defaultMessage: 'Configure Logging', - }) -); -responseMap.set( - 'configure_kernel', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.configureKernel', { - defaultMessage: 'Configure Kernel', - }) -); -responseMap.set( - 'configure_malware', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.configureMalware', { - defaultMessage: 'Configure Malware', - }) -); -responseMap.set( - 'connect_kernel', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.connectKernel', { - defaultMessage: 'Connect Kernel', - }) -); -responseMap.set( - 'detect_file_open_events', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.detectFileOpenEvents', { - defaultMessage: 'Detect File Open Events', - }) -); -responseMap.set( - 'detect_file_write_events', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.detectFileWriteEvents', { - defaultMessage: 'Detect File Write Events', - }) -); -responseMap.set( - 'detect_image_load_events', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.detectImageLoadEvents', { - defaultMessage: 'Detect Image Load Events', - }) -); -responseMap.set( - 'detect_process_events', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.detectProcessEvents', { - defaultMessage: 'Detect Process Events', - }) -); -responseMap.set( - 'download_global_artifacts', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.downloadGlobalArtifacts', { - defaultMessage: 'Download Global Artifacts', - }) -); -responseMap.set( - 'load_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.loadConfig', { - defaultMessage: 'Load Config', - }) -); -responseMap.set( - 'load_malware_model', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.loadMalwareModel', { - defaultMessage: 'Load Malware Model', - }) -); -responseMap.set( - 'read_elasticsearch_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.readElasticSearchConfig', { - defaultMessage: 'Read ElasticSearch Config', - }) -); -responseMap.set( - 'read_events_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.readEventsConfig', { - defaultMessage: 'Read Events Config', - }) -); -responseMap.set( - 'read_kernel_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.readKernelConfig', { - defaultMessage: 'Read Kernel Config', - }) -); -responseMap.set( - 'read_logging_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.readLoggingConfig', { - defaultMessage: 'Read Logging Config', - }) -); -responseMap.set( - 'read_malware_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.readMalwareConfig', { - defaultMessage: 'Read Malware Config', - }) -); -responseMap.set( - 'workflow', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.workflow', { - defaultMessage: 'Workflow', - }) -); -responseMap.set( - 'download_model', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.downloadModel', { - defaultMessage: 'Download Model', - }) -); -responseMap.set( - 'ingest_events_config', - i18n.translate('xpack.siem.endpoint.hostDetails.policyResponse.injestEventsConfig', { - defaultMessage: 'Injest Events Config', - }) -); - -/** - * Maps a server provided value to corresponding i18n'd string. - */ -export function formatResponse(responseString: string) { - if (responseMap.has(responseString)) { - return responseMap.get(responseString); - } - return responseString; -} diff --git a/x-pack/plugins/siem/public/management/common/routing.ts b/x-pack/plugins/siem/public/management/common/routing.ts deleted file mode 100644 index e64fcf0c5f68a..0000000000000 --- a/x-pack/plugins/siem/public/management/common/routing.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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 { generatePath } from 'react-router-dom'; -import { - MANAGEMENT_ROUTING_ENDPOINTS_PATH, - MANAGEMENT_ROUTING_POLICIES_PATH, - MANAGEMENT_ROUTING_POLICY_DETAILS_PATH, - MANAGEMENT_ROUTING_ROOT_PATH, -} from './constants'; -import { ManagementSubTab } from '../types'; -import { SiemPageName } from '../../app/types'; - -export type GetManagementUrlProps = { - /** - * Exclude the URL prefix (everything to the left of where the router was mounted. - * This may be needed when interacting with react-router (ex. to do `history.push()` or - * validations against matched path) - */ - excludePrefix?: boolean; -} & ( - | { name: 'default' } - | { name: 'endpointList' } - | { name: 'policyList' } - | { name: 'policyDetails'; policyId: string } -); - -// Prefix is (almost) everything to the left of where the Router was mounted. In SIEM, since -// we're using Hash router, thats the `#`. -const URL_PREFIX = '#'; - -/** - * Returns a URL string for a given Management page view - * @param props - */ -export const getManagementUrl = (props: GetManagementUrlProps): string => { - let url = props.excludePrefix ? '' : URL_PREFIX; - - switch (props.name) { - case 'default': - url += generatePath(MANAGEMENT_ROUTING_ROOT_PATH, { - pageName: SiemPageName.management, - }); - break; - case 'endpointList': - url += generatePath(MANAGEMENT_ROUTING_ENDPOINTS_PATH, { - pageName: SiemPageName.management, - tabName: ManagementSubTab.endpoints, - }); - break; - case 'policyList': - url += generatePath(MANAGEMENT_ROUTING_POLICIES_PATH, { - pageName: SiemPageName.management, - tabName: ManagementSubTab.policies, - }); - break; - case 'policyDetails': - url += generatePath(MANAGEMENT_ROUTING_POLICY_DETAILS_PATH, { - pageName: SiemPageName.management, - tabName: ManagementSubTab.policies, - policyId: props.policyId, - }); - break; - } - - return url; -}; diff --git a/x-pack/plugins/siem/public/management/store/middleware.ts b/x-pack/plugins/siem/public/management/store/middleware.ts deleted file mode 100644 index c8eb27e35f9dd..0000000000000 --- a/x-pack/plugins/siem/public/management/store/middleware.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { - substateMiddlewareFactory, - SecuritySubPluginMiddlewareFactory, - State, -} from '../../common/store'; -import { policyListMiddlewareFactory } from '../pages/policy/store/policy_list'; -import { policyDetailsMiddlewareFactory } from '../pages/policy/store/policy_details'; - -export const managementMiddlewareFactory: SecuritySubPluginMiddlewareFactory = ( - coreStart, - depsStart -) => { - const listSelector = (state: State) => state.management.policyList; - const detailSelector = (state: State) => state.management.policyDetails; - - return [ - substateMiddlewareFactory(listSelector, policyListMiddlewareFactory(coreStart, depsStart)), - substateMiddlewareFactory(detailSelector, policyDetailsMiddlewareFactory(coreStart, depsStart)), - ]; -}; diff --git a/x-pack/plugins/siem/public/network/components/ip_overview/translations.ts b/x-pack/plugins/siem/public/network/components/ip_overview/translations.ts deleted file mode 100644 index 0b45bb9ff2b94..0000000000000 --- a/x-pack/plugins/siem/public/network/components/ip_overview/translations.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const LOCATION = i18n.translate('xpack.siem.network.ipDetails.ipOverview.locationTitle', { - defaultMessage: 'Location', -}); - -export const AUTONOMOUS_SYSTEM = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.autonomousSystemTitle', - { - defaultMessage: 'Autonomous system', - } -); - -export const MAX_ANOMALY_SCORE_BY_JOB = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.maxAnomalyScoreByJobTitle', - { - defaultMessage: 'Max anomaly score by job', - } -); - -export const FIRST_SEEN = i18n.translate('xpack.siem.network.ipDetails.ipOverview.firstSeenTitle', { - defaultMessage: 'First seen', -}); - -export const LAST_SEEN = i18n.translate('xpack.siem.network.ipDetails.ipOverview.lastSeenTitle', { - defaultMessage: 'Last seen', -}); - -export const HOST_ID = i18n.translate('xpack.siem.network.ipDetails.ipOverview.hostIdTitle', { - defaultMessage: 'Host ID', -}); - -export const HOST_NAME = i18n.translate('xpack.siem.network.ipDetails.ipOverview.hostNameTitle', { - defaultMessage: 'Host name', -}); - -export const WHOIS = i18n.translate('xpack.siem.network.ipDetails.ipOverview.whoIsTitle', { - defaultMessage: 'WhoIs', -}); - -export const VIEW_WHOIS = i18n.translate('xpack.siem.network.ipDetails.ipOverview.viewWhoisTitle', { - defaultMessage: 'iana.org', -}); - -export const REPUTATION = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.ipReputationTitle', - { - defaultMessage: 'Reputation', - } -); - -export const VIEW_VIRUS_TOTAL = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.viewVirusTotalTitle.', - { - defaultMessage: 'virustotal.com', - } -); - -export const VIEW_TALOS_INTELLIGENCE = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.viewTalosIntelligenceTitle', - { - defaultMessage: 'talosIntelligence.com', - } -); - -export const AS_SOURCE = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.asSourceDropDownOptionLabel', - { - defaultMessage: 'As Source', - } -); -export const AS_DESTINATION = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.asDestinationDropDownOptionLabel', - { - defaultMessage: 'As Destination', - } -); - -export const INSPECT_TITLE = i18n.translate( - 'xpack.siem.network.ipDetails.ipOverview.inspectTitle', - { - defaultMessage: 'IP overview', - } -); diff --git a/x-pack/plugins/siem/public/network/components/kpi_network/translations.ts b/x-pack/plugins/siem/public/network/components/kpi_network/translations.ts deleted file mode 100644 index b14d4a09ea1bb..0000000000000 --- a/x-pack/plugins/siem/public/network/components/kpi_network/translations.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const NETWORK_EVENTS = i18n.translate('xpack.siem.kpiNetwork.networkEvents.title', { - defaultMessage: 'Network events', -}); - -export const UNIQUE_FLOW_IDS = i18n.translate('xpack.siem.kpiNetwork.uniqueFlowIds.title', { - defaultMessage: 'Unique flow IDs', -}); - -export const DNS_QUERIES = i18n.translate('xpack.siem.kpiNetwork.dnsQueries.title', { - defaultMessage: 'DNS queries', -}); - -export const TLS_HANDSHAKES = i18n.translate('xpack.siem.kpiNetwork.tlsHandshakes.title', { - defaultMessage: 'TLS handshakes', -}); - -export const UNIQUE_PRIVATE_IPS = i18n.translate('xpack.siem.kpiNetwork.uniquePrivateIps.title', { - defaultMessage: 'Unique private IPs', -}); - -export const SOURCE_UNIT_LABEL = i18n.translate( - 'xpack.siem.kpiNetwork.uniquePrivateIps.sourceUnitLabel', - { - defaultMessage: 'source', - } -); - -export const DESTINATION_UNIT_LABEL = i18n.translate( - 'xpack.siem.kpiNetwork.uniquePrivateIps.destinationUnitLabel', - { - defaultMessage: 'destination', - } -); - -export const SOURCE_CHART_LABEL = i18n.translate( - 'xpack.siem.kpiNetwork.uniquePrivateIps.sourceChartLabel', - { - defaultMessage: 'Src.', - } -); - -export const DESTINATION_CHART_LABEL = i18n.translate( - 'xpack.siem.kpiNetwork.uniquePrivateIps.destinationChartLabel', - { - defaultMessage: 'Dest.', - } -); diff --git a/x-pack/plugins/siem/public/network/components/network_http_table/translations.ts b/x-pack/plugins/siem/public/network/components/network_http_table/translations.ts deleted file mode 100644 index c891a7c75fc3c..0000000000000 --- a/x-pack/plugins/siem/public/network/components/network_http_table/translations.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const HTTP_REQUESTS = i18n.translate('xpack.siem.networkHttpTable.title', { - defaultMessage: 'HTTP Requests', -}); - -export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.networkHttpTable.unit', { - values: { totalCount }, - defaultMessage: `{totalCount, plural, =1 {request} other {requests}}`, - }); - -export const METHOD = i18n.translate('xpack.siem.networkHttpTable.column.methodTitle', { - defaultMessage: 'Method', -}); -export const DOMAIN = i18n.translate('xpack.siem.networkHttpTable.column.domainTitle', { - defaultMessage: 'Domain', -}); - -export const PATH = i18n.translate('xpack.siem.networkHttpTable.column.pathTitle', { - defaultMessage: 'Path', -}); - -export const STATUS = i18n.translate('xpack.siem.networkHttpTable.column.statusTitle', { - defaultMessage: 'Status', -}); - -export const LAST_HOST = i18n.translate('xpack.siem.networkHttpTable.column.lastHostTitle', { - defaultMessage: 'Last host', -}); - -export const LAST_SOURCE_IP = i18n.translate( - 'xpack.siem.networkHttpTable.column.lastSourceIpTitle', - { - defaultMessage: 'Last source Ip', - } -); - -export const REQUESTS = i18n.translate('xpack.siem.networkHttpTable.column.requestsTitle', { - defaultMessage: 'Requests', -}); - -export const ROWS_5 = i18n.translate('xpack.siem.networkHttpTable.rows', { - values: { numRows: 5 }, - defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', -}); - -export const ROWS_10 = i18n.translate('xpack.siem.networkHttpTable.rows', { - values: { numRows: 10 }, - defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', -}); diff --git a/x-pack/plugins/siem/public/network/components/network_top_countries_table/translations.ts b/x-pack/plugins/siem/public/network/components/network_top_countries_table/translations.ts deleted file mode 100644 index e3a2697142bef..0000000000000 --- a/x-pack/plugins/siem/public/network/components/network_top_countries_table/translations.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.networkTopCountriesTable.heading.unit', { - values: { totalCount }, - defaultMessage: `{totalCount, plural, =1 {Country} other {Countries}}`, - }); - -export const COUNTRY = i18n.translate('xpack.siem.networkTopCountriesTable.column.countryTitle', { - defaultMessage: 'Country', -}); - -export const BYTES_IN = i18n.translate('xpack.siem.networkTopCountriesTable.column.bytesInTitle', { - defaultMessage: 'Bytes in', -}); - -export const BYTES_OUT = i18n.translate( - 'xpack.siem.networkTopCountriesTable.column.bytesOutTitle', - { - defaultMessage: 'Bytes out', - } -); - -export const FLOWS = i18n.translate('xpack.siem.networkTopCountriesTable.column.flows', { - defaultMessage: 'Flows', -}); - -export const DESTINATION_COUNTRIES = i18n.translate( - 'xpack.siem.networkTopCountriesTable.heading.destinationCountries', - { - defaultMessage: 'Destination countries', - } -); - -export const SOURCE_COUNTRIES = i18n.translate( - 'xpack.siem.networkTopCountriesTable.heading.sourceCountries', - { - defaultMessage: 'Source countries', - } -); - -export const DESTINATION_IPS = i18n.translate( - 'xpack.siem.networkTopCountriesTable.column.destinationIps', - { - defaultMessage: 'Destination IPs', - } -); - -export const SOURCE_IPS = i18n.translate('xpack.siem.networkTopCountriesTable.column.sourceIps', { - defaultMessage: 'Source IPs', -}); - -export const ROWS_5 = i18n.translate('xpack.siem.networkTopCountriesTable.rows', { - values: { numRows: 5 }, - defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', -}); - -export const ROWS_10 = i18n.translate('xpack.siem.networkTopCountriesTable.rows', { - values: { numRows: 10 }, - defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', -}); diff --git a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/translations.ts b/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/translations.ts deleted file mode 100644 index 4648f030dbfdc..0000000000000 --- a/x-pack/plugins/siem/public/network/components/network_top_n_flow_table/translations.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const UNIT = (totalCount: number) => - i18n.translate('xpack.siem.networkTopNFlowTable.unit', { - values: { totalCount }, - defaultMessage: `{totalCount, plural, =1 {IP} other {IPs}}`, - }); - -export const SOURCE_IP = i18n.translate('xpack.siem.networkTopNFlowTable.column.sourceIpTitle', { - defaultMessage: 'Source IPs', -}); - -export const DESTINATION_IP = i18n.translate( - 'xpack.siem.networkTopNFlowTable.column.destinationIpTitle', - { - defaultMessage: 'Destination IPs', - } -); - -export const IP_TITLE = i18n.translate('xpack.siem.networkTopNFlowTable.column.IpTitle', { - defaultMessage: 'IP', -}); - -export const DOMAIN = i18n.translate('xpack.siem.networkTopNFlowTable.column.domainTitle', { - defaultMessage: 'Domain', -}); - -export const BYTES_IN = i18n.translate('xpack.siem.networkTopNFlowTable.column.bytesInTitle', { - defaultMessage: 'Bytes in', -}); - -export const BYTES_OUT = i18n.translate('xpack.siem.networkTopNFlowTable.column.bytesOutTitle', { - defaultMessage: 'Bytes out', -}); - -export const AUTONOMOUS_SYSTEM = i18n.translate('xpack.siem.networkTopNFlowTable.column.asTitle', { - defaultMessage: 'Autonomous system', -}); - -export const FLOWS = i18n.translate('xpack.siem.networkTopNFlowTable.flows', { - defaultMessage: 'Flows', -}); - -export const DESTINATION_IPS = i18n.translate('xpack.siem.networkTopNFlowTable.destinationIps', { - defaultMessage: 'Destination IPs', -}); - -export const SOURCE_IPS = i18n.translate('xpack.siem.networkTopNFlowTable.sourceIps', { - defaultMessage: 'Source IPs', -}); - -export const ROWS_5 = i18n.translate('xpack.siem.networkTopNFlowTable.rows', { - values: { numRows: 5 }, - defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', -}); - -export const ROWS_10 = i18n.translate('xpack.siem.networkTopNFlowTable.rows', { - values: { numRows: 10 }, - defaultMessage: '{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}', -}); diff --git a/x-pack/plugins/siem/public/network/pages/translations.ts b/x-pack/plugins/siem/public/network/pages/translations.ts deleted file mode 100644 index 5d80ded0aa66b..0000000000000 --- a/x-pack/plugins/siem/public/network/pages/translations.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const KQL_PLACEHOLDER = i18n.translate('xpack.siem.network.kqlPlaceholder', { - defaultMessage: 'e.g. source.ip: "foo"', -}); - -export const PAGE_TITLE = i18n.translate('xpack.siem.network.pageTitle', { - defaultMessage: 'Network', -}); - -export const NAVIGATION_FLOWS_TITLE = i18n.translate('xpack.siem.network.navigation.flowsTitle', { - defaultMessage: 'Flows', -}); - -export const NAVIGATION_DNS_TITLE = i18n.translate('xpack.siem.network.navigation.dnsTitle', { - defaultMessage: 'DNS', -}); - -export const ERROR_FETCHING_DNS_DATA = i18n.translate( - 'xpack.siem.hosts.navigation.dns.histogram.errorFetchingDnsData', - { - defaultMessage: 'Failed to query DNS data', - } -); - -export const NAVIGATION_TLS_TITLE = i18n.translate('xpack.siem.network.navigation.tlsTitle', { - defaultMessage: 'TLS', -}); - -export const NAVIGATION_HTTP_TITLE = i18n.translate('xpack.siem.network.navigation.httpTitle', { - defaultMessage: 'HTTP', -}); - -export const NAVIGATION_ANOMALIES_TITLE = i18n.translate( - 'xpack.siem.network.navigation.anomaliesTitle', - { - defaultMessage: 'Anomalies', - } -); - -export const NAVIGATION_ALERTS_TITLE = i18n.translate('xpack.siem.network.navigation.alertsTitle', { - defaultMessage: 'External alerts', -}); - -export const DOMAINS_COUNT_BY = (groupByField: string) => - i18n.translate('xpack.siem.network.dns.stackByUniqueSubdomain', { - values: { groupByField }, - defaultMessage: 'Top domains by {groupByField}', - }); diff --git a/x-pack/plugins/siem/public/overview/components/host_overview/translations.ts b/x-pack/plugins/siem/public/overview/components/host_overview/translations.ts deleted file mode 100644 index 7b2dc026476a8..0000000000000 --- a/x-pack/plugins/siem/public/overview/components/host_overview/translations.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const HOST_ID = i18n.translate('xpack.siem.host.details.overview.hostIdTitle', { - defaultMessage: 'Host ID', -}); - -export const FIRST_SEEN = i18n.translate('xpack.siem.host.details.firstSeenTitle', { - defaultMessage: 'First seen', -}); - -export const LAST_SEEN = i18n.translate('xpack.siem.host.details.lastSeenTitle', { - defaultMessage: 'Last seen', -}); - -export const MAX_ANOMALY_SCORE_BY_JOB = i18n.translate( - 'xpack.siem.host.details.overview.maxAnomalyScoreByJobTitle', - { - defaultMessage: 'Max anomaly score by job', - } -); - -export const IP_ADDRESSES = i18n.translate('xpack.siem.host.details.overview.ipAddressesTitle', { - defaultMessage: 'IP addresses', -}); - -export const MAC_ADDRESSES = i18n.translate('xpack.siem.host.details.overview.macAddressesTitle', { - defaultMessage: 'MAC addresses', -}); - -export const PLATFORM = i18n.translate('xpack.siem.host.details.overview.platformTitle', { - defaultMessage: 'Platform', -}); - -export const OS = i18n.translate('xpack.siem.host.details.overview.osTitle', { - defaultMessage: 'Operating system', -}); - -export const FAMILY = i18n.translate('xpack.siem.host.details.overview.familyTitle', { - defaultMessage: 'Family', -}); - -export const VERSION = i18n.translate('xpack.siem.host.details.versionLabel', { - defaultMessage: 'Version', -}); - -export const ARCHITECTURE = i18n.translate('xpack.siem.host.details.architectureLabel', { - defaultMessage: 'Architecture', -}); - -export const CLOUD_PROVIDER = i18n.translate( - 'xpack.siem.host.details.overview.cloudProviderTitle', - { - defaultMessage: 'Cloud provider', - } -); - -export const REGION = i18n.translate('xpack.siem.host.details.overview.regionTitle', { - defaultMessage: 'Region', -}); - -export const INSTANCE_ID = i18n.translate('xpack.siem.host.details.overview.instanceIdTitle', { - defaultMessage: 'Instance ID', -}); - -export const MACHINE_TYPE = i18n.translate('xpack.siem.host.details.overview.machineTypeTitle', { - defaultMessage: 'Machine type', -}); - -export const INSPECT_TITLE = i18n.translate('xpack.siem.host.details.overview.inspectTitle', { - defaultMessage: 'Host overview', -}); diff --git a/x-pack/plugins/siem/public/overview/components/recent_cases/translations.ts b/x-pack/plugins/siem/public/overview/components/recent_cases/translations.ts deleted file mode 100644 index d2318e5db88c3..0000000000000 --- a/x-pack/plugins/siem/public/overview/components/recent_cases/translations.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const COMMENTS = i18n.translate('xpack.siem.recentCases.commentsTooltip', { - defaultMessage: 'Comments', -}); - -export const MY_RECENTLY_REPORTED_CASES = i18n.translate( - 'xpack.siem.overview.myRecentlyReportedCasesButtonLabel', - { - defaultMessage: 'My recently reported cases', - } -); - -export const NO_CASES = i18n.translate('xpack.siem.recentCases.noCasesMessage', { - defaultMessage: 'No cases have been created yet. Put your detective hat on and', -}); - -export const RECENTLY_CREATED_CASES = i18n.translate( - 'xpack.siem.overview.recentlyCreatedCasesButtonLabel', - { - defaultMessage: 'Recently created cases', - } -); - -export const START_A_NEW_CASE = i18n.translate('xpack.siem.recentCases.startNewCaseLink', { - defaultMessage: 'start a new case', -}); - -export const VIEW_ALL_CASES = i18n.translate('xpack.siem.recentCases.viewAllCasesLink', { - defaultMessage: 'View all cases', -}); diff --git a/x-pack/plugins/siem/public/overview/components/recent_timelines/translations.ts b/x-pack/plugins/siem/public/overview/components/recent_timelines/translations.ts deleted file mode 100644 index f5934aa317242..0000000000000 --- a/x-pack/plugins/siem/public/overview/components/recent_timelines/translations.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ERROR_RETRIEVING_USER_DETAILS = i18n.translate( - 'xpack.siem.recentTimelines.errorRetrievingUserDetailsMessage', - { - defaultMessage: 'Recent Timelines: An error occurred while retrieving user details', - } -); - -export const FAVORITES = i18n.translate('xpack.siem.recentTimelines.favoritesButtonLabel', { - defaultMessage: 'Favorites', -}); - -export const NO_FAVORITE_TIMELINES = i18n.translate( - 'xpack.siem.recentTimelines.noFavoriteTimelinesMessage', - { - defaultMessage: - "You haven't favorited any timelines yet. Get out there and start threat hunting!", - } -); - -export const LAST_UPDATED = i18n.translate('xpack.siem.recentTimelines.lastUpdatedButtonLabel', { - defaultMessage: 'Last updated', -}); - -export const NO_TIMELINES = i18n.translate('xpack.siem.recentTimelines.noTimelinesMessage', { - defaultMessage: "You haven't created any timelines yet. Get out there and start threat hunting!", -}); - -export const NOTES = i18n.translate('xpack.siem.recentTimelines.notesTooltip', { - defaultMessage: 'Notes', -}); - -export const OPEN_AS_DUPLICATE = i18n.translate( - 'xpack.siem.recentTimelines.openAsDuplicateTooltip', - { - defaultMessage: 'Open as a duplicate timeline', - } -); - -export const PINNED_EVENTS = i18n.translate('xpack.siem.recentTimelines.pinnedEventsTooltip', { - defaultMessage: 'Pinned events', -}); - -export const UNTITLED_TIMELINE = i18n.translate( - 'xpack.siem.recentTimelines.untitledTimelineLabel', - { - defaultMessage: 'Untitled timeline', - } -); - -export const VIEW_ALL_TIMELINES = i18n.translate( - 'xpack.siem.recentTimelines.viewAllTimelinesLink', - { - defaultMessage: 'View all timelines', - } -); diff --git a/x-pack/plugins/siem/public/overview/pages/translations.ts b/x-pack/plugins/siem/public/overview/pages/translations.ts deleted file mode 100644 index 7c0c00029266c..0000000000000 --- a/x-pack/plugins/siem/public/overview/pages/translations.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ALERTS_GRAPH_TITLE = i18n.translate('xpack.siem.overview.alertsGraphTitle', { - defaultMessage: 'External alert count', -}); - -export const EVENTS = i18n.translate('xpack.siem.overview.eventsTitle', { - defaultMessage: 'Event count', -}); - -export const NEWS_FEED_TITLE = i18n.translate('xpack.siem.overview.newsFeedSidebarTitle', { - defaultMessage: 'Security news', -}); - -export const PAGE_TITLE = i18n.translate('xpack.siem.overview.pageTitle', { - defaultMessage: 'SIEM', -}); - -export const PAGE_SUBTITLE = i18n.translate('xpack.siem.overview.pageSubtitle', { - defaultMessage: 'Security Information & Event Management with the Elastic Stack', -}); - -export const RECENT_CASES = i18n.translate('xpack.siem.overview.recentCasesSidebarTitle', { - defaultMessage: 'Recent cases', -}); - -export const RECENT_TIMELINES = i18n.translate('xpack.siem.overview.recentTimelinesSidebarTitle', { - defaultMessage: 'Recent timelines', -}); - -export const ALERT_COUNT = i18n.translate('xpack.siem.overview.alertCountTitle', { - defaultMessage: 'Alert count', -}); - -export const TOP = (fieldName: string) => - i18n.translate('xpack.siem.overview.topNLabel', { - values: { fieldName }, - defaultMessage: `Top {fieldName}`, - }); - -export const VIEW_ALERTS = i18n.translate('xpack.siem.overview.viewAlertsButtonLabel', { - defaultMessage: 'View alerts', -}); - -export const VIEW_EVENTS = i18n.translate('xpack.siem.overview.viewEventsButtonLabel', { - defaultMessage: 'View events', -}); diff --git a/x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/translations.ts b/x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/translations.ts deleted file mode 100644 index 1e822c59d3572..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/certificate_fingerprint/translations.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const CLIENT_CERT = i18n.translate('xpack.siem.certificate.fingerprint.clientCertLabel', { - defaultMessage: 'client cert', -}); - -export const SERVER_CERT = i18n.translate('xpack.siem.certificate.fingerprint.serverCertLabel', { - defaultMessage: 'server cert', -}); diff --git a/x-pack/plugins/siem/public/timelines/components/edit_data_provider/translations.ts b/x-pack/plugins/siem/public/timelines/components/edit_data_provider/translations.ts deleted file mode 100644 index 53d2ffa197327..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/edit_data_provider/translations.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const DOES_NOT_EXIST = i18n.translate('xpack.siem.editDataProvider.doesNotExistLabel', { - defaultMessage: 'does not exist', -}); - -export const EXISTS = i18n.translate('xpack.siem.editDataProvider.existsLabel', { - defaultMessage: 'exists', -}); - -export const FIELD = i18n.translate('xpack.siem.editDataProvider.fieldLabel', { - defaultMessage: 'Field', -}); - -export const FIELD_PLACEHOLDER = i18n.translate('xpack.siem.editDataProvider.placeholder', { - defaultMessage: 'Select a field', -}); - -export const IS = i18n.translate('xpack.siem.editDataProvider.isLabel', { - defaultMessage: 'is', -}); - -export const IS_NOT = i18n.translate('xpack.siem.editDataProvider.isNotLabel', { - defaultMessage: 'is not', -}); - -export const OPERATOR = i18n.translate('xpack.siem.editDataProvider.operatorLabel', { - defaultMessage: 'Operator', -}); - -export const SAVE = i18n.translate('xpack.siem.editDataProvider.saveButton', { - defaultMessage: 'Save', -}); - -export const VALUE = i18n.translate('xpack.siem.editDataProvider.valuePlaceholder', { - defaultMessage: 'value', -}); - -export const VALUE_LABEL = i18n.translate('xpack.siem.editDataProvider.valueLabel', { - defaultMessage: 'Value', -}); - -export const SELECT_AN_OPERATOR = i18n.translate( - 'xpack.siem.editDataProvider.selectAnOperatorPlaceholder', - { - defaultMessage: 'Select an operator', - } -); diff --git a/x-pack/plugins/siem/public/timelines/components/fields_browser/translations.ts b/x-pack/plugins/siem/public/timelines/components/fields_browser/translations.ts deleted file mode 100644 index 5365fd05b9f75..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/fields_browser/translations.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const CATEGORY = i18n.translate('xpack.siem.fieldBrowser.categoryLabel', { - defaultMessage: 'Category', -}); - -export const CATEGORIES = i18n.translate('xpack.siem.fieldBrowser.categoriesTitle', { - defaultMessage: 'Categories', -}); - -export const CATEGORIES_COUNT = (totalCount: number) => - i18n.translate('xpack.siem.fieldBrowser.categoriesCountTitle', { - values: { totalCount }, - defaultMessage: '{totalCount} {totalCount, plural, =1 {category} other {categories}}', - }); - -export const COPY_TO_CLIPBOARD = i18n.translate('xpack.siem.fieldBrowser.copyToClipboard', { - defaultMessage: 'Copy to Clipboard', -}); - -export const CUSTOMIZE_COLUMNS = i18n.translate('xpack.siem.fieldBrowser.customizeColumnsTitle', { - defaultMessage: 'Customize Columns', -}); - -export const DESCRIPTION = i18n.translate('xpack.siem.fieldBrowser.descriptionLabel', { - defaultMessage: 'Description', -}); - -export const FIELD = i18n.translate('xpack.siem.fieldBrowser.fieldLabel', { - defaultMessage: 'Field', -}); - -export const FIELDS = i18n.translate('xpack.siem.fieldBrowser.fieldsTitle', { - defaultMessage: 'Columns', -}); - -export const FIELDS_COUNT = (totalCount: number) => - i18n.translate('xpack.siem.fieldBrowser.fieldsCountTitle', { - values: { totalCount }, - defaultMessage: '{totalCount} {totalCount, plural, =1 {field} other {fields}}', - }); - -export const FILTER_PLACEHOLDER = i18n.translate('xpack.siem.fieldBrowser.filterPlaceholder', { - defaultMessage: 'Field name', -}); - -export const NO_FIELDS_MATCH = i18n.translate('xpack.siem.fieldBrowser.noFieldsMatchLabel', { - defaultMessage: 'No fields match', -}); - -export const NO_FIELDS_MATCH_INPUT = (searchInput: string) => - i18n.translate('xpack.siem.fieldBrowser.noFieldsMatchInputLabel', { - defaultMessage: 'No fields match {searchInput}', - values: { - searchInput, - }, - }); - -export const RESET_FIELDS = i18n.translate('xpack.siem.fieldBrowser.resetFieldsLink', { - defaultMessage: 'Reset Fields', -}); - -export const TOGGLE_COLUMN_TOOLTIP = i18n.translate('xpack.siem.fieldBrowser.toggleColumnTooltip', { - defaultMessage: 'Toggle column', -}); - -export const VIEW_CATEGORY = (categoryId: string) => - i18n.translate('xpack.siem.fieldBrowser.viewCategoryTooltip', { - defaultMessage: 'View all {categoryId} fields', - values: { - categoryId, - }, - }); diff --git a/x-pack/plugins/siem/public/timelines/components/formatted_duration/translations.ts b/x-pack/plugins/siem/public/timelines/components/formatted_duration/translations.ts deleted file mode 100644 index e10d56bc05019..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/formatted_duration/translations.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const NO_DURATION = i18n.translate('xpack.siem.formatted.duration.noDurationTooltip', { - defaultMessage: 'no duration', -}); - -export const INVALID_DURATION = i18n.translate( - 'xpack.siem.formatted.duration.invalidDurationTooltip', - { - defaultMessage: 'invalid duration', - } -); - -export const A_NANOSECOND = i18n.translate('xpack.siem.formatted.duration.aNanosecondTooltip', { - defaultMessage: 'a nanosecond', -}); - -export const A_FEW_NANOSECONDS = i18n.translate( - 'xpack.siem.formatted.duration.aFewNanosecondsTooltip', - { - defaultMessage: 'a few nanoseconds', - } -); - -export const A_MILLISECOND = i18n.translate('xpack.siem.formatted.duration.aMillisecondTooltip', { - defaultMessage: 'a millisecond', -}); - -export const A_FEW_MILLISECONDS = i18n.translate( - 'xpack.siem.formatted.duration.aFewMillisecondsTooltip', - { - defaultMessage: 'a few milliseconds', - } -); - -export const A_SECOND = i18n.translate('xpack.siem.formatted.duration.aSecondTooltip', { - defaultMessage: 'a second', -}); - -export const ZERO_NANOSECONDS = i18n.translate( - 'xpack.siem.formatted.duration.zeroNanosecondsTooltip', - { - defaultMessage: 'zero nanoseconds', - } -); diff --git a/x-pack/plugins/siem/public/timelines/components/notes/translations.ts b/x-pack/plugins/siem/public/timelines/components/notes/translations.ts deleted file mode 100644 index 93aa4f5ca204e..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/notes/translations.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ADD_NOTE = i18n.translate('xpack.siem.notes.addNoteButtonLabel', { - defaultMessage: 'Add Note', -}); - -export const ADD_A_NOTE = i18n.translate('xpack.siem.notes.addANotePlaceholder', { - defaultMessage: 'Add a Note', -}); - -export const ADDED_A_NOTE = i18n.translate('xpack.siem.notes.addedANoteLabel', { - defaultMessage: 'Added a Note', -}); - -export const NOTE = i18n.translate('xpack.siem.notes.noteLabel', { - defaultMessage: 'Note', -}); - -export const NOTES = i18n.translate('xpack.siem.notes.notesTitle', { - defaultMessage: 'Notes', -}); - -export const PREVIEW_MARKDOWN = i18n.translate('xpack.siem.notes.previewMarkdownTitle', { - defaultMessage: 'Preview (Markdown)', -}); - -export const SEARCH_PLACEHOLDER = i18n.translate( - 'xpack.siem.notes.search.FilterByUserOrNotePlaceholder', - { - defaultMessage: 'Filter by User or Note', - } -); - -export const CANCEL = i18n.translate('xpack.siem.notes.cancelButtonLabel', { - defaultMessage: 'Cancel', -}); - -export const COPY_TO_CLIPBOARD = i18n.translate('xpack.siem.notes.copyToClipboardButtonLabel', { - defaultMessage: 'Copy to Clipboard', -}); diff --git a/x-pack/plugins/siem/public/timelines/components/open_timeline/translations.ts b/x-pack/plugins/siem/public/timelines/components/open_timeline/translations.ts deleted file mode 100644 index 80c044c0a1d9f..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/open_timeline/translations.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const ALL_ACTIONS = i18n.translate('xpack.siem.open.timeline.allActionsTooltip', { - defaultMessage: 'All actions', -}); - -export const BATCH_ACTIONS = i18n.translate('xpack.siem.open.timeline.batchActionsTitle', { - defaultMessage: 'Bulk actions', -}); - -export const CANCEL = i18n.translate('xpack.siem.open.timeline.cancelButton', { - defaultMessage: 'Cancel', -}); - -export const COLLAPSE = i18n.translate('xpack.siem.open.timeline.collapseButton', { - defaultMessage: 'Collapse', -}); - -export const DELETE = i18n.translate('xpack.siem.open.timeline.deleteButton', { - defaultMessage: 'Delete', -}); - -export const DELETE_SELECTED = i18n.translate('xpack.siem.open.timeline.deleteSelectedButton', { - defaultMessage: 'Delete selected', -}); - -export const DELETE_WARNING = i18n.translate('xpack.siem.open.timeline.deleteWarningLabel', { - defaultMessage: 'You will not be able to recover this timeline or its notes once deleted.', -}); - -export const DESCRIPTION = i18n.translate('xpack.siem.open.timeline.descriptionTableHeader', { - defaultMessage: 'Description', -}); - -export const EXPAND = i18n.translate('xpack.siem.open.timeline.expandButton', { - defaultMessage: 'Expand', -}); - -export const EXPORT_FILENAME = i18n.translate('xpack.siem.open.timeline.exportFileNameTitle', { - defaultMessage: 'timelines_export', -}); - -export const EXPORT_SELECTED = i18n.translate('xpack.siem.open.timeline.exportSelectedButton', { - defaultMessage: 'Export selected', -}); - -export const FAVORITE_SELECTED = i18n.translate('xpack.siem.open.timeline.favoriteSelectedButton', { - defaultMessage: 'Favorite selected', -}); - -export const FAVORITES = i18n.translate('xpack.siem.open.timeline.favoritesTooltip', { - defaultMessage: 'Favorites', -}); - -export const LAST_MODIFIED = i18n.translate('xpack.siem.open.timeline.lastModifiedTableHeader', { - defaultMessage: 'Last modified', -}); - -export const MISSING_SAVED_OBJECT_ID = i18n.translate( - 'xpack.siem.open.timeline.missingSavedObjectIdTooltip', - { - defaultMessage: 'Missing savedObjectId', - } -); - -export const MODIFIED_BY = i18n.translate('xpack.siem.open.timeline.modifiedByTableHeader', { - defaultMessage: 'Modified by', -}); - -export const NOTES = i18n.translate('xpack.siem.open.timeline.notesTooltip', { - defaultMessage: 'Notes', -}); - -export const ONLY_FAVORITES = i18n.translate('xpack.siem.open.timeline.onlyFavoritesButtonLabel', { - defaultMessage: 'Only favorites', -}); - -export const OPEN_AS_DUPLICATE = i18n.translate('xpack.siem.open.timeline.openAsDuplicateTooltip', { - defaultMessage: 'Duplicate timeline', -}); - -export const OPEN_TIMELINE = i18n.translate('xpack.siem.open.timeline.openTimelineButton', { - defaultMessage: 'Open Timeline…', -}); - -export const OPEN_TIMELINE_TITLE = i18n.translate('xpack.siem.open.timeline.openTimelineTitle', { - defaultMessage: 'Open Timeline', -}); - -export const PINNED_EVENTS = i18n.translate('xpack.siem.open.timeline.pinnedEventsTooltip', { - defaultMessage: 'Pinned events', -}); - -export const POSTED = i18n.translate('xpack.siem.open.timeline.postedLabel', { - defaultMessage: 'Posted:', -}); - -export const REFRESH = i18n.translate('xpack.siem.open.timeline.refreshTitle', { - defaultMessage: 'Refresh', -}); - -export const SEARCH_PLACEHOLDER = i18n.translate('xpack.siem.open.timeline.searchPlaceholder', { - defaultMessage: 'e.g. timeline name, or description', -}); - -export const TIMELINE_NAME = i18n.translate('xpack.siem.open.timeline.timelineNameTableHeader', { - defaultMessage: 'Timeline name', -}); - -export const UNTITLED_TIMELINE = i18n.translate('xpack.siem.open.timeline.untitledTimelineLabel', { - defaultMessage: 'Untitled timeline', -}); - -export const WITH = i18n.translate('xpack.siem.open.timeline.withLabel', { - defaultMessage: 'with', -}); - -export const ZERO_TIMELINES_MATCH = i18n.translate( - 'xpack.siem.open.timeline.zeroTimelinesMatchLabel', - { - defaultMessage: '0 timelines match the search criteria', - } -); - -export const SELECTED_TIMELINES = (selectedTimelines: number) => - i18n.translate('xpack.siem.open.timeline.selectedTimelinesTitle', { - values: { selectedTimelines }, - defaultMessage: - 'Selected {selectedTimelines} {selectedTimelines, plural, =1 {timeline} other {timelines}}', - }); - -export const SHOWING = i18n.translate('xpack.siem.open.timeline.showingLabel', { - defaultMessage: 'Showing:', -}); - -export const SUCCESSFULLY_EXPORTED_TIMELINES = (totalTimelines: number) => - i18n.translate('xpack.siem.open.timeline.successfullyExportedTimelinesTitle', { - values: { totalTimelines }, - defaultMessage: - 'Successfully exported {totalTimelines, plural, =0 {all timelines} =1 {{totalTimelines} timeline} other {{totalTimelines} timelines}}', - }); - -export const FILTER_TIMELINES = (timelineType: string) => - i18n.translate('xpack.siem.open.timeline.filterByTimelineTypesTitle', { - values: { timelineType }, - defaultMessage: 'Only {timelineType}', - }); - -export const TAB_TIMELINES = i18n.translate('xpack.siem.timelines.components.tabs.timelinesTitle', { - defaultMessage: 'Timelines', -}); - -export const TAB_TEMPLATES = i18n.translate('xpack.siem.timelines.components.tabs.templatesTitle', { - defaultMessage: 'Templates', -}); - -export const IMPORT_TIMELINE_BTN_TITLE = i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.importTimelineTitle', - { - defaultMessage: 'Import timeline', - } -); - -export const SELECT_TIMELINE = i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.selectTimelineDescription', - { - defaultMessage: 'Select a SIEM timeline (as exported from the Timeline view) to import', - } -); - -export const INITIAL_PROMPT_TEXT = i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.initialPromptTextDescription', - { - defaultMessage: 'Select or drag and drop a valid timelines_export.ndjson file', - } -); - -export const OVERWRITE_WITH_SAME_NAME = i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.overwriteDescription', - { - defaultMessage: 'Automatically overwrite saved objects with the same timeline ID', - } -); - -export const SUCCESSFULLY_IMPORTED_TIMELINES = (totalCount: number) => - i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.successfullyImportedTimelinesTitle', - { - values: { totalCount }, - defaultMessage: - 'Successfully imported {totalCount} {totalCount, plural, =1 {timeline} other {timelines}}', - } - ); - -export const IMPORT_FAILED = i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.importFailedTitle', - { - defaultMessage: 'Failed to import timelines', - } -); - -export const IMPORT_TIMELINE = i18n.translate( - 'xpack.siem.timelines.components.importTimelineModal.importTitle', - { - defaultMessage: 'Import timeline…', - } -); - -export const IMPORT_FAILED_DETAILED = (id: string, statusCode: number, message: string) => - i18n.translate('xpack.siem.timelines.components.importTimelineModal.importFailedDetailedTitle', { - values: { id, statusCode, message }, - defaultMessage: 'Timeline ID: {id}\n Status Code: {statusCode}\n Message: {message}', - }); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/__examples__/index.stories.tsx b/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/__examples__/index.stories.tsx deleted file mode 100644 index f34e9ee214537..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/__examples__/index.stories.tsx +++ /dev/null @@ -1,12 +0,0 @@ -/* - * 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 { storiesOf } from '@storybook/react'; -import React from 'react'; -import { AndOrBadge } from '..'; - -storiesOf('components/AndOrBadge', module) - .add('and', () => ) - .add('or', () => ); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/index.tsx b/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/index.tsx deleted file mode 100644 index 28355372df146..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/and_or_badge/index.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 { EuiBadge } from '@elastic/eui'; -import React from 'react'; -import styled from 'styled-components'; - -import * as i18n from './translations'; - -const RoundedBadge = (styled(EuiBadge)` - align-items: center; - border-radius: 100%; - display: inline-flex; - font-size: 9px; - height: 34px; - justify-content: center; - margin: 0 5px 0 5px; - padding: 7px 6px 4px 6px; - user-select: none; - width: 34px; - - .euiBadge__content { - position: relative; - top: -1px; - } - - .euiBadge__text { - text-overflow: clip; - } -` as unknown) as typeof EuiBadge; - -RoundedBadge.displayName = 'RoundedBadge'; - -export type AndOr = 'and' | 'or'; - -/** Displays AND / OR in a round badge */ -// Ref: https://github.com/elastic/eui/issues/1655 -export const AndOrBadge = React.memo<{ type: AndOr }>(({ type }) => { - return ( - - {type === 'and' ? i18n.AND : i18n.OR} - - ); -}); - -AndOrBadge.displayName = 'AndOrBadge'; diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/auto_save_warning/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/auto_save_warning/translations.ts deleted file mode 100644 index a47191631720e..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/auto_save_warning/translations.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const TITLE = i18n.translate('xpack.siem.timeline.autosave.warning.title', { - defaultMessage: 'Auto-save disabled until refresh', -}); - -export const DESCRIPTION = i18n.translate('xpack.siem.timeline.autosave.warning.description', { - defaultMessage: - 'Another user has made changes to this timeline. Any changes you make will not be auto-saved until you have refreshed this timeline to absorb those changes.', -}); - -export const REFRESH_TIMELINE = i18n.translate( - 'xpack.siem.timeline.autosave.warning.refresh.title', - { - defaultMessage: 'Refresh timeline', - } -); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/translations.ts deleted file mode 100644 index f07776eb10c61..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/column_headers/events_select/translations.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const PIN_SELECTED = i18n.translate('xpack.siem.timeline.eventsSelect.actions.pinSelected', { - defaultMessage: 'Pin selected', -}); - -export const SELECT_ALL = i18n.translate('xpack.siem.timeline.eventsSelect.actions.selectAll', { - defaultMessage: 'All', -}); - -export const SELECT_NONE = i18n.translate('xpack.siem.timeline.eventsSelect.actions.selectNone', { - defaultMessage: 'None', -}); - -export const SELECT_PINNED = i18n.translate( - 'xpack.siem.timeline.eventsSelect.actions.selectPinned', - { - defaultMessage: 'Pinned', - } -); - -export const SELECT_UNPINNED = i18n.translate( - 'xpack.siem.timeline.eventsSelect.actions.selectUnpinned', - { - defaultMessage: 'Unpinned', - } -); - -export const UNPIN_SELECTED = i18n.translate( - 'xpack.siem.timeline.eventsSelect.actions.unpinSelected', - { - defaultMessage: 'Unpin selected', - } -); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/translations.ts deleted file mode 100644 index a0f6bd2aa37bf..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/auditd/translations.ts +++ /dev/null @@ -1,684 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -// Note for translators and programmers -// Examples of these strings are all of the form -// Session {session.id} {primary} as {secondary}@{hostname} in {folder} was authorized to use {executable} with result {result.success/failure} -// E.x. Session 5 Frank as root@server-1 in /root was authorized to use wget with result success - -// However, the strings can be dropped depending on the circumstances of the variables. For example, with no data at all -// Session 10 -// Example with just a user name and hostname -// Session 20 frank@server-1 -// Example with user name, hostname, but no result -// Session 20 frank@server-1 acquired credentials to curl - -export const SESSION = i18n.translate('xpack.siem.auditd.sessionDescription', { - defaultMessage: 'Session', -}); - -export const WAS_AUTHORIZED_TO_USE = i18n.translate( - 'xpack.siem.auditd.wasAuthorizedToUseDescription', - { - defaultMessage: 'was authorized to use', - } -); - -export const ACQUIRED_CREDENTIALS_TO = i18n.translate( - 'xpack.siem.auditd.acquiredCredentialsDescription', - { - defaultMessage: 'acquired credentials to', - } -); - -export const ENDED_FROM = i18n.translate('xpack.siem.auditd.endedFromDescription', { - defaultMessage: 'ended from', -}); - -export const STARTED = i18n.translate('xpack.siem.auditd.startedAtDescription', { - defaultMessage: 'started', -}); - -export const DISPOSED_CREDENTIALS_TO = i18n.translate( - 'xpack.siem.auditd.disposedCredentialsDescription', - { - defaultMessage: 'disposed credentials to', - } -); - -export const ATTEMPTED_LOGIN = i18n.translate('xpack.siem.auditd.attemptedLoginDescription', { - defaultMessage: 'attempted a login via', -}); - -export const WITH_RESULT = i18n.translate('xpack.siem.auditd.withResultDescription', { - defaultMessage: 'with result', -}); - -export const EXECUTED = i18n.translate('xpack.siem.auditd.executedDescription', { - defaultMessage: 'executed', -}); - -export const AS = i18n.translate('xpack.siem.auditd.asDescription', { - defaultMessage: 'as', -}); - -export const CONNECTED_USING = i18n.translate('xpack.siem.auditd.connectedUsingDescription', { - defaultMessage: 'connected using', -}); - -export const USING = i18n.translate('xpack.siem.auditd.usingDescription', { - defaultMessage: 'using', -}); - -export const OPENED_FILE = i18n.translate('xpack.siem.auditd.OpenedFileDescription', { - defaultMessage: 'opened file', -}); - -export const CHANGED_FILE_ATTRIBUTES_OF = i18n.translate( - 'xpack.siem.auditd.ChangedFileAttributesOfDescription', - { - defaultMessage: 'changed file attributes of', - } -); - -export const CHANGED_FILE_PERMISSIONS_OF = i18n.translate( - 'xpack.siem.auditd.changedFilePermissionOfDescription', - { - defaultMessage: 'changed file permissions of', - } -); - -export const CHANGED_FILE_OWNERSHIP_OF = i18n.translate( - 'xpack.siem.auditd.changeidleOwernshipOfDescription', - { - defaultMessage: 'changed file ownership of', - } -); - -export const LOADED_KERNEL_MODULE = i18n.translate( - 'xpack.siem.auditd.loaedKernelModuleOfDescription', - { - defaultMessage: 'loaded kernel module of', - } -); - -export const UNLOADED_KERNEL_MODULE_OF = i18n.translate( - 'xpack.siem.auditd.unloadedKernelModuleOfDescription', - { - defaultMessage: 'unloaded kernel module of', - } -); - -export const CREATED_DIRECTORY = i18n.translate('xpack.siem.auditd.createdDirectoryDescription', { - defaultMessage: 'created directory', -}); - -export const MOUNTED = i18n.translate('xpack.siem.auditd.mountedDescription', { - defaultMessage: 'mounted', -}); - -export const RENAMED = i18n.translate('xpack.siem.auditd.renamedDescription', { - defaultMessage: 'renamed', -}); - -export const CHECKED_METADATA_OF = i18n.translate( - 'xpack.siem.auditd.chedckedMetaDataOfDescription', - { - defaultMessage: 'checked metadata of', - } -); - -export const CHECKED_FILE_SYSTEM_METADATA_OF = i18n.translate( - 'xpack.siem.auditd.checkedFileSystemMetadataOfDescription', - { - defaultMessage: 'checked filesystem metadata of', - } -); - -export const SYMLINKED = i18n.translate('xpack.siem.auditd.symLinkedDescription', { - defaultMessage: 'symbolically linked', -}); - -export const UNMOUNTED = i18n.translate('xpack.siem.auditd.unmountedDescription', { - defaultMessage: 'unmounted', -}); - -export const DELETED = i18n.translate('xpack.siem.auditd.deletedDescription', { - defaultMessage: 'deleted', -}); - -export const CHANGED_TIME_STAMP_OF = i18n.translate( - 'xpack.siem.auditd.changedTimeStampOfDescription', - { - defaultMessage: 'changed time stamp of', - } -); - -export const LISTEN_FOR_CONNECTIONS = i18n.translate( - 'xpack.siem.auditd.ListeningForConnectionsUsingDescription', - { - defaultMessage: 'listening for connections using', - } -); - -export const BOUND_SOCKET_FROM = i18n.translate('xpack.siem.auditd.boundSocketFromDescription', { - defaultMessage: 'bound socket from', -}); - -export const RECEIVED_FROM = i18n.translate('xpack.siem.auditd.receivedFromDescription', { - defaultMessage: 'received from', -}); - -export const SENT_TO = i18n.translate('xpack.siem.auditd.sentToDescription', { - defaultMessage: 'sent to', -}); - -export const KILLED_PROCESS_ID_OF = i18n.translate('xpack.siem.auditd.killedProcessIdDescription', { - defaultMessage: 'killed process id of', -}); - -export const CHANGED_IDENTITY_USING = i18n.translate( - 'xpack.siem.auditd.changedIdentityUsingDescription', - { - defaultMessage: 'changed identity using', - } -); - -export const CHANGED_SYSTEM_TIME_WITH = i18n.translate( - 'xpack.siem.auditd.changedSystemTimeWithDescription', - { - defaultMessage: 'changed system time with', - } -); - -export const MADE_DEVICE_WITH = i18n.translate('xpack.siem.auditd.madeDeviceWithDescription', { - defaultMessage: 'made device with', -}); - -export const CHANGED_SYSTEM_NAME = i18n.translate( - 'xpack.siem.auditd.changedSystemNameDescription', - { - defaultMessage: 'changed system name', - } -); - -export const ALLOCATED_MEMORY_FOR = i18n.translate( - 'xpack.siem.auditd.allocatedMemoryForDescription', - { - defaultMessage: 'allocated memory for', - } -); - -export const SCHEDULED_POLICY_OF = i18n.translate( - 'xpack.siem.auditd.scheduledPolicyOFDescription', - { - defaultMessage: 'scheduled policy of', - } -); - -export const ADDED_USER_ACCOUNT = i18n.translate('xpack.siem.auditd.addedUserAccountDescription', { - defaultMessage: 'added user account', -}); - -export const CAUSED_MAC_POLICY_ERROR = i18n.translate( - 'xpack.siem.auditd.causedMacPolicyErrorDescription', - { - defaultMessage: 'caused mac policy error', - } -); - -export const LOADED_FIREWALL_RULE = i18n.translate( - 'xpack.siem.auditd.loadedFirewallRuleDescription', - { - defaultMessage: 'loaded firewall rule', - } -); - -export const CHANGED_PROMISCUOUS_MODE = i18n.translate( - 'xpack.siem.auditd.promiscuousModeDescription', - { - defaultMessage: 'changed promiscuous mode on the device using', - } -); - -export const LOCKED_ACCOUNT = i18n.translate('xpack.siem.auditd.lockedAccountDescription', { - defaultMessage: 'locked account', -}); - -export const UNLOCKED_ACCOUNT = i18n.translate('xpack.siem.auditd.unlockedAccountDescription', { - defaultMessage: 'unlocked account', -}); - -export const ADDED_GROUP_ACCOUNT_USING = i18n.translate( - 'xpack.siem.auditd.adddedGroupAccountUsingDescription', - { - defaultMessage: 'added group account using', - } -); - -export const CRASHED_PROGRAM = i18n.translate('xpack.siem.auditd.crashedProgramDescription', { - defaultMessage: 'crashed program', -}); - -export const EXECUTION_OF_FORBIDDEN_PROGRAM = i18n.translate( - 'xpack.siem.auditd.executionOfForbiddenProgramDescription', - { - defaultMessage: 'execution of forbidden program', - } -); - -export const USED_SUSPICIOUS_PROGRAM = i18n.translate( - 'xpack.siem.auditd.suspiciousProgramDescription', - { - defaultMessage: 'used suspicious program', - } -); - -export const FAILED_LOGIN_TOO_MANY_TIMES = i18n.translate( - 'xpack.siem.auditd.failedLoginTooManyTimesDescription', - { - defaultMessage: 'failed login due to logging in too many times', - } -); - -export const ATTEMPTED_LOGIN_FROM_UNUSUAL_PLACE = i18n.translate( - 'xpack.siem.auditd.attemptedLoginFromUnusalPlaceDescription', - { - defaultMessage: 'attempted login from unusual place', - } -); - -export const OPENED_TOO_MANY_SESSIONS = i18n.translate( - 'xpack.siem.auditd.openedTooManySessionsDescription', - { - defaultMessage: 'opened too many sessions', - } -); - -export const ATTEMPTED_LOGIN_FROM_UNUSUAL_HOUR = i18n.translate( - 'xpack.siem.auditd.attemptedLoginFromUnusualHourDescription', - { - defaultMessage: 'attempted login from unusual hour', - } -); - -export const TESTED_FILE_SYSTEM_INTEGRITY = i18n.translate( - 'xpack.siem.auditd.testedFileSystemIntegrityDescription', - { - defaultMessage: 'tested file system integrity', - } -); - -export const VIOLATED_SELINUX_POLICY = i18n.translate( - 'xpack.siem.auditd.violatedSeLinuxPolicyDescription', - { - defaultMessage: 'violated selinux policy', - } -); - -export const VIOLATED_APP_ARMOR_POLICY_FROM = i18n.translate( - 'xpack.siem.auditd.violatedAppArmorPolicyFromDescription', - { - defaultMessage: 'violated app armor policy from', - } -); - -export const CHANGED_GROUP = i18n.translate('xpack.siem.auditd.changedGroupDescription', { - defaultMessage: 'changed group', -}); - -export const CHANGED_USER_ID = i18n.translate('xpack.siem.auditd.changedUserIdDescription', { - defaultMessage: 'changed user id', -}); - -export const CHANGED_AUDIT_CONFIGURATION = i18n.translate( - 'xpack.siem.auditd.changedAuditConfigurationDescription', - { - defaultMessage: 'changed audit configuration', - } -); - -export const REFRESHED_CREDENTIALS_FOR = i18n.translate( - 'xpack.siem.auditd.refreshedCredentialsForDescription', - { - defaultMessage: 'refreshed credentials for', - } -); - -export const NEGOTIATED_CRYPTO_KEY = i18n.translate( - 'xpack.siem.auditd.negotiatedCryptoKeyDescription', - { - defaultMessage: 'negotiated crypto key', - } -); - -export const CRYPTO_OFFICER_LOGGED_IN = i18n.translate( - 'xpack.siem.auditd.cryptoOfficerLoggedInDescription', - { - defaultMessage: 'crypto officer logged in', - } -); - -export const CRYPTO_OFFICER_LOGGED_OUT = i18n.translate( - 'xpack.siem.auditd.cryptoOfficerLoggedOutDescription', - { - defaultMessage: 'crypto officer logged out', - } -); - -export const STARTED_CRYPTO_SESSION = i18n.translate( - 'xpack.siem.auditd.startedCryptoSessionDescription', - { - defaultMessage: 'started crypto session', - } -); - -export const ACCESS_RESULT = i18n.translate('xpack.siem.auditd.accessResultDescription', { - defaultMessage: 'access result', -}); - -export const ABORTED_AUDIT_STARTUP = i18n.translate( - 'xpack.siem.auditd.abortedAuditStartupDescription', - { - defaultMessage: 'aborted audit startup', - } -); - -export const REMOTE_AUDIT_CONNECTED = i18n.translate( - 'xpack.siem.auditd.remoteAuditConnectedDescription', - { - defaultMessage: 'remote audit connected', - } -); - -export const REMOTE_AUDIT_DISCONNECTED = i18n.translate( - 'xpack.siem.auditd.remoteAuditDisconnectedDescription', - { - defaultMessage: 'remote audit disconnected', - } -); - -export const SHUTDOWN_AUDIT = i18n.translate('xpack.siem.auditd.shutDownAuditDescription', { - defaultMessage: 'shutdown audit', -}); - -export const AUDIT_ERROR = i18n.translate('xpack.siem.auditd.auditErrorDescription', { - defaultMessage: 'audit error', -}); - -export const RECONFIGURED_AUDIT = i18n.translate('xpack.siem.auditd.reconfiguredAuditDescription', { - defaultMessage: 'reconfigured audit', -}); - -export const RESUMED_AUDIT_LOGGING = i18n.translate( - 'xpack.siem.auditd.resumedAuditLoggingDescription', - { - defaultMessage: 'resumed audit logging', - } -); - -export const ROTATED_AUDIT_LOGS = i18n.translate('xpack.siem.auditd.rotatedAuditLogsDescription', { - defaultMessage: 'rotated-audit-logs', -}); - -export const STARTED_AUDIT = i18n.translate('xpack.siem.auditd.startedAuditDescription', { - defaultMessage: 'started audit', -}); - -export const DELETED_GROUP_ACCOUNT_USING = i18n.translate( - 'xpack.siem.auditd.deletedGroupAccountUsingDescription', - { - defaultMessage: 'deleted group account using', - } -); - -export const DELETED_USER_ACCOUNT_USING = i18n.translate( - 'xpack.siem.auditd.deletedUserAccountUsingDescription', - { - defaultMessage: 'deleted user account using', - } -); - -export const CHANGED_AUDIT_FEATURE = i18n.translate( - 'xpack.siem.auditd.changedAuditFeatureDescription', - { - defaultMessage: 'changed audit feature', - } -); - -export const RELABELED_FILESYSTEM = i18n.translate( - 'xpack.siem.auditd.relabeledFileSystemDescription', - { - defaultMessage: 'relabeled filesystem', - } -); - -export const AUTHENTICATED_TO_GROUP = i18n.translate( - 'xpack.siem.auditd.authenticatedToGroupDescription', - { - defaultMessage: 'authenticated to group', - } -); - -export const CHANGED_GROUP_PASSWORD = i18n.translate( - 'xpack.siem.auditd.changedGroupPasswordDescription', - { - defaultMessage: 'changed group password', - } -); - -export const MODIFIED_GROUP_ACCOUNT = i18n.translate( - 'xpack.siem.auditd.modifiedGroupAccountDescription', - { - defaultMessage: 'modified group account', - } -); - -export const INITIALIZED_AUDIT_SUBSYSTEM = i18n.translate( - 'xpack.siem.auditd.initializedAuditSubsystemDescription', - { - defaultMessage: 'initialized audit subsystem', - } -); - -export const MODIFIED_LEVEL_OF = i18n.translate('xpack.siem.auditd.modifiedLevelOfDescription', { - defaultMessage: 'modified level of', -}); - -export const OVERRODE_LABEL_OF = i18n.translate('xpack.siem.auditd.overrodeLabelOfDescription', { - defaultMessage: 'overrode label of', -}); - -export const CHANGED_LOGIN_ID_TO = i18n.translate('xpack.siem.auditd.changedLoginIdToDescription', { - defaultMessage: 'changed login id to', -}); - -export const MAC_PERMISSION = i18n.translate('xpack.siem.auditd.macPermissionDescription', { - defaultMessage: 'mac permission', -}); - -export const CHANGED_SELINUX_BOOLEAN = i18n.translate( - 'xpack.siem.auditd.changedSeLinuxBooleanDescription', - { - defaultMessage: 'changed selinux boolean', - } -); - -export const LOADED_SELINUX_POLICY = i18n.translate( - 'xpack.siem.auditd.loadedSeLinuxPolicyDescription', - { - defaultMessage: 'loaded selinux policy', - } -); - -export const CHANGED_SELINUX_ENFORCEMENT = i18n.translate( - 'xpack.siem.auditd.changedSelinuxEnforcementDescription', - { - defaultMessage: 'changed selinux enforcement', - } -); - -export const ASSIGNED_USER_ROLE_TO = i18n.translate( - 'xpack.siem.auditd.assignedUserRoleToDescription', - { - defaultMessage: 'assigned user role to', - } -); - -export const MODIFIED_ROLE = i18n.translate('xpack.siem.auditd.modifiedRoleDescription', { - defaultMessage: 'modified role', -}); - -export const REMOVED_USER_ROLE_FROM = i18n.translate( - 'xpack.siem.auditd.removedUserRoleFromDescription', - { - defaultMessage: 'removed user role from', - } -); - -export const VIOLATED_SECCOMP_POLICY_WITH = i18n.translate( - 'xpack.siem.auditd.violatedSeccompPolicyWithDescription', - { - defaultMessage: 'violated seccomp policy with', - } -); - -export const STARTED_SERVICE = i18n.translate('xpack.siem.auditd.startedServiceDescription', { - defaultMessage: 'started service', -}); - -export const STOPPED_SERVICE = i18n.translate('xpack.siem.auditd.stoppedServiceDescription', { - defaultMessage: 'stopped service', -}); - -export const BOOTED_SYSTEM = i18n.translate('xpack.siem.auditd.bootedSystemDescription', { - defaultMessage: 'booted system', -}); - -export const CHANGED_TO_RUN_LEVEL_WITH = i18n.translate( - 'xpack.siem.auditd.changedToRunLevelWithDescription', - { - defaultMessage: 'changed to run level with', - } -); - -export const SHUTDOWN_SYSTEM = i18n.translate('xpack.siem.auditd.shutdownSystemDescription', { - defaultMessage: 'shutdown system', -}); - -export const SENT_TEST = i18n.translate('xpack.siem.auditd.sentTestDescription', { - defaultMessage: 'sent test', -}); - -export const UNKNOWN = i18n.translate('xpack.siem.auditd.unknownDescription', { - defaultMessage: 'unknown', -}); - -export const SENT_MESSAGE = i18n.translate('xpack.siem.auditd.sentMessageDescription', { - defaultMessage: 'sent message', -}); - -export const ACCESS_PERMISSION = i18n.translate('xpack.siem.auditd.accessPermissionDescription', { - defaultMessage: 'access permission', -}); - -export const AUTHENTICATED_USING = i18n.translate( - 'xpack.siem.auditd.authenticatedUsingDescription', - { - defaultMessage: 'authenticated using', - } -); - -export const CHANGED_PASSWORD_WITH = i18n.translate( - 'xpack.siem.auditd.changedPasswordWithDescription', - { - defaultMessage: 'changed password with', - } -); - -export const RAN_COMMAND = i18n.translate('xpack.siem.auditd.ranCommandDescription', { - defaultMessage: 'ran command', -}); - -export const ERROR_FROM = i18n.translate('xpack.siem.auditd.errorFromDescription', { - defaultMessage: 'error from', -}); - -export const LOGGED_OUT = i18n.translate('xpack.siem.auditd.loggedOutDescription', { - defaultMessage: 'logged out', -}); - -export const CHANGED_MAC_CONFIGURATION = i18n.translate( - 'xpack.siem.auditd.changedMacConfigurationDescription', - { - defaultMessage: 'changed mac configuration', - } -); - -export const LOADED_MAC_POLICY = i18n.translate('xpack.siem.auditd.loadedMacPolicyDescription', { - defaultMessage: 'loaded mac policy', -}); - -export const MODIFIED_USER_ACCOUNT = i18n.translate( - 'xpack.siem.auditd.modifiedUserAccountDescription', - { - defaultMessage: 'modified user account', - } -); -export const CHANGED_ROLE_USING = i18n.translate('xpack.siem.auditd.changedRoleUsingDescription', { - defaultMessage: 'changed role using', -}); - -export const ACCESS_ERROR = i18n.translate('xpack.siem.auditd.accessErrorDescription', { - defaultMessage: 'access error', -}); - -export const CHANGED_CONFIGURATION_WITH = i18n.translate( - 'xpack.siem.auditd.changedConfigurationWIthDescription', - { - defaultMessage: 'changed configuration with', - } -); - -export const ISSUED_VM_CONTROL = i18n.translate('xpack.siem.auditd.issuedVmControlDescription', { - defaultMessage: 'issued vm control', -}); - -export const CREATED_VM_IMAGE = i18n.translate('xpack.siem.auditd.createdVmImageDescription', { - defaultMessage: 'created vm image', -}); - -export const DELETED_VM_IMAGE = i18n.translate('xpack.siem.auditd.deletedVmImageDescription', { - defaultMessage: 'deleted vm image', -}); - -export const CHECKED_INTEGRITY_OF = i18n.translate( - 'xpack.siem.auditd.checkedIntegrityOfDescription', - { - defaultMessage: 'checked integrity of', - } -); - -export const ASSIGNED_VM_ID = i18n.translate('xpack.siem.auditd.assignedVmIdDescription', { - defaultMessage: 'assigned vm id', -}); - -export const MIGRATED_VM_FROM = i18n.translate('xpack.siem.auditd.migratedVmFromDescription', { - defaultMessage: 'migrated vm from', -}); - -export const MIGRATED_VM_TO = i18n.translate('xpack.siem.auditd.migratedVmToDescription', { - defaultMessage: 'migrated vm to', -}); - -export const ASSIGNED_VM_RESOURCE = i18n.translate( - 'xpack.siem.auditd.assignedVMResourceDescription', - { - defaultMessage: 'assigned vm resource', - } -); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/translations.ts deleted file mode 100644 index 25a23fcfea783..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/renderers/system/translations.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -// Note for translators and programmers -// Examples of these strings are all of the form -// Session {user.name}@{hostname} in {folder} was authorized to use {executable} with result {result.success/failure} -// E.x. Frank@server-1 in /root was authorized to use wget with result success - -// However, the strings can be dropped depending on the circumstances of the variables. For example, with no data at all -// Example with just a user name and hostname -// Session 20 frank@server-1 -// Example with user name, hostname, but no result -// Session 20 frank@server-1 started process curl - -export const SESSION = i18n.translate('xpack.siem.system.systemDescription', { - defaultMessage: 'System', -}); - -export const WITH_RESULT = i18n.translate('xpack.siem.system.withResultDescription', { - defaultMessage: 'with result', -}); - -export const WAS_AUTHORIZED_TO_USE = i18n.translate( - 'xpack.siem.system.wasAuthorizedToUseDescription', - { - defaultMessage: 'was authorized to use', - } -); - -export const ACCEPTED_A_CONNECTION_VIA = i18n.translate( - 'xpack.siem.system.acceptedAConnectionViaDescription', - { - defaultMessage: 'accepted a connection via', - } -); - -export const ATTEMPTED_LOGIN = i18n.translate('xpack.siem.system.attemptedLoginDescription', { - defaultMessage: 'attempted a login via', -}); - -export const DISCONNECTED_VIA = i18n.translate('xpack.siem.system.disconnectedViaDescription', { - defaultMessage: 'disconnected via', -}); - -export const LOGGED_OUT = i18n.translate('xpack.siem.system.loggedOutDescription', { - defaultMessage: 'logged out via', -}); - -export const USING = i18n.translate('xpack.siem.system.usingDescription', { - defaultMessage: 'using', -}); - -export const PROCESS_STARTED = i18n.translate('xpack.siem.system.processStartedDescription', { - defaultMessage: 'started process', -}); - -export const PROCESS_STOPPED = i18n.translate('xpack.siem.system.processStoppedDescription', { - defaultMessage: 'stopped process', -}); - -export const TERMINATED_PROCESS = i18n.translate('xpack.siem.system.terminatedProcessDescription', { - defaultMessage: 'terminated process', -}); - -export const CREATED_FILE = i18n.translate('xpack.siem.system.createdFileDescription', { - defaultMessage: 'created a file', -}); - -export const DELETED_FILE = i18n.translate('xpack.siem.system.deletedFileDescription', { - defaultMessage: 'deleted a file', -}); - -export const EXISTING_PROCESS = i18n.translate('xpack.siem.system.existingProcessDescription', { - defaultMessage: 'is running process', -}); - -export const SOCKET_OPENED = i18n.translate('xpack.siem.system.socketOpenedDescription', { - defaultMessage: 'opened a socket with', -}); - -export const SOCKET_CLOSED = i18n.translate('xpack.siem.system.socketClosedDescription', { - defaultMessage: 'closed a socket with', -}); - -export const EXISTING_USER = i18n.translate('xpack.siem.system.existingUserDescription', { - defaultMessage: 'is an existing user', -}); - -export const EXISTING_SOCKET = i18n.translate('xpack.siem.system.existingSocketDescription', { - defaultMessage: 'is using an existing socket from', -}); - -export const EXISTING_PACKAGE = i18n.translate('xpack.siem.system.existingPackageDescription', { - defaultMessage: 'is using an existing package', -}); - -export const INVALID = i18n.translate('xpack.siem.system.invalidDescription', { - defaultMessage: 'attempted invalid usage of', -}); - -export const USER_CHANGED = i18n.translate('xpack.siem.system.userChangedDescription', { - defaultMessage: 'user has changed', -}); - -export const HOST_CHANGED = i18n.translate('xpack.siem.system.hostDescription', { - defaultMessage: 'host information', -}); - -export const USER_ADDED = i18n.translate('xpack.siem.system.userAddedDescription', { - defaultMessage: 'user was added', -}); - -export const PROCESS_ERROR = i18n.translate('xpack.siem.system.processErrorDescription', { - defaultMessage: 'encountered a process error with', -}); - -export const ERROR = i18n.translate('xpack.siem.system.errorDescription', { - defaultMessage: 'encountered an error with', -}); - -export const PACKAGE_INSTALLED = i18n.translate('xpack.siem.system.packageInstalledDescription', { - defaultMessage: 'installed package', -}); - -export const BOOT = i18n.translate('xpack.siem.system.packageSystemStartedDescription', { - defaultMessage: 'system started', -}); - -export const ACCEPTED = i18n.translate('xpack.siem.system.acceptedDescription', { - defaultMessage: 'accepted the user via', -}); - -export const PACKAGE_UPDATED = i18n.translate('xpack.siem.system.packageUpdatedDescription', { - defaultMessage: 'updated package', -}); - -export const PACKAGE_REMOVED = i18n.translate('xpack.siem.system.packageRemovedDescription', { - defaultMessage: 'removed package', -}); - -export const USER_REMOVED = i18n.translate('xpack.siem.system.userRemovedDescription', { - defaultMessage: 'was removed', -}); - -export const VIA = i18n.translate('xpack.siem.system.viaDescription', { - defaultMessage: 'via', -}); - -export const VIA_PARENT_PROCESS = i18n.translate('xpack.siem.system.viaParentProcessDescription', { - defaultMessage: 'via parent process', -}); - -export const WITH_EXIT_CODE = i18n.translate('xpack.siem.system.withExitCodeDescription', { - defaultMessage: 'with exit code', -}); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/body/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/body/translations.ts deleted file mode 100644 index 03efc26bbc9b1..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/body/translations.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const NOTES_TOOLTIP = i18n.translate( - 'xpack.siem.timeline.body.notes.addOrViewNotesForThisEventTooltip', - { - defaultMessage: 'Add or view notes for this event', - } -); - -export const COPY_TO_CLIPBOARD = i18n.translate( - 'xpack.siem.timeline.body.copyToClipboardButtonLabel', - { - defaultMessage: 'Copy to Clipboard', - } -); - -export const UNPINNED = i18n.translate('xpack.siem.timeline.body.pinning.unpinnedTooltip', { - defaultMessage: 'Unpinned event', -}); - -export const PINNED = i18n.translate('xpack.siem.timeline.body.pinning.pinnedTooltip', { - defaultMessage: 'Pinned event', -}); - -export const PINNED_WITH_NOTES = i18n.translate( - 'xpack.siem.timeline.body.pinning.pinnnedWithNotesTooltip', - { - defaultMessage: 'This event cannot be unpinned because it has notes', - } -); - -export const EXPAND = i18n.translate('xpack.siem.timeline.body.actions.expandAriaLabel', { - defaultMessage: 'Expand', -}); - -export const COLLAPSE = i18n.translate('xpack.siem.timeline.body.actions.collapseAriaLabel', { - defaultMessage: 'Collapse', -}); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/translations.ts deleted file mode 100644 index 56628502f5550..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/data_providers/translations.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const AND = i18n.translate('xpack.siem.dataProviders.and', { - defaultMessage: 'AND', -}); - -export const COPY_TO_CLIPBOARD = i18n.translate('xpack.siem.dataProviders.copyToClipboardTooltip', { - defaultMessage: 'Copy to Clipboard', -}); - -export const DELETE_DATA_PROVIDER = i18n.translate('xpack.siem.dataProviders.deleteDataProvider', { - defaultMessage: 'Delete', -}); -export const DROP_HERE_TO_ADD_AN = i18n.translate('xpack.siem.dataProviders.dropHereToAddAnLabel', { - defaultMessage: 'Drop here to add an', -}); - -export const DROP_HERE = i18n.translate('xpack.siem.dataProviders.dropHere', { - defaultMessage: 'Drop here', -}); - -export const DROP_ANYTHING = i18n.translate('xpack.siem.dataProviders.dropAnything', { - defaultMessage: 'Drop anything', -}); - -export const EDIT = i18n.translate('xpack.siem.dataProviders.edit', { - defaultMessage: 'Edit', -}); - -export const EDIT_MENU_ITEM = i18n.translate('xpack.siem.dataProviders.editMenuItem', { - defaultMessage: 'Edit filter', -}); - -export const EDIT_TITLE = i18n.translate('xpack.siem.dataProviders.editTitle', { - defaultMessage: 'EDIT FILTER', -}); - -export const EXCLUDE_DATA_PROVIDER = i18n.translate( - 'xpack.siem.dataProviders.excludeDataProvider', - { - defaultMessage: 'Exclude results', - } -); - -export const EXISTS_LABEL = i18n.translate('xpack.siem.dataProviders.existsLabel', { - defaultMessage: 'exists', -}); - -export const FIELD = i18n.translate('xpack.siem.dataProviders.fieldLabel', { - defaultMessage: 'Field', -}); - -export const FILTER_FOR_FIELD_PRESENT = i18n.translate( - 'xpack.siem.dataProviders.filterForFieldPresentLabel', - { - defaultMessage: 'Filter for field present', - } -); - -export const HIGHLIGHTED = i18n.translate('xpack.siem.dataProviders.highlighted', { - defaultMessage: 'highlighted', -}); - -export const HERE_TO_BUILD_AN = i18n.translate('xpack.siem.dataProviders.hereToBuildAn', { - defaultMessage: 'here to build an', -}); - -export const TO_BUILD_AN = i18n.translate('xpack.siem.dataProviders.toBuildAn', { - defaultMessage: 'to build an', -}); - -export const INCLUDE_DATA_PROVIDER = i18n.translate( - 'xpack.siem.dataProviders.includeDataProvider', - { - defaultMessage: 'Include results', - } -); - -export const NOT = i18n.translate('xpack.siem.dataProviders.not', { - defaultMessage: 'NOT', -}); - -export const OR = i18n.translate('xpack.siem.dataProviders.or', { - defaultMessage: 'or', -}); - -export const QUERY = i18n.translate('xpack.siem.dataProviders.query', { - defaultMessage: 'query', -}); - -export const TOGGLE = i18n.translate('xpack.siem.dataProviders.toggle', { - defaultMessage: 'toggle', -}); - -export const RE_ENABLE_DATA_PROVIDER = i18n.translate( - 'xpack.siem.dataProviders.reEnableDataProvider', - { - defaultMessage: 'Re-enable', - } -); - -export const REMOVE_DATA_PROVIDER = i18n.translate('xpack.siem.dataProviders.removeDataProvider', { - defaultMessage: 'Remove Data Provider', -}); - -export const SHOW_OPTIONS_DATA_PROVIDER = i18n.translate( - 'xpack.siem.dataProviders.showOptionsDataProvider', - { - defaultMessage: 'Show options for', - } -); - -export const TEMPORARILY_DISABLE_DATA_PROVIDER = i18n.translate( - 'xpack.siem.dataProviders.temporaryDisableDataProvider', - { - defaultMessage: 'Temporarily disable', - } -); - -export const VALUE = i18n.translate('xpack.siem.dataProviders.valuePlaceholder', { - defaultMessage: 'value', -}); - -export const VALUE_ARIA_LABEL = i18n.translate('xpack.siem.dataProviders.valueAriaLabel', { - defaultMessage: 'value', -}); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/footer/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/footer/translations.ts deleted file mode 100644 index 814311d4e14de..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/footer/translations.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const LOADING_TIMELINE_DATA = i18n.translate('xpack.siem.footer.loadingTimelineData', { - defaultMessage: 'Loading Timeline data', -}); - -export const EVENTS = i18n.translate('xpack.siem.footer.events', { - defaultMessage: 'Events', -}); - -export const OF = i18n.translate('xpack.siem.footer.of', { - defaultMessage: 'of', -}); - -export const ROWS = i18n.translate('xpack.siem.footer.rows', { - defaultMessage: 'rows', -}); - -export const LOADING = i18n.translate('xpack.siem.footer.loadingLabel', { - defaultMessage: 'Loading', -}); - -export const LOAD_MORE = i18n.translate('xpack.siem.footer.loadMoreLabel', { - defaultMessage: 'Load more', -}); - -export const TOTAL_COUNT_OF_EVENTS = i18n.translate('xpack.siem.footer.totalCountOfEvents', { - defaultMessage: 'events match the search criteria', -}); - -export const UPDATED = i18n.translate('xpack.siem.footer.updated', { - defaultMessage: 'Updated', -}); - -export const AUTO_REFRESH_ACTIVE = i18n.translate( - 'xpack.siem.footer.autoRefreshActiveDescription', - { - defaultMessage: 'Auto-Refresh Active', - } -); diff --git a/x-pack/plugins/siem/public/timelines/components/timeline/properties/translations.ts b/x-pack/plugins/siem/public/timelines/components/timeline/properties/translations.ts deleted file mode 100644 index a0783a327ed17..0000000000000 --- a/x-pack/plugins/siem/public/timelines/components/timeline/properties/translations.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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 { i18n } from '@kbn/i18n'; - -export const TIMELINE_DESCRIPTION = i18n.translate( - 'xpack.siem.timeline.properties.timelineDescription', - { - defaultMessage: 'Timeline Description', - } -); - -export const TITLE = i18n.translate('xpack.siem.timeline.properties.titleTitle', { - defaultMessage: 'Title', -}); - -export const FAVORITE = i18n.translate('xpack.siem.timeline.properties.favoriteTooltip', { - defaultMessage: 'Favorite', -}); - -export const NOT_A_FAVORITE = i18n.translate('xpack.siem.timeline.properties.notAFavoriteTooltip', { - defaultMessage: 'Not a Favorite', -}); - -export const TIMELINE_TITLE = i18n.translate( - 'xpack.siem.timeline.properties.timelineTitleAriaLabel', - { - defaultMessage: 'Timeline title', - } -); - -export const INSPECT_TIMELINE_TITLE = i18n.translate( - 'xpack.siem.timeline.properties.inspectTimelineTitle', - { - defaultMessage: 'Timeline', - } -); - -export const UNTITLED_TIMELINE = i18n.translate( - 'xpack.siem.timeline.properties.untitledTimelinePlaceholder', - { - defaultMessage: 'Untitled timeline', - } -); - -export const DESCRIPTION = i18n.translate('xpack.siem.timeline.properties.descriptionPlaceholder', { - defaultMessage: 'Description', -}); - -export const DESCRIPTION_TOOL_TIP = i18n.translate( - 'xpack.siem.timeline.properties.descriptionTooltip', - { - defaultMessage: 'A summary of the events and notes in this Timeline', - } -); - -export const HISTORY = i18n.translate('xpack.siem.timeline.properties.historyLabel', { - defaultMessage: 'History', -}); - -export const IS_VIEWING = i18n.translate('xpack.siem.timeline.properties.isViewingTooltip', { - defaultMessage: 'is viewing this Timeline', -}); - -export const NOTES = i18n.translate('xpack.siem.timeline.properties.notesButtonLabel', { - defaultMessage: 'Notes', -}); - -export const NOTES_TOOL_TIP = i18n.translate('xpack.siem.timeline.properties.notesToolTip', { - defaultMessage: 'Add and review notes about this Timeline. Notes may also be added to events.', -}); - -export const HISTORY_TOOL_TIP = i18n.translate('xpack.siem.timeline.properties.historyToolTip', { - defaultMessage: 'The chronological history of actions related to this timeline', -}); - -export const STREAM_LIVE_TOOL_TIP = i18n.translate( - 'xpack.siem.timeline.properties.streamLiveToolTip', - { - defaultMessage: 'Update the Timeline as new data arrives', - } -); - -export const NEW_TIMELINE = i18n.translate( - 'xpack.siem.timeline.properties.newTimelineButtonLabel', - { - defaultMessage: 'Create new timeline', - } -); - -export const ATTACH_TIMELINE_TO_NEW_CASE = i18n.translate( - 'xpack.siem.timeline.properties.newCaseButtonLabel', - { - defaultMessage: 'Attach timeline to new case', - } -); - -export const STREAM_LIVE = i18n.translate('xpack.siem.timeline.properties.streamLiveButtonLabel', { - defaultMessage: 'Stream Live', -}); - -export const LOCK_SYNC_MAIN_DATE_PICKER_TOOL_TIP = i18n.translate( - 'xpack.siem.timeline.properties.lockDatePickerTooltip', - { - defaultMessage: - 'Disable syncing of date/time range between the currently viewed page and your timeline', - } -); - -export const UNLOCK_SYNC_MAIN_DATE_PICKER_TOOL_TIP = i18n.translate( - 'xpack.siem.timeline.properties.unlockDatePickerTooltip', - { - defaultMessage: - 'Enable syncing of date/time range between the currently viewed page and your timeline', - } -); - -export const LOCK_SYNC_MAIN_DATE_PICKER_ARIA = i18n.translate( - 'xpack.siem.timeline.properties.lockDatePickerDescription', - { - defaultMessage: 'Lock date picker to global date picker', - } -); - -export const UNLOCK_SYNC_MAIN_DATE_PICKER_ARIA = i18n.translate( - 'xpack.siem.timeline.properties.unlockDatePickerDescription', - { - defaultMessage: 'Unlock date picker to global date picker', - } -); diff --git a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/stats.ts b/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/stats.ts deleted file mode 100644 index a1bab707879a5..0000000000000 --- a/x-pack/plugins/siem/server/endpoint/routes/resolver/queries/stats.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * 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 { SearchResponse } from 'elasticsearch'; -import { ResolverQuery } from './base'; -import { ResolverEvent } from '../../../../../common/endpoint/types'; -import { JsonObject } from '../../../../../../../../src/plugins/kibana_utils/public'; -import { AggBucket } from '../utils/pagination'; - -export interface StatsResult { - alerts: Record; - events: Record; -} - -export class StatsQuery extends ResolverQuery { - protected legacyQuery(endpointID: string, uniquePIDs: string[]): JsonObject { - return { - size: 0, - query: { - bool: { - filter: [ - { - term: { 'agent.id': endpointID }, - }, - { - bool: { - should: [ - { - bool: { - filter: [ - { term: { 'event.kind': 'event' } }, - { terms: { 'endgame.unique_pid': uniquePIDs } }, - { - bool: { - must_not: { - term: { 'event.category': 'process' }, - }, - }, - }, - ], - }, - }, - { - bool: { - filter: [ - { term: { 'event.kind': 'alert' } }, - { - terms: { - 'endgame.data.alert_details.acting_process.unique_pid': uniquePIDs, - }, - }, - ], - }, - }, - ], - }, - }, - ], - }, - }, - aggs: { - alerts: { - filter: { term: { 'event.kind': 'alert' } }, - aggs: { - ids: { terms: { field: 'endgame.data.alert_details.acting_process.unique_pid' } }, - }, - }, - events: { - filter: { term: { 'event.kind': 'event' } }, - aggs: { - ids: { terms: { field: 'endgame.unique_pid' } }, - }, - }, - }, - }; - } - - protected query(entityIDs: string[]): JsonObject { - return { - size: 0, - query: { - bool: { - filter: [ - { terms: { 'process.entity_id': entityIDs } }, - { - bool: { - should: [ - { - bool: { - filter: [ - { term: { 'event.kind': 'event' } }, - { - bool: { - must_not: { - term: { 'event.category': 'process' }, - }, - }, - }, - ], - }, - }, - { term: { 'event.kind': 'alert' } }, - ], - }, - }, - ], - }, - }, - aggs: { - alerts: { - filter: { term: { 'event.kind': 'alert' } }, - aggs: { - ids: { terms: { field: 'process.entity_id' } }, - }, - }, - events: { - filter: { term: { 'event.kind': 'event' } }, - aggs: { - ids: { terms: { field: 'process.entity_id' } }, - }, - }, - }, - }; - } - - public formatResponse(response: SearchResponse): StatsResult { - const alerts = response.aggregations.alerts.ids.buckets.reduce( - (cummulative: Record, bucket: AggBucket) => ({ - ...cummulative, - [bucket.key]: bucket.doc_count, - }), - {} - ); - const events = response.aggregations.events.ids.buckets.reduce( - (cummulative: Record, bucket: AggBucket) => ({ - ...cummulative, - [bucket.key]: bucket.doc_count, - }), - {} - ); - return { - alerts, - events, - }; - } -} diff --git a/x-pack/plugins/spaces/server/spaces_service/spaces_service.ts b/x-pack/plugins/spaces/server/spaces_service/spaces_service.ts index 759b0606a5e8b..cf181a78efcb8 100644 --- a/x-pack/plugins/spaces/server/spaces_service/spaces_service.ts +++ b/x-pack/plugins/spaces/server/spaces_service/spaces_service.ts @@ -68,14 +68,18 @@ export class SpacesService { return spaceId; }; + const internalRepositoryPromise = getStartServices().then(([coreStart]) => + coreStart.savedObjects.createInternalRepository(['space']) + ); + const getScopedClient = async (request: KibanaRequest) => { const [coreStart] = await getStartServices(); + const internalRepository = await internalRepositoryPromise; return config$ .pipe( + take(1), map((config) => { - const internalRepository = coreStart.savedObjects.createInternalRepository(['space']); - const callWithRequestRepository = coreStart.savedObjects.createScopedRepository( request, ['space'] @@ -92,8 +96,7 @@ export class SpacesService { internalRepository, request ); - }), - take(1) + }) ) .toPromise(); }; diff --git a/x-pack/plugins/transform/public/app/common/pivot_aggs.test.ts b/x-pack/plugins/transform/public/app/common/pivot_aggs.test.ts new file mode 100644 index 0000000000000..ab00211313d62 --- /dev/null +++ b/x-pack/plugins/transform/public/app/common/pivot_aggs.test.ts @@ -0,0 +1,47 @@ +/* + * 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 { getAggConfigFromEsAgg } from './pivot_aggs'; +import { + FilterAggForm, + FilterTermForm, +} from '../sections/create_transform/components/step_define/common/filter_agg/components'; + +describe('getAggConfigFromEsAgg', () => { + test('should throw an error for unsupported agg', () => { + expect(() => getAggConfigFromEsAgg({ terms: {} }, 'test')).toThrowError(); + }); + + test('should return a common config if the agg does not have a custom config defined', () => { + expect(getAggConfigFromEsAgg({ avg: { field: 'region' } }, 'test_1')).toEqual({ + agg: 'avg', + aggName: 'test_1', + dropDownName: 'test_1', + field: 'region', + }); + }); + + test('should return a custom config for recognized aggregation type', () => { + expect( + getAggConfigFromEsAgg({ filter: { term: { region: 'sa-west-1' } } }, 'test_2') + ).toMatchObject({ + agg: 'filter', + aggName: 'test_2', + dropDownName: 'test_2', + field: 'region', + AggFormComponent: FilterAggForm, + aggConfig: { + filterAgg: 'term', + aggTypeConfig: { + FilterAggFormComponent: FilterTermForm, + filterAggConfig: { + value: 'sa-west-1', + }, + }, + }, + }); + }); +}); diff --git a/x-pack/plugins/transform/public/app/common/pivot_aggs.ts b/x-pack/plugins/transform/public/app/common/pivot_aggs.ts index 35dad3a8b2153..d6b3fb974783d 100644 --- a/x-pack/plugins/transform/public/app/common/pivot_aggs.ts +++ b/x-pack/plugins/transform/public/app/common/pivot_aggs.ts @@ -4,36 +4,51 @@ * you may not use this file except in compliance with the Elastic License. */ +import { FC } from 'react'; import { Dictionary } from '../../../common/types/common'; import { KBN_FIELD_TYPES } from '../../../../../../src/plugins/data/common'; import { AggName } from './aggregations'; import { EsFieldName } from './fields'; +import { getAggFormConfig } from '../sections/create_transform/components/step_define/common/get_agg_form_config'; +import { PivotAggsConfigFilter } from '../sections/create_transform/components/step_define/common/filter_agg/types'; -export enum PIVOT_SUPPORTED_AGGS { - AVG = 'avg', - CARDINALITY = 'cardinality', - MAX = 'max', - MIN = 'min', - PERCENTILES = 'percentiles', - SUM = 'sum', - VALUE_COUNT = 'value_count', +export type PivotSupportedAggs = typeof PIVOT_SUPPORTED_AGGS[keyof typeof PIVOT_SUPPORTED_AGGS]; + +export function isPivotSupportedAggs(arg: any): arg is PivotSupportedAggs { + return Object.values(PIVOT_SUPPORTED_AGGS).includes(arg); } +export const PIVOT_SUPPORTED_AGGS = { + AVG: 'avg', + CARDINALITY: 'cardinality', + MAX: 'max', + MIN: 'min', + PERCENTILES: 'percentiles', + SUM: 'sum', + VALUE_COUNT: 'value_count', + FILTER: 'filter', +} as const; + export const PERCENTILES_AGG_DEFAULT_PERCENTS = [1, 5, 25, 50, 75, 95, 99]; export const pivotAggsFieldSupport = { - [KBN_FIELD_TYPES.ATTACHMENT]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES.BOOLEAN]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], + [KBN_FIELD_TYPES.ATTACHMENT]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], + [KBN_FIELD_TYPES.BOOLEAN]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], [KBN_FIELD_TYPES.DATE]: [ PIVOT_SUPPORTED_AGGS.MAX, PIVOT_SUPPORTED_AGGS.MIN, PIVOT_SUPPORTED_AGGS.VALUE_COUNT, + PIVOT_SUPPORTED_AGGS.FILTER, + ], + [KBN_FIELD_TYPES.GEO_POINT]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], + [KBN_FIELD_TYPES.GEO_SHAPE]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], + [KBN_FIELD_TYPES.IP]: [ + PIVOT_SUPPORTED_AGGS.CARDINALITY, + PIVOT_SUPPORTED_AGGS.VALUE_COUNT, + PIVOT_SUPPORTED_AGGS.FILTER, ], - [KBN_FIELD_TYPES.GEO_POINT]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES.GEO_SHAPE]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES.IP]: [PIVOT_SUPPORTED_AGGS.CARDINALITY, PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES.MURMUR3]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], + [KBN_FIELD_TYPES.MURMUR3]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], [KBN_FIELD_TYPES.NUMBER]: [ PIVOT_SUPPORTED_AGGS.AVG, PIVOT_SUPPORTED_AGGS.CARDINALITY, @@ -42,38 +57,102 @@ export const pivotAggsFieldSupport = { PIVOT_SUPPORTED_AGGS.PERCENTILES, PIVOT_SUPPORTED_AGGS.SUM, PIVOT_SUPPORTED_AGGS.VALUE_COUNT, + PIVOT_SUPPORTED_AGGS.FILTER, + ], + [KBN_FIELD_TYPES.STRING]: [ + PIVOT_SUPPORTED_AGGS.CARDINALITY, + PIVOT_SUPPORTED_AGGS.VALUE_COUNT, + PIVOT_SUPPORTED_AGGS.FILTER, ], - [KBN_FIELD_TYPES.STRING]: [PIVOT_SUPPORTED_AGGS.CARDINALITY, PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES._SOURCE]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES.UNKNOWN]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], - [KBN_FIELD_TYPES.CONFLICT]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT], + [KBN_FIELD_TYPES._SOURCE]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], + [KBN_FIELD_TYPES.UNKNOWN]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], + [KBN_FIELD_TYPES.CONFLICT]: [PIVOT_SUPPORTED_AGGS.VALUE_COUNT, PIVOT_SUPPORTED_AGGS.FILTER], }; export type PivotAgg = { - [key in PIVOT_SUPPORTED_AGGS]?: { + [key in PivotSupportedAggs]?: { field: EsFieldName; }; }; -export type PivotAggDict = { [key in AggName]: PivotAgg }; +export type PivotAggDict = { + [key in AggName]: PivotAgg; +}; // The internal representation of an aggregation definition. export interface PivotAggsConfigBase { - agg: PIVOT_SUPPORTED_AGGS; + agg: PivotSupportedAggs; aggName: AggName; dropDownName: string; } -interface PivotAggsConfigWithUiBase extends PivotAggsConfigBase { +/** + * Resolves agg UI config from provided ES agg definition + */ +export function getAggConfigFromEsAgg(esAggDefinition: Record, aggName: string) { + const aggKeys = Object.keys(esAggDefinition); + + // Find the main aggregation key + const agg = aggKeys.find((aggKey) => aggKey !== 'aggs'); + + if (!isPivotSupportedAggs(agg)) { + throw new Error(`Aggregation "${agg}" is not supported`); + } + + const commonConfig: PivotAggsConfigBase = { + ...esAggDefinition[agg], + agg, + aggName, + dropDownName: aggName, + }; + + const config = getAggFormConfig(agg, commonConfig); + + if (isPivotAggsWithExtendedForm(config)) { + config.setUiConfigFromEs(esAggDefinition[agg]); + } + + if (aggKeys.includes('aggs')) { + // TODO process sub-aggregation + } + + return config; +} + +export interface PivotAggsConfigWithUiBase extends PivotAggsConfigBase { field: EsFieldName; } +export interface PivotAggsConfigWithExtra extends PivotAggsConfigWithUiBase { + /** Form component */ + AggFormComponent: FC<{ + aggConfig: Partial; + onChange: (arg: Partial) => void; + selectedField: string; + }>; + /** Aggregation specific configuration */ + aggConfig: Partial; + /** Set UI configuration from ES aggregation definition */ + setUiConfigFromEs: (arg: { [key: string]: any }) => void; + /** Converts UI agg config form to ES agg request object */ + getEsAggConfig: () => { [key: string]: any } | null; + /** Indicates if the configuration is valid */ + isValid: () => boolean; + /** Provides aggregation name generated based on the configuration */ + getAggName?: () => string | undefined; + /** Helper text for the aggregation reflecting some configuration info */ + helperText?: () => string | undefined; +} + interface PivotAggsConfigPercentiles extends PivotAggsConfigWithUiBase { - agg: PIVOT_SUPPORTED_AGGS.PERCENTILES; + agg: typeof PIVOT_SUPPORTED_AGGS.PERCENTILES; percents: number[]; } -export type PivotAggsConfigWithUiSupport = PivotAggsConfigWithUiBase | PivotAggsConfigPercentiles; +export type PivotAggsConfigWithUiSupport = + | PivotAggsConfigWithUiBase + | PivotAggsConfigPercentiles + | PivotAggsConfigWithExtendedForm; export function isPivotAggsConfigWithUiSupport(arg: any): arg is PivotAggsConfigWithUiSupport { return ( @@ -81,10 +160,19 @@ export function isPivotAggsConfigWithUiSupport(arg: any): arg is PivotAggsConfig arg.hasOwnProperty('aggName') && arg.hasOwnProperty('dropDownName') && arg.hasOwnProperty('field') && - Object.values(PIVOT_SUPPORTED_AGGS).includes(arg.agg) + isPivotSupportedAggs(arg.agg) ); } +/** + * Union type for agg configs with extended forms + */ +type PivotAggsConfigWithExtendedForm = PivotAggsConfigFilter; + +export function isPivotAggsWithExtendedForm(arg: any): arg is PivotAggsConfigWithExtendedForm { + return arg.hasOwnProperty('AggFormComponent'); +} + export function isPivotAggsConfigPercentiles(arg: any): arg is PivotAggsConfigPercentiles { return ( arg.hasOwnProperty('agg') && @@ -99,14 +187,28 @@ export type PivotAggsConfig = PivotAggsConfigBase | PivotAggsConfigWithUiSupport export type PivotAggsConfigWithUiSupportDict = Dictionary; export type PivotAggsConfigDict = Dictionary; -export function getEsAggFromAggConfig(groupByConfig: PivotAggsConfigBase): PivotAgg { - const esAgg = { ...groupByConfig }; +/** + * Extracts Elasticsearch-ready aggregation configuration + * from the UI config + */ +export function getEsAggFromAggConfig( + pivotAggsConfig: PivotAggsConfigBase | PivotAggsConfigWithExtendedForm +): PivotAgg | null { + let esAgg: { [key: string]: any } | null = { ...pivotAggsConfig }; delete esAgg.agg; delete esAgg.aggName; delete esAgg.dropDownName; + if (isPivotAggsWithExtendedForm(pivotAggsConfig)) { + esAgg = pivotAggsConfig.getEsAggConfig(); + + if (esAgg === null) { + return null; + } + } + return { - [groupByConfig.agg]: esAgg, + [pivotAggsConfig.agg]: esAgg, }; } diff --git a/x-pack/plugins/transform/public/app/common/request.ts b/x-pack/plugins/transform/public/app/common/request.ts index 99c68cf37b44c..9a0084c2ebffb 100644 --- a/x-pack/plugins/transform/public/app/common/request.ts +++ b/x-pack/plugins/transform/public/app/common/request.ts @@ -115,7 +115,11 @@ export function getPreviewRequestBody( }); aggs.forEach((agg) => { - request.pivot.aggregations[agg.aggName] = getEsAggFromAggConfig(agg); + const result = getEsAggFromAggConfig(agg); + if (result === null) { + return; + } + request.pivot.aggregations[agg.aggName] = result; }); return request; diff --git a/x-pack/plugins/transform/public/app/hooks/use_api.ts b/x-pack/plugins/transform/public/app/hooks/use_api.ts index 466575a99b2b4..f3c35d358f1f2 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_api.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_api.ts @@ -4,7 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { TransformId, TransformEndpointRequest, TransformEndpointResult } from '../../../common'; +import { useMemo } from 'react'; +import { TransformEndpointRequest, TransformEndpointResult, TransformId } from '../../../common'; import { API_BASE_PATH } from '../../../common/constants'; import { useAppDependencies } from '../app_dependencies'; @@ -15,54 +16,61 @@ import { EsIndex } from './use_api_types'; export const useApi = () => { const { http } = useAppDependencies(); - return { - getTransforms(transformId?: TransformId): Promise { - const transformIdString = transformId !== undefined ? `/${transformId}` : ''; - return http.get(`${API_BASE_PATH}transforms${transformIdString}`); - }, - getTransformsStats(transformId?: TransformId): Promise { - if (transformId !== undefined) { - return http.get(`${API_BASE_PATH}transforms/${transformId}/_stats`); - } + return useMemo( + () => ({ + getTransforms(transformId?: TransformId): Promise { + const transformIdString = transformId !== undefined ? `/${transformId}` : ''; + return http.get(`${API_BASE_PATH}transforms${transformIdString}`); + }, + getTransformsStats(transformId?: TransformId): Promise { + if (transformId !== undefined) { + return http.get(`${API_BASE_PATH}transforms/${transformId}/_stats`); + } - return http.get(`${API_BASE_PATH}transforms/_stats`); - }, - createTransform(transformId: TransformId, transformConfig: any): Promise { - return http.put(`${API_BASE_PATH}transforms/${transformId}`, { - body: JSON.stringify(transformConfig), - }); - }, - updateTransform(transformId: TransformId, transformConfig: any): Promise { - return http.post(`${API_BASE_PATH}transforms/${transformId}/_update`, { - body: JSON.stringify(transformConfig), - }); - }, - deleteTransforms(transformsInfo: TransformEndpointRequest[]): Promise { - return http.post(`${API_BASE_PATH}delete_transforms`, { - body: JSON.stringify(transformsInfo), - }); - }, - getTransformsPreview(obj: PreviewRequestBody): Promise { - return http.post(`${API_BASE_PATH}transforms/_preview`, { body: JSON.stringify(obj) }); - }, - startTransforms(transformsInfo: TransformEndpointRequest[]): Promise { - return http.post(`${API_BASE_PATH}start_transforms`, { - body: JSON.stringify(transformsInfo), - }); - }, - stopTransforms(transformsInfo: TransformEndpointRequest[]): Promise { - return http.post(`${API_BASE_PATH}stop_transforms`, { - body: JSON.stringify(transformsInfo), - }); - }, - getTransformAuditMessages(transformId: TransformId): Promise { - return http.get(`${API_BASE_PATH}transforms/${transformId}/messages`); - }, - esSearch(payload: any): Promise { - return http.post(`${API_BASE_PATH}es_search`, { body: JSON.stringify(payload) }); - }, - getIndices(): Promise { - return http.get(`/api/index_management/indices`); - }, - }; + return http.get(`${API_BASE_PATH}transforms/_stats`); + }, + createTransform(transformId: TransformId, transformConfig: any): Promise { + return http.put(`${API_BASE_PATH}transforms/${transformId}`, { + body: JSON.stringify(transformConfig), + }); + }, + updateTransform(transformId: TransformId, transformConfig: any): Promise { + return http.post(`${API_BASE_PATH}transforms/${transformId}/_update`, { + body: JSON.stringify(transformConfig), + }); + }, + deleteTransforms( + transformsInfo: TransformEndpointRequest[] + ): Promise { + return http.post(`${API_BASE_PATH}delete_transforms`, { + body: JSON.stringify(transformsInfo), + }); + }, + getTransformsPreview(obj: PreviewRequestBody): Promise { + return http.post(`${API_BASE_PATH}transforms/_preview`, { body: JSON.stringify(obj) }); + }, + startTransforms( + transformsInfo: TransformEndpointRequest[] + ): Promise { + return http.post(`${API_BASE_PATH}start_transforms`, { + body: JSON.stringify(transformsInfo), + }); + }, + stopTransforms(transformsInfo: TransformEndpointRequest[]): Promise { + return http.post(`${API_BASE_PATH}stop_transforms`, { + body: JSON.stringify(transformsInfo), + }); + }, + getTransformAuditMessages(transformId: TransformId): Promise { + return http.get(`${API_BASE_PATH}transforms/${transformId}/messages`); + }, + esSearch(payload: any): Promise { + return http.post(`${API_BASE_PATH}es_search`, { body: JSON.stringify(payload) }); + }, + getIndices(): Promise { + return http.get(`/api/index_management/indices`); + }, + }), + [http] + ); }; diff --git a/x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts b/x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts index fdd19d75eab46..6266defc01e16 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts @@ -35,6 +35,7 @@ import { import { SearchItems } from './use_search_items'; import { useApi } from './use_api'; +import { isPivotAggsWithExtendedForm } from '../common/pivot_aggs'; function sortColumns(groupByArr: PivotGroupByConfig[]) { return (a: string, b: string) => { @@ -135,6 +136,14 @@ export const usePivotData = ( return; } + const isConfigInvalid = aggsArr.some( + (agg) => isPivotAggsWithExtendedForm(agg) && !agg.isValid() + ); + + if (isConfigInvalid) { + return; + } + setErrorMessage(''); setNoDataMessage(''); setStatus(INDEX_STATUS.LOADING); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/popover_form.test.tsx.snap b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/popover_form.test.tsx.snap index 24a8144a65ab2..5f74967ff423c 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/popover_form.test.tsx.snap +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/popover_form.test.tsx.snap @@ -2,6 +2,7 @@ exports[`Transform: Aggregation Minimal initialization 1`] = ` Minimal initialization 1`] = ` labelType="label" > Minimal initialization 1`] = ` labelType="label" > diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/agg_label_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/agg_label_form.tsx index cf3cd24c0439c..a7ff943e0323f 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/agg_label_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/agg_label_form.tsx @@ -8,11 +8,12 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiPopover } from '@elastic/eui'; +import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiPopover, EuiTextColor } from '@elastic/eui'; import { AggName, PivotAggsConfig, PivotAggsConfigWithUiSupportDict } from '../../../../common'; import { PopoverForm } from './popover_form'; +import { isPivotAggsWithExtendedForm } from '../../../../common/pivot_aggs'; interface Props { item: PivotAggsConfig; @@ -29,13 +30,17 @@ export const AggLabelForm: React.FC = ({ onChange, options, }) => { - const [isPopoverVisible, setPopoverVisibility] = useState(false); + const [isPopoverVisible, setPopoverVisibility] = useState( + isPivotAggsWithExtendedForm(item) && !item.isValid() + ); function update(updateItem: PivotAggsConfig) { onChange({ ...updateItem }); setPopoverVisibility(false); } + const helperText = isPivotAggsWithExtendedForm(item) && item.helperText && item.helperText(); + return ( @@ -43,6 +48,17 @@ export const AggLabelForm: React.FC = ({ {item.aggName} + {helperText && ( + + + {helperText} + + + )} = ({ defaultData, otherAggNames, onChange, options }) => { - const isUnsupportedAgg = !isPivotAggsConfigWithUiSupport(defaultData); + const [aggConfigDef, setAggConfigDef] = useState(cloneDeep(defaultData)); const [aggName, setAggName] = useState(defaultData.aggName); const [agg, setAgg] = useState(defaultData.agg); const [field, setField] = useState( isPivotAggsConfigWithUiSupport(defaultData) ? defaultData.field : '' ); + const [percents, setPercents] = useState(getDefaultPercents(defaultData)); - const availableFields: SelectOption[] = []; - const availableAggs: SelectOption[] = []; + const isUnsupportedAgg = !isPivotAggsConfigWithUiSupport(defaultData); + + // Update configuration based on the aggregation type + useEffect(() => { + if (agg === aggConfigDef.agg) return; + const config = getAggFormConfig(agg, { + agg, + aggName, + dropDownName: aggName, + field, + }); + setAggConfigDef(config); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [agg]); + + useUpdateEffect(() => { + if (isPivotAggsWithExtendedForm(aggConfigDef)) { + const name = aggConfigDef.getAggName ? aggConfigDef.getAggName() : undefined; + if (name !== undefined) { + setAggName(name); + } + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [aggConfigDef]); - function updateAgg(aggVal: PIVOT_SUPPORTED_AGGS) { + const availableFields: EuiSelectOption[] = []; + const availableAggs: EuiSelectOption[] = []; + + function updateAgg(aggVal: PivotSupportedAggs) { setAgg(aggVal); if (aggVal === PIVOT_SUPPORTED_AGGS.PERCENTILES && percents === undefined) { setPercents(PERCENTILES_AGG_DEFAULT_PERCENTS); @@ -95,9 +122,9 @@ export const PopoverForm: React.FC = ({ defaultData, otherAggNames, onCha function getUpdatedItem(): PivotAggsConfig { let updatedItem: PivotAggsConfig; - if (agg !== PIVOT_SUPPORTED_AGGS.PERCENTILES) { updatedItem = { + ...aggConfigDef, agg, aggName, field, @@ -159,9 +186,12 @@ export const PopoverForm: React.FC = ({ defaultData, otherAggNames, onCha if (formValid && agg === PIVOT_SUPPORTED_AGGS.PERCENTILES) { formValid = validPercents; } + if (isPivotAggsWithExtendedForm(aggConfigDef)) { + formValid = validAggName && aggConfigDef.isValid(); + } return ( - + = ({ defaultData, otherAggNames, onCha })} > setAggName(e.target.value)} + data-test-subj="transformAggName" /> - {availableAggs.length > 0 && ( + {availableFields.length > 0 && ( updateAgg(e.target.value as PIVOT_SUPPORTED_AGGS)} + options={availableFields} + value={field} + onChange={(e) => setField(e.target.value)} + data-test-subj="transformAggField" /> )} - {availableFields.length > 0 && ( + {availableAggs.length > 0 && ( setField(e.target.value)} + options={availableAggs} + value={agg} + onChange={(e) => updateAgg(e.target.value as PivotSupportedAggs)} + data-test-subj="transformAggType" /> )} + {isPivotAggsWithExtendedForm(aggConfigDef) && ( + { + setAggConfigDef({ + ...aggConfigDef, + aggConfig: update, + }); + }} + /> + )} {agg === PIVOT_SUPPORTED_AGGS.PERCENTILES && ( = ({ defaultData, otherAggNames, onCha /> )} - onChange(getUpdatedItem())}> + onChange(getUpdatedItem())} + data-test-subj="transformApplyAggChanges" + > {i18n.translate('xpack.transform.agg.popoverForm.submitButtonLabel', { defaultMessage: 'Apply', })} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/apply_transform_config_to_define_state.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/apply_transform_config_to_define_state.ts index bda1efe97837f..fba703b1540f9 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/apply_transform_config_to_define_state.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/apply_transform_config_to_define_state.ts @@ -13,12 +13,12 @@ import { PivotGroupByConfig, PivotGroupByConfigDict, TransformPivotConfig, - PIVOT_SUPPORTED_AGGS, PIVOT_SUPPORTED_GROUP_BY_AGGS, } from '../../../../../common'; import { Dictionary } from '../../../../../../../common/types/common'; import { StepDefineExposedState } from './types'; +import { getAggConfigFromEsAgg, PivotSupportedAggs } from '../../../../../common/pivot_aggs'; export function applyTransformConfigToDefineState( state: StepDefineExposedState, @@ -28,14 +28,10 @@ export function applyTransformConfigToDefineState( if (transformConfig !== undefined) { // transform aggregations config to wizard state state.aggList = Object.keys(transformConfig.pivot.aggregations).reduce((aggList, aggName) => { - const aggConfig = transformConfig.pivot.aggregations[aggName] as Dictionary; - const agg = Object.keys(aggConfig)[0]; - aggList[aggName] = { - ...aggConfig[agg], - agg: agg as PIVOT_SUPPORTED_AGGS, - aggName, - dropDownName: aggName, - } as PivotAggsConfig; + const aggConfig = transformConfig.pivot.aggregations[ + aggName as PivotSupportedAggs + ] as Dictionary; + aggList[aggName] = getAggConfigFromEsAgg(aggConfig, aggName) as PivotAggsConfig; return aggList; }, {} as PivotAggsConfigDict); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts index 4fac3dce3de44..802e17cf156ce 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/common.test.ts @@ -6,6 +6,7 @@ import { getPivotDropdownOptions } from '../common'; import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public'; +import { FilterAggForm } from './filter_agg/components'; describe('Transform: Define Pivot Common', () => { test('getPivotDropdownOptions()', () => { @@ -28,7 +29,7 @@ describe('Transform: Define Pivot Common', () => { const options = getPivotDropdownOptions(indexPattern); - expect(options).toEqual({ + expect(options).toMatchObject({ aggOptions: [ { label: ' the-f[i]e>ld ', @@ -40,6 +41,7 @@ describe('Transform: Define Pivot Common', () => { { label: 'percentiles( the-f[i]e>ld )' }, { label: 'sum( the-f[i]e>ld )' }, { label: 'value_count( the-f[i]e>ld )' }, + { label: 'filter( the-f[i]e>ld )' }, ], }, ], @@ -75,6 +77,13 @@ describe('Transform: Define Pivot Common', () => { dropDownName: 'percentiles( the-f[i]e>ld )', percents: [1, 5, 25, 50, 75, 95, 99], }, + 'filter( the-f[i]e>ld )': { + agg: 'filter', + field: ' the-f[i]e>ld ', + aggName: 'the-field.filter', + dropDownName: 'filter( the-f[i]e>ld )', + AggFormComponent: FilterAggForm, + }, 'sum( the-f[i]e>ld )': { agg: 'sum', field: ' the-f[i]e>ld ', diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/editor_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/editor_form.tsx new file mode 100644 index 0000000000000..c8adfa0f78d67 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/editor_form.tsx @@ -0,0 +1,30 @@ +/* + * 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 from 'react'; +import { EuiCodeEditor, EuiSpacer } from '@elastic/eui'; +import { FilterAggConfigEditor } from '../types'; + +export const FilterEditorForm: FilterAggConfigEditor['aggTypeConfig']['FilterAggFormComponent'] = ({ + config, + onChange, +}) => { + return ( + <> + + { + onChange({ config: d }); + }} + mode="json" + style={{ width: '100%' }} + theme="textmate" + height="300px" + /> + + ); +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.test.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.test.tsx new file mode 100644 index 0000000000000..7e23e799ae32e --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.test.tsx @@ -0,0 +1,163 @@ +/* + * 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 { render, fireEvent } from '@testing-library/react'; +import React from 'react'; +import { I18nProvider } from '@kbn/i18n/react'; +import { FilterAggForm } from './filter_agg_form'; +import { CreateTransformWizardContext } from '../../../../wizard/wizard'; +import { KBN_FIELD_TYPES } from '../../../../../../../../../../../../src/plugins/data/common'; +import { IndexPattern } from '../../../../../../../../../../../../src/plugins/data/public'; +import { FilterTermForm } from './filter_term_form'; + +describe('FilterAggForm', () => { + const indexPattern = ({ + fields: { + getByName: jest.fn((fieldName: string) => { + if (fieldName === 'test_text_field') { + return { + type: KBN_FIELD_TYPES.STRING, + }; + } + if (fieldName === 'test_number_field') { + return { + type: KBN_FIELD_TYPES.NUMBER, + }; + } + }), + }, + } as unknown) as IndexPattern; + + test('should render only select dropdown on empty configuration', async () => { + const onChange = jest.fn(); + + const { getByLabelText, findByTestId, container } = render( + + + + + + ); + + expect(getByLabelText('Filter agg')).toBeInTheDocument(); + + const { options } = (await findByTestId('transformFilterAggTypeSelector')) as HTMLSelectElement; + + expect(container.childElementCount).toBe(1); + + expect(options.length).toBe(4); + expect(options[0].value).toBe(''); + expect(options[0].selected).toBe(true); + expect(options[1].value).toBe('bool'); + expect(options[2].value).toBe('exists'); + expect(options[3].value).toBe('term'); + }); + + test('should update "filterAgg" and "aggTypeConfig" on change', async () => { + const onChange = jest.fn(); + + const { findByTestId } = render( + + + + + + ); + + const select = (await findByTestId('transformFilterAggTypeSelector')) as HTMLSelectElement; + + fireEvent.change(select, { + target: { value: 'term' }, + }); + + expect(onChange.mock.calls[0][0]).toMatchObject({ + filterAgg: 'term', + aggTypeConfig: { + FilterAggFormComponent: FilterTermForm, + filterAggConfig: { + value: undefined, + }, + }, + }); + }); + + test('should reset config of field change', async () => { + const onChange = jest.fn(); + + const { rerender, findByTestId } = render( + + + + + + ); + + // re-render the same component with different props + rerender( + + + + + + ); + + expect(onChange).toHaveBeenCalledWith({}); + + const { options } = (await findByTestId('transformFilterAggTypeSelector')) as HTMLSelectElement; + + expect(options.length).toBe(4); + expect(options[0].value).toBe(''); + expect(options[0].selected).toBe(true); + expect(options[1].value).toBe('bool'); + expect(options[2].value).toBe('exists'); + expect(options[3].value).toBe('range'); + }); + + test('should render additional form if presented in the configuration', async () => { + const onChange = jest.fn(); + let childChange: Function; + const DummyComponent = jest.fn(({ config, onChange: onChangeCallback }) => { + childChange = onChangeCallback; + return
; + }); + + const { findByTestId, container } = render( + + + + + + ); + + const { options } = (await findByTestId('transformFilterAggTypeSelector')) as HTMLSelectElement; + + expect(options[3].value).toBe('term'); + expect(options[3].selected).toBe(true); + expect(container.childElementCount).toBe(2); + // @ts-ignore + expect(DummyComponent.mock.calls[0][0]).toMatchObject({ config: { value: 'test' } }); + + childChange!({ config: { value: 'test_1' } }); + + expect(onChange).toHaveBeenCalledWith({ + filterAgg: 'term', + aggTypeConfig: { + FilterAggFormComponent: DummyComponent, + filterAggConfig: { value: 'test_1' }, + }, + }); + }); +}); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx new file mode 100644 index 0000000000000..3e67a16e3c1ed --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx @@ -0,0 +1,102 @@ +/* + * 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, { useContext, useMemo } from 'react'; +import { EuiFormRow, EuiSelect } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { useUpdateEffect } from 'react-use'; +import { CreateTransformWizardContext } from '../../../../wizard/wizard'; +import { commonFilterAggs, filterAggsFieldSupport } from '../constants'; +import { IndexPattern } from '../../../../../../../../../../../../src/plugins/data/public'; +import { getFilterAggTypeConfig } from '../config'; +import { FilterAggType, PivotAggsConfigFilter } from '../types'; + +/** + * Resolves supported filters for provided field. + */ +export function getSupportedFilterAggs( + fieldName: string, + indexPattern: IndexPattern +): FilterAggType[] { + const field = indexPattern.fields.getByName(fieldName); + + if (field === undefined) { + throw new Error(`The field ${fieldName} does not exist in the index`); + } + + return [...commonFilterAggs, ...filterAggsFieldSupport[field.type]]; +} + +/** + * Component for filter aggregation related controls. + * + * Responsible for the filter agg type selection and rendering of + * the corresponded field set. + */ +export const FilterAggForm: PivotAggsConfigFilter['AggFormComponent'] = ({ + aggConfig, + onChange, + selectedField, +}) => { + const { indexPattern } = useContext(CreateTransformWizardContext); + + const filterAggsOptions = useMemo(() => getSupportedFilterAggs(selectedField, indexPattern!), [ + indexPattern, + selectedField, + ]); + + useUpdateEffect(() => { + // reset filter agg on field change + onChange({}); + }, [selectedField]); + + const filterAggTypeConfig = aggConfig?.aggTypeConfig; + const filterAgg = aggConfig?.filterAgg ?? ''; + + return ( + <> + + } + > + ({ text: v, value: v })) + )} + value={filterAgg} + onChange={(e) => { + // have to reset aggTypeConfig of filterAgg change + const filterAggUpdate = e.target.value as FilterAggType; + onChange({ + filterAgg: filterAggUpdate, + aggTypeConfig: getFilterAggTypeConfig(filterAggUpdate), + }); + }} + data-test-subj="transformFilterAggTypeSelector" + /> + + {filterAgg !== '' && filterAggTypeConfig?.FilterAggFormComponent && ( + { + onChange({ + ...aggConfig, + aggTypeConfig: { + ...filterAggTypeConfig, + filterAggConfig: update.config, + }, + }); + }} + selectedField={selectedField} + /> + )} + + ); +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx new file mode 100644 index 0000000000000..cfc6bb27c88a1 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx @@ -0,0 +1,111 @@ +/* + * 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, { useCallback } from 'react'; +import { + EuiFieldNumber, + EuiFormRow, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiButtonToggle, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { FilterAggConfigRange } from '../types'; + +/** + * Form component for the range filter aggregation for number type fields. + */ +export const FilterRangeForm: FilterAggConfigRange['aggTypeConfig']['FilterAggFormComponent'] = ({ + config, + onChange, +}) => { + const from = config?.from ?? ''; + const to = config?.to ?? ''; + const includeFrom = config?.includeFrom ?? false; + const includeTo = config?.includeTo ?? false; + + const updateConfig = useCallback( + (update) => { + onChange({ + config: { + ...config, + ...update, + }, + }); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [config] + ); + + return ( + <> + + + + + } + > + { + updateConfig({ from: e.target.value === '' ? undefined : Number(e.target.value) }); + }} + step={0.1} + prepend={ + '} + onChange={(e: any) => { + updateConfig({ includeFrom: e.target.checked }); + }} + isSelected={includeFrom} + isEmpty={!includeFrom} + /> + } + /> + + + + + } + > + { + updateConfig({ to: e.target.value === '' ? undefined : Number(e.target.value) }); + }} + step={0.1} + append={ + { + updateConfig({ includeTo: e.target.checked }); + }} + isSelected={includeTo} + isEmpty={!includeTo} + /> + } + /> + + + + + ); +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx new file mode 100644 index 0000000000000..67be9fb7ca793 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_term_form.tsx @@ -0,0 +1,153 @@ +/* + * 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, { useCallback, useContext, useEffect, useState } from 'react'; +import { EuiComboBox, EuiFormRow } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { debounce } from 'lodash'; +import { useUpdateEffect } from 'react-use'; +import { i18n } from '@kbn/i18n'; +import { useApi } from '../../../../../../../hooks'; +import { CreateTransformWizardContext } from '../../../../wizard/wizard'; +import { FilterAggConfigTerm } from '../types'; +import { useToastNotifications } from '../../../../../../../app_dependencies'; + +/** + * Form component for the term filter aggregation. + */ +export const FilterTermForm: FilterAggConfigTerm['aggTypeConfig']['FilterAggFormComponent'] = ({ + config, + onChange, + selectedField, +}) => { + const api = useApi(); + const { indexPattern } = useContext(CreateTransformWizardContext); + const toastNotifications = useToastNotifications(); + + const [options, setOptions] = useState([]); + const [isLoading, setIsLoading] = useState(true); + + /* eslint-disable-next-line react-hooks/exhaustive-deps */ + const fetchOptions = useCallback( + debounce(async (searchValue: string) => { + const esSearchRequest = { + index: indexPattern!.title, + body: { + query: { + wildcard: { + [selectedField!]: { + value: `*${searchValue}*`, + }, + }, + }, + aggs: { + field_values: { + terms: { + field: selectedField, + size: 10, + }, + }, + }, + size: 0, + }, + }; + + try { + const response = await api.esSearch(esSearchRequest); + setOptions( + response.aggregations.field_values.buckets.map( + (value: { key: string; doc_count: number }) => ({ label: value.key }) + ) + ); + } catch (e) { + toastNotifications.addWarning( + i18n.translate('xpack.transform.agg.popoverForm.filerAgg.term.errorFetchSuggestions', { + defaultMessage: 'Unable to fetch suggestions', + }) + ); + } + + setIsLoading(false); + }, 600), + [selectedField] + ); + + const onSearchChange = useCallback( + async (searchValue) => { + if (selectedField === undefined) return; + + setIsLoading(true); + setOptions([]); + + await fetchOptions(searchValue); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [selectedField] + ); + + const updateConfig = useCallback( + (update) => { + onChange({ + config: { + ...config, + ...update, + }, + }); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [config] + ); + + useEffect(() => { + // Simulate initial load. + onSearchChange(''); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + useUpdateEffect(() => { + // Reset value control on field change + if (!selectedField) return; + onChange({ + config: { + value: undefined, + }, + }); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [selectedField]); + + const selectedOptions = config?.value ? [{ label: config.value }] : undefined; + + if (selectedField === undefined) return null; + + return ( + + } + > + { + updateConfig({ value: selected.length > 0 ? selected[0].label : undefined }); + }} + onCreateOption={(value) => { + updateConfig({ value }); + }} + onSearchChange={onSearchChange} + data-test-subj="transformFilterTermValueSelector" + /> + + ); +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/index.ts new file mode 100644 index 0000000000000..00b586f301dad --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/index.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export { FilterEditorForm } from './editor_form'; +export { FilterAggForm } from './filter_agg_form'; +export { FilterTermForm } from './filter_term_form'; +export { FilterRangeForm } from './filter_range_form'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/config.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/config.ts new file mode 100644 index 0000000000000..8602a82db8f2f --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/config.ts @@ -0,0 +1,202 @@ +/* + * 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 { + isPivotAggsConfigWithUiSupport, + PivotAggsConfigBase, + PivotAggsConfigWithUiBase, +} from '../../../../../../common/pivot_aggs'; +import { FILTERS } from './constants'; +import { FilterAggForm, FilterEditorForm, FilterRangeForm, FilterTermForm } from './components'; +import { + FilterAggConfigBase, + FilterAggConfigBool, + FilterAggConfigExists, + FilterAggConfigRange, + FilterAggConfigTerm, + FilterAggConfigUnion, + FilterAggType, + PivotAggsConfigFilter, +} from './types'; + +/** + * Gets initial basic configuration of the filter aggregation. + */ +export function getFilterAggConfig( + commonConfig: PivotAggsConfigWithUiBase | PivotAggsConfigBase +): PivotAggsConfigFilter { + return { + ...commonConfig, + field: isPivotAggsConfigWithUiSupport(commonConfig) ? commonConfig.field : '', + AggFormComponent: FilterAggForm, + aggConfig: {}, + getEsAggConfig() { + // ensure the configuration has been completed + if (!this.isValid()) { + return null; + } + const esAgg = this.aggConfig.aggTypeConfig?.getEsAggConfig(this.field); + return { + [this.aggConfig.filterAgg as string]: esAgg, + }; + }, + setUiConfigFromEs(esAggDefinition) { + const filterAgg = Object.keys(esAggDefinition)[0] as FilterAggType; + const filterAggConfig = esAggDefinition[filterAgg]; + const aggTypeConfig = getFilterAggTypeConfig(filterAgg, filterAggConfig); + + // TODO consider moving field to the filter agg type level + this.field = Object.keys(filterAggConfig)[0]; + this.aggConfig = { + filterAgg, + aggTypeConfig, + }; + }, + isValid() { + return ( + this.aggConfig?.filterAgg !== undefined && + (this.aggConfig.aggTypeConfig?.isValid ? this.aggConfig.aggTypeConfig.isValid() : true) + ); + }, + getAggName() { + return this.aggConfig?.aggTypeConfig?.getAggName + ? this.aggConfig.aggTypeConfig.getAggName() + : undefined; + }, + helperText() { + return this.aggConfig?.aggTypeConfig?.helperText + ? this.aggConfig.aggTypeConfig.helperText() + : undefined; + }, + }; +} + +/** + * Returns a form component for provided filter aggregation type. + */ +export function getFilterAggTypeConfig( + filterAggType: FilterAggConfigUnion['filterAgg'] | FilterAggType, + esConfig?: { [key: string]: any } +): FilterAggConfigUnion['aggTypeConfig'] | FilterAggConfigBase['aggTypeConfig'] { + switch (filterAggType) { + case FILTERS.TERM: + const value = typeof esConfig === 'object' ? Object.values(esConfig)[0] : undefined; + + return { + FilterAggFormComponent: FilterTermForm, + filterAggConfig: { + value, + }, + getEsAggConfig(fieldName) { + if (fieldName === undefined || !this.filterAggConfig) { + throw new Error(`Config ${FILTERS.TERM} is not completed`); + } + return { + [fieldName]: this.filterAggConfig.value, + }; + }, + isValid() { + return this.filterAggConfig?.value !== undefined; + }, + getAggName() { + return this.filterAggConfig?.value ? this.filterAggConfig.value : undefined; + }, + } as FilterAggConfigTerm['aggTypeConfig']; + case FILTERS.RANGE: + const esFilterRange = typeof esConfig === 'object' ? Object.values(esConfig)[0] : undefined; + + return { + FilterAggFormComponent: FilterRangeForm, + filterAggConfig: + typeof esFilterRange === 'object' + ? { + from: esFilterRange.gte ?? esFilterRange.gt, + to: esFilterRange.lte ?? esFilterRange.lt, + includeFrom: esFilterRange.gte !== undefined, + includeTo: esFilterRange.lts !== undefined, + } + : undefined, + getEsAggConfig(fieldName) { + if (fieldName === undefined || !this.filterAggConfig) { + throw new Error(`Config ${FILTERS.RANGE} is not completed`); + } + + const { from, includeFrom, to, includeTo } = this.filterAggConfig; + const result = {} as ReturnType< + FilterAggConfigRange['aggTypeConfig']['getEsAggConfig'] + >[0]; + + if (from) { + result[includeFrom ? 'gte' : 'gt'] = from; + } + if (to) { + result[includeTo ? 'lte' : 'lt'] = to; + } + + return { + [fieldName]: result, + }; + }, + isValid() { + if ( + typeof this.filterAggConfig !== 'object' || + (this.filterAggConfig.from === undefined && this.filterAggConfig.to === undefined) + ) { + return false; + } + + if (this.filterAggConfig.from !== undefined && this.filterAggConfig.to !== undefined) { + return this.filterAggConfig.from <= this.filterAggConfig.to; + } + + return true; + }, + helperText() { + if (!this.isValid!()) return; + const { from, to, includeFrom, includeTo } = this.filterAggConfig!; + + return `range: ${`${from !== undefined ? `${includeFrom ? '≥' : '>'} ${from}` : ''} ${ + from !== undefined && to !== undefined ? '&' : '' + } ${to !== undefined ? `${includeTo ? '≤' : '<'} ${to}` : ''}`.trim()}`; + }, + } as FilterAggConfigRange['aggTypeConfig']; + case FILTERS.EXISTS: + return { + getEsAggConfig(fieldName) { + if (fieldName === undefined) { + throw new Error(`Config ${FILTERS.EXISTS} is not completed`); + } + return { + field: fieldName, + }; + }, + } as FilterAggConfigExists['aggTypeConfig']; + case FILTERS.BOOL: + return { + FilterAggFormComponent: FilterEditorForm, + filterAggConfig: JSON.stringify( + { + must: [], + must_not: [], + should: [], + }, + null, + 2 + ), + getEsAggConfig(fieldName) { + return JSON.parse(this.filterAggConfig!); + }, + } as FilterAggConfigBool['aggTypeConfig']; + default: + return { + FilterAggFormComponent: FilterEditorForm, + filterAggConfig: '', + getEsAggConfig() { + return this.filterAggConfig !== undefined ? JSON.parse(this.filterAggConfig!) : {}; + }, + }; + } +} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/constants.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/constants.ts new file mode 100644 index 0000000000000..e6c36cc6f7db9 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/constants.ts @@ -0,0 +1,42 @@ +/* + * 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 { KBN_FIELD_TYPES } from '../../../../../../../../../../../src/plugins/data/common'; +import { FilterAggType } from './types'; + +export const FILTERS = { + CUSTOM: 'custom', + PHRASES: 'phrases', + PHRASE: 'phrase', + EXISTS: 'exists', + MATCH_ALL: 'match_all', + MISSING: 'missing', + QUERY_STRING: 'query_string', + RANGE: 'range', + GEO_BOUNDING_BOX: 'geo_bounding_box', + GEO_POLYGON: 'geo_polygon', + SPATIAL_FILTER: 'spatial_filter', + TERM: 'term', + TERMS: 'terms', + BOOL: 'bool', +} as const; + +export const filterAggsFieldSupport: { [key: string]: FilterAggType[] } = { + [KBN_FIELD_TYPES.ATTACHMENT]: [], + [KBN_FIELD_TYPES.BOOLEAN]: [], + [KBN_FIELD_TYPES.DATE]: [FILTERS.RANGE], + [KBN_FIELD_TYPES.GEO_POINT]: [FILTERS.GEO_BOUNDING_BOX, FILTERS.GEO_POLYGON], + [KBN_FIELD_TYPES.GEO_SHAPE]: [FILTERS.GEO_BOUNDING_BOX, FILTERS.GEO_POLYGON], + [KBN_FIELD_TYPES.IP]: [FILTERS.RANGE], + [KBN_FIELD_TYPES.MURMUR3]: [], + [KBN_FIELD_TYPES.NUMBER]: [FILTERS.RANGE], + [KBN_FIELD_TYPES.STRING]: [FILTERS.TERM], + [KBN_FIELD_TYPES._SOURCE]: [], + [KBN_FIELD_TYPES.UNKNOWN]: [], + [KBN_FIELD_TYPES.CONFLICT]: [], +}; + +export const commonFilterAggs = [FILTERS.BOOL, FILTERS.EXISTS]; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts new file mode 100644 index 0000000000000..b9ac665fce927 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { filterAggsFieldSupport, FILTERS } from './constants'; +export { FilterAggType } from './types'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/types.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/types.ts new file mode 100644 index 0000000000000..438fc135f8aa9 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/types.ts @@ -0,0 +1,80 @@ +/* + * 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 { FC } from 'react'; +import { PivotAggsConfigWithExtra } from '../../../../../../common/pivot_aggs'; +import { FILTERS } from './constants'; + +export type FilterAggType = typeof FILTERS[keyof typeof FILTERS]; + +type FilterAggForm = FC<{ + /** Filter aggregation related configuration */ + config: Partial | undefined; + /** Callback for configuration updates */ + onChange: (arg: Partial<{ config: Partial }>) => void; + /** Selected field for the aggregation */ + selectedField?: string; +}>; + +interface FilterAggTypeConfig { + /** Form component */ + FilterAggFormComponent?: U extends undefined ? undefined : FilterAggForm; + /** Filter agg type configuration*/ + filterAggConfig?: U extends undefined ? undefined : U; + /** Converts UI agg config form to ES agg request object */ + getEsAggConfig: (field?: string) => R; + isValid?: () => boolean; + /** Provides aggregation name generated based on the configuration */ + getAggName?: () => string | undefined; + /** Helper text for the aggregation reflecting some configuration info */ + helperText?: () => string | undefined; +} + +/** Filter agg type definition */ +interface FilterAggProps { + /** Filter aggregation type */ + filterAgg: K; + /** Definition of the filter agg config */ + aggTypeConfig: FilterAggTypeConfig; +} + +/** Filter term agg */ +export type FilterAggConfigTerm = FilterAggProps< + 'term', + { value: string }, + { [field: string]: string } +>; +/** Filter range agg */ +export type FilterAggConfigRange = FilterAggProps< + 'range', + { from?: number; to?: number; includeFrom?: boolean; includeTo?: boolean }, + { [field: string]: { [key in 'gt' | 'gte' | 'lt' | 'lte']: number } } +>; +/** Filter exists agg */ +export type FilterAggConfigExists = FilterAggProps<'exists', undefined, { field: string }>; +/** Filter bool agg */ +export type FilterAggConfigBool = FilterAggProps<'bool', string>; + +/** General type for filter agg */ +export type FilterAggConfigEditor = FilterAggProps; + +export type FilterAggConfigUnion = + | FilterAggConfigTerm + | FilterAggConfigRange + | FilterAggConfigBool + | FilterAggConfigExists; + +/** + * Union type for filter aggregations + * TODO find out if it's possible to use {@link FilterAggConfigUnion} instead of {@link FilterAggConfigBase}. + * ATM TS is not able to infer a type. + */ +export type PivotAggsConfigFilter = PivotAggsConfigWithExtra; + +export interface FilterAggConfigBase { + filterAgg?: FilterAggType; + aggTypeConfig?: any; +} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_agg_form_config.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_agg_form_config.ts new file mode 100644 index 0000000000000..2839c1181c333 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_agg_form_config.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { + PIVOT_SUPPORTED_AGGS, + PivotAggsConfigBase, + PivotAggsConfigWithUiBase, + PivotSupportedAggs, +} from '../../../../../common/pivot_aggs'; +import { getFilterAggConfig } from './filter_agg/config'; + +/** + * Gets form configuration for provided aggregation type. + */ +export function getAggFormConfig( + agg: PivotSupportedAggs | string, + commonConfig: PivotAggsConfigBase | PivotAggsConfigWithUiBase +) { + switch (agg) { + case PIVOT_SUPPORTED_AGGS.FILTER: + return getFilterAggConfig(commonConfig); + default: + return commonConfig; + } +} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_aggregation_config.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_aggregation_config.ts index 263a8954c96eb..460164c9afe73 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_aggregation_config.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_aggregation_config.ts @@ -7,31 +7,38 @@ import { EsFieldName, PERCENTILES_AGG_DEFAULT_PERCENTS, - PivotAggsConfigWithUiSupport, PIVOT_SUPPORTED_AGGS, + PivotAggsConfigWithUiSupport, } from '../../../../../common'; +import { PivotSupportedAggs } from '../../../../../common/pivot_aggs'; +import { getFilterAggConfig } from './filter_agg/config'; +/** + * Provides a configuration based on the aggregation type. + */ export function getDefaultAggregationConfig( aggName: string, dropDownName: string, fieldName: EsFieldName, - agg: PIVOT_SUPPORTED_AGGS + agg: PivotSupportedAggs ): PivotAggsConfigWithUiSupport { + const commonConfig = { + agg, + aggName, + dropDownName, + field: fieldName, + }; + switch (agg) { case PIVOT_SUPPORTED_AGGS.PERCENTILES: return { + ...commonConfig, agg, - aggName, - dropDownName, - field: fieldName, percents: PERCENTILES_AGG_DEFAULT_PERCENTS, }; + case PIVOT_SUPPORTED_AGGS.FILTER: + return getFilterAggConfig(commonConfig); default: - return { - agg, - aggName, - dropDownName, - field: fieldName, - }; + return commonConfig; } } diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts index 84b0cbc69f208..72bfbe369757b 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts @@ -75,6 +75,9 @@ export const usePivotConfig = ( // The list of selected aggregations const [aggList, setAggList] = useState(defaults.aggList); + /** + * Adds an aggregation to the list. + */ const addAggregation = (d: DropDownLabel[]) => { const label: AggName = d[0].label; const config: PivotAggsConfig = aggOptionsData[label]; @@ -90,6 +93,9 @@ export const usePivotConfig = ( setAggList({ ...aggList }); }; + /** + * Adds updated aggregation to the list + */ const updateAggregation = (previousAggName: AggName, item: PivotAggsConfig) => { const aggListWithoutPrevious = { ...aggList }; delete aggListWithoutPrevious[previousAggName]; @@ -108,6 +114,9 @@ export const usePivotConfig = ( setAggList(aggListWithoutPrevious); }; + /** + * Deletes aggregation from the list + */ const deleteAggregation = (aggName: AggName) => { delete aggList[aggName]; setAggList({ ...aggList }); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx index 9fd388e0596eb..e0b350542a8f8 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx @@ -36,7 +36,7 @@ import { PivotGroupByDict, PivotGroupByConfigDict, PivotSupportedGroupByAggs, - PIVOT_SUPPORTED_AGGS, + PivotAggsConfig, } from '../../../../common'; import { useDocumentationLinks } from '../../../../hooks/use_documentation_links'; import { useIndexData } from '../../../../hooks/use_index_data'; @@ -53,6 +53,7 @@ import { SourceSearchBar } from '../source_search_bar'; import { StepDefineExposedState } from './common'; import { useStepDefineForm } from './hooks/use_step_define_form'; +import { getAggConfigFromEsAgg } from '../../../../common/pivot_aggs'; export interface StepDefineFormProps { overrides?: StepDefineExposedState; @@ -153,14 +154,8 @@ export const StepDefineForm: FC = React.memo((props) => { Object.entries(pivot.aggregations).forEach((d) => { const aggName = d[0]; const aggConfig = d[1] as PivotAggDict; - const aggConfigKeys = Object.keys(aggConfig); - const agg = aggConfigKeys[0] as PIVOT_SUPPORTED_AGGS; - newAggList[aggName] = { - ...aggConfig[agg], - agg, - aggName, - dropDownName: '', - }; + + newAggList[aggName] = getAggConfigFromEsAgg(aggConfig, aggName) as PivotAggsConfig; }); } stepDefineForm.pivotConfig.actions.setAggList(newAggList); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx index 69fcf822de5d2..5c34eb0d3fdf4 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Fragment, FC, useEffect, useRef, useState } from 'react'; +import React, { Fragment, FC, useEffect, useRef, useState, createContext } from 'react'; import { i18n } from '@kbn/i18n'; @@ -28,6 +28,7 @@ import { StepDetailsSummary, } from '../step_details'; import { WizardNav } from '../wizard_nav'; +import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; enum KBN_MANAGEMENT_PAGE_CLASSNAME { DEFAULT_BODY = 'mgtPage__body', @@ -85,6 +86,10 @@ interface WizardProps { searchItems: SearchItems; } +export const CreateTransformWizardContext = createContext<{ indexPattern: IndexPattern | null }>({ + indexPattern: null, +}); + export const Wizard: FC = React.memo(({ cloneConfig, searchItems }) => { // The current WIZARD_STEP const [currentStep, setCurrentStep] = useState(WIZARD_STEPS.DEFINE); @@ -213,5 +218,9 @@ export const Wizard: FC = React.memo(({ cloneConfig, searchItems }) }, ]; - return ; + return ( + + + + ); }); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index b659e3ec89b0d..9d3bc008106c6 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -87,7 +87,7 @@ "advancedSettings.categoryNames.notificationsLabel": "通知", "advancedSettings.categoryNames.reportingLabel": "レポート", "advancedSettings.categoryNames.searchLabel": "検索", - "advancedSettings.categoryNames.siemLabel": "SIEM", + "advancedSettings.categoryNames.securitySolutionLabel": "Security Solution", "advancedSettings.categoryNames.timelionLabel": "Timelion", "advancedSettings.categoryNames.visualizationsLabel": "可視化", "advancedSettings.categorySearchLabel": "カテゴリー", @@ -496,6 +496,81 @@ "dashboard.topNave.viewConfigDescription": "編集をキャンセルして表示限定モードに切り替えます", "dashboard.urlWasRemovedInSixZeroWarningMessage": "URL「dashboard/create」は6.0で廃止されました。ブックマークを更新してください。", "dashboard.visitVisualizeAppLinkText": "可視化アプリにアクセス", + "data.advancedSettings.courier.batchSearchesText": "無効の場合、ダッシュボードパネルは個々に読み込まれ、検索リクエストはユーザーが移動するか\n クエリを更新すると停止します。有効の場合、ダッシュボードパネルはすべてのデータが読み込まれると同時に読み込まれ、\n 検索は停止しません。", + "data.advancedSettings.courier.batchSearchesTextDeprecation": "この設定はサポートが終了し、Kibana 8.0 では削除されます。", + "data.advancedSettings.courier.batchSearchesTitle": "同時検索のバッチ処理", + "data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText": "リクエスト設定", + "data.advancedSettings.courier.customRequestPreferenceText": "{setRequestReferenceSetting} が {customSettingValue} に設定されている時に使用される {requestPreferenceLink} です。", + "data.advancedSettings.courier.customRequestPreferenceTitle": "カスタムリクエスト設定", + "data.advancedSettings.courier.ignoreFilterText": "この構成は、似ていないインデックスにアクセスするビジュアライゼーションを含むダッシュボードのサポートを強化します。無効にすると、すべてのフィルターがすべてのビジュアライゼーションに適用されます。有効にすると、ビジュアライゼーションのインデックスにフィルター対象のフィールドが含まれていない場合、ビジュアライゼーションの際にフィルターが無視されます。", + "data.advancedSettings.courier.ignoreFilterTitle": "フィルターの無視", + "data.advancedSettings.courier.maxRequestsText": "Kibana から送信された _msearch requests リクエストに使用される {maxRequestsLink} 設定を管理します。この構成を無効にして Elasticsearch のデフォルトを使用するには、0 に設定します。", + "data.advancedSettings.courier.maxRequestsTitle": "最大同時シャードリクエスト", + "data.advancedSettings.courier.requestPreferenceCustom": "カスタム", + "data.advancedSettings.courier.requestPreferenceNone": "なし", + "data.advancedSettings.courier.requestPreferenceSessionId": "セッション ID", + "data.advancedSettings.courier.requestPreferenceText": "どのシャードが検索リクエストを扱うかを設定できます。
    \n
  • {sessionId}: 同じシャードのすべての検索リクエストを実行するため、オペレーションを制限します。\n これにはリクエスト間でシャードのキャッシュを共有できるというメリットがあります。
  • \n
  • {custom}: 独自の設定が可能になります。\n couriercustomRequestPreference で設定値をカスタマイズします。
  • \n
  • {none}: 設定されていないことを意味します。\n これにより、リクエストが全シャードコピー間に分散されるため、パフォーマンスが改善される可能性があります。\n ただし、シャードによって更新ステータスが異なる場合があるため、結果に矛盾が生じる可能性があります。
  • \n
", + "data.advancedSettings.courier.requestPreferenceTitle": "リクエスト設定", + "data.advancedSettings.defaultIndexText": "インデックスが設定されていない時にアクセスするインデックスです", + "data.advancedSettings.defaultIndexTitle": "デフォルトのインデックス", + "data.advancedSettings.pinFiltersText": "フィルターがデフォルトでグローバル (ピン付けされた状態) になるかの設定です", + "data.advancedSettings.pinFiltersTitle": "フィルターをデフォルトでピン付けする", + "data.advancedSettings.query.allowWildcardsText": "設定すると、クエリ句の頭に * が使えるようになります。現在クエリバーで実験的クエリ機能が有効になっている場合にのみ適用されます。基本的な Lucene クエリでリーディングワイルドカードを無効にするには、{queryStringOptionsPattern} を使用します。", + "data.advancedSettings.query.allowWildcardsTitle": "クエリでリーディングワイルドカードを許可する", + "data.advancedSettings.query.queryStringOptions.optionsLinkText": "オプション", + "data.advancedSettings.query.queryStringOptionsText": "Lucene クエリ文字列パーサーの {optionsLink}「{queryLanguage}」が {luceneLanguage} に設定されている時にのみ使用されます。", + "data.advancedSettings.query.queryStringOptionsTitle": "クエリ文字列のオプション", + "data.advancedSettings.searchQueryLanguageKql": "KQL", + "data.advancedSettings.searchQueryLanguageLucene": "Lucene", + "data.advancedSettings.searchQueryLanguageText": "クエリバーで使用されるクエリ言語です。KQL は Kibana 用に特別に開発された新しい言語です。", + "data.advancedSettings.searchQueryLanguageTitle": "クエリ言語", + "data.advancedSettings.shortenFieldsText": "長いフィールドを短くします。例: foo.bar.baz の代わりに f.b.baz と表示", + "data.advancedSettings.shortenFieldsTitle": "フィールドの短縮", + "data.advancedSettings.sortOptions.optionsLinkText": "オプション", + "data.advancedSettings.sortOptionsText": "Elasticsearch の並べ替えパラメーターの {optionsLink}", + "data.advancedSettings.sortOptionsTitle": "並べ替えオプション", + "data.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数字フォーマット", + "data.advancedSettings.format.bytesFormatText": "「バイト」フォーマットのデフォルト {numeralFormatLink} です", + "data.advancedSettings.format.bytesFormatTitle": "バイトフォーマット", + "data.advancedSettings.format.currencyFormat.numeralFormatLinkText": "数字フォーマット", + "data.advancedSettings.format.currencyFormatText": "「通貨」フォーマットのデフォルト {numeralFormatLink} です", + "data.advancedSettings.format.currencyFormatTitle": "通貨フォーマット", + "data.advancedSettings.format.defaultTypeMapText": "各フィールドタイプにデフォルトで使用するフォーマット名のマップです。フィールドタイプが特に指定されていない場合は {defaultFormat} が使用されます", + "data.advancedSettings.format.defaultTypeMapTitle": "フィールドタイプフォーマット名", + "data.advancedSettings.format.formattingLocale.numeralLanguageLinkText": "数字言語", + "data.advancedSettings.format.formattingLocaleText": "{numeralLanguageLink} ロケール", + "data.advancedSettings.format.formattingLocaleTitle": "フォーマットロケール", + "data.advancedSettings.format.numberFormat.numeralFormatLinkText": "数字フォーマット", + "data.advancedSettings.format.numberFormatText": "「数字」フォーマットのデフォルト {numeralFormatLink} です", + "data.advancedSettings.format.numberFormatTitle": "数字フォーマット", + "data.advancedSettings.format.percentFormat.numeralFormatLinkText": "数字フォーマット", + "data.advancedSettings.format.percentFormatText": "「パーセント」フォーマットのデフォルト {numeralFormatLink} です", + "data.advancedSettings.format.percentFormatTitle": "パーセントフォーマット", + "data.advancedSettings.histogram.barTargetText": "日付ヒストグラムで「自動」間隔を使用する際、この数に近いバーの作成を試みます", + "data.advancedSettings.histogram.barTargetTitle": "目標バー数", + "data.advancedSettings.histogram.maxBarsText": "日付ヒストグラムに表示されるバーの数の上限です。必要に応じて値をスケーリングしてください", + "data.advancedSettings.histogram.maxBarsTitle": "最高バー数", + "data.advancedSettings.historyLimitText": "履歴があるフィールド (例: クエリインプット) に個の数の最近の値が表示されます", + "data.advancedSettings.historyLimitTitle": "履歴制限数", + "data.advancedSettings.indexPatternPlaceholderText": "「管理 > インデックスパターン > インデックスパターンを作成」で使用される「インデックスパターン名」フィールドのプレースホルダーです。", + "data.advancedSettings.indexPatternPlaceholderTitle": "インデックスパターンのプレースホルダー", + "data.advancedSettings.suggestFilterValuesText": "フィルターエディターがフィールドの値の候補を表示しないようにするには、このプロパティを false にしてください。", + "data.advancedSettings.suggestFilterValuesTitle": "フィルターエディターの候補値", + "data.advancedSettings.timepicker.last15Minutes": "過去 15 分間", + "data.advancedSettings.timepicker.last1Hour": "過去 1 時間", + "data.advancedSettings.timepicker.last1Year": "過去 1 年間", + "data.advancedSettings.timepicker.last24Hours": "過去 24 時間", + "data.advancedSettings.timepicker.last30Days": "過去 30 日間", + "data.advancedSettings.timepicker.last30Minutes": "過去 30 分間", + "data.advancedSettings.timepicker.last7Days": "過去 7 日間", + "data.advancedSettings.timepicker.last90Days": "過去 90 日間", + "data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText": "対応フォーマット", + "data.advancedSettings.timepicker.quickRangesText": "タイムピッカーのクイックセクションに表示される範囲のリストです。それぞれのオブジェクトに「開始」、「終了」({acceptedFormatsLink} を参照)、「表示」(表示するタイトル) が含まれるオブジェクトの配列です。", + "data.advancedSettings.timepicker.quickRangesTitle": "タイムピッカーのクイック範囲", + "data.advancedSettings.timepicker.refreshIntervalDefaultsText": "時間フィルターのデフォルト更新間隔", + "data.advancedSettings.timepicker.refreshIntervalDefaultsTitle": "タイムピッカーの更新間隔", + "data.advancedSettings.timepicker.thisWeek": "今週", + "data.advancedSettings.timepicker.today": "今日", "data.aggTypes.buckets.ranges.rangesFormatMessage": "{gte} {from} と {lt} {to}", "data.common.kql.errors.endOfInputText": "インプットの終わり", "data.common.kql.errors.fieldNameText": "フィールド名", @@ -1233,9 +1308,9 @@ "home.addData.metrics.nameTitle": "メトリック", "home.addData.sampleDataLink": "データセットと Kibana ダッシュボードを読み込む", "home.addData.sampleDataTitle": "サンプルデータの追加", - "home.addData.siem.addSiemEventsButtonLabel": "イベントを追加", - "home.addData.siem.nameDescription": "即利用可能なビジュアライゼーションで、セキュリティイベントをまとめてインタラクティブな調査を可能にします。", - "home.addData.siem.nameTitle": "SIEM", + "home.addData.securitySolution.addSecurityEventsButtonLabel": "イベントを追加", + "home.addData.securitySolution.nameDescription": "即利用可能なビジュアライゼーションで、セキュリティイベントをまとめてインタラクティブな調査を可能にします。", + "home.addData.securitySolution.nameTitle": "Security", "home.addData.title.observability": "オブザーバビリティ", "home.addData.title.security": "セキュリティ", "home.addData.uploadFileLink": "CSV、NDJSON、またはログファイルをインポート", @@ -1367,7 +1442,7 @@ "home.tutorial.tabs.loggingTitle": "ログ", "home.tutorial.tabs.metricsTitle": "メトリック", "home.tutorial.tabs.sampleDataTitle": "サンプルデータ", - "home.tutorial.tabs.siemTitle": "SIEM", + "home.tutorial.tabs.securitySolutionTitle": "Security", "home.tutorial.unexpectedStatusCheckStateErrorDescription": "予期せぬステータス確認ステータス {statusCheckState}", "home.tutorial.unhandledInstructionTypeErrorDescription": "予期せぬ指示タイプ {visibleInstructions}", "home.tutorials.activemqLogs.artifacts.dashboards.linkLabel": "ActiveMQ アプリケーションイベント", @@ -1390,7 +1465,7 @@ "home.tutorials.apacheMetrics.longDescription": "Metricbeat モジュール「apache」は、Apache 2 HTTP サーバーから内部メトリックを取得します。[詳細]({learnMoreLink})。", "home.tutorials.apacheMetrics.nameTitle": "Apache メトリック", "home.tutorials.apacheMetrics.shortDescription": "Apache 2 HTTP サーバーから内部メトリックを取得します。", - "home.tutorials.auditbeat.artifacts.dashboards.linkLabel": "SIEM アプリ", + "home.tutorials.auditbeat.artifacts.dashboards.linkLabel": "Security アプリ", "home.tutorials.auditbeat.longDescription": "Auditbeat を使用してホストから監査データを収集します。これらにはプロセス、ユーザー、ログイン、ソケット情報、ファイルアクセス、その他が含まれます。[詳細]({learnMoreLink})。", "home.tutorials.auditbeat.nameTitle": "Auditbeat", "home.tutorials.auditbeat.shortDescription": "ホストから監査データを収集します。", @@ -1409,7 +1484,7 @@ "home.tutorials.cephMetrics.longDescription": "Metricbeat モジュール「ceph」は、Ceph から内部メトリックを取得します。[詳細]({learnMoreLink})。", "home.tutorials.cephMetrics.nameTitle": "Ceph メトリック", "home.tutorials.cephMetrics.shortDescription": "Ceph サーバーから内部メトリックを取得します。", - "home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel": "SIEM アプリ", + "home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel": "Security アプリ", "home.tutorials.ciscoLogs.longDescription": "これは Cisco ネットワークデバイスのログ用のモジュールです。現在、syslog 経由またはファイルから読み込まれた Cisco ASA ファイアウォールログの「asa」ファイルセットをサポートしています。[詳細]({learnMoreLink})。", "home.tutorials.ciscoLogs.nameTitle": "Cisco", "home.tutorials.ciscoLogs.shortDescription": "Cisco ASA ファイアウォールからのログを収集・解析します。", @@ -1739,7 +1814,7 @@ "home.tutorials.elasticsearchMetrics.longDescription": "Metricbeat モジュール「elasticsearch」は、Elasticsearch から内部メトリックを取得します。[詳細]({learnMoreLink})。", "home.tutorials.elasticsearchMetrics.nameTitle": "Elasticsearch メトリック", "home.tutorials.elasticsearchMetrics.shortDescription": "Elasticsearch から内部メトリックを取得します。", - "home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel": "SIEM アプリ", + "home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel": "Security アプリ", "home.tutorials.envoyproxyLogs.longDescription": "これは [Envoy proxy access log](https://www.envoyproxy.io/docs/envoy/v1.10.0/configuration/access_log) 用の Filebeatモジュールです。Kubernetes でのスタンドアロンのデプロイメントと Envoy プロキシデプロイメントの両方をサポートします。[詳細]({learnMoreLink})。", "home.tutorials.envoyproxyLogs.nameTitle": "Envoyproxy", "home.tutorials.envoyproxyLogs.shortDescription": "Envoy プロキシからのログを収集・解析します。", @@ -1770,7 +1845,7 @@ "home.tutorials.iisLogs.longDescription": "「iis」Filebeat モジュールが、Nginx HTTP サーバーにより作成されたアクセスとエラーのログをパースします。[詳細]({learnMoreLink})。", "home.tutorials.iisLogs.nameTitle": "IIS ログ", "home.tutorials.iisLogs.shortDescription": "IIS HTTP サーバーにより作成されたアクセスとエラーのログを収集しパースします。", - "home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel": "SIEM アプリ", + "home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel": "Security アプリ", "home.tutorials.iptablesLogs.longDescription": "これは iptables と ip6tables ログ用のモジュールです。ネットワーク上で受信した syslog ログ経由や、ファイルからのログをパースします。また、ルールセット名、ルール番号、トラフィックに実行されたアクション (許可/拒否) を含む、Ubiquiti ファイアウォールにより追加された接頭辞も認識できます。[詳細]({learnMoreLink})。", "home.tutorials.iptablesLogs.nameTitle": "Iptables / Ubiquiti", "home.tutorials.iptablesLogs.shortDescription": "iptables と ip6tables ログ、または Ubiqiti からのログを収集・解析します。", @@ -1942,7 +2017,7 @@ "home.tutorials.vsphereMetrics.longDescription": "「vsphere」Metricbeat モジュールは、vSphere クラスターから内部メトリックを取得します。 [詳細]({learnMoreLink})。", "home.tutorials.vsphereMetrics.nameTitle": "vSphere メトリック", "home.tutorials.vsphereMetrics.shortDescription": "vSphere から内部メトリックを取得します。", - "home.tutorials.windowsEventLogs.artifacts.application.label": "SIEM アプリ", + "home.tutorials.windowsEventLogs.artifacts.application.label": "Security アプリ", "home.tutorials.windowsEventLogs.longDescription": "Winlogbeat を使用して Windows イベントログからログを収集します。[詳細]({learnMoreLink})。", "home.tutorials.windowsEventLogs.nameTitle": "Windows イベントログ", "home.tutorials.windowsEventLogs.shortDescription": "Windows イベントログからイベントを取得します。", @@ -2047,25 +2122,10 @@ "inspector.requests.statisticsTabLabel": "統計", "inspector.title": "インスペクター", "inspector.view": "{viewName} を表示", - "kbn.advancedSettings.courier.batchSearchesText": "無効の場合、ダッシュボードパネルは個々に読み込まれ、検索リクエストはユーザーが移動するか\n クエリを更新すると停止します。有効の場合、ダッシュボードパネルはすべてのデータが読み込まれると同時に読み込まれ、\n 検索は停止しません。", - "kbn.advancedSettings.courier.batchSearchesTextDeprecation": "この設定はサポートが終了し、Kibana 8.0 では削除されます。", - "kbn.advancedSettings.courier.batchSearchesTitle": "同時検索のバッチ処理", - "kbn.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText": "リクエスト設定", - "kbn.advancedSettings.courier.customRequestPreferenceText": "{setRequestReferenceSetting} が {customSettingValue} に設定されている時に使用される {requestPreferenceLink} です。", - "kbn.advancedSettings.courier.customRequestPreferenceTitle": "カスタムリクエスト設定", - "kbn.advancedSettings.courier.ignoreFilterText": "この構成は、似ていないインデックスにアクセスするビジュアライゼーションを含むダッシュボードのサポートを強化します。無効にすると、すべてのフィルターがすべてのビジュアライゼーションに適用されます。有効にすると、ビジュアライゼーションのインデックスにフィルター対象のフィールドが含まれていない場合、ビジュアライゼーションの際にフィルターが無視されます。", - "kbn.advancedSettings.courier.ignoreFilterTitle": "フィルターの無視", - "kbn.advancedSettings.courier.maxRequestsText": "Kibana から送信された _msearch requests リクエストに使用される {maxRequestsLink} 設定を管理します。この構成を無効にして Elasticsearch のデフォルトを使用するには、0 に設定します。", - "kbn.advancedSettings.courier.maxRequestsTitle": "最大同時シャードリクエスト", - "kbn.advancedSettings.courier.requestPreferenceCustom": "カスタム", - "kbn.advancedSettings.courier.requestPreferenceNone": "なし", - "kbn.advancedSettings.courier.requestPreferenceSessionId": "セッション ID", - "kbn.advancedSettings.courier.requestPreferenceText": "どのシャードが検索リクエストを扱うかを設定できます。
    \n
  • {sessionId}: 同じシャードのすべての検索リクエストを実行するため、オペレーションを制限します。\n これにはリクエスト間でシャードのキャッシュを共有できるというメリットがあります。
  • \n
  • {custom}: 独自の設定が可能になります。\n couriercustomRequestPreference で設定値をカスタマイズします。
  • \n
  • {none}: 設定されていないことを意味します。\n これにより、リクエストが全シャードコピー間に分散されるため、パフォーマンスが改善される可能性があります。\n ただし、シャードによって更新ステータスが異なる場合があるため、結果に矛盾が生じる可能性があります。
  • \n
", - "kbn.advancedSettings.courier.requestPreferenceTitle": "リクエスト設定", - "kbn.advancedSettings.csv.quoteValuesText": "csv エクスポートに値を引用するかどうかです", - "kbn.advancedSettings.csv.quoteValuesTitle": "CSV の値を引用", - "kbn.advancedSettings.csv.separatorText": "エクスポートされた値をこの文字列で区切ります", - "kbn.advancedSettings.csv.separatorTitle": "CSV セパレーター", + "share.advancedSettings.csv.quoteValuesText": "csv エクスポートに値を引用するかどうかです", + "share.advancedSettings.csv.quoteValuesTitle": "CSV の値を引用", + "share.advancedSettings.csv.separatorText": "エクスポートされた値をこの文字列で区切ります", + "share.advancedSettings.csv.separatorTitle": "CSV セパレーター", "kbn.advancedSettings.darkModeText": "Kibana UI のダークモードを有効にします。この設定を適用するにはページの更新が必要です。", "kbn.advancedSettings.darkModeTitle": "ダークモード", "kbn.advancedSettings.dateFormat.dayOfWeekText": "週の初めの曜日を設定します", @@ -2081,38 +2141,11 @@ "kbn.advancedSettings.dateNanosFormatText": "Elasticsearch の {dateNanosLink} データタイプに使用されます", "kbn.advancedSettings.dateNanosFormatTitle": "ナノ秒フォーマットでの日付", "kbn.advancedSettings.dateNanosLinkTitle": "date_nanos", - "kbn.advancedSettings.defaultIndexText": "インデックスが設定されていない時にアクセスするインデックスです", - "kbn.advancedSettings.defaultIndexTitle": "デフォルトのインデックス", "kbn.advancedSettings.defaultRoute.defaultRouteIsRelativeValidationMessage": "相対 URL でなければなりません。", "kbn.advancedSettings.defaultRoute.defaultRouteText": "この設定は、Kibana 起動時のデフォルトのルートを設定します。この設定で、Kibana 起動時のランディングページを変更できます。経路は相対 URL でなければなりません。", "kbn.advancedSettings.defaultRoute.defaultRouteTitle": "デフォルトのルート", "kbn.advancedSettings.disableAnimationsText": "Kibana UI の不要なアニメーションをオフにします。変更を適用するにはページを更新してください。", "kbn.advancedSettings.disableAnimationsTitle": "アニメーションを無効にする", - "kbn.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数字フォーマット", - "kbn.advancedSettings.format.bytesFormatText": "「バイト」フォーマットのデフォルト {numeralFormatLink} です", - "kbn.advancedSettings.format.bytesFormatTitle": "バイトフォーマット", - "kbn.advancedSettings.format.currencyFormat.numeralFormatLinkText": "数字フォーマット", - "kbn.advancedSettings.format.currencyFormatText": "「通貨」フォーマットのデフォルト {numeralFormatLink} です", - "kbn.advancedSettings.format.currencyFormatTitle": "通貨フォーマット", - "kbn.advancedSettings.format.defaultTypeMapText": "各フィールドタイプにデフォルトで使用するフォーマット名のマップです。フィールドタイプが特に指定されていない場合は {defaultFormat} が使用されます", - "kbn.advancedSettings.format.defaultTypeMapTitle": "フィールドタイプフォーマット名", - "kbn.advancedSettings.format.formattingLocale.numeralLanguageLinkText": "数字言語", - "kbn.advancedSettings.format.formattingLocaleText": "{numeralLanguageLink} ロケール", - "kbn.advancedSettings.format.formattingLocaleTitle": "フォーマットロケール", - "kbn.advancedSettings.format.numberFormat.numeralFormatLinkText": "数字フォーマット", - "kbn.advancedSettings.format.numberFormatText": "「数字」フォーマットのデフォルト {numeralFormatLink} です", - "kbn.advancedSettings.format.numberFormatTitle": "数字フォーマット", - "kbn.advancedSettings.format.percentFormat.numeralFormatLinkText": "数字フォーマット", - "kbn.advancedSettings.format.percentFormatText": "「パーセント」フォーマットのデフォルト {numeralFormatLink} です", - "kbn.advancedSettings.format.percentFormatTitle": "パーセントフォーマット", - "kbn.advancedSettings.histogram.barTargetText": "日付ヒストグラムで「自動」間隔を使用する際、この数に近いバーの作成を試みます", - "kbn.advancedSettings.histogram.barTargetTitle": "目標バー数", - "kbn.advancedSettings.histogram.maxBarsText": "日付ヒストグラムに表示されるバーの数の上限です。必要に応じて値をスケーリングしてください", - "kbn.advancedSettings.histogram.maxBarsTitle": "最高バー数", - "kbn.advancedSettings.historyLimitText": "履歴があるフィールド (例: クエリインプット) に個の数の最近の値が表示されます", - "kbn.advancedSettings.historyLimitTitle": "履歴制限数", - "kbn.advancedSettings.indexPatternPlaceholderText": "「管理 > インデックスパターン > インデックスパターンを作成」で使用される「インデックスパターン名」フィールドのプレースホルダーです。", - "kbn.advancedSettings.indexPatternPlaceholderTitle": "インデックスパターンのプレースホルダー", "kbn.advancedSettings.maxCellHeightText": "表のセルが使用する高さの上限です。この切り捨てを無効にするには 0 に設定します", "kbn.advancedSettings.maxCellHeightTitle": "表のセルの高さの上限", "kbn.advancedSettings.notifications.banner.markdownLinkText": "マークダウン対応", @@ -2130,43 +2163,10 @@ "kbn.advancedSettings.pageNavigationLegacy": "レガシー", "kbn.advancedSettings.pageNavigationModern": "モダン", "kbn.advancedSettings.pageNavigationName": "サイドナビゲーションスタイル", - "kbn.advancedSettings.pinFiltersText": "フィルターがデフォルトでグローバル (ピン付けされた状態) になるかの設定です", - "kbn.advancedSettings.pinFiltersTitle": "フィルターをデフォルトでピン付けする", - "kbn.advancedSettings.query.allowWildcardsText": "設定すると、クエリ句の頭に * が使えるようになります。現在クエリバーで実験的クエリ機能が有効になっている場合にのみ適用されます。基本的な Lucene クエリでリーディングワイルドカードを無効にするには、{queryStringOptionsPattern} を使用します。", - "kbn.advancedSettings.query.allowWildcardsTitle": "クエリでリーディングワイルドカードを許可する", - "kbn.advancedSettings.query.queryStringOptions.optionsLinkText": "オプション", - "kbn.advancedSettings.query.queryStringOptionsText": "Lucene クエリ文字列パーサーの {optionsLink}「{queryLanguage}」が {luceneLanguage} に設定されている時にのみ使用されます。", - "kbn.advancedSettings.query.queryStringOptionsTitle": "クエリ文字列のオプション", - "kbn.advancedSettings.searchQueryLanguageKql": "KQL", - "kbn.advancedSettings.searchQueryLanguageLucene": "Lucene", - "kbn.advancedSettings.searchQueryLanguageText": "クエリバーで使用されるクエリ言語です。KQL は Kibana 用に特別に開発された新しい言語です。", - "kbn.advancedSettings.searchQueryLanguageTitle": "クエリ言語", - "kbn.advancedSettings.shortenFieldsText": "長いフィールドを短くします。例: foo.bar.baz の代わりに f.b.baz と表示", - "kbn.advancedSettings.shortenFieldsTitle": "フィールドの短縮", - "kbn.advancedSettings.sortOptions.optionsLinkText": "オプション", - "kbn.advancedSettings.sortOptionsText": "Elasticsearch の並べ替えパラメーターの {optionsLink}", - "kbn.advancedSettings.sortOptionsTitle": "並べ替えオプション", "kbn.advancedSettings.storeUrlText": "URL は長くなりすぎてブラウザが対応できない場合があります。セッションストレージに URL の一部を保存することがで この問題に対処できるかテストしています。結果を教えてください!", "kbn.advancedSettings.storeUrlTitle": "セッションストレージに URL を格納", - "kbn.advancedSettings.suggestFilterValuesText": "フィルターエディターがフィールドの値の候補を表示しないようにするには、このプロパティを false にしてください。", - "kbn.advancedSettings.suggestFilterValuesTitle": "フィルターエディターの候補値", - "kbn.advancedSettings.timepicker.last15Minutes": "過去 15 分間", - "kbn.advancedSettings.timepicker.last1Hour": "過去 1 時間", - "kbn.advancedSettings.timepicker.last1Year": "過去 1 年間", - "kbn.advancedSettings.timepicker.last24Hours": "過去 24 時間", - "kbn.advancedSettings.timepicker.last30Days": "過去 30 日間", - "kbn.advancedSettings.timepicker.last30Minutes": "過去 30 分間", - "kbn.advancedSettings.timepicker.last7Days": "過去 7 日間", - "kbn.advancedSettings.timepicker.last90Days": "過去 90 日間", - "kbn.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText": "対応フォーマット", - "kbn.advancedSettings.timepicker.quickRangesText": "タイムピッカーのクイックセクションに表示される範囲のリストです。それぞれのオブジェクトに「開始」、「終了」({acceptedFormatsLink} を参照)、「表示」(表示するタイトル) が含まれるオブジェクトの配列です。", - "kbn.advancedSettings.timepicker.quickRangesTitle": "タイムピッカーのクイック範囲", - "kbn.advancedSettings.timepicker.refreshIntervalDefaultsText": "時間フィルターのデフォルト更新間隔", - "kbn.advancedSettings.timepicker.refreshIntervalDefaultsTitle": "タイムピッカーの更新間隔", - "kbn.advancedSettings.timepicker.thisWeek": "今週", "kbn.advancedSettings.timepicker.timeDefaultsText": "時間フィルターが選択されずに Kibana が起動した際に使用される時間フィルターです", "kbn.advancedSettings.timepicker.timeDefaultsTitle": "デフォルトのタイムピッカー", - "kbn.advancedSettings.timepicker.today": "今日", "kbn.advancedSettings.visualization.showRegionMapWarningsText": "用語がマップの形に合わない場合に地域マップに警告を表示するかどうかです。", "kbn.advancedSettings.visualization.showRegionMapWarningsTitle": "地域マップに警告を表示", "kbn.advancedSettings.visualization.tileMap.maxPrecision.cellDimensionsLinkText": "ディメンションの説明", @@ -2175,8 +2175,8 @@ "kbn.advancedSettings.visualization.tileMap.wmsDefaults.propertiesLinkText": "プロパティ", "kbn.advancedSettings.visualization.tileMap.wmsDefaultsText": "座標マップの WMS マップサーバーサポートのデフォルトの {propertiesLink} です。", "kbn.advancedSettings.visualization.tileMap.wmsDefaultsTitle": "デフォルトの WMS プロパティ", - "kbn.advancedSettings.visualizeEnableLabsText": "ユーザーが実験的なビジュアライゼーションを作成、表示、編集できるようになります。無効の場合、\n ユーザーは本番準備が整ったビジュアライゼーションのみを利用できます。", - "kbn.advancedSettings.visualizeEnableLabsTitle": "実験的なビジュアライゼーションを有効にする", + "visualizations.advancedSettings.visualizeEnableLabsText": "ユーザーが実験的なビジュアライゼーションを作成、表示、編集できるようになります。無効の場合、\n ユーザーは本番準備が整ったビジュアライゼーションのみを利用できます。", + "visualizations.advancedSettings.visualizeEnableLabsTitle": "実験的なビジュアライゼーションを有効にする", "kibana_legacy.bigUrlWarningNotificationMessage": "{advancedSettingsLink}で{storeInSessionStorageParam}オプションを有効にするか、オンスクリーンビジュアルを簡素化してください。", "kibana_legacy.bigUrlWarningNotificationMessage.advancedSettingsLinkText": "高度な設定", "kibana_legacy.bigUrlWarningNotificationTitle": "URLが大きく、Kibanaの動作が停止する可能性があります", @@ -3971,14 +3971,14 @@ "xpack.actions.serverSideErrors.unavailableLicenseErrorMessage": "現時点でライセンス情報を入手できないため、アクションタイプ {actionTypeId} は無効です。", "xpack.actions.serverSideErrors.unavailableLicenseInformationErrorMessage": "グラフを利用できません。現在ライセンス情報が利用できません。", "xpack.actions.urlWhitelistConfigurationError": "target {field} \"{value}\" は Kibana 構成 xpack.actions.whitelistedHosts にはホワイトリスト化されていません。", - "xpack.advancedUiActions.components.actionWizard.changeButton": "変更", - "xpack.advancedUiActions.customizePanelTimeRange.modal.addToPanelButtonTitle": "パネルに追加", - "xpack.advancedUiActions.customizePanelTimeRange.modal.cancelButtonTitle": "キャンセル", - "xpack.advancedUiActions.customizePanelTimeRange.modal.optionsMenuForm.panelTitleFormRowLabel": "時間範囲", - "xpack.advancedUiActions.customizePanelTimeRange.modal.removeButtonTitle": "削除", - "xpack.advancedUiActions.customizePanelTimeRange.modal.updatePanelTimeRangeButtonTitle": "更新", - "xpack.advancedUiActions.customizeTimeRange.modal.headerTitle": "パネルの時間範囲のカスタマイズ", - "xpack.advancedUiActions.customizeTimeRangeMenuItem.displayName": "時間範囲のカスタマイズ", + "xpack.uiActionsEnhanced.components.actionWizard.changeButton": "変更", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.addToPanelButtonTitle": "パネルに追加", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.cancelButtonTitle": "キャンセル", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.optionsMenuForm.panelTitleFormRowLabel": "時間範囲", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.removeButtonTitle": "削除", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.updatePanelTimeRangeButtonTitle": "更新", + "xpack.uiActionsEnhanced.customizeTimeRange.modal.headerTitle": "パネルの時間範囲のカスタマイズ", + "xpack.uiActionsEnhanced.customizeTimeRangeMenuItem.displayName": "時間範囲のカスタマイズ", "xpack.alerts.alertNavigationRegistry.get.missingNavigationError": "「{consumer}」内のアラートタイプ「{alertType}」のナビゲーションは登録されていません。", "xpack.alerts.alertNavigationRegistry.register.duplicateDefaultError": "「{consumer}」内のデフォルトナビゲーションは既に登録されています。", "xpack.alerts.alertNavigationRegistry.register.duplicateNavigationError": "「{consumer}」内のアラートタイプ「{alertType}」のナビゲーションは既に登録されています。", @@ -6579,7 +6579,6 @@ "xpack.idxMgmt.indexTemplatesList.emptyPrompt.noIndexTemplatesTitle": "まだテンプレートがありません", "xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesDescription": "テンプレートを読み込み中…", "xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesErrorMessage": "テンプレートの読み込み中にエラーが発生", - "xpack.idxMgmt.indexTemplatesTable.systemIndexTemplatesSwitchLabel": "システムテンプレートを含める", "xpack.idxMgmt.licenseCheckErrorMessage": "ライセンス確認失敗", "xpack.idxMgmt.mappingsEditor.addFieldButtonLabel": "フィールドの追加", "xpack.idxMgmt.mappingsEditor.addMultiFieldTooltipLabel": "同じフィールドを異なる方法でインデックスするために、マルチフィールドを追加します。", @@ -7077,27 +7076,13 @@ "xpack.idxMgmt.templateCreate.loadingTemplateToCloneDescription": "クローンを作成するテンプレートを読み込み中…", "xpack.idxMgmt.templateCreate.loadingTemplateToCloneErrorMessage": "クローンを作成するテンプレートを読み込み中にエラーが発生", "xpack.idxMgmt.templateDetails.aliasesTab.noAliasesTitle": "エイリアスが定義されていません。", - "xpack.idxMgmt.templateDetails.aliasesTabTitle": "エイリアス", - "xpack.idxMgmt.templateDetails.cloneButtonLabel": "クローンを作成", - "xpack.idxMgmt.templateDetails.closeButtonLabel": "閉じる", - "xpack.idxMgmt.templateDetails.deleteButtonLabel": "削除", - "xpack.idxMgmt.templateDetails.editButtonLabel": "編集", - "xpack.idxMgmt.templateDetails.loadingIndexTemplateDescription": "テンプレートを読み込み中…", - "xpack.idxMgmt.templateDetails.loadingIndexTemplateErrorMessage": "テンプレートの読み込み中にエラーが発生", - "xpack.idxMgmt.templateDetails.manageButtonLabel": "管理", - "xpack.idxMgmt.templateDetails.manageContextMenuPanelTitle": "テンプレートオプション", - "xpack.idxMgmt.templateDetails.managedTemplateInfoDescription": "マネージドテンプレートは内部オペレーションに不可欠です。", - "xpack.idxMgmt.templateDetails.managedTemplateInfoTitle": "マネジドテンプレートの編集は許可されていません。", "xpack.idxMgmt.templateDetails.mappingsTab.noMappingsTitle": "マッピングが定義されていません。", - "xpack.idxMgmt.templateDetails.mappingsTabTitle": "マッピング", "xpack.idxMgmt.templateDetails.settingsTab.noSettingsTitle": "設定が定義されていません。", - "xpack.idxMgmt.templateDetails.settingsTabTitle": "設定", "xpack.idxMgmt.templateDetails.summaryTab.ilmPolicyDescriptionListTitle": "ILM ポリシー", "xpack.idxMgmt.templateDetails.summaryTab.indexPatternsDescriptionListTitle": "インデックス{numIndexPatterns, plural, one {パターン} other {パターン}}", "xpack.idxMgmt.templateDetails.summaryTab.noneDescriptionText": "なし", "xpack.idxMgmt.templateDetails.summaryTab.orderDescriptionListTitle": "順序", "xpack.idxMgmt.templateDetails.summaryTab.versionDescriptionListTitle": "バージョン", - "xpack.idxMgmt.templateDetails.summaryTabTitle": "まとめ", "xpack.idxMgmt.templateEdit.loadingIndexTemplateDescription": "テンプレートを読み込み中…", "xpack.idxMgmt.templateEdit.loadingIndexTemplateErrorMessage": "テンプレートの読み込み中にエラーが発生", "xpack.idxMgmt.templateEdit.managedTemplateWarningDescription": "管理されているテンプレートは内部オペレーションに不可欠です。", @@ -7161,26 +7146,12 @@ "xpack.idxMgmt.templateForm.stepSettings.settingsDescription": "インデックスの動作を定義します。", "xpack.idxMgmt.templateForm.stepSettings.settingsEditorHelpText": "JSON フォーマットを使用: {code}", "xpack.idxMgmt.templateForm.stepSettings.stepTitle": "インデックス設定 (任意)", - "xpack.idxMgmt.templateList.table.actionCloneDescription": "このテンプレートのクローンを作成します", - "xpack.idxMgmt.templateList.table.actionCloneTitle": "クローンを作成", - "xpack.idxMgmt.templateList.table.actionColumnTitle": "アクション", - "xpack.idxMgmt.templateList.table.actionDeleteDecription": "このテンプレートを削除します", - "xpack.idxMgmt.templateList.table.actionDeleteText": "削除", - "xpack.idxMgmt.templateList.table.actionEditDecription": "このテンプレートを編集します", - "xpack.idxMgmt.templateList.table.actionEditText": "編集", - "xpack.idxMgmt.templateList.table.aliasesColumnTitle": "エイリアス", - "xpack.idxMgmt.templateList.table.createTemplatesButtonLabel": "テンプレートを作成", - "xpack.idxMgmt.templateList.table.deleteManagedTemplateTooltip": "管理されているテンプレートは削除できません。", - "xpack.idxMgmt.templateList.table.deleteTemplatesButtonLabel": "{count, plural, one {テンプレート} other {テンプレート} }を削除", "xpack.idxMgmt.templateList.table.ilmPolicyColumnDescription": "インデックスライフサイクルポリシー「{policyName}」", "xpack.idxMgmt.templateList.table.ilmPolicyColumnTitle": "ILM ポリシー", "xpack.idxMgmt.templateList.table.indexPatternsColumnTitle": "インデックスパターン", - "xpack.idxMgmt.templateList.table.mappingsColumnTitle": "マッピング", "xpack.idxMgmt.templateList.table.nameColumnTitle": "名前", "xpack.idxMgmt.templateList.table.noIndexTemplatesMessage": "インデックステンプレートが見つかりません", - "xpack.idxMgmt.templateList.table.orderColumnTitle": "順序", "xpack.idxMgmt.templateList.table.reloadTemplatesButtonLabel": "再読み込み", - "xpack.idxMgmt.templateList.table.settingsColumnTitle": "設定", "xpack.idxMgmt.templateValidation.indexPatternsRequiredError": "インデックスパターンが最低 1 つ必要です。", "xpack.idxMgmt.templateValidation.templateNameInvalidaCharacterError": "テンプレート名に「{invalidChar}」は使用できません", "xpack.idxMgmt.templateValidation.templateNameLowerCaseRequiredError": "テンプレート名は小文字でなければなりません。", @@ -13427,1531 +13398,1531 @@ "xpack.server.checkLicense.errorExpiredMessage": "{licenseType} ライセンスが期限切れのため {pluginName} を使用できません", "xpack.server.checkLicense.errorUnavailableMessage": "現在ライセンス情報が利用できないため {pluginName} を使用できません。", "xpack.server.checkLicense.errorUnsupportedMessage": "ご使用の {licenseType} ライセンスは {pluginName} をサポートしていません。ライセンスをアップグレードしてください。", - "xpack.siem.add_filter_to_global_search_bar.filterForValueHoverAction": "値でフィルターします", - "xpack.siem.add_filter_to_global_search_bar.filterOutValueHoverAction": "値を除外", - "xpack.siem.alertsView.alertsDocumentType": "外部アラート", - "xpack.siem.alertsView.alertsGraphTitle": "外部アラート数", - "xpack.siem.alertsView.alertsStackByOptions.module": "モジュール", - "xpack.siem.alertsView.alertsTableTitle": "外部アラート", - "xpack.siem.alertsView.categoryLabel": "カテゴリー", - "xpack.siem.alertsView.errorFetchingAlertsData": "アラートデータをクエリできませんでした", - "xpack.siem.alertsView.moduleLabel": "モジュール", - "xpack.siem.alertsView.showing": "表示中", - "xpack.siem.alertsView.totalCountOfAlerts": "外部アラートが検索条件に一致します", - "xpack.siem.alertsView.unit": "外部{totalCount, plural, =1 {alert} other {alerts}}", - "xpack.siem.andOrBadge.and": "AND", - "xpack.siem.andOrBadge.or": "OR", - "xpack.siem.anomaliesTable.table.anomaliesDescription": "異常", - "xpack.siem.anomaliesTable.table.anomaliesTooltip": "異常表は SIEM グローバル KQL 検索でフィルタリングできません。", - "xpack.siem.anomaliesTable.table.showingDescription": "表示中", - "xpack.siem.anomaliesTable.table.unit": "{totalCount, plural, =1 {anomaly} other {anomalies}}", - "xpack.siem.auditd.abortedAuditStartupDescription": "中断された監査のスタートアップ", - "xpack.siem.auditd.accessErrorDescription": "アクセスエラー", - "xpack.siem.auditd.accessPermissionDescription": "アクセス権限", - "xpack.siem.auditd.accessResultDescription": "アクセス結果", - "xpack.siem.auditd.acquiredCredentialsDescription": "認証情報を取得しました:", - "xpack.siem.auditd.adddedGroupAccountUsingDescription": "以下を使用してグループアカウントを追加:", - "xpack.siem.auditd.addedUserAccountDescription": "ユーザーアカウントを追加しました", - "xpack.siem.auditd.allocatedMemoryForDescription": "割当メモリー", - "xpack.siem.auditd.asDescription": "as", - "xpack.siem.auditd.assignedUserRoleToDescription": "ユーザーロールをアサインしました:", - "xpack.siem.auditd.assignedVmIdDescription": "vm id が割り当てられました", - "xpack.siem.auditd.assignedVMResourceDescription": "割り当てられた vm リソース", - "xpack.siem.auditd.attemptedLoginDescription": "以下を経由してログインを試行しました:", - "xpack.siem.auditd.attemptedLoginFromUnusalPlaceDescription": "通常と異なる場所からログインを試行しました", - "xpack.siem.auditd.attemptedLoginFromUnusualHourDescription": "通常と異なる時間にログインを試行しました", - "xpack.siem.auditd.auditErrorDescription": "監査エラー", - "xpack.siem.auditd.authenticatedToGroupDescription": "グループに認証しました", - "xpack.siem.auditd.authenticatedUsingDescription": "次の手段で認証しました:", - "xpack.siem.auditd.bootedSystemDescription": "システムを起動しました", - "xpack.siem.auditd.boundSocketFromDescription": "次からソケットをバインドしました:", - "xpack.siem.auditd.causedMacPolicyErrorDescription": "がmacポリシーエラーを発生させました", - "xpack.siem.auditd.changedAuditConfigurationDescription": "監査設定を変更しました", - "xpack.siem.auditd.changedAuditFeatureDescription": "監査機能を変更しました", - "xpack.siem.auditd.changedConfigurationWIthDescription": "次の設定を変更しました:", - "xpack.siem.auditd.ChangedFileAttributesOfDescription": "次のファイル属性を変更しました:", - "xpack.siem.auditd.changedFilePermissionOfDescription": "次のファイル権限を変更しました:", - "xpack.siem.auditd.changedGroupDescription": "グループを変更しました", - "xpack.siem.auditd.changedGroupPasswordDescription": "グループのパスワードを変更しました", - "xpack.siem.auditd.changedIdentityUsingDescription": "以下を使用してIDを変更しました:", - "xpack.siem.auditd.changedLoginIdToDescription": "ログインIDを次に変更しました:", - "xpack.siem.auditd.changedMacConfigurationDescription": "mac構成を変更しました", - "xpack.siem.auditd.changedPasswordWithDescription": "次のパスワードを変更しました:", - "xpack.siem.auditd.changedRoleUsingDescription": "以下を使用してロールを変更しました:", - "xpack.siem.auditd.changedSeLinuxBooleanDescription": "selinuxブールを変更しました", - "xpack.siem.auditd.changedSelinuxEnforcementDescription": "selinux執行を変更しました", - "xpack.siem.auditd.changedSystemNameDescription": "システム名を変更しました", - "xpack.siem.auditd.changedSystemTimeWithDescription": "次のシステム時刻を変更しました:", - "xpack.siem.auditd.changedTimeStampOfDescription": "次のタイムスタンプを変更しました:", - "xpack.siem.auditd.changedToRunLevelWithDescription": "次の実行レベルを変更しました:", - "xpack.siem.auditd.changedUserIdDescription": "ユーザー ID が変更されました", - "xpack.siem.auditd.changeidleOwernshipOfDescription": "次のファイルの所有者を変更:", - "xpack.siem.auditd.checkedFileSystemMetadataOfDescription": "次のファイルシステムメタデータを確認しました:", - "xpack.siem.auditd.checkedIntegrityOfDescription": "次の整合性を確認しました:", - "xpack.siem.auditd.chedckedMetaDataOfDescription": "次のメタデータを確認しました:", - "xpack.siem.auditd.connectedUsingDescription": "以下を使用して接続しました:", - "xpack.siem.auditd.crashedProgramDescription": "がプログラムをクラッシュさせました", - "xpack.siem.auditd.createdDirectoryDescription": "ディレクトリを作成しました", - "xpack.siem.auditd.createdVmImageDescription": "仮想マシンイメージを作成しました", - "xpack.siem.auditd.cryptoOfficerLoggedInDescription": "クリプトオフィサーがログイン", - "xpack.siem.auditd.cryptoOfficerLoggedOutDescription": "クリプトオフィサーがログアウト", - "xpack.siem.auditd.deletedDescription": "削除されました", - "xpack.siem.auditd.deletedGroupAccountUsingDescription": "次の手段でグループアカウントを削除", - "xpack.siem.auditd.deletedUserAccountUsingDescription": "以下を使用してユーザーアカウントを削除しました:", - "xpack.siem.auditd.deletedVmImageDescription": "仮想マシンイメージを削除しました", - "xpack.siem.auditd.disposedCredentialsDescription": "次のアカウント認証情報を処理しました:", - "xpack.siem.auditd.endedFromDescription": "終了:", - "xpack.siem.auditd.errorFromDescription": "エラー:", - "xpack.siem.auditd.executedDescription": "実行", - "xpack.siem.auditd.executionOfForbiddenProgramDescription": "禁止されたプログラムの実行", - "xpack.siem.auditd.failedLoginTooManyTimesDescription": "ログイン回数超過によりログインに失敗", - "xpack.siem.auditd.inDescription": "次に含まれる:", - "xpack.siem.auditd.initializedAuditSubsystemDescription": "監査サブシステムを初期化しました", - "xpack.siem.auditd.issuedVmControlDescription": "仮想マシンコントロールを発行しました", - "xpack.siem.auditd.killedProcessIdDescription": "プロセスIDを強制終了しました:", - "xpack.siem.auditd.ListeningForConnectionsUsingDescription": "以下を使用して接続をlistenしています:", - "xpack.siem.auditd.loadedFirewallRuleDescription": "ファイアウォールルールを読み込みました", - "xpack.siem.auditd.loadedMacPolicyDescription": "macポリシーを読み込みました", - "xpack.siem.auditd.loadedSeLinuxPolicyDescription": "selinuxポリシーを読み込みました", - "xpack.siem.auditd.loaedKernelModuleOfDescription": "次のカーネルモジュールを読み込みました:", - "xpack.siem.auditd.lockedAccountDescription": "アカウントをロック", - "xpack.siem.auditd.loggedOutDescription": "ログアウト", - "xpack.siem.auditd.macPermissionDescription": "mac権限", - "xpack.siem.auditd.madeDeviceWithDescription": "デバイスを作成しました:", - "xpack.siem.auditd.migratedVmFromDescription": "仮想マシンを以下から移行しました:", - "xpack.siem.auditd.migratedVmToDescription": "仮想マシンを以下に移行しました:", - "xpack.siem.auditd.modifiedGroupAccountDescription": "グループアカウントを修正", - "xpack.siem.auditd.modifiedLevelOfDescription": "次のレベルを修正:", - "xpack.siem.auditd.modifiedRoleDescription": "ロールを修正:", - "xpack.siem.auditd.modifiedUserAccountDescription": "ユーザーアカウントを修正", - "xpack.siem.auditd.mountedDescription": "マウントしました", - "xpack.siem.auditd.negotiatedCryptoKeyDescription": "暗号キーを交渉しました", - "xpack.siem.auditd.nonExistentDescription": "不明なプロセスに", - "xpack.siem.auditd.OpenedFileDescription": "ファイルを開きました", - "xpack.siem.auditd.openedTooManySessionsDescription": "開いたセッション数が多すぎました", - "xpack.siem.auditd.overrodeLabelOfDescription": "次のラベルを上書き:", - "xpack.siem.auditd.promiscuousModeDescription": "以下を使用してデバイスの無差別モードを変更しました:", - "xpack.siem.auditd.ranCommandDescription": "コマンドを実行しました", - "xpack.siem.auditd.receivedFromDescription": "以下より受信しました:", - "xpack.siem.auditd.reconfiguredAuditDescription": "監査を再構成しました", - "xpack.siem.auditd.refreshedCredentialsForDescription": "認証情報をリフレッシュしました", - "xpack.siem.auditd.relabeledFileSystemDescription": "ファイルシステムのラベルを変更しました", - "xpack.siem.auditd.remoteAuditConnectedDescription": "リモート監査を接続", - "xpack.siem.auditd.remoteAuditDisconnectedDescription": "リモート監査を切断", - "xpack.siem.auditd.removedUserRoleFromDescription": "以下からユーザーロールを削除しました:", - "xpack.siem.auditd.renamedDescription": "名前を変更しました", - "xpack.siem.auditd.resumedAuditLoggingDescription": "監査ログを再開しました", - "xpack.siem.auditd.rotatedAuditLogsDescription": "rotated-audit-logs", - "xpack.siem.auditd.scheduledPolicyOFDescription": "次のポリシーをスケジュール設定しました:", - "xpack.siem.auditd.sentMessageDescription": "メッセージを送信しました", - "xpack.siem.auditd.sentTestDescription": "テストを送信しました", - "xpack.siem.auditd.sentToDescription": "送信先:", - "xpack.siem.auditd.sessionDescription": "セッション", - "xpack.siem.auditd.shutDownAuditDescription": "監査をシャットダウン", - "xpack.siem.auditd.shutdownSystemDescription": "システムをシャットダウン", - "xpack.siem.auditd.startedAtDescription": "開始済み", - "xpack.siem.auditd.startedAuditDescription": "監査を開始", - "xpack.siem.auditd.startedCryptoSessionDescription": "暗号セッションを開始しました", - "xpack.siem.auditd.startedServiceDescription": "サービスを開始しました", - "xpack.siem.auditd.stoppedServiceDescription": "サービスを停止しました", - "xpack.siem.auditd.suspiciousProgramDescription": "不審なプログラムを使用しました", - "xpack.siem.auditd.symLinkedDescription": "シンボルでリンクしました", - "xpack.siem.auditd.testedFileSystemIntegrityDescription": "ファイルシステムの完全性をテスト", - "xpack.siem.auditd.unknownDescription": "不明", - "xpack.siem.auditd.unloadedKernelModuleOfDescription": "次のカーネルモジュールをアンロードしました:", - "xpack.siem.auditd.unlockedAccountDescription": "アカウントのロックを解除しました:", - "xpack.siem.auditd.unmountedDescription": "マウント解除しました", - "xpack.siem.auditd.usingDescription": "using", - "xpack.siem.auditd.violatedAppArmorPolicyFromDescription": "以下からのAppArmorポリシーに違反しました:", - "xpack.siem.auditd.violatedSeccompPolicyWithDescription": "以下からのseccompポリシーに違反しました:", - "xpack.siem.auditd.violatedSeLinuxPolicyDescription": "selinuxポリシーに違反しました", - "xpack.siem.auditd.wasAuthorizedToUseDescription": "が以下の使用を承認されました:", - "xpack.siem.auditd.withResultDescription": "結果付き", - "xpack.siem.authenticationsTable.authenticationFailures": "認証", - "xpack.siem.authenticationsTable.failures": "失敗", - "xpack.siem.authenticationsTable.lastFailedDestination": "前回失敗したデスティネーション", - "xpack.siem.authenticationsTable.lastFailedSource": "前回失敗したソース", - "xpack.siem.authenticationsTable.lastFailedTime": "前回の失敗", - "xpack.siem.authenticationsTable.lastSuccessfulDestination": "前回成功したデスティネーション", - "xpack.siem.authenticationsTable.lastSuccessfulSource": "前回成功したソース", - "xpack.siem.authenticationsTable.lastSuccessfulTime": "前回の成功", - "xpack.siem.authenticationsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.authenticationsTable.successes": "成功", - "xpack.siem.authenticationsTable.uncommonProcessTable": "非共通プロセス", - "xpack.siem.authenticationsTable.unit": "{totalCount, plural, =1 {user} other {users}}", - "xpack.siem.authenticationsTable.user": "ユーザー", - "xpack.siem.case.allCases.actions": "アクション", - "xpack.siem.case.allCases.comments": "コメント", - "xpack.siem.case.allCases.noTagsAvailable": "利用可能なタグがありません", - "xpack.siem.case.caseSavedObjectNoPermissionsMessage": "ケースを表示するには、Kibanaスペースで保存されたオブジェクト管理機能の権限が必要です。詳細については、Kibana管理者に連絡してください。", - "xpack.siem.case.caseSavedObjectNoPermissionsTitle": "Kibana機能権限が必要です", - "xpack.siem.case.caseTable.addNewCase": "新規ケースの追加", - "xpack.siem.case.caseTable.bulkActions": "一斉アクション", - "xpack.siem.case.caseTable.bulkActions.closeSelectedTitle": "選択した項目を閉じる", - "xpack.siem.case.caseTable.bulkActions.deleteSelectedTitle": "選択した項目を削除", - "xpack.siem.case.caseTable.bulkActions.openSelectedTitle": "選択した項目を再開", - "xpack.siem.case.caseTable.caseDetailsLinkAria": "クリックすると、タイトル{detailName}のケースを表示します", - "xpack.siem.case.caseTable.closed": "終了", - "xpack.siem.case.caseTable.closedCases": "終了したケース", - "xpack.siem.case.caseTable.delete": "削除", - "xpack.siem.case.caseTable.incidentSystem": "インシデント管理システム", - "xpack.siem.case.caseTable.noCases.body": "表示するケースがありません。新しいケースを作成するか、または上記のフィルター設定を変更してください。", - "xpack.siem.case.caseTable.noCases.title": "ケースなし", - "xpack.siem.case.caseTable.notPushed": "プッシュされません", - "xpack.siem.case.caseTable.openCases": "ケースを開く", - "xpack.siem.case.caseTable.refreshTitle": "更新", - "xpack.siem.case.caseTable.requiresUpdate": " 更新が必要", - "xpack.siem.case.caseTable.searchAriaLabel": "ケースの検索", - "xpack.siem.case.caseTable.searchPlaceholder": "例: ケース名", - "xpack.siem.case.caseTable.selectedCasesTitle": "{totalRules} {totalRules, plural, =1 {ケース} other {ケース}} を選択しました", - "xpack.siem.case.caseTable.serviceNowLinkAria": "クリックすると、servicenowでインシデントを表示します", - "xpack.siem.case.caseTable.showingCasesTitle": "{totalRules} {totalRules, plural, =1 {ケース} other {ケース}} を表示中", - "xpack.siem.case.caseTable.snIncident": "外部インシデント", - "xpack.siem.case.caseTable.unit": "{totalCount, plural, =1 {case} other {cases}}", - "xpack.siem.case.caseTable.upToDate": " は最新です", - "xpack.siem.case.caseView.actionHeadline": "{actionDate} の {userName} {actionName}", - "xpack.siem.case.caseView.actionLabel.addComment": "コメントを追加しました", - "xpack.siem.case.caseView.actionLabel.addDescription": "説明を追加しました", - "xpack.siem.case.caseView.actionLabel.addedField": "追加しました", - "xpack.siem.case.caseView.actionLabel.changededField": "変更しました", - "xpack.siem.case.caseView.actionLabel.editedField": "編集しました", - "xpack.siem.case.caseView.actionLabel.on": "日付", - "xpack.siem.case.caseView.actionLabel.pushedNewIncident": "新しいインシデントとしてプッシュしました", - "xpack.siem.case.caseView.actionLabel.removedField": "削除しました", - "xpack.siem.case.caseView.actionLabel.removedThirdParty": "外部のインシデント管理システムを削除しました", - "xpack.siem.case.caseView.actionLabel.selectedThirdParty": "インシデント管理システムとして{ thirdParty }を選択しました", - "xpack.siem.case.caseView.actionLabel.updateIncident": "インシデントを更新しました", - "xpack.siem.case.caseView.actionLabel.viewIncident": "{incidentNumber}を表示", - "xpack.siem.case.caseView.alreadyPushedToExternalService": "既に{ externalService }インシデントにプッシュしました", - "xpack.siem.case.caseView.backLabel": "ケースに戻る", - "xpack.siem.case.caseView.breadcrumb": "作成", - "xpack.siem.case.caseView.cancel": "キャンセル", - "xpack.siem.case.caseView.case": "ケース", - "xpack.siem.case.caseView.caseClosed": "ケースを閉じました", - "xpack.siem.case.caseView.caseName": "ケース名", - "xpack.siem.case.caseView.caseOpened": "ケースを開きました", - "xpack.siem.case.caseView.caseRefresh": "ケースを更新", - "xpack.siem.case.caseView.closeCase": "ケースを閉じる", - "xpack.siem.case.caseView.closedCase": "閉じたケース", - "xpack.siem.case.caseView.closedOn": "終了日", - "xpack.siem.case.caseView.cloudDeploymentLink": "クラウド展開", - "xpack.siem.case.caseView.comment": "コメント", - "xpack.siem.case.caseView.comment.addComment": "コメントを追加", - "xpack.siem.case.caseView.comment.addCommentHelpText": "新しいコメントを追加...", - "xpack.siem.case.caseView.commentFieldRequiredError": "コメントが必要です。", - "xpack.siem.case.caseView.connectorConfigureLink": "コネクター", - "xpack.siem.case.caseView.connectors": "外部インシデント管理システム", - "xpack.siem.case.caseView.copyCommentLinkAria": "参照リンクをコピー", - "xpack.siem.case.caseView.create": "新規ケースを作成", - "xpack.siem.case.caseView.createCase": "ケースを作成", - "xpack.siem.case.caseView.description": "説明", - "xpack.siem.case.caseView.description.save": "保存", - "xpack.siem.case.caseView.edit": "編集", - "xpack.siem.case.caseView.edit.comment": "コメントを編集", - "xpack.siem.case.caseView.edit.description": "説明を編集", - "xpack.siem.case.caseView.edit.quote": "お客様の声", - "xpack.siem.case.caseView.editActionsLinkAria": "クリックすると、すべてのアクションを表示します", - "xpack.siem.case.caseView.editConnector": "外部インシデント管理システムを変更", - "xpack.siem.case.caseView.editTagsLinkAria": "クリックすると、タグを編集します", - "xpack.siem.case.caseView.emailBody": "ケースリファレンス: {caseUrl}", - "xpack.siem.case.caseView.emailSubject": "SIEM ケース - {caseTitle}", - "xpack.siem.case.caseView.errorsPushServiceCallOutTitle": "ケースを外部システムにプッシュするには、以下が必要です。", - "xpack.siem.case.caseView.fieldRequiredError": "必須フィールド", - "xpack.siem.case.caseView.goToDocumentationButton": "ドキュメンテーションを表示", - "xpack.siem.case.caseView.moveToCommentAria": "参照されたコメントをハイライト", - "xpack.siem.case.caseView.name": "名前", - "xpack.siem.case.caseView.noReportersAvailable": "利用可能なレポートがありません", - "xpack.siem.case.caseView.noTags": "現在、このケースにタグは割り当てられていません。", - "xpack.siem.case.caseView.openedOn": "開始日", - "xpack.siem.case.caseView.optional": "オプション", - "xpack.siem.case.caseView.pageBadgeLabel": "ベータ", - "xpack.siem.case.caseView.pageBadgeTooltip": "ケースワークフローはまだベータです。Kibana repo で問題や不具合を報告して製品の改善にご協力ください。", - "xpack.siem.case.caseView.particpantsLabel": "参加者", - "xpack.siem.case.caseView.pushNamedIncident": "{ thirdParty }インシデントとしてプッシュ", - "xpack.siem.case.caseView.pushThirdPartyIncident": "サードパーティインシデントとしてプッシュ", - "xpack.siem.case.caseView.pushToServiceDisableBecauseCaseClosedDescription": "終了したケースは外部システムに送信できません。外部システムでケースを開始または更新したい場合にはケースを再開します。", - "xpack.siem.case.caseView.pushToServiceDisableBecauseCaseClosedTitle": "ケースを再開する", - "xpack.siem.case.caseView.pushToServiceDisableByConfigDescription": "kibana.yml ファイルは、特定のコネクターのみを許可するように構成されています。外部システムでケースを開けるようにするには、xpack.actions.enabled Actiontypes 設定に .servicenow を追加します。詳細は {link} をご覧ください。", - "xpack.siem.case.caseView.pushToServiceDisableByConfigTitle": "Kibana の構成ファイルで ServiceNow を有効にする", - "xpack.siem.case.caseView.pushToServiceDisableByLicenseDescription": "外部システムでケースを開くには、ライセンスをプラチナに更新するか、30 日間の無料トライアルを開始するか、AWS、GCP、または Azure で {link} にサインアップする必要があります。", - "xpack.siem.case.caseView.pushToServiceDisableByLicenseTitle": "E lastic Platinum へのアップグレード", - "xpack.siem.case.caseView.pushToServiceDisableByNoCaseConfigTitle": "外部コネクターを選択", - "xpack.siem.case.caseView.pushToServiceDisableByNoConfigTitle": "外部コネクターを構成", - "xpack.siem.case.caseView.reopenCase": "ケースを再開", - "xpack.siem.case.caseView.reopenedCase": "ケースを再開する", - "xpack.siem.case.caseView.reporterLabel": "報告者", - "xpack.siem.case.caseView.requiredUpdateToExternalService": "{ externalService }インシデントの更新が必要です", - "xpack.siem.case.caseView.sendEmalLinkAria": "クリックすると、{user}に電子メールを送信します", - "xpack.siem.case.caseView.statusLabel": "ステータス", - "xpack.siem.case.caseView.tags": "タグ", - "xpack.siem.case.caseView.to": "に", - "xpack.siem.case.caseView.unknown": "不明", - "xpack.siem.case.caseView.updateNamedIncident": "{ thirdParty }インシデントを更新", - "xpack.siem.case.caseView.updateThirdPartyIncident": "サードパーティインシデントを更新", - "xpack.siem.case.configure.errorPushingToService": "サービスへのプッシュエラー", - "xpack.siem.case.configure.successSaveToast": "保存された外部接続設定", - "xpack.siem.case.configureCases.addNewConnector": "新しいコネクターを追加", - "xpack.siem.case.configureCases.cancelButton": "キャンセル", - "xpack.siem.case.configureCases.caseClosureOptionsClosedIncident": "新しいインシデントが外部システムで閉じたときにSIEMケースを自動的に閉じる", - "xpack.siem.case.configureCases.caseClosureOptionsDesc": "SIEMケースの終了のしかたを定義します。自動ケース終了のためには、外部のインシデント管理システムへの接続を確立する必要がいります。", - "xpack.siem.case.configureCases.caseClosureOptionsLabel": "ケース終了オプション", - "xpack.siem.case.configureCases.caseClosureOptionsManual": "SIEM ケースを手動で閉じる", - "xpack.siem.case.configureCases.caseClosureOptionsNewIncident": "新しいインシデントを外部システムにプッシュするときにSIEMケースを自動的に閉じる", - "xpack.siem.case.configureCases.caseClosureOptionsTitle": "ケースのクローズ", - "xpack.siem.case.configureCases.fieldMappingDesc": "データをサードパーティにプッシュするときにSIEMケースフィールドをマップします。フィールドマッピングのためには、外部のインシデント管理システムへの接続を確立する必要があります。", - "xpack.siem.case.configureCases.fieldMappingEditAppend": "末尾に追加", - "xpack.siem.case.configureCases.fieldMappingEditNothing": "何もしない", - "xpack.siem.case.configureCases.fieldMappingEditOverwrite": "上書き", - "xpack.siem.case.configureCases.fieldMappingFirstCol": "SIEM ケースフィールド", - "xpack.siem.case.configureCases.fieldMappingSecondCol": "外部インシデントフィールド", - "xpack.siem.case.configureCases.fieldMappingThirdCol": "編集時と更新時", - "xpack.siem.case.configureCases.fieldMappingTitle": "フィールドマッピング", - "xpack.siem.case.configureCases.headerTitle": "ケースを構成", - "xpack.siem.case.configureCases.incidentManagementSystemDesc": "オプションとして、SIEMケースを選択した外部のインシデント管理システムに接続できます。そうすると、選択したサードパーティシステム内でケースデータをインシデントとしてプッシュできます。", - "xpack.siem.case.configureCases.incidentManagementSystemLabel": "インシデント管理システム", - "xpack.siem.case.configureCases.incidentManagementSystemTitle": "外部のインシデント管理システムに接続", - "xpack.siem.case.configureCases.mappingFieldComments": "コメント", - "xpack.siem.case.configureCases.mappingFieldDescription": "説明", - "xpack.siem.case.configureCases.mappingFieldNotMapped": "マップされません", - "xpack.siem.case.configureCases.mappingFieldShortDescription": "短い説明", - "xpack.siem.case.configureCases.mappingFieldSummary": "まとめ", - "xpack.siem.case.configureCases.noConnector": "コネクターを選択していません", - "xpack.siem.case.configureCases.updateConnector": "コネクターを更新", - "xpack.siem.case.configureCases.updateSelectedConnector": "{ connectorName }を更新", - "xpack.siem.case.configureCases.warningMessage": "選択したコネクターが削除されました。別のコネクターを選択するか、新しいコネクターを作成してください。", - "xpack.siem.case.configureCases.warningTitle": "警告", - "xpack.siem.case.configureCasesButton": "外部接続を編集", - "xpack.siem.case.confirmDeleteCase.confirmQuestion": "このケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", - "xpack.siem.case.confirmDeleteCase.confirmQuestionPlural": "これらのケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", - "xpack.siem.case.confirmDeleteCase.deleteCase": "ケースを削除", - "xpack.siem.case.confirmDeleteCase.deleteCases": "ケースを削除", - "xpack.siem.case.confirmDeleteCase.deleteTitle": "「{caseTitle}」を削除", - "xpack.siem.case.confirmDeleteCase.selectedCases": "選択したケースを削除", - "xpack.siem.case.connectors.common.apiTokenTextFieldLabel": "APIトークン", - "xpack.siem.case.connectors.common.apiUrlTextFieldLabel": "URL", - "xpack.siem.case.connectors.common.emailTextFieldLabel": "メール", - "xpack.siem.case.connectors.common.invalidApiUrlTextField": "URLが無効です", - "xpack.siem.case.connectors.common.passwordTextFieldLabel": "パスワード", - "xpack.siem.case.connectors.common.requiredApiTokenTextField": "APIトークンが必要です", - "xpack.siem.case.connectors.common.requiredApiUrlTextField": "URLが必要です", - "xpack.siem.case.connectors.common.requiredEmailTextField": "電子メールが必要です", - "xpack.siem.case.connectors.common.requiredPasswordTextField": "パスワードが必要です", - "xpack.siem.case.connectors.common.requiredUsernameTextField": "ユーザー名が必要です", - "xpack.siem.case.connectors.common.usernameTextFieldLabel": "ユーザー名", - "xpack.siem.case.connectors.jira.actionTypeTitle": "Jira", - "xpack.siem.case.connectors.jira.projectKey": "プロジェクトキー", - "xpack.siem.case.connectors.jira.requiredProjectKeyTextField": "プロジェクトキーが必要です", - "xpack.siem.case.connectors.jira.selectMessageText": "JiraでSIEMケースデータを更新するか、新しいインシデントにプッシュ", - "xpack.siem.case.connectors.servicenow.actionTypeTitle": "ServiceNow", - "xpack.siem.case.connectors.servicenow.selectMessageText": "ServiceNow で SIEM ケースデータをb\\更新するか、または新しいインシデントにプッシュする", - "xpack.siem.case.createCase.descriptionFieldRequiredError": "説明が必要です。", - "xpack.siem.case.createCase.fieldTagsHelpText": "このケースの 1 つ以上のカスタム識別タグを入力します。新しいタグを開始するには、各タグの後でEnterを押します。", - "xpack.siem.case.createCase.titleFieldRequiredError": "タイトルが必要です。", - "xpack.siem.case.dismissErrorsPushServiceCallOutTitle": "閉じる", - "xpack.siem.case.pageTitle": "ケース", - "xpack.siem.case.readOnlySavedObjectDescription": "ケースの表示のみが許可されています。ケースを開いて更新する必要がある場合は、Kibana管理者に連絡してください。", - "xpack.siem.case.readOnlySavedObjectTitle": "読み取り専用機能権限が割り当てられています。", - "xpack.siem.certificate.fingerprint.clientCertLabel": "クライアント証明書", - "xpack.siem.certificate.fingerprint.serverCertLabel": "サーバー証明書", - "xpack.siem.chart.allOthersGroupingLabel": "その他すべて", - "xpack.siem.chart.dataAllValuesZerosTitle": "すべての値はゼロを返します", - "xpack.siem.chart.dataNotAvailableTitle": "チャートデータが利用できません", - "xpack.siem.chrome.help.appName": "SIEM", - "xpack.siem.chrome.helpMenu.documentation": "SIEMドキュメンテーション", - "xpack.siem.chrome.helpMenu.documentation.ecs": "ECSドキュメンテーション", - "xpack.siem.clipboard.copied": "コピー完了", - "xpack.siem.clipboard.copy": "コピー", - "xpack.siem.clipboard.copy.to.the.clipboard": "クリップボードにコピー", - "xpack.siem.clipboard.to.the.clipboard": "クリップボードに", - "xpack.siem.components.embeddables.embeddedMap.clientLayerLabel": "クライアントポイント", - "xpack.siem.components.embeddables.embeddedMap.destinationLayerLabel": "デスティネーションポイント", - "xpack.siem.components.embeddables.embeddedMap.embeddableHeaderHelp": "マップ構成ヘルプ", - "xpack.siem.components.embeddables.embeddedMap.embeddableHeaderTitle": "ネットワーク マップ", - "xpack.siem.components.embeddables.embeddedMap.embeddablePanelTitle": "ソース -> デスティネーション ポイントツーポイントマップ", - "xpack.siem.components.embeddables.embeddedMap.errorConfiguringEmbeddableApiTitle": "埋め込み可能な API の構成中にエラーが発生", - "xpack.siem.components.embeddables.embeddedMap.errorCreatingMapEmbeddableTitle": "マップに’埋め込み可能なアイテムの作成中にエラーが発生", - "xpack.siem.components.embeddables.embeddedMap.lineLayerLabel": "折れ線", - "xpack.siem.components.embeddables.embeddedMap.serverLayerLabel": "サーバーポイント", - "xpack.siem.components.embeddables.embeddedMap.sourceLayerLabel": "ソースポイント", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel": "インデックスパターンを編集", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorDescription1": "マップデータを表示するには、SIEMインデックス({defaultIndex})と、同じ名前またはglobパターンのKibanaインデックスパターンを定義する必要があります。{beats}を使用するときには、ホストで{setup}コマンドを実行し、自動的にインデックスパターンを作成できます。例:{example}。", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorDescription2": "Kibanaで手動でインデックスパターンを構成することもできます。", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorTitle": "必要なインデックスパターンが構成されていません", - "xpack.siem.components.embeddables.mapToolTip.errorTitle": "マップ機能の読み込み中にエラーが発生", - "xpack.siem.components.embeddables.mapToolTip.filterForValueHoverAction": "値でフィルターします", - "xpack.siem.components.embeddables.mapToolTip.footerLabel": "{totalFeatures} 件中 {currentFeature} 件 {totalFeatures, plural, =1 {feature} other {features}}", - "xpack.siem.components.embeddables.mapToolTip.lineContent.clientLabel": "クライアント", - "xpack.siem.components.embeddables.mapToolTip.lineContent.destinationLabel": "送信先", - "xpack.siem.components.embeddables.mapToolTip.lineContent.serverLabel": "サーバー", - "xpack.siem.components.embeddables.mapToolTip.lineContent.sourceLabel": "送信元", - "xpack.siem.components.embeddables.mapToolTip.pointContent.asnTitle": "ASN", - "xpack.siem.components.embeddables.mapToolTip.pointContent.clientDomainTitle": "クライアントドメイン", - "xpack.siem.components.embeddables.mapToolTip.pointContent.clientIPTitle": "クライアントIP", - "xpack.siem.components.embeddables.mapToolTip.pointContent.destinationDomainTitle": "デスティネーションドメイン", - "xpack.siem.components.embeddables.mapToolTip.pointContent.destinationIPTitle": "デスティネーション IP", - "xpack.siem.components.embeddables.mapToolTip.pointContent.hostTitle": "ホスト", - "xpack.siem.components.embeddables.mapToolTip.pointContent.locationTitle": "場所", - "xpack.siem.components.embeddables.mapToolTip.pointContent.serverDomainTitle": "サーバードメイン", - "xpack.siem.components.embeddables.mapToolTip.pointContent.serverIPTitle": "サーバーIP", - "xpack.siem.components.embeddables.mapToolTip.pointContent.sourceDomainTitle": "ソースドメイン", - "xpack.siem.components.embeddables.mapToolTip.pointContent.sourceIPTitle": "ソース IP", - "xpack.siem.components.flowControls.selectFlowDirection.bidirectionalButtonLabel": "双方向", - "xpack.siem.components.flowControls.selectFlowDirection.unidirectionalButtonLabel": "一方向", - "xpack.siem.components.flowControls.selectFlowTarget.clientDropDownOptionLabel": "クライアント", - "xpack.siem.components.flowControls.selectFlowTarget.destinationDropDownOptionLabel": "送信先", - "xpack.siem.components.flowControls.selectFlowTarget.serverDropDownOptionLabel": "サーバー", - "xpack.siem.components.flowControls.selectFlowTarget.sourceDropDownOptionLabel": "送信元", - "xpack.siem.components.histogram.stackByOptions.stackByLabel": "積み上げ", - "xpack.siem.components.ml.anomaly.errors.anomaliesTableFetchFailureTitle": "異常表の取得に失敗", - "xpack.siem.components.ml.api.errors.networkErrorFailureTitle": "ネットワークエラー", - "xpack.siem.components.ml.api.errors.statusCodeFailureTitle": "ステータスコード:", - "xpack.siem.components.ml.permissions.errors.machineLearningPermissionsFailureTitle": "機械学習パーミッションエラー", - "xpack.siem.components.mlJobSelect.machineLearningLink": "機械学習", - "xpack.siem.components.mlPopover.jobsTable.filters.groupsLabel": "グループ", - "xpack.siem.components.mlPopover.jobsTable.filters.noGroupsAvailableDescription": "利用可能なグループがありません", - "xpack.siem.components.mlPopover.jobsTable.filters.searchFilterPlaceholder": "例: rare_process_linux", - "xpack.siem.components.mlPopover.jobsTable.filters.showAllJobsLabel": "Elastic ジョブ", - "xpack.siem.components.mlPopover.jobsTable.filters.showSiemJobsLabel": "カスタムジョブ", - "xpack.siem.components.mlPopup.anomalyDetectionDescription": "以下の機械学習ジョブのいずれかを実行して、検知された異常の信号を生成する信号検知ルールを作成する準備をし、SIEMアプリケーションで異常イベントを表示します。基本操作として、いくつかの一般的な検出ジョブが提供されています。独自のカスタムMLジョブを追加する場合は、{machineLearning}アプリケーションからMLジョブを作成して、「SIEM」グループに追加します。", - "xpack.siem.components.mlPopup.cloudLink": "クラウド展開", - "xpack.siem.components.mlPopup.errors.createJobFailureTitle": "ジョブ作成エラー", - "xpack.siem.components.mlPopup.errors.startJobFailureTitle": "ジョブ開始エラー", - "xpack.siem.components.mlPopup.hooks.errors.indexPatternFetchFailureTitle": "インデックスパターン取得エラー", - "xpack.siem.components.mlPopup.hooks.errors.siemJobFetchFailureTitle": "SIEM ジョブ取得エラー", - "xpack.siem.components.mlPopup.jobsTable.createCustomJobButtonLabel": "カスタムジョブを作成", - "xpack.siem.components.mlPopup.jobsTable.jobNameColumn": "ジョブ名", - "xpack.siem.components.mlPopup.jobsTable.noItemsDescription": "SIEM 機械学習ジョブが見つかりませんでした", - "xpack.siem.components.mlPopup.jobsTable.runJobColumn": "ジョブを実行", - "xpack.siem.components.mlPopup.jobsTable.tagsColumn": "グループ", - "xpack.siem.components.mlPopup.licenseButtonLabel": "ライセンスの管理", - "xpack.siem.components.mlPopup.machineLearningLink": "機械学習", - "xpack.siem.components.mlPopup.mlJobSettingsButtonLabel": "MLジョブ設定", - "xpack.siem.components.mlPopup.moduleNotCompatibleDescription": "データが見つかりませんでした。機械学習ジョブ要件の詳細については、{mlDocs}を参照してください。", - "xpack.siem.components.mlPopup.moduleNotCompatibleTitle": "{incompatibleJobCount} 件が {incompatibleJobCount, plural, =1 {job} other {jobs}} 現在利用できません", - "xpack.siem.components.mlPopup.showingLabel": "{filterResultsLength} 件の{filterResultsLength, plural, one {ジョブ} other {ジョブ}}を表示中", - "xpack.siem.components.mlPopup.upgradeButtonLabel": "サブスクリプションオプション", - "xpack.siem.components.mlPopup.upgradeDescription": "SIEM の異常検出機能にアクセスするには、ライセンスをプラチナに更新するか、30 日間の無料トライアルを開始するか、AWS、GCP、または Azure で{cloudLink} にサインアップしてください。その後、機械学習ジョブを実行して異常を表示できます。", - "xpack.siem.components.mlPopup.upgradeTitle": "E lastic Platinum へのアップグレード", - "xpack.siem.components.stepDefineRule.ruleTypeField.subscriptionsLink": "プラチナサブスクリプション", - "xpack.siem.containers.anomalies.errorFetchingAnomaliesData": "異常データをクエリできませんでした", - "xpack.siem.containers.anomalies.stackByJobId": "ジョブ", - "xpack.siem.containers.anomalies.title": "異常", - "xpack.siem.containers.case.closedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}をクローズしました", - "xpack.siem.containers.case.deletedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を削除しました", - "xpack.siem.containers.case.errorDeletingTitle": "データの削除エラー", - "xpack.siem.containers.case.errorTitle": "データの取得中にエラーが発生", - "xpack.siem.containers.case.reopenedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を再オープンしました", - "xpack.siem.containers.case.updatedCase": "\"{caseTitle}\"を更新しました", - "xpack.siem.containers.detectionEngine.addRuleFailDescription": "ルールを追加できませんでした", - "xpack.siem.containers.detectionEngine.createPrePackagedRuleFailDescription": "Elasticから事前にパッケージ化されているルールをインストールすることができませんでした", - "xpack.siem.containers.detectionEngine.createPrePackagedRuleSuccesDescription": "Elasticから事前にパッケージ化されているルールをインストールしました", - "xpack.siem.containers.detectionEngine.rules": "ルールを取得できませんでした", - "xpack.siem.containers.detectionEngine.tagFetchFailDescription": "タグを取得できませんでした", - "xpack.siem.containers.errors.dataFetchFailureTitle": "データの取得に失敗", - "xpack.siem.containers.errors.networkFailureTitle": "ネットワーク障害", - "xpack.siem.containers.errors.stopJobFailureTitle": "ジョブ停止エラー", - "xpack.siem.dataProviders.and": "AND", - "xpack.siem.dataProviders.copyToClipboardTooltip": "クリップボードにコピー", - "xpack.siem.dataProviders.deleteDataProvider": "削除", - "xpack.siem.dataProviders.dropAnything": "何でもドロップできます", - "xpack.siem.dataProviders.dropHere": "ここにドロップしてください", - "xpack.siem.dataProviders.dropHereToAddAnLabel": "ここにドロップして追加します", - "xpack.siem.dataProviders.edit": "編集", - "xpack.siem.dataProviders.editMenuItem": "フィルターを編集", - "xpack.siem.dataProviders.editTitle": "フィルターの編集", - "xpack.siem.dataProviders.excludeDataProvider": "結果を除外", - "xpack.siem.dataProviders.existsLabel": "存在する", - "xpack.siem.dataProviders.fieldLabel": "フィールド", - "xpack.siem.dataProviders.filterForFieldPresentLabel": "現在のフィールドのフィルター", - "xpack.siem.dataProviders.hereToBuildAn": "して開発", - "xpack.siem.dataProviders.highlighted": "ハイライト", - "xpack.siem.dataProviders.includeDataProvider": "結果を含める", - "xpack.siem.dataProviders.not": "NOT", - "xpack.siem.dataProviders.or": "または", - "xpack.siem.dataProviders.query": "クエリ", - "xpack.siem.dataProviders.reEnableDataProvider": "再度有効にする", - "xpack.siem.dataProviders.removeDataProvider": "データプロバイダーを削除", - "xpack.siem.dataProviders.showOptionsDataProvider": "次のオプションを表示:", - "xpack.siem.dataProviders.temporaryDisableDataProvider": "一時的に無効にする", - "xpack.siem.dataProviders.toBuildAn": "して開発", - "xpack.siem.dataProviders.toggle": "切り替え", - "xpack.siem.dataProviders.valueAriaLabel": "値", - "xpack.siem.dataProviders.valuePlaceholder": "値", - "xpack.siem.detectionEngine.alertTitle": "外部アラート", - "xpack.siem.detectionEngine.buttonManageRules": "シグナル検出ルールの管理", - "xpack.siem.detectionEngine.components.importRuleModal.cancelTitle": "キャンセル", - "xpack.siem.detectionEngine.components.importRuleModal.importFailedDetailedTitle": "ルールID: {ruleId}\n ステータスコード: {statusCode}\n メッセージ: {message}", - "xpack.siem.detectionEngine.components.importRuleModal.importFailedTitle": "ルールをインポートできませんでした", - "xpack.siem.detectionEngine.components.importRuleModal.importRuleTitle": "ルールのインポート", - "xpack.siem.detectionEngine.components.importRuleModal.initialPromptTextDescription": "有効なrules_export.ndjsonファイルを選択するか、ドラッグしてドロップします", - "xpack.siem.detectionEngine.components.importRuleModal.overwriteDescription": "保存されたオブジェクトを同じルールIDで自動的に上書きします", - "xpack.siem.detectionEngine.components.importRuleModal.selectRuleDescription": "インポートする SIEM ルール (検出エンジンビューからエクスポートしたもの) を選択します", - "xpack.siem.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle": "{totalRules} {totalRules, plural, =1 {ルール} other {ルール}}を正常にインポートしました", - "xpack.siem.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle": "ルールの作成と有効化", - "xpack.siem.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle": "有効化せずにルールを作成", - "xpack.siem.detectionEngine.createRule.backToRulesDescription": "シグナル検出ルールに戻る", - "xpack.siem.detectionEngine.createRule.editRuleButton": "編集", - "xpack.siem.detectionEngine.createRule.filtersLabel": "フィルター", - "xpack.siem.detectionEngine.createRule.mlRuleTypeDescription": "機械学習", - "xpack.siem.detectionEngine.createRule.pageTitle": "新規ジョブを作成", - "xpack.siem.detectionEngine.createRule.QueryLabel": "カスタムクエリ", - "xpack.siem.detectionEngine.createRule.queryRuleTypeDescription": "クエリ", - "xpack.siem.detectionEngine.createRule.savedIdLabel": "保存されたクエリ名", - "xpack.siem.detectionEngine.createRule.stepAboutRule.descriptionFieldRequiredError": "説明が必要です。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fiedIndexPatternsLabel": "インデックスパターン", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldDescriptionLabel": "説明", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldFalsePositiveLabel": "誤検出の例", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel": "MITRE ATT&CK\\u2122", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldNameLabel": "名前", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldReferenceUrlsLabel": "参照URL", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldRiskScoreLabel": "リスクスコア", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldSeverityLabel": "深刻度", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTagsHelpText": "このルールの1つ以上のカスタム識別タグを入力します。新しいタグを開始するには、各タグの後でEnterを押します。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTagsLabel": "タグ", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateHelpText": "生成されたシグナルを調査するときにテンプレートとして使用する既存のタイムラインを選択します。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateLabel": "タイムラインテンプレート", - "xpack.siem.detectionEngine.createRule.stepAboutRule.guideHelpText": "シグナル調査を実施するアナリストに役立つ情報を提供します。このガイドは、ルールの詳細ページとこのルールで生成されたシグナルから作成されたタイムラインの両方に表示されます。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.guideLabel": "調査ガイド", - "xpack.siem.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError": "名前が必要です。", - "xpack.siem.detectionEngine.createRule.stepAboutrule.noteHelpText": "ルール調査ガイドを追加...", - "xpack.siem.detectionEngine.createRule.stepAboutRule.severityFieldRequiredError": "深刻度が必要です。", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.addFalsePositiveDescription": "誤検出の例を追加します", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.addReferenceDescription": "参照URLを追加します", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.advancedSettingsButton": "高度な設定", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionCriticalDescription": "重大", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionHighDescription": "高", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionLowDescription": "低", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionMediumDescription": "中", - "xpack.siem.detectionEngine.createRule.stepDefineRule.customMitreAttackTechniquesFieldRequiredError": "Tacticには1つ以上のTechniqueが必要です。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError": "KQLが無効です", - "xpack.siem.detectionEngine.createRule.stepDefineRule.customQueryFieldRequiredError": "カスタムクエリが必要です。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "異常スコアしきい値", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "機械学習ジョブ", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "カスタムクエリ", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldRuleTypeLabel": "ルールタイプ", - "xpack.siem.detectionEngine.createRule.stepDefineRule.importTimelineModalTitle": "保存されたタイムラインからクエリをインポート", - "xpack.siem.detectionEngine.createRule.stepDefineRule.importTimelineQueryButton": "保存されたタイムラインからクエリをインポート", - "xpack.siem.detectionEngine.createRule.stepDefineRule.indicesCustomDescription": "インデックスのカスタムリストを入力します", - "xpack.siem.detectionEngine.createRule.stepDefineRule.indicesFromConfigDescription": "SIEM詳細設定からElasticsearchインデックスを使用します", - "xpack.siem.detectionEngine.createRule.stepDefineRule.indicesHelperDescription": "このルールを実行するElasticsearchインデックスのパターンを入力しますデフォルトでは、SIEM詳細設定で定義されたインデックスパターンが含まれます。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.machineLearningJobIdHelpText": "手始めに使えるように、一般的なジョブがいくつか提供されています。独自のカスタムジョブを追加するには、{machineLearning} アプリケーションでジョブに「siem」のグループを割り当て、ここに表示されるようにします。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.machineLearningJobIdRequired": "機械学習ジョブが必要です。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.mlEnableJobWarningTitle": "このMLジョブは現在実行されていません。このルールを有効にする前に、このジョブを「MLジョブ設定」で実行するように設定してください。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText": "ジョブを選択してください", - "xpack.siem.detectionEngine.createRule.stepDefineRule.outputIndiceNameFieldRequiredError": "インデックスパターンが最低1つ必要です。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "URLの形式が無効です", - "xpack.siem.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "デフォルトインデックスパターンにリセット", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDescription": "異常なアクティビティを検出するための ML ジョブを選択します。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDisabledDescription": "ML にアクセスするには {subscriptionsLink} が必要です", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeTitle": "機械学習", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeDescription": "KQL または Lucene を使用して、インデックス全体にわたる問題を検出します。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeTitle": "カスタムクエリ", - "xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleHelpText": "ルールが true であると評価された場合に自動アクションを実行するタイミングを選択します。", - "xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel": "アクション頻度", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText": "ルックバック期間に時間を追加してシグナルの見落としを防ぐ。", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel": "追加のルックバック時間", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText": "ルールは定期的に実行し、指定の時間枠内でシグナルを検出する。", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldIntervalLabel": "次の間隔で実行", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription": "時間", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.invalidTimeMessageDescription": "時間が必要です。", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription": "分", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription": "秒", - "xpack.siem.detectionEngine.details.stepAboutRule.aboutText": "概要", - "xpack.siem.detectionEngine.details.stepAboutRule.detailsLabel": "詳細", - "xpack.siem.detectionEngine.details.stepAboutRule.investigationGuideLabel": "調査ガイド", - "xpack.siem.detectionEngine.detectionsPageTitle": "検出", - "xpack.siem.detectionEngine.dismissButton": "閉じる", - "xpack.siem.detectionEngine.dismissNoApiIntegrationKeyButton": "閉じる", - "xpack.siem.detectionEngine.editRule.backToDescription": "戻る", - "xpack.siem.detectionEngine.editRule.cancelTitle": "キャンセル", - "xpack.siem.detectionEngine.editRule.errorMsgDescription": "申し訳ありません", - "xpack.siem.detectionEngine.editRule.pageTitle": "ルール設定の編集", - "xpack.siem.detectionEngine.editRule.saveChangeTitle": "変更を保存", - "xpack.siem.detectionEngine.emptyActionPrimary": "セットアップの手順を表示", - "xpack.siem.detectionEngine.emptyActionSecondary": "ドキュメントに移動", - "xpack.siem.detectionEngine.emptyTitle": "SIEMアプリケーションの検出エンジンに関連したインデックスがないようです", - "xpack.siem.detectionEngine.goToDocumentationButton": "ドキュメンテーションを表示", - "xpack.siem.detectionEngine.headerPage.pageBadgeLabel": "ベータ", - "xpack.siem.detectionEngine.headerPage.pageBadgeTooltip": "検出はまだベータ段階です。Kibana repoで問題やバグを報告して、製品の改善にご協力ください。", - "xpack.siem.detectionEngine.mitreAttack.addTitle": "MITRE ATT&CK\\u2122脅威を追加", - "xpack.siem.detectionEngine.mitreAttack.tacticPlaceHolderDescription": "Tacticを追加...", - "xpack.siem.detectionEngine.mitreAttack.tacticsDescription": "Tactic", - "xpack.siem.detectionEngine.mitreAttack.techniquesDescription": "手法", - "xpack.siem.detectionEngine.mitreAttack.techniquesPlaceHolderDescription": "Techniqueを選択...", - "xpack.siem.detectionEngine.mitreAttackTactics.collectionDescription": "収集(TA0009)", - "xpack.siem.detectionEngine.mitreAttackTactics.commandAndControlDescription": "コマンドとコントロール(TA0011)", - "xpack.siem.detectionEngine.mitreAttackTactics.credentialAccessDescription": "資格情報アクセス(TA0006)", - "xpack.siem.detectionEngine.mitreAttackTactics.defenseEvasionDescription": "侵入防御(TA0005)", - "xpack.siem.detectionEngine.mitreAttackTactics.discoveryDescription": "検出(TA0007)", - "xpack.siem.detectionEngine.mitreAttackTactics.executionDescription": "実行(TA0002)", - "xpack.siem.detectionEngine.mitreAttackTactics.exfiltrationDescription": "抽出(TA0010)", - "xpack.siem.detectionEngine.mitreAttackTactics.impactDescription": "影響(TA0040)", - "xpack.siem.detectionEngine.mitreAttackTactics.initialAccessDescription": "初期アクセス(TA0001)", - "xpack.siem.detectionEngine.mitreAttackTactics.lateralMovementDescription": "水平移動(TA0008)", - "xpack.siem.detectionEngine.mitreAttackTactics.persistenceDescription": "永続(TA0003)", - "xpack.siem.detectionEngine.mitreAttackTactics.privilegeEscalationDescription": "特権昇格(TA0004)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accessibilityFeaturesDescription": "アクセシビリティ機能(T1015)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accessTokenManipulationDescription": "アクセストークン操作(T1134)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accountAccessRemovalDescription": "アカウントアクセス削除(T1531)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accountDiscoveryDescription": "アカウント検出(T1087)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accountManipulationDescription": "アカウント操作(T1098)", - "xpack.siem.detectionEngine.mitreAttackTechniques.appCertDlLsDescription": "AppCert DLL (T1182)", - "xpack.siem.detectionEngine.mitreAttackTechniques.appInitDlLsDescription": "AppInit DLL (T1103)", - "xpack.siem.detectionEngine.mitreAttackTechniques.appleScriptDescription": "AppleScript (T1155)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationAccessTokenDescription": "アプリケーションアクセストークン(T1527)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationDeploymentSoftwareDescription": "アプリケーション開発ソフトウェア(T1017)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationShimmingDescription": "アプリケーションシミング(T1138)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationWindowDiscoveryDescription": "アプリケーションウィンドウ検出(T1010)", - "xpack.siem.detectionEngine.mitreAttackTechniques.audioCaptureDescription": "音声キャプチャ(T1123)", - "xpack.siem.detectionEngine.mitreAttackTechniques.authenticationPackageDescription": "認証パッケージ(T1131)", - "xpack.siem.detectionEngine.mitreAttackTechniques.automatedCollectionDescription": "自動収集(T1119)", - "xpack.siem.detectionEngine.mitreAttackTechniques.automatedExfiltrationDescription": "自動抽出(T1020)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bashHistoryDescription": "Bash履歴(T1139)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bashProfileAndBashrcDescription": ".bash_profileおよび.bashrc (T1156)", - "xpack.siem.detectionEngine.mitreAttackTechniques.binaryPaddingDescription": "バイナリパディング(T1009)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bitsJobsDescription": "BITSジョブ(T1197)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bootkitDescription": "Bootkit (T1067)", - "xpack.siem.detectionEngine.mitreAttackTechniques.browserBookmarkDiscoveryDescription": "ブラウザーブックマーク検出(T1217)", - "xpack.siem.detectionEngine.mitreAttackTechniques.browserExtensionsDescription": "ブラウザー拡張(T1176)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bruteForceDescription": "Brute Force (T1110)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bypassUserAccountControlDescription": "ユーザーアカウント制御のバイパス(T1088)", - "xpack.siem.detectionEngine.mitreAttackTechniques.changeDefaultFileAssociationDescription": "デフォルトファイル関連付けの変更(T1042)", - "xpack.siem.detectionEngine.mitreAttackTechniques.clearCommandHistoryDescription": "コマンド履歴の消去(T1146)", - "xpack.siem.detectionEngine.mitreAttackTechniques.clipboardDataDescription": "クリップボードデータ(T1115)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cloudInstanceMetadataApiDescription": "クラウドインスタンスメタデータAPI (T1522)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cloudServiceDashboardDescription": "クラウドサービスダッシュボード(T1538)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cloudServiceDiscoveryDescription": "クラウドサービス検出(T1526)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cmstpDescription": "CMSTP (T1191)", - "xpack.siem.detectionEngine.mitreAttackTechniques.codeSigningDescription": "コード署名(T1116)", - "xpack.siem.detectionEngine.mitreAttackTechniques.commandLineInterfaceDescription": "コマンドラインインターフェース(T1059)", - "xpack.siem.detectionEngine.mitreAttackTechniques.commonlyUsedPortDescription": "一般的に使用されるポート(T1043)", - "xpack.siem.detectionEngine.mitreAttackTechniques.communicationThroughRemovableMediaDescription": "リムーバブルメディア経由の通信(T1092)", - "xpack.siem.detectionEngine.mitreAttackTechniques.compileAfterDeliveryDescription": "配信後のコンパイル(T1500)", - "xpack.siem.detectionEngine.mitreAttackTechniques.compiledHtmlFileDescription": "コンパイルされたHTMLファイル(T1223)", - "xpack.siem.detectionEngine.mitreAttackTechniques.componentFirmwareDescription": "コンポーネントファームウェア(T1109)", - "xpack.siem.detectionEngine.mitreAttackTechniques.componentObjectModelAndDistributedComDescription": "コンポーネントオブジェクトモデルおよび分散COM (T1175)", - "xpack.siem.detectionEngine.mitreAttackTechniques.componentObjectModelHijackingDescription": "コンポーネントオブジェクトモデルハイジャック(T1122)", - "xpack.siem.detectionEngine.mitreAttackTechniques.connectionProxyDescription": "接続プロキシ(T1090)", - "xpack.siem.detectionEngine.mitreAttackTechniques.controlPanelItemsDescription": "コントロールパネルアイテム(T1196)", - "xpack.siem.detectionEngine.mitreAttackTechniques.createAccountDescription": "アカウントの作成(T1136)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialDumpingDescription": "資格情報ダンピング(T1003)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialsFromWebBrowsersDescription": "Webブラウザーからの資格情報(T1503)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialsInFilesDescription": "ファイルの資格情報(T1081)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialsInRegistryDescription": "レジストリの資格情報(T1214)", - "xpack.siem.detectionEngine.mitreAttackTechniques.customCommandAndControlProtocolDescription": "カスタムコマンドおよび制御プロトコル(T1094)", - "xpack.siem.detectionEngine.mitreAttackTechniques.customCryptographicProtocolDescription": "カスタム暗号プロトコル(T1024)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataCompressedDescription": "データ圧縮(T1002)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataDestructionDescription": "データ破壊(T1485)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataEncodingDescription": "データエンコード(T1132)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataEncryptedDescription": "データ暗号化(T1022)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataEncryptedForImpactDescription": "影響のデータ暗号化(T1486)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromCloudStorageObjectDescription": "クラウドストレージオブジェクトからのデータ(T1530)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromInformationRepositoriesDescription": "情報リポジトリからのデータ(T1213)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromLocalSystemDescription": "ローカルシステムからのデータ(T1005)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromNetworkSharedDriveDescription": "ネットワーク共有ドライブからのデータ(T1039)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromRemovableMediaDescription": "リムーバブルメディアからのデータ(T1025)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataObfuscationDescription": "データ難読化(T1001)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataStagedDescription": "データステージ(T1074)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataTransferSizeLimitsDescription": "データ転送サイズ上限(T1030)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dcShadowDescription": "DCShadow (T1207)", - "xpack.siem.detectionEngine.mitreAttackTechniques.defacementDescription": "改ざん(T1491)", - "xpack.siem.detectionEngine.mitreAttackTechniques.deobfuscateDecodeFilesOrInformationDescription": "ファイルまたは情報の難読化解除/デコード(T1140)", - "xpack.siem.detectionEngine.mitreAttackTechniques.disablingSecurityToolsDescription": "セキュリティツールの無効化(T1089)", - "xpack.siem.detectionEngine.mitreAttackTechniques.diskContentWipeDescription": "ディスク内容のワイプ(T1488)", - "xpack.siem.detectionEngine.mitreAttackTechniques.diskStructureWipeDescription": "ディスク構造のワイプ(T1487)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dllSearchOrderHijackingDescription": "DLL検索順序ハイジャック(T1038)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dllSideLoadingDescription": "DLLサイドロード(T1073)", - "xpack.siem.detectionEngine.mitreAttackTechniques.domainFrontingDescription": "ドメインフロンティング(T1172)", - "xpack.siem.detectionEngine.mitreAttackTechniques.domainGenerationAlgorithmsDescription": "ドメイン生成アルゴリズム(T1483)", - "xpack.siem.detectionEngine.mitreAttackTechniques.domainTrustDiscoveryDescription": "ドメイン信頼検出(T1482)", - "xpack.siem.detectionEngine.mitreAttackTechniques.driveByCompromiseDescription": "Drive-by Compromise (T1189)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dylibHijackingDescription": "Dylibハイジャック(T1157)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dynamicDataExchangeDescription": "動的データ交換(T1173)", - "xpack.siem.detectionEngine.mitreAttackTechniques.elevatedExecutionWithPromptDescription": "プロンプトを使用した昇格された実行(T1514)", - "xpack.siem.detectionEngine.mitreAttackTechniques.emailCollectionDescription": "電子メール収集(T1114)", - "xpack.siem.detectionEngine.mitreAttackTechniques.emondDescription": "Emond (T1519)", - "xpack.siem.detectionEngine.mitreAttackTechniques.endpointDenialOfServiceDescription": "エンドポイントサービス妨害(T1499)", - "xpack.siem.detectionEngine.mitreAttackTechniques.executionGuardrailsDescription": "実行ガードレール(T1480)", - "xpack.siem.detectionEngine.mitreAttackTechniques.executionThroughApiDescription": "API経由の実行(T1106)", - "xpack.siem.detectionEngine.mitreAttackTechniques.executionThroughModuleLoadDescription": "モジュール読み込み経由の実行(T1129)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverAlternativeProtocolDescription": "代替プロトコルでの抽出(T1048)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverCommandAndControlChannelDescription": "コマンドおよび制御チャネルでの抽出(T1041)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverOtherNetworkMediumDescription": "他のネットワーク媒体での抽出(T1011)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverPhysicalMediumDescription": "物理媒体での抽出(T1052)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForClientExecutionDescription": "クライアント実行の悪用(T1203)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForCredentialAccessDescription": "資格情報アクセスの悪用(T1212)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForDefenseEvasionDescription": "侵入防御の悪用(T1211)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForPrivilegeEscalationDescription": "権限昇格の悪用(T1068)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationOfRemoteServicesDescription": "リモートサービスの悪用(T1210)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitPublicFacingApplicationDescription": "公開アプリケーションの悪用(T1190)", - "xpack.siem.detectionEngine.mitreAttackTechniques.externalRemoteServicesDescription": "外部リモートサービス(T1133)", - "xpack.siem.detectionEngine.mitreAttackTechniques.extraWindowMemoryInjectionDescription": "追加ウィンドウメモリインジェクション(T1181)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fallbackChannelsDescription": "フォールバックチャネル(T1008)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileAndDirectoryDiscoveryDescription": "ファイルおよびディレクトリ検索(T1083)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileAndDirectoryPermissionsModificationDescription": "ファイルおよびディレクトリアクセス権修正(T1222)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileDeletionDescription": "ファイル削除(T1107)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileSystemLogicalOffsetsDescription": "ファイルシステム論理オフセット(T1006)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileSystemPermissionsWeaknessDescription": "ファイルシステムアクセス権脆弱性(T1044)", - "xpack.siem.detectionEngine.mitreAttackTechniques.firmwareCorruptionDescription": "ファームウェア破損(T1495)", - "xpack.siem.detectionEngine.mitreAttackTechniques.forcedAuthenticationDescription": "強制認証(T1187)", - "xpack.siem.detectionEngine.mitreAttackTechniques.gatekeeperBypassDescription": "Gatekeeperバイパス(T1144)", - "xpack.siem.detectionEngine.mitreAttackTechniques.graphicalUserInterfaceDescription": "グラフィカルユーザーインターフェース(T1061)", - "xpack.siem.detectionEngine.mitreAttackTechniques.groupPolicyModificationDescription": "グループポリシー修正(T1484)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hardwareAdditionsDescription": "ハードウェア追加(T1200)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hiddenFilesAndDirectoriesDescription": "非表示のファイルおよびディレクトリ(T1158)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hiddenUsersDescription": "非表示のユーザー(T1147)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hiddenWindowDescription": "非表示のウィンドウ(T1143)", - "xpack.siem.detectionEngine.mitreAttackTechniques.histcontrolDescription": "HISTCONTROL (T1148)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hookingDescription": "フック(T1179)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hypervisorDescription": "ハイパーバイザー(T1062)", - "xpack.siem.detectionEngine.mitreAttackTechniques.imageFileExecutionOptionsInjectionDescription": "画像ファイル実行オプションインジェクション(T1183)", - "xpack.siem.detectionEngine.mitreAttackTechniques.implantContainerImageDescription": "コンテナーイメージの挿入(T1525)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indicatorBlockingDescription": "インジケーターブロック(T1054)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indicatorRemovalFromToolsDescription": "ツールからのインジケーター削除(T1066)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indicatorRemovalOnHostDescription": "ホストでのインジケーター削除(T1070)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indirectCommandExecutionDescription": "間接コマンド実行(T1202)", - "xpack.siem.detectionEngine.mitreAttackTechniques.inhibitSystemRecoveryDescription": "システム回復の抑制(T1490)", - "xpack.siem.detectionEngine.mitreAttackTechniques.inputCaptureDescription": "入力キャプチャ(T1056)", - "xpack.siem.detectionEngine.mitreAttackTechniques.inputPromptDescription": "入力プロンプト(T1141)", - "xpack.siem.detectionEngine.mitreAttackTechniques.installRootCertificateDescription": "ルート証明書のインストール(T1130)", - "xpack.siem.detectionEngine.mitreAttackTechniques.installUtilDescription": "InstallUtil (T1118)", - "xpack.siem.detectionEngine.mitreAttackTechniques.internalSpearphishingDescription": "内部スピアフィッシング(T1534)", - "xpack.siem.detectionEngine.mitreAttackTechniques.kerberoastingDescription": "Kerberoasting (T1208)", - "xpack.siem.detectionEngine.mitreAttackTechniques.kernelModulesAndExtensionsDescription": "カーネルモジュールおよび拡張(T1215)", - "xpack.siem.detectionEngine.mitreAttackTechniques.keychainDescription": "鍵チェーン(T1142)", - "xpack.siem.detectionEngine.mitreAttackTechniques.launchAgentDescription": "エージェントの起動(T1159)", - "xpack.siem.detectionEngine.mitreAttackTechniques.launchctlDescription": "Launchctl (T1152)", - "xpack.siem.detectionEngine.mitreAttackTechniques.launchDaemonDescription": "デーモンの起動(T1160)", - "xpack.siem.detectionEngine.mitreAttackTechniques.lcLoadDylibAdditionDescription": "LC_LOAD_DYLIB追加(T1161)", - "xpack.siem.detectionEngine.mitreAttackTechniques.lcMainHijackingDescription": "LC_MAINハイジャック(T1149)", - "xpack.siem.detectionEngine.mitreAttackTechniques.llmnrNbtNsPoisoningAndRelayDescription": "LLMNR/NBT-NSポイズニングおよびリレー(T1171)", - "xpack.siem.detectionEngine.mitreAttackTechniques.localJobSchedulingDescription": "ローカルジョブスケジュール(T1168)", - "xpack.siem.detectionEngine.mitreAttackTechniques.loginItemDescription": "ログイン項目(T1162)", - "xpack.siem.detectionEngine.mitreAttackTechniques.logonScriptsDescription": "ログオンスクリプト(T1037)", - "xpack.siem.detectionEngine.mitreAttackTechniques.lsassDriverDescription": "LSASSドライバー(T1177)", - "xpack.siem.detectionEngine.mitreAttackTechniques.manInTheBrowserDescription": "Man in the Browser (T1185)", - "xpack.siem.detectionEngine.mitreAttackTechniques.masqueradingDescription": "マスカレード(T1036)", - "xpack.siem.detectionEngine.mitreAttackTechniques.modifyExistingServiceDescription": "既存のサービスの修正(T1031)", - "xpack.siem.detectionEngine.mitreAttackTechniques.modifyRegistryDescription": "レジストリの修正(T1112)", - "xpack.siem.detectionEngine.mitreAttackTechniques.mshtaDescription": "Mshta (T1170)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multibandCommunicationDescription": "マルチバンド通信(T1026)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multiHopProxyDescription": "マルチホッププロキシ(T1188)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multilayerEncryptionDescription": "マルチレイヤー暗号化(T1079)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multiStageChannelsDescription": "マルチステージチャネル(T1104)", - "xpack.siem.detectionEngine.mitreAttackTechniques.netshHelperDllDescription": "Netsh Helper DLL (T1128)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkDenialOfServiceDescription": "ネットワークサービス妨害(T1498)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkServiceScanningDescription": "ネットワークサービススキャン(T1046)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkShareConnectionRemovalDescription": "ネットワーク共有接続削除(T1126)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkShareDiscoveryDescription": "ネットワーク共有検出(T1135)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkSniffingDescription": "ネットワーク検査(T1040)", - "xpack.siem.detectionEngine.mitreAttackTechniques.newServiceDescription": "新しいサービス(T1050)", - "xpack.siem.detectionEngine.mitreAttackTechniques.ntfsFileAttributesDescription": "NTFSファイル属性(T1096)", - "xpack.siem.detectionEngine.mitreAttackTechniques.obfuscatedFilesOrInformationDescription": "難読化されたファイルまたは情報(T1027)", - "xpack.siem.detectionEngine.mitreAttackTechniques.officeApplicationStartupDescription": "Officeアプリケーション起動(T1137)", - "xpack.siem.detectionEngine.mitreAttackTechniques.parentPidSpoofingDescription": "親PIDスプーフィング(T1502)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passTheHashDescription": "ハッシュを渡す(T1075)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passTheTicketDescription": "チケットを渡す(T1097)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passwordFilterDllDescription": "パスワードフィルターDLL (T1174)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passwordPolicyDiscoveryDescription": "パスワードポリシー検出(T1201)", - "xpack.siem.detectionEngine.mitreAttackTechniques.pathInterceptionDescription": "パス傍受(T1034)", - "xpack.siem.detectionEngine.mitreAttackTechniques.peripheralDeviceDiscoveryDescription": "周辺機器検出(T1120)", - "xpack.siem.detectionEngine.mitreAttackTechniques.permissionGroupsDiscoveryDescription": "アクセス権グループ検出(T1069)", - "xpack.siem.detectionEngine.mitreAttackTechniques.plistModificationDescription": "Plist修正(T1150)", - "xpack.siem.detectionEngine.mitreAttackTechniques.portKnockingDescription": "ポートノッキング(T1205)", - "xpack.siem.detectionEngine.mitreAttackTechniques.portMonitorsDescription": "ポートモニター(T1013)", - "xpack.siem.detectionEngine.mitreAttackTechniques.powerShellDescription": "PowerShell (T1086)", - "xpack.siem.detectionEngine.mitreAttackTechniques.powerShellProfileDescription": "PowerShellプロファイル(T1504)", - "xpack.siem.detectionEngine.mitreAttackTechniques.privateKeysDescription": "秘密鍵(T1145)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processDiscoveryDescription": "プロセス検出(T1057)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processDoppelgangingDescription": "Process Doppelgänging (T1186)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processHollowingDescription": "プロセスハロウイング(T1093)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processInjectionDescription": "プロセスインジェクション(T1055)", - "xpack.siem.detectionEngine.mitreAttackTechniques.queryRegistryDescription": "クエリレジストリ(T1012)", - "xpack.siem.detectionEngine.mitreAttackTechniques.rcCommonDescription": "Rc.common (T1163)", - "xpack.siem.detectionEngine.mitreAttackTechniques.redundantAccessDescription": "冗長アクセス(T1108)", - "xpack.siem.detectionEngine.mitreAttackTechniques.registryRunKeysStartupFolderDescription": "レジストリ実行キー/スタートアップフォルダー(T1060)", - "xpack.siem.detectionEngine.mitreAttackTechniques.regsvcsRegasmDescription": "Regsvcs/Regasm (T1121)", - "xpack.siem.detectionEngine.mitreAttackTechniques.regsvr32Description": "Regsvr32 (T1117)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteAccessToolsDescription": "リモートアクセスツール(T1219)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteDesktopProtocolDescription": "リモートデスクトッププロトコル(T1076)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteFileCopyDescription": "リモートファイルコピー(T1105)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteServicesDescription": "リモートサービス(T1021)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteSystemDiscoveryDescription": "リモートシステム検出(T1018)", - "xpack.siem.detectionEngine.mitreAttackTechniques.reOpenedApplicationsDescription": "再オープンされたアプリケーション (T1164)", - "xpack.siem.detectionEngine.mitreAttackTechniques.replicationThroughRemovableMediaDescription": "リムーバブルメディア経由のレプリケーション(T1091)", - "xpack.siem.detectionEngine.mitreAttackTechniques.resourceHijackingDescription": "リソースハイジャック(T1496)", - "xpack.siem.detectionEngine.mitreAttackTechniques.revertCloudInstanceDescription": "Revert Cloud Instance (T1536)", - "xpack.siem.detectionEngine.mitreAttackTechniques.rootkitDescription": "ルートキット(T1014)", - "xpack.siem.detectionEngine.mitreAttackTechniques.rundll32Description": "Rundll32 (T1085)", - "xpack.siem.detectionEngine.mitreAttackTechniques.runtimeDataManipulationDescription": "ランタイムデータ操作(T1494)", - "xpack.siem.detectionEngine.mitreAttackTechniques.scheduledTaskDescription": "スケジュールされたタスク(T1053)", - "xpack.siem.detectionEngine.mitreAttackTechniques.scheduledTransferDescription": "スケジュールされた転送(T1029)", - "xpack.siem.detectionEngine.mitreAttackTechniques.screenCaptureDescription": "画面キャプチャ(T1113)", - "xpack.siem.detectionEngine.mitreAttackTechniques.screensaverDescription": "スクリーンセーバー (T1180)", - "xpack.siem.detectionEngine.mitreAttackTechniques.scriptingDescription": "スクリプティング(T1064)", - "xpack.siem.detectionEngine.mitreAttackTechniques.securitydMemoryDescription": "Securityd Memory (T1167)", - "xpack.siem.detectionEngine.mitreAttackTechniques.securitySoftwareDiscoveryDescription": "セキュリティソフトウェア検出(T1063)", - "xpack.siem.detectionEngine.mitreAttackTechniques.securitySupportProviderDescription": "セキュリティサポートプロバイダー(T1101)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serverSoftwareComponentDescription": "サーバーソフトウェアコンポーネント(T1505)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serviceExecutionDescription": "サービス実行(T1035)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serviceRegistryPermissionsWeaknessDescription": "サービスレジストリアクセス権脆弱性(T1058)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serviceStopDescription": "サービス停止(T1489)", - "xpack.siem.detectionEngine.mitreAttackTechniques.setuidAndSetgidDescription": "SetuidおよびSetgid (T1166)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sharedWebrootDescription": "共有Webroot (T1051)", - "xpack.siem.detectionEngine.mitreAttackTechniques.shortcutModificationDescription": "ショートカット修正(T1023)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sidHistoryInjectionDescription": "SID履歴インジェクション(T1178)", - "xpack.siem.detectionEngine.mitreAttackTechniques.signedBinaryProxyExecutionDescription": "署名されたバイナリプロキシ実行(T1218)", - "xpack.siem.detectionEngine.mitreAttackTechniques.signedScriptProxyExecutionDescription": "署名されたスクリプトプロキシ実行(T1216)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sipAndTrustProviderHijackingDescription": "SIPおよび信頼プロバイダーハイジャック(T1198)", - "xpack.siem.detectionEngine.mitreAttackTechniques.softwareDiscoveryDescription": "ソフトウェア検出(T1518)", - "xpack.siem.detectionEngine.mitreAttackTechniques.softwarePackingDescription": "ソフトウェアパッキング(T1045)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sourceDescription": "ソース(T1153)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spaceAfterFilenameDescription": "ファイル名の後のスペース(T1151)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingAttachmentDescription": "スピアフィッシング添付ファイル(T1193)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingLinkDescription": "スピアフィッシングリンク(T1192)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingViaServiceDescription": "サービス経由のスピアフィッシング(T1194)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sshHijackingDescription": "SSHハイジャック(T1184)", - "xpack.siem.detectionEngine.mitreAttackTechniques.standardApplicationLayerProtocolDescription": "標準アプリケーション層プロトコル(T1071)", - "xpack.siem.detectionEngine.mitreAttackTechniques.standardCryptographicProtocolDescription": "標準暗号プロトコル(T1032)", - "xpack.siem.detectionEngine.mitreAttackTechniques.standardNonApplicationLayerProtocolDescription": "標準非アプリケーション層プロトコル(T1095)", - "xpack.siem.detectionEngine.mitreAttackTechniques.startupItemsDescription": "スタートアップ項目(T1165)", - "xpack.siem.detectionEngine.mitreAttackTechniques.stealApplicationAccessTokenDescription": "アプリケーションアクセストークンの窃盗(T1528)", - "xpack.siem.detectionEngine.mitreAttackTechniques.stealWebSessionCookieDescription": "WebセッションCookieの窃盗(T1539)", - "xpack.siem.detectionEngine.mitreAttackTechniques.storedDataManipulationDescription": "保存されたデータ操作(T1492)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sudoCachingDescription": "Sudoキャッシュ(T1206)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sudoDescription": "Sudo (T1169)", - "xpack.siem.detectionEngine.mitreAttackTechniques.supplyChainCompromiseDescription": "サプライチェーンの危険(T1195)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemdServiceDescription": "Systemdサービス(T1501)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemFirmwareDescription": "システムファームウェア(T1019)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemInformationDiscoveryDescription": "システム情報検出(T1082)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemNetworkConfigurationDiscoveryDescription": "システムネットワーク構成検出(T1016)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemNetworkConnectionsDiscoveryDescription": "システムネットワーク接続検出(T1049)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemOwnerUserDiscoveryDescription": "システム所有者/ユーザー検出(T1033)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemServiceDiscoveryDescription": "システムサービス検出(T1007)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemShutdownRebootDescription": "システムシャットダウン/再起動(T1529)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemTimeDiscoveryDescription": "システム時刻検出(T1124)", - "xpack.siem.detectionEngine.mitreAttackTechniques.taintSharedContentDescription": "Taint Shared Content (T1080)", - "xpack.siem.detectionEngine.mitreAttackTechniques.templateInjectionDescription": "テンプレートインジェクション(T1221)", - "xpack.siem.detectionEngine.mitreAttackTechniques.thirdPartySoftwareDescription": "サードパーティーソフトウェア(T1072)", - "xpack.siem.detectionEngine.mitreAttackTechniques.timeProvidersDescription": "時刻プロバイダー(T1209)", - "xpack.siem.detectionEngine.mitreAttackTechniques.timestompDescription": "Timestomp (T1099)", - "xpack.siem.detectionEngine.mitreAttackTechniques.transferDataToCloudAccountDescription": "クラウドアカウントへのデータ転送(T1537)", - "xpack.siem.detectionEngine.mitreAttackTechniques.transmittedDataManipulationDescription": "転送されたデータ操作(T1493)", - "xpack.siem.detectionEngine.mitreAttackTechniques.trapDescription": "トラップ(T1154)", - "xpack.siem.detectionEngine.mitreAttackTechniques.trustedDeveloperUtilitiesDescription": "信頼できる開発者ユーティリティ(T1127)", - "xpack.siem.detectionEngine.mitreAttackTechniques.trustedRelationshipDescription": "信頼できる関係(T1199)", - "xpack.siem.detectionEngine.mitreAttackTechniques.twoFactorAuthenticationInterceptionDescription": "二要素認証傍受(T1111)", - "xpack.siem.detectionEngine.mitreAttackTechniques.uncommonlyUsedPortDescription": "一般的に使用されないポート(T1065)", - "xpack.siem.detectionEngine.mitreAttackTechniques.unusedUnsupportedCloudRegionsDescription": "未使用/サポートされていないクラウドリージョン(T1535)", - "xpack.siem.detectionEngine.mitreAttackTechniques.userExecutionDescription": "ユーザー実行(T1204)", - "xpack.siem.detectionEngine.mitreAttackTechniques.validAccountsDescription": "有効なアカウント(T1078)", - "xpack.siem.detectionEngine.mitreAttackTechniques.videoCaptureDescription": "動画キャプチャ(T1125)", - "xpack.siem.detectionEngine.mitreAttackTechniques.virtualizationSandboxEvasionDescription": "仮想化/サンドボックス侵入(T1497)", - "xpack.siem.detectionEngine.mitreAttackTechniques.webServiceDescription": "Webサービス(T1102)", - "xpack.siem.detectionEngine.mitreAttackTechniques.webSessionCookieDescription": "WebセッションCookie (T1506)", - "xpack.siem.detectionEngine.mitreAttackTechniques.webShellDescription": "Webシェル(T1100)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsAdminSharesDescription": "Windows管理共有(T1077)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationDescription": "Windows Management Instrumentation (T1047)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationEventSubscriptionDescription": "Windows Management Instrumentationイベントサブスクリプション(T1084)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsRemoteManagementDescription": "Windowsリモート管理(T1028)", - "xpack.siem.detectionEngine.mitreAttackTechniques.winlogonHelperDllDescription": "Winlogon Helper DLL (T1004)", - "xpack.siem.detectionEngine.mitreAttackTechniques.xslScriptProcessingDescription": "XSLスクリプト処理(T1220)", - "xpack.siem.detectionEngine.mlRulesDisabledMessageTitle": "MLルールにはプラチナライセンスとML管理者権限が必要です", - "xpack.siem.detectionEngine.mlUnavailableTitle": "{totalRules} {totalRules, plural, =1 {個のルール} other {個のルール}}で機械学習を有効にする必要があります。", - "xpack.siem.detectionEngine.noApiIntegrationKeyCallOutMsg": "Kibanaを起動するごとに保存されたオブジェクトの新しい暗号化キーを作成します。永続キーがないと、Kibanaの再起動後にルールを削除または修正することができません。永続キーを設定するには、kibana.ymlファイルに32文字以上のテキスト値を付けてxpack.encryptedSavedObjects.encryptionKey設定を追加してください。", - "xpack.siem.detectionEngine.noApiIntegrationKeyCallOutTitle": "API統合キーが必要です", - "xpack.siem.detectionEngine.noIndexMsgBody": "検出エンジンを使用するには、必要なクラスターとインデックス権限のユーザーが最初にこのページにアクセスする必要があります。ヘルプについては、管理者にお問い合わせください。", - "xpack.siem.detectionEngine.noIndexTitle": "検出エンジンを設定しましょう", - "xpack.siem.detectionEngine.pageTitle": "検出エンジン", - "xpack.siem.detectionEngine.panelSubtitleShowing": "表示中", - "xpack.siem.detectionEngine.readOnlyCallOutMsg": "現在、検出エンジンルールを作成/編集するための必要な権限がありません。サポートについては、管理者にお問い合わせください。", - "xpack.siem.detectionEngine.readOnlyCallOutTitle": "ルールアクセス権が必要です", - "xpack.siem.detectionEngine.rule.editRule.errorMsgDescription": "{countError, plural, one {このタブ} other {これらのタブ}}に無効な入力があります: {tabHasError}", - "xpack.siem.detectionEngine.ruleDescription.mlJobStartedDescription": "開始", - "xpack.siem.detectionEngine.ruleDescription.mlJobStoppedDescription": "停止", - "xpack.siem.detectionEngine.ruleDetails.activateRuleLabel": "有効化", - "xpack.siem.detectionEngine.ruleDetails.backToRulesDescription": "シグナル検出ルールに戻る", - "xpack.siem.detectionEngine.ruleDetails.errorCalloutTitle": "ルール失敗", - "xpack.siem.detectionEngine.ruleDetails.experimentalDescription": "実験的", - "xpack.siem.detectionEngine.ruleDetails.failureHistoryTab": "エラー履歴", - "xpack.siem.detectionEngine.ruleDetails.lastFiveErrorsTitle": "最後の5件のエラー", - "xpack.siem.detectionEngine.ruleDetails.pageTitle": "ルール詳細", - "xpack.siem.detectionEngine.ruleDetails.ruleCreationDescription": "作成者: {by} 日付: {date}", - "xpack.siem.detectionEngine.ruleDetails.ruleUpdateDescription": "更新者: {by} 日付: {date}", - "xpack.siem.detectionEngine.ruleDetails.statusFailedAtColumn": "失敗", - "xpack.siem.detectionEngine.ruleDetails.statusFailedDescription": "失敗", - "xpack.siem.detectionEngine.ruleDetails.statusFailedMsgColumn": "失敗メッセージ", - "xpack.siem.detectionEngine.ruleDetails.statusTypeColumn": "タイプ", - "xpack.siem.detectionEngine.ruleDetails.unknownDescription": "不明", - "xpack.siem.detectionEngine.rules.aboutRuleTitle": "ルールについて", - "xpack.siem.detectionEngine.rules.addNewRuleTitle": "新規ルールを作成", - "xpack.siem.detectionEngine.rules.addPageTitle": "作成", - "xpack.siem.detectionEngine.rules.allRules.actions.deleteeRuleDescription": "ルールの削除...", - "xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "ルールの複製...", - "xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription": "ルールの複製エラー...", - "xpack.siem.detectionEngine.rules.allRules.actions.duplicateTitle": "複製", - "xpack.siem.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "ルール設定の編集", - "xpack.siem.detectionEngine.rules.allRules.actions.exportRuleDescription": "ルールのエクスポート", - "xpack.siem.detectionEngine.rules.allRules.activeRuleDescription": "アクティブ", - "xpack.siem.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle": "{totalRules, plural, =1 {ルール} other {ルール}}の有効化エラー…", - "xpack.siem.detectionEngine.rules.allRules.batchActions.activateSelectedTitle": "選択した項目の有効化", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle": "{totalRules, plural, =1 {ルール} other {ルール}}の無効化エラー…", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deactivateSelectedTitle": "選択した項目の無効化", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle": "{totalRules, plural, =1 {ルール} other {ルール}}の削除エラー…", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "選択には削除できないイミュータブルルールがあります", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedTitle": "選択項目を削除...", - "xpack.siem.detectionEngine.rules.allRules.batchActions.duplicateSelectedTitle": "選択した項目の複製…", - "xpack.siem.detectionEngine.rules.allRules.batchActions.exportSelectedTitle": "選択した項目のエクスポート", - "xpack.siem.detectionEngine.rules.allRules.batchActionsTitle": "一斉アクション", - "xpack.siem.detectionEngine.rules.allRules.columns.activateTitle": "有効化", - "xpack.siem.detectionEngine.rules.allRules.columns.gap": "ギャップ(該当する場合)", - "xpack.siem.detectionEngine.rules.allRules.columns.indexingTimes": "インデックス時間(ミリ秒)", - "xpack.siem.detectionEngine.rules.allRules.columns.lastLookBackDate": "前回の確認日", - "xpack.siem.detectionEngine.rules.allRules.columns.lastResponseTitle": "前回の応答", - "xpack.siem.detectionEngine.rules.allRules.columns.lastRunTitle": "前回の実行", - "xpack.siem.detectionEngine.rules.allRules.columns.queryTimes": "クエリ時間(ミリ秒)", - "xpack.siem.detectionEngine.rules.allRules.columns.riskScoreTitle": "リスクスコア", - "xpack.siem.detectionEngine.rules.allRules.columns.ruleTitle": "ルール", - "xpack.siem.detectionEngine.rules.allRules.columns.severityTitle": "深刻度", - "xpack.siem.detectionEngine.rules.allRules.columns.tagsTitle": "タグ", - "xpack.siem.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", - "xpack.siem.detectionEngine.rules.allRules.filters.customRulesTitle": "カスタムルール", - "xpack.siem.detectionEngine.rules.allRules.filters.elasticRulesTitle": "Elasticルール", - "xpack.siem.detectionEngine.rules.allRules.filters.noRulesBodyTitle": "上記のフィルターでルールが見つかりませんでした。", - "xpack.siem.detectionEngine.rules.allRules.filters.noRulesTitle": "ルールが見つかりませんでした", - "xpack.siem.detectionEngine.rules.allRules.filters.noTagsAvailableDescription": "利用可能なタグがありません", - "xpack.siem.detectionEngine.rules.allRules.filters.tagsLabel": "タグ", - "xpack.siem.detectionEngine.rules.allRules.inactiveRuleDescription": "非アクティブ", - "xpack.siem.detectionEngine.rules.allRules.refreshTitle": "更新", - "xpack.siem.detectionEngine.rules.allRules.searchAriaLabel": "ルールの検索", - "xpack.siem.detectionEngine.rules.allRules.searchPlaceholder": "例: ルール名", - "xpack.siem.detectionEngine.rules.allRules.selectedRulesTitle": "{selectedRules} {selectedRules, plural, =1 {ルール} other {ルール}}を選択しました", - "xpack.siem.detectionEngine.rules.allRules.showingRulesTitle": "{totalRules} {totalRules, plural, =1 {ルール} other {ルール}}を表示中", - "xpack.siem.detectionEngine.rules.allRules.successfullyDuplicatedRulesTitle": "{totalRules, plural, =1 {{totalRules}ルール} other {{totalRules}ルール}}を正常に複製しました", - "xpack.siem.detectionEngine.rules.allRules.successfullyExportedRulesTitle": "{totalRules, plural, =0 {すべてのルール} =1 {{totalRules}ルール} other {{totalRules}ルール}}を正常にエクスポートしました", - "xpack.siem.detectionEngine.rules.allRules.tableTitle": "すべてのルール", - "xpack.siem.detectionEngine.rules.allRules.tabs.monitoring": "監視", - "xpack.siem.detectionEngine.rules.allRules.tabs.rules": "ルール", - "xpack.siem.detectionEngine.rules.backOptionsHeader": "検出に戻る", - "xpack.siem.detectionEngine.rules.components.ruleActionsOverflow.allActionsTitle": "すべてのアクション", - "xpack.siem.detectionEngine.rules.components.ruleDownloader.exportFailureTitle": "ルールをエクスポートできませんでした...", - "xpack.siem.detectionEngine.rules.continueButtonTitle": "続行", - "xpack.siem.detectionEngine.rules.create.successfullyCreatedRuleTitle": "{ruleName}が作成されました", - "xpack.siem.detectionEngine.rules.defineRuleTitle": "ルールの定義", - "xpack.siem.detectionEngine.rules.deleteDescription": "削除", - "xpack.siem.detectionEngine.rules.editPageTitle": "編集", - "xpack.siem.detectionEngine.rules.importRuleTitle": "ルールのインポート...", - "xpack.siem.detectionEngine.rules.loadPrePackagedRulesButton": "Elastic事前構築済みルールを読み込む", - "xpack.siem.detectionEngine.rules.optionalFieldDescription": "オプション", - "xpack.siem.detectionEngine.rules.pageTitle": "シグナル検出ルール", - "xpack.siem.detectionEngine.rules.prePackagedRules.createOwnRuletButton": "独自のルールの作成", - "xpack.siem.detectionEngine.rules.prePackagedRules.emptyPromptMessage": "Elastic SIEMには、バックグラウンドで実行され、条件が合うとシグナルを作成する事前構築済み検出ルールがあります。デフォルトでは、すべての事前構築済みルールが無効化されていて、有効化したいルールを選択します。", - "xpack.siem.detectionEngine.rules.prePackagedRules.emptyPromptTitle": "Elastic事前構築済み検出ルールを読み込む", - "xpack.siem.detectionEngine.rules.prePackagedRules.loadPreBuiltButton": "事前構築済み検知ルールを読み込む", - "xpack.siem.detectionEngine.rules.releaseNotesHelp": "リリースノート", - "xpack.siem.detectionEngine.rules.reloadMissingPrePackagedRulesButton": "{missingRules} Elasticのあらかじめ構築された{missingRules, plural, =1 {個のルール} other {個のルール}}をインストール ", - "xpack.siem.detectionEngine.rules.ruleActionsTitle": "ルールアクション", - "xpack.siem.detectionEngine.rules.scheduleRuleTitle": "ルールのスケジュール", - "xpack.siem.detectionEngine.rules.stepAboutTitle": "概要", - "xpack.siem.detectionEngine.rules.stepActionsTitle": "アクション", - "xpack.siem.detectionEngine.rules.stepDefinitionTitle": "定義", - "xpack.siem.detectionEngine.rules.stepScheduleTitle": "スケジュール", - "xpack.siem.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName}が保存されました", - "xpack.siem.detectionEngine.rules.updateButtonTitle": "更新", - "xpack.siem.detectionEngine.rules.updatePrePackagedRulesButton": "{updateRules} Elastic事前再構築済み{updateRules, plural, =1 {rule} other {rules}}を更新する ", - "xpack.siem.detectionEngine.rules.updatePrePackagedRulesMsg": "{updateRules} Elastic事前再構築済み{updateRules, plural, =1 {rule} other {rules}}を更新することができます。これにより、削除されたElastic事前再構築済みルールが再読み込みされます。", - "xpack.siem.detectionEngine.rules.updatePrePackagedRulesTitle": "Elastic事前構築済みルールを更新することができません", - "xpack.siem.detectionEngine.ruleStatus.refreshButton": "更新", - "xpack.siem.detectionEngine.ruleStatus.statusAtDescription": "に", - "xpack.siem.detectionEngine.ruleStatus.statusDateDescription": "ステータス日付", - "xpack.siem.detectionEngine.ruleStatus.statusDescription": "前回の応答", - "xpack.siem.detectionEngine.signalRuleAlert.actionGroups.default": "デフォルト", - "xpack.siem.detectionEngine.userUnauthenticatedMsgBody": "検出エンジンを表示するための必要なアクセス権がありません。ヘルプについては、管理者にお問い合わせください。", - "xpack.siem.detectionEngine.userUnauthenticatedTitle": "検出エンジンアクセス権が必要です", - "xpack.siem.dragAndDrop.addToTimeline": "タイムライン調査に追加", - "xpack.siem.dragAndDrop.closeButtonLabel": "閉じる", - "xpack.siem.dragAndDrop.copyToClipboardTooltip": "クリップボードにコピー", - "xpack.siem.dragAndDrop.fieldLabel": "フィールド", - "xpack.siem.dragAndDrop.filterForValueHoverAction": "値でフィルター", - "xpack.siem.dragAndDrop.filterOutValueHoverAction": "値を除外", - "xpack.siem.draggables.field.categoryLabel": "カテゴリー", - "xpack.siem.draggables.field.fieldLabel": "フィールド", - "xpack.siem.draggables.field.typeLabel": "タイプ", - "xpack.siem.draggables.field.viewCategoryTooltip": "カテゴリーを表示します", - "xpack.siem.editDataProvider.doesNotExistLabel": "存在しません", - "xpack.siem.editDataProvider.existsLabel": "存在する", - "xpack.siem.editDataProvider.fieldLabel": "フィールド", - "xpack.siem.editDataProvider.isLabel": "が", - "xpack.siem.editDataProvider.isNotLabel": "is not", - "xpack.siem.editDataProvider.operatorLabel": "演算子", - "xpack.siem.editDataProvider.placeholder": "フィールドを選択", - "xpack.siem.editDataProvider.saveButton": "保存", - "xpack.siem.editDataProvider.selectAnOperatorPlaceholder": "演算子を選択", - "xpack.siem.editDataProvider.valueLabel": "値", - "xpack.siem.editDataProvider.valuePlaceholder": "値", - "xpack.siem.emptyString.emptyStringDescription": "空の文字列", - "xpack.siem.event.module.linkToElasticEndpointSecurityDescription": "Elastic Endpoint Securityで開く", - "xpack.siem.eventDetails.blank": " ", - "xpack.siem.eventDetails.copyToClipboard": "クリップボードにコピー", - "xpack.siem.eventDetails.copyToClipboardTooltip": "クリップボードにコピー", - "xpack.siem.eventDetails.description": "説明", - "xpack.siem.eventDetails.field": "フィールド", - "xpack.siem.eventDetails.filter.placeholder": "フィールド、値、または説明でフィルター…", - "xpack.siem.eventDetails.jsonView": "JSON ビュー", - "xpack.siem.eventDetails.table": "表", - "xpack.siem.eventDetails.toggleColumnTooltip": "列を切り替えます", - "xpack.siem.eventDetails.value": "値", - "xpack.siem.eventsViewer.errorFetchingEventsData": "イベントデータをクエリできませんでした", - "xpack.siem.eventsViewer.eventsLabel": "イベント", - "xpack.siem.eventsViewer.footer.loadingEventsDataLabel": "イベントを読み込み中", - "xpack.siem.eventsViewer.showingLabel": "表示中", - "xpack.siem.eventsViewer.unit": "{totalCount, plural, =1 {event} other {events}}", - "xpack.siem.featureCatalogue.description": "セキュリティメトリクスとログのイベントとアラートを確認します", - "xpack.siem.featureCatalogue.title": "SIEM", - "xpack.siem.featureRegistry.linkSiemTitle": "SIEM", - "xpack.siem.fieldBrowser.categoriesCountTitle": "{totalCount} {totalCount, plural, =1 {category} other {categories}}", - "xpack.siem.fieldBrowser.categoriesTitle": "カテゴリー", - "xpack.siem.fieldBrowser.categoryLabel": "カテゴリー", - "xpack.siem.fieldBrowser.copyToClipboard": "クリップボードにコピー", - "xpack.siem.fieldBrowser.customizeColumnsTitle": "列のカスタマイズ", - "xpack.siem.fieldBrowser.descriptionLabel": "説明", - "xpack.siem.fieldBrowser.fieldLabel": "フィールド", - "xpack.siem.fieldBrowser.fieldsCountTitle": "{totalCount} {totalCount, plural, =1 {field} other {fields}}", - "xpack.siem.fieldBrowser.fieldsTitle": "フィールド", - "xpack.siem.fieldBrowser.filterPlaceholder": "フィールド名", - "xpack.siem.fieldBrowser.noFieldsMatchInputLabel": "{searchInput} に一致するフィールドがありません", - "xpack.siem.fieldBrowser.noFieldsMatchLabel": "一致するフィールドがありません", - "xpack.siem.fieldBrowser.resetFieldsLink": "フィールドをリセット", - "xpack.siem.fieldBrowser.toggleColumnTooltip": "列を切り替えます", - "xpack.siem.fieldBrowser.viewCategoryTooltip": "すべての {categoryId} フィールドを表示します", - "xpack.siem.fieldRenderers.moreLabel": "もっと", - "xpack.siem.flyout.button.text": "タイムライン", - "xpack.siem.flyout.button.timeline": "タイムライン", - "xpack.siem.footer.autoRefreshActiveDescription": "自動更新アクション", - "xpack.siem.footer.autoRefreshActiveTooltip": "自動更新が有効な間、タイムラインはクエリに一致する最新の {numberOfItems} 件のイベントを表示します。", - "xpack.siem.footer.data": "データ", - "xpack.siem.footer.events": "イベント", - "xpack.siem.footer.live": "ライブ", - "xpack.siem.footer.loadingLabel": "読み込み中", - "xpack.siem.footer.loadingTimelineData": "タイムラインデータを読み込み中", - "xpack.siem.footer.loadMoreLabel": "さらに読み込む", - "xpack.siem.footer.of": "/", - "xpack.siem.footer.rows": "行", - "xpack.siem.footer.totalCountOfEvents": "イベントが検索条件に一致します", - "xpack.siem.footer.updated": "更新しました", - "xpack.siem.formatted.duration.aFewMillisecondsTooltip": "数ミリ秒", - "xpack.siem.formatted.duration.aFewNanosecondsTooltip": "数ナノ秒", - "xpack.siem.formatted.duration.aMillisecondTooltip": "1 ミリ秒", - "xpack.siem.formatted.duration.aNanosecondTooltip": "1 ナノ秒", - "xpack.siem.formatted.duration.aSecondTooltip": "1 秒", - "xpack.siem.formatted.duration.invalidDurationTooltip": "無効な期間", - "xpack.siem.formatted.duration.noDurationTooltip": "期間がありません", - "xpack.siem.formatted.duration.zeroNanosecondsTooltip": "0ナノ秒", - "xpack.siem.formattedDuration.tooltipLabel": "生", - "xpack.siem.getCurrentUser.Error": "ユーザーの取得エラー", - "xpack.siem.getCurrentUser.unknownUser": "不明", - "xpack.siem.header.editableTitle.cancel": "キャンセル", - "xpack.siem.header.editableTitle.editButtonAria": "クリックすると {title} を編集できます", - "xpack.siem.header.editableTitle.save": "保存", - "xpack.siem.headerGlobal.buttonAddData": "データの追加", - "xpack.siem.headerGlobal.siem": "SIEM", - "xpack.siem.headerPage.pageSubtitle": "前回のイベント: {beat}", - "xpack.siem.hooks.useAddToTimeline.addedFieldMessage": "{fieldOrValue}をタイムラインに追加しました", - "xpack.siem.host.details.architectureLabel": "アーキテクチャー", - "xpack.siem.host.details.firstSeenTitle": "初回の認識", - "xpack.siem.host.details.lastSeenTitle": "前回の認識", - "xpack.siem.host.details.overview.cloudProviderTitle": "クラウドプロバイダー", - "xpack.siem.host.details.overview.familyTitle": "ファミリー", - "xpack.siem.host.details.overview.hostIdTitle": "ホスト ID", - "xpack.siem.host.details.overview.inspectTitle": "ホスト概要", - "xpack.siem.host.details.overview.instanceIdTitle": "インスタンス ID", - "xpack.siem.host.details.overview.ipAddressesTitle": "IP アドレス", - "xpack.siem.host.details.overview.macAddressesTitle": "MAC アドレス", - "xpack.siem.host.details.overview.machineTypeTitle": "マシンタイプ", - "xpack.siem.host.details.overview.maxAnomalyScoreByJobTitle": "ジョブ別の最高異常スコア", - "xpack.siem.host.details.overview.osTitle": "オペレーティングシステム", - "xpack.siem.host.details.overview.platformTitle": "プラットフォーム", - "xpack.siem.host.details.overview.regionTitle": "地域", - "xpack.siem.host.details.versionLabel": "バージョン", - "xpack.siem.hosts.kqlPlaceholder": "例: host.name: \"foo\"", - "xpack.siem.hosts.navigation.alertsTitle": "外部アラート", - "xpack.siem.hosts.navigation.allHostsTitle": "すべてのホスト", - "xpack.siem.hosts.navigation.anomaliesTitle": "異常", - "xpack.siem.hosts.navigation.authenticationsTitle": "認証", - "xpack.siem.hosts.navigation.dns.histogram.errorFetchingDnsData": "DNSデータをクエリできませんでした", - "xpack.siem.hosts.navigation.eventsTitle": "イベント", - "xpack.siem.hosts.navigation.uncommonProcessesTitle": "非共通プロセス", - "xpack.siem.hosts.navigaton.matrixHistogram.errorFetchingAuthenticationsData": "認証データをクエリできませんでした", - "xpack.siem.hosts.navigaton.matrixHistogram.errorFetchingEventsData": "イベントデータをクエリできませんでした", - "xpack.siem.hosts.pageTitle": "すべてのホスト", - "xpack.siem.hostsTable.firstLastSeenToolTip": "選択された日付範囲との相関付けです", - "xpack.siem.hostsTable.hostsTitle": "すべてのホスト", - "xpack.siem.hostsTable.lastSeenTitle": "前回の認識", - "xpack.siem.hostsTable.nameTitle": "名前", - "xpack.siem.hostsTable.osTitle": "オペレーティングシステム", - "xpack.siem.hostsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.hostsTable.unit": "{totalCount, plural, =1 {host} other {hosts}}", - "xpack.siem.hostsTable.versionTitle": "バージョン", - "xpack.siem.insert.timeline.insertTimelineButton": "タイムラインリンクの挿入", - "xpack.siem.inspect.modal.closeTitle": "閉じる", - "xpack.siem.inspect.modal.indexPatternDescription": "Elasticsearch インデックスに接続したインデックスパターンです。これらのインデックスは Kibana > 高度な設定で構成できます。", - "xpack.siem.inspect.modal.indexPatternLabel": "インデックスパターン", - "xpack.siem.inspect.modal.queryTimeDescription": "クエリの処理の所要時間です。リクエストの送信やブラウザでのパースの時間は含まれません。", - "xpack.siem.inspect.modal.queryTimeLabel": "クエリ時間", - "xpack.siem.inspect.modal.reqTimestampDescription": "リクエストの開始が記録された時刻です", - "xpack.siem.inspect.modal.reqTimestampLabel": "リクエストのタイムスタンプ", - "xpack.siem.inspect.modal.somethingWentWrongDescription": "申し訳ございませんが、何か問題が発生しました。", - "xpack.siem.inspectDescription": "検査", - "xpack.siem.ja3.fingerprint.ja3.fingerprintLabel": "ja3", - "xpack.siem.kpiHosts.hosts.title": "すべてのホスト", - "xpack.siem.kpiHosts.uniqueIps.destinationChartLabel": "Dest.", - "xpack.siem.kpiHosts.uniqueIps.destinationUnitLabel": "デスティネーション", - "xpack.siem.kpiHosts.uniqueIps.sourceChartLabel": "Src.", - "xpack.siem.kpiHosts.uniqueIps.sourceUnitLabel": "ソース", - "xpack.siem.kpiHosts.uniqueIps.title": "固有の IP", - "xpack.siem.kpiHosts.userAuthentications.failChartLabel": "失敗", - "xpack.siem.kpiHosts.userAuthentications.failUnitLabel": "失敗", - "xpack.siem.kpiHosts.userAuthentications.successChartLabel": "成功", - "xpack.siem.kpiHosts.userAuthentications.successUnitLabel": "成功", - "xpack.siem.kpiHosts.userAuthentications.title": "ユーザー認証", - "xpack.siem.kpiNetwork.dnsQueries.title": "DNS クエリ", - "xpack.siem.kpiNetwork.networkEvents.title": "ネットワークイベント", - "xpack.siem.kpiNetwork.tlsHandshakes.title": "TLSハンドシェイク", - "xpack.siem.kpiNetwork.uniqueFlowIds.title": "固有のフロー ID", - "xpack.siem.kpiNetwork.uniquePrivateIps.destinationChartLabel": "Dest.", - "xpack.siem.kpiNetwork.uniquePrivateIps.destinationUnitLabel": "デスティネーション", - "xpack.siem.kpiNetwork.uniquePrivateIps.sourceChartLabel": "Src.", - "xpack.siem.kpiNetwork.uniquePrivateIps.sourceUnitLabel": "ソース", - "xpack.siem.kpiNetwork.uniquePrivateIps.title": "固有のプライベート IP", - "xpack.siem.licensing.unsupportedMachineLearningMessage": "ご使用のライセンスは機械翻訳をサポートしていません。ライセンスをアップグレードしてください。", - "xpack.siem.markdown.hint.boldLabel": "**太字**", - "xpack.siem.markdown.hint.bulletLabel": "* ビュレット", - "xpack.siem.markdown.hint.codeLabel": "「コード」", - "xpack.siem.markdown.hint.headingLabel": "# 見出し", - "xpack.siem.markdown.hint.imageUrlLabel": "![image](url)", - "xpack.siem.markdown.hint.italicsLabel": "_斜体_", - "xpack.siem.markdown.hint.preformattedLabel": "```プリフォーマット```", - "xpack.siem.markdown.hint.quoteLabel": ">引用", - "xpack.siem.markdown.hint.strikethroughLabel": "取り消し線", - "xpack.siem.markdown.hint.urlLabel": "[link](url)", - "xpack.siem.markdownEditor.markdown": "マークダウン", - "xpack.siem.markdownEditor.markdownInputHelp": "Markdown 構文ヘルプ", - "xpack.siem.markdownEditor.preview": "プレビュー", - "xpack.siem.ml.score.anomalousEntityTitle": "異常エンティティ", - "xpack.siem.ml.score.anomalyJobTitle": "ジョブ", - "xpack.siem.ml.score.detectedTitle": "検出", - "xpack.siem.ml.score.influencedByTitle": "影響因子", - "xpack.siem.ml.score.maxAnomalyScoreTitle": "最高異常スコア", - "xpack.siem.ml.score.narrowToThisDateRangeLink": "この日付範囲に絞り込む", - "xpack.siem.ml.score.viewInMachineLearningLink": "機械学習で表示", - "xpack.siem.ml.table.detectorTitle": "ジョブ名", - "xpack.siem.ml.table.entityTitle": "エンティティ", - "xpack.siem.ml.table.hostNameTitle": "ホスト名", - "xpack.siem.ml.table.influencedByTitle": "影響因子:", - "xpack.siem.ml.table.networkNameTitle": "ネットワークIP", - "xpack.siem.ml.table.scoreTitle": "異常スコア", - "xpack.siem.ml.table.timestampTitle": "タイムスタンプ", - "xpack.siem.modalAllErrors.close.button": "閉じる", - "xpack.siem.modalAllErrors.seeAllErrors.button": "完全なエラーを表示", - "xpack.siem.modalAllErrors.title": "ビジュアライゼーションにエラーがあります", - "xpack.siem.navigation.case": "ケース", - "xpack.siem.navigation.detectionEngine": "検出", - "xpack.siem.navigation.hosts": "すべてのホスト", - "xpack.siem.navigation.network": "ネットワーク", - "xpack.siem.navigation.overview": "概要", - "xpack.siem.navigation.timelines": "タイムライン", - "xpack.siem.network.dns.stackByUniqueSubdomain": "{groupByField}別トップドメイン", - "xpack.siem.network.ipDetails.ipOverview.asDestinationDropDownOptionLabel": "送信先として", - "xpack.siem.network.ipDetails.ipOverview.asSourceDropDownOptionLabel": "送信元として", - "xpack.siem.network.ipDetails.ipOverview.autonomousSystemTitle": "自動システム", - "xpack.siem.network.ipDetails.ipOverview.firstSeenTitle": "初回の認識", - "xpack.siem.network.ipDetails.ipOverview.hostIdTitle": "ホスト ID", - "xpack.siem.network.ipDetails.ipOverview.hostNameTitle": "ホスト名", - "xpack.siem.network.ipDetails.ipOverview.inspectTitle": "IP概要", - "xpack.siem.network.ipDetails.ipOverview.ipReputationTitle": "評判", - "xpack.siem.network.ipDetails.ipOverview.lastSeenTitle": "前回の認識", - "xpack.siem.network.ipDetails.ipOverview.locationTitle": "場所", - "xpack.siem.network.ipDetails.ipOverview.maxAnomalyScoreByJobTitle": "ジョブ別の最高異常スコア", - "xpack.siem.network.ipDetails.ipOverview.viewTalosIntelligenceTitle": "talosIntelligence.com", - "xpack.siem.network.ipDetails.ipOverview.viewVirusTotalTitle.": "virustotal.com", - "xpack.siem.network.ipDetails.ipOverview.viewWhoisTitle": "iana.org", - "xpack.siem.network.ipDetails.ipOverview.whoIsTitle": "WhoIs", - "xpack.siem.network.ipDetails.tlsTable.columns.issuerTitle": "発行者", - "xpack.siem.network.ipDetails.tlsTable.columns.ja3FingerPrintTitle": "JA3 フィンガープリント", - "xpack.siem.network.ipDetails.tlsTable.columns.sha1FingerPrintTitle": "SHA1フィンガープリント", - "xpack.siem.network.ipDetails.tlsTable.columns.subjectTitle": "件名", - "xpack.siem.network.ipDetails.tlsTable.columns.validUntilTitle": "有効期限:", - "xpack.siem.network.ipDetails.tlsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.network.ipDetails.tlsTable.transportLayerSecurityTitle": "トランスポートレイヤーセキュリティ", - "xpack.siem.network.ipDetails.tlsTable.unit": "{totalCount, plural, =1 {サーバー証明書} other {サーバー証明書}}", - "xpack.siem.network.ipDetails.usersTable.columns.documentCountTitle": "ドキュメントカウント", - "xpack.siem.network.ipDetails.usersTable.columns.groupIdTitle": "グループ ID", - "xpack.siem.network.ipDetails.usersTable.columns.groupNameTitle": "グループ名", - "xpack.siem.network.ipDetails.usersTable.columns.userIdTitle": "ID", - "xpack.siem.network.ipDetails.usersTable.columns.userNameTitle": "ユーザー", - "xpack.siem.network.ipDetails.usersTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.network.ipDetails.usersTable.unit": "{totalCount, plural, =1 {user} other {users}}", - "xpack.siem.network.ipDetails.usersTable.usersTitle": "ユーザー", - "xpack.siem.network.kqlPlaceholder": "例: source.ip: \"foo\"", - "xpack.siem.network.navigation.alertsTitle": "外部アラート", - "xpack.siem.network.navigation.anomaliesTitle": "異常", - "xpack.siem.network.navigation.dnsTitle": "DNS", - "xpack.siem.network.navigation.flowsTitle": "Flow", - "xpack.siem.network.navigation.httpTitle": "HTTP", - "xpack.siem.network.navigation.tlsTitle": "TLS", - "xpack.siem.network.pageTitle": "ネットワーク", - "xpack.siem.networkDnsTable.column.bytesInTitle": "受信 DNS バイト", - "xpack.siem.networkDnsTable.column.bytesOutTitle": "送信 DNS バイト", - "xpack.siem.networkDnsTable.column.registeredDomain": "登録ドメイン", - "xpack.siem.networkDnsTable.column.TotalQueriesTitle": "クエリ合計", - "xpack.siem.networkDnsTable.column.uniqueDomainsTitle": "固有のドメイン", - "xpack.siem.networkDnsTable.helperTooltip": "これは DNS プロトコルトラフィックのみを示しており、DNS データ逆浸出に使用されたドメインの調査に役立ちます。", - "xpack.siem.networkDnsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.networkDnsTable.select.includePtrRecords": "PTR 記録を含める", - "xpack.siem.networkDnsTable.title": "トップ DNS ドメイン", - "xpack.siem.networkDnsTable.unit": "{totalCount, plural, =1 {domain} other {domains}}", - "xpack.siem.networkHttpTable.column.domainTitle": "ドメイン", - "xpack.siem.networkHttpTable.column.lastHostTitle": "最後のホスト", - "xpack.siem.networkHttpTable.column.lastSourceIpTitle": "最後のソースIP", - "xpack.siem.networkHttpTable.column.methodTitle": "メソド", - "xpack.siem.networkHttpTable.column.pathTitle": "パス", - "xpack.siem.networkHttpTable.column.requestsTitle": "リクエスト", - "xpack.siem.networkHttpTable.column.statusTitle": "ステータス", - "xpack.siem.networkHttpTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {行} other {行}}", - "xpack.siem.networkHttpTable.title": "HTTPリクエスト", - "xpack.siem.networkHttpTable.unit": "{totalCount, plural, =1 {リクエスト} other {リクエスト}}", - "xpack.siem.networkTopCountriesTable.column.bytesInTitle": "受信バイト", - "xpack.siem.networkTopCountriesTable.column.bytesOutTitle": "送信バイト", - "xpack.siem.networkTopCountriesTable.column.countryTitle": "国", - "xpack.siem.networkTopCountriesTable.column.destinationIps": "デスティネーション IP", - "xpack.siem.networkTopCountriesTable.column.flows": "Flow", - "xpack.siem.networkTopCountriesTable.column.sourceIps": "ソース IP", - "xpack.siem.networkTopCountriesTable.heading.destinationCountries": "デスティネーションの国", - "xpack.siem.networkTopCountriesTable.heading.sourceCountries": "ソースの国", - "xpack.siem.networkTopCountriesTable.heading.unit": "{totalCount, plural, =1 {Country} other {Countries}}", - "xpack.siem.networkTopCountriesTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.networkTopNFlowTable.column.asTitle": "自動システム", - "xpack.siem.networkTopNFlowTable.column.bytesInTitle": "受信バイト", - "xpack.siem.networkTopNFlowTable.column.bytesOutTitle": "送信バイト", - "xpack.siem.networkTopNFlowTable.column.destinationIpTitle": "デスティネーション IP", - "xpack.siem.networkTopNFlowTable.column.domainTitle": "ドメイン", - "xpack.siem.networkTopNFlowTable.column.IpTitle": "IP", - "xpack.siem.networkTopNFlowTable.column.sourceIpTitle": "ソース IP", - "xpack.siem.networkTopNFlowTable.destinationIps": "デスティネーション IP", - "xpack.siem.networkTopNFlowTable.flows": "Flow", - "xpack.siem.networkTopNFlowTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.networkTopNFlowTable.sourceIps": "ソース IP", - "xpack.siem.networkTopNFlowTable.unit": "{totalCount, plural, =1 {IP} other {IPs}}", - "xpack.siem.newsFeed.advancedSettingsLinkTitle": "SIEM高度な設定", - "xpack.siem.newsFeed.noNewsMessage": "現在のニュースフィードURLは最新のニュースを返しませんでした。URLを更新するか、セキュリティニュースを無効にすることができます", - "xpack.siem.notes.addANotePlaceholder": "メモを追加", - "xpack.siem.notes.addedANoteLabel": "メモを追加しました", - "xpack.siem.notes.addNoteButtonLabel": "メモを追加", - "xpack.siem.notes.cancelButtonLabel": "キャンセル", - "xpack.siem.notes.copyToClipboardButtonLabel": "クリップボードにコピー", - "xpack.siem.notes.noteLabel": "注", - "xpack.siem.notes.notesTitle": "メモ", - "xpack.siem.notes.previewMarkdownTitle": "プレビュー(マークダウン)", - "xpack.siem.notes.search.FilterByUserOrNotePlaceholder": "ユーザーまたはメモでフィルター", - "xpack.siem.open.timeline.allActionsTooltip": "すべてのアクション", - "xpack.siem.open.timeline.batchActionsTitle": "一斉アクション", - "xpack.siem.open.timeline.cancelButton": "キャンセル", - "xpack.siem.open.timeline.collapseButton": "縮小", - "xpack.siem.open.timeline.deleteButton": "削除", - "xpack.siem.open.timeline.deleteSelectedButton": "選択項目を削除", - "xpack.siem.open.timeline.deleteTimelineModalTitle": "「{title}」を削除しますか?", - "xpack.siem.open.timeline.deleteWarningLabel": "削除すると、このタイムライン自体またはそのメモを復元することはできません。", - "xpack.siem.open.timeline.descriptionTableHeader": "説明", - "xpack.siem.open.timeline.expandButton": "拡張", - "xpack.siem.open.timeline.exportFileNameTitle": "timelines_export", - "xpack.siem.open.timeline.exportSelectedButton": "選択した項目のエクスポート", - "xpack.siem.open.timeline.favoriteSelectedButton": "選択中のお気に入り", - "xpack.siem.open.timeline.favoritesTooltip": "お気に入り", - "xpack.siem.open.timeline.filterByTimelineTypesTitle": "{timelineType}のみ", - "xpack.siem.open.timeline.lastModifiedTableHeader": "最終更新:", - "xpack.siem.open.timeline.missingSavedObjectIdTooltip": "savedObjectId がありません", - "xpack.siem.open.timeline.modifiedByTableHeader": "変更者:", - "xpack.siem.open.timeline.notesTooltip": "メモ", - "xpack.siem.open.timeline.onlyFavoritesButtonLabel": "お気に入りのみ", - "xpack.siem.open.timeline.openAsDuplicateTooltip": "重複タイムライン", - "xpack.siem.open.timeline.openTimelineButton": "タイムラインを開く…", - "xpack.siem.open.timeline.openTimelineTitle": "タイムラインを開く", - "xpack.siem.open.timeline.pinnedEventsTooltip": "ピン付けされたイベント", - "xpack.siem.open.timeline.postedLabel": "投稿:", - "xpack.siem.open.timeline.refreshTitle": "更新", - "xpack.siem.open.timeline.searchPlaceholder": "例:タイムライン名、または説明", - "xpack.siem.open.timeline.selectedTimelinesTitle": "{selectedTimelines} {selectedTimelines, plural, =1 {タイムライン} other {タイムライン}}を選択しました", - "xpack.siem.open.timeline.showingLabel": "表示中:", - "xpack.siem.open.timeline.showingNTimelinesLabel": "{totalSearchResultsCount} 件の {totalSearchResultsCount, plural, one {タイムライン} other {タイムライン}} {with}", - "xpack.siem.open.timeline.successfullyExportedTimelinesTitle": "{totalTimelines, plural, =0 {all timelines} =1 {{totalTimelines} タイムライン} other {{totalTimelines} タイムライン}}のエクスポートが正常に完了しました", - "xpack.siem.open.timeline.timelineNameTableHeader": "タイムライン名", - "xpack.siem.open.timeline.untitledTimelineLabel": "無題のタイムライン", - "xpack.siem.open.timeline.withLabel": "With", - "xpack.siem.open.timeline.zeroTimelinesMatchLabel": "0 件のタイムラインが検索条件に一致", - "xpack.siem.overview.alertsGraphTitle": "外部アラート数", - "xpack.siem.overview.auditBeatAuditTitle": "監査", - "xpack.siem.overview.auditBeatFimTitle": "File Integrityモジュール", - "xpack.siem.overview.auditBeatLoginTitle": "ログイン", - "xpack.siem.overview.auditBeatPackageTitle": "パッケージ", - "xpack.siem.overview.auditBeatProcessTitle": "プロセス", - "xpack.siem.overview.auditBeatSocketTitle": "ソケット", - "xpack.siem.overview.auditBeatUserTitle": "ユーザー", - "xpack.siem.overview.endgameDnsTitle": "DNS", - "xpack.siem.overview.endgameFileTitle": "ファイル", - "xpack.siem.overview.endgameImageLoadTitle": "画像読み込み", - "xpack.siem.overview.endgameNetworkTitle": "ネットワーク", - "xpack.siem.overview.endgameProcessTitle": "プロセス", - "xpack.siem.overview.endgameRegistryTitle": "レジストリ", - "xpack.siem.overview.endgameSecurityTitle": "セキュリティ", - "xpack.siem.overview.eventsTitle": "イベント数", - "xpack.siem.overview.feedbackText": "Elastic SIEM に関するご意見やご提案は、お気軽に {feedback}", - "xpack.siem.overview.feedbackText.feedbackLinkText": "フィードバックをオンラインで送信", - "xpack.siem.overview.feedbackTitle": "フィードバック", - "xpack.siem.overview.filebeatCiscoTitle": "Cisco", - "xpack.siem.overview.filebeatNetflowTitle": "Netflow", - "xpack.siem.overview.filebeatPanwTitle": "Palo Alto Networks", - "xpack.siem.overview.fileBeatSuricataTitle": "Suricata", - "xpack.siem.overview.filebeatSystemModuleTitle": "システムモジュール", - "xpack.siem.overview.fileBeatZeekTitle": "Zeek", - "xpack.siem.overview.hostsAction": "ホストを表示", - "xpack.siem.overview.hostStatGroupAuditbeat": "Auditbeat", - "xpack.siem.overview.hostStatGroupElasticEndpointSecurity": "Elastic Endpoint Security", - "xpack.siem.overview.hostStatGroupFilebeat": "Filebeat", - "xpack.siem.overview.hostStatGroupWinlogbeat": "Winlogbeat", - "xpack.siem.overview.hostsTitle": "ホストイベント", - "xpack.siem.overview.myRecentlyReportedCasesButtonLabel": "最近レポートしたケース", - "xpack.siem.overview.networkAction": "ネットワークを表示", - "xpack.siem.overview.networkStatGroupAuditbeat": "Auditbeat", - "xpack.siem.overview.networkStatGroupFilebeat": "Filebeat", - "xpack.siem.overview.networkStatGroupPacketbeat": "Packetbeat", - "xpack.siem.overview.networkTitle": "ネットワークイベント", - "xpack.siem.overview.newsFeedSidebarTitle": "セキュリティニュース", - "xpack.siem.overview.overviewHost.hostsSubtitle": "表示中: {formattedHostEventsCount} {hostEventsCount, plural, one {イベント} other {イベント}}", - "xpack.siem.overview.overviewNetwork.networkSubtitle": "表示中: {formattedNetworkEventsCount} {networkEventsCount, plural, one {イベント} other {イベント}}", - "xpack.siem.overview.packetBeatDnsTitle": "DNS", - "xpack.siem.overview.packetBeatFlowTitle": "フロー", - "xpack.siem.overview.packetbeatTLSTitle": "TLS", - "xpack.siem.overview.pageSubtitle": "Elastic Stackによるセキュリティ情報とイベント管理", - "xpack.siem.overview.pageTitle": "SIEM", - "xpack.siem.overview.recentCasesSidebarTitle": "最近のケース", - "xpack.siem.overview.recentlyCreatedCasesButtonLabel": "最近作成したケース", - "xpack.siem.overview.recentTimelinesSidebarTitle": "最近のタイムライン", - "xpack.siem.overview.showTopTooltip": "上位の{fieldName}を表示", - "xpack.siem.overview.startedText": "セキュリティ情報およびイベント管理(SIEM)へようこそ。はじめに{docs}や{data}をご参照ください。今後の機能に関する情報やチュートリアルは、{siemSolution} ページをお見逃しなく。", - "xpack.siem.overview.startedText.dataLinkText": "投入データ", - "xpack.siem.overview.startedText.docsLinkText": "ドキュメンテーション", - "xpack.siem.overview.startedText.siemSolutionLinkText": "SIEM ソリューション", - "xpack.siem.overview.startedTitle": "はじめて使う", - "xpack.siem.overview.topNLabel": "トップ{fieldName}", - "xpack.siem.overview.viewAlertsButtonLabel": "アラートを表示", - "xpack.siem.overview.viewEventsButtonLabel": "イベントを表示", - "xpack.siem.overview.winlogbeatMWSysmonOperational": "Microsoft-Windows-Sysmon/Operational", - "xpack.siem.overview.winlogbeatSecurityTitle": "セキュリティ", - "xpack.siem.pages.common.emptyActionPrimary": "Beatsでデータを表示", - "xpack.siem.pages.common.emptyActionSecondary": "入門ガイドを表示", - "xpack.siem.pages.common.emptyMessage": "セキュリティ情報とイベント管理(SIEM)を使用して開始するには、Elastic StackにElastic Common Schema(ECS)フォーマットでSIEM関連データを追加する必要があります。簡単に開始するには、Beatsと呼ばれるデータシッパーをインストールして設定するという方法があります。今すぐ始めましょう。", - "xpack.siem.pages.common.emptyTitle": "SIEMへようこそ。始めましょう。", - "xpack.siem.pages.fourohfour.noContentFoundDescription": "コンテンツがありません", - "xpack.siem.paginatedTable.rowsButtonLabel": "ページごとの行数", - "xpack.siem.paginatedTable.showingSubtitle": "表示中", - "xpack.siem.paginatedTable.tooManyResultsToastText": "クエリ範囲を縮めて結果をさらにフィルタリングしてください", - "xpack.siem.paginatedTable.tooManyResultsToastTitle": " - 結果が多すぎます", - "xpack.siem.recentCases.commentsTooltip": "コメント", - "xpack.siem.recentCases.noCasesMessage": "まだケースを作成していません。探偵帽をかぶって新しいケースを開始します", - "xpack.siem.recentCases.startNewCaseLink": "", - "xpack.siem.recentCases.viewAllCasesLink": "すべてのケースを表示", - "xpack.siem.recentTimelines.errorRetrievingUserDetailsMessage": "最近のタイムライン:ユーザー詳細の取得中にエラーが発生しました", - "xpack.siem.recentTimelines.favoritesButtonLabel": "お気に入り", - "xpack.siem.recentTimelines.lastUpdatedButtonLabel": "最終更新", - "xpack.siem.recentTimelines.noFavoriteTimelinesMessage": "まだタイムラインをお気に入りに登録していません。脅威の検出を開始しましょう。", - "xpack.siem.recentTimelines.notesTooltip": "メモ", - "xpack.siem.recentTimelines.noTimelinesMessage": "まだタイムラインを作成していません。脅威の検出を開始しましょう。", - "xpack.siem.recentTimelines.openAsDuplicateTooltip": "重複タイムラインとして開く", - "xpack.siem.recentTimelines.pinnedEventsTooltip": "ピン付けされたイベント", - "xpack.siem.recentTimelines.untitledTimelineLabel": "無題のタイムライン", - "xpack.siem.recentTimelines.viewAllTimelinesLink": "すべてのタイムラインを表示", - "xpack.siem.source.destination.packetsLabel": "パケット", - "xpack.siem.system.acceptedAConnectionViaDescription": "次の手段で接続を受け付けました:", - "xpack.siem.system.acceptedDescription": "以下を経由してユーザーを受け入れました:", - "xpack.siem.system.attemptedLoginDescription": "以下を経由してログインを試行しました:", - "xpack.siem.system.createdFileDescription": "ファイルを作成しました", - "xpack.siem.system.deletedFileDescription": "ファイルを削除しました", - "xpack.siem.system.disconnectedViaDescription": "次の手段で接続を解除しました", - "xpack.siem.system.errorDescription": "以下でエラーが生じました:", - "xpack.siem.system.existingPackageDescription": "は既存のパッケージを使用しています", - "xpack.siem.system.existingProcessDescription": "がプロセスを実行しています", - "xpack.siem.system.existingSocketDescription": "が以下から既存のソケットを使用しています:", - "xpack.siem.system.existingUserDescription": "は既存のユーザーです", - "xpack.siem.system.hostDescription": "ホスト情報", - "xpack.siem.system.invalidDescription": "以下を使用しようとする無効な試み:", - "xpack.siem.system.loggedOutDescription": "以下を経由してログアウト:", - "xpack.siem.system.packageInstalledDescription": "パッケージをインストールしました", - "xpack.siem.system.packageRemovedDescription": "パッケージを削除しました", - "xpack.siem.system.packageSystemStartedDescription": "システムを開始しました", - "xpack.siem.system.packageUpdatedDescription": "パッケージを更新しました", - "xpack.siem.system.processErrorDescription": "次に関するプロセスエラーが発生:", - "xpack.siem.system.processStartedDescription": "プロセスを開始しました", - "xpack.siem.system.processStoppedDescription": "プロセスを停止しました", - "xpack.siem.system.socketClosedDescription": "以下とのソケットをクローズしました:", - "xpack.siem.system.socketOpenedDescription": "以下とソケットを開きました:", - "xpack.siem.system.systemDescription": "システム", - "xpack.siem.system.terminatedProcessDescription": "プロセスを中断しました", - "xpack.siem.system.userAddedDescription": "ユーザーが追加されました", - "xpack.siem.system.userChangedDescription": "ユーザーが変更されました", - "xpack.siem.system.userRemovedDescription": "が削除されました", - "xpack.siem.system.usingDescription": "using", - "xpack.siem.system.viaDescription": "経由", - "xpack.siem.system.viaParentProcessDescription": "親プロセスで", - "xpack.siem.system.wasAuthorizedToUseDescription": "が以下の使用を承認されました:", - "xpack.siem.system.withExitCodeDescription": "終了コードで", - "xpack.siem.system.withResultDescription": "結果付き", - "xpack.siem.tables.rowItemHelper.moreDescription": "行は表示されていません", - "xpack.siem.timeline.autosave.warning.description": "別のユーザーがこのタイムラインに変更を加えました。このタイムラインを更新してこれらの変更を取り入れるまで、ユーザーによる変更は自動的に保存されません。", - "xpack.siem.timeline.autosave.warning.refresh.title": "タイムラインを更新", - "xpack.siem.timeline.autosave.warning.title": "更新されるまで自動保存は無効です", - "xpack.siem.timeline.body.actions.collapseAriaLabel": "縮小", - "xpack.siem.timeline.body.actions.expandAriaLabel": "拡張", - "xpack.siem.timeline.body.copyToClipboardButtonLabel": "クリップボードにコピー", - "xpack.siem.timeline.body.notes.addOrViewNotesForThisEventTooltip": "このイベントのメモを追加または表示します", - "xpack.siem.timeline.body.pinning.pinnedTooltip": "ピン付けされたイベント", - "xpack.siem.timeline.body.pinning.pinnnedWithNotesTooltip": "イベントにメモがあり、ピンを外すことができません", - "xpack.siem.timeline.body.pinning.unpinnedTooltip": "ピン付け解除されたイベント", - "xpack.siem.timeline.body.renderers.dns.askedForDescription": "要求された", - "xpack.siem.timeline.body.renderers.dns.responseCodeDescription": "応答コード", - "xpack.siem.timeline.body.renderers.dns.viaDescription": "経由", - "xpack.siem.timeline.body.renderers.dns.whichResolvedToDescription": "で解決する", - "xpack.siem.timeline.body.renderers.dns.withQuestionTypeDescription": "質問タイプで", - "xpack.siem.timeline.body.renderers.endgame.aLoginWasAttemptedUsingExplicitCredentialsDescription": "明示認証情報でログインが試みられました", - "xpack.siem.timeline.body.renderers.endgame.asRequestedBySubjectDescription": "サブジェクトにリクエストされた通り", - "xpack.siem.timeline.body.renderers.endgame.loggedOffDescription": "ログオフ", - "xpack.siem.timeline.body.renderers.endgame.logonTypeBatchDescription": "一斉", - "xpack.siem.timeline.body.renderers.endgame.logonTypeCachedInteractiveDescription": "キャッシュインタラクティブ", - "xpack.siem.timeline.body.renderers.endgame.logonTypeInteractiveDescription": "インタラクティブ", - "xpack.siem.timeline.body.renderers.endgame.logonTypeNetworkCleartextDescription": "ネットワーククリアテキスト", - "xpack.siem.timeline.body.renderers.endgame.logonTypeNetworkDescription": "ネットワーク", - "xpack.siem.timeline.body.renderers.endgame.logonTypeNewCredentialsDescription": "新規認証情報", - "xpack.siem.timeline.body.renderers.endgame.logonTypeRemoteInteractiveDescription": "リモートインタラクティブ", - "xpack.siem.timeline.body.renderers.endgame.logonTypeServiceDescription": "サービス", - "xpack.siem.timeline.body.renderers.endgame.logonTypeUnlockDescription": "ロック解除", - "xpack.siem.timeline.body.renderers.endgame.subjectLogonIdDescription": "サブジェクトログオン ID", - "xpack.siem.timeline.body.renderers.endgame.successfullyLoggedInDescription": "正常にログイン", - "xpack.siem.timeline.body.renderers.endgame.targetLogonIdDescription": "ターゲットログオン ID", - "xpack.siem.timeline.body.renderers.endgame.toDescription": "に", - "xpack.siem.timeline.body.renderers.endgame.usingLogonTypeDescription": "ログオンタイプを使用して", - "xpack.siem.timeline.body.renderers.endgame.viaDescription": "経由", - "xpack.siem.timeline.body.renderers.endgame.withSpecialPrivilegesDescription": "割り当てられた特別な権限", - "xpack.siem.timeline.callOut.unauthorized.message.description": "SIEM アプリケーションでタイムラインを自動保存するにはパーミッションが必要ですが、引き続きタイムラインを使用してセキュリティイベントの検索とフィルタリングを行うことはできます。", - "xpack.siem.timeline.categoryTooltip": "カテゴリー", - "xpack.siem.timeline.defaultTimelineDescription": "新しいタイムラインを作成するときにデフォルトで提供されるタイムライン。", - "xpack.siem.timeline.defaultTimelineTitle": "デフォルトの空白タイムライン", - "xpack.siem.timeline.descriptionTooltip": "説明", - "xpack.siem.timeline.destination": "送信先", - "xpack.siem.timeline.eventsSelect.actions.pinSelected": "選択項目にピン付け", - "xpack.siem.timeline.eventsSelect.actions.selectAll": "すべて", - "xpack.siem.timeline.eventsSelect.actions.selectNone": "なし", - "xpack.siem.timeline.eventsSelect.actions.selectPinned": "ピン付け済み", - "xpack.siem.timeline.eventsSelect.actions.selectUnpinned": "ピンが外されました", - "xpack.siem.timeline.eventsSelect.actions.unpinSelected": "選択項目のピンを外す", - "xpack.siem.timeline.expandableEvent.copyToClipboardToolTip": "クリップボードにコピー", - "xpack.siem.timeline.expandableEvent.eventToolTipTitle": "イベント", - "xpack.siem.timeline.fieldTooltip": "フィールド", - "xpack.siem.timeline.flyout.header.closeTimelineButtonLabel": "タイムラインを閉じる", - "xpack.siem.timeline.flyout.pane.removeColumnButtonLabel": "列を削除", - "xpack.siem.timeline.flyout.pane.timelinePropertiesAriaLabel": "タイムラインのプロパティ", - "xpack.siem.timeline.properties.descriptionPlaceholder": "説明", - "xpack.siem.timeline.properties.descriptionTooltip": "このタイムラインのイベントのサマリーとメモ", - "xpack.siem.timeline.properties.favoriteTooltip": "お気に入り", - "xpack.siem.timeline.properties.historyLabel": "履歴", - "xpack.siem.timeline.properties.historyToolTip": "このタイムラインに関連したアクションの履歴", - "xpack.siem.timeline.properties.inspectTimelineTitle": "Timeline", - "xpack.siem.timeline.properties.isViewingTooltip": "がこのタイムラインを表示しています", - "xpack.siem.timeline.properties.lockDatePickerDescription": "日付ピッカーをグローバル日付ピッカーにロック", - "xpack.siem.timeline.properties.lockDatePickerTooltip": "現在表示中のページとタイムラインの間の日付/時刻範囲の同期を無効にします", - "xpack.siem.timeline.properties.newCaseButtonLabel": "タイムラインを新しいケースに接続する", - "xpack.siem.timeline.properties.newTimelineButtonLabel": "新規タイムラインを作成", - "xpack.siem.timeline.properties.notAFavoriteTooltip": "お気に入りではありません", - "xpack.siem.timeline.properties.notesButtonLabel": "メモ", - "xpack.siem.timeline.properties.notesToolTip": "このタイムラインに関するメモを追加して確認します。メモはイベントにも追加できます。", - "xpack.siem.timeline.properties.streamLiveButtonLabel": "ライブストリーム", - "xpack.siem.timeline.properties.streamLiveToolTip": "新しいデータが利用可能になるにつれタイムラインを更新します", - "xpack.siem.timeline.properties.timelineDescription": "タイムラインの説明", - "xpack.siem.timeline.properties.timelineTitleAriaLabel": "タイムラインのタイトル", - "xpack.siem.timeline.properties.titleTitle": "タイトル", - "xpack.siem.timeline.properties.unlockDatePickerDescription": "日付ピッカーのグローバル日付ピッカーへのロックを解除", - "xpack.siem.timeline.properties.unlockDatePickerTooltip": "現在表示中のページとタイムラインの間の日付/時刻範囲の同期を有効にします", - "xpack.siem.timeline.properties.untitledTimelinePlaceholder": "無題のタイムライン", - "xpack.siem.timeline.protocol": "プロトコル", - "xpack.siem.timeline.rangePicker.oneDay": "1 日", - "xpack.siem.timeline.rangePicker.oneMonth": "1 か月", - "xpack.siem.timeline.rangePicker.oneWeek": "1 週間", - "xpack.siem.timeline.rangePicker.oneYear": "1 年", - "xpack.siem.timeline.searchOrFilter.eventTypeAllEvent": "すべてのイベント", - "xpack.siem.timeline.searchOrFilter.eventTypeRawEvent": "未加工イベント", - "xpack.siem.timeline.searchOrFilter.eventTypeSignalEvent": "シグナルイベント", - "xpack.siem.timeline.searchOrFilter.filterDescription": "上のデータプロバイダーからのイベントは、隣接の KQL でフィルターされます", - "xpack.siem.timeline.searchOrFilter.filterKqlPlaceholder": "イベントをフィルター", - "xpack.siem.timeline.searchOrFilter.filterKqlSelectedText": "フィルター", - "xpack.siem.timeline.searchOrFilter.filterKqlTooltip": "上のデータプロバイダーからのイベントは、この KQL でフィルターされます", - "xpack.siem.timeline.searchOrFilter.filterOrSearchWithKql": "KQLでフィルターまたは検索", - "xpack.siem.timeline.searchOrFilter.searchDescription": "上のデータプロバイダーからのイベントは、隣接のKQLからの結果と組み合わされます。", - "xpack.siem.timeline.searchOrFilter.searchKqlPlaceholder": "イベントを検索", - "xpack.siem.timeline.searchOrFilter.searchKqlSelectedText": "検索", - "xpack.siem.timeline.searchOrFilter.searchKqlTooltip": "上のデータプロバイダーからのイベントは、この KQL からの結果と組み合わされます。", - "xpack.siem.timeline.source": "送信元", - "xpack.siem.timeline.tcp": "TCP", - "xpack.siem.timeline.typeTooltip": "タイプ", - "xpack.siem.timelines.allTimelines.errorFetchingTimelinesTitle": "すべてのタイムラインデータをクエリできませんでした", - "xpack.siem.timelines.allTimelines.importTimelineTitle": "タイムラインのインポート", - "xpack.siem.timelines.allTimelines.panelTitle": "すべてのタイムライン", - "xpack.siem.timelines.components.importTimelineModal.importFailedDetailedTitle": "タイムライン ID: {id}\n ステータスコード: {statusCode}\n メッセージ: {message}", - "xpack.siem.timelines.components.importTimelineModal.importFailedTitle": "タイムラインをインポートできませんでした", - "xpack.siem.timelines.components.importTimelineModal.importTimelineTitle": "タイムラインをインポート", - "xpack.siem.timelines.components.importTimelineModal.importTitle": "タイムラインをインポート...", - "xpack.siem.timelines.components.importTimelineModal.initialPromptTextDescription": "有効な timelines_export.ndjson ファイルを選択するか、またはドラッグアンドドロップします", - "xpack.siem.timelines.components.importTimelineModal.overwriteDescription": "保存されたオブジェクトを同じタイムライン ID で自動的に上書きします", - "xpack.siem.timelines.components.importTimelineModal.selectTimelineDescription": "インポートする SIEM ルール (タイムラインビューからエクスポートしたもの) を選択します", - "xpack.siem.timelines.components.importTimelineModal.successfullyImportedTimelinesTitle": "{totalCount} {totalCount, plural, =1 {タイムライン} other {タイムライン}}のインポートが正常に完了しました", - "xpack.siem.timelines.components.tabs.templatesTitle": "テンプレート", - "xpack.siem.timelines.components.tabs.timelinesTitle": "タイムライン", - "xpack.siem.timelines.pageTitle": "タイムライン", - "xpack.siem.topN.allEventsSelectLabel": "すべてのイベント", - "xpack.siem.topN.closeButtonLabel": "閉じる", - "xpack.siem.topN.rawEventsSelectLabel": "未加工イベント", - "xpack.siem.uiSettings.defaultAnomalyScoreDescription": "

機械学習ジョブの異常がこの値を超えると SIEM アプリに表示されます。

有効な値:0 ~ 100。

", - "xpack.siem.uiSettings.defaultAnomalyScoreLabel": "デフォルトの異常しきい値", - "xpack.siem.uiSettings.defaultIndexDescription": "

SIEM アプリがイベントを収集する Elasticsearch インデックスのコンマ区切りのリストです。

", - "xpack.siem.uiSettings.defaultIndexLabel": "デフォルトのインデックス", - "xpack.siem.uiSettings.defaultRefreshIntervalDescription": "

SIEM 時間フィルターのミリ単位のデフォルトの更新間隔です。

", - "xpack.siem.uiSettings.defaultRefreshIntervalLabel": "タイムピッカーの更新間隔", - "xpack.siem.uiSettings.defaultTimeRangeDescription": "

SIEM 時間フィルダーのデフォルトの期間です。

", - "xpack.siem.uiSettings.defaultTimeRangeLabel": "デフォルトのタイムピッカー", - "xpack.siem.uiSettings.enableNewsFeedDescription": "

ニュースフィードを有効にします

", - "xpack.siem.uiSettings.enableNewsFeedLabel": "ニュースフィード", - "xpack.siem.uiSettings.ipReputationLinks": "IP 評判リンク", - "xpack.siem.uiSettings.ipReputationLinksDescription": "IP 詳細ページに表示される評判 URL のリストを作成するための URL テンプレートの配列。", - "xpack.siem.uiSettings.newsFeedUrl": "ニュースフィードURL", - "xpack.siem.uiSettings.newsFeedUrlDescription": "

ニュースフィードコンテンツはこのURLから取得されます

", - "xpack.siem.uncommonProcessTable.hostsTitle": "すべてのホスト", - "xpack.siem.uncommonProcessTable.lastCommandTitle": "前回のコマンド", - "xpack.siem.uncommonProcessTable.lastUserTitle": "前回のユーザー", - "xpack.siem.uncommonProcessTable.nameTitle": "名前", - "xpack.siem.uncommonProcessTable.numberOfHostsTitle": "ホスト数", - "xpack.siem.uncommonProcessTable.numberOfInstances": "インスタンス", - "xpack.siem.uncommonProcessTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", - "xpack.siem.uncommonProcessTable.unit": "{totalCount, plural, =1 {process} other {processes}}", - "xpack.siem.zeek.othDescription": "SYNが検出されません。ミッドストリームトラフィックのみです", - "xpack.siem.zeek.rejDescription": "接続試行が拒否されました", - "xpack.siem.zeek.rstoODescription": "接続が確立され、接続元が中断しました(RSTを送信)", - "xpack.siem.zeek.rstosoDescription": "接続元がRSTに続きSYNを送信しました。レスポンダーからSYN-ACKはありません", - "xpack.siem.zeek.rstrDescription": "確立され、レスポンダーが中断しました", - "xpack.siem.zeek.rstrhDescription": "レスポンダーがRSTに続き SYNを送信しました。接続元(推定)からSYN-ACKはありません", - "xpack.siem.zeek.s0Description": "接続試行を検出し、返答はありません", - "xpack.siem.zeek.s1Description": "接続が確立され、中断されていません", - "xpack.siem.zeek.s2Description": "接続が確立され、接続元からの終了試行が検出されました(レスポンダーからの返答はありません)", - "xpack.siem.zeek.s3Description": "接続が確立され、レスポンダーからの終了試行が検出されました(接続元からの返答はありません)", - "xpack.siem.zeek.sfDescription": "通常のSYN/FIN完了", - "xpack.siem.zeek.shDescription": "接続元がFINに続きSYNを送信しました。レスポンダーからSYN-ACKはありません", - "xpack.siem.zeek.shrDescription": "レスポンダーがFINに続きSYNを送信しました。接続元からSYN-ACKはありません", + "xpack.securitySolution.add_filter_to_global_search_bar.filterForValueHoverAction": "値でフィルターします", + "xpack.securitySolution.add_filter_to_global_search_bar.filterOutValueHoverAction": "値を除外", + "xpack.securitySolution.alertsView.alertsDocumentType": "外部アラート", + "xpack.securitySolution.alertsView.alertsGraphTitle": "外部アラート数", + "xpack.securitySolution.alertsView.alertsStackByOptions.module": "モジュール", + "xpack.securitySolution.alertsView.alertsTableTitle": "外部アラート", + "xpack.securitySolution.alertsView.categoryLabel": "カテゴリー", + "xpack.securitySolution.alertsView.errorFetchingAlertsData": "アラートデータをクエリできませんでした", + "xpack.securitySolution.alertsView.moduleLabel": "モジュール", + "xpack.securitySolution.alertsView.showing": "表示中", + "xpack.securitySolution.alertsView.totalCountOfAlerts": "外部アラートが検索条件に一致します", + "xpack.securitySolution.alertsView.unit": "外部{totalCount, plural, =1 {alert} other {alerts}}", + "xpack.securitySolution.andOrBadge.and": "AND", + "xpack.securitySolution.andOrBadge.or": "OR", + "xpack.securitySolution.anomaliesTable.table.anomaliesDescription": "異常", + "xpack.securitySolution.anomaliesTable.table.anomaliesTooltip": "異常表は Security グローバル KQL 検索でフィルタリングできません。", + "xpack.securitySolution.anomaliesTable.table.showingDescription": "表示中", + "xpack.securitySolution.anomaliesTable.table.unit": "{totalCount, plural, =1 {anomaly} other {anomalies}}", + "xpack.securitySolution.auditd.abortedAuditStartupDescription": "中断された監査のスタートアップ", + "xpack.securitySolution.auditd.accessErrorDescription": "アクセスエラー", + "xpack.securitySolution.auditd.accessPermissionDescription": "アクセス権限", + "xpack.securitySolution.auditd.accessResultDescription": "アクセス結果", + "xpack.securitySolution.auditd.acquiredCredentialsDescription": "認証情報を取得しました:", + "xpack.securitySolution.auditd.adddedGroupAccountUsingDescription": "以下を使用してグループアカウントを追加:", + "xpack.securitySolution.auditd.addedUserAccountDescription": "ユーザーアカウントを追加しました", + "xpack.securitySolution.auditd.allocatedMemoryForDescription": "割当メモリー", + "xpack.securitySolution.auditd.asDescription": "as", + "xpack.securitySolution.auditd.assignedUserRoleToDescription": "ユーザーロールをアサインしました:", + "xpack.securitySolution.auditd.assignedVmIdDescription": "vm id が割り当てられました", + "xpack.securitySolution.auditd.assignedVMResourceDescription": "割り当てられた vm リソース", + "xpack.securitySolution.auditd.attemptedLoginDescription": "以下を経由してログインを試行しました:", + "xpack.securitySolution.auditd.attemptedLoginFromUnusalPlaceDescription": "通常と異なる場所からログインを試行しました", + "xpack.securitySolution.auditd.attemptedLoginFromUnusualHourDescription": "通常と異なる時間にログインを試行しました", + "xpack.securitySolution.auditd.auditErrorDescription": "監査エラー", + "xpack.securitySolution.auditd.authenticatedToGroupDescription": "グループに認証しました", + "xpack.securitySolution.auditd.authenticatedUsingDescription": "次の手段で認証しました:", + "xpack.securitySolution.auditd.bootedSystemDescription": "システムを起動しました", + "xpack.securitySolution.auditd.boundSocketFromDescription": "次からソケットをバインドしました:", + "xpack.securitySolution.auditd.causedMacPolicyErrorDescription": "がmacポリシーエラーを発生させました", + "xpack.securitySolution.auditd.changedAuditConfigurationDescription": "監査設定を変更しました", + "xpack.securitySolution.auditd.changedAuditFeatureDescription": "監査機能を変更しました", + "xpack.securitySolution.auditd.changedConfigurationWIthDescription": "次の設定を変更しました:", + "xpack.securitySolution.auditd.ChangedFileAttributesOfDescription": "次のファイル属性を変更しました:", + "xpack.securitySolution.auditd.changedFilePermissionOfDescription": "次のファイル権限を変更しました:", + "xpack.securitySolution.auditd.changedGroupDescription": "グループを変更しました", + "xpack.securitySolution.auditd.changedGroupPasswordDescription": "グループのパスワードを変更しました", + "xpack.securitySolution.auditd.changedIdentityUsingDescription": "以下を使用してIDを変更しました:", + "xpack.securitySolution.auditd.changedLoginIdToDescription": "ログインIDを次に変更しました:", + "xpack.securitySolution.auditd.changedMacConfigurationDescription": "mac構成を変更しました", + "xpack.securitySolution.auditd.changedPasswordWithDescription": "次のパスワードを変更しました:", + "xpack.securitySolution.auditd.changedRoleUsingDescription": "以下を使用してロールを変更しました:", + "xpack.securitySolution.auditd.changedSeLinuxBooleanDescription": "selinuxブールを変更しました", + "xpack.securitySolution.auditd.changedSelinuxEnforcementDescription": "selinux執行を変更しました", + "xpack.securitySolution.auditd.changedSystemNameDescription": "システム名を変更しました", + "xpack.securitySolution.auditd.changedSystemTimeWithDescription": "次のシステム時刻を変更しました:", + "xpack.securitySolution.auditd.changedTimeStampOfDescription": "次のタイムスタンプを変更しました:", + "xpack.securitySolution.auditd.changedToRunLevelWithDescription": "次の実行レベルを変更しました:", + "xpack.securitySolution.auditd.changedUserIdDescription": "ユーザー ID が変更されました", + "xpack.securitySolution.auditd.changeidleOwernshipOfDescription": "次のファイルの所有者を変更:", + "xpack.securitySolution.auditd.checkedFileSystemMetadataOfDescription": "次のファイルシステムメタデータを確認しました:", + "xpack.securitySolution.auditd.checkedIntegrityOfDescription": "次の整合性を確認しました:", + "xpack.securitySolution.auditd.chedckedMetaDataOfDescription": "次のメタデータを確認しました:", + "xpack.securitySolution.auditd.connectedUsingDescription": "以下を使用して接続しました:", + "xpack.securitySolution.auditd.crashedProgramDescription": "がプログラムをクラッシュさせました", + "xpack.securitySolution.auditd.createdDirectoryDescription": "ディレクトリを作成しました", + "xpack.securitySolution.auditd.createdVmImageDescription": "仮想マシンイメージを作成しました", + "xpack.securitySolution.auditd.cryptoOfficerLoggedInDescription": "クリプトオフィサーがログイン", + "xpack.securitySolution.auditd.cryptoOfficerLoggedOutDescription": "クリプトオフィサーがログアウト", + "xpack.securitySolution.auditd.deletedDescription": "削除されました", + "xpack.securitySolution.auditd.deletedGroupAccountUsingDescription": "次の手段でグループアカウントを削除", + "xpack.securitySolution.auditd.deletedUserAccountUsingDescription": "以下を使用してユーザーアカウントを削除しました:", + "xpack.securitySolution.auditd.deletedVmImageDescription": "仮想マシンイメージを削除しました", + "xpack.securitySolution.auditd.disposedCredentialsDescription": "次のアカウント認証情報を処理しました:", + "xpack.securitySolution.auditd.endedFromDescription": "終了:", + "xpack.securitySolution.auditd.errorFromDescription": "エラー:", + "xpack.securitySolution.auditd.executedDescription": "実行", + "xpack.securitySolution.auditd.executionOfForbiddenProgramDescription": "禁止されたプログラムの実行", + "xpack.securitySolution.auditd.failedLoginTooManyTimesDescription": "ログイン回数超過によりログインに失敗", + "xpack.securitySolution.auditd.inDescription": "次に含まれる:", + "xpack.securitySolution.auditd.initializedAuditSubsystemDescription": "監査サブシステムを初期化しました", + "xpack.securitySolution.auditd.issuedVmControlDescription": "仮想マシンコントロールを発行しました", + "xpack.securitySolution.auditd.killedProcessIdDescription": "プロセスIDを強制終了しました:", + "xpack.securitySolution.auditd.ListeningForConnectionsUsingDescription": "以下を使用して接続をlistenしています:", + "xpack.securitySolution.auditd.loadedFirewallRuleDescription": "ファイアウォールルールを読み込みました", + "xpack.securitySolution.auditd.loadedMacPolicyDescription": "macポリシーを読み込みました", + "xpack.securitySolution.auditd.loadedSeLinuxPolicyDescription": "selinuxポリシーを読み込みました", + "xpack.securitySolution.auditd.loaedKernelModuleOfDescription": "次のカーネルモジュールを読み込みました:", + "xpack.securitySolution.auditd.lockedAccountDescription": "アカウントをロック", + "xpack.securitySolution.auditd.loggedOutDescription": "ログアウト", + "xpack.securitySolution.auditd.macPermissionDescription": "mac権限", + "xpack.securitySolution.auditd.madeDeviceWithDescription": "デバイスを作成しました:", + "xpack.securitySolution.auditd.migratedVmFromDescription": "仮想マシンを以下から移行しました:", + "xpack.securitySolution.auditd.migratedVmToDescription": "仮想マシンを以下に移行しました:", + "xpack.securitySolution.auditd.modifiedGroupAccountDescription": "グループアカウントを修正", + "xpack.securitySolution.auditd.modifiedLevelOfDescription": "次のレベルを修正:", + "xpack.securitySolution.auditd.modifiedRoleDescription": "ロールを修正:", + "xpack.securitySolution.auditd.modifiedUserAccountDescription": "ユーザーアカウントを修正", + "xpack.securitySolution.auditd.mountedDescription": "マウントしました", + "xpack.securitySolution.auditd.negotiatedCryptoKeyDescription": "暗号キーを交渉しました", + "xpack.securitySolution.auditd.nonExistentDescription": "不明なプロセスに", + "xpack.securitySolution.auditd.OpenedFileDescription": "ファイルを開きました", + "xpack.securitySolution.auditd.openedTooManySessionsDescription": "開いたセッション数が多すぎました", + "xpack.securitySolution.auditd.overrodeLabelOfDescription": "次のラベルを上書き:", + "xpack.securitySolution.auditd.promiscuousModeDescription": "以下を使用してデバイスの無差別モードを変更しました:", + "xpack.securitySolution.auditd.ranCommandDescription": "コマンドを実行しました", + "xpack.securitySolution.auditd.receivedFromDescription": "以下より受信しました:", + "xpack.securitySolution.auditd.reconfiguredAuditDescription": "監査を再構成しました", + "xpack.securitySolution.auditd.refreshedCredentialsForDescription": "認証情報をリフレッシュしました", + "xpack.securitySolution.auditd.relabeledFileSystemDescription": "ファイルシステムのラベルを変更しました", + "xpack.securitySolution.auditd.remoteAuditConnectedDescription": "リモート監査を接続", + "xpack.securitySolution.auditd.remoteAuditDisconnectedDescription": "リモート監査を切断", + "xpack.securitySolution.auditd.removedUserRoleFromDescription": "以下からユーザーロールを削除しました:", + "xpack.securitySolution.auditd.renamedDescription": "名前を変更しました", + "xpack.securitySolution.auditd.resumedAuditLoggingDescription": "監査ログを再開しました", + "xpack.securitySolution.auditd.rotatedAuditLogsDescription": "rotated-audit-logs", + "xpack.securitySolution.auditd.scheduledPolicyOFDescription": "次のポリシーをスケジュール設定しました:", + "xpack.securitySolution.auditd.sentMessageDescription": "メッセージを送信しました", + "xpack.securitySolution.auditd.sentTestDescription": "テストを送信しました", + "xpack.securitySolution.auditd.sentToDescription": "送信先:", + "xpack.securitySolution.auditd.sessionDescription": "セッション", + "xpack.securitySolution.auditd.shutDownAuditDescription": "監査をシャットダウン", + "xpack.securitySolution.auditd.shutdownSystemDescription": "システムをシャットダウン", + "xpack.securitySolution.auditd.startedAtDescription": "開始済み", + "xpack.securitySolution.auditd.startedAuditDescription": "監査を開始", + "xpack.securitySolution.auditd.startedCryptoSessionDescription": "暗号セッションを開始しました", + "xpack.securitySolution.auditd.startedServiceDescription": "サービスを開始しました", + "xpack.securitySolution.auditd.stoppedServiceDescription": "サービスを停止しました", + "xpack.securitySolution.auditd.suspiciousProgramDescription": "不審なプログラムを使用しました", + "xpack.securitySolution.auditd.symLinkedDescription": "シンボルでリンクしました", + "xpack.securitySolution.auditd.testedFileSystemIntegrityDescription": "ファイルシステムの完全性をテスト", + "xpack.securitySolution.auditd.unknownDescription": "不明", + "xpack.securitySolution.auditd.unloadedKernelModuleOfDescription": "次のカーネルモジュールをアンロードしました:", + "xpack.securitySolution.auditd.unlockedAccountDescription": "アカウントのロックを解除しました:", + "xpack.securitySolution.auditd.unmountedDescription": "マウント解除しました", + "xpack.securitySolution.auditd.usingDescription": "using", + "xpack.securitySolution.auditd.violatedAppArmorPolicyFromDescription": "以下からのAppArmorポリシーに違反しました:", + "xpack.securitySolution.auditd.violatedSeccompPolicyWithDescription": "以下からのseccompポリシーに違反しました:", + "xpack.securitySolution.auditd.violatedSeLinuxPolicyDescription": "selinuxポリシーに違反しました", + "xpack.securitySolution.auditd.wasAuthorizedToUseDescription": "が以下の使用を承認されました:", + "xpack.securitySolution.auditd.withResultDescription": "結果付き", + "xpack.securitySolution.authenticationsTable.authenticationFailures": "認証", + "xpack.securitySolution.authenticationsTable.failures": "失敗", + "xpack.securitySolution.authenticationsTable.lastFailedDestination": "前回失敗したデスティネーション", + "xpack.securitySolution.authenticationsTable.lastFailedSource": "前回失敗したソース", + "xpack.securitySolution.authenticationsTable.lastFailedTime": "前回の失敗", + "xpack.securitySolution.authenticationsTable.lastSuccessfulDestination": "前回成功したデスティネーション", + "xpack.securitySolution.authenticationsTable.lastSuccessfulSource": "前回成功したソース", + "xpack.securitySolution.authenticationsTable.lastSuccessfulTime": "前回の成功", + "xpack.securitySolution.authenticationsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.authenticationsTable.successes": "成功", + "xpack.securitySolution.authenticationsTable.uncommonProcessTable": "非共通プロセス", + "xpack.securitySolution.authenticationsTable.unit": "{totalCount, plural, =1 {user} other {users}}", + "xpack.securitySolution.authenticationsTable.user": "ユーザー", + "xpack.securitySolution.case.allCases.actions": "アクション", + "xpack.securitySolution.case.allCases.comments": "コメント", + "xpack.securitySolution.case.allCases.noTagsAvailable": "利用可能なタグがありません", + "xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage": "ケースを表示するには、Kibanaスペースで保存されたオブジェクト管理機能の権限が必要です。詳細については、Kibana管理者に連絡してください。", + "xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle": "Kibana機能権限が必要です", + "xpack.securitySolution.case.caseTable.addNewCase": "新規ケースの追加", + "xpack.securitySolution.case.caseTable.bulkActions": "一斉アクション", + "xpack.securitySolution.case.caseTable.bulkActions.closeSelectedTitle": "選択した項目を閉じる", + "xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle": "選択した項目を削除", + "xpack.securitySolution.case.caseTable.bulkActions.openSelectedTitle": "選択した項目を再開", + "xpack.securitySolution.case.caseTable.caseDetailsLinkAria": "クリックすると、タイトル{detailName}のケースを表示します", + "xpack.securitySolution.case.caseTable.closed": "終了", + "xpack.securitySolution.case.caseTable.closedCases": "終了したケース", + "xpack.securitySolution.case.caseTable.delete": "削除", + "xpack.securitySolution.case.caseTable.incidentSystem": "インシデント管理システム", + "xpack.securitySolution.case.caseTable.noCases.body": "表示するケースがありません。新しいケースを作成するか、または上記のフィルター設定を変更してください。", + "xpack.securitySolution.case.caseTable.noCases.title": "ケースなし", + "xpack.securitySolution.case.caseTable.notPushed": "プッシュされません", + "xpack.securitySolution.case.caseTable.openCases": "ケースを開く", + "xpack.securitySolution.case.caseTable.refreshTitle": "更新", + "xpack.securitySolution.case.caseTable.requiresUpdate": " 更新が必要", + "xpack.securitySolution.case.caseTable.searchAriaLabel": "ケースの検索", + "xpack.securitySolution.case.caseTable.searchPlaceholder": "例: ケース名", + "xpack.securitySolution.case.caseTable.selectedCasesTitle": "{totalRules} {totalRules, plural, =1 {ケース} other {ケース}} を選択しました", + "xpack.securitySolution.case.caseTable.serviceNowLinkAria": "クリックすると、servicenowでインシデントを表示します", + "xpack.securitySolution.case.caseTable.showingCasesTitle": "{totalRules} {totalRules, plural, =1 {ケース} other {ケース}} を表示中", + "xpack.securitySolution.case.caseTable.snIncident": "外部インシデント", + "xpack.securitySolution.case.caseTable.unit": "{totalCount, plural, =1 {case} other {cases}}", + "xpack.securitySolution.case.caseTable.upToDate": " は最新です", + "xpack.securitySolution.case.caseView.actionHeadline": "{actionDate} の {userName} {actionName}", + "xpack.securitySolution.case.caseView.actionLabel.addComment": "コメントを追加しました", + "xpack.securitySolution.case.caseView.actionLabel.addDescription": "説明を追加しました", + "xpack.securitySolution.case.caseView.actionLabel.addedField": "追加しました", + "xpack.securitySolution.case.caseView.actionLabel.changededField": "変更しました", + "xpack.securitySolution.case.caseView.actionLabel.editedField": "編集しました", + "xpack.securitySolution.case.caseView.actionLabel.on": "日付", + "xpack.securitySolution.case.caseView.actionLabel.pushedNewIncident": "新しいインシデントとしてプッシュしました", + "xpack.securitySolution.case.caseView.actionLabel.removedField": "削除しました", + "xpack.securitySolution.case.caseView.actionLabel.removedThirdParty": "外部のインシデント管理システムを削除しました", + "xpack.securitySolution.case.caseView.actionLabel.selectedThirdParty": "インシデント管理システムとして{ thirdParty }を選択しました", + "xpack.securitySolution.case.caseView.actionLabel.updateIncident": "インシデントを更新しました", + "xpack.securitySolution.case.caseView.actionLabel.viewIncident": "{incidentNumber}を表示", + "xpack.securitySolution.case.caseView.alreadyPushedToExternalService": "既に{ externalService }インシデントにプッシュしました", + "xpack.securitySolution.case.caseView.backLabel": "ケースに戻る", + "xpack.securitySolution.case.caseView.breadcrumb": "作成", + "xpack.securitySolution.case.caseView.cancel": "キャンセル", + "xpack.securitySolution.case.caseView.case": "ケース", + "xpack.securitySolution.case.caseView.caseClosed": "ケースを閉じました", + "xpack.securitySolution.case.caseView.caseName": "ケース名", + "xpack.securitySolution.case.caseView.caseOpened": "ケースを開きました", + "xpack.securitySolution.case.caseView.caseRefresh": "ケースを更新", + "xpack.securitySolution.case.caseView.closeCase": "ケースを閉じる", + "xpack.securitySolution.case.caseView.closedCase": "閉じたケース", + "xpack.securitySolution.case.caseView.closedOn": "終了日", + "xpack.securitySolution.case.caseView.cloudDeploymentLink": "クラウド展開", + "xpack.securitySolution.case.caseView.comment": "コメント", + "xpack.securitySolution.case.caseView.comment.addComment": "コメントを追加", + "xpack.securitySolution.case.caseView.comment.addCommentHelpText": "新しいコメントを追加...", + "xpack.securitySolution.case.caseView.commentFieldRequiredError": "コメントが必要です。", + "xpack.securitySolution.case.caseView.connectorConfigureLink": "コネクター", + "xpack.securitySolution.case.caseView.connectors": "外部インシデント管理システム", + "xpack.securitySolution.case.caseView.copyCommentLinkAria": "参照リンクをコピー", + "xpack.securitySolution.case.caseView.create": "新規ケースを作成", + "xpack.securitySolution.case.caseView.createCase": "ケースを作成", + "xpack.securitySolution.case.caseView.description": "説明", + "xpack.securitySolution.case.caseView.description.save": "保存", + "xpack.securitySolution.case.caseView.edit": "編集", + "xpack.securitySolution.case.caseView.edit.comment": "コメントを編集", + "xpack.securitySolution.case.caseView.edit.description": "説明を編集", + "xpack.securitySolution.case.caseView.edit.quote": "お客様の声", + "xpack.securitySolution.case.caseView.editActionsLinkAria": "クリックすると、すべてのアクションを表示します", + "xpack.securitySolution.case.caseView.editConnector": "外部インシデント管理システムを変更", + "xpack.securitySolution.case.caseView.editTagsLinkAria": "クリックすると、タグを編集します", + "xpack.securitySolution.case.caseView.emailBody": "ケースリファレンス: {caseUrl}", + "xpack.securitySolution.case.caseView.emailSubject": "Security ケース - {caseTitle}", + "xpack.securitySolution.case.caseView.errorsPushServiceCallOutTitle": "ケースを外部システムにプッシュするには、以下が必要です。", + "xpack.securitySolution.case.caseView.fieldRequiredError": "必須フィールド", + "xpack.securitySolution.case.caseView.goToDocumentationButton": "ドキュメンテーションを表示", + "xpack.securitySolution.case.caseView.moveToCommentAria": "参照されたコメントをハイライト", + "xpack.securitySolution.case.caseView.name": "名前", + "xpack.securitySolution.case.caseView.noReportersAvailable": "利用可能なレポートがありません", + "xpack.securitySolution.case.caseView.noTags": "現在、このケースにタグは割り当てられていません。", + "xpack.securitySolution.case.caseView.openedOn": "開始日", + "xpack.securitySolution.case.caseView.optional": "オプション", + "xpack.securitySolution.case.caseView.pageBadgeLabel": "ベータ", + "xpack.securitySolution.case.caseView.pageBadgeTooltip": "ケースワークフローはまだベータです。Kibana repo で問題や不具合を報告して製品の改善にご協力ください。", + "xpack.securitySolution.case.caseView.particpantsLabel": "参加者", + "xpack.securitySolution.case.caseView.pushNamedIncident": "{ thirdParty }インシデントとしてプッシュ", + "xpack.securitySolution.case.caseView.pushThirdPartyIncident": "サードパーティインシデントとしてプッシュ", + "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedDescription": "終了したケースは外部システムに送信できません。外部システムでケースを開始または更新したい場合にはケースを再開します。", + "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedTitle": "ケースを再開する", + "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigDescription": "kibana.yml ファイルは、特定のコネクターのみを許可するように構成されています。外部システムでケースを開けるようにするには、xpack.actions.enabled Actiontypes 設定に .servicenow を追加します。詳細は {link} をご覧ください。", + "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigTitle": "Kibana の構成ファイルで ServiceNow を有効にする", + "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseDescription": "外部システムでケースを開くには、ライセンスをプラチナに更新するか、30 日間の無料トライアルを開始するか、AWS、GCP、または Azure で {link} にサインアップする必要があります。", + "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseTitle": "E lastic Platinum へのアップグレード", + "xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigTitle": "外部コネクターを選択", + "xpack.securitySolution.case.caseView.pushToServiceDisableByNoConfigTitle": "外部コネクターを構成", + "xpack.securitySolution.case.caseView.reopenCase": "ケースを再開", + "xpack.securitySolution.case.caseView.reopenedCase": "ケースを再開する", + "xpack.securitySolution.case.caseView.reporterLabel": "報告者", + "xpack.securitySolution.case.caseView.requiredUpdateToExternalService": "{ externalService }インシデントの更新が必要です", + "xpack.securitySolution.case.caseView.sendEmalLinkAria": "クリックすると、{user}に電子メールを送信します", + "xpack.securitySolution.case.caseView.statusLabel": "ステータス", + "xpack.securitySolution.case.caseView.tags": "タグ", + "xpack.securitySolution.case.caseView.to": "に", + "xpack.securitySolution.case.caseView.unknown": "不明", + "xpack.securitySolution.case.caseView.updateNamedIncident": "{ thirdParty }インシデントを更新", + "xpack.securitySolution.case.caseView.updateThirdPartyIncident": "サードパーティインシデントを更新", + "xpack.securitySolution.case.configure.errorPushingToService": "サービスへのプッシュエラー", + "xpack.securitySolution.case.configure.successSaveToast": "保存された外部接続設定", + "xpack.securitySolution.case.configureCases.addNewConnector": "新しいコネクターを追加", + "xpack.securitySolution.case.configureCases.cancelButton": "キャンセル", + "xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident": "新しいインシデントが外部システムで閉じたときにSIEMケースを自動的に閉じる", + "xpack.securitySolution.case.configureCases.caseClosureOptionsDesc": "SIEMケースの終了のしかたを定義します。自動ケース終了のためには、外部のインシデント管理システムへの接続を確立する必要がいります。", + "xpack.securitySolution.case.configureCases.caseClosureOptionsLabel": "ケース終了オプション", + "xpack.securitySolution.case.configureCases.caseClosureOptionsManual": "Security ケースを手動で閉じる", + "xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident": "新しいインシデントを外部システムにプッシュするときにSIEMケースを自動的に閉じる", + "xpack.securitySolution.case.configureCases.caseClosureOptionsTitle": "ケースのクローズ", + "xpack.securitySolution.case.configureCases.fieldMappingDesc": "データをサードパーティにプッシュするときにSIEMケースフィールドをマップします。フィールドマッピングのためには、外部のインシデント管理システムへの接続を確立する必要があります。", + "xpack.securitySolution.case.configureCases.fieldMappingEditAppend": "末尾に追加", + "xpack.securitySolution.case.configureCases.fieldMappingEditNothing": "何もしない", + "xpack.securitySolution.case.configureCases.fieldMappingEditOverwrite": "上書き", + "xpack.securitySolution.case.configureCases.fieldMappingFirstCol": "Security ケースフィールド", + "xpack.securitySolution.case.configureCases.fieldMappingSecondCol": "外部インシデントフィールド", + "xpack.securitySolution.case.configureCases.fieldMappingThirdCol": "編集時と更新時", + "xpack.securitySolution.case.configureCases.fieldMappingTitle": "フィールドマッピング", + "xpack.securitySolution.case.configureCases.headerTitle": "ケースを構成", + "xpack.securitySolution.case.configureCases.incidentManagementSystemDesc": "オプションとして、SIEMケースを選択した外部のインシデント管理システムに接続できます。そうすると、選択したサードパーティシステム内でケースデータをインシデントとしてプッシュできます。", + "xpack.securitySolution.case.configureCases.incidentManagementSystemLabel": "インシデント管理システム", + "xpack.securitySolution.case.configureCases.incidentManagementSystemTitle": "外部のインシデント管理システムに接続", + "xpack.securitySolution.case.configureCases.mappingFieldComments": "コメント", + "xpack.securitySolution.case.configureCases.mappingFieldDescription": "説明", + "xpack.securitySolution.case.configureCases.mappingFieldNotMapped": "マップされません", + "xpack.securitySolution.case.configureCases.mappingFieldShortDescription": "短い説明", + "xpack.securitySolution.case.configureCases.mappingFieldSummary": "まとめ", + "xpack.securitySolution.case.configureCases.noConnector": "コネクターを選択していません", + "xpack.securitySolution.case.configureCases.updateConnector": "コネクターを更新", + "xpack.securitySolution.case.configureCases.updateSelectedConnector": "{ connectorName }を更新", + "xpack.securitySolution.case.configureCases.warningMessage": "選択したコネクターが削除されました。別のコネクターを選択するか、新しいコネクターを作成してください。", + "xpack.securitySolution.case.configureCases.warningTitle": "警告", + "xpack.securitySolution.case.configureCasesButton": "外部接続を編集", + "xpack.securitySolution.case.confirmDeleteCase.confirmQuestion": "このケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", + "xpack.securitySolution.case.confirmDeleteCase.confirmQuestionPlural": "これらのケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", + "xpack.securitySolution.case.confirmDeleteCase.deleteCase": "ケースを削除", + "xpack.securitySolution.case.confirmDeleteCase.deleteCases": "ケースを削除", + "xpack.securitySolution.case.confirmDeleteCase.deleteTitle": "「{caseTitle}」を削除", + "xpack.securitySolution.case.confirmDeleteCase.selectedCases": "選択したケースを削除", + "xpack.securitySolution.case.connectors.common.apiTokenTextFieldLabel": "APIトークン", + "xpack.securitySolution.case.connectors.common.apiUrlTextFieldLabel": "URL", + "xpack.securitySolution.case.connectors.common.emailTextFieldLabel": "メール", + "xpack.securitySolution.case.connectors.common.invalidApiUrlTextField": "URLが無効です", + "xpack.securitySolution.case.connectors.common.passwordTextFieldLabel": "パスワード", + "xpack.securitySolution.case.connectors.common.requiredApiTokenTextField": "APIトークンが必要です", + "xpack.securitySolution.case.connectors.common.requiredApiUrlTextField": "URLが必要です", + "xpack.securitySolution.case.connectors.common.requiredEmailTextField": "電子メールが必要です", + "xpack.securitySolution.case.connectors.common.requiredPasswordTextField": "パスワードが必要です", + "xpack.securitySolution.case.connectors.common.requiredUsernameTextField": "ユーザー名が必要です", + "xpack.securitySolution.case.connectors.common.usernameTextFieldLabel": "ユーザー名", + "xpack.securitySolution.case.connectors.jira.actionTypeTitle": "Jira", + "xpack.securitySolution.case.connectors.jira.projectKey": "プロジェクトキー", + "xpack.securitySolution.case.connectors.jira.requiredProjectKeyTextField": "プロジェクトキーが必要です", + "xpack.securitySolution.case.connectors.jira.selectMessageText": "JiraでSIEMケースデータを更新するか、新しいインシデントにプッシュ", + "xpack.securitySolution.case.connectors.servicenow.actionTypeTitle": "ServiceNow", + "xpack.securitySolution.case.connectors.servicenow.selectMessageText": "ServiceNow で Security ケースデータをb\\更新するか、または新しいインシデントにプッシュする", + "xpack.securitySolution.case.createCase.descriptionFieldRequiredError": "説明が必要です。", + "xpack.securitySolution.case.createCase.fieldTagsHelpText": "このケースの 1 つ以上のカスタム識別タグを入力します。新しいタグを開始するには、各タグの後でEnterを押します。", + "xpack.securitySolution.case.createCase.titleFieldRequiredError": "タイトルが必要です。", + "xpack.securitySolution.case.dismissErrorsPushServiceCallOutTitle": "閉じる", + "xpack.securitySolution.case.pageTitle": "ケース", + "xpack.securitySolution.case.readOnlySavedObjectDescription": "ケースの表示のみが許可されています。ケースを開いて更新する必要がある場合は、Kibana管理者に連絡してください。", + "xpack.securitySolution.case.readOnlySavedObjectTitle": "読み取り専用機能権限が割り当てられています。", + "xpack.securitySolution.certificate.fingerprint.clientCertLabel": "クライアント証明書", + "xpack.securitySolution.certificate.fingerprint.serverCertLabel": "サーバー証明書", + "xpack.securitySolution.chart.allOthersGroupingLabel": "その他すべて", + "xpack.securitySolution.chart.dataAllValuesZerosTitle": "すべての値はゼロを返します", + "xpack.securitySolution.chart.dataNotAvailableTitle": "チャートデータが利用できません", + "xpack.securitySolution.chrome.help.appName": "Security", + "xpack.securitySolution.chrome.helpMenu.documentation": "SIEMドキュメンテーション", + "xpack.securitySolution.chrome.helpMenu.documentation.ecs": "ECSドキュメンテーション", + "xpack.securitySolution.clipboard.copied": "コピー完了", + "xpack.securitySolution.clipboard.copy": "コピー", + "xpack.securitySolution.clipboard.copy.to.the.clipboard": "クリップボードにコピー", + "xpack.securitySolution.clipboard.to.the.clipboard": "クリップボードに", + "xpack.securitySolution.components.embeddables.embeddedMap.clientLayerLabel": "クライアントポイント", + "xpack.securitySolution.components.embeddables.embeddedMap.destinationLayerLabel": "デスティネーションポイント", + "xpack.securitySolution.components.embeddables.embeddedMap.embeddableHeaderHelp": "マップ構成ヘルプ", + "xpack.securitySolution.components.embeddables.embeddedMap.embeddableHeaderTitle": "ネットワーク マップ", + "xpack.securitySolution.components.embeddables.embeddedMap.embeddablePanelTitle": "ソース -> デスティネーション ポイントツーポイントマップ", + "xpack.securitySolution.components.embeddables.embeddedMap.errorConfiguringEmbeddableApiTitle": "埋め込み可能な API の構成中にエラーが発生", + "xpack.securitySolution.components.embeddables.embeddedMap.errorCreatingMapEmbeddableTitle": "マップに’埋め込み可能なアイテムの作成中にエラーが発生", + "xpack.securitySolution.components.embeddables.embeddedMap.lineLayerLabel": "折れ線", + "xpack.securitySolution.components.embeddables.embeddedMap.serverLayerLabel": "サーバーポイント", + "xpack.securitySolution.components.embeddables.embeddedMap.sourceLayerLabel": "ソースポイント", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel": "インデックスパターンを編集", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorDescription1": "マップデータを表示するには、SIEMインデックス({defaultIndex})と、同じ名前またはglobパターンのKibanaインデックスパターンを定義する必要があります。{beats}を使用するときには、ホストで{setup}コマンドを実行し、自動的にインデックスパターンを作成できます。例:{example}。", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorDescription2": "Kibanaで手動でインデックスパターンを構成することもできます。", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorTitle": "必要なインデックスパターンが構成されていません", + "xpack.securitySolution.components.embeddables.mapToolTip.errorTitle": "マップ機能の読み込み中にエラーが発生", + "xpack.securitySolution.components.embeddables.mapToolTip.filterForValueHoverAction": "値でフィルターします", + "xpack.securitySolution.components.embeddables.mapToolTip.footerLabel": "{totalFeatures} 件中 {currentFeature} 件 {totalFeatures, plural, =1 {feature} other {features}}", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.clientLabel": "クライアント", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.destinationLabel": "送信先", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.serverLabel": "サーバー", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.sourceLabel": "送信元", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.asnTitle": "ASN", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.clientDomainTitle": "クライアントドメイン", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.clientIPTitle": "クライアントIP", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.destinationDomainTitle": "デスティネーションドメイン", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.destinationIPTitle": "デスティネーション IP", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.hostTitle": "ホスト", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.locationTitle": "場所", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.serverDomainTitle": "サーバードメイン", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.serverIPTitle": "サーバーIP", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.sourceDomainTitle": "ソースドメイン", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.sourceIPTitle": "ソース IP", + "xpack.securitySolution.components.flowControls.selectFlowDirection.bidirectionalButtonLabel": "双方向", + "xpack.securitySolution.components.flowControls.selectFlowDirection.unidirectionalButtonLabel": "一方向", + "xpack.securitySolution.components.flowControls.selectFlowTarget.clientDropDownOptionLabel": "クライアント", + "xpack.securitySolution.components.flowControls.selectFlowTarget.destinationDropDownOptionLabel": "送信先", + "xpack.securitySolution.components.flowControls.selectFlowTarget.serverDropDownOptionLabel": "サーバー", + "xpack.securitySolution.components.flowControls.selectFlowTarget.sourceDropDownOptionLabel": "送信元", + "xpack.securitySolution.components.histogram.stackByOptions.stackByLabel": "積み上げ", + "xpack.securitySolution.components.ml.anomaly.errors.anomaliesTableFetchFailureTitle": "異常表の取得に失敗", + "xpack.securitySolution.components.ml.api.errors.networkErrorFailureTitle": "ネットワークエラー", + "xpack.securitySolution.components.ml.api.errors.statusCodeFailureTitle": "ステータスコード:", + "xpack.securitySolution.components.ml.permissions.errors.machineLearningPermissionsFailureTitle": "機械学習パーミッションエラー", + "xpack.securitySolution.components.mlJobSelect.machineLearningLink": "機械学習", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.groupsLabel": "グループ", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.noGroupsAvailableDescription": "利用可能なグループがありません", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.searchFilterPlaceholder": "例: rare_process_linux", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.showAllJobsLabel": "Elastic ジョブ", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.showSiemJobsLabel": "カスタムジョブ", + "xpack.securitySolution.components.mlPopup.anomalyDetectionDescription": "以下の機械学習ジョブのいずれかを実行して、検知された異常の信号を生成する信号検知ルールを作成する準備をし、SIEMアプリケーションで異常イベントを表示します。基本操作として、いくつかの一般的な検出ジョブが提供されています。独自のカスタムMLジョブを追加する場合は、{machineLearning}アプリケーションからMLジョブを作成して、「SIEM」グループに追加します。", + "xpack.securitySolution.components.mlPopup.cloudLink": "クラウド展開", + "xpack.securitySolution.components.mlPopup.errors.createJobFailureTitle": "ジョブ作成エラー", + "xpack.securitySolution.components.mlPopup.errors.startJobFailureTitle": "ジョブ開始エラー", + "xpack.securitySolution.components.mlPopup.hooks.errors.indexPatternFetchFailureTitle": "インデックスパターン取得エラー", + "xpack.securitySolution.components.mlPopup.hooks.errors.siemJobFetchFailureTitle": "Security ジョブ取得エラー", + "xpack.securitySolution.components.mlPopup.jobsTable.createCustomJobButtonLabel": "カスタムジョブを作成", + "xpack.securitySolution.components.mlPopup.jobsTable.jobNameColumn": "ジョブ名", + "xpack.securitySolution.components.mlPopup.jobsTable.noItemsDescription": "Security 機械学習ジョブが見つかりませんでした", + "xpack.securitySolution.components.mlPopup.jobsTable.runJobColumn": "ジョブを実行", + "xpack.securitySolution.components.mlPopup.jobsTable.tagsColumn": "グループ", + "xpack.securitySolution.components.mlPopup.licenseButtonLabel": "ライセンスの管理", + "xpack.securitySolution.components.mlPopup.machineLearningLink": "機械学習", + "xpack.securitySolution.components.mlPopup.mlJobSettingsButtonLabel": "MLジョブ設定", + "xpack.securitySolution.components.mlPopup.moduleNotCompatibleDescription": "データが見つかりませんでした。機械学習ジョブ要件の詳細については、{mlDocs}を参照してください。", + "xpack.securitySolution.components.mlPopup.moduleNotCompatibleTitle": "{incompatibleJobCount} 件が {incompatibleJobCount, plural, =1 {job} other {jobs}} 現在利用できません", + "xpack.securitySolution.components.mlPopup.showingLabel": "{filterResultsLength} 件の{filterResultsLength, plural, one {ジョブ} other {ジョブ}}を表示中", + "xpack.securitySolution.components.mlPopup.upgradeButtonLabel": "サブスクリプションオプション", + "xpack.securitySolution.components.mlPopup.upgradeDescription": "Security の異常検出機能にアクセスするには、ライセンスをプラチナに更新するか、30 日間の無料トライアルを開始するか、AWS、GCP、または Azure で{cloudLink} にサインアップしてください。その後、機械学習ジョブを実行して異常を表示できます。", + "xpack.securitySolution.components.mlPopup.upgradeTitle": "E lastic Platinum へのアップグレード", + "xpack.securitySolution.components.stepDefineRule.ruleTypeField.subscriptionsLink": "プラチナサブスクリプション", + "xpack.securitySolution.containers.anomalies.errorFetchingAnomaliesData": "異常データをクエリできませんでした", + "xpack.securitySolution.containers.anomalies.stackByJobId": "ジョブ", + "xpack.securitySolution.containers.anomalies.title": "異常", + "xpack.securitySolution.containers.case.closedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}をクローズしました", + "xpack.securitySolution.containers.case.deletedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を削除しました", + "xpack.securitySolution.containers.case.errorDeletingTitle": "データの削除エラー", + "xpack.securitySolution.containers.case.errorTitle": "データの取得中にエラーが発生", + "xpack.securitySolution.containers.case.reopenedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を再オープンしました", + "xpack.securitySolution.containers.case.updatedCase": "\"{caseTitle}\"を更新しました", + "xpack.securitySolution.containers.detectionEngine.addRuleFailDescription": "ルールを追加できませんでした", + "xpack.securitySolution.containers.detectionEngine.createPrePackagedRuleFailDescription": "Elasticから事前にパッケージ化されているルールをインストールすることができませんでした", + "xpack.securitySolution.containers.detectionEngine.createPrePackagedRuleSuccesDescription": "Elasticから事前にパッケージ化されているルールをインストールしました", + "xpack.securitySolution.containers.detectionEngine.rules": "ルールを取得できませんでした", + "xpack.securitySolution.containers.detectionEngine.tagFetchFailDescription": "タグを取得できませんでした", + "xpack.securitySolution.containers.errors.dataFetchFailureTitle": "データの取得に失敗", + "xpack.securitySolution.containers.errors.networkFailureTitle": "ネットワーク障害", + "xpack.securitySolution.containers.errors.stopJobFailureTitle": "ジョブ停止エラー", + "xpack.securitySolution.dataProviders.and": "AND", + "xpack.securitySolution.dataProviders.copyToClipboardTooltip": "クリップボードにコピー", + "xpack.securitySolution.dataProviders.deleteDataProvider": "削除", + "xpack.securitySolution.dataProviders.dropAnything": "何でもドロップできます", + "xpack.securitySolution.dataProviders.dropHere": "ここにドロップしてください", + "xpack.securitySolution.dataProviders.dropHereToAddAnLabel": "ここにドロップして追加します", + "xpack.securitySolution.dataProviders.edit": "編集", + "xpack.securitySolution.dataProviders.editMenuItem": "フィルターを編集", + "xpack.securitySolution.dataProviders.editTitle": "フィルターの編集", + "xpack.securitySolution.dataProviders.excludeDataProvider": "結果を除外", + "xpack.securitySolution.dataProviders.existsLabel": "存在する", + "xpack.securitySolution.dataProviders.fieldLabel": "フィールド", + "xpack.securitySolution.dataProviders.filterForFieldPresentLabel": "現在のフィールドのフィルター", + "xpack.securitySolution.dataProviders.hereToBuildAn": "して開発", + "xpack.securitySolution.dataProviders.highlighted": "ハイライト", + "xpack.securitySolution.dataProviders.includeDataProvider": "結果を含める", + "xpack.securitySolution.dataProviders.not": "NOT", + "xpack.securitySolution.dataProviders.or": "または", + "xpack.securitySolution.dataProviders.query": "クエリ", + "xpack.securitySolution.dataProviders.reEnableDataProvider": "再度有効にする", + "xpack.securitySolution.dataProviders.removeDataProvider": "データプロバイダーを削除", + "xpack.securitySolution.dataProviders.showOptionsDataProvider": "次のオプションを表示:", + "xpack.securitySolution.dataProviders.temporaryDisableDataProvider": "一時的に無効にする", + "xpack.securitySolution.dataProviders.toBuildAn": "して開発", + "xpack.securitySolution.dataProviders.toggle": "切り替え", + "xpack.securitySolution.dataProviders.valueAriaLabel": "値", + "xpack.securitySolution.dataProviders.valuePlaceholder": "値", + "xpack.securitySolution.detectionEngine.alertTitle": "外部アラート", + "xpack.securitySolution.detectionEngine.buttonManageRules": "シグナル検出ルールの管理", + "xpack.securitySolution.detectionEngine.components.importRuleModal.cancelTitle": "キャンセル", + "xpack.securitySolution.detectionEngine.components.importRuleModal.importFailedDetailedTitle": "ルールID: {ruleId}\n ステータスコード: {statusCode}\n メッセージ: {message}", + "xpack.securitySolution.detectionEngine.components.importRuleModal.importFailedTitle": "ルールをインポートできませんでした", + "xpack.securitySolution.detectionEngine.components.importRuleModal.importRuleTitle": "ルールのインポート", + "xpack.securitySolution.detectionEngine.components.importRuleModal.initialPromptTextDescription": "有効なrules_export.ndjsonファイルを選択するか、ドラッグしてドロップします", + "xpack.securitySolution.detectionEngine.components.importRuleModal.overwriteDescription": "保存されたオブジェクトを同じルールIDで自動的に上書きします", + "xpack.securitySolution.detectionEngine.components.importRuleModal.selectRuleDescription": "インポートする Security ルール (検出エンジンビューからエクスポートしたもの) を選択します", + "xpack.securitySolution.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle": "{totalRules} {totalRules, plural, =1 {ルール} other {ルール}}を正常にインポートしました", + "xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle": "ルールの作成と有効化", + "xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle": "有効化せずにルールを作成", + "xpack.securitySolution.detectionEngine.createRule.backToRulesDescription": "シグナル検出ルールに戻る", + "xpack.securitySolution.detectionEngine.createRule.editRuleButton": "編集", + "xpack.securitySolution.detectionEngine.createRule.filtersLabel": "フィルター", + "xpack.securitySolution.detectionEngine.createRule.mlRuleTypeDescription": "機械学習", + "xpack.securitySolution.detectionEngine.createRule.pageTitle": "新規ジョブを作成", + "xpack.securitySolution.detectionEngine.createRule.QueryLabel": "カスタムクエリ", + "xpack.securitySolution.detectionEngine.createRule.queryRuleTypeDescription": "クエリ", + "xpack.securitySolution.detectionEngine.createRule.savedIdLabel": "保存されたクエリ名", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.descriptionFieldRequiredError": "説明が必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fiedIndexPatternsLabel": "インデックスパターン", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldDescriptionLabel": "説明", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldFalsePositiveLabel": "誤検出の例", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel": "MITRE ATT&CK\\u2122", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNameLabel": "名前", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldReferenceUrlsLabel": "参照URL", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldRiskScoreLabel": "リスクスコア", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldSeverityLabel": "深刻度", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTagsHelpText": "このルールの1つ以上のカスタム識別タグを入力します。新しいタグを開始するには、各タグの後でEnterを押します。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTagsLabel": "タグ", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateHelpText": "生成されたシグナルを調査するときにテンプレートとして使用する既存のタイムラインを選択します。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateLabel": "タイムラインテンプレート", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.guideHelpText": "シグナル調査を実施するアナリストに役立つ情報を提供します。このガイドは、ルールの詳細ページとこのルールで生成されたシグナルから作成されたタイムラインの両方に表示されます。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.guideLabel": "調査ガイド", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError": "名前が必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutrule.noteHelpText": "ルール調査ガイドを追加...", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.severityFieldRequiredError": "深刻度が必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.addFalsePositiveDescription": "誤検出の例を追加します", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.addReferenceDescription": "参照URLを追加します", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.advancedSettingsButton": "高度な設定", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionCriticalDescription": "重大", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionHighDescription": "高", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionLowDescription": "低", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionMediumDescription": "中", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customMitreAttackTechniquesFieldRequiredError": "Tacticには1つ以上のTechniqueが必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError": "KQLが無効です", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldRequiredError": "カスタムクエリが必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "異常スコアしきい値", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "機械学習ジョブ", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "カスタムクエリ", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldRuleTypeLabel": "ルールタイプ", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.importTimelineModalTitle": "保存されたタイムラインからクエリをインポート", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.importTimelineQueryButton": "保存されたタイムラインからクエリをインポート", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesCustomDescription": "インデックスのカスタムリストを入力します", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesFromConfigDescription": "SIEM詳細設定からElasticsearchインデックスを使用します", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesHelperDescription": "このルールを実行するElasticsearchインデックスのパターンを入力しますデフォルトでは、SIEM詳細設定で定義されたインデックスパターンが含まれます。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningJobIdHelpText": "手始めに使えるように、一般的なジョブがいくつか提供されています。独自のカスタムジョブを追加するには、{machineLearning} アプリケーションでジョブに「siem」のグループを割り当て、ここに表示されるようにします。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningJobIdRequired": "機械学習ジョブが必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlEnableJobWarningTitle": "このMLジョブは現在実行されていません。このルールを有効にする前に、このジョブを「MLジョブ設定」で実行するように設定してください。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText": "ジョブを選択してください", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.outputIndiceNameFieldRequiredError": "インデックスパターンが最低1つ必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "URLの形式が無効です", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "デフォルトインデックスパターンにリセット", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDescription": "異常なアクティビティを検出するための ML ジョブを選択します。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDisabledDescription": "ML にアクセスするには {subscriptionsLink} が必要です", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeTitle": "機械学習", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeDescription": "KQL または Lucene を使用して、インデックス全体にわたる問題を検出します。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeTitle": "カスタムクエリ", + "xpack.securitySolution.detectionEngine.createRule.stepRuleActions.fieldThrottleHelpText": "ルールが true であると評価された場合に自動アクションを実行するタイミングを選択します。", + "xpack.securitySolution.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel": "アクション頻度", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText": "ルックバック期間に時間を追加してシグナルの見落としを防ぐ。", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel": "追加のルックバック時間", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText": "ルールは定期的に実行し、指定の時間枠内でシグナルを検出する。", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalLabel": "次の間隔で実行", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription": "時間", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.invalidTimeMessageDescription": "時間が必要です。", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription": "分", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription": "秒", + "xpack.securitySolution.detectionEngine.details.stepAboutRule.aboutText": "概要", + "xpack.securitySolution.detectionEngine.details.stepAboutRule.detailsLabel": "詳細", + "xpack.securitySolution.detectionEngine.details.stepAboutRule.investigationGuideLabel": "調査ガイド", + "xpack.securitySolution.detectionEngine.detectionsPageTitle": "検出", + "xpack.securitySolution.detectionEngine.dismissButton": "閉じる", + "xpack.securitySolution.detectionEngine.dismissNoApiIntegrationKeyButton": "閉じる", + "xpack.securitySolution.detectionEngine.editRule.backToDescription": "戻る", + "xpack.securitySolution.detectionEngine.editRule.cancelTitle": "キャンセル", + "xpack.securitySolution.detectionEngine.editRule.errorMsgDescription": "申し訳ありません", + "xpack.securitySolution.detectionEngine.editRule.pageTitle": "ルール設定の編集", + "xpack.securitySolution.detectionEngine.editRule.saveChangeTitle": "変更を保存", + "xpack.securitySolution.detectionEngine.emptyActionPrimary": "セットアップの手順を表示", + "xpack.securitySolution.detectionEngine.emptyActionSecondary": "ドキュメントに移動", + "xpack.securitySolution.detectionEngine.emptyTitle": "Securityアプリケーションの検出エンジンに関連したインデックスがないようです", + "xpack.securitySolution.detectionEngine.goToDocumentationButton": "ドキュメンテーションを表示", + "xpack.securitySolution.detectionEngine.headerPage.pageBadgeLabel": "ベータ", + "xpack.securitySolution.detectionEngine.headerPage.pageBadgeTooltip": "検出はまだベータ段階です。Kibana repoで問題やバグを報告して、製品の改善にご協力ください。", + "xpack.securitySolution.detectionEngine.mitreAttack.addTitle": "MITRE ATT&CK\\u2122脅威を追加", + "xpack.securitySolution.detectionEngine.mitreAttack.tacticPlaceHolderDescription": "Tacticを追加...", + "xpack.securitySolution.detectionEngine.mitreAttack.tacticsDescription": "Tactic", + "xpack.securitySolution.detectionEngine.mitreAttack.techniquesDescription": "手法", + "xpack.securitySolution.detectionEngine.mitreAttack.techniquesPlaceHolderDescription": "Techniqueを選択...", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.collectionDescription": "収集(TA0009)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.commandAndControlDescription": "コマンドとコントロール(TA0011)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.credentialAccessDescription": "資格情報アクセス(TA0006)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.defenseEvasionDescription": "侵入防御(TA0005)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.discoveryDescription": "検出(TA0007)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.executionDescription": "実行(TA0002)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.exfiltrationDescription": "抽出(TA0010)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.impactDescription": "影響(TA0040)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.initialAccessDescription": "初期アクセス(TA0001)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.lateralMovementDescription": "水平移動(TA0008)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.persistenceDescription": "永続(TA0003)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.privilegeEscalationDescription": "特権昇格(TA0004)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accessibilityFeaturesDescription": "アクセシビリティ機能(T1015)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accessTokenManipulationDescription": "アクセストークン操作(T1134)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountAccessRemovalDescription": "アカウントアクセス削除(T1531)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountDiscoveryDescription": "アカウント検出(T1087)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountManipulationDescription": "アカウント操作(T1098)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.appCertDlLsDescription": "AppCert DLL (T1182)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.appInitDlLsDescription": "AppInit DLL (T1103)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.appleScriptDescription": "AppleScript (T1155)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationAccessTokenDescription": "アプリケーションアクセストークン(T1527)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationDeploymentSoftwareDescription": "アプリケーション開発ソフトウェア(T1017)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationShimmingDescription": "アプリケーションシミング(T1138)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationWindowDiscoveryDescription": "アプリケーションウィンドウ検出(T1010)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.audioCaptureDescription": "音声キャプチャ(T1123)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.authenticationPackageDescription": "認証パッケージ(T1131)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.automatedCollectionDescription": "自動収集(T1119)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.automatedExfiltrationDescription": "自動抽出(T1020)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bashHistoryDescription": "Bash履歴(T1139)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bashProfileAndBashrcDescription": ".bash_profileおよび.bashrc (T1156)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.binaryPaddingDescription": "バイナリパディング(T1009)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bitsJobsDescription": "BITSジョブ(T1197)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bootkitDescription": "Bootkit (T1067)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.browserBookmarkDiscoveryDescription": "ブラウザーブックマーク検出(T1217)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.browserExtensionsDescription": "ブラウザー拡張(T1176)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bruteForceDescription": "Brute Force (T1110)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bypassUserAccountControlDescription": "ユーザーアカウント制御のバイパス(T1088)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.changeDefaultFileAssociationDescription": "デフォルトファイル関連付けの変更(T1042)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.clearCommandHistoryDescription": "コマンド履歴の消去(T1146)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.clipboardDataDescription": "クリップボードデータ(T1115)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudInstanceMetadataApiDescription": "クラウドインスタンスメタデータAPI (T1522)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudServiceDashboardDescription": "クラウドサービスダッシュボード(T1538)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudServiceDiscoveryDescription": "クラウドサービス検出(T1526)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cmstpDescription": "CMSTP (T1191)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.codeSigningDescription": "コード署名(T1116)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.commandLineInterfaceDescription": "コマンドラインインターフェース(T1059)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.commonlyUsedPortDescription": "一般的に使用されるポート(T1043)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.communicationThroughRemovableMediaDescription": "リムーバブルメディア経由の通信(T1092)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.compileAfterDeliveryDescription": "配信後のコンパイル(T1500)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.compiledHtmlFileDescription": "コンパイルされたHTMLファイル(T1223)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentFirmwareDescription": "コンポーネントファームウェア(T1109)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentObjectModelAndDistributedComDescription": "コンポーネントオブジェクトモデルおよび分散COM (T1175)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentObjectModelHijackingDescription": "コンポーネントオブジェクトモデルハイジャック(T1122)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.connectionProxyDescription": "接続プロキシ(T1090)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.controlPanelItemsDescription": "コントロールパネルアイテム(T1196)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.createAccountDescription": "アカウントの作成(T1136)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialDumpingDescription": "資格情報ダンピング(T1003)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsFromWebBrowsersDescription": "Webブラウザーからの資格情報(T1503)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsInFilesDescription": "ファイルの資格情報(T1081)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsInRegistryDescription": "レジストリの資格情報(T1214)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.customCommandAndControlProtocolDescription": "カスタムコマンドおよび制御プロトコル(T1094)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.customCryptographicProtocolDescription": "カスタム暗号プロトコル(T1024)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataCompressedDescription": "データ圧縮(T1002)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataDestructionDescription": "データ破壊(T1485)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncodingDescription": "データエンコード(T1132)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncryptedDescription": "データ暗号化(T1022)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncryptedForImpactDescription": "影響のデータ暗号化(T1486)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromCloudStorageObjectDescription": "クラウドストレージオブジェクトからのデータ(T1530)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromInformationRepositoriesDescription": "情報リポジトリからのデータ(T1213)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromLocalSystemDescription": "ローカルシステムからのデータ(T1005)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromNetworkSharedDriveDescription": "ネットワーク共有ドライブからのデータ(T1039)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromRemovableMediaDescription": "リムーバブルメディアからのデータ(T1025)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataObfuscationDescription": "データ難読化(T1001)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataStagedDescription": "データステージ(T1074)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataTransferSizeLimitsDescription": "データ転送サイズ上限(T1030)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dcShadowDescription": "DCShadow (T1207)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.defacementDescription": "改ざん(T1491)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.deobfuscateDecodeFilesOrInformationDescription": "ファイルまたは情報の難読化解除/デコード(T1140)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.disablingSecurityToolsDescription": "セキュリティツールの無効化(T1089)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.diskContentWipeDescription": "ディスク内容のワイプ(T1488)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.diskStructureWipeDescription": "ディスク構造のワイプ(T1487)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dllSearchOrderHijackingDescription": "DLL検索順序ハイジャック(T1038)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dllSideLoadingDescription": "DLLサイドロード(T1073)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainFrontingDescription": "ドメインフロンティング(T1172)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainGenerationAlgorithmsDescription": "ドメイン生成アルゴリズム(T1483)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainTrustDiscoveryDescription": "ドメイン信頼検出(T1482)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.driveByCompromiseDescription": "Drive-by Compromise (T1189)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dylibHijackingDescription": "Dylibハイジャック(T1157)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dynamicDataExchangeDescription": "動的データ交換(T1173)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.elevatedExecutionWithPromptDescription": "プロンプトを使用した昇格された実行(T1514)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.emailCollectionDescription": "電子メール収集(T1114)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.emondDescription": "Emond (T1519)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.endpointDenialOfServiceDescription": "エンドポイントサービス妨害(T1499)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionGuardrailsDescription": "実行ガードレール(T1480)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionThroughApiDescription": "API経由の実行(T1106)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionThroughModuleLoadDescription": "モジュール読み込み経由の実行(T1129)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverAlternativeProtocolDescription": "代替プロトコルでの抽出(T1048)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverCommandAndControlChannelDescription": "コマンドおよび制御チャネルでの抽出(T1041)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverOtherNetworkMediumDescription": "他のネットワーク媒体での抽出(T1011)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverPhysicalMediumDescription": "物理媒体での抽出(T1052)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForClientExecutionDescription": "クライアント実行の悪用(T1203)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForCredentialAccessDescription": "資格情報アクセスの悪用(T1212)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForDefenseEvasionDescription": "侵入防御の悪用(T1211)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForPrivilegeEscalationDescription": "権限昇格の悪用(T1068)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationOfRemoteServicesDescription": "リモートサービスの悪用(T1210)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitPublicFacingApplicationDescription": "公開アプリケーションの悪用(T1190)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.externalRemoteServicesDescription": "外部リモートサービス(T1133)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.extraWindowMemoryInjectionDescription": "追加ウィンドウメモリインジェクション(T1181)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fallbackChannelsDescription": "フォールバックチャネル(T1008)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileAndDirectoryDiscoveryDescription": "ファイルおよびディレクトリ検索(T1083)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileAndDirectoryPermissionsModificationDescription": "ファイルおよびディレクトリアクセス権修正(T1222)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileDeletionDescription": "ファイル削除(T1107)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileSystemLogicalOffsetsDescription": "ファイルシステム論理オフセット(T1006)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileSystemPermissionsWeaknessDescription": "ファイルシステムアクセス権脆弱性(T1044)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.firmwareCorruptionDescription": "ファームウェア破損(T1495)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.forcedAuthenticationDescription": "強制認証(T1187)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.gatekeeperBypassDescription": "Gatekeeperバイパス(T1144)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.graphicalUserInterfaceDescription": "グラフィカルユーザーインターフェース(T1061)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.groupPolicyModificationDescription": "グループポリシー修正(T1484)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hardwareAdditionsDescription": "ハードウェア追加(T1200)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenFilesAndDirectoriesDescription": "非表示のファイルおよびディレクトリ(T1158)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenUsersDescription": "非表示のユーザー(T1147)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenWindowDescription": "非表示のウィンドウ(T1143)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.histcontrolDescription": "HISTCONTROL (T1148)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hookingDescription": "フック(T1179)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hypervisorDescription": "ハイパーバイザー(T1062)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.imageFileExecutionOptionsInjectionDescription": "画像ファイル実行オプションインジェクション(T1183)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.implantContainerImageDescription": "コンテナーイメージの挿入(T1525)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorBlockingDescription": "インジケーターブロック(T1054)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorRemovalFromToolsDescription": "ツールからのインジケーター削除(T1066)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorRemovalOnHostDescription": "ホストでのインジケーター削除(T1070)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indirectCommandExecutionDescription": "間接コマンド実行(T1202)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.inhibitSystemRecoveryDescription": "システム回復の抑制(T1490)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.inputCaptureDescription": "入力キャプチャ(T1056)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.inputPromptDescription": "入力プロンプト(T1141)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.installRootCertificateDescription": "ルート証明書のインストール(T1130)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.installUtilDescription": "InstallUtil (T1118)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.internalSpearphishingDescription": "内部スピアフィッシング(T1534)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.kerberoastingDescription": "Kerberoasting (T1208)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.kernelModulesAndExtensionsDescription": "カーネルモジュールおよび拡張(T1215)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.keychainDescription": "鍵チェーン(T1142)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchAgentDescription": "エージェントの起動(T1159)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchctlDescription": "Launchctl (T1152)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchDaemonDescription": "デーモンの起動(T1160)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.lcLoadDylibAdditionDescription": "LC_LOAD_DYLIB追加(T1161)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.lcMainHijackingDescription": "LC_MAINハイジャック(T1149)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.llmnrNbtNsPoisoningAndRelayDescription": "LLMNR/NBT-NSポイズニングおよびリレー(T1171)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.localJobSchedulingDescription": "ローカルジョブスケジュール(T1168)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.loginItemDescription": "ログイン項目(T1162)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.logonScriptsDescription": "ログオンスクリプト(T1037)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.lsassDriverDescription": "LSASSドライバー(T1177)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.manInTheBrowserDescription": "Man in the Browser (T1185)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.masqueradingDescription": "マスカレード(T1036)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.modifyExistingServiceDescription": "既存のサービスの修正(T1031)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.modifyRegistryDescription": "レジストリの修正(T1112)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.mshtaDescription": "Mshta (T1170)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multibandCommunicationDescription": "マルチバンド通信(T1026)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multiHopProxyDescription": "マルチホッププロキシ(T1188)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multilayerEncryptionDescription": "マルチレイヤー暗号化(T1079)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multiStageChannelsDescription": "マルチステージチャネル(T1104)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.netshHelperDllDescription": "Netsh Helper DLL (T1128)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkDenialOfServiceDescription": "ネットワークサービス妨害(T1498)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkServiceScanningDescription": "ネットワークサービススキャン(T1046)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkShareConnectionRemovalDescription": "ネットワーク共有接続削除(T1126)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkShareDiscoveryDescription": "ネットワーク共有検出(T1135)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkSniffingDescription": "ネットワーク検査(T1040)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.newServiceDescription": "新しいサービス(T1050)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.ntfsFileAttributesDescription": "NTFSファイル属性(T1096)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.obfuscatedFilesOrInformationDescription": "難読化されたファイルまたは情報(T1027)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.officeApplicationStartupDescription": "Officeアプリケーション起動(T1137)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.parentPidSpoofingDescription": "親PIDスプーフィング(T1502)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passTheHashDescription": "ハッシュを渡す(T1075)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passTheTicketDescription": "チケットを渡す(T1097)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passwordFilterDllDescription": "パスワードフィルターDLL (T1174)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passwordPolicyDiscoveryDescription": "パスワードポリシー検出(T1201)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.pathInterceptionDescription": "パス傍受(T1034)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.peripheralDeviceDiscoveryDescription": "周辺機器検出(T1120)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.permissionGroupsDiscoveryDescription": "アクセス権グループ検出(T1069)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.plistModificationDescription": "Plist修正(T1150)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.portKnockingDescription": "ポートノッキング(T1205)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.portMonitorsDescription": "ポートモニター(T1013)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.powerShellDescription": "PowerShell (T1086)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.powerShellProfileDescription": "PowerShellプロファイル(T1504)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.privateKeysDescription": "秘密鍵(T1145)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processDiscoveryDescription": "プロセス検出(T1057)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processDoppelgangingDescription": "Process Doppelgänging (T1186)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processHollowingDescription": "プロセスハロウイング(T1093)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processInjectionDescription": "プロセスインジェクション(T1055)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.queryRegistryDescription": "クエリレジストリ(T1012)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.rcCommonDescription": "Rc.common (T1163)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.redundantAccessDescription": "冗長アクセス(T1108)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.registryRunKeysStartupFolderDescription": "レジストリ実行キー/スタートアップフォルダー(T1060)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.regsvcsRegasmDescription": "Regsvcs/Regasm (T1121)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.regsvr32Description": "Regsvr32 (T1117)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteAccessToolsDescription": "リモートアクセスツール(T1219)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteDesktopProtocolDescription": "リモートデスクトッププロトコル(T1076)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteFileCopyDescription": "リモートファイルコピー(T1105)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteServicesDescription": "リモートサービス(T1021)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteSystemDiscoveryDescription": "リモートシステム検出(T1018)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.reOpenedApplicationsDescription": "再オープンされたアプリケーション (T1164)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.replicationThroughRemovableMediaDescription": "リムーバブルメディア経由のレプリケーション(T1091)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.resourceHijackingDescription": "リソースハイジャック(T1496)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.revertCloudInstanceDescription": "Revert Cloud Instance (T1536)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.rootkitDescription": "ルートキット(T1014)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.rundll32Description": "Rundll32 (T1085)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.runtimeDataManipulationDescription": "ランタイムデータ操作(T1494)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.scheduledTaskDescription": "スケジュールされたタスク(T1053)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.scheduledTransferDescription": "スケジュールされた転送(T1029)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.screenCaptureDescription": "画面キャプチャ(T1113)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.screensaverDescription": "スクリーンセーバー (T1180)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.scriptingDescription": "スクリプティング(T1064)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitydMemoryDescription": "Securityd Memory (T1167)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitySoftwareDiscoveryDescription": "セキュリティソフトウェア検出(T1063)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitySupportProviderDescription": "セキュリティサポートプロバイダー(T1101)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serverSoftwareComponentDescription": "サーバーソフトウェアコンポーネント(T1505)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceExecutionDescription": "サービス実行(T1035)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceRegistryPermissionsWeaknessDescription": "サービスレジストリアクセス権脆弱性(T1058)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceStopDescription": "サービス停止(T1489)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.setuidAndSetgidDescription": "SetuidおよびSetgid (T1166)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sharedWebrootDescription": "共有Webroot (T1051)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.shortcutModificationDescription": "ショートカット修正(T1023)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sidHistoryInjectionDescription": "SID履歴インジェクション(T1178)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.signedBinaryProxyExecutionDescription": "署名されたバイナリプロキシ実行(T1218)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.signedScriptProxyExecutionDescription": "署名されたスクリプトプロキシ実行(T1216)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sipAndTrustProviderHijackingDescription": "SIPおよび信頼プロバイダーハイジャック(T1198)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.softwareDiscoveryDescription": "ソフトウェア検出(T1518)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.softwarePackingDescription": "ソフトウェアパッキング(T1045)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sourceDescription": "ソース(T1153)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spaceAfterFilenameDescription": "ファイル名の後のスペース(T1151)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingAttachmentDescription": "スピアフィッシング添付ファイル(T1193)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingLinkDescription": "スピアフィッシングリンク(T1192)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingViaServiceDescription": "サービス経由のスピアフィッシング(T1194)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sshHijackingDescription": "SSHハイジャック(T1184)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardApplicationLayerProtocolDescription": "標準アプリケーション層プロトコル(T1071)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardCryptographicProtocolDescription": "標準暗号プロトコル(T1032)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardNonApplicationLayerProtocolDescription": "標準非アプリケーション層プロトコル(T1095)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.startupItemsDescription": "スタートアップ項目(T1165)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.stealApplicationAccessTokenDescription": "アプリケーションアクセストークンの窃盗(T1528)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.stealWebSessionCookieDescription": "WebセッションCookieの窃盗(T1539)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.storedDataManipulationDescription": "保存されたデータ操作(T1492)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sudoCachingDescription": "Sudoキャッシュ(T1206)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sudoDescription": "Sudo (T1169)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.supplyChainCompromiseDescription": "サプライチェーンの危険(T1195)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemdServiceDescription": "Systemdサービス(T1501)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemFirmwareDescription": "システムファームウェア(T1019)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemInformationDiscoveryDescription": "システム情報検出(T1082)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemNetworkConfigurationDiscoveryDescription": "システムネットワーク構成検出(T1016)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemNetworkConnectionsDiscoveryDescription": "システムネットワーク接続検出(T1049)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemOwnerUserDiscoveryDescription": "システム所有者/ユーザー検出(T1033)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemServiceDiscoveryDescription": "システムサービス検出(T1007)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemShutdownRebootDescription": "システムシャットダウン/再起動(T1529)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemTimeDiscoveryDescription": "システム時刻検出(T1124)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.taintSharedContentDescription": "Taint Shared Content (T1080)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.templateInjectionDescription": "テンプレートインジェクション(T1221)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.thirdPartySoftwareDescription": "サードパーティーソフトウェア(T1072)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.timeProvidersDescription": "時刻プロバイダー(T1209)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.timestompDescription": "Timestomp (T1099)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.transferDataToCloudAccountDescription": "クラウドアカウントへのデータ転送(T1537)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.transmittedDataManipulationDescription": "転送されたデータ操作(T1493)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.trapDescription": "トラップ(T1154)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.trustedDeveloperUtilitiesDescription": "信頼できる開発者ユーティリティ(T1127)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.trustedRelationshipDescription": "信頼できる関係(T1199)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.twoFactorAuthenticationInterceptionDescription": "二要素認証傍受(T1111)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.uncommonlyUsedPortDescription": "一般的に使用されないポート(T1065)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.unusedUnsupportedCloudRegionsDescription": "未使用/サポートされていないクラウドリージョン(T1535)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.userExecutionDescription": "ユーザー実行(T1204)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.validAccountsDescription": "有効なアカウント(T1078)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.videoCaptureDescription": "動画キャプチャ(T1125)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.virtualizationSandboxEvasionDescription": "仮想化/サンドボックス侵入(T1497)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.webServiceDescription": "Webサービス(T1102)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.webSessionCookieDescription": "WebセッションCookie (T1506)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.webShellDescription": "Webシェル(T1100)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsAdminSharesDescription": "Windows管理共有(T1077)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationDescription": "Windows Management Instrumentation (T1047)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationEventSubscriptionDescription": "Windows Management Instrumentationイベントサブスクリプション(T1084)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsRemoteManagementDescription": "Windowsリモート管理(T1028)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.winlogonHelperDllDescription": "Winlogon Helper DLL (T1004)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.xslScriptProcessingDescription": "XSLスクリプト処理(T1220)", + "xpack.securitySolution.detectionEngine.mlRulesDisabledMessageTitle": "MLルールにはプラチナライセンスとML管理者権限が必要です", + "xpack.securitySolution.detectionEngine.mlUnavailableTitle": "{totalRules} {totalRules, plural, =1 {個のルール} other {個のルール}}で機械学習を有効にする必要があります。", + "xpack.securitySolution.detectionEngine.noApiIntegrationKeyCallOutMsg": "Kibanaを起動するごとに保存されたオブジェクトの新しい暗号化キーを作成します。永続キーがないと、Kibanaの再起動後にルールを削除または修正することができません。永続キーを設定するには、kibana.ymlファイルに32文字以上のテキスト値を付けてxpack.encryptedSavedObjects.encryptionKey設定を追加してください。", + "xpack.securitySolution.detectionEngine.noApiIntegrationKeyCallOutTitle": "API統合キーが必要です", + "xpack.securitySolution.detectionEngine.noIndexMsgBody": "検出エンジンを使用するには、必要なクラスターとインデックス権限のユーザーが最初にこのページにアクセスする必要があります。ヘルプについては、管理者にお問い合わせください。", + "xpack.securitySolution.detectionEngine.noIndexTitle": "検出エンジンを設定しましょう", + "xpack.securitySolution.detectionEngine.pageTitle": "検出エンジン", + "xpack.securitySolution.detectionEngine.panelSubtitleShowing": "表示中", + "xpack.securitySolution.detectionEngine.readOnlyCallOutMsg": "現在、検出エンジンルールを作成/編集するための必要な権限がありません。サポートについては、管理者にお問い合わせください。", + "xpack.securitySolution.detectionEngine.readOnlyCallOutTitle": "ルールアクセス権が必要です", + "xpack.securitySolution.detectionEngine.rule.editRule.errorMsgDescription": "{countError, plural, one {このタブ} other {これらのタブ}}に無効な入力があります: {tabHasError}", + "xpack.securitySolution.detectionEngine.ruleDescription.mlJobStartedDescription": "開始", + "xpack.securitySolution.detectionEngine.ruleDescription.mlJobStoppedDescription": "停止", + "xpack.securitySolution.detectionEngine.ruleDetails.activateRuleLabel": "有効化", + "xpack.securitySolution.detectionEngine.ruleDetails.backToRulesDescription": "シグナル検出ルールに戻る", + "xpack.securitySolution.detectionEngine.ruleDetails.errorCalloutTitle": "ルール失敗", + "xpack.securitySolution.detectionEngine.ruleDetails.experimentalDescription": "実験的", + "xpack.securitySolution.detectionEngine.ruleDetails.failureHistoryTab": "エラー履歴", + "xpack.securitySolution.detectionEngine.ruleDetails.lastFiveErrorsTitle": "最後の5件のエラー", + "xpack.securitySolution.detectionEngine.ruleDetails.pageTitle": "ルール詳細", + "xpack.securitySolution.detectionEngine.ruleDetails.ruleCreationDescription": "作成者: {by} 日付: {date}", + "xpack.securitySolution.detectionEngine.ruleDetails.ruleUpdateDescription": "更新者: {by} 日付: {date}", + "xpack.securitySolution.detectionEngine.ruleDetails.statusFailedAtColumn": "失敗", + "xpack.securitySolution.detectionEngine.ruleDetails.statusFailedDescription": "失敗", + "xpack.securitySolution.detectionEngine.ruleDetails.statusFailedMsgColumn": "失敗メッセージ", + "xpack.securitySolution.detectionEngine.ruleDetails.statusTypeColumn": "タイプ", + "xpack.securitySolution.detectionEngine.ruleDetails.unknownDescription": "不明", + "xpack.securitySolution.detectionEngine.rules.aboutRuleTitle": "ルールについて", + "xpack.securitySolution.detectionEngine.rules.addNewRuleTitle": "新規ルールを作成", + "xpack.securitySolution.detectionEngine.rules.addPageTitle": "作成", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.deleteeRuleDescription": "ルールの削除...", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "ルールの複製...", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription": "ルールの複製エラー...", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateTitle": "複製", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "ルール設定の編集", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "ルールのエクスポート", + "xpack.securitySolution.detectionEngine.rules.allRules.activeRuleDescription": "アクティブ", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle": "{totalRules, plural, =1 {ルール} other {ルール}}の有効化エラー…", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedTitle": "選択した項目の有効化", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle": "{totalRules, plural, =1 {ルール} other {ルール}}の無効化エラー…", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedTitle": "選択した項目の無効化", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle": "{totalRules, plural, =1 {ルール} other {ルール}}の削除エラー…", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "選択には削除できないイミュータブルルールがあります", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedTitle": "選択項目を削除...", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.duplicateSelectedTitle": "選択した項目の複製…", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.exportSelectedTitle": "選択した項目のエクスポート", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "一斉アクション", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.activateTitle": "有効化", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.gap": "ギャップ(該当する場合)", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.indexingTimes": "インデックス時間(ミリ秒)", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.lastLookBackDate": "前回の確認日", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.lastResponseTitle": "前回の応答", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.lastRunTitle": "前回の実行", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.queryTimes": "クエリ時間(ミリ秒)", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.riskScoreTitle": "リスクスコア", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.ruleTitle": "ルール", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.severityTitle": "深刻度", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.tagsTitle": "タグ", + "xpack.securitySolution.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.customRulesTitle": "カスタムルール", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.elasticRulesTitle": "Elasticルール", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.noRulesBodyTitle": "上記のフィルターでルールが見つかりませんでした。", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.noRulesTitle": "ルールが見つかりませんでした", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.noTagsAvailableDescription": "利用可能なタグがありません", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.tagsLabel": "タグ", + "xpack.securitySolution.detectionEngine.rules.allRules.inactiveRuleDescription": "非アクティブ", + "xpack.securitySolution.detectionEngine.rules.allRules.refreshTitle": "更新", + "xpack.securitySolution.detectionEngine.rules.allRules.searchAriaLabel": "ルールの検索", + "xpack.securitySolution.detectionEngine.rules.allRules.searchPlaceholder": "例: ルール名", + "xpack.securitySolution.detectionEngine.rules.allRules.selectedRulesTitle": "{selectedRules} {selectedRules, plural, =1 {ルール} other {ルール}}を選択しました", + "xpack.securitySolution.detectionEngine.rules.allRules.showingRulesTitle": "{totalRules} {totalRules, plural, =1 {ルール} other {ルール}}を表示中", + "xpack.securitySolution.detectionEngine.rules.allRules.successfullyDuplicatedRulesTitle": "{totalRules, plural, =1 {{totalRules}ルール} other {{totalRules}ルール}}を正常に複製しました", + "xpack.securitySolution.detectionEngine.rules.allRules.successfullyExportedRulesTitle": "{totalRules, plural, =0 {すべてのルール} =1 {{totalRules}ルール} other {{totalRules}ルール}}を正常にエクスポートしました", + "xpack.securitySolution.detectionEngine.rules.allRules.tableTitle": "すべてのルール", + "xpack.securitySolution.detectionEngine.rules.allRules.tabs.monitoring": "監視", + "xpack.securitySolution.detectionEngine.rules.allRules.tabs.rules": "ルール", + "xpack.securitySolution.detectionEngine.rules.backOptionsHeader": "検出に戻る", + "xpack.securitySolution.detectionEngine.rules.components.ruleActionsOverflow.allActionsTitle": "すべてのアクション", + "xpack.securitySolution.detectionEngine.rules.components.ruleDownloader.exportFailureTitle": "ルールをエクスポートできませんでした...", + "xpack.securitySolution.detectionEngine.rules.continueButtonTitle": "続行", + "xpack.securitySolution.detectionEngine.rules.create.successfullyCreatedRuleTitle": "{ruleName}が作成されました", + "xpack.securitySolution.detectionEngine.rules.defineRuleTitle": "ルールの定義", + "xpack.securitySolution.detectionEngine.rules.deleteDescription": "削除", + "xpack.securitySolution.detectionEngine.rules.editPageTitle": "編集", + "xpack.securitySolution.detectionEngine.rules.importRuleTitle": "ルールのインポート...", + "xpack.securitySolution.detectionEngine.rules.loadPrePackagedRulesButton": "Elastic事前構築済みルールを読み込む", + "xpack.securitySolution.detectionEngine.rules.optionalFieldDescription": "オプション", + "xpack.securitySolution.detectionEngine.rules.pageTitle": "シグナル検出ルール", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.createOwnRuletButton": "独自のルールの作成", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptMessage": "Elastic SIEMには、バックグラウンドで実行され、条件が合うとシグナルを作成する事前構築済み検出ルールがあります。デフォルトでは、すべての事前構築済みルールが無効化されていて、有効化したいルールを選択します。", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptTitle": "Elastic事前構築済み検出ルールを読み込む", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.loadPreBuiltButton": "事前構築済み検知ルールを読み込む", + "xpack.securitySolution.detectionEngine.rules.releaseNotesHelp": "リリースノート", + "xpack.securitySolution.detectionEngine.rules.reloadMissingPrePackagedRulesButton": "{missingRules} Elasticのあらかじめ構築された{missingRules, plural, =1 {個のルール} other {個のルール}}をインストール ", + "xpack.securitySolution.detectionEngine.rules.ruleActionsTitle": "ルールアクション", + "xpack.securitySolution.detectionEngine.rules.scheduleRuleTitle": "ルールのスケジュール", + "xpack.securitySolution.detectionEngine.rules.stepAboutTitle": "概要", + "xpack.securitySolution.detectionEngine.rules.stepActionsTitle": "アクション", + "xpack.securitySolution.detectionEngine.rules.stepDefinitionTitle": "定義", + "xpack.securitySolution.detectionEngine.rules.stepScheduleTitle": "スケジュール", + "xpack.securitySolution.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName}が保存されました", + "xpack.securitySolution.detectionEngine.rules.updateButtonTitle": "更新", + "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton": "{updateRules} Elastic事前再構築済み{updateRules, plural, =1 {rule} other {rules}}を更新する ", + "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg": "{updateRules} Elastic事前再構築済み{updateRules, plural, =1 {rule} other {rules}}を更新することができます。これにより、削除されたElastic事前再構築済みルールが再読み込みされます。", + "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle": "Elastic事前構築済みルールを更新することができません", + "xpack.securitySolution.detectionEngine.ruleStatus.refreshButton": "更新", + "xpack.securitySolution.detectionEngine.ruleStatus.statusAtDescription": "に", + "xpack.securitySolution.detectionEngine.ruleStatus.statusDateDescription": "ステータス日付", + "xpack.securitySolution.detectionEngine.ruleStatus.statusDescription": "前回の応答", + "xpack.securitySolution.detectionEngine.signalRuleAlert.actionGroups.default": "デフォルト", + "xpack.securitySolution.detectionEngine.userUnauthenticatedMsgBody": "検出エンジンを表示するための必要なアクセス権がありません。ヘルプについては、管理者にお問い合わせください。", + "xpack.securitySolution.detectionEngine.userUnauthenticatedTitle": "検出エンジンアクセス権が必要です", + "xpack.securitySolution.dragAndDrop.addToTimeline": "タイムライン調査に追加", + "xpack.securitySolution.dragAndDrop.closeButtonLabel": "閉じる", + "xpack.securitySolution.dragAndDrop.copyToClipboardTooltip": "クリップボードにコピー", + "xpack.securitySolution.dragAndDrop.fieldLabel": "フィールド", + "xpack.securitySolution.dragAndDrop.filterForValueHoverAction": "値でフィルター", + "xpack.securitySolution.dragAndDrop.filterOutValueHoverAction": "値を除外", + "xpack.securitySolution.draggables.field.categoryLabel": "カテゴリー", + "xpack.securitySolution.draggables.field.fieldLabel": "フィールド", + "xpack.securitySolution.draggables.field.typeLabel": "タイプ", + "xpack.securitySolution.draggables.field.viewCategoryTooltip": "カテゴリーを表示します", + "xpack.securitySolution.editDataProvider.doesNotExistLabel": "存在しません", + "xpack.securitySolution.editDataProvider.existsLabel": "存在する", + "xpack.securitySolution.editDataProvider.fieldLabel": "フィールド", + "xpack.securitySolution.editDataProvider.isLabel": "が", + "xpack.securitySolution.editDataProvider.isNotLabel": "is not", + "xpack.securitySolution.editDataProvider.operatorLabel": "演算子", + "xpack.securitySolution.editDataProvider.placeholder": "フィールドを選択", + "xpack.securitySolution.editDataProvider.saveButton": "保存", + "xpack.securitySolution.editDataProvider.selectAnOperatorPlaceholder": "演算子を選択", + "xpack.securitySolution.editDataProvider.valueLabel": "値", + "xpack.securitySolution.editDataProvider.valuePlaceholder": "値", + "xpack.securitySolution.emptyString.emptyStringDescription": "空の文字列", + "xpack.securitySolution.event.module.linkToElasticEndpointSecurityDescription": "Elastic Endpoint Securityで開く", + "xpack.securitySolution.eventDetails.blank": " ", + "xpack.securitySolution.eventDetails.copyToClipboard": "クリップボードにコピー", + "xpack.securitySolution.eventDetails.copyToClipboardTooltip": "クリップボードにコピー", + "xpack.securitySolution.eventDetails.description": "説明", + "xpack.securitySolution.eventDetails.field": "フィールド", + "xpack.securitySolution.eventDetails.filter.placeholder": "フィールド、値、または説明でフィルター…", + "xpack.securitySolution.eventDetails.jsonView": "JSON ビュー", + "xpack.securitySolution.eventDetails.table": "表", + "xpack.securitySolution.eventDetails.toggleColumnTooltip": "列を切り替えます", + "xpack.securitySolution.eventDetails.value": "値", + "xpack.securitySolution.eventsViewer.errorFetchingEventsData": "イベントデータをクエリできませんでした", + "xpack.securitySolution.eventsViewer.eventsLabel": "イベント", + "xpack.securitySolution.eventsViewer.footer.loadingEventsDataLabel": "イベントを読み込み中", + "xpack.securitySolution.eventsViewer.showingLabel": "表示中", + "xpack.securitySolution.eventsViewer.unit": "{totalCount, plural, =1 {event} other {events}}", + "xpack.securitySolution.featureCatalogue.description": "セキュリティメトリクスとログのイベントとアラートを確認します", + "xpack.securitySolution.featureCatalogue.title": "Security", + "xpack.securitySolution.featureRegistry.linkSecuritySolutionTitle": "Security", + "xpack.securitySolution.fieldBrowser.categoriesCountTitle": "{totalCount} {totalCount, plural, =1 {category} other {categories}}", + "xpack.securitySolution.fieldBrowser.categoriesTitle": "カテゴリー", + "xpack.securitySolution.fieldBrowser.categoryLabel": "カテゴリー", + "xpack.securitySolution.fieldBrowser.copyToClipboard": "クリップボードにコピー", + "xpack.securitySolution.fieldBrowser.customizeColumnsTitle": "列のカスタマイズ", + "xpack.securitySolution.fieldBrowser.descriptionLabel": "説明", + "xpack.securitySolution.fieldBrowser.fieldLabel": "フィールド", + "xpack.securitySolution.fieldBrowser.fieldsCountTitle": "{totalCount} {totalCount, plural, =1 {field} other {fields}}", + "xpack.securitySolution.fieldBrowser.fieldsTitle": "フィールド", + "xpack.securitySolution.fieldBrowser.filterPlaceholder": "フィールド名", + "xpack.securitySolution.fieldBrowser.noFieldsMatchInputLabel": "{searchInput} に一致するフィールドがありません", + "xpack.securitySolution.fieldBrowser.noFieldsMatchLabel": "一致するフィールドがありません", + "xpack.securitySolution.fieldBrowser.resetFieldsLink": "フィールドをリセット", + "xpack.securitySolution.fieldBrowser.toggleColumnTooltip": "列を切り替えます", + "xpack.securitySolution.fieldBrowser.viewCategoryTooltip": "すべての {categoryId} フィールドを表示します", + "xpack.securitySolution.fieldRenderers.moreLabel": "もっと", + "xpack.securitySolution.flyout.button.text": "タイムライン", + "xpack.securitySolution.flyout.button.timeline": "タイムライン", + "xpack.securitySolution.footer.autoRefreshActiveDescription": "自動更新アクション", + "xpack.securitySolution.footer.autoRefreshActiveTooltip": "自動更新が有効な間、タイムラインはクエリに一致する最新の {numberOfItems} 件のイベントを表示します。", + "xpack.securitySolution.footer.data": "データ", + "xpack.securitySolution.footer.events": "イベント", + "xpack.securitySolution.footer.live": "ライブ", + "xpack.securitySolution.footer.loadingLabel": "読み込み中", + "xpack.securitySolution.footer.loadingTimelineData": "タイムラインデータを読み込み中", + "xpack.securitySolution.footer.loadMoreLabel": "さらに読み込む", + "xpack.securitySolution.footer.of": "/", + "xpack.securitySolution.footer.rows": "行", + "xpack.securitySolution.footer.totalCountOfEvents": "イベントが検索条件に一致します", + "xpack.securitySolution.footer.updated": "更新しました", + "xpack.securitySolution.formatted.duration.aFewMillisecondsTooltip": "数ミリ秒", + "xpack.securitySolution.formatted.duration.aFewNanosecondsTooltip": "数ナノ秒", + "xpack.securitySolution.formatted.duration.aMillisecondTooltip": "1 ミリ秒", + "xpack.securitySolution.formatted.duration.aNanosecondTooltip": "1 ナノ秒", + "xpack.securitySolution.formatted.duration.aSecondTooltip": "1 秒", + "xpack.securitySolution.formatted.duration.invalidDurationTooltip": "無効な期間", + "xpack.securitySolution.formatted.duration.noDurationTooltip": "期間がありません", + "xpack.securitySolution.formatted.duration.zeroNanosecondsTooltip": "0ナノ秒", + "xpack.securitySolution.formattedDuration.tooltipLabel": "生", + "xpack.securitySolution.getCurrentUser.Error": "ユーザーの取得エラー", + "xpack.securitySolution.getCurrentUser.unknownUser": "不明", + "xpack.securitySolution.header.editableTitle.cancel": "キャンセル", + "xpack.securitySolution.header.editableTitle.editButtonAria": "クリックすると {title} を編集できます", + "xpack.securitySolution.header.editableTitle.save": "保存", + "xpack.securitySolution.headerGlobal.buttonAddData": "データの追加", + "xpack.securitySolution.headerGlobal.siem": "Security", + "xpack.securitySolution.headerPage.pageSubtitle": "前回のイベント: {beat}", + "xpack.securitySolution.hooks.useAddToTimeline.addedFieldMessage": "{fieldOrValue}をタイムラインに追加しました", + "xpack.securitySolution.host.details.architectureLabel": "アーキテクチャー", + "xpack.securitySolution.host.details.firstSeenTitle": "初回の認識", + "xpack.securitySolution.host.details.lastSeenTitle": "前回の認識", + "xpack.securitySolution.host.details.overview.cloudProviderTitle": "クラウドプロバイダー", + "xpack.securitySolution.host.details.overview.familyTitle": "ファミリー", + "xpack.securitySolution.host.details.overview.hostIdTitle": "ホスト ID", + "xpack.securitySolution.host.details.overview.inspectTitle": "ホスト概要", + "xpack.securitySolution.host.details.overview.instanceIdTitle": "インスタンス ID", + "xpack.securitySolution.host.details.overview.ipAddressesTitle": "IP アドレス", + "xpack.securitySolution.host.details.overview.macAddressesTitle": "MAC アドレス", + "xpack.securitySolution.host.details.overview.machineTypeTitle": "マシンタイプ", + "xpack.securitySolution.host.details.overview.maxAnomalyScoreByJobTitle": "ジョブ別の最高異常スコア", + "xpack.securitySolution.host.details.overview.osTitle": "オペレーティングシステム", + "xpack.securitySolution.host.details.overview.platformTitle": "プラットフォーム", + "xpack.securitySolution.host.details.overview.regionTitle": "地域", + "xpack.securitySolution.host.details.versionLabel": "バージョン", + "xpack.securitySolution.hosts.kqlPlaceholder": "例: host.name: \"foo\"", + "xpack.securitySolution.hosts.navigation.alertsTitle": "外部アラート", + "xpack.securitySolution.hosts.navigation.allHostsTitle": "すべてのホスト", + "xpack.securitySolution.hosts.navigation.anomaliesTitle": "異常", + "xpack.securitySolution.hosts.navigation.authenticationsTitle": "認証", + "xpack.securitySolution.hosts.navigation.dns.histogram.errorFetchingDnsData": "DNSデータをクエリできませんでした", + "xpack.securitySolution.hosts.navigation.eventsTitle": "イベント", + "xpack.securitySolution.hosts.navigation.uncommonProcessesTitle": "非共通プロセス", + "xpack.securitySolution.hosts.navigaton.matrixHistogram.errorFetchingAuthenticationsData": "認証データをクエリできませんでした", + "xpack.securitySolution.hosts.navigaton.matrixHistogram.errorFetchingEventsData": "イベントデータをクエリできませんでした", + "xpack.securitySolution.hosts.pageTitle": "すべてのホスト", + "xpack.securitySolution.hostsTable.firstLastSeenToolTip": "選択された日付範囲との相関付けです", + "xpack.securitySolution.hostsTable.hostsTitle": "すべてのホスト", + "xpack.securitySolution.hostsTable.lastSeenTitle": "前回の認識", + "xpack.securitySolution.hostsTable.nameTitle": "名前", + "xpack.securitySolution.hostsTable.osTitle": "オペレーティングシステム", + "xpack.securitySolution.hostsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.hostsTable.unit": "{totalCount, plural, =1 {host} other {hosts}}", + "xpack.securitySolution.hostsTable.versionTitle": "バージョン", + "xpack.securitySolution.insert.timeline.insertTimelineButton": "タイムラインリンクの挿入", + "xpack.securitySolution.inspect.modal.closeTitle": "閉じる", + "xpack.securitySolution.inspect.modal.indexPatternDescription": "Elasticsearch インデックスに接続したインデックスパターンです。これらのインデックスは Kibana > 高度な設定で構成できます。", + "xpack.securitySolution.inspect.modal.indexPatternLabel": "インデックスパターン", + "xpack.securitySolution.inspect.modal.queryTimeDescription": "クエリの処理の所要時間です。リクエストの送信やブラウザでのパースの時間は含まれません。", + "xpack.securitySolution.inspect.modal.queryTimeLabel": "クエリ時間", + "xpack.securitySolution.inspect.modal.reqTimestampDescription": "リクエストの開始が記録された時刻です", + "xpack.securitySolution.inspect.modal.reqTimestampLabel": "リクエストのタイムスタンプ", + "xpack.securitySolution.inspect.modal.somethingWentWrongDescription": "申し訳ございませんが、何か問題が発生しました。", + "xpack.securitySolution.inspectDescription": "検査", + "xpack.securitySolution.ja3.fingerprint.ja3.fingerprintLabel": "ja3", + "xpack.securitySolution.kpiHosts.hosts.title": "すべてのホスト", + "xpack.securitySolution.kpiHosts.uniqueIps.destinationChartLabel": "Dest.", + "xpack.securitySolution.kpiHosts.uniqueIps.destinationUnitLabel": "デスティネーション", + "xpack.securitySolution.kpiHosts.uniqueIps.sourceChartLabel": "Src.", + "xpack.securitySolution.kpiHosts.uniqueIps.sourceUnitLabel": "ソース", + "xpack.securitySolution.kpiHosts.uniqueIps.title": "固有の IP", + "xpack.securitySolution.kpiHosts.userAuthentications.failChartLabel": "失敗", + "xpack.securitySolution.kpiHosts.userAuthentications.failUnitLabel": "失敗", + "xpack.securitySolution.kpiHosts.userAuthentications.successChartLabel": "成功", + "xpack.securitySolution.kpiHosts.userAuthentications.successUnitLabel": "成功", + "xpack.securitySolution.kpiHosts.userAuthentications.title": "ユーザー認証", + "xpack.securitySolution.kpiNetwork.dnsQueries.title": "DNS クエリ", + "xpack.securitySolution.kpiNetwork.networkEvents.title": "ネットワークイベント", + "xpack.securitySolution.kpiNetwork.tlsHandshakes.title": "TLSハンドシェイク", + "xpack.securitySolution.kpiNetwork.uniqueFlowIds.title": "固有のフロー ID", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.destinationChartLabel": "Dest.", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.destinationUnitLabel": "デスティネーション", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.sourceChartLabel": "Src.", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.sourceUnitLabel": "ソース", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.title": "固有のプライベート IP", + "xpack.securitySolution.licensing.unsupportedMachineLearningMessage": "ご使用のライセンスは機械翻訳をサポートしていません。ライセンスをアップグレードしてください。", + "xpack.securitySolution.markdown.hint.boldLabel": "**太字**", + "xpack.securitySolution.markdown.hint.bulletLabel": "* ビュレット", + "xpack.securitySolution.markdown.hint.codeLabel": "「コード」", + "xpack.securitySolution.markdown.hint.headingLabel": "# 見出し", + "xpack.securitySolution.markdown.hint.imageUrlLabel": "![image](url)", + "xpack.securitySolution.markdown.hint.italicsLabel": "_斜体_", + "xpack.securitySolution.markdown.hint.preformattedLabel": "```プリフォーマット```", + "xpack.securitySolution.markdown.hint.quoteLabel": ">引用", + "xpack.securitySolution.markdown.hint.strikethroughLabel": "取り消し線", + "xpack.securitySolution.markdown.hint.urlLabel": "[link](url)", + "xpack.securitySolution.markdownEditor.markdown": "マークダウン", + "xpack.securitySolution.markdownEditor.markdownInputHelp": "Markdown 構文ヘルプ", + "xpack.securitySolution.markdownEditor.preview": "プレビュー", + "xpack.securitySolution.ml.score.anomalousEntityTitle": "異常エンティティ", + "xpack.securitySolution.ml.score.anomalyJobTitle": "ジョブ", + "xpack.securitySolution.ml.score.detectedTitle": "検出", + "xpack.securitySolution.ml.score.influencedByTitle": "影響因子", + "xpack.securitySolution.ml.score.maxAnomalyScoreTitle": "最高異常スコア", + "xpack.securitySolution.ml.score.narrowToThisDateRangeLink": "この日付範囲に絞り込む", + "xpack.securitySolution.ml.score.viewInMachineLearningLink": "機械学習で表示", + "xpack.securitySolution.ml.table.detectorTitle": "ジョブ名", + "xpack.securitySolution.ml.table.entityTitle": "エンティティ", + "xpack.securitySolution.ml.table.hostNameTitle": "ホスト名", + "xpack.securitySolution.ml.table.influencedByTitle": "影響因子:", + "xpack.securitySolution.ml.table.networkNameTitle": "ネットワークIP", + "xpack.securitySolution.ml.table.scoreTitle": "異常スコア", + "xpack.securitySolution.ml.table.timestampTitle": "タイムスタンプ", + "xpack.securitySolution.modalAllErrors.close.button": "閉じる", + "xpack.securitySolution.modalAllErrors.seeAllErrors.button": "完全なエラーを表示", + "xpack.securitySolution.modalAllErrors.title": "ビジュアライゼーションにエラーがあります", + "xpack.securitySolution.navigation.case": "ケース", + "xpack.securitySolution.navigation.detectionEngine": "検出", + "xpack.securitySolution.navigation.hosts": "すべてのホスト", + "xpack.securitySolution.navigation.network": "ネットワーク", + "xpack.securitySolution.navigation.overview": "概要", + "xpack.securitySolution.navigation.timelines": "タイムライン", + "xpack.securitySolution.network.dns.stackByUniqueSubdomain": "{groupByField}別トップドメイン", + "xpack.securitySolution.network.ipDetails.ipOverview.asDestinationDropDownOptionLabel": "送信先として", + "xpack.securitySolution.network.ipDetails.ipOverview.asSourceDropDownOptionLabel": "送信元として", + "xpack.securitySolution.network.ipDetails.ipOverview.autonomousSystemTitle": "自動システム", + "xpack.securitySolution.network.ipDetails.ipOverview.firstSeenTitle": "初回の認識", + "xpack.securitySolution.network.ipDetails.ipOverview.hostIdTitle": "ホスト ID", + "xpack.securitySolution.network.ipDetails.ipOverview.hostNameTitle": "ホスト名", + "xpack.securitySolution.network.ipDetails.ipOverview.inspectTitle": "IP概要", + "xpack.securitySolution.network.ipDetails.ipOverview.ipReputationTitle": "評判", + "xpack.securitySolution.network.ipDetails.ipOverview.lastSeenTitle": "前回の認識", + "xpack.securitySolution.network.ipDetails.ipOverview.locationTitle": "場所", + "xpack.securitySolution.network.ipDetails.ipOverview.maxAnomalyScoreByJobTitle": "ジョブ別の最高異常スコア", + "xpack.securitySolution.network.ipDetails.ipOverview.viewTalosIntelligenceTitle": "talosIntelligence.com", + "xpack.securitySolution.network.ipDetails.ipOverview.viewVirusTotalTitle.": "virustotal.com", + "xpack.securitySolution.network.ipDetails.ipOverview.viewWhoisTitle": "iana.org", + "xpack.securitySolution.network.ipDetails.ipOverview.whoIsTitle": "WhoIs", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.issuerTitle": "発行者", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.ja3FingerPrintTitle": "JA3 フィンガープリント", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.sha1FingerPrintTitle": "SHA1フィンガープリント", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.subjectTitle": "件名", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.validUntilTitle": "有効期限:", + "xpack.securitySolution.network.ipDetails.tlsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.network.ipDetails.tlsTable.transportLayerSecurityTitle": "トランスポートレイヤーセキュリティ", + "xpack.securitySolution.network.ipDetails.tlsTable.unit": "{totalCount, plural, =1 {サーバー証明書} other {サーバー証明書}}", + "xpack.securitySolution.network.ipDetails.usersTable.columns.documentCountTitle": "ドキュメントカウント", + "xpack.securitySolution.network.ipDetails.usersTable.columns.groupIdTitle": "グループ ID", + "xpack.securitySolution.network.ipDetails.usersTable.columns.groupNameTitle": "グループ名", + "xpack.securitySolution.network.ipDetails.usersTable.columns.userIdTitle": "ID", + "xpack.securitySolution.network.ipDetails.usersTable.columns.userNameTitle": "ユーザー", + "xpack.securitySolution.network.ipDetails.usersTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.network.ipDetails.usersTable.unit": "{totalCount, plural, =1 {user} other {users}}", + "xpack.securitySolution.network.ipDetails.usersTable.usersTitle": "ユーザー", + "xpack.securitySolution.network.kqlPlaceholder": "例: source.ip: \"foo\"", + "xpack.securitySolution.network.navigation.alertsTitle": "外部アラート", + "xpack.securitySolution.network.navigation.anomaliesTitle": "異常", + "xpack.securitySolution.network.navigation.dnsTitle": "DNS", + "xpack.securitySolution.network.navigation.flowsTitle": "Flow", + "xpack.securitySolution.network.navigation.httpTitle": "HTTP", + "xpack.securitySolution.network.navigation.tlsTitle": "TLS", + "xpack.securitySolution.network.pageTitle": "ネットワーク", + "xpack.securitySolution.networkDnsTable.column.bytesInTitle": "受信 DNS バイト", + "xpack.securitySolution.networkDnsTable.column.bytesOutTitle": "送信 DNS バイト", + "xpack.securitySolution.networkDnsTable.column.registeredDomain": "登録ドメイン", + "xpack.securitySolution.networkDnsTable.column.TotalQueriesTitle": "クエリ合計", + "xpack.securitySolution.networkDnsTable.column.uniqueDomainsTitle": "固有のドメイン", + "xpack.securitySolution.networkDnsTable.helperTooltip": "これは DNS プロトコルトラフィックのみを示しており、DNS データ逆浸出に使用されたドメインの調査に役立ちます。", + "xpack.securitySolution.networkDnsTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.networkDnsTable.select.includePtrRecords": "PTR 記録を含める", + "xpack.securitySolution.networkDnsTable.title": "トップ DNS ドメイン", + "xpack.securitySolution.networkDnsTable.unit": "{totalCount, plural, =1 {domain} other {domains}}", + "xpack.securitySolution.networkHttpTable.column.domainTitle": "ドメイン", + "xpack.securitySolution.networkHttpTable.column.lastHostTitle": "最後のホスト", + "xpack.securitySolution.networkHttpTable.column.lastSourceIpTitle": "最後のソースIP", + "xpack.securitySolution.networkHttpTable.column.methodTitle": "メソド", + "xpack.securitySolution.networkHttpTable.column.pathTitle": "パス", + "xpack.securitySolution.networkHttpTable.column.requestsTitle": "リクエスト", + "xpack.securitySolution.networkHttpTable.column.statusTitle": "ステータス", + "xpack.securitySolution.networkHttpTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {行} other {行}}", + "xpack.securitySolution.networkHttpTable.title": "HTTPリクエスト", + "xpack.securitySolution.networkHttpTable.unit": "{totalCount, plural, =1 {リクエスト} other {リクエスト}}", + "xpack.securitySolution.networkTopCountriesTable.column.bytesInTitle": "受信バイト", + "xpack.securitySolution.networkTopCountriesTable.column.bytesOutTitle": "送信バイト", + "xpack.securitySolution.networkTopCountriesTable.column.countryTitle": "国", + "xpack.securitySolution.networkTopCountriesTable.column.destinationIps": "デスティネーション IP", + "xpack.securitySolution.networkTopCountriesTable.column.flows": "Flow", + "xpack.securitySolution.networkTopCountriesTable.column.sourceIps": "ソース IP", + "xpack.securitySolution.networkTopCountriesTable.heading.destinationCountries": "デスティネーションの国", + "xpack.securitySolution.networkTopCountriesTable.heading.sourceCountries": "ソースの国", + "xpack.securitySolution.networkTopCountriesTable.heading.unit": "{totalCount, plural, =1 {Country} other {Countries}}", + "xpack.securitySolution.networkTopCountriesTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.networkTopNFlowTable.column.asTitle": "自動システム", + "xpack.securitySolution.networkTopNFlowTable.column.bytesInTitle": "受信バイト", + "xpack.securitySolution.networkTopNFlowTable.column.bytesOutTitle": "送信バイト", + "xpack.securitySolution.networkTopNFlowTable.column.destinationIpTitle": "デスティネーション IP", + "xpack.securitySolution.networkTopNFlowTable.column.domainTitle": "ドメイン", + "xpack.securitySolution.networkTopNFlowTable.column.IpTitle": "IP", + "xpack.securitySolution.networkTopNFlowTable.column.sourceIpTitle": "ソース IP", + "xpack.securitySolution.networkTopNFlowTable.destinationIps": "デスティネーション IP", + "xpack.securitySolution.networkTopNFlowTable.flows": "Flow", + "xpack.securitySolution.networkTopNFlowTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.networkTopNFlowTable.sourceIps": "ソース IP", + "xpack.securitySolution.networkTopNFlowTable.unit": "{totalCount, plural, =1 {IP} other {IPs}}", + "xpack.securitySolution.newsFeed.advancedSettingsLinkTitle": "SIEM高度な設定", + "xpack.securitySolution.newsFeed.noNewsMessage": "現在のニュースフィードURLは最新のニュースを返しませんでした。URLを更新するか、セキュリティニュースを無効にすることができます", + "xpack.securitySolution.notes.addANotePlaceholder": "メモを追加", + "xpack.securitySolution.notes.addedANoteLabel": "メモを追加しました", + "xpack.securitySolution.notes.addNoteButtonLabel": "メモを追加", + "xpack.securitySolution.notes.cancelButtonLabel": "キャンセル", + "xpack.securitySolution.notes.copyToClipboardButtonLabel": "クリップボードにコピー", + "xpack.securitySolution.notes.noteLabel": "注", + "xpack.securitySolution.notes.notesTitle": "メモ", + "xpack.securitySolution.notes.previewMarkdownTitle": "プレビュー(マークダウン)", + "xpack.securitySolution.notes.search.FilterByUserOrNotePlaceholder": "ユーザーまたはメモでフィルター", + "xpack.securitySolution.open.timeline.allActionsTooltip": "すべてのアクション", + "xpack.securitySolution.open.timeline.batchActionsTitle": "一斉アクション", + "xpack.securitySolution.open.timeline.cancelButton": "キャンセル", + "xpack.securitySolution.open.timeline.collapseButton": "縮小", + "xpack.securitySolution.open.timeline.deleteButton": "削除", + "xpack.securitySolution.open.timeline.deleteSelectedButton": "選択項目を削除", + "xpack.securitySolution.open.timeline.deleteTimelineModalTitle": "「{title}」を削除しますか?", + "xpack.securitySolution.open.timeline.deleteWarningLabel": "削除すると、このタイムライン自体またはそのメモを復元することはできません。", + "xpack.securitySolution.open.timeline.descriptionTableHeader": "説明", + "xpack.securitySolution.open.timeline.expandButton": "拡張", + "xpack.securitySolution.open.timeline.exportFileNameTitle": "timelines_export", + "xpack.securitySolution.open.timeline.exportSelectedButton": "選択した項目のエクスポート", + "xpack.securitySolution.open.timeline.favoriteSelectedButton": "選択中のお気に入り", + "xpack.securitySolution.open.timeline.favoritesTooltip": "お気に入り", + "xpack.securitySolution.open.timeline.filterByTimelineTypesTitle": "{timelineType}のみ", + "xpack.securitySolution.open.timeline.lastModifiedTableHeader": "最終更新:", + "xpack.securitySolution.open.timeline.missingSavedObjectIdTooltip": "savedObjectId がありません", + "xpack.securitySolution.open.timeline.modifiedByTableHeader": "変更者:", + "xpack.securitySolution.open.timeline.notesTooltip": "メモ", + "xpack.securitySolution.open.timeline.onlyFavoritesButtonLabel": "お気に入りのみ", + "xpack.securitySolution.open.timeline.openAsDuplicateTooltip": "重複タイムライン", + "xpack.securitySolution.open.timeline.openTimelineButton": "タイムラインを開く…", + "xpack.securitySolution.open.timeline.openTimelineTitle": "タイムラインを開く", + "xpack.securitySolution.open.timeline.pinnedEventsTooltip": "ピン付けされたイベント", + "xpack.securitySolution.open.timeline.postedLabel": "投稿:", + "xpack.securitySolution.open.timeline.refreshTitle": "更新", + "xpack.securitySolution.open.timeline.searchPlaceholder": "例:タイムライン名、または説明", + "xpack.securitySolution.open.timeline.selectedTimelinesTitle": "{selectedTimelines} {selectedTimelines, plural, =1 {タイムライン} other {タイムライン}}を選択しました", + "xpack.securitySolution.open.timeline.showingLabel": "表示中:", + "xpack.securitySolution.open.timeline.showingNTimelinesLabel": "{totalSearchResultsCount} 件の {totalSearchResultsCount, plural, one {タイムライン} other {タイムライン}} {with}", + "xpack.securitySolution.open.timeline.successfullyExportedTimelinesTitle": "{totalTimelines, plural, =0 {all timelines} =1 {{totalTimelines} タイムライン} other {{totalTimelines} タイムライン}}のエクスポートが正常に完了しました", + "xpack.securitySolution.open.timeline.timelineNameTableHeader": "タイムライン名", + "xpack.securitySolution.open.timeline.untitledTimelineLabel": "無題のタイムライン", + "xpack.securitySolution.open.timeline.withLabel": "With", + "xpack.securitySolution.open.timeline.zeroTimelinesMatchLabel": "0 件のタイムラインが検索条件に一致", + "xpack.securitySolution.overview.alertsGraphTitle": "外部アラート数", + "xpack.securitySolution.overview.auditBeatAuditTitle": "監査", + "xpack.securitySolution.overview.auditBeatFimTitle": "File Integrityモジュール", + "xpack.securitySolution.overview.auditBeatLoginTitle": "ログイン", + "xpack.securitySolution.overview.auditBeatPackageTitle": "パッケージ", + "xpack.securitySolution.overview.auditBeatProcessTitle": "プロセス", + "xpack.securitySolution.overview.auditBeatSocketTitle": "ソケット", + "xpack.securitySolution.overview.auditBeatUserTitle": "ユーザー", + "xpack.securitySolution.overview.endgameDnsTitle": "DNS", + "xpack.securitySolution.overview.endgameFileTitle": "ファイル", + "xpack.securitySolution.overview.endgameImageLoadTitle": "画像読み込み", + "xpack.securitySolution.overview.endgameNetworkTitle": "ネットワーク", + "xpack.securitySolution.overview.endgameProcessTitle": "プロセス", + "xpack.securitySolution.overview.endgameRegistryTitle": "レジストリ", + "xpack.securitySolution.overview.endgameSecurityTitle": "セキュリティ", + "xpack.securitySolution.overview.eventsTitle": "イベント数", + "xpack.securitySolution.overview.feedbackText": "Elastic Security に関するご意見やご提案は、お気軽に {feedback}", + "xpack.securitySolution.overview.feedbackText.feedbackLinkText": "フィードバックをオンラインで送信", + "xpack.securitySolution.overview.feedbackTitle": "フィードバック", + "xpack.securitySolution.overview.filebeatCiscoTitle": "Cisco", + "xpack.securitySolution.overview.filebeatNetflowTitle": "Netflow", + "xpack.securitySolution.overview.filebeatPanwTitle": "Palo Alto Networks", + "xpack.securitySolution.overview.fileBeatSuricataTitle": "Suricata", + "xpack.securitySolution.overview.filebeatSystemModuleTitle": "システムモジュール", + "xpack.securitySolution.overview.fileBeatZeekTitle": "Zeek", + "xpack.securitySolution.overview.hostsAction": "ホストを表示", + "xpack.securitySolution.overview.hostStatGroupAuditbeat": "Auditbeat", + "xpack.securitySolution.overview.hostStatGroupElasticEndpointSecurity": "Elastic Endpoint Security", + "xpack.securitySolution.overview.hostStatGroupFilebeat": "Filebeat", + "xpack.securitySolution.overview.hostStatGroupWinlogbeat": "Winlogbeat", + "xpack.securitySolution.overview.hostsTitle": "ホストイベント", + "xpack.securitySolution.overview.myRecentlyReportedCasesButtonLabel": "最近レポートしたケース", + "xpack.securitySolution.overview.networkAction": "ネットワークを表示", + "xpack.securitySolution.overview.networkStatGroupAuditbeat": "Auditbeat", + "xpack.securitySolution.overview.networkStatGroupFilebeat": "Filebeat", + "xpack.securitySolution.overview.networkStatGroupPacketbeat": "Packetbeat", + "xpack.securitySolution.overview.networkTitle": "ネットワークイベント", + "xpack.securitySolution.overview.newsFeedSidebarTitle": "セキュリティニュース", + "xpack.securitySolution.overview.overviewHost.hostsSubtitle": "表示中: {formattedHostEventsCount} {hostEventsCount, plural, one {イベント} other {イベント}}", + "xpack.securitySolution.overview.overviewNetwork.networkSubtitle": "表示中: {formattedNetworkEventsCount} {networkEventsCount, plural, one {イベント} other {イベント}}", + "xpack.securitySolution.overview.packetBeatDnsTitle": "DNS", + "xpack.securitySolution.overview.packetBeatFlowTitle": "フロー", + "xpack.securitySolution.overview.packetbeatTLSTitle": "TLS", + "xpack.securitySolution.overview.pageSubtitle": "Elastic Stackによるセキュリティ情報とイベント管理", + "xpack.securitySolution.overview.pageTitle": "Security", + "xpack.securitySolution.overview.recentCasesSidebarTitle": "最近のケース", + "xpack.securitySolution.overview.recentlyCreatedCasesButtonLabel": "最近作成したケース", + "xpack.securitySolution.overview.recentTimelinesSidebarTitle": "最近のタイムライン", + "xpack.securitySolution.overview.showTopTooltip": "上位の{fieldName}を表示", + "xpack.securitySolution.overview.startedText": "セキュリティ情報およびイベント管理(SIEM)へようこそ。はじめに{docs}や{data}をご参照ください。今後の機能に関する情報やチュートリアルは、{siemSolution} ページをお見逃しなく。", + "xpack.securitySolution.overview.startedText.dataLinkText": "投入データ", + "xpack.securitySolution.overview.startedText.docsLinkText": "ドキュメンテーション", + "xpack.securitySolution.overview.startedText.siemSolutionLinkText": "Security ソリューション", + "xpack.securitySolution.overview.startedTitle": "はじめて使う", + "xpack.securitySolution.overview.topNLabel": "トップ{fieldName}", + "xpack.securitySolution.overview.viewAlertsButtonLabel": "アラートを表示", + "xpack.securitySolution.overview.viewEventsButtonLabel": "イベントを表示", + "xpack.securitySolution.overview.winlogbeatMWSysmonOperational": "Microsoft-Windows-Sysmon/Operational", + "xpack.securitySolution.overview.winlogbeatSecurityTitle": "セキュリティ", + "xpack.securitySolution.pages.common.emptyActionPrimary": "Beatsでデータを表示", + "xpack.securitySolution.pages.common.emptyActionSecondary": "入門ガイドを表示", + "xpack.securitySolution.pages.common.emptyMessage": "セキュリティ情報とイベント管理(SIEM)を使用して開始するには、Elastic StackにElastic Common Schema(ECS)フォーマットでSIEM関連データを追加する必要があります。簡単に開始するには、Beatsと呼ばれるデータシッパーをインストールして設定するという方法があります。今すぐ始めましょう。", + "xpack.securitySolution.pages.common.emptyTitle": "SIEMへようこそ。始めましょう。", + "xpack.securitySolution.pages.fourohfour.noContentFoundDescription": "コンテンツがありません", + "xpack.securitySolution.paginatedTable.rowsButtonLabel": "ページごとの行数", + "xpack.securitySolution.paginatedTable.showingSubtitle": "表示中", + "xpack.securitySolution.paginatedTable.tooManyResultsToastText": "クエリ範囲を縮めて結果をさらにフィルタリングしてください", + "xpack.securitySolution.paginatedTable.tooManyResultsToastTitle": " - 結果が多すぎます", + "xpack.securitySolution.recentCases.commentsTooltip": "コメント", + "xpack.securitySolution.recentCases.noCasesMessage": "まだケースを作成していません。探偵帽をかぶって新しいケースを開始します", + "xpack.securitySolution.recentCases.startNewCaseLink": "", + "xpack.securitySolution.recentCases.viewAllCasesLink": "すべてのケースを表示", + "xpack.securitySolution.recentTimelines.errorRetrievingUserDetailsMessage": "最近のタイムライン:ユーザー詳細の取得中にエラーが発生しました", + "xpack.securitySolution.recentTimelines.favoritesButtonLabel": "お気に入り", + "xpack.securitySolution.recentTimelines.lastUpdatedButtonLabel": "最終更新", + "xpack.securitySolution.recentTimelines.noFavoriteTimelinesMessage": "まだタイムラインをお気に入りに登録していません。脅威の検出を開始しましょう。", + "xpack.securitySolution.recentTimelines.notesTooltip": "メモ", + "xpack.securitySolution.recentTimelines.noTimelinesMessage": "まだタイムラインを作成していません。脅威の検出を開始しましょう。", + "xpack.securitySolution.recentTimelines.openAsDuplicateTooltip": "重複タイムラインとして開く", + "xpack.securitySolution.recentTimelines.pinnedEventsTooltip": "ピン付けされたイベント", + "xpack.securitySolution.recentTimelines.untitledTimelineLabel": "無題のタイムライン", + "xpack.securitySolution.recentTimelines.viewAllTimelinesLink": "すべてのタイムラインを表示", + "xpack.securitySolution.source.destination.packetsLabel": "パケット", + "xpack.securitySolution.system.acceptedAConnectionViaDescription": "次の手段で接続を受け付けました:", + "xpack.securitySolution.system.acceptedDescription": "以下を経由してユーザーを受け入れました:", + "xpack.securitySolution.system.attemptedLoginDescription": "以下を経由してログインを試行しました:", + "xpack.securitySolution.system.createdFileDescription": "ファイルを作成しました", + "xpack.securitySolution.system.deletedFileDescription": "ファイルを削除しました", + "xpack.securitySolution.system.disconnectedViaDescription": "次の手段で接続を解除しました", + "xpack.securitySolution.system.errorDescription": "以下でエラーが生じました:", + "xpack.securitySolution.system.existingPackageDescription": "は既存のパッケージを使用しています", + "xpack.securitySolution.system.existingProcessDescription": "がプロセスを実行しています", + "xpack.securitySolution.system.existingSocketDescription": "が以下から既存のソケットを使用しています:", + "xpack.securitySolution.system.existingUserDescription": "は既存のユーザーです", + "xpack.securitySolution.system.hostDescription": "ホスト情報", + "xpack.securitySolution.system.invalidDescription": "以下を使用しようとする無効な試み:", + "xpack.securitySolution.system.loggedOutDescription": "以下を経由してログアウト:", + "xpack.securitySolution.system.packageInstalledDescription": "パッケージをインストールしました", + "xpack.securitySolution.system.packageRemovedDescription": "パッケージを削除しました", + "xpack.securitySolution.system.packageSystemStartedDescription": "システムを開始しました", + "xpack.securitySolution.system.packageUpdatedDescription": "パッケージを更新しました", + "xpack.securitySolution.system.processErrorDescription": "次に関するプロセスエラーが発生:", + "xpack.securitySolution.system.processStartedDescription": "プロセスを開始しました", + "xpack.securitySolution.system.processStoppedDescription": "プロセスを停止しました", + "xpack.securitySolution.system.socketClosedDescription": "以下とのソケットをクローズしました:", + "xpack.securitySolution.system.socketOpenedDescription": "以下とソケットを開きました:", + "xpack.securitySolution.system.systemDescription": "システム", + "xpack.securitySolution.system.terminatedProcessDescription": "プロセスを中断しました", + "xpack.securitySolution.system.userAddedDescription": "ユーザーが追加されました", + "xpack.securitySolution.system.userChangedDescription": "ユーザーが変更されました", + "xpack.securitySolution.system.userRemovedDescription": "が削除されました", + "xpack.securitySolution.system.usingDescription": "using", + "xpack.securitySolution.system.viaDescription": "経由", + "xpack.securitySolution.system.viaParentProcessDescription": "親プロセスで", + "xpack.securitySolution.system.wasAuthorizedToUseDescription": "が以下の使用を承認されました:", + "xpack.securitySolution.system.withExitCodeDescription": "終了コードで", + "xpack.securitySolution.system.withResultDescription": "結果付き", + "xpack.securitySolution.tables.rowItemHelper.moreDescription": "行は表示されていません", + "xpack.securitySolution.timeline.autosave.warning.description": "別のユーザーがこのタイムラインに変更を加えました。このタイムラインを更新してこれらの変更を取り入れるまで、ユーザーによる変更は自動的に保存されません。", + "xpack.securitySolution.timeline.autosave.warning.refresh.title": "タイムラインを更新", + "xpack.securitySolution.timeline.autosave.warning.title": "更新されるまで自動保存は無効です", + "xpack.securitySolution.timeline.body.actions.collapseAriaLabel": "縮小", + "xpack.securitySolution.timeline.body.actions.expandAriaLabel": "拡張", + "xpack.securitySolution.timeline.body.copyToClipboardButtonLabel": "クリップボードにコピー", + "xpack.securitySolution.timeline.body.notes.addOrViewNotesForThisEventTooltip": "このイベントのメモを追加または表示します", + "xpack.securitySolution.timeline.body.pinning.pinnedTooltip": "ピン付けされたイベント", + "xpack.securitySolution.timeline.body.pinning.pinnnedWithNotesTooltip": "イベントにメモがあり、ピンを外すことができません", + "xpack.securitySolution.timeline.body.pinning.unpinnedTooltip": "ピン付け解除されたイベント", + "xpack.securitySolution.timeline.body.renderers.dns.askedForDescription": "要求された", + "xpack.securitySolution.timeline.body.renderers.dns.responseCodeDescription": "応答コード", + "xpack.securitySolution.timeline.body.renderers.dns.viaDescription": "経由", + "xpack.securitySolution.timeline.body.renderers.dns.whichResolvedToDescription": "で解決する", + "xpack.securitySolution.timeline.body.renderers.dns.withQuestionTypeDescription": "質問タイプで", + "xpack.securitySolution.timeline.body.renderers.endgame.aLoginWasAttemptedUsingExplicitCredentialsDescription": "明示認証情報でログインが試みられました", + "xpack.securitySolution.timeline.body.renderers.endgame.asRequestedBySubjectDescription": "サブジェクトにリクエストされた通り", + "xpack.securitySolution.timeline.body.renderers.endgame.loggedOffDescription": "ログオフ", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeBatchDescription": "一斉", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeCachedInteractiveDescription": "キャッシュインタラクティブ", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeInteractiveDescription": "インタラクティブ", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNetworkCleartextDescription": "ネットワーククリアテキスト", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNetworkDescription": "ネットワーク", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNewCredentialsDescription": "新規認証情報", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeRemoteInteractiveDescription": "リモートインタラクティブ", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeServiceDescription": "サービス", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeUnlockDescription": "ロック解除", + "xpack.securitySolution.timeline.body.renderers.endgame.subjectLogonIdDescription": "サブジェクトログオン ID", + "xpack.securitySolution.timeline.body.renderers.endgame.successfullyLoggedInDescription": "正常にログイン", + "xpack.securitySolution.timeline.body.renderers.endgame.targetLogonIdDescription": "ターゲットログオン ID", + "xpack.securitySolution.timeline.body.renderers.endgame.toDescription": "に", + "xpack.securitySolution.timeline.body.renderers.endgame.usingLogonTypeDescription": "ログオンタイプを使用して", + "xpack.securitySolution.timeline.body.renderers.endgame.viaDescription": "経由", + "xpack.securitySolution.timeline.body.renderers.endgame.withSpecialPrivilegesDescription": "割り当てられた特別な権限", + "xpack.securitySolution.timeline.callOut.unauthorized.message.description": "Security アプリケーションでタイムラインを自動保存するにはパーミッションが必要ですが、引き続きタイムラインを使用してセキュリティイベントの検索とフィルタリングを行うことはできます。", + "xpack.securitySolution.timeline.categoryTooltip": "カテゴリー", + "xpack.securitySolution.timeline.defaultTimelineDescription": "新しいタイムラインを作成するときにデフォルトで提供されるタイムライン。", + "xpack.securitySolution.timeline.defaultTimelineTitle": "デフォルトの空白タイムライン", + "xpack.securitySolution.timeline.descriptionTooltip": "説明", + "xpack.securitySolution.timeline.destination": "送信先", + "xpack.securitySolution.timeline.eventsSelect.actions.pinSelected": "選択項目にピン付け", + "xpack.securitySolution.timeline.eventsSelect.actions.selectAll": "すべて", + "xpack.securitySolution.timeline.eventsSelect.actions.selectNone": "なし", + "xpack.securitySolution.timeline.eventsSelect.actions.selectPinned": "ピン付け済み", + "xpack.securitySolution.timeline.eventsSelect.actions.selectUnpinned": "ピンが外されました", + "xpack.securitySolution.timeline.eventsSelect.actions.unpinSelected": "選択項目のピンを外す", + "xpack.securitySolution.timeline.expandableEvent.copyToClipboardToolTip": "クリップボードにコピー", + "xpack.securitySolution.timeline.expandableEvent.eventToolTipTitle": "イベント", + "xpack.securitySolution.timeline.fieldTooltip": "フィールド", + "xpack.securitySolution.timeline.flyout.header.closeTimelineButtonLabel": "タイムラインを閉じる", + "xpack.securitySolution.timeline.flyout.pane.removeColumnButtonLabel": "列を削除", + "xpack.securitySolution.timeline.flyout.pane.timelinePropertiesAriaLabel": "タイムラインのプロパティ", + "xpack.securitySolution.timeline.properties.descriptionPlaceholder": "説明", + "xpack.securitySolution.timeline.properties.descriptionTooltip": "このタイムラインのイベントのサマリーとメモ", + "xpack.securitySolution.timeline.properties.favoriteTooltip": "お気に入り", + "xpack.securitySolution.timeline.properties.historyLabel": "履歴", + "xpack.securitySolution.timeline.properties.historyToolTip": "このタイムラインに関連したアクションの履歴", + "xpack.securitySolution.timeline.properties.inspectTimelineTitle": "Timeline", + "xpack.securitySolution.timeline.properties.isViewingTooltip": "がこのタイムラインを表示しています", + "xpack.securitySolution.timeline.properties.lockDatePickerDescription": "日付ピッカーをグローバル日付ピッカーにロック", + "xpack.securitySolution.timeline.properties.lockDatePickerTooltip": "現在表示中のページとタイムラインの間の日付/時刻範囲の同期を無効にします", + "xpack.securitySolution.timeline.properties.newCaseButtonLabel": "タイムラインを新しいケースに接続する", + "xpack.securitySolution.timeline.properties.newTimelineButtonLabel": "新規タイムラインを作成", + "xpack.securitySolution.timeline.properties.notAFavoriteTooltip": "お気に入りではありません", + "xpack.securitySolution.timeline.properties.notesButtonLabel": "メモ", + "xpack.securitySolution.timeline.properties.notesToolTip": "このタイムラインに関するメモを追加して確認します。メモはイベントにも追加できます。", + "xpack.securitySolution.timeline.properties.streamLiveButtonLabel": "ライブストリーム", + "xpack.securitySolution.timeline.properties.streamLiveToolTip": "新しいデータが利用可能になるにつれタイムラインを更新します", + "xpack.securitySolution.timeline.properties.timelineDescription": "タイムラインの説明", + "xpack.securitySolution.timeline.properties.timelineTitleAriaLabel": "タイムラインのタイトル", + "xpack.securitySolution.timeline.properties.titleTitle": "タイトル", + "xpack.securitySolution.timeline.properties.unlockDatePickerDescription": "日付ピッカーのグローバル日付ピッカーへのロックを解除", + "xpack.securitySolution.timeline.properties.unlockDatePickerTooltip": "現在表示中のページとタイムラインの間の日付/時刻範囲の同期を有効にします", + "xpack.securitySolution.timeline.properties.untitledTimelinePlaceholder": "無題のタイムライン", + "xpack.securitySolution.timeline.protocol": "プロトコル", + "xpack.securitySolution.timeline.rangePicker.oneDay": "1 日", + "xpack.securitySolution.timeline.rangePicker.oneMonth": "1 か月", + "xpack.securitySolution.timeline.rangePicker.oneWeek": "1 週間", + "xpack.securitySolution.timeline.rangePicker.oneYear": "1 年", + "xpack.securitySolution.timeline.searchOrFilter.eventTypeAllEvent": "すべてのイベント", + "xpack.securitySolution.timeline.searchOrFilter.eventTypeRawEvent": "未加工イベント", + "xpack.securitySolution.timeline.searchOrFilter.eventTypeSignalEvent": "シグナルイベント", + "xpack.securitySolution.timeline.searchOrFilter.filterDescription": "上のデータプロバイダーからのイベントは、隣接の KQL でフィルターされます", + "xpack.securitySolution.timeline.searchOrFilter.filterKqlPlaceholder": "イベントをフィルター", + "xpack.securitySolution.timeline.searchOrFilter.filterKqlSelectedText": "フィルター", + "xpack.securitySolution.timeline.searchOrFilter.filterKqlTooltip": "上のデータプロバイダーからのイベントは、この KQL でフィルターされます", + "xpack.securitySolution.timeline.searchOrFilter.filterOrSearchWithKql": "KQLでフィルターまたは検索", + "xpack.securitySolution.timeline.searchOrFilter.searchDescription": "上のデータプロバイダーからのイベントは、隣接のKQLからの結果と組み合わされます。", + "xpack.securitySolution.timeline.searchOrFilter.searchKqlPlaceholder": "イベントを検索", + "xpack.securitySolution.timeline.searchOrFilter.searchKqlSelectedText": "検索", + "xpack.securitySolution.timeline.searchOrFilter.searchKqlTooltip": "上のデータプロバイダーからのイベントは、この KQL からの結果と組み合わされます。", + "xpack.securitySolution.timeline.source": "送信元", + "xpack.securitySolution.timeline.tcp": "TCP", + "xpack.securitySolution.timeline.typeTooltip": "タイプ", + "xpack.securitySolution.timelines.allTimelines.errorFetchingTimelinesTitle": "すべてのタイムラインデータをクエリできませんでした", + "xpack.securitySolution.timelines.allTimelines.importTimelineTitle": "タイムラインのインポート", + "xpack.securitySolution.timelines.allTimelines.panelTitle": "すべてのタイムライン", + "xpack.securitySolution.timelines.components.importTimelineModal.importFailedDetailedTitle": "タイムライン ID: {id}\n ステータスコード: {statusCode}\n メッセージ: {message}", + "xpack.securitySolution.timelines.components.importTimelineModal.importFailedTitle": "タイムラインをインポートできませんでした", + "xpack.securitySolution.timelines.components.importTimelineModal.importTimelineTitle": "タイムラインをインポート", + "xpack.securitySolution.timelines.components.importTimelineModal.importTitle": "タイムラインをインポート...", + "xpack.securitySolution.timelines.components.importTimelineModal.initialPromptTextDescription": "有効な timelines_export.ndjson ファイルを選択するか、またはドラッグアンドドロップします", + "xpack.securitySolution.timelines.components.importTimelineModal.overwriteDescription": "保存されたオブジェクトを同じタイムライン ID で自動的に上書きします", + "xpack.securitySolution.timelines.components.importTimelineModal.selectTimelineDescription": "インポートする Security ルール (タイムラインビューからエクスポートしたもの) を選択します", + "xpack.securitySolution.timelines.components.importTimelineModal.successfullyImportedTimelinesTitle": "{totalCount} {totalCount, plural, =1 {タイムライン} other {タイムライン}}のインポートが正常に完了しました", + "xpack.securitySolution.timelines.components.tabs.templatesTitle": "テンプレート", + "xpack.securitySolution.timelines.components.tabs.timelinesTitle": "タイムライン", + "xpack.securitySolution.timelines.pageTitle": "タイムライン", + "xpack.securitySolution.topN.allEventsSelectLabel": "すべてのイベント", + "xpack.securitySolution.topN.closeButtonLabel": "閉じる", + "xpack.securitySolution.topN.rawEventsSelectLabel": "未加工イベント", + "xpack.securitySolution.uiSettings.defaultAnomalyScoreDescription": "

機械学習ジョブの異常がこの値を超えると Security アプリに表示されます。

有効な値:0 ~ 100。

", + "xpack.securitySolution.uiSettings.defaultAnomalyScoreLabel": "デフォルトの異常しきい値", + "xpack.securitySolution.uiSettings.defaultIndexDescription": "

Security アプリがイベントを収集する Elasticsearch インデックスのコンマ区切りのリストです。

", + "xpack.securitySolution.uiSettings.defaultIndexLabel": "デフォルトのインデックス", + "xpack.securitySolution.uiSettings.defaultRefreshIntervalDescription": "

Security 時間フィルターのミリ単位のデフォルトの更新間隔です。

", + "xpack.securitySolution.uiSettings.defaultRefreshIntervalLabel": "タイムピッカーの更新間隔", + "xpack.securitySolution.uiSettings.defaultTimeRangeDescription": "

Security 時間フィルダーのデフォルトの期間です。

", + "xpack.securitySolution.uiSettings.defaultTimeRangeLabel": "デフォルトのタイムピッカー", + "xpack.securitySolution.uiSettings.enableNewsFeedDescription": "

ニュースフィードを有効にします

", + "xpack.securitySolution.uiSettings.enableNewsFeedLabel": "ニュースフィード", + "xpack.securitySolution.uiSettings.ipReputationLinks": "IP 評判リンク", + "xpack.securitySolution.uiSettings.ipReputationLinksDescription": "IP 詳細ページに表示される評判 URL のリストを作成するための URL テンプレートの配列。", + "xpack.securitySolution.uiSettings.newsFeedUrl": "ニュースフィードURL", + "xpack.securitySolution.uiSettings.newsFeedUrlDescription": "

ニュースフィードコンテンツはこのURLから取得されます

", + "xpack.securitySolution.uncommonProcessTable.hostsTitle": "すべてのホスト", + "xpack.securitySolution.uncommonProcessTable.lastCommandTitle": "前回のコマンド", + "xpack.securitySolution.uncommonProcessTable.lastUserTitle": "前回のユーザー", + "xpack.securitySolution.uncommonProcessTable.nameTitle": "名前", + "xpack.securitySolution.uncommonProcessTable.numberOfHostsTitle": "ホスト数", + "xpack.securitySolution.uncommonProcessTable.numberOfInstances": "インスタンス", + "xpack.securitySolution.uncommonProcessTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {row} other {rows}}", + "xpack.securitySolution.uncommonProcessTable.unit": "{totalCount, plural, =1 {process} other {processes}}", + "xpack.securitySolution.zeek.othDescription": "SYNが検出されません。ミッドストリームトラフィックのみです", + "xpack.securitySolution.zeek.rejDescription": "接続試行が拒否されました", + "xpack.securitySolution.zeek.rstoODescription": "接続が確立され、接続元が中断しました(RSTを送信)", + "xpack.securitySolution.zeek.rstosoDescription": "接続元がRSTに続きSYNを送信しました。レスポンダーからSYN-ACKはありません", + "xpack.securitySolution.zeek.rstrDescription": "確立され、レスポンダーが中断しました", + "xpack.securitySolution.zeek.rstrhDescription": "レスポンダーがRSTに続き SYNを送信しました。接続元(推定)からSYN-ACKはありません", + "xpack.securitySolution.zeek.s0Description": "接続試行を検出し、返答はありません", + "xpack.securitySolution.zeek.s1Description": "接続が確立され、中断されていません", + "xpack.securitySolution.zeek.s2Description": "接続が確立され、接続元からの終了試行が検出されました(レスポンダーからの返答はありません)", + "xpack.securitySolution.zeek.s3Description": "接続が確立され、レスポンダーからの終了試行が検出されました(接続元からの返答はありません)", + "xpack.securitySolution.zeek.sfDescription": "通常のSYN/FIN完了", + "xpack.securitySolution.zeek.shDescription": "接続元がFINに続きSYNを送信しました。レスポンダーからSYN-ACKはありません", + "xpack.securitySolution.zeek.shrDescription": "レスポンダーがFINに続きSYNを送信しました。接続元からSYN-ACKはありません", "xpack.snapshotRestore.addPolicy.breadcrumbTitle": "ポリシーを追加", "xpack.snapshotRestore.addPolicy.loadingIndicesDescription": "利用可能なインデックスを読み込み中…", "xpack.snapshotRestore.addPolicy.LoadingIndicesErrorMessage": "利用可能なインデックスを読み込み中にエラーが発生", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b3347b3dadd49..6992d4004e24e 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -87,7 +87,7 @@ "advancedSettings.categoryNames.notificationsLabel": "通知", "advancedSettings.categoryNames.reportingLabel": "Reporting", "advancedSettings.categoryNames.searchLabel": "搜索", - "advancedSettings.categoryNames.siemLabel": "SIEM", + "advancedSettings.categoryNames.securitySolutionLabel": "Security Solution", "advancedSettings.categoryNames.timelionLabel": "Timelion", "advancedSettings.categoryNames.visualizationsLabel": "可视化", "advancedSettings.categorySearchLabel": "类别", @@ -496,6 +496,81 @@ "dashboard.topNave.viewConfigDescription": "取消编辑并切换到仅查看模式", "dashboard.urlWasRemovedInSixZeroWarningMessage": "6.0 中已移除 url“dashboard/create”。请更新您的书签。", "dashboard.visitVisualizeAppLinkText": "访问 Visualize 应用", + "data.advancedSettings.courier.batchSearchesText": "禁用时,仪表板面板将分别加载,用户离开时或更新查询时,\n 搜索请求将终止。启用时,仪表板面板将一起加载并加载所有数据,\n 搜索将不会终止。", + "data.advancedSettings.courier.batchSearchesTextDeprecation": "此设置已过时,将在 Kibana 8.0 中移除。", + "data.advancedSettings.courier.batchSearchesTitle": "批处理并发搜索", + "data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText": "请求首选项", + "data.advancedSettings.courier.customRequestPreferenceText": "将 “{setRequestReferenceSetting} 设置为 {customSettingValue} 时,将使用 “{requestPreferenceLink}”。", + "data.advancedSettings.courier.customRequestPreferenceTitle": "定制请求首选项", + "data.advancedSettings.courier.ignoreFilterText": "此配置增强对包含可视化的仪表板访问不同索引的支持。禁用时,将向所有可视化应用所有筛选。启用时,如果可视化的索引不包含筛选字段,则会为该可视化忽略筛选。", + "data.advancedSettings.courier.ignoreFilterTitle": "忽略筛选", + "data.advancedSettings.courier.maxRequestsText": "控制用于 Kibana 发送的 _msearch 请求的 “{maxRequestsLink}” 设置。设置为 0 可禁用此配置并使用 Elasticsearch 默认值。", + "data.advancedSettings.courier.maxRequestsTitle": "最大并发分片请求数", + "data.advancedSettings.courier.requestPreferenceCustom": "定制", + "data.advancedSettings.courier.requestPreferenceNone": "无", + "data.advancedSettings.courier.requestPreferenceSessionId": "会话 ID", + "data.advancedSettings.courier.requestPreferenceText": "允许您设置用于处理搜索请求的分片。
    \n
  • {sessionId}:仅限在相同分片上执行操作中的所有搜索请求。\n 这有利于在各个请求之间复用分片缓存。
  • \n
  • {custom}:允许您定义自己的首选项。\n 使用 courier:customRequestPreference 定制首选项值。
  • \n
  • {none}:表示不设置首选项。\n 这可能会提供更佳的性能,因此请求可以在所有分片副本上进行分配。\n 不过,结果可能会不一致,因为不同的分片可能处于不同的刷新状态。
  • \n
", + "data.advancedSettings.courier.requestPreferenceTitle": "请求首选项", + "data.advancedSettings.defaultIndexText": "未设置索引时要访问的索引", + "data.advancedSettings.defaultIndexTitle": "默认索引", + "data.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数值格式", + "data.advancedSettings.format.bytesFormatText": "“字节”格式的默认{numeralFormatLink}", + "data.advancedSettings.format.bytesFormatTitle": "字节格式", + "data.advancedSettings.format.currencyFormat.numeralFormatLinkText": "数值格式", + "data.advancedSettings.format.currencyFormatText": "“货币”格式的默认{numeralFormatLink}", + "data.advancedSettings.format.currencyFormatTitle": "货币格式", + "data.advancedSettings.format.defaultTypeMapText": "要默认用于每个字段类型的格式名称的映射。如果未显式提及字段类型,则将使用{defaultFormat}", + "data.advancedSettings.format.defaultTypeMapTitle": "字段类型格式名称", + "data.advancedSettings.format.formattingLocale.numeralLanguageLinkText": "数值语言", + "data.advancedSettings.format.formattingLocaleText": "{numeralLanguageLink}区域设置", + "data.advancedSettings.format.formattingLocaleTitle": "格式区域设置", + "data.advancedSettings.format.numberFormat.numeralFormatLinkText": "数值格式", + "data.advancedSettings.format.numberFormatText": "“数字”格式的默认{numeralFormatLink}", + "data.advancedSettings.format.numberFormatTitle": "数字格式", + "data.advancedSettings.format.percentFormat.numeralFormatLinkText": "数值格式", + "data.advancedSettings.format.percentFormatText": "“百分比”格式的默认{numeralFormatLink}", + "data.advancedSettings.format.percentFormatTitle": "百分比格式", + "data.advancedSettings.histogram.barTargetText": "在日期直方图中使用“auto”时尝试生成大约此数目的条形", + "data.advancedSettings.histogram.barTargetTitle": "目标条形数", + "data.advancedSettings.histogram.maxBarsText": "在日期直方图中不要显示超过该数目的条形", + "data.advancedSettings.histogram.maxBarsTitle": "最大条形数", + "data.advancedSettings.historyLimitText": "在具有历史记录(例如查询输入)的字段中,显示此数目的最近值", + "data.advancedSettings.historyLimitTitle": "历史记录限制", + "data.advancedSettings.indexPatternPlaceholderText": "在“管理 > 索引模式 > 创建索引模式”中“索引模式名称”的占位符。", + "data.advancedSettings.indexPatternPlaceholderTitle": "索引模式占位符", + "data.advancedSettings.pinFiltersText": "筛选是否默认有全局状态(被固定)", + "data.advancedSettings.pinFiltersTitle": "默认固定筛选", + "data.advancedSettings.query.allowWildcardsText": "设置后,将允许 * 用作查询语句的第一个字符。当前仅在查询栏中启用实验性查询功能时才会应用。要在基本 lucene 查询中禁用前导通配符,请使用“{queryStringOptionsPattern}”。", + "data.advancedSettings.query.allowWildcardsTitle": "在查询中允许前导通配符", + "data.advancedSettings.query.queryStringOptions.optionsLinkText": "选项", + "data.advancedSettings.query.queryStringOptionsText": "lucene 查询字符串解析器的{optionsLink}。只有将“{queryLanguage}”设置为 {luceneLanguage} 时才会使用。", + "data.advancedSettings.query.queryStringOptionsTitle": "查询字符串选项", + "data.advancedSettings.searchQueryLanguageKql": "KQL", + "data.advancedSettings.searchQueryLanguageLucene": "Lucene", + "data.advancedSettings.searchQueryLanguageText": "查询栏使用的查询语言。KQL 是专门为 Kibana 打造的新型语言。", + "data.advancedSettings.searchQueryLanguageTitle": "查询语言", + "data.advancedSettings.shortenFieldsText": "缩短长字段,例如,不显示 foo.bar.baz,而显示 f.b.baz", + "data.advancedSettings.shortenFieldsTitle": "缩短字段", + "data.advancedSettings.sortOptions.optionsLinkText": "选项", + "data.advancedSettings.sortOptionsText": "Elasticsearch 排序参数的{optionsLink}", + "data.advancedSettings.sortOptionsTitle": "排序选项", + "data.advancedSettings.suggestFilterValuesText": "将此属性设置 false 以阻止筛选编辑器建议字段的值。", + "data.advancedSettings.suggestFilterValuesTitle": "筛选编辑器建议值", + "data.advancedSettings.timepicker.last15Minutes": "过去 15 分钟", + "data.advancedSettings.timepicker.last1Hour": "过去 1 小时", + "data.advancedSettings.timepicker.last1Year": "过去 1 年", + "data.advancedSettings.timepicker.last24Hours": "过去 24 小时", + "data.advancedSettings.timepicker.last30Days": "过去 30 天", + "data.advancedSettings.timepicker.last30Minutes": "过去 30 分钟", + "data.advancedSettings.timepicker.last7Days": "过去 7 天", + "data.advancedSettings.timepicker.last90Days": "过去 90 天", + "data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText": "接受的格式", + "data.advancedSettings.timepicker.quickRangesText": "要在时间选取器的“速选”部分中显示的范围列表。这应该是对象数组,每个对象包含“from”、“to”(请参阅“{acceptedFormatsLink}”)和“display”(要显示的标题)。", + "data.advancedSettings.timepicker.quickRangesTitle": "时间筛选速选范围", + "data.advancedSettings.timepicker.refreshIntervalDefaultsText": "时间筛选的默认刷新时间间隔", + "data.advancedSettings.timepicker.refreshIntervalDefaultsTitle": "时间筛选刷新时间间隔", + "data.advancedSettings.timepicker.thisWeek": "本周", + "data.advancedSettings.timepicker.today": "今日", "data.aggTypes.buckets.ranges.rangesFormatMessage": "{gte} {from} 和 {lt} {to}", "data.common.kql.errors.endOfInputText": "输入结束", "data.common.kql.errors.fieldNameText": "字段名称", @@ -1236,9 +1311,9 @@ "home.addData.metrics.nameTitle": "指标", "home.addData.sampleDataLink": "加载数据集和 Kibana 仪表板", "home.addData.sampleDataTitle": "添加样例数据", - "home.addData.siem.addSiemEventsButtonLabel": "添加事件", - "home.addData.siem.nameDescription": "集中安全事件,以通过即用型可视化实现交互式调查。", - "home.addData.siem.nameTitle": "SIEM", + "home.addData.securitySolution.addSecurityEventsButtonLabel": "添加事件", + "home.addData.securitySolution.nameDescription": "集中安全事件,以通过即用型可视化实现交互式调查。", + "home.addData.securitySolution.nameTitle": "Security", "home.addData.title.observability": "可观测性", "home.addData.title.security": "安全", "home.addData.uploadFileLink": "导入 CSV、NDJSON 或日志文件", @@ -1370,7 +1445,7 @@ "home.tutorial.tabs.loggingTitle": "日志", "home.tutorial.tabs.metricsTitle": "指标", "home.tutorial.tabs.sampleDataTitle": "样例数据", - "home.tutorial.tabs.siemTitle": "SIEM", + "home.tutorial.tabs.securitySolutionTitle": "Security", "home.tutorial.unexpectedStatusCheckStateErrorDescription": "意外的状态检查状态 {statusCheckState}", "home.tutorial.unhandledInstructionTypeErrorDescription": "未处理的指令类型 {visibleInstructions}", "home.tutorials.activemqLogs.artifacts.dashboards.linkLabel": "ActiveMQ 应用程序事件", @@ -1393,7 +1468,7 @@ "home.tutorials.apacheMetrics.longDescription": "Metricbeat 模块 `apache` 从 Apache 2 HTTP 服务器提取内部指标。[了解详情]({learnMoreLink})。", "home.tutorials.apacheMetrics.nameTitle": "Apache 指标", "home.tutorials.apacheMetrics.shortDescription": "从 Apache 2 HTTP 服务器提取内部指标。", - "home.tutorials.auditbeat.artifacts.dashboards.linkLabel": "SIEM 应用", + "home.tutorials.auditbeat.artifacts.dashboards.linkLabel": "Security 应用", "home.tutorials.auditbeat.longDescription": "使用 Auditbeat 从主机收集审计数据。其中包括进程、用户、登录、套接字信息、文件访问等等。[了解详情]({learnMoreLink})。", "home.tutorials.auditbeat.nameTitle": "Auditbeat", "home.tutorials.auditbeat.shortDescription": "从主机收集审计数据。", @@ -1412,7 +1487,7 @@ "home.tutorials.cephMetrics.longDescription": "Metricbeat 模块 `ceph` 从 Ceph 提取内部指标。[了解详情]({learnMoreLink})。", "home.tutorials.cephMetrics.nameTitle": "Ceph 指标", "home.tutorials.cephMetrics.shortDescription": "从 Ceph 服务器提取内部指标。", - "home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel": "SIEM 应用", + "home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel": "Security 应用", "home.tutorials.ciscoLogs.longDescription": "这是用于 Cisco 网络设备日志的模块。当前支持“asa”文件集,该文件集用于通过 Syslog 接收或从文件读取的 Cisco ASA 防火墙日志。[了解详情]({learnMoreLink})。", "home.tutorials.ciscoLogs.nameTitle": "Cisco", "home.tutorials.ciscoLogs.shortDescription": "收集并解析从 Cisco ASA 防火墙接收的日志。", @@ -1742,7 +1817,7 @@ "home.tutorials.elasticsearchMetrics.longDescription": "Metricbeat 模块 `elasticsearch` 从 Elasticsearch 提取内部指标。[了解详情]({learnMoreLink})。", "home.tutorials.elasticsearchMetrics.nameTitle": "Elasticsearch 指标", "home.tutorials.elasticsearchMetrics.shortDescription": "从 Elasticsearch 提取内部指标。", - "home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel": "SIEM 应用", + "home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel": "Security 应用", "home.tutorials.envoyproxyLogs.longDescription": "这是用于 [Envoy 代理访问日志](https://www.envoyproxy.io/docs/envoy/v1.10.0/configuration/access_log)的 Filebeat 模块。其在 Kubernetes 中既支持独立部署,又支持 Envoy 代理部署。[了解详情]({learnMoreLink})。", "home.tutorials.envoyproxyLogs.nameTitle": "Envoyproxy", "home.tutorials.envoyproxyLogs.shortDescription": "收集并解析从 Envoy 代理接收的日志。", @@ -1773,7 +1848,7 @@ "home.tutorials.iisLogs.longDescription": "Filebeat 模块 `iis` 解析 IIS HTTP 服务器创建的访问和错误日志。[了解详情]({learnMoreLink})。", "home.tutorials.iisLogs.nameTitle": "IIS 日志", "home.tutorials.iisLogs.shortDescription": "收集并解析 IIS HTTP 服务器创建的访问和错误日志。", - "home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel": "SIEM 应用", + "home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel": "Security 应用", "home.tutorials.iptablesLogs.longDescription": "这是用于 iptables 和 ip6tables 日志的模块。其解析在网络上通过 Syslog 或从文件中接收的日志。另外,其识别某些 Ubiquiti 防火墙添加的前缀,该前缀包含规则集名称、规则编号和对流量执行的操作 (allow/deny)。[了解详情]({learnMoreLink})。", "home.tutorials.iptablesLogs.nameTitle": "Iptables / Ubiquiti", "home.tutorials.iptablesLogs.shortDescription": "从 Ubiqiti 防火墙收集并解析 iptables 和 ip6tables 日志。", @@ -1945,7 +2020,7 @@ "home.tutorials.vsphereMetrics.longDescription": "Metricbeat 模块 `vsphere` 从 vSphere 集群提取内部指标。[了解详情]({learnMoreLink})。", "home.tutorials.vsphereMetrics.nameTitle": "vSphere 指标", "home.tutorials.vsphereMetrics.shortDescription": "从 vSphere 提取内部指标。", - "home.tutorials.windowsEventLogs.artifacts.application.label": "SIEM 应用", + "home.tutorials.windowsEventLogs.artifacts.application.label": "Security 应用", "home.tutorials.windowsEventLogs.longDescription": "使用 Winlogbeat 从 Windows 事件日志收集日志。[了解详情]({learnMoreLink})。", "home.tutorials.windowsEventLogs.nameTitle": "Windows 事件日志", "home.tutorials.windowsEventLogs.shortDescription": "从 Windows 事件日志提取日志。", @@ -2050,25 +2125,10 @@ "inspector.requests.statisticsTabLabel": "统计信息", "inspector.title": "检查器", "inspector.view": "视图:{viewName}", - "kbn.advancedSettings.courier.batchSearchesText": "禁用时,仪表板面板将分别加载,用户离开时或更新查询时,\n 搜索请求将终止。启用时,仪表板面板将一起加载并加载所有数据,\n 搜索将不会终止。", - "kbn.advancedSettings.courier.batchSearchesTextDeprecation": "此设置已过时,将在 Kibana 8.0 中移除。", - "kbn.advancedSettings.courier.batchSearchesTitle": "批处理并发搜索", - "kbn.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText": "请求首选项", - "kbn.advancedSettings.courier.customRequestPreferenceText": "将 “{setRequestReferenceSetting} 设置为 {customSettingValue} 时,将使用 “{requestPreferenceLink}”。", - "kbn.advancedSettings.courier.customRequestPreferenceTitle": "定制请求首选项", - "kbn.advancedSettings.courier.ignoreFilterText": "此配置增强对包含可视化的仪表板访问不同索引的支持。禁用时,将向所有可视化应用所有筛选。启用时,如果可视化的索引不包含筛选字段,则会为该可视化忽略筛选。", - "kbn.advancedSettings.courier.ignoreFilterTitle": "忽略筛选", - "kbn.advancedSettings.courier.maxRequestsText": "控制用于 Kibana 发送的 _msearch 请求的 “{maxRequestsLink}” 设置。设置为 0 可禁用此配置并使用 Elasticsearch 默认值。", - "kbn.advancedSettings.courier.maxRequestsTitle": "最大并发分片请求数", - "kbn.advancedSettings.courier.requestPreferenceCustom": "定制", - "kbn.advancedSettings.courier.requestPreferenceNone": "无", - "kbn.advancedSettings.courier.requestPreferenceSessionId": "会话 ID", - "kbn.advancedSettings.courier.requestPreferenceText": "允许您设置用于处理搜索请求的分片。
    \n
  • {sessionId}:仅限在相同分片上执行操作中的所有搜索请求。\n 这有利于在各个请求之间复用分片缓存。
  • \n
  • {custom}:允许您定义自己的首选项。\n 使用 courier:customRequestPreference 定制首选项值。
  • \n
  • {none}:表示不设置首选项。\n 这可能会提供更佳的性能,因此请求可以在所有分片副本上进行分配。\n 不过,结果可能会不一致,因为不同的分片可能处于不同的刷新状态。
  • \n
", - "kbn.advancedSettings.courier.requestPreferenceTitle": "请求首选项", - "kbn.advancedSettings.csv.quoteValuesText": "在 csv 导出中是否应使用引号引起值?", - "kbn.advancedSettings.csv.quoteValuesTitle": "使用引号引起 CSV 值", - "kbn.advancedSettings.csv.separatorText": "使用此字符串分隔导出的值", - "kbn.advancedSettings.csv.separatorTitle": "CSV 分隔符", + "share.advancedSettings.csv.quoteValuesText": "在 csv 导出中是否应使用引号引起值?", + "share.advancedSettings.csv.quoteValuesTitle": "使用引号引起 CSV 值", + "share.advancedSettings.csv.separatorText": "使用此字符串分隔导出的值", + "share.advancedSettings.csv.separatorTitle": "CSV 分隔符", "kbn.advancedSettings.darkModeText": "为 Kibana UI 启用深色模式需要刷新页面,才能应用设置。", "kbn.advancedSettings.darkModeTitle": "深色模式", "kbn.advancedSettings.dateFormat.dayOfWeekText": "一周从哪一日开始?", @@ -2084,38 +2144,11 @@ "kbn.advancedSettings.dateNanosFormatText": "用于 Elasticsearch 的 {dateNanosLink} 数据类型", "kbn.advancedSettings.dateNanosFormatTitle": "纳秒格式的日期", "kbn.advancedSettings.dateNanosLinkTitle": "date_nanos", - "kbn.advancedSettings.defaultIndexText": "未设置索引时要访问的索引", - "kbn.advancedSettings.defaultIndexTitle": "默认索引", "kbn.advancedSettings.defaultRoute.defaultRouteIsRelativeValidationMessage": "必须是相对 URL。", "kbn.advancedSettings.defaultRoute.defaultRouteText": "此设置指定打开 Kibana 时的默认路由。您可以使用此设置修改打开 Kibana 时的登陆页面。路由必须是相对 URL。", "kbn.advancedSettings.defaultRoute.defaultRouteTitle": "默认路由", "kbn.advancedSettings.disableAnimationsText": "在 Kibana UI 中关闭所有没有必要的动画。刷新页面以应用更改。", "kbn.advancedSettings.disableAnimationsTitle": "禁用动画", - "kbn.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数值格式", - "kbn.advancedSettings.format.bytesFormatText": "“字节”格式的默认{numeralFormatLink}", - "kbn.advancedSettings.format.bytesFormatTitle": "字节格式", - "kbn.advancedSettings.format.currencyFormat.numeralFormatLinkText": "数值格式", - "kbn.advancedSettings.format.currencyFormatText": "“货币”格式的默认{numeralFormatLink}", - "kbn.advancedSettings.format.currencyFormatTitle": "货币格式", - "kbn.advancedSettings.format.defaultTypeMapText": "要默认用于每个字段类型的格式名称的映射。如果未显式提及字段类型,则将使用{defaultFormat}", - "kbn.advancedSettings.format.defaultTypeMapTitle": "字段类型格式名称", - "kbn.advancedSettings.format.formattingLocale.numeralLanguageLinkText": "数值语言", - "kbn.advancedSettings.format.formattingLocaleText": "{numeralLanguageLink}区域设置", - "kbn.advancedSettings.format.formattingLocaleTitle": "格式区域设置", - "kbn.advancedSettings.format.numberFormat.numeralFormatLinkText": "数值格式", - "kbn.advancedSettings.format.numberFormatText": "“数字”格式的默认{numeralFormatLink}", - "kbn.advancedSettings.format.numberFormatTitle": "数字格式", - "kbn.advancedSettings.format.percentFormat.numeralFormatLinkText": "数值格式", - "kbn.advancedSettings.format.percentFormatText": "“百分比”格式的默认{numeralFormatLink}", - "kbn.advancedSettings.format.percentFormatTitle": "百分比格式", - "kbn.advancedSettings.histogram.barTargetText": "在日期直方图中使用“auto”时尝试生成大约此数目的条形", - "kbn.advancedSettings.histogram.barTargetTitle": "目标条形数", - "kbn.advancedSettings.histogram.maxBarsText": "在日期直方图中不要显示超过该数目的条形", - "kbn.advancedSettings.histogram.maxBarsTitle": "最大条形数", - "kbn.advancedSettings.historyLimitText": "在具有历史记录(例如查询输入)的字段中,显示此数目的最近值", - "kbn.advancedSettings.historyLimitTitle": "历史记录限制", - "kbn.advancedSettings.indexPatternPlaceholderText": "在“管理 > 索引模式 > 创建索引模式”中“索引模式名称”的占位符。", - "kbn.advancedSettings.indexPatternPlaceholderTitle": "索引模式占位符", "kbn.advancedSettings.maxCellHeightText": "表中单元格应占用的最大高度。设置为 0 可禁用截短", "kbn.advancedSettings.maxCellHeightTitle": "最大表单元格高度", "kbn.advancedSettings.notifications.banner.markdownLinkText": "Markdown 受支持", @@ -2133,43 +2166,10 @@ "kbn.advancedSettings.pageNavigationLegacy": "旧版", "kbn.advancedSettings.pageNavigationModern": "现代", "kbn.advancedSettings.pageNavigationName": "侧边导航样式", - "kbn.advancedSettings.pinFiltersText": "筛选是否默认有全局状态(被固定)", - "kbn.advancedSettings.pinFiltersTitle": "默认固定筛选", - "kbn.advancedSettings.query.allowWildcardsText": "设置后,将允许 * 用作查询语句的第一个字符。当前仅在查询栏中启用实验性查询功能时才会应用。要在基本 lucene 查询中禁用前导通配符,请使用“{queryStringOptionsPattern}”。", - "kbn.advancedSettings.query.allowWildcardsTitle": "在查询中允许前导通配符", - "kbn.advancedSettings.query.queryStringOptions.optionsLinkText": "选项", - "kbn.advancedSettings.query.queryStringOptionsText": "lucene 查询字符串解析器的{optionsLink}。只有将“{queryLanguage}”设置为 {luceneLanguage} 时才会使用。", - "kbn.advancedSettings.query.queryStringOptionsTitle": "查询字符串选项", - "kbn.advancedSettings.searchQueryLanguageKql": "KQL", - "kbn.advancedSettings.searchQueryLanguageLucene": "Lucene", - "kbn.advancedSettings.searchQueryLanguageText": "查询栏使用的查询语言。KQL 是专门为 Kibana 打造的新型语言。", - "kbn.advancedSettings.searchQueryLanguageTitle": "查询语言", - "kbn.advancedSettings.shortenFieldsText": "缩短长字段,例如,不显示 foo.bar.baz,而显示 f.b.baz", - "kbn.advancedSettings.shortenFieldsTitle": "缩短字段", - "kbn.advancedSettings.sortOptions.optionsLinkText": "选项", - "kbn.advancedSettings.sortOptionsText": "Elasticsearch 排序参数的{optionsLink}", - "kbn.advancedSettings.sortOptionsTitle": "排序选项", "kbn.advancedSettings.storeUrlText": "URL 有时会变得过长,以使得某些浏览器无法处理。为此,我们正在测试将 URL 的各个组成部分存储在会话存储中是否会有帮助。请告知我们这样做的效果!", "kbn.advancedSettings.storeUrlTitle": "将 URL 存储在会话存储中", - "kbn.advancedSettings.suggestFilterValuesText": "将此属性设置 false 以阻止筛选编辑器建议字段的值。", - "kbn.advancedSettings.suggestFilterValuesTitle": "筛选编辑器建议值", - "kbn.advancedSettings.timepicker.last15Minutes": "过去 15 分钟", - "kbn.advancedSettings.timepicker.last1Hour": "过去 1 小时", - "kbn.advancedSettings.timepicker.last1Year": "过去 1 年", - "kbn.advancedSettings.timepicker.last24Hours": "过去 24 小时", - "kbn.advancedSettings.timepicker.last30Days": "过去 30 天", - "kbn.advancedSettings.timepicker.last30Minutes": "过去 30 分钟", - "kbn.advancedSettings.timepicker.last7Days": "过去 7 天", - "kbn.advancedSettings.timepicker.last90Days": "过去 90 天", - "kbn.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText": "接受的格式", - "kbn.advancedSettings.timepicker.quickRangesText": "要在时间选取器的“速选”部分中显示的范围列表。这应该是对象数组,每个对象包含“from”、“to”(请参阅“{acceptedFormatsLink}”)和“display”(要显示的标题)。", - "kbn.advancedSettings.timepicker.quickRangesTitle": "时间筛选速选范围", - "kbn.advancedSettings.timepicker.refreshIntervalDefaultsText": "时间筛选的默认刷新时间间隔", - "kbn.advancedSettings.timepicker.refreshIntervalDefaultsTitle": "时间筛选刷新时间间隔", - "kbn.advancedSettings.timepicker.thisWeek": "本周", "kbn.advancedSettings.timepicker.timeDefaultsText": "未使用时间筛选启动 Kibana 时要使用的时间筛选选择", "kbn.advancedSettings.timepicker.timeDefaultsTitle": "时间筛选默认值", - "kbn.advancedSettings.timepicker.today": "今日", "kbn.advancedSettings.visualization.showRegionMapWarningsText": "词无法联接到地图上的形状时,区域地图是否显示警告。", "kbn.advancedSettings.visualization.showRegionMapWarningsTitle": "显示区域地图警告", "kbn.advancedSettings.visualization.tileMap.maxPrecision.cellDimensionsLinkText": "单元格维度的解释", @@ -2178,8 +2178,8 @@ "kbn.advancedSettings.visualization.tileMap.wmsDefaults.propertiesLinkText": "属性", "kbn.advancedSettings.visualization.tileMap.wmsDefaultsText": "坐标地图中 WMS 地图服务器支持的默认{propertiesLink}", "kbn.advancedSettings.visualization.tileMap.wmsDefaultsTitle": "默认 WMS 属性", - "kbn.advancedSettings.visualizeEnableLabsText": "允许用户创建、查看和编辑实验性可视化。如果禁用,\n 仅被视为生产就绪的可视化可供用户使用。", - "kbn.advancedSettings.visualizeEnableLabsTitle": "启用实验性可视化", + "visualizations.advancedSettings.visualizeEnableLabsText": "允许用户创建、查看和编辑实验性可视化。如果禁用,\n 仅被视为生产就绪的可视化可供用户使用。", + "visualizations.advancedSettings.visualizeEnableLabsTitle": "启用实验性可视化", "kibana_legacy.bigUrlWarningNotificationMessage": "在{advancedSettingsLink}中启用“{storeInSessionStorageParam}”选项或简化屏幕视觉效果。", "kibana_legacy.bigUrlWarningNotificationMessage.advancedSettingsLinkText": "高级设置", "kibana_legacy.bigUrlWarningNotificationTitle": "URL 过长,Kibana 可能无法工作", @@ -3974,14 +3974,14 @@ "xpack.actions.serverSideErrors.unavailableLicenseErrorMessage": "操作类型 {actionTypeId} 已禁用,因为许可证信息当前不可用。", "xpack.actions.serverSideErrors.unavailableLicenseInformationErrorMessage": "操作不可用 - 许可信息当前不可用。", "xpack.actions.urlWhitelistConfigurationError": "目标 {field}“{value}”在 Kibana 配置 xpack.actions.whitelistedHosts 中未列入白名单", - "xpack.advancedUiActions.components.actionWizard.changeButton": "更改", - "xpack.advancedUiActions.customizePanelTimeRange.modal.addToPanelButtonTitle": "添加到面板", - "xpack.advancedUiActions.customizePanelTimeRange.modal.cancelButtonTitle": "取消", - "xpack.advancedUiActions.customizePanelTimeRange.modal.optionsMenuForm.panelTitleFormRowLabel": "时间范围", - "xpack.advancedUiActions.customizePanelTimeRange.modal.removeButtonTitle": "删除", - "xpack.advancedUiActions.customizePanelTimeRange.modal.updatePanelTimeRangeButtonTitle": "更新", - "xpack.advancedUiActions.customizeTimeRange.modal.headerTitle": "定制面板时间范围", - "xpack.advancedUiActions.customizeTimeRangeMenuItem.displayName": "定制时间范围", + "xpack.uiActionsEnhanced.components.actionWizard.changeButton": "更改", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.addToPanelButtonTitle": "添加到面板", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.cancelButtonTitle": "取消", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.optionsMenuForm.panelTitleFormRowLabel": "时间范围", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.removeButtonTitle": "删除", + "xpack.uiActionsEnhanced.customizePanelTimeRange.modal.updatePanelTimeRangeButtonTitle": "更新", + "xpack.uiActionsEnhanced.customizeTimeRange.modal.headerTitle": "定制面板时间范围", + "xpack.uiActionsEnhanced.customizeTimeRangeMenuItem.displayName": "定制时间范围", "xpack.alerts.alertNavigationRegistry.get.missingNavigationError": "在“{consumer}”内针对告警类型“{alertType}”的导航未注册。", "xpack.alerts.alertNavigationRegistry.register.duplicateDefaultError": "“{consumer}”内的默认导航已注册。", "xpack.alerts.alertNavigationRegistry.register.duplicateNavigationError": "在“{consumer}”内针对告警类型“{alertType}”的导航已注册。", @@ -6582,7 +6582,6 @@ "xpack.idxMgmt.indexTemplatesList.emptyPrompt.noIndexTemplatesTitle": "您尚未有任何模板", "xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesDescription": "正在加载模板……", "xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesErrorMessage": "加载模板时出错", - "xpack.idxMgmt.indexTemplatesTable.systemIndexTemplatesSwitchLabel": "包括系统模板", "xpack.idxMgmt.licenseCheckErrorMessage": "许可证检查失败", "xpack.idxMgmt.mappingsEditor.addFieldButtonLabel": "添加字段", "xpack.idxMgmt.mappingsEditor.addMultiFieldTooltipLabel": "添加多字段以使用不同的方式索引相同的字段。", @@ -7081,27 +7080,13 @@ "xpack.idxMgmt.templateCreate.loadingTemplateToCloneDescription": "正在加载要克隆的模板……", "xpack.idxMgmt.templateCreate.loadingTemplateToCloneErrorMessage": "加载要克隆的模板时出错", "xpack.idxMgmt.templateDetails.aliasesTab.noAliasesTitle": "未定义任何别名。", - "xpack.idxMgmt.templateDetails.aliasesTabTitle": "别名", - "xpack.idxMgmt.templateDetails.cloneButtonLabel": "克隆", - "xpack.idxMgmt.templateDetails.closeButtonLabel": "关闭", - "xpack.idxMgmt.templateDetails.deleteButtonLabel": "删除", - "xpack.idxMgmt.templateDetails.editButtonLabel": "编辑", - "xpack.idxMgmt.templateDetails.loadingIndexTemplateDescription": "正在加载模板……", - "xpack.idxMgmt.templateDetails.loadingIndexTemplateErrorMessage": "加载模板时出错", - "xpack.idxMgmt.templateDetails.manageButtonLabel": "管理", - "xpack.idxMgmt.templateDetails.manageContextMenuPanelTitle": "模板选项", - "xpack.idxMgmt.templateDetails.managedTemplateInfoDescription": "托管模板对内部操作至关重要。", - "xpack.idxMgmt.templateDetails.managedTemplateInfoTitle": "不允许编辑托管模板", "xpack.idxMgmt.templateDetails.mappingsTab.noMappingsTitle": "未定义任何映射。", - "xpack.idxMgmt.templateDetails.mappingsTabTitle": "映射", "xpack.idxMgmt.templateDetails.settingsTab.noSettingsTitle": "未定义任何设置。", - "xpack.idxMgmt.templateDetails.settingsTabTitle": "设置", "xpack.idxMgmt.templateDetails.summaryTab.ilmPolicyDescriptionListTitle": "ILM 策略", "xpack.idxMgmt.templateDetails.summaryTab.indexPatternsDescriptionListTitle": "索引{numIndexPatterns, plural, one {模式} other {模式}}", "xpack.idxMgmt.templateDetails.summaryTab.noneDescriptionText": "无", "xpack.idxMgmt.templateDetails.summaryTab.orderDescriptionListTitle": "顺序", "xpack.idxMgmt.templateDetails.summaryTab.versionDescriptionListTitle": "版本", - "xpack.idxMgmt.templateDetails.summaryTabTitle": "总结", "xpack.idxMgmt.templateEdit.loadingIndexTemplateDescription": "正在加载模板……", "xpack.idxMgmt.templateEdit.loadingIndexTemplateErrorMessage": "加载模板时出错", "xpack.idxMgmt.templateEdit.managedTemplateWarningDescription": "托管模板对内部操作至关重要。", @@ -7165,26 +7150,12 @@ "xpack.idxMgmt.templateForm.stepSettings.settingsDescription": "定义索引的行为。", "xpack.idxMgmt.templateForm.stepSettings.settingsEditorHelpText": "使用 JSON 格式:{code}", "xpack.idxMgmt.templateForm.stepSettings.stepTitle": "索引设置(可选)", - "xpack.idxMgmt.templateList.table.actionCloneDescription": "克隆此模板", - "xpack.idxMgmt.templateList.table.actionCloneTitle": "克隆", - "xpack.idxMgmt.templateList.table.actionColumnTitle": "操作", - "xpack.idxMgmt.templateList.table.actionDeleteDecription": "删除此模板", - "xpack.idxMgmt.templateList.table.actionDeleteText": "删除", - "xpack.idxMgmt.templateList.table.actionEditDecription": "编辑此模板", - "xpack.idxMgmt.templateList.table.actionEditText": "编辑", - "xpack.idxMgmt.templateList.table.aliasesColumnTitle": "别名", - "xpack.idxMgmt.templateList.table.createTemplatesButtonLabel": "创建模板", - "xpack.idxMgmt.templateList.table.deleteManagedTemplateTooltip": "您无法删除托管模板。", - "xpack.idxMgmt.templateList.table.deleteTemplatesButtonLabel": "删除{count, plural, one {模板} other {模板} }", "xpack.idxMgmt.templateList.table.ilmPolicyColumnDescription": "“{policyName}”索引生命周期策略", "xpack.idxMgmt.templateList.table.ilmPolicyColumnTitle": "ILM 策略", "xpack.idxMgmt.templateList.table.indexPatternsColumnTitle": "索引模式", - "xpack.idxMgmt.templateList.table.mappingsColumnTitle": "映射", "xpack.idxMgmt.templateList.table.nameColumnTitle": "名称", "xpack.idxMgmt.templateList.table.noIndexTemplatesMessage": "未找到任何索引模板", - "xpack.idxMgmt.templateList.table.orderColumnTitle": "顺序", "xpack.idxMgmt.templateList.table.reloadTemplatesButtonLabel": "重新加载", - "xpack.idxMgmt.templateList.table.settingsColumnTitle": "设置", "xpack.idxMgmt.templateValidation.indexPatternsRequiredError": "至少需要一个索引模式。", "xpack.idxMgmt.templateValidation.templateNameInvalidaCharacterError": "模板名称不得包含字符“{invalidChar}”", "xpack.idxMgmt.templateValidation.templateNameLowerCaseRequiredError": "模板名称必须小写。", @@ -13432,1531 +13403,1531 @@ "xpack.server.checkLicense.errorExpiredMessage": "您不能使用 {pluginName},因为您的{licenseType}许可证已过期", "xpack.server.checkLicense.errorUnavailableMessage": "您不能使用 {pluginName},因为许可证信息当前不可用。", "xpack.server.checkLicense.errorUnsupportedMessage": "您的{licenseType}许可证不支持 {pluginName}。请升级您的许可证。", - "xpack.siem.add_filter_to_global_search_bar.filterForValueHoverAction": "筛留值", - "xpack.siem.add_filter_to_global_search_bar.filterOutValueHoverAction": "筛除值", - "xpack.siem.alertsView.alertsDocumentType": "外部告警", - "xpack.siem.alertsView.alertsGraphTitle": "外部告警计数", - "xpack.siem.alertsView.alertsStackByOptions.module": "模块", - "xpack.siem.alertsView.alertsTableTitle": "外部告警", - "xpack.siem.alertsView.categoryLabel": "类别", - "xpack.siem.alertsView.errorFetchingAlertsData": "无法查询告警数据", - "xpack.siem.alertsView.moduleLabel": "模块", - "xpack.siem.alertsView.showing": "显示", - "xpack.siem.alertsView.totalCountOfAlerts": "个外部告警匹配搜索条件", - "xpack.siem.alertsView.unit": "个外部{totalCount, plural, =1 {告警} other {告警}}", - "xpack.siem.andOrBadge.and": "AND", - "xpack.siem.andOrBadge.or": "OR", - "xpack.siem.anomaliesTable.table.anomaliesDescription": "异常", - "xpack.siem.anomaliesTable.table.anomaliesTooltip": "异常表无法通过 SIEM 全局 KQL 搜索进行筛选。", - "xpack.siem.anomaliesTable.table.showingDescription": "显示", - "xpack.siem.anomaliesTable.table.unit": "{totalCount, plural, =1 {个异常} other {个异常}}", - "xpack.siem.auditd.abortedAuditStartupDescription": "已中止审计启动", - "xpack.siem.auditd.accessErrorDescription": "访问错误", - "xpack.siem.auditd.accessPermissionDescription": "访问权限", - "xpack.siem.auditd.accessResultDescription": "访问结果", - "xpack.siem.auditd.acquiredCredentialsDescription": "已获得凭据 - 至", - "xpack.siem.auditd.adddedGroupAccountUsingDescription": "已添加组帐户 - 使用", - "xpack.siem.auditd.addedUserAccountDescription": "已添加用户帐户", - "xpack.siem.auditd.allocatedMemoryForDescription": "已分配内存 - 为", - "xpack.siem.auditd.asDescription": "作为", - "xpack.siem.auditd.assignedUserRoleToDescription": "已将用户角色分配给", - "xpack.siem.auditd.assignedVmIdDescription": "已分配 vm id", - "xpack.siem.auditd.assignedVMResourceDescription": "已分配 vm 资源", - "xpack.siem.auditd.attemptedLoginDescription": "已尝试登录 - 通过", - "xpack.siem.auditd.attemptedLoginFromUnusalPlaceDescription": "尝试异常位置的登录", - "xpack.siem.auditd.attemptedLoginFromUnusualHourDescription": "尝试异常时段的登录", - "xpack.siem.auditd.auditErrorDescription": "审计错误", - "xpack.siem.auditd.authenticatedToGroupDescription": "已验证到组", - "xpack.siem.auditd.authenticatedUsingDescription": "已验证 - 使用", - "xpack.siem.auditd.bootedSystemDescription": "已启动系统", - "xpack.siem.auditd.boundSocketFromDescription": "绑定套接字 - 来自", - "xpack.siem.auditd.causedMacPolicyErrorDescription": "已导致 mac 策略错误", - "xpack.siem.auditd.changedAuditConfigurationDescription": "已更改审计配置", - "xpack.siem.auditd.changedAuditFeatureDescription": "已更改审计功能", - "xpack.siem.auditd.changedConfigurationWIthDescription": "已更改配置", - "xpack.siem.auditd.ChangedFileAttributesOfDescription": "已更改文件属性 -", - "xpack.siem.auditd.changedFilePermissionOfDescription": "已更改文件权限 -", - "xpack.siem.auditd.changedGroupDescription": "已更改组", - "xpack.siem.auditd.changedGroupPasswordDescription": "已更改组密码", - "xpack.siem.auditd.changedIdentityUsingDescription": "已更改身份 - 使用", - "xpack.siem.auditd.changedLoginIdToDescription": "已将登录 id 更改为", - "xpack.siem.auditd.changedMacConfigurationDescription": "已更改 mac 配置", - "xpack.siem.auditd.changedPasswordWithDescription": "已更改密码 -", - "xpack.siem.auditd.changedRoleUsingDescription": "已更改角色 - 使用", - "xpack.siem.auditd.changedSeLinuxBooleanDescription": "已更改 selinux 布尔值", - "xpack.siem.auditd.changedSelinuxEnforcementDescription": "已 更改 selinux 强制", - "xpack.siem.auditd.changedSystemNameDescription": "已更改系统名称", - "xpack.siem.auditd.changedSystemTimeWithDescription": "已更改系统时间 -", - "xpack.siem.auditd.changedTimeStampOfDescription": "已更改时间戳 -", - "xpack.siem.auditd.changedToRunLevelWithDescription": "已更改到运行级别 -", - "xpack.siem.auditd.changedUserIdDescription": "已更改用户 id", - "xpack.siem.auditd.changeidleOwernshipOfDescription": "已更改文件所有权 -", - "xpack.siem.auditd.checkedFileSystemMetadataOfDescription": "已检查文件系统元数据 -", - "xpack.siem.auditd.checkedIntegrityOfDescription": "已更改完整性 -", - "xpack.siem.auditd.chedckedMetaDataOfDescription": "已更改元数据 -", - "xpack.siem.auditd.connectedUsingDescription": "已连接 - 使用", - "xpack.siem.auditd.crashedProgramDescription": "已崩溃程序", - "xpack.siem.auditd.createdDirectoryDescription": "已创建目录", - "xpack.siem.auditd.createdVmImageDescription": "已创建 vm 映像", - "xpack.siem.auditd.cryptoOfficerLoggedInDescription": "加密员已登录", - "xpack.siem.auditd.cryptoOfficerLoggedOutDescription": "加密员已注销", - "xpack.siem.auditd.deletedDescription": "已删除", - "xpack.siem.auditd.deletedGroupAccountUsingDescription": "已删除组帐户 - 使用", - "xpack.siem.auditd.deletedUserAccountUsingDescription": "已删除用户帐户 - 使用", - "xpack.siem.auditd.deletedVmImageDescription": "已删除 vm 映像", - "xpack.siem.auditd.disposedCredentialsDescription": "已将凭据处置到", - "xpack.siem.auditd.endedFromDescription": "结束自", - "xpack.siem.auditd.errorFromDescription": "错误来自", - "xpack.siem.auditd.executedDescription": "已执行", - "xpack.siem.auditd.executionOfForbiddenProgramDescription": "已禁止程序的执行", - "xpack.siem.auditd.failedLoginTooManyTimesDescription": "由于登录次数过多,登录失败", - "xpack.siem.auditd.inDescription": "传入", - "xpack.siem.auditd.initializedAuditSubsystemDescription": "已初始化审计子系统", - "xpack.siem.auditd.issuedVmControlDescription": "已签发 vm 控制", - "xpack.siem.auditd.killedProcessIdDescription": "已终止进程 id -", - "xpack.siem.auditd.ListeningForConnectionsUsingDescription": "正在侦听连接 - 使用", - "xpack.siem.auditd.loadedFirewallRuleDescription": "已加载防火墙规则", - "xpack.siem.auditd.loadedMacPolicyDescription": "已加载 mac 策略", - "xpack.siem.auditd.loadedSeLinuxPolicyDescription": "已加载 selinux 策略", - "xpack.siem.auditd.loaedKernelModuleOfDescription": "已加载内核模块 -", - "xpack.siem.auditd.lockedAccountDescription": "已锁定帐户", - "xpack.siem.auditd.loggedOutDescription": "已注销", - "xpack.siem.auditd.macPermissionDescription": "mac 权限", - "xpack.siem.auditd.madeDeviceWithDescription": "已制作设备 -", - "xpack.siem.auditd.migratedVmFromDescription": "已迁移 vm - 从", - "xpack.siem.auditd.migratedVmToDescription": "已将 vm 迁移至", - "xpack.siem.auditd.modifiedGroupAccountDescription": "已修改组帐户", - "xpack.siem.auditd.modifiedLevelOfDescription": "已修改级别 -", - "xpack.siem.auditd.modifiedRoleDescription": "已修改角色", - "xpack.siem.auditd.modifiedUserAccountDescription": "已修改用户帐户", - "xpack.siem.auditd.mountedDescription": "已安装", - "xpack.siem.auditd.negotiatedCryptoKeyDescription": "已协商加密密钥", - "xpack.siem.auditd.nonExistentDescription": "至未知进程", - "xpack.siem.auditd.OpenedFileDescription": "已打开文件", - "xpack.siem.auditd.openedTooManySessionsDescription": "已打开过多会话", - "xpack.siem.auditd.overrodeLabelOfDescription": "已覆盖标签 -", - "xpack.siem.auditd.promiscuousModeDescription": "已更改设备上的混杂模式 - 使用", - "xpack.siem.auditd.ranCommandDescription": "已运行命令", - "xpack.siem.auditd.receivedFromDescription": "已接收 - 从", - "xpack.siem.auditd.reconfiguredAuditDescription": "已重新配置审计", - "xpack.siem.auditd.refreshedCredentialsForDescription": "已刷新凭据 -", - "xpack.siem.auditd.relabeledFileSystemDescription": "已重新标记文件系统", - "xpack.siem.auditd.remoteAuditConnectedDescription": "远程审计已连接", - "xpack.siem.auditd.remoteAuditDisconnectedDescription": "远程审计已断开连接", - "xpack.siem.auditd.removedUserRoleFromDescription": "已移除用户角色 - 从", - "xpack.siem.auditd.renamedDescription": "已重命名", - "xpack.siem.auditd.resumedAuditLoggingDescription": "已恢复审计日志记录", - "xpack.siem.auditd.rotatedAuditLogsDescription": "rotated-audit-logs", - "xpack.siem.auditd.scheduledPolicyOFDescription": "已排定策略 -", - "xpack.siem.auditd.sentMessageDescription": "已发送消息", - "xpack.siem.auditd.sentTestDescription": "已发送测试", - "xpack.siem.auditd.sentToDescription": "已发送至", - "xpack.siem.auditd.sessionDescription": "会话", - "xpack.siem.auditd.shutDownAuditDescription": "关闭审计", - "xpack.siem.auditd.shutdownSystemDescription": "关闭系统", - "xpack.siem.auditd.startedAtDescription": "已启动", - "xpack.siem.auditd.startedAuditDescription": "已启动审计", - "xpack.siem.auditd.startedCryptoSessionDescription": "已启动加密会话", - "xpack.siem.auditd.startedServiceDescription": "已启动服务", - "xpack.siem.auditd.stoppedServiceDescription": "已停止服务", - "xpack.siem.auditd.suspiciousProgramDescription": "已使用可疑程序", - "xpack.siem.auditd.symLinkedDescription": "已象征性链接", - "xpack.siem.auditd.testedFileSystemIntegrityDescription": "已测试文件系统完整性", - "xpack.siem.auditd.unknownDescription": "未知", - "xpack.siem.auditd.unloadedKernelModuleOfDescription": "已加载内核模块", - "xpack.siem.auditd.unlockedAccountDescription": "已解锁帐户", - "xpack.siem.auditd.unmountedDescription": "已卸载", - "xpack.siem.auditd.usingDescription": "使用", - "xpack.siem.auditd.violatedAppArmorPolicyFromDescription": "已违反应用防护策略 - 来自", - "xpack.siem.auditd.violatedSeccompPolicyWithDescription": "已违反 seccomp 策略 -", - "xpack.siem.auditd.violatedSeLinuxPolicyDescription": "已违反 selinux 策略", - "xpack.siem.auditd.wasAuthorizedToUseDescription": "有权使用", - "xpack.siem.auditd.withResultDescription": ",结果为", - "xpack.siem.authenticationsTable.authenticationFailures": "身份验证", - "xpack.siem.authenticationsTable.failures": "失败", - "xpack.siem.authenticationsTable.lastFailedDestination": "上一失败目标", - "xpack.siem.authenticationsTable.lastFailedSource": "上一失败源", - "xpack.siem.authenticationsTable.lastFailedTime": "上次失败", - "xpack.siem.authenticationsTable.lastSuccessfulDestination": "上一成功目标", - "xpack.siem.authenticationsTable.lastSuccessfulSource": "上一成功源", - "xpack.siem.authenticationsTable.lastSuccessfulTime": "上次成功", - "xpack.siem.authenticationsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.authenticationsTable.successes": "成功", - "xpack.siem.authenticationsTable.uncommonProcessTable": "不常见进程", - "xpack.siem.authenticationsTable.unit": "{totalCount, plural, =1 {个用户} other {个用户}}", - "xpack.siem.authenticationsTable.user": "用户", - "xpack.siem.case.allCases.actions": "操作", - "xpack.siem.case.allCases.comments": "注释", - "xpack.siem.case.allCases.noTagsAvailable": "没有可用标记", - "xpack.siem.case.caseSavedObjectNoPermissionsMessage": "要查看案例,必须对 Kibana 工作区中的已保存对象管理功能有权限。有关详细信息,请联系您的 Kibana 管理员。", - "xpack.siem.case.caseSavedObjectNoPermissionsTitle": "需要 Kibana 功能权限", - "xpack.siem.case.caseTable.addNewCase": "添加新案例", - "xpack.siem.case.caseTable.bulkActions": "批处理操作", - "xpack.siem.case.caseTable.bulkActions.closeSelectedTitle": "关闭选定", - "xpack.siem.case.caseTable.bulkActions.deleteSelectedTitle": "删除选定", - "xpack.siem.case.caseTable.bulkActions.openSelectedTitle": "重新打开选定", - "xpack.siem.case.caseTable.caseDetailsLinkAria": "单击以访问标题为 {detailName} 的案例", - "xpack.siem.case.caseTable.closed": "已关闭", - "xpack.siem.case.caseTable.closedCases": "已关闭案例", - "xpack.siem.case.caseTable.delete": "删除", - "xpack.siem.case.caseTable.incidentSystem": "事件管理系统", - "xpack.siem.case.caseTable.noCases.body": "没有可显示的案例。请创建新案例或在上面更改您的筛选设置。", - "xpack.siem.case.caseTable.noCases.title": "无案例", - "xpack.siem.case.caseTable.notPushed": "未推送", - "xpack.siem.case.caseTable.openCases": "未结案例", - "xpack.siem.case.caseTable.refreshTitle": "刷新", - "xpack.siem.case.caseTable.requiresUpdate": " 需要更新", - "xpack.siem.case.caseTable.searchAriaLabel": "搜索案例", - "xpack.siem.case.caseTable.searchPlaceholder": "例如案例名", - "xpack.siem.case.caseTable.selectedCasesTitle": "已选择 {totalRules} 个{totalRules, plural, =1 {案例} other {案例}}", - "xpack.siem.case.caseTable.serviceNowLinkAria": "单击可在 servicenow 上查看该事件", - "xpack.siem.case.caseTable.showingCasesTitle": "正在显示 {totalRules} 个{totalRules, plural, =1 {案例} other {案例}}", - "xpack.siem.case.caseTable.snIncident": "外部事件", - "xpack.siem.case.caseTable.unit": "{totalCount, plural, =1 {案例} other {案例}}", - "xpack.siem.case.caseTable.upToDate": " 是最新的", - "xpack.siem.case.caseView.actionHeadline": "{userName} 在 {actionDate}{actionName}", - "xpack.siem.case.caseView.actionLabel.addComment": "添加了注释", - "xpack.siem.case.caseView.actionLabel.addDescription": "添加了描述", - "xpack.siem.case.caseView.actionLabel.addedField": "添加了", - "xpack.siem.case.caseView.actionLabel.changededField": "更改了", - "xpack.siem.case.caseView.actionLabel.editedField": "编辑了", - "xpack.siem.case.caseView.actionLabel.on": "在", - "xpack.siem.case.caseView.actionLabel.pushedNewIncident": "已推送为新事件", - "xpack.siem.case.caseView.actionLabel.removedField": "移除了", - "xpack.siem.case.caseView.actionLabel.removedThirdParty": "已移除外部事件管理系统", - "xpack.siem.case.caseView.actionLabel.selectedThirdParty": "已选择 { thirdParty } 作为事件管理系统", - "xpack.siem.case.caseView.actionLabel.updateIncident": "更新了事件", - "xpack.siem.case.caseView.actionLabel.viewIncident": "查看 {incidentNumber}", - "xpack.siem.case.caseView.alreadyPushedToExternalService": "已推送到 { externalService } 事件", - "xpack.siem.case.caseView.backLabel": "返回到案例", - "xpack.siem.case.caseView.breadcrumb": "创建", - "xpack.siem.case.caseView.cancel": "取消", - "xpack.siem.case.caseView.case": "案例", - "xpack.siem.case.caseView.caseClosed": "案例已关闭", - "xpack.siem.case.caseView.caseName": "案例名称", - "xpack.siem.case.caseView.caseOpened": "案例已打开", - "xpack.siem.case.caseView.caseRefresh": "刷新案例", - "xpack.siem.case.caseView.closeCase": "关闭案例", - "xpack.siem.case.caseView.closedCase": "已关闭案例", - "xpack.siem.case.caseView.closedOn": "关闭时间", - "xpack.siem.case.caseView.cloudDeploymentLink": "云部署", - "xpack.siem.case.caseView.comment": "注释", - "xpack.siem.case.caseView.comment.addComment": "添加注释", - "xpack.siem.case.caseView.comment.addCommentHelpText": "添加新注释......", - "xpack.siem.case.caseView.commentFieldRequiredError": "注释必填。", - "xpack.siem.case.caseView.connectorConfigureLink": "连接器", - "xpack.siem.case.caseView.connectors": "外部事件管理系统", - "xpack.siem.case.caseView.copyCommentLinkAria": "复制引用链接", - "xpack.siem.case.caseView.create": "创建新案例", - "xpack.siem.case.caseView.createCase": "创建案例", - "xpack.siem.case.caseView.description": "描述", - "xpack.siem.case.caseView.description.save": "保存", - "xpack.siem.case.caseView.edit": "编辑", - "xpack.siem.case.caseView.edit.comment": "编辑注释", - "xpack.siem.case.caseView.edit.description": "编辑描述", - "xpack.siem.case.caseView.edit.quote": "引述", - "xpack.siem.case.caseView.editActionsLinkAria": "单击可查看所有操作", - "xpack.siem.case.caseView.editConnector": "更改外部事件管理系统", - "xpack.siem.case.caseView.editTagsLinkAria": "单击可编辑标记", - "xpack.siem.case.caseView.emailBody": "案例参考:{caseUrl}", - "xpack.siem.case.caseView.emailSubject": "SIEM 案例 - {caseTitle}", - "xpack.siem.case.caseView.errorsPushServiceCallOutTitle": "要将案例发送到外部系统,您需要:", - "xpack.siem.case.caseView.fieldRequiredError": "必填字段", - "xpack.siem.case.caseView.goToDocumentationButton": "查看文档", - "xpack.siem.case.caseView.moveToCommentAria": "高亮显示引用的注释", - "xpack.siem.case.caseView.name": "名称", - "xpack.siem.case.caseView.noReportersAvailable": "没有报告者。", - "xpack.siem.case.caseView.noTags": "当前没有为此案例分配标记。", - "xpack.siem.case.caseView.openedOn": "打开时间", - "xpack.siem.case.caseView.optional": "可选", - "xpack.siem.case.caseView.pageBadgeLabel": "公测版", - "xpack.siem.case.caseView.pageBadgeTooltip": "案例工作流仍为公测版。请通过在 Kibana 存储库中报告问题或错误,帮助我们改进产品。", - "xpack.siem.case.caseView.particpantsLabel": "参与者", - "xpack.siem.case.caseView.pushNamedIncident": "推送为 { thirdParty } 事件", - "xpack.siem.case.caseView.pushThirdPartyIncident": "推送为第三方事件", - "xpack.siem.case.caseView.pushToServiceDisableBecauseCaseClosedDescription": "关闭的案例无法发送到外部系统。如果希望在外部系统中打开或更新案例,请重新打开案例。", - "xpack.siem.case.caseView.pushToServiceDisableBecauseCaseClosedTitle": "重新打开案例", - "xpack.siem.case.caseView.pushToServiceDisableByConfigDescription": "kibana.yml 文件已配置为仅允许特定连接器。要在外部系统中打开案例,请将 .servicenow 添加到 xpack.actions.enabledActiontypes 设置。有关更多信息,请参阅 {link}。", - "xpack.siem.case.caseView.pushToServiceDisableByConfigTitle": "在 Kibana 配置文件中启用 ServiceNow", - "xpack.siem.case.caseView.pushToServiceDisableByLicenseDescription": "要在外部系统中打开案例,必须将许可证更新到白金级,开始为期 30 天的免费试用,或在 AWS、GCP 或 Azure 上快速部署 {link}。", - "xpack.siem.case.caseView.pushToServiceDisableByLicenseTitle": "升级到 Elastic 白金级", - "xpack.siem.case.caseView.pushToServiceDisableByNoCaseConfigTitle": "选择外部连接器", - "xpack.siem.case.caseView.pushToServiceDisableByNoConfigTitle": "配置外部连接器", - "xpack.siem.case.caseView.reopenCase": "重新打开案例", - "xpack.siem.case.caseView.reopenedCase": "重新打开的案例", - "xpack.siem.case.caseView.reporterLabel": "报告者", - "xpack.siem.case.caseView.requiredUpdateToExternalService": "需要更新 { externalService } 事件", - "xpack.siem.case.caseView.sendEmalLinkAria": "单击可向 {user} 发送电子邮件", - "xpack.siem.case.caseView.statusLabel": "状态", - "xpack.siem.case.caseView.tags": "标记", - "xpack.siem.case.caseView.to": "到", - "xpack.siem.case.caseView.unknown": "未知", - "xpack.siem.case.caseView.updateNamedIncident": "更新 { thirdParty } 事件", - "xpack.siem.case.caseView.updateThirdPartyIncident": "更新第三方事件", - "xpack.siem.case.configure.errorPushingToService": "推送到服务时出错", - "xpack.siem.case.configure.successSaveToast": "已保存外部连接设置", - "xpack.siem.case.configureCases.addNewConnector": "添加新连接器", - "xpack.siem.case.configureCases.cancelButton": "取消", - "xpack.siem.case.configureCases.caseClosureOptionsClosedIncident": "在外部系统中关闭事件时自动关闭 SIEM 案例", - "xpack.siem.case.configureCases.caseClosureOptionsDesc": "定义关闭 SIEM 案例的方式。要自动关闭案例,需要与外部事件管理系统建立连接。", - "xpack.siem.case.configureCases.caseClosureOptionsLabel": "案例关闭选项", - "xpack.siem.case.configureCases.caseClosureOptionsManual": "手动关闭 SIEM 案例", - "xpack.siem.case.configureCases.caseClosureOptionsNewIncident": "将新事件推送到外部系统时自动关闭 SIEM 案例", - "xpack.siem.case.configureCases.caseClosureOptionsTitle": "案例关闭", - "xpack.siem.case.configureCases.fieldMappingDesc": "将数据推送到第三方时映射 SIEM 案例字段。字段映射需要与外部事件管理系统建立连接。", - "xpack.siem.case.configureCases.fieldMappingEditAppend": "追加", - "xpack.siem.case.configureCases.fieldMappingEditNothing": "无内容", - "xpack.siem.case.configureCases.fieldMappingEditOverwrite": "覆盖", - "xpack.siem.case.configureCases.fieldMappingFirstCol": "SIEM 案例字段", - "xpack.siem.case.configureCases.fieldMappingSecondCol": "外部事件字段", - "xpack.siem.case.configureCases.fieldMappingThirdCol": "编辑和更新时", - "xpack.siem.case.configureCases.fieldMappingTitle": "字段映射", - "xpack.siem.case.configureCases.headerTitle": "配置案例", - "xpack.siem.case.configureCases.incidentManagementSystemDesc": "您可能会根据需要将 SIEM 案例连接到选择的外部事件管理系统。这将允许您将案例数据作为事件推送到所选第三方系统。", - "xpack.siem.case.configureCases.incidentManagementSystemLabel": "事件管理系统", - "xpack.siem.case.configureCases.incidentManagementSystemTitle": "连接到外部事件管理系统", - "xpack.siem.case.configureCases.mappingFieldComments": "注释", - "xpack.siem.case.configureCases.mappingFieldDescription": "描述", - "xpack.siem.case.configureCases.mappingFieldNotMapped": "未映射", - "xpack.siem.case.configureCases.mappingFieldShortDescription": "简短描述", - "xpack.siem.case.configureCases.mappingFieldSummary": "摘要", - "xpack.siem.case.configureCases.noConnector": "未选择连接器", - "xpack.siem.case.configureCases.updateConnector": "更新连接器", - "xpack.siem.case.configureCases.updateSelectedConnector": "更新 { connectorName }", - "xpack.siem.case.configureCases.warningMessage": "选定的连接器已删除。选择不同的连接器或创建新的连接器。", - "xpack.siem.case.configureCases.warningTitle": "警告", - "xpack.siem.case.configureCasesButton": "编辑外部连接", - "xpack.siem.case.confirmDeleteCase.confirmQuestion": "通过删除此案例,将会永久移除所有相关案例数据,您将无法再将数据推送到外部事件管理系统。是否确定要继续?", - "xpack.siem.case.confirmDeleteCase.confirmQuestionPlural": "通过删除这些案例,将会永久移除所有相关案例数据,您将无法再将数据推送到外部事件管理系统。是否确定要继续?", - "xpack.siem.case.confirmDeleteCase.deleteCase": "删除案例", - "xpack.siem.case.confirmDeleteCase.deleteCases": "删除案例", - "xpack.siem.case.confirmDeleteCase.deleteTitle": "删除“{caseTitle}”", - "xpack.siem.case.confirmDeleteCase.selectedCases": "删除选定案例", - "xpack.siem.case.connectors.common.apiTokenTextFieldLabel": "Api 令牌", - "xpack.siem.case.connectors.common.apiUrlTextFieldLabel": "URL", - "xpack.siem.case.connectors.common.emailTextFieldLabel": "电子邮件", - "xpack.siem.case.connectors.common.invalidApiUrlTextField": "URL 无效", - "xpack.siem.case.connectors.common.passwordTextFieldLabel": "密码", - "xpack.siem.case.connectors.common.requiredApiTokenTextField": "“Api 令牌”必填", - "xpack.siem.case.connectors.common.requiredApiUrlTextField": "“URL”必填", - "xpack.siem.case.connectors.common.requiredEmailTextField": "“URL”必填", - "xpack.siem.case.connectors.common.requiredPasswordTextField": "“密码”必填", - "xpack.siem.case.connectors.common.requiredUsernameTextField": "“用户名”必填", - "xpack.siem.case.connectors.common.usernameTextFieldLabel": "用户名", - "xpack.siem.case.connectors.jira.actionTypeTitle": "Jira", - "xpack.siem.case.connectors.jira.projectKey": "项目键", - "xpack.siem.case.connectors.jira.requiredProjectKeyTextField": "项目键必填。", - "xpack.siem.case.connectors.jira.selectMessageText": "将 SIEM 案例数据推送或更新到 Jira 中的新问题", - "xpack.siem.case.connectors.servicenow.actionTypeTitle": "ServiceNow", - "xpack.siem.case.connectors.servicenow.selectMessageText": "将 SIEM 案例数据推送或更新到 ServiceNow 中的新事件", - "xpack.siem.case.createCase.descriptionFieldRequiredError": "描述必填。", - "xpack.siem.case.createCase.fieldTagsHelpText": "为此案例键入一个或多个定制识别标记。在每个标记后按 Enter 键可开始新的标记。", - "xpack.siem.case.createCase.titleFieldRequiredError": "标题必填。", - "xpack.siem.case.dismissErrorsPushServiceCallOutTitle": "关闭", - "xpack.siem.case.pageTitle": "案例", - "xpack.siem.case.readOnlySavedObjectDescription": "您仅有权查看案例。如果需要创建和更新案例,请联系您的 Kibana 管理员", - "xpack.siem.case.readOnlySavedObjectTitle": "您具有只读功能权限", - "xpack.siem.certificate.fingerprint.clientCertLabel": "客户端证书", - "xpack.siem.certificate.fingerprint.serverCertLabel": "服务器证书", - "xpack.siem.chart.allOthersGroupingLabel": "所有其他", - "xpack.siem.chart.dataAllValuesZerosTitle": "所有值返回零", - "xpack.siem.chart.dataNotAvailableTitle": "图表数据不可用", - "xpack.siem.chrome.help.appName": "SIEM", - "xpack.siem.chrome.helpMenu.documentation": "SIEM 文档", - "xpack.siem.chrome.helpMenu.documentation.ecs": "ECS 文档", - "xpack.siem.clipboard.copied": "已复制", - "xpack.siem.clipboard.copy": "复制", - "xpack.siem.clipboard.copy.to.the.clipboard": "复制到剪贴板", - "xpack.siem.clipboard.to.the.clipboard": "至剪贴板", - "xpack.siem.components.embeddables.embeddedMap.clientLayerLabel": "客户端点", - "xpack.siem.components.embeddables.embeddedMap.destinationLayerLabel": "目标点", - "xpack.siem.components.embeddables.embeddedMap.embeddableHeaderHelp": "地图配置帮助", - "xpack.siem.components.embeddables.embeddedMap.embeddableHeaderTitle": "网络地图", - "xpack.siem.components.embeddables.embeddedMap.embeddablePanelTitle": "源 -> 目标点对点地图", - "xpack.siem.components.embeddables.embeddedMap.errorConfiguringEmbeddableApiTitle": "配置可嵌入 API 时出错", - "xpack.siem.components.embeddables.embeddedMap.errorCreatingMapEmbeddableTitle": "创建地图可嵌入对象时出错", - "xpack.siem.components.embeddables.embeddedMap.lineLayerLabel": "折线图", - "xpack.siem.components.embeddables.embeddedMap.serverLayerLabel": "服务器点", - "xpack.siem.components.embeddables.embeddedMap.sourceLayerLabel": "源点", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel": "配置索引模式", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorDescription1": "要显示地图数据,必须使用匹配的全局模式定义 SIEM 索引 ({defaultIndex}) 和 Kibana 索引模式。使用 {beats} 时,可以在主机上运行 {setup} 命令,以自动创建索引模式。例如:{example}。", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorDescription2": "还可以在 Kibana 中配置索引模式。", - "xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorTitle": "未配置所需的索引模式", - "xpack.siem.components.embeddables.mapToolTip.errorTitle": "加载地图特征时出错", - "xpack.siem.components.embeddables.mapToolTip.filterForValueHoverAction": "筛留值", - "xpack.siem.components.embeddables.mapToolTip.footerLabel": "{currentFeature} / {totalFeatures} {totalFeatures, plural, =1 {feature} other {features}}", - "xpack.siem.components.embeddables.mapToolTip.lineContent.clientLabel": "客户端", - "xpack.siem.components.embeddables.mapToolTip.lineContent.destinationLabel": "目标", - "xpack.siem.components.embeddables.mapToolTip.lineContent.serverLabel": "服务器", - "xpack.siem.components.embeddables.mapToolTip.lineContent.sourceLabel": "源", - "xpack.siem.components.embeddables.mapToolTip.pointContent.asnTitle": "ASN", - "xpack.siem.components.embeddables.mapToolTip.pointContent.clientDomainTitle": "客户端域", - "xpack.siem.components.embeddables.mapToolTip.pointContent.clientIPTitle": "客户端 IP", - "xpack.siem.components.embeddables.mapToolTip.pointContent.destinationDomainTitle": "目标域", - "xpack.siem.components.embeddables.mapToolTip.pointContent.destinationIPTitle": "目标 IP", - "xpack.siem.components.embeddables.mapToolTip.pointContent.hostTitle": "主机", - "xpack.siem.components.embeddables.mapToolTip.pointContent.locationTitle": "位置", - "xpack.siem.components.embeddables.mapToolTip.pointContent.serverDomainTitle": "服务器域", - "xpack.siem.components.embeddables.mapToolTip.pointContent.serverIPTitle": "服务器 IP", - "xpack.siem.components.embeddables.mapToolTip.pointContent.sourceDomainTitle": "源域", - "xpack.siem.components.embeddables.mapToolTip.pointContent.sourceIPTitle": "源 IP", - "xpack.siem.components.flowControls.selectFlowDirection.bidirectionalButtonLabel": "双向", - "xpack.siem.components.flowControls.selectFlowDirection.unidirectionalButtonLabel": "单向", - "xpack.siem.components.flowControls.selectFlowTarget.clientDropDownOptionLabel": "客户端", - "xpack.siem.components.flowControls.selectFlowTarget.destinationDropDownOptionLabel": "目标", - "xpack.siem.components.flowControls.selectFlowTarget.serverDropDownOptionLabel": "服务器", - "xpack.siem.components.flowControls.selectFlowTarget.sourceDropDownOptionLabel": "源", - "xpack.siem.components.histogram.stackByOptions.stackByLabel": "堆叠依据", - "xpack.siem.components.ml.anomaly.errors.anomaliesTableFetchFailureTitle": "异常表提取失败", - "xpack.siem.components.ml.api.errors.networkErrorFailureTitle": "网络错误:", - "xpack.siem.components.ml.api.errors.statusCodeFailureTitle": "状态代码:", - "xpack.siem.components.ml.permissions.errors.machineLearningPermissionsFailureTitle": "Machine Learning 权限错误", - "xpack.siem.components.mlJobSelect.machineLearningLink": "Machine Learning", - "xpack.siem.components.mlPopover.jobsTable.filters.groupsLabel": "组", - "xpack.siem.components.mlPopover.jobsTable.filters.noGroupsAvailableDescription": "没有可用的组", - "xpack.siem.components.mlPopover.jobsTable.filters.searchFilterPlaceholder": "例如 rare_process_linux", - "xpack.siem.components.mlPopover.jobsTable.filters.showAllJobsLabel": "Elastic 作业", - "xpack.siem.components.mlPopover.jobsTable.filters.showSiemJobsLabel": "定制作业", - "xpack.siem.components.mlPopup.anomalyDetectionDescription": "运行下面的任意 Machine Learning 作业以准备创建将产生已检测异常信号的信号检测规则以及查看整个 SIEM 应用程序内的异常事件。我们提供一系列常见检测作业帮助您入门。如果您希望添加自己的定制 ML 作业,请从 {machineLearning} 应用程序中创建并将它们添加到“SIEM”组。", - "xpack.siem.components.mlPopup.cloudLink": "云部署", - "xpack.siem.components.mlPopup.errors.createJobFailureTitle": "创建作业失败", - "xpack.siem.components.mlPopup.errors.startJobFailureTitle": "启动作业失败", - "xpack.siem.components.mlPopup.hooks.errors.indexPatternFetchFailureTitle": "索引模式提取失败", - "xpack.siem.components.mlPopup.hooks.errors.siemJobFetchFailureTitle": "SIEM 作业提取失败", - "xpack.siem.components.mlPopup.jobsTable.createCustomJobButtonLabel": "创建定制作业", - "xpack.siem.components.mlPopup.jobsTable.jobNameColumn": "作业名称", - "xpack.siem.components.mlPopup.jobsTable.noItemsDescription": "未找到任何 SIEM Machine Learning 作业", - "xpack.siem.components.mlPopup.jobsTable.runJobColumn": "运行作业", - "xpack.siem.components.mlPopup.jobsTable.tagsColumn": "组", - "xpack.siem.components.mlPopup.licenseButtonLabel": "管理许可", - "xpack.siem.components.mlPopup.machineLearningLink": "Machine Learning", - "xpack.siem.components.mlPopup.mlJobSettingsButtonLabel": "ML 作业设置", - "xpack.siem.components.mlPopup.moduleNotCompatibleDescription": "我们找不到任何数据,有关 Machine Learning 作业要求的详细信息,请参阅 {mlDocs}。", - "xpack.siem.components.mlPopup.moduleNotCompatibleTitle": "{incompatibleJobCount} {incompatibleJobCount, plural, =1 {job} other {jobs}}当前不可用。", - "xpack.siem.components.mlPopup.showingLabel": "显示:{filterResultsLength} 个 {filterResultsLength, plural, one {作业} other {作业}}", - "xpack.siem.components.mlPopup.upgradeButtonLabel": "订阅选项", - "xpack.siem.components.mlPopup.upgradeDescription": "要访问 SIEM 的异常检测功能,必须将您的许可更新到白金级、开始 30 天免费试用或在 AWS、GCP 或 Azurein 实施{cloudLink}。然后便可以运行 Machine Learning 作业并查看异常。", - "xpack.siem.components.mlPopup.upgradeTitle": "升级 Elastic 白金级", - "xpack.siem.components.stepDefineRule.ruleTypeField.subscriptionsLink": "白金级订阅", - "xpack.siem.containers.anomalies.errorFetchingAnomaliesData": "无法查询异常数据", - "xpack.siem.containers.anomalies.stackByJobId": "作业", - "xpack.siem.containers.anomalies.title": "异常", - "xpack.siem.containers.case.closedCases": "已关闭 {totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases} 个案例}}", - "xpack.siem.containers.case.deletedCases": "已删除 {totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases} 个案例}}", - "xpack.siem.containers.case.errorDeletingTitle": "删除数据时出错", - "xpack.siem.containers.case.errorTitle": "提取数据时出错", - "xpack.siem.containers.case.reopenedCases": "已重新打开 {totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases} 个案例}}", - "xpack.siem.containers.case.updatedCase": "已更新“{caseTitle}”", - "xpack.siem.containers.detectionEngine.addRuleFailDescription": "无法添加规则", - "xpack.siem.containers.detectionEngine.createPrePackagedRuleFailDescription": "无法安装 elastic 的预打包规则", - "xpack.siem.containers.detectionEngine.createPrePackagedRuleSuccesDescription": "已安装 elastic 的预打包规则", - "xpack.siem.containers.detectionEngine.rules": "无法提取规则", - "xpack.siem.containers.detectionEngine.tagFetchFailDescription": "无法提取标记", - "xpack.siem.containers.errors.dataFetchFailureTitle": "数据提取失败", - "xpack.siem.containers.errors.networkFailureTitle": "网络故障", - "xpack.siem.containers.errors.stopJobFailureTitle": "停止作业失败", - "xpack.siem.dataProviders.and": "AND", - "xpack.siem.dataProviders.copyToClipboardTooltip": "复制到剪贴板", - "xpack.siem.dataProviders.deleteDataProvider": "删除", - "xpack.siem.dataProviders.dropAnything": "放置任何内容", - "xpack.siem.dataProviders.dropHere": "放在此处", - "xpack.siem.dataProviders.dropHereToAddAnLabel": "放在此处以添加", - "xpack.siem.dataProviders.edit": "编辑", - "xpack.siem.dataProviders.editMenuItem": "编辑筛选", - "xpack.siem.dataProviders.editTitle": "编辑筛选", - "xpack.siem.dataProviders.excludeDataProvider": "排除结果", - "xpack.siem.dataProviders.existsLabel": "存在", - "xpack.siem.dataProviders.fieldLabel": "字段", - "xpack.siem.dataProviders.filterForFieldPresentLabel": "筛留存在的字段", - "xpack.siem.dataProviders.hereToBuildAn": "在此处以构建", - "xpack.siem.dataProviders.highlighted": "已突出显示", - "xpack.siem.dataProviders.includeDataProvider": "包括结果", - "xpack.siem.dataProviders.not": "非", - "xpack.siem.dataProviders.or": "或", - "xpack.siem.dataProviders.query": "查询", - "xpack.siem.dataProviders.reEnableDataProvider": "重新启用", - "xpack.siem.dataProviders.removeDataProvider": "移除数据提供程序", - "xpack.siem.dataProviders.showOptionsDataProvider": "显示选项 - 适用于", - "xpack.siem.dataProviders.temporaryDisableDataProvider": "暂时禁用", - "xpack.siem.dataProviders.toBuildAn": "以构建", - "xpack.siem.dataProviders.toggle": "切换", - "xpack.siem.dataProviders.valueAriaLabel": "值", - "xpack.siem.dataProviders.valuePlaceholder": "值", - "xpack.siem.detectionEngine.alertTitle": "外部告警", - "xpack.siem.detectionEngine.buttonManageRules": "管理信号检测规则", - "xpack.siem.detectionEngine.components.importRuleModal.cancelTitle": "取消", - "xpack.siem.detectionEngine.components.importRuleModal.importFailedDetailedTitle": "规则 ID:{ruleId}\n 状态代码:{statusCode}\n 消息:{message}", - "xpack.siem.detectionEngine.components.importRuleModal.importFailedTitle": "无法导入规则", - "xpack.siem.detectionEngine.components.importRuleModal.importRuleTitle": "导入规则", - "xpack.siem.detectionEngine.components.importRuleModal.initialPromptTextDescription": "选择或拖放有效的 rules_export.ndjson 文件", - "xpack.siem.detectionEngine.components.importRuleModal.overwriteDescription": "自动覆盖具有相同规则 ID 的已保存对象", - "xpack.siem.detectionEngine.components.importRuleModal.selectRuleDescription": "选择要导入的 SIEM 规则(如从检测引擎视图导出的)", - "xpack.siem.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle": "已成功导入 {totalRules} 个{totalRules, plural, =1 {规则} other {规则}}", - "xpack.siem.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle": "创建并激活规则", - "xpack.siem.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle": "创建规则但不激活", - "xpack.siem.detectionEngine.createRule.backToRulesDescription": "返回到信号检测规则", - "xpack.siem.detectionEngine.createRule.editRuleButton": "编辑", - "xpack.siem.detectionEngine.createRule.filtersLabel": "筛选", - "xpack.siem.detectionEngine.createRule.mlRuleTypeDescription": "Machine Learning", - "xpack.siem.detectionEngine.createRule.pageTitle": "创建新规则", - "xpack.siem.detectionEngine.createRule.QueryLabel": "定制查询", - "xpack.siem.detectionEngine.createRule.queryRuleTypeDescription": "查询", - "xpack.siem.detectionEngine.createRule.savedIdLabel": "已保存查询名称", - "xpack.siem.detectionEngine.createRule.stepAboutRule.descriptionFieldRequiredError": "描述必填。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fiedIndexPatternsLabel": "索引模式", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldDescriptionLabel": "描述", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldFalsePositiveLabel": "误报示例", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel": "MITRE ATT&CK\\u2122", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldNameLabel": "名称", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldReferenceUrlsLabel": "引用 URL", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldRiskScoreLabel": "风险分数", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldSeverityLabel": "严重性", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTagsHelpText": "为此规则键入一个或多个定制识别标记。在每个标记后按 Enter 键可开始新的标记。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTagsLabel": "标记", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateHelpText": "选择现有时间线以将其用作调查生成的信号时的模板。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateLabel": "时间线模板", - "xpack.siem.detectionEngine.createRule.stepAboutRule.guideHelpText": "为执行信号调查的分析师提供有用信息。此指南将显示在规则详情页面上以及从此规则所生成的信号创建的时间线中。", - "xpack.siem.detectionEngine.createRule.stepAboutRule.guideLabel": "调查指南", - "xpack.siem.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError": "名称必填。", - "xpack.siem.detectionEngine.createRule.stepAboutrule.noteHelpText": "添加规则调查指南......", - "xpack.siem.detectionEngine.createRule.stepAboutRule.severityFieldRequiredError": "严重性必填。", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.addFalsePositiveDescription": "添加误报示例", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.addReferenceDescription": "添加引用 URL", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.advancedSettingsButton": "高级设置", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionCriticalDescription": "紧急", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionHighDescription": "高", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionLowDescription": "低", - "xpack.siem.detectionEngine.createRule.stepAboutRuleForm.severityOptionMediumDescription": "中", - "xpack.siem.detectionEngine.createRule.stepDefineRule.customMitreAttackTechniquesFieldRequiredError": "一个策略至少需要一个技术。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError": "KQL 无效", - "xpack.siem.detectionEngine.createRule.stepDefineRule.customQueryFieldRequiredError": "需要定制查询。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "异常分数阈值", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "Machine Learning 作业", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "定制查询", - "xpack.siem.detectionEngine.createRule.stepDefineRule.fieldRuleTypeLabel": "规则类型", - "xpack.siem.detectionEngine.createRule.stepDefineRule.importTimelineModalTitle": "从已保存时间线导入查询", - "xpack.siem.detectionEngine.createRule.stepDefineRule.importTimelineQueryButton": "从已保存时间线导入查询", - "xpack.siem.detectionEngine.createRule.stepDefineRule.indicesCustomDescription": "提供定制的索引列表", - "xpack.siem.detectionEngine.createRule.stepDefineRule.indicesFromConfigDescription": "使用 SIEM 高级设置的 Elasticsearch 索引", - "xpack.siem.detectionEngine.createRule.stepDefineRule.indicesHelperDescription": "输入要运行此规则的 Elasticsearch 索引的模式。默认情况下,将包括 SIEM 高级设置中定义的索引模式。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.machineLearningJobIdHelpText": "我们提供若干可让您入门的常规作业。要添加自己的定制规则,在 {machineLearning} 应用程序中请将一组“siem”分配给这些作业,以使它们显示在此处。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.machineLearningJobIdRequired": "Machine Learning 作业必填。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.mlEnableJobWarningTitle": "此 ML 作业当前未运行。在激活此规则之前请通过“ML 作业设置”设置此作业以使其运行。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText": "选择作业", - "xpack.siem.detectionEngine.createRule.stepDefineRule.outputIndiceNameFieldRequiredError": "至少需要一个索引模式。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "Url 的格式无效", - "xpack.siem.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "重置为默认索引模式", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDescription": "选择 ML 作业以检测异常活动。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDisabledDescription": "要访问 ML,需要{subscriptionsLink}。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeTitle": "Machine Learning", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeDescription": "使用 KQL 或 Lucene 跨索引检测问题。", - "xpack.siem.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeTitle": "定制查询", - "xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleHelpText": "选择在规则评估为 true 时应执行自动操作的时间。", - "xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel": "操作频率", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText": "增加回查时段的时间以防止信号缺失。", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel": "更多回查时间", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText": "规则定期运行并检测指定时间范围内的信号。", - "xpack.siem.detectionEngine.createRule.stepScheduleRule.fieldIntervalLabel": "运行间隔:", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription": "小时", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.invalidTimeMessageDescription": "时间必填。", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription": "分钟", - "xpack.siem.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription": "秒", - "xpack.siem.detectionEngine.details.stepAboutRule.aboutText": "关于", - "xpack.siem.detectionEngine.details.stepAboutRule.detailsLabel": "详情", - "xpack.siem.detectionEngine.details.stepAboutRule.investigationGuideLabel": "调查指南", - "xpack.siem.detectionEngine.detectionsPageTitle": "检测", - "xpack.siem.detectionEngine.dismissButton": "关闭", - "xpack.siem.detectionEngine.dismissNoApiIntegrationKeyButton": "关闭", - "xpack.siem.detectionEngine.editRule.backToDescription": "返回到", - "xpack.siem.detectionEngine.editRule.cancelTitle": "取消", - "xpack.siem.detectionEngine.editRule.errorMsgDescription": "抱歉", - "xpack.siem.detectionEngine.editRule.pageTitle": "编辑规则设置", - "xpack.siem.detectionEngine.editRule.saveChangeTitle": "保存更改", - "xpack.siem.detectionEngine.emptyActionPrimary": "查看设置说明", - "xpack.siem.detectionEngine.emptyActionSecondary": "前往文档", - "xpack.siem.detectionEngine.emptyTitle": "似乎您没有与 SIEM 应用程序的检测引擎相关的索引", - "xpack.siem.detectionEngine.goToDocumentationButton": "查看文档", - "xpack.siem.detectionEngine.headerPage.pageBadgeLabel": "公测版", - "xpack.siem.detectionEngine.headerPage.pageBadgeTooltip": "“检测”仍为公测版。请通过在 Kibana 存储库中报告问题或错误,帮助我们改进产品。", - "xpack.siem.detectionEngine.mitreAttack.addTitle": "添加 MITRE ATT&CK\\u2122 威胁", - "xpack.siem.detectionEngine.mitreAttack.tacticPlaceHolderDescription": "选择策略......", - "xpack.siem.detectionEngine.mitreAttack.tacticsDescription": "策略", - "xpack.siem.detectionEngine.mitreAttack.techniquesDescription": "技术", - "xpack.siem.detectionEngine.mitreAttack.techniquesPlaceHolderDescription": "选择技术......", - "xpack.siem.detectionEngine.mitreAttackTactics.collectionDescription": "Collection (TA0009)", - "xpack.siem.detectionEngine.mitreAttackTactics.commandAndControlDescription": "Command and Control (TA0011)", - "xpack.siem.detectionEngine.mitreAttackTactics.credentialAccessDescription": "Credential Access (TA0006)", - "xpack.siem.detectionEngine.mitreAttackTactics.defenseEvasionDescription": "Defense Evasion (TA0005)", - "xpack.siem.detectionEngine.mitreAttackTactics.discoveryDescription": "Discovery (TA0007)", - "xpack.siem.detectionEngine.mitreAttackTactics.executionDescription": "Execution (TA0002)", - "xpack.siem.detectionEngine.mitreAttackTactics.exfiltrationDescription": "Exfiltration (TA0010)", - "xpack.siem.detectionEngine.mitreAttackTactics.impactDescription": "Impact (TA0040)", - "xpack.siem.detectionEngine.mitreAttackTactics.initialAccessDescription": "Initial Access (TA0001)", - "xpack.siem.detectionEngine.mitreAttackTactics.lateralMovementDescription": "Lateral Movement (TA0008)", - "xpack.siem.detectionEngine.mitreAttackTactics.persistenceDescription": "Persistence (TA0003)", - "xpack.siem.detectionEngine.mitreAttackTactics.privilegeEscalationDescription": "Privilege Escalation (TA0004)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accessibilityFeaturesDescription": "Accessibility Features (T1015)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accessTokenManipulationDescription": "Access Token Manipulation (T1134)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accountAccessRemovalDescription": "Account Access Removal (T1531)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accountDiscoveryDescription": "Account Discovery (T1087)", - "xpack.siem.detectionEngine.mitreAttackTechniques.accountManipulationDescription": "Account Manipulation (T1098)", - "xpack.siem.detectionEngine.mitreAttackTechniques.appCertDlLsDescription": "AppCert DLLs (T1182)", - "xpack.siem.detectionEngine.mitreAttackTechniques.appInitDlLsDescription": "AppInit DLLs (T1103)", - "xpack.siem.detectionEngine.mitreAttackTechniques.appleScriptDescription": "AppleScript (T1155)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationAccessTokenDescription": "Application Access Token (T1527)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationDeploymentSoftwareDescription": "Application Deployment Software (T1017)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationShimmingDescription": "Application Shimming (T1138)", - "xpack.siem.detectionEngine.mitreAttackTechniques.applicationWindowDiscoveryDescription": "Application Window Discovery (T1010)", - "xpack.siem.detectionEngine.mitreAttackTechniques.audioCaptureDescription": "Audio Capture (T1123)", - "xpack.siem.detectionEngine.mitreAttackTechniques.authenticationPackageDescription": "Authentication Package (T1131)", - "xpack.siem.detectionEngine.mitreAttackTechniques.automatedCollectionDescription": "Automated Collection (T1119)", - "xpack.siem.detectionEngine.mitreAttackTechniques.automatedExfiltrationDescription": "Automated Exfiltration (T1020)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bashHistoryDescription": "Bash History (T1139)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bashProfileAndBashrcDescription": ".bash_profile and .bashrc (T1156)", - "xpack.siem.detectionEngine.mitreAttackTechniques.binaryPaddingDescription": "Binary Padding (T1009)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bitsJobsDescription": "BITS Jobs (T1197)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bootkitDescription": "Bootkit (T1067)", - "xpack.siem.detectionEngine.mitreAttackTechniques.browserBookmarkDiscoveryDescription": "Browser Bookmark Discovery (T1217)", - "xpack.siem.detectionEngine.mitreAttackTechniques.browserExtensionsDescription": "Browser Extensions (T1176)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bruteForceDescription": "Brute Force (T1110)", - "xpack.siem.detectionEngine.mitreAttackTechniques.bypassUserAccountControlDescription": "Bypass User Account Control (T1088)", - "xpack.siem.detectionEngine.mitreAttackTechniques.changeDefaultFileAssociationDescription": "Change Default File Association (T1042)", - "xpack.siem.detectionEngine.mitreAttackTechniques.clearCommandHistoryDescription": "Clear Command History (T1146)", - "xpack.siem.detectionEngine.mitreAttackTechniques.clipboardDataDescription": "Clipboard Data (T1115)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cloudInstanceMetadataApiDescription": "Cloud Instance Metadata API (T1522)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cloudServiceDashboardDescription": "Cloud Service Dashboard (T1538)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cloudServiceDiscoveryDescription": "Cloud Service Discovery (T1526)", - "xpack.siem.detectionEngine.mitreAttackTechniques.cmstpDescription": "CMSTP (T1191)", - "xpack.siem.detectionEngine.mitreAttackTechniques.codeSigningDescription": "Code Signing (T1116)", - "xpack.siem.detectionEngine.mitreAttackTechniques.commandLineInterfaceDescription": "Command-Line Interface (T1059)", - "xpack.siem.detectionEngine.mitreAttackTechniques.commonlyUsedPortDescription": "Commonly Used Port (T1043)", - "xpack.siem.detectionEngine.mitreAttackTechniques.communicationThroughRemovableMediaDescription": "Communication Through Removable Media (T1092)", - "xpack.siem.detectionEngine.mitreAttackTechniques.compileAfterDeliveryDescription": "Compile After Delivery (T1500)", - "xpack.siem.detectionEngine.mitreAttackTechniques.compiledHtmlFileDescription": "Compiled HTML File (T1223)", - "xpack.siem.detectionEngine.mitreAttackTechniques.componentFirmwareDescription": "Component Firmware (T1109)", - "xpack.siem.detectionEngine.mitreAttackTechniques.componentObjectModelAndDistributedComDescription": "Component Object Model and Distributed COM (T1175)", - "xpack.siem.detectionEngine.mitreAttackTechniques.componentObjectModelHijackingDescription": "Component Object Model Hijacking (T1122)", - "xpack.siem.detectionEngine.mitreAttackTechniques.connectionProxyDescription": "Connection Proxy (T1090)", - "xpack.siem.detectionEngine.mitreAttackTechniques.controlPanelItemsDescription": "Control Panel Items (T1196)", - "xpack.siem.detectionEngine.mitreAttackTechniques.createAccountDescription": "Create Account (T1136)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialDumpingDescription": "Credential Dumping (T1003)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialsFromWebBrowsersDescription": "Credentials from Web Browsers (T1503)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialsInFilesDescription": "Credentials in Files (T1081)", - "xpack.siem.detectionEngine.mitreAttackTechniques.credentialsInRegistryDescription": "Credentials in Registry (T1214)", - "xpack.siem.detectionEngine.mitreAttackTechniques.customCommandAndControlProtocolDescription": "Custom Command and Control Protocol (T1094)", - "xpack.siem.detectionEngine.mitreAttackTechniques.customCryptographicProtocolDescription": "Custom Cryptographic Protocol (T1024)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataCompressedDescription": "Data Compressed (T1002)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataDestructionDescription": "Data Destruction (T1485)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataEncodingDescription": "Data Encoding (T1132)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataEncryptedDescription": "Data Encrypted (T1022)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataEncryptedForImpactDescription": "Data Encrypted for Impact (T1486)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromCloudStorageObjectDescription": "Data from Cloud Storage Object (T1530)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromInformationRepositoriesDescription": "Data from Information Repositories (T1213)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromLocalSystemDescription": "Data from Local System (T1005)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromNetworkSharedDriveDescription": "Data from Network Shared Drive (T1039)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataFromRemovableMediaDescription": "Data from Removable Media (T1025)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataObfuscationDescription": "Data Obfuscation (T1001)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataStagedDescription": "Data Staged (T1074)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dataTransferSizeLimitsDescription": "Data Transfer Size Limits (T1030)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dcShadowDescription": "DCShadow (T1207)", - "xpack.siem.detectionEngine.mitreAttackTechniques.defacementDescription": "Defacement (T1491)", - "xpack.siem.detectionEngine.mitreAttackTechniques.deobfuscateDecodeFilesOrInformationDescription": "Deobfuscate/Decode Files or Information (T1140)", - "xpack.siem.detectionEngine.mitreAttackTechniques.disablingSecurityToolsDescription": "Disabling Security Tools (T1089)", - "xpack.siem.detectionEngine.mitreAttackTechniques.diskContentWipeDescription": "Disk Content Wipe (T1488)", - "xpack.siem.detectionEngine.mitreAttackTechniques.diskStructureWipeDescription": "Disk Structure Wipe (T1487)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dllSearchOrderHijackingDescription": "DLL Search Order Hijacking (T1038)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dllSideLoadingDescription": "DLL Side-Loading (T1073)", - "xpack.siem.detectionEngine.mitreAttackTechniques.domainFrontingDescription": "Domain Fronting (T1172)", - "xpack.siem.detectionEngine.mitreAttackTechniques.domainGenerationAlgorithmsDescription": "Domain Generation Algorithms (T1483)", - "xpack.siem.detectionEngine.mitreAttackTechniques.domainTrustDiscoveryDescription": "Domain Trust Discovery (T1482)", - "xpack.siem.detectionEngine.mitreAttackTechniques.driveByCompromiseDescription": "Drive-by Compromise (T1189)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dylibHijackingDescription": "Dylib Hijacking (T1157)", - "xpack.siem.detectionEngine.mitreAttackTechniques.dynamicDataExchangeDescription": "Dynamic Data Exchange (T1173)", - "xpack.siem.detectionEngine.mitreAttackTechniques.elevatedExecutionWithPromptDescription": "Elevated Execution with Prompt (T1514)", - "xpack.siem.detectionEngine.mitreAttackTechniques.emailCollectionDescription": "Email Collection (T1114)", - "xpack.siem.detectionEngine.mitreAttackTechniques.emondDescription": "Emond (T1519)", - "xpack.siem.detectionEngine.mitreAttackTechniques.endpointDenialOfServiceDescription": "Endpoint Denial of Service (T1499)", - "xpack.siem.detectionEngine.mitreAttackTechniques.executionGuardrailsDescription": "Execution Guardrails (T1480)", - "xpack.siem.detectionEngine.mitreAttackTechniques.executionThroughApiDescription": "Execution through API (T1106)", - "xpack.siem.detectionEngine.mitreAttackTechniques.executionThroughModuleLoadDescription": "Execution through Module Load (T1129)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverAlternativeProtocolDescription": "Exfiltration Over Alternative Protocol (T1048)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverCommandAndControlChannelDescription": "Exfiltration Over Command and Control Channel (T1041)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverOtherNetworkMediumDescription": "Exfiltration Over Other Network Medium (T1011)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exfiltrationOverPhysicalMediumDescription": "Exfiltration Over Physical Medium (T1052)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForClientExecutionDescription": "Exploitation for Client Execution (T1203)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForCredentialAccessDescription": "Exploitation for Credential Access (T1212)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForDefenseEvasionDescription": "Exploitation for Defense Evasion (T1211)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationForPrivilegeEscalationDescription": "Exploitation for Privilege Escalation (T1068)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitationOfRemoteServicesDescription": "Exploitation of Remote Services (T1210)", - "xpack.siem.detectionEngine.mitreAttackTechniques.exploitPublicFacingApplicationDescription": "Exploit Public-Facing Application (T1190)", - "xpack.siem.detectionEngine.mitreAttackTechniques.externalRemoteServicesDescription": "External Remote Services (T1133)", - "xpack.siem.detectionEngine.mitreAttackTechniques.extraWindowMemoryInjectionDescription": "Extra Window Memory Injection (T1181)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fallbackChannelsDescription": "Fallback Channels (T1008)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileAndDirectoryDiscoveryDescription": "File and Directory Discovery (T1083)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileAndDirectoryPermissionsModificationDescription": "File and Directory Permissions Modification (T1222)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileDeletionDescription": "File Deletion (T1107)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileSystemLogicalOffsetsDescription": "File System Logical Offsets (T1006)", - "xpack.siem.detectionEngine.mitreAttackTechniques.fileSystemPermissionsWeaknessDescription": "File System Permissions Weakness (T1044)", - "xpack.siem.detectionEngine.mitreAttackTechniques.firmwareCorruptionDescription": "Firmware Corruption (T1495)", - "xpack.siem.detectionEngine.mitreAttackTechniques.forcedAuthenticationDescription": "Forced Authentication (T1187)", - "xpack.siem.detectionEngine.mitreAttackTechniques.gatekeeperBypassDescription": "Gatekeeper Bypass (T1144)", - "xpack.siem.detectionEngine.mitreAttackTechniques.graphicalUserInterfaceDescription": "Graphical User Interface (T1061)", - "xpack.siem.detectionEngine.mitreAttackTechniques.groupPolicyModificationDescription": "Group Policy Modification (T1484)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hardwareAdditionsDescription": "Hardware Additions (T1200)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hiddenFilesAndDirectoriesDescription": "Hidden Files and Directories (T1158)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hiddenUsersDescription": "Hidden Users (T1147)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hiddenWindowDescription": "Hidden Window (T1143)", - "xpack.siem.detectionEngine.mitreAttackTechniques.histcontrolDescription": "HISTCONTROL (T1148)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hookingDescription": "Hooking (T1179)", - "xpack.siem.detectionEngine.mitreAttackTechniques.hypervisorDescription": "Hypervisor (T1062)", - "xpack.siem.detectionEngine.mitreAttackTechniques.imageFileExecutionOptionsInjectionDescription": "Image File Execution Options Injection (T1183)", - "xpack.siem.detectionEngine.mitreAttackTechniques.implantContainerImageDescription": "Implant Container Image (T1525)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indicatorBlockingDescription": "Indicator Blocking (T1054)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indicatorRemovalFromToolsDescription": "Indicator Removal from Tools (T1066)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indicatorRemovalOnHostDescription": "Indicator Removal on Host (T1070)", - "xpack.siem.detectionEngine.mitreAttackTechniques.indirectCommandExecutionDescription": "Indirect Command Execution (T1202)", - "xpack.siem.detectionEngine.mitreAttackTechniques.inhibitSystemRecoveryDescription": "Inhibit System Recovery (T1490)", - "xpack.siem.detectionEngine.mitreAttackTechniques.inputCaptureDescription": "Input Capture (T1056)", - "xpack.siem.detectionEngine.mitreAttackTechniques.inputPromptDescription": "Input Prompt (T1141)", - "xpack.siem.detectionEngine.mitreAttackTechniques.installRootCertificateDescription": "Install Root Certificate (T1130)", - "xpack.siem.detectionEngine.mitreAttackTechniques.installUtilDescription": "InstallUtil (T1118)", - "xpack.siem.detectionEngine.mitreAttackTechniques.internalSpearphishingDescription": "Internal Spearphishing (T1534)", - "xpack.siem.detectionEngine.mitreAttackTechniques.kerberoastingDescription": "Kerberoasting (T1208)", - "xpack.siem.detectionEngine.mitreAttackTechniques.kernelModulesAndExtensionsDescription": "Kernel Modules and Extensions (T1215)", - "xpack.siem.detectionEngine.mitreAttackTechniques.keychainDescription": "Keychain (T1142)", - "xpack.siem.detectionEngine.mitreAttackTechniques.launchAgentDescription": "Launch Agent (T1159)", - "xpack.siem.detectionEngine.mitreAttackTechniques.launchctlDescription": "Launchctl (T1152)", - "xpack.siem.detectionEngine.mitreAttackTechniques.launchDaemonDescription": "Launch Daemon (T1160)", - "xpack.siem.detectionEngine.mitreAttackTechniques.lcLoadDylibAdditionDescription": "LC_LOAD_DYLIB Addition (T1161)", - "xpack.siem.detectionEngine.mitreAttackTechniques.lcMainHijackingDescription": "LC_MAIN Hijacking (T1149)", - "xpack.siem.detectionEngine.mitreAttackTechniques.llmnrNbtNsPoisoningAndRelayDescription": "LLMNR/NBT-NS Poisoning and Relay (T1171)", - "xpack.siem.detectionEngine.mitreAttackTechniques.localJobSchedulingDescription": "Local Job Scheduling (T1168)", - "xpack.siem.detectionEngine.mitreAttackTechniques.loginItemDescription": "Login Item (T1162)", - "xpack.siem.detectionEngine.mitreAttackTechniques.logonScriptsDescription": "Logon Scripts (T1037)", - "xpack.siem.detectionEngine.mitreAttackTechniques.lsassDriverDescription": "LSASS Driver (T1177)", - "xpack.siem.detectionEngine.mitreAttackTechniques.manInTheBrowserDescription": "Man in the Browser (T1185)", - "xpack.siem.detectionEngine.mitreAttackTechniques.masqueradingDescription": "Masquerading (T1036)", - "xpack.siem.detectionEngine.mitreAttackTechniques.modifyExistingServiceDescription": "Modify Existing Service (T1031)", - "xpack.siem.detectionEngine.mitreAttackTechniques.modifyRegistryDescription": "Modify Registry (T1112)", - "xpack.siem.detectionEngine.mitreAttackTechniques.mshtaDescription": "Mshta (T1170)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multibandCommunicationDescription": "Multiband Communication (T1026)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multiHopProxyDescription": "Multi-hop Proxy (T1188)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multilayerEncryptionDescription": "Multilayer Encryption (T1079)", - "xpack.siem.detectionEngine.mitreAttackTechniques.multiStageChannelsDescription": "Multi-Stage Channels (T1104)", - "xpack.siem.detectionEngine.mitreAttackTechniques.netshHelperDllDescription": "Netsh Helper DLL (T1128)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkDenialOfServiceDescription": "Network Denial of Service (T1498)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkServiceScanningDescription": "Network Service Scanning (T1046)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkShareConnectionRemovalDescription": "Network Share Connection Removal (T1126)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkShareDiscoveryDescription": "Network Share Discovery (T1135)", - "xpack.siem.detectionEngine.mitreAttackTechniques.networkSniffingDescription": "Network Sniffing (T1040)", - "xpack.siem.detectionEngine.mitreAttackTechniques.newServiceDescription": "New Service (T1050)", - "xpack.siem.detectionEngine.mitreAttackTechniques.ntfsFileAttributesDescription": "NTFS File Attributes (T1096)", - "xpack.siem.detectionEngine.mitreAttackTechniques.obfuscatedFilesOrInformationDescription": "Obfuscated Files or Information (T1027)", - "xpack.siem.detectionEngine.mitreAttackTechniques.officeApplicationStartupDescription": "Office Application Startup (T1137)", - "xpack.siem.detectionEngine.mitreAttackTechniques.parentPidSpoofingDescription": "Parent PID Spoofing (T1502)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passTheHashDescription": "Pass the Hash (T1075)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passTheTicketDescription": "Pass the Ticket (T1097)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passwordFilterDllDescription": "Password Filter DLL (T1174)", - "xpack.siem.detectionEngine.mitreAttackTechniques.passwordPolicyDiscoveryDescription": "Password Policy Discovery (T1201)", - "xpack.siem.detectionEngine.mitreAttackTechniques.pathInterceptionDescription": "Path Interception (T1034)", - "xpack.siem.detectionEngine.mitreAttackTechniques.peripheralDeviceDiscoveryDescription": "Peripheral Device Discovery (T1120)", - "xpack.siem.detectionEngine.mitreAttackTechniques.permissionGroupsDiscoveryDescription": "Permission Groups Discovery (T1069)", - "xpack.siem.detectionEngine.mitreAttackTechniques.plistModificationDescription": "Plist Modification (T1150)", - "xpack.siem.detectionEngine.mitreAttackTechniques.portKnockingDescription": "Port Knocking (T1205)", - "xpack.siem.detectionEngine.mitreAttackTechniques.portMonitorsDescription": "Port Monitors (T1013)", - "xpack.siem.detectionEngine.mitreAttackTechniques.powerShellDescription": "PowerShell (T1086)", - "xpack.siem.detectionEngine.mitreAttackTechniques.powerShellProfileDescription": "PowerShell Profile (T1504)", - "xpack.siem.detectionEngine.mitreAttackTechniques.privateKeysDescription": "Private Keys (T1145)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processDiscoveryDescription": "Process Discovery (T1057)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processDoppelgangingDescription": "Process Doppelgänging (T1186)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processHollowingDescription": "Process Hollowing (T1093)", - "xpack.siem.detectionEngine.mitreAttackTechniques.processInjectionDescription": "Process Injection (T1055)", - "xpack.siem.detectionEngine.mitreAttackTechniques.queryRegistryDescription": "Query Registry (T1012)", - "xpack.siem.detectionEngine.mitreAttackTechniques.rcCommonDescription": "Rc.common (T1163)", - "xpack.siem.detectionEngine.mitreAttackTechniques.redundantAccessDescription": "Redundant Access (T1108)", - "xpack.siem.detectionEngine.mitreAttackTechniques.registryRunKeysStartupFolderDescription": "Registry Run Keys / Startup Folder (T1060)", - "xpack.siem.detectionEngine.mitreAttackTechniques.regsvcsRegasmDescription": "Regsvcs/Regasm (T1121)", - "xpack.siem.detectionEngine.mitreAttackTechniques.regsvr32Description": "Regsvr32 (T1117)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteAccessToolsDescription": "Remote Access Tools (T1219)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteDesktopProtocolDescription": "Remote Desktop Protocol (T1076)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteFileCopyDescription": "Remote File Copy (T1105)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteServicesDescription": "Remote Services (T1021)", - "xpack.siem.detectionEngine.mitreAttackTechniques.remoteSystemDiscoveryDescription": "Remote System Discovery (T1018)", - "xpack.siem.detectionEngine.mitreAttackTechniques.reOpenedApplicationsDescription": "Re-opened Applications (T1164)", - "xpack.siem.detectionEngine.mitreAttackTechniques.replicationThroughRemovableMediaDescription": "Replication Through Removable Media (T1091)", - "xpack.siem.detectionEngine.mitreAttackTechniques.resourceHijackingDescription": "Resource Hijacking (T1496)", - "xpack.siem.detectionEngine.mitreAttackTechniques.revertCloudInstanceDescription": "Revert Cloud Instance (T1536)", - "xpack.siem.detectionEngine.mitreAttackTechniques.rootkitDescription": "Rootkit (T1014)", - "xpack.siem.detectionEngine.mitreAttackTechniques.rundll32Description": "Rundll32 (T1085)", - "xpack.siem.detectionEngine.mitreAttackTechniques.runtimeDataManipulationDescription": "Runtime Data Manipulation (T1494)", - "xpack.siem.detectionEngine.mitreAttackTechniques.scheduledTaskDescription": "Scheduled Task (T1053)", - "xpack.siem.detectionEngine.mitreAttackTechniques.scheduledTransferDescription": "Scheduled Transfer (T1029)", - "xpack.siem.detectionEngine.mitreAttackTechniques.screenCaptureDescription": "Screen Capture (T1113)", - "xpack.siem.detectionEngine.mitreAttackTechniques.screensaverDescription": "Screensaver (T1180)", - "xpack.siem.detectionEngine.mitreAttackTechniques.scriptingDescription": "Scripting (T1064)", - "xpack.siem.detectionEngine.mitreAttackTechniques.securitydMemoryDescription": "Securityd Memory (T1167)", - "xpack.siem.detectionEngine.mitreAttackTechniques.securitySoftwareDiscoveryDescription": "Security Software Discovery (T1063)", - "xpack.siem.detectionEngine.mitreAttackTechniques.securitySupportProviderDescription": "Security Support Provider (T1101)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serverSoftwareComponentDescription": "Server Software Component (T1505)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serviceExecutionDescription": "Service Execution (T1035)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serviceRegistryPermissionsWeaknessDescription": "Service Registry Permissions Weakness (T1058)", - "xpack.siem.detectionEngine.mitreAttackTechniques.serviceStopDescription": "Service Stop (T1489)", - "xpack.siem.detectionEngine.mitreAttackTechniques.setuidAndSetgidDescription": "Setuid and Setgid (T1166)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sharedWebrootDescription": "Shared Webroot (T1051)", - "xpack.siem.detectionEngine.mitreAttackTechniques.shortcutModificationDescription": "Shortcut Modification (T1023)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sidHistoryInjectionDescription": "SID-History Injection (T1178)", - "xpack.siem.detectionEngine.mitreAttackTechniques.signedBinaryProxyExecutionDescription": "Signed Binary Proxy Execution (T1218)", - "xpack.siem.detectionEngine.mitreAttackTechniques.signedScriptProxyExecutionDescription": "Signed Script Proxy Execution (T1216)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sipAndTrustProviderHijackingDescription": "SIP and Trust Provider Hijacking (T1198)", - "xpack.siem.detectionEngine.mitreAttackTechniques.softwareDiscoveryDescription": "Software Discovery (T1518)", - "xpack.siem.detectionEngine.mitreAttackTechniques.softwarePackingDescription": "Software Packing (T1045)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sourceDescription": "Source (T1153)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spaceAfterFilenameDescription": "Space after Filename (T1151)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingAttachmentDescription": "Spearphishing Attachment (T1193)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingLinkDescription": "Spearphishing Link (T1192)", - "xpack.siem.detectionEngine.mitreAttackTechniques.spearphishingViaServiceDescription": "Spearphishing via Service (T1194)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sshHijackingDescription": "SSH Hijacking (T1184)", - "xpack.siem.detectionEngine.mitreAttackTechniques.standardApplicationLayerProtocolDescription": "Standard Application Layer Protocol (T1071)", - "xpack.siem.detectionEngine.mitreAttackTechniques.standardCryptographicProtocolDescription": "Standard Cryptographic Protocol (T1032)", - "xpack.siem.detectionEngine.mitreAttackTechniques.standardNonApplicationLayerProtocolDescription": "Standard Non-Application Layer Protocol (T1095)", - "xpack.siem.detectionEngine.mitreAttackTechniques.startupItemsDescription": "Startup Items (T1165)", - "xpack.siem.detectionEngine.mitreAttackTechniques.stealApplicationAccessTokenDescription": "Steal Application Access Token (T1528)", - "xpack.siem.detectionEngine.mitreAttackTechniques.stealWebSessionCookieDescription": "Steal Web Session Cookie (T1539)", - "xpack.siem.detectionEngine.mitreAttackTechniques.storedDataManipulationDescription": "Stored Data Manipulation (T1492)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sudoCachingDescription": "Sudo Caching (T1206)", - "xpack.siem.detectionEngine.mitreAttackTechniques.sudoDescription": "Sudo (T1169)", - "xpack.siem.detectionEngine.mitreAttackTechniques.supplyChainCompromiseDescription": "Supply Chain Compromise (T1195)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemdServiceDescription": "Systemd Service (T1501)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemFirmwareDescription": "System Firmware (T1019)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemInformationDiscoveryDescription": "System Information Discovery (T1082)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemNetworkConfigurationDiscoveryDescription": "System Network Configuration Discovery (T1016)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemNetworkConnectionsDiscoveryDescription": "System Network Connections Discovery (T1049)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemOwnerUserDiscoveryDescription": "System Owner/User Discovery (T1033)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemServiceDiscoveryDescription": "System Service Discovery (T1007)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemShutdownRebootDescription": "System Shutdown/Reboot (T1529)", - "xpack.siem.detectionEngine.mitreAttackTechniques.systemTimeDiscoveryDescription": "System Time Discovery (T1124)", - "xpack.siem.detectionEngine.mitreAttackTechniques.taintSharedContentDescription": "Taint Shared Content (T1080)", - "xpack.siem.detectionEngine.mitreAttackTechniques.templateInjectionDescription": "Template Injection (T1221)", - "xpack.siem.detectionEngine.mitreAttackTechniques.thirdPartySoftwareDescription": "Third-party Software (T1072)", - "xpack.siem.detectionEngine.mitreAttackTechniques.timeProvidersDescription": "Time Providers (T1209)", - "xpack.siem.detectionEngine.mitreAttackTechniques.timestompDescription": "Timestomp (T1099)", - "xpack.siem.detectionEngine.mitreAttackTechniques.transferDataToCloudAccountDescription": "Transfer Data to Cloud Account (T1537)", - "xpack.siem.detectionEngine.mitreAttackTechniques.transmittedDataManipulationDescription": "Transmitted Data Manipulation (T1493)", - "xpack.siem.detectionEngine.mitreAttackTechniques.trapDescription": "Trap (T1154)", - "xpack.siem.detectionEngine.mitreAttackTechniques.trustedDeveloperUtilitiesDescription": "Trusted Developer Utilities (T1127)", - "xpack.siem.detectionEngine.mitreAttackTechniques.trustedRelationshipDescription": "Trusted Relationship (T1199)", - "xpack.siem.detectionEngine.mitreAttackTechniques.twoFactorAuthenticationInterceptionDescription": "Two-Factor Authentication Interception (T1111)", - "xpack.siem.detectionEngine.mitreAttackTechniques.uncommonlyUsedPortDescription": "Uncommonly Used Port (T1065)", - "xpack.siem.detectionEngine.mitreAttackTechniques.unusedUnsupportedCloudRegionsDescription": "Unused/Unsupported Cloud Regions (T1535)", - "xpack.siem.detectionEngine.mitreAttackTechniques.userExecutionDescription": "User Execution (T1204)", - "xpack.siem.detectionEngine.mitreAttackTechniques.validAccountsDescription": "Valid Accounts (T1078)", - "xpack.siem.detectionEngine.mitreAttackTechniques.videoCaptureDescription": "Video Capture (T1125)", - "xpack.siem.detectionEngine.mitreAttackTechniques.virtualizationSandboxEvasionDescription": "Virtualization/Sandbox Evasion (T1497)", - "xpack.siem.detectionEngine.mitreAttackTechniques.webServiceDescription": "Web Service (T1102)", - "xpack.siem.detectionEngine.mitreAttackTechniques.webSessionCookieDescription": "Web Session Cookie (T1506)", - "xpack.siem.detectionEngine.mitreAttackTechniques.webShellDescription": "Web Shell (T1100)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsAdminSharesDescription": "Windows Admin Shares (T1077)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationDescription": "Windows Management Instrumentation (T1047)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationEventSubscriptionDescription": "Windows Management Instrumentation Event Subscription (T1084)", - "xpack.siem.detectionEngine.mitreAttackTechniques.windowsRemoteManagementDescription": "Windows Remote Management (T1028)", - "xpack.siem.detectionEngine.mitreAttackTechniques.winlogonHelperDllDescription": "Winlogon Helper DLL (T1004)", - "xpack.siem.detectionEngine.mitreAttackTechniques.xslScriptProcessingDescription": "XSL Script Processing (T1220)", - "xpack.siem.detectionEngine.mlRulesDisabledMessageTitle": "ML 规则需要白金级许可证以及 ML 管理员权限", - "xpack.siem.detectionEngine.mlUnavailableTitle": "{totalRules} 个 {totalRules, plural, =1 {规则需要} other {规则需要}}启用 Machine Learning。", - "xpack.siem.detectionEngine.noApiIntegrationKeyCallOutMsg": "每次启动 Kibana,都会为已保存对象生成新的加密密钥。没有持久性密钥,在 Kibana 重新启动后,将无法删除或修改规则。要设置持久性密钥,请将文本值为 32 个或更多任意字符的 xpack.encryptedSavedObjects.encryptionKey 设置添加到 kibana.yml 文件。", - "xpack.siem.detectionEngine.noApiIntegrationKeyCallOutTitle": "需要 API 集成密钥", - "xpack.siem.detectionEngine.noIndexMsgBody": "要使用检测引擎,具有所需集群和索引权限的用户必须首先访问此页面。若需要更多帮助,请联系您的管理员。", - "xpack.siem.detectionEngine.noIndexTitle": "让我们来设置您的检测引擎", - "xpack.siem.detectionEngine.pageTitle": "检测引擎", - "xpack.siem.detectionEngine.panelSubtitleShowing": "正在显示", - "xpack.siem.detectionEngine.readOnlyCallOutMsg": "您当前缺少所需的权限,无法创建/编辑检测引擎规则。有关进一步帮助,请联系您的管理员。", - "xpack.siem.detectionEngine.readOnlyCallOutTitle": "需要规则权限", - "xpack.siem.detectionEngine.rule.editRule.errorMsgDescription": "您在{countError, plural, one {以下选项卡} other {以下选项卡}}中的输入无效:{tabHasError}", - "xpack.siem.detectionEngine.ruleDescription.mlJobStartedDescription": "已启动", - "xpack.siem.detectionEngine.ruleDescription.mlJobStoppedDescription": "已停止", - "xpack.siem.detectionEngine.ruleDetails.activateRuleLabel": "激活", - "xpack.siem.detectionEngine.ruleDetails.backToRulesDescription": "返回到信号检测规则", - "xpack.siem.detectionEngine.ruleDetails.errorCalloutTitle": "规则故障位置", - "xpack.siem.detectionEngine.ruleDetails.experimentalDescription": "实验性", - "xpack.siem.detectionEngine.ruleDetails.failureHistoryTab": "失败历史记录", - "xpack.siem.detectionEngine.ruleDetails.lastFiveErrorsTitle": "上五个错误", - "xpack.siem.detectionEngine.ruleDetails.pageTitle": "规则详情", - "xpack.siem.detectionEngine.ruleDetails.ruleCreationDescription": "由 {by} 于 {date}创建", - "xpack.siem.detectionEngine.ruleDetails.ruleUpdateDescription": "由 {by} 于 {date}更新", - "xpack.siem.detectionEngine.ruleDetails.statusFailedAtColumn": "失败于", - "xpack.siem.detectionEngine.ruleDetails.statusFailedDescription": "失败", - "xpack.siem.detectionEngine.ruleDetails.statusFailedMsgColumn": "失败消息", - "xpack.siem.detectionEngine.ruleDetails.statusTypeColumn": "类型", - "xpack.siem.detectionEngine.ruleDetails.unknownDescription": "未知", - "xpack.siem.detectionEngine.rules.aboutRuleTitle": "关于规则", - "xpack.siem.detectionEngine.rules.addNewRuleTitle": "创建新规则", - "xpack.siem.detectionEngine.rules.addPageTitle": "创建", - "xpack.siem.detectionEngine.rules.allRules.actions.deleteeRuleDescription": "删除规则……", - "xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "复制规则……", - "xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription": "复制规则时出错……", - "xpack.siem.detectionEngine.rules.allRules.actions.duplicateTitle": "复制", - "xpack.siem.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "编辑规则设置", - "xpack.siem.detectionEngine.rules.allRules.actions.exportRuleDescription": "导出规则", - "xpack.siem.detectionEngine.rules.allRules.activeRuleDescription": "活动", - "xpack.siem.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle": "激活 {totalRules, plural, =1 {个规则} other {个规则}}时出错……", - "xpack.siem.detectionEngine.rules.allRules.batchActions.activateSelectedTitle": "激活选定", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle": "停用 {totalRules, plural, =1 {个规则} other {个规则}}时出错……", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deactivateSelectedTitle": "停用选定", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle": "删除 {totalRules, plural, =1 {个规则} other {个规则}}时出错……", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "选择内容包含无法删除的不可变规则", - "xpack.siem.detectionEngine.rules.allRules.batchActions.deleteSelectedTitle": "删除选定……", - "xpack.siem.detectionEngine.rules.allRules.batchActions.duplicateSelectedTitle": "复制选定……", - "xpack.siem.detectionEngine.rules.allRules.batchActions.exportSelectedTitle": "导出选定", - "xpack.siem.detectionEngine.rules.allRules.batchActionsTitle": "批处理操作", - "xpack.siem.detectionEngine.rules.allRules.columns.activateTitle": "已激活", - "xpack.siem.detectionEngine.rules.allRules.columns.gap": "缺口(如果有)", - "xpack.siem.detectionEngine.rules.allRules.columns.indexingTimes": "索引时间 (ms)", - "xpack.siem.detectionEngine.rules.allRules.columns.lastLookBackDate": "最后回查日期", - "xpack.siem.detectionEngine.rules.allRules.columns.lastResponseTitle": "上次响应", - "xpack.siem.detectionEngine.rules.allRules.columns.lastRunTitle": "上次运行", - "xpack.siem.detectionEngine.rules.allRules.columns.queryTimes": "查询时间 (ms)", - "xpack.siem.detectionEngine.rules.allRules.columns.riskScoreTitle": "风险分数", - "xpack.siem.detectionEngine.rules.allRules.columns.ruleTitle": "规则", - "xpack.siem.detectionEngine.rules.allRules.columns.severityTitle": "严重性", - "xpack.siem.detectionEngine.rules.allRules.columns.tagsTitle": "标记", - "xpack.siem.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", - "xpack.siem.detectionEngine.rules.allRules.filters.customRulesTitle": "定制规则", - "xpack.siem.detectionEngine.rules.allRules.filters.elasticRulesTitle": "Elastic 规则", - "xpack.siem.detectionEngine.rules.allRules.filters.noRulesBodyTitle": "使用上述筛选,我们无法找到任何规则。", - "xpack.siem.detectionEngine.rules.allRules.filters.noRulesTitle": "未找到任何规则", - "xpack.siem.detectionEngine.rules.allRules.filters.noTagsAvailableDescription": "没有可用标记", - "xpack.siem.detectionEngine.rules.allRules.filters.tagsLabel": "标记", - "xpack.siem.detectionEngine.rules.allRules.inactiveRuleDescription": "非活动", - "xpack.siem.detectionEngine.rules.allRules.refreshTitle": "刷新", - "xpack.siem.detectionEngine.rules.allRules.searchAriaLabel": "搜索规则", - "xpack.siem.detectionEngine.rules.allRules.searchPlaceholder": "例如规则名", - "xpack.siem.detectionEngine.rules.allRules.selectedRulesTitle": "已选择 {selectedRules} 个{selectedRules, plural, =1 {规则} other {规则}}", - "xpack.siem.detectionEngine.rules.allRules.showingRulesTitle": "正在显示 {totalRules} 个{totalRules, plural, =1 {规则} other {规则}}", - "xpack.siem.detectionEngine.rules.allRules.successfullyDuplicatedRulesTitle": "已成功复制 {totalRules, plural, =1 {{totalRules} 个规则} other {{totalRules} 个规则}}", - "xpack.siem.detectionEngine.rules.allRules.successfullyExportedRulesTitle": "已成功导出{totalRules, plural, =0 {所有规则} =1 { {totalRules} 个规则} other { {totalRules} 个规则}}", - "xpack.siem.detectionEngine.rules.allRules.tableTitle": "所有规则", - "xpack.siem.detectionEngine.rules.allRules.tabs.monitoring": "监测", - "xpack.siem.detectionEngine.rules.allRules.tabs.rules": "规则", - "xpack.siem.detectionEngine.rules.backOptionsHeader": "返回到检测", - "xpack.siem.detectionEngine.rules.components.ruleActionsOverflow.allActionsTitle": "所有操作", - "xpack.siem.detectionEngine.rules.components.ruleDownloader.exportFailureTitle": "无法导出规则……", - "xpack.siem.detectionEngine.rules.continueButtonTitle": "继续", - "xpack.siem.detectionEngine.rules.create.successfullyCreatedRuleTitle": "{ruleName} 已创建", - "xpack.siem.detectionEngine.rules.defineRuleTitle": "定义规则", - "xpack.siem.detectionEngine.rules.deleteDescription": "删除", - "xpack.siem.detectionEngine.rules.editPageTitle": "编辑", - "xpack.siem.detectionEngine.rules.importRuleTitle": "导入规则……", - "xpack.siem.detectionEngine.rules.loadPrePackagedRulesButton": "加载 Elastic 预构建规则", - "xpack.siem.detectionEngine.rules.optionalFieldDescription": "可选", - "xpack.siem.detectionEngine.rules.pageTitle": "信号检测规则", - "xpack.siem.detectionEngine.rules.prePackagedRules.createOwnRuletButton": "创建自己的规则", - "xpack.siem.detectionEngine.rules.prePackagedRules.emptyPromptMessage": "Elastic SIEM 提供预构建检测规则,它们运行在后台并在条件满足时创建信号。默认情况下,所有预构建规则处于禁用状态,请选择您要激活的规则。", - "xpack.siem.detectionEngine.rules.prePackagedRules.emptyPromptTitle": "加载 Elastic 预构建检测规则", - "xpack.siem.detectionEngine.rules.prePackagedRules.loadPreBuiltButton": "加载预构建检测规则", - "xpack.siem.detectionEngine.rules.releaseNotesHelp": "发行说明", - "xpack.siem.detectionEngine.rules.reloadMissingPrePackagedRulesButton": "安装 {missingRules} 个 Elastic 预构建{missingRules, plural, =1 {规则} other {规则}} ", - "xpack.siem.detectionEngine.rules.ruleActionsTitle": "规则操作", - "xpack.siem.detectionEngine.rules.scheduleRuleTitle": "计划规则", - "xpack.siem.detectionEngine.rules.stepAboutTitle": "关于", - "xpack.siem.detectionEngine.rules.stepActionsTitle": "操作", - "xpack.siem.detectionEngine.rules.stepDefinitionTitle": "定义", - "xpack.siem.detectionEngine.rules.stepScheduleTitle": "计划", - "xpack.siem.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName} 已保存", - "xpack.siem.detectionEngine.rules.updateButtonTitle": "更新", - "xpack.siem.detectionEngine.rules.updatePrePackagedRulesButton": "更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}} ", - "xpack.siem.detectionEngine.rules.updatePrePackagedRulesMsg": "您可更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}}。注意,这将重新加载删除的 Elastic 预构建规则。", - "xpack.siem.detectionEngine.rules.updatePrePackagedRulesTitle": "有 Elastic 预构建规则的更新", - "xpack.siem.detectionEngine.ruleStatus.refreshButton": "刷新", - "xpack.siem.detectionEngine.ruleStatus.statusAtDescription": "处于", - "xpack.siem.detectionEngine.ruleStatus.statusDateDescription": "状态日期", - "xpack.siem.detectionEngine.ruleStatus.statusDescription": "上次响应", - "xpack.siem.detectionEngine.signalRuleAlert.actionGroups.default": "默认值", - "xpack.siem.detectionEngine.userUnauthenticatedMsgBody": "您没有所需的权限,无法查看检测引擎。若需要更多帮助,请联系您的管理员。", - "xpack.siem.detectionEngine.userUnauthenticatedTitle": "需要检测引擎权限", - "xpack.siem.dragAndDrop.addToTimeline": "添加到时间线调查", - "xpack.siem.dragAndDrop.closeButtonLabel": "关闭", - "xpack.siem.dragAndDrop.copyToClipboardTooltip": "复制到剪贴板", - "xpack.siem.dragAndDrop.fieldLabel": "字段", - "xpack.siem.dragAndDrop.filterForValueHoverAction": "筛留值", - "xpack.siem.dragAndDrop.filterOutValueHoverAction": "筛除值", - "xpack.siem.draggables.field.categoryLabel": "类别", - "xpack.siem.draggables.field.fieldLabel": "字段", - "xpack.siem.draggables.field.typeLabel": "类型", - "xpack.siem.draggables.field.viewCategoryTooltip": "查看类别", - "xpack.siem.editDataProvider.doesNotExistLabel": "不存在", - "xpack.siem.editDataProvider.existsLabel": "存在", - "xpack.siem.editDataProvider.fieldLabel": "字段", - "xpack.siem.editDataProvider.isLabel": "是", - "xpack.siem.editDataProvider.isNotLabel": "不是", - "xpack.siem.editDataProvider.operatorLabel": "运算符", - "xpack.siem.editDataProvider.placeholder": "选择字段", - "xpack.siem.editDataProvider.saveButton": "保存", - "xpack.siem.editDataProvider.selectAnOperatorPlaceholder": "选择运算符", - "xpack.siem.editDataProvider.valueLabel": "值", - "xpack.siem.editDataProvider.valuePlaceholder": "值", - "xpack.siem.emptyString.emptyStringDescription": "空字符串", - "xpack.siem.event.module.linkToElasticEndpointSecurityDescription": "在 Elastic Endpoint Security 中打开", - "xpack.siem.eventDetails.blank": " ", - "xpack.siem.eventDetails.copyToClipboard": "复制到剪贴板", - "xpack.siem.eventDetails.copyToClipboardTooltip": "复制到剪贴板", - "xpack.siem.eventDetails.description": "描述", - "xpack.siem.eventDetails.field": "字段", - "xpack.siem.eventDetails.filter.placeholder": "按字段、值或描述筛选......", - "xpack.siem.eventDetails.jsonView": "JSON 视图", - "xpack.siem.eventDetails.table": "表", - "xpack.siem.eventDetails.toggleColumnTooltip": "切换列", - "xpack.siem.eventDetails.value": "值", - "xpack.siem.eventsViewer.errorFetchingEventsData": "无法查询事件数据", - "xpack.siem.eventsViewer.eventsLabel": "事件", - "xpack.siem.eventsViewer.footer.loadingEventsDataLabel": "正在加载事件", - "xpack.siem.eventsViewer.showingLabel": "显示", - "xpack.siem.eventsViewer.unit": "{totalCount, plural, =1 {个事件} other {个事件}}", - "xpack.siem.featureCatalogue.description": "浏览安全指标和日志以了解事件和告警", - "xpack.siem.featureCatalogue.title": "SIEM", - "xpack.siem.featureRegistry.linkSiemTitle": "SIEM", - "xpack.siem.fieldBrowser.categoriesCountTitle": "{totalCount} {totalCount, plural, =1 {个类别} other {个类别}}", - "xpack.siem.fieldBrowser.categoriesTitle": "类别", - "xpack.siem.fieldBrowser.categoryLabel": "类别", - "xpack.siem.fieldBrowser.copyToClipboard": "复制到剪贴板", - "xpack.siem.fieldBrowser.customizeColumnsTitle": "定制列", - "xpack.siem.fieldBrowser.descriptionLabel": "描述", - "xpack.siem.fieldBrowser.fieldLabel": "字段", - "xpack.siem.fieldBrowser.fieldsCountTitle": "{totalCount} {totalCount, plural, =1 {个字段} other {个字段}}", - "xpack.siem.fieldBrowser.fieldsTitle": "字段", - "xpack.siem.fieldBrowser.filterPlaceholder": "字段名称", - "xpack.siem.fieldBrowser.noFieldsMatchInputLabel": "没有字段匹配 {searchInput}", - "xpack.siem.fieldBrowser.noFieldsMatchLabel": "没有字段匹配", - "xpack.siem.fieldBrowser.resetFieldsLink": "重置字段", - "xpack.siem.fieldBrowser.toggleColumnTooltip": "切换列", - "xpack.siem.fieldBrowser.viewCategoryTooltip": "查看所有 {categoryId} 字段", - "xpack.siem.fieldRenderers.moreLabel": "更多", - "xpack.siem.flyout.button.text": "时间线", - "xpack.siem.flyout.button.timeline": "时间线", - "xpack.siem.footer.autoRefreshActiveDescription": "自动刷新已启用", - "xpack.siem.footer.autoRefreshActiveTooltip": "自动刷新已启用时,时间线将显示匹配查询的最近 {numberOfItems} 个事件。", - "xpack.siem.footer.data": "数据", - "xpack.siem.footer.events": "事件", - "xpack.siem.footer.live": "实时", - "xpack.siem.footer.loadingLabel": "正在加载", - "xpack.siem.footer.loadingTimelineData": "正在加载 Timeline 数据", - "xpack.siem.footer.loadMoreLabel": "加载更多", - "xpack.siem.footer.of": "的", - "xpack.siem.footer.rows": "行", - "xpack.siem.footer.totalCountOfEvents": "匹配搜索条件的事件", - "xpack.siem.footer.updated": "已更新", - "xpack.siem.formatted.duration.aFewMillisecondsTooltip": "几毫秒", - "xpack.siem.formatted.duration.aFewNanosecondsTooltip": "几纳秒", - "xpack.siem.formatted.duration.aMillisecondTooltip": "一毫秒", - "xpack.siem.formatted.duration.aNanosecondTooltip": "一纳秒", - "xpack.siem.formatted.duration.aSecondTooltip": "一秒", - "xpack.siem.formatted.duration.invalidDurationTooltip": "持续时间无效", - "xpack.siem.formatted.duration.noDurationTooltip": "无持续时间", - "xpack.siem.formatted.duration.zeroNanosecondsTooltip": "零纳秒", - "xpack.siem.formattedDuration.tooltipLabel": "原始", - "xpack.siem.getCurrentUser.Error": "获取用户时出错", - "xpack.siem.getCurrentUser.unknownUser": "未知", - "xpack.siem.header.editableTitle.cancel": "取消", - "xpack.siem.header.editableTitle.editButtonAria": "通过单击,可以编辑 {title}", - "xpack.siem.header.editableTitle.save": "保存", - "xpack.siem.headerGlobal.buttonAddData": "添加数据", - "xpack.siem.headerGlobal.siem": "SIEM", - "xpack.siem.headerPage.pageSubtitle": "最后事件:{beat}", - "xpack.siem.hooks.useAddToTimeline.addedFieldMessage": "已将 {fieldOrValue} 添加到时间线", - "xpack.siem.host.details.architectureLabel": "架构", - "xpack.siem.host.details.firstSeenTitle": "首次看到时间", - "xpack.siem.host.details.lastSeenTitle": "最后看到时间", - "xpack.siem.host.details.overview.cloudProviderTitle": "云服务提供商", - "xpack.siem.host.details.overview.familyTitle": "系列", - "xpack.siem.host.details.overview.hostIdTitle": "主机 ID", - "xpack.siem.host.details.overview.inspectTitle": "主机概览", - "xpack.siem.host.details.overview.instanceIdTitle": "实例 ID", - "xpack.siem.host.details.overview.ipAddressesTitle": "IP 地址", - "xpack.siem.host.details.overview.macAddressesTitle": "MAC 地址", - "xpack.siem.host.details.overview.machineTypeTitle": "机器类型", - "xpack.siem.host.details.overview.maxAnomalyScoreByJobTitle": "最大异常分数(按作业)", - "xpack.siem.host.details.overview.osTitle": "操作系统", - "xpack.siem.host.details.overview.platformTitle": "平台", - "xpack.siem.host.details.overview.regionTitle": "地区", - "xpack.siem.host.details.versionLabel": "版本", - "xpack.siem.hosts.kqlPlaceholder": "例如 host.name:“foo”", - "xpack.siem.hosts.navigation.alertsTitle": "外部告警", - "xpack.siem.hosts.navigation.allHostsTitle": "所有主机", - "xpack.siem.hosts.navigation.anomaliesTitle": "异常", - "xpack.siem.hosts.navigation.authenticationsTitle": "身份验证", - "xpack.siem.hosts.navigation.dns.histogram.errorFetchingDnsData": "无法查询 DNS 数据", - "xpack.siem.hosts.navigation.eventsTitle": "事件", - "xpack.siem.hosts.navigation.uncommonProcessesTitle": "不常见进程", - "xpack.siem.hosts.navigaton.matrixHistogram.errorFetchingAuthenticationsData": "无法查询身份验证数据", - "xpack.siem.hosts.navigaton.matrixHistogram.errorFetchingEventsData": "无法查询事件数据", - "xpack.siem.hosts.pageTitle": "主机", - "xpack.siem.hostsTable.firstLastSeenToolTip": "相对于选定日期范围", - "xpack.siem.hostsTable.hostsTitle": "所有主机", - "xpack.siem.hostsTable.lastSeenTitle": "最后看到时间", - "xpack.siem.hostsTable.nameTitle": "名称", - "xpack.siem.hostsTable.osTitle": "操作系统", - "xpack.siem.hostsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.hostsTable.unit": "{totalCount, plural, =1 {个主机} other {个主机}}", - "xpack.siem.hostsTable.versionTitle": "版本", - "xpack.siem.insert.timeline.insertTimelineButton": "插入时间线链接", - "xpack.siem.inspect.modal.closeTitle": "鍏抽棴", - "xpack.siem.inspect.modal.indexPatternDescription": "连接到 Elasticsearch 索引的索引模式。可以在“Kibana”>“高级设置”中配置这些索引。", - "xpack.siem.inspect.modal.indexPatternLabel": "索引模式", - "xpack.siem.inspect.modal.queryTimeDescription": "处理查询所花费的时间。不包括发送请求或在浏览器中解析它的时间。", - "xpack.siem.inspect.modal.queryTimeLabel": "查询时间", - "xpack.siem.inspect.modal.reqTimestampDescription": "记录请求启动的时间", - "xpack.siem.inspect.modal.reqTimestampLabel": "请求时间戳", - "xpack.siem.inspect.modal.somethingWentWrongDescription": "抱歉,出现问题。", - "xpack.siem.inspectDescription": "检查", - "xpack.siem.ja3.fingerprint.ja3.fingerprintLabel": "ja3", - "xpack.siem.kpiHosts.hosts.title": "主机", - "xpack.siem.kpiHosts.uniqueIps.destinationChartLabel": "目标", - "xpack.siem.kpiHosts.uniqueIps.destinationUnitLabel": "目标", - "xpack.siem.kpiHosts.uniqueIps.sourceChartLabel": "源", - "xpack.siem.kpiHosts.uniqueIps.sourceUnitLabel": "源", - "xpack.siem.kpiHosts.uniqueIps.title": "唯一 IP", - "xpack.siem.kpiHosts.userAuthentications.failChartLabel": "失败", - "xpack.siem.kpiHosts.userAuthentications.failUnitLabel": "失败", - "xpack.siem.kpiHosts.userAuthentications.successChartLabel": "成功", - "xpack.siem.kpiHosts.userAuthentications.successUnitLabel": "成功", - "xpack.siem.kpiHosts.userAuthentications.title": "用户身份验证", - "xpack.siem.kpiNetwork.dnsQueries.title": "DNS 查询", - "xpack.siem.kpiNetwork.networkEvents.title": "网络事件", - "xpack.siem.kpiNetwork.tlsHandshakes.title": "TLS 握手", - "xpack.siem.kpiNetwork.uniqueFlowIds.title": "唯一流 ID", - "xpack.siem.kpiNetwork.uniquePrivateIps.destinationChartLabel": "目标", - "xpack.siem.kpiNetwork.uniquePrivateIps.destinationUnitLabel": "目标", - "xpack.siem.kpiNetwork.uniquePrivateIps.sourceChartLabel": "源", - "xpack.siem.kpiNetwork.uniquePrivateIps.sourceUnitLabel": "源", - "xpack.siem.kpiNetwork.uniquePrivateIps.title": "唯一专用 IP", - "xpack.siem.licensing.unsupportedMachineLearningMessage": "您的许可证不支持 Machine Learning。请升级您的许可证。", - "xpack.siem.markdown.hint.boldLabel": "**粗体**", - "xpack.siem.markdown.hint.bulletLabel": "* 项目符号", - "xpack.siem.markdown.hint.codeLabel": "`code`", - "xpack.siem.markdown.hint.headingLabel": "# 标题", - "xpack.siem.markdown.hint.imageUrlLabel": "![image](url)", - "xpack.siem.markdown.hint.italicsLabel": "_italics_", - "xpack.siem.markdown.hint.preformattedLabel": "```preformatted```", - "xpack.siem.markdown.hint.quoteLabel": ">引用", - "xpack.siem.markdown.hint.strikethroughLabel": "删除线", - "xpack.siem.markdown.hint.urlLabel": "[链接](url)", - "xpack.siem.markdownEditor.markdown": "Markdown", - "xpack.siem.markdownEditor.markdownInputHelp": "Markdown 语法帮助", - "xpack.siem.markdownEditor.preview": "预览", - "xpack.siem.ml.score.anomalousEntityTitle": "异常实体", - "xpack.siem.ml.score.anomalyJobTitle": "作业", - "xpack.siem.ml.score.detectedTitle": "已检测到", - "xpack.siem.ml.score.influencedByTitle": "影响因素", - "xpack.siem.ml.score.maxAnomalyScoreTitle": "最大异常分数", - "xpack.siem.ml.score.narrowToThisDateRangeLink": "缩小至此日期范围", - "xpack.siem.ml.score.viewInMachineLearningLink": "在 Machine Learning 中查看", - "xpack.siem.ml.table.detectorTitle": "作业名称", - "xpack.siem.ml.table.entityTitle": "实体", - "xpack.siem.ml.table.hostNameTitle": "主机名", - "xpack.siem.ml.table.influencedByTitle": "影响因素", - "xpack.siem.ml.table.networkNameTitle": "网络 IP", - "xpack.siem.ml.table.scoreTitle": "异常分数", - "xpack.siem.ml.table.timestampTitle": "时间戳", - "xpack.siem.modalAllErrors.close.button": "关闭", - "xpack.siem.modalAllErrors.seeAllErrors.button": "请参阅完整的错误信息", - "xpack.siem.modalAllErrors.title": "您的可视化有错误", - "xpack.siem.navigation.case": "案例", - "xpack.siem.navigation.detectionEngine": "检测", - "xpack.siem.navigation.hosts": "主机", - "xpack.siem.navigation.network": "网络", - "xpack.siem.navigation.overview": "概览", - "xpack.siem.navigation.timelines": "时间线", - "xpack.siem.network.dns.stackByUniqueSubdomain": "排名最前域(按 {groupByField})", - "xpack.siem.network.ipDetails.ipOverview.asDestinationDropDownOptionLabel": "作为目标", - "xpack.siem.network.ipDetails.ipOverview.asSourceDropDownOptionLabel": "作为源", - "xpack.siem.network.ipDetails.ipOverview.autonomousSystemTitle": "自治系统", - "xpack.siem.network.ipDetails.ipOverview.firstSeenTitle": "首次看到时间", - "xpack.siem.network.ipDetails.ipOverview.hostIdTitle": "主机 ID", - "xpack.siem.network.ipDetails.ipOverview.hostNameTitle": "主机名", - "xpack.siem.network.ipDetails.ipOverview.inspectTitle": "IP 概览", - "xpack.siem.network.ipDetails.ipOverview.ipReputationTitle": "信誉", - "xpack.siem.network.ipDetails.ipOverview.lastSeenTitle": "最后看到时间", - "xpack.siem.network.ipDetails.ipOverview.locationTitle": "位置", - "xpack.siem.network.ipDetails.ipOverview.maxAnomalyScoreByJobTitle": "最大异常分数(按作业)", - "xpack.siem.network.ipDetails.ipOverview.viewTalosIntelligenceTitle": "talosIntelligence.com", - "xpack.siem.network.ipDetails.ipOverview.viewVirusTotalTitle.": "virustotal.com", - "xpack.siem.network.ipDetails.ipOverview.viewWhoisTitle": "iana.org", - "xpack.siem.network.ipDetails.ipOverview.whoIsTitle": "WhoIs", - "xpack.siem.network.ipDetails.tlsTable.columns.issuerTitle": "颁发者", - "xpack.siem.network.ipDetails.tlsTable.columns.ja3FingerPrintTitle": "JA3 指纹", - "xpack.siem.network.ipDetails.tlsTable.columns.sha1FingerPrintTitle": "SHA1 指纹", - "xpack.siem.network.ipDetails.tlsTable.columns.subjectTitle": "主题", - "xpack.siem.network.ipDetails.tlsTable.columns.validUntilTitle": "失效日期", - "xpack.siem.network.ipDetails.tlsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.network.ipDetails.tlsTable.transportLayerSecurityTitle": "传输层安全", - "xpack.siem.network.ipDetails.tlsTable.unit": "{totalCount, plural, =1 {服务器证书} other {服务器证书}}", - "xpack.siem.network.ipDetails.usersTable.columns.documentCountTitle": "文档计数", - "xpack.siem.network.ipDetails.usersTable.columns.groupIdTitle": "组 ID", - "xpack.siem.network.ipDetails.usersTable.columns.groupNameTitle": "组名称", - "xpack.siem.network.ipDetails.usersTable.columns.userIdTitle": "ID", - "xpack.siem.network.ipDetails.usersTable.columns.userNameTitle": "用户", - "xpack.siem.network.ipDetails.usersTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.network.ipDetails.usersTable.unit": "{totalCount, plural, =1 {个用户} other {个用户}}", - "xpack.siem.network.ipDetails.usersTable.usersTitle": "用户", - "xpack.siem.network.kqlPlaceholder": "例如 source.ip:“foo”", - "xpack.siem.network.navigation.alertsTitle": "外部告警", - "xpack.siem.network.navigation.anomaliesTitle": "异常", - "xpack.siem.network.navigation.dnsTitle": "DNS", - "xpack.siem.network.navigation.flowsTitle": "Flows", - "xpack.siem.network.navigation.httpTitle": "HTTP", - "xpack.siem.network.navigation.tlsTitle": "TLS", - "xpack.siem.network.pageTitle": "网络", - "xpack.siem.networkDnsTable.column.bytesInTitle": "DNS 传入字节", - "xpack.siem.networkDnsTable.column.bytesOutTitle": "DNS 传出字节", - "xpack.siem.networkDnsTable.column.registeredDomain": "已注册域", - "xpack.siem.networkDnsTable.column.TotalQueriesTitle": "查询总数", - "xpack.siem.networkDnsTable.column.uniqueDomainsTitle": "唯一域", - "xpack.siem.networkDnsTable.helperTooltip": "其仅显示 DNS 协议流量,可用于捕获 DNS 数据外泄中使用的域。", - "xpack.siem.networkDnsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.networkDnsTable.select.includePtrRecords": "包括 PTR 记录", - "xpack.siem.networkDnsTable.title": "排名靠前的 DNS 域", - "xpack.siem.networkDnsTable.unit": "{totalCount, plural, =1 {个域} other {个域}}", - "xpack.siem.networkHttpTable.column.domainTitle": "域", - "xpack.siem.networkHttpTable.column.lastHostTitle": "上一主机", - "xpack.siem.networkHttpTable.column.lastSourceIpTitle": "上一源 IP", - "xpack.siem.networkHttpTable.column.methodTitle": "方法", - "xpack.siem.networkHttpTable.column.pathTitle": "路径", - "xpack.siem.networkHttpTable.column.requestsTitle": "请求", - "xpack.siem.networkHttpTable.column.statusTitle": "状态", - "xpack.siem.networkHttpTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {行} other {行}}", - "xpack.siem.networkHttpTable.title": "HTTP 请求", - "xpack.siem.networkHttpTable.unit": "{totalCount, plural, =1 {个请求} other {个请求}}", - "xpack.siem.networkTopCountriesTable.column.bytesInTitle": "传入字节", - "xpack.siem.networkTopCountriesTable.column.bytesOutTitle": "传出字节", - "xpack.siem.networkTopCountriesTable.column.countryTitle": "国家/地区", - "xpack.siem.networkTopCountriesTable.column.destinationIps": "目标 IP", - "xpack.siem.networkTopCountriesTable.column.flows": "Flows", - "xpack.siem.networkTopCountriesTable.column.sourceIps": "源 IP", - "xpack.siem.networkTopCountriesTable.heading.destinationCountries": "目标国家/地区", - "xpack.siem.networkTopCountriesTable.heading.sourceCountries": "源国家/地区", - "xpack.siem.networkTopCountriesTable.heading.unit": "{totalCount, plural, =1 {个国家或地区} other {个国家或地区}}", - "xpack.siem.networkTopCountriesTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.networkTopNFlowTable.column.asTitle": "自治系统", - "xpack.siem.networkTopNFlowTable.column.bytesInTitle": "传入字节", - "xpack.siem.networkTopNFlowTable.column.bytesOutTitle": "传出字节", - "xpack.siem.networkTopNFlowTable.column.destinationIpTitle": "目标 IP", - "xpack.siem.networkTopNFlowTable.column.domainTitle": "域", - "xpack.siem.networkTopNFlowTable.column.IpTitle": "IP", - "xpack.siem.networkTopNFlowTable.column.sourceIpTitle": "源 IP", - "xpack.siem.networkTopNFlowTable.destinationIps": "目标 IP", - "xpack.siem.networkTopNFlowTable.flows": "Flows", - "xpack.siem.networkTopNFlowTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.networkTopNFlowTable.sourceIps": "源 IP", - "xpack.siem.networkTopNFlowTable.unit": "{totalCount, plural, =1 {个 IP} other {个 IP}}", - "xpack.siem.newsFeed.advancedSettingsLinkTitle": "SIEM 高级设置", - "xpack.siem.newsFeed.noNewsMessage": "您当前的新闻源 URL 未返回最近的新闻。要更新 URL 或禁用安全新闻,您可以通过", - "xpack.siem.notes.addANotePlaceholder": "添加备注", - "xpack.siem.notes.addedANoteLabel": "已添加备注", - "xpack.siem.notes.addNoteButtonLabel": "添加备注", - "xpack.siem.notes.cancelButtonLabel": "取消", - "xpack.siem.notes.copyToClipboardButtonLabel": "复制到剪贴板", - "xpack.siem.notes.noteLabel": "注释", - "xpack.siem.notes.notesTitle": "备注", - "xpack.siem.notes.previewMarkdownTitle": "预览 (Markdown)", - "xpack.siem.notes.search.FilterByUserOrNotePlaceholder": "按用户或备注筛选", - "xpack.siem.open.timeline.allActionsTooltip": "所有操作", - "xpack.siem.open.timeline.batchActionsTitle": "批处理操作", - "xpack.siem.open.timeline.cancelButton": "取消", - "xpack.siem.open.timeline.collapseButton": "折叠", - "xpack.siem.open.timeline.deleteButton": "删除", - "xpack.siem.open.timeline.deleteSelectedButton": "删除选定", - "xpack.siem.open.timeline.deleteTimelineModalTitle": "删除“{title}”?", - "xpack.siem.open.timeline.deleteWarningLabel": "一旦删除,将无法恢复此时间线或其备注。", - "xpack.siem.open.timeline.descriptionTableHeader": "描述", - "xpack.siem.open.timeline.expandButton": "展开", - "xpack.siem.open.timeline.exportFileNameTitle": "timelines_export", - "xpack.siem.open.timeline.exportSelectedButton": "导出选定", - "xpack.siem.open.timeline.favoriteSelectedButton": "收藏所选", - "xpack.siem.open.timeline.favoritesTooltip": "收藏夹", - "xpack.siem.open.timeline.filterByTimelineTypesTitle": "仅 {timelineType}", - "xpack.siem.open.timeline.lastModifiedTableHeader": "最后修改时间", - "xpack.siem.open.timeline.missingSavedObjectIdTooltip": "缺失 savedObjectId", - "xpack.siem.open.timeline.modifiedByTableHeader": "修改者", - "xpack.siem.open.timeline.notesTooltip": "备注", - "xpack.siem.open.timeline.onlyFavoritesButtonLabel": "仅收藏夹", - "xpack.siem.open.timeline.openAsDuplicateTooltip": "复制时间线", - "xpack.siem.open.timeline.openTimelineButton": "打开时间线......", - "xpack.siem.open.timeline.openTimelineTitle": "打开时间线", - "xpack.siem.open.timeline.pinnedEventsTooltip": "置顶事件", - "xpack.siem.open.timeline.postedLabel": "已发表:", - "xpack.siem.open.timeline.refreshTitle": "刷新", - "xpack.siem.open.timeline.searchPlaceholder": "例如时间线名称或描述", - "xpack.siem.open.timeline.selectedTimelinesTitle": "已选择 {selectedTimelines} 条{selectedTimelines, plural, =1 {时间线} other {时间线}}", - "xpack.siem.open.timeline.showingLabel": "正在显示:", - "xpack.siem.open.timeline.showingNTimelinesLabel": "{totalSearchResultsCount} 条 {totalSearchResultsCount, plural, one {时间线} other {时间线}} {with}", - "xpack.siem.open.timeline.successfullyExportedTimelinesTitle": "已成功导出{totalTimelines, plural, =0 {全部时间线} =1 { {totalTimelines} 条时间线} other { {totalTimelines} 条时间线}}", - "xpack.siem.open.timeline.timelineNameTableHeader": "时间线名称", - "xpack.siem.open.timeline.untitledTimelineLabel": "未命名时间线", - "xpack.siem.open.timeline.withLabel": "具有", - "xpack.siem.open.timeline.zeroTimelinesMatchLabel": "0 个时间线匹配搜索条件", - "xpack.siem.overview.alertsGraphTitle": "外部告警计数", - "xpack.siem.overview.auditBeatAuditTitle": "审计", - "xpack.siem.overview.auditBeatFimTitle": "文件完整性模块", - "xpack.siem.overview.auditBeatLoginTitle": "登录", - "xpack.siem.overview.auditBeatPackageTitle": "软件包", - "xpack.siem.overview.auditBeatProcessTitle": "进程", - "xpack.siem.overview.auditBeatSocketTitle": "套接字", - "xpack.siem.overview.auditBeatUserTitle": "用户", - "xpack.siem.overview.endgameDnsTitle": "DNS", - "xpack.siem.overview.endgameFileTitle": "文件", - "xpack.siem.overview.endgameImageLoadTitle": "映像加载", - "xpack.siem.overview.endgameNetworkTitle": "网络", - "xpack.siem.overview.endgameProcessTitle": "进程", - "xpack.siem.overview.endgameRegistryTitle": "注册表", - "xpack.siem.overview.endgameSecurityTitle": "安全性", - "xpack.siem.overview.eventsTitle": "事件计数", - "xpack.siem.overview.feedbackText": "如果您对 Elastic SIEM 体验有任何建议,请随时{feedback}。", - "xpack.siem.overview.feedbackText.feedbackLinkText": "在线提交反馈", - "xpack.siem.overview.feedbackTitle": "反馈", - "xpack.siem.overview.filebeatCiscoTitle": "Cisco", - "xpack.siem.overview.filebeatNetflowTitle": "NetFlow", - "xpack.siem.overview.filebeatPanwTitle": "Palo Alto Networks", - "xpack.siem.overview.fileBeatSuricataTitle": "Suricata", - "xpack.siem.overview.filebeatSystemModuleTitle": "系统模块", - "xpack.siem.overview.fileBeatZeekTitle": "Zeek", - "xpack.siem.overview.hostsAction": "查看主机", - "xpack.siem.overview.hostStatGroupAuditbeat": "Auditbeat", - "xpack.siem.overview.hostStatGroupElasticEndpointSecurity": "Elastic Endpoint Security", - "xpack.siem.overview.hostStatGroupFilebeat": "Filebeat", - "xpack.siem.overview.hostStatGroupWinlogbeat": "Winlogbeat", - "xpack.siem.overview.hostsTitle": "主机事件", - "xpack.siem.overview.myRecentlyReportedCasesButtonLabel": "我最近报告的案例", - "xpack.siem.overview.networkAction": "查看网络", - "xpack.siem.overview.networkStatGroupAuditbeat": "Auditbeat", - "xpack.siem.overview.networkStatGroupFilebeat": "Filebeat", - "xpack.siem.overview.networkStatGroupPacketbeat": "Packetbeat", - "xpack.siem.overview.networkTitle": "网络事件", - "xpack.siem.overview.newsFeedSidebarTitle": "安全新闻", - "xpack.siem.overview.overviewHost.hostsSubtitle": "正在显示:{formattedHostEventsCount} 个{hostEventsCount, plural, one {事件} other {事件}}", - "xpack.siem.overview.overviewNetwork.networkSubtitle": "正在显示:{formattedNetworkEventsCount} 个{networkEventsCount, plural, one {事件} other {事件}}", - "xpack.siem.overview.packetBeatDnsTitle": "DNS", - "xpack.siem.overview.packetBeatFlowTitle": "流", - "xpack.siem.overview.packetbeatTLSTitle": "TLS", - "xpack.siem.overview.pageSubtitle": "Elastic Stack 的安全信息和事件管理功能", - "xpack.siem.overview.pageTitle": "SIEM", - "xpack.siem.overview.recentCasesSidebarTitle": "最近案例", - "xpack.siem.overview.recentlyCreatedCasesButtonLabel": "最近创建的案例", - "xpack.siem.overview.recentTimelinesSidebarTitle": "最近的时间线", - "xpack.siem.overview.showTopTooltip": "显示热门{fieldName}", - "xpack.siem.overview.startedText": "欢迎使用安全信息和事件管理 (SIEM)。首先,查看我们的 {docs} 或 {data}。有关即将推出的功能和教程,确保查看我们的{siemSolution}页。", - "xpack.siem.overview.startedText.dataLinkText": "正在采集数据", - "xpack.siem.overview.startedText.docsLinkText": "文档", - "xpack.siem.overview.startedText.siemSolutionLinkText": "SIEM 解决方案", - "xpack.siem.overview.startedTitle": "入门", - "xpack.siem.overview.topNLabel": "热门{fieldName}", - "xpack.siem.overview.viewAlertsButtonLabel": "查看告警", - "xpack.siem.overview.viewEventsButtonLabel": "查看事件", - "xpack.siem.overview.winlogbeatMWSysmonOperational": "Microsoft-Windows-Sysmon/Operational", - "xpack.siem.overview.winlogbeatSecurityTitle": "安全", - "xpack.siem.pages.common.emptyActionPrimary": "使用 Beats 添加数据", - "xpack.siem.pages.common.emptyActionSecondary": "查看入门指南", - "xpack.siem.pages.common.emptyMessage": "要开始使用安全信息和事件管理 (SIEM),您将需要将 SIEM 相关数据以 Elastic Common Schema (ECS) 格式添加到 Elastic Stack。较为轻松的入门方式是安装并配置我们称作 Beats 的数据采集器。让我们现在就动手!", - "xpack.siem.pages.common.emptyTitle": "欢迎使用 SIEM。让我们教您如何入门。", - "xpack.siem.pages.fourohfour.noContentFoundDescription": "未找到任何内容", - "xpack.siem.paginatedTable.rowsButtonLabel": "每页行数", - "xpack.siem.paginatedTable.showingSubtitle": "显示", - "xpack.siem.paginatedTable.tooManyResultsToastText": "缩减您的查询范围,以更好地筛选结果", - "xpack.siem.paginatedTable.tooManyResultsToastTitle": " - 结果过多", - "xpack.siem.recentCases.commentsTooltip": "注释", - "xpack.siem.recentCases.noCasesMessage": "尚未创建任何案例。以侦探的眼光", - "xpack.siem.recentCases.startNewCaseLink": "建立新案例", - "xpack.siem.recentCases.viewAllCasesLink": "查看所有案例", - "xpack.siem.recentTimelines.errorRetrievingUserDetailsMessage": "最近的时间线:检索用户详情时发生错误", - "xpack.siem.recentTimelines.favoritesButtonLabel": "收藏夹", - "xpack.siem.recentTimelines.lastUpdatedButtonLabel": "最后更新时间", - "xpack.siem.recentTimelines.noFavoriteTimelinesMessage": "您尚未收藏任何时间线。实际操练一下,开始狩猎威胁!", - "xpack.siem.recentTimelines.notesTooltip": "备注", - "xpack.siem.recentTimelines.noTimelinesMessage": "您尚未创建任何时间线。实际操练一下,开始狩猎威胁!", - "xpack.siem.recentTimelines.openAsDuplicateTooltip": "作为时间线副本打开", - "xpack.siem.recentTimelines.pinnedEventsTooltip": "置顶事件", - "xpack.siem.recentTimelines.untitledTimelineLabel": "未命名时间线", - "xpack.siem.recentTimelines.viewAllTimelinesLink": "查看所有时间线", - "xpack.siem.source.destination.packetsLabel": "pkts", - "xpack.siem.system.acceptedAConnectionViaDescription": "已接受连接,通过", - "xpack.siem.system.acceptedDescription": "已接受该用户 - 通过", - "xpack.siem.system.attemptedLoginDescription": "已尝试登录 - 通过", - "xpack.siem.system.createdFileDescription": "已创建文件", - "xpack.siem.system.deletedFileDescription": "已删除文件", - "xpack.siem.system.disconnectedViaDescription": "已断开连接,通过", - "xpack.siem.system.errorDescription": "遇到错误 -", - "xpack.siem.system.existingPackageDescription": "正在使用现有软件包", - "xpack.siem.system.existingProcessDescription": "正在运行进程", - "xpack.siem.system.existingSocketDescription": "正在使用现有套接字 - 来自", - "xpack.siem.system.existingUserDescription": "是现有用户", - "xpack.siem.system.hostDescription": "主机信息", - "xpack.siem.system.invalidDescription": "已尝试无效使用", - "xpack.siem.system.loggedOutDescription": "已注销 - 通过", - "xpack.siem.system.packageInstalledDescription": "已安装软件包", - "xpack.siem.system.packageRemovedDescription": "已移除软件包", - "xpack.siem.system.packageSystemStartedDescription": "系统已启动", - "xpack.siem.system.packageUpdatedDescription": "已更新软件包", - "xpack.siem.system.processErrorDescription": "遇到进程错误 -", - "xpack.siem.system.processStartedDescription": "已启动进程", - "xpack.siem.system.processStoppedDescription": "已停止进程", - "xpack.siem.system.socketClosedDescription": "已关闭套接字 -", - "xpack.siem.system.socketOpenedDescription": "已打开套接字 -", - "xpack.siem.system.systemDescription": "系统", - "xpack.siem.system.terminatedProcessDescription": "已终止进程", - "xpack.siem.system.userAddedDescription": "用户已添加", - "xpack.siem.system.userChangedDescription": "用户已更改", - "xpack.siem.system.userRemovedDescription": "已移除", - "xpack.siem.system.usingDescription": "使用", - "xpack.siem.system.viaDescription": "通过", - "xpack.siem.system.viaParentProcessDescription": "通过父进程", - "xpack.siem.system.wasAuthorizedToUseDescription": "有权使用", - "xpack.siem.system.withExitCodeDescription": "退出代码为", - "xpack.siem.system.withResultDescription": ",结果为", - "xpack.siem.tables.rowItemHelper.moreDescription": "未显示", - "xpack.siem.timeline.autosave.warning.description": "其他用户已更改此时间线。您所做的任何更改不会自动保存,直至您刷新了此时间线以吸收这些更改。", - "xpack.siem.timeline.autosave.warning.refresh.title": "刷新时间线", - "xpack.siem.timeline.autosave.warning.title": "刷新后才会启用自动保存", - "xpack.siem.timeline.body.actions.collapseAriaLabel": "折叠", - "xpack.siem.timeline.body.actions.expandAriaLabel": "展开", - "xpack.siem.timeline.body.copyToClipboardButtonLabel": "复制到剪贴板", - "xpack.siem.timeline.body.notes.addOrViewNotesForThisEventTooltip": "添加或查看此事件的备注", - "xpack.siem.timeline.body.pinning.pinnedTooltip": "置顶事件", - "xpack.siem.timeline.body.pinning.pinnnedWithNotesTooltip": "此事件无法固定,因为其有备注", - "xpack.siem.timeline.body.pinning.unpinnedTooltip": "非置顶事件", - "xpack.siem.timeline.body.renderers.dns.askedForDescription": "请求过", - "xpack.siem.timeline.body.renderers.dns.responseCodeDescription": "响应代码:", - "xpack.siem.timeline.body.renderers.dns.viaDescription": "通过", - "xpack.siem.timeline.body.renderers.dns.whichResolvedToDescription": ",其已解析为", - "xpack.siem.timeline.body.renderers.dns.withQuestionTypeDescription": ",问题类型为", - "xpack.siem.timeline.body.renderers.endgame.aLoginWasAttemptedUsingExplicitCredentialsDescription": "已使用显式凭据尝试登录", - "xpack.siem.timeline.body.renderers.endgame.asRequestedBySubjectDescription": ",如主语所请求", - "xpack.siem.timeline.body.renderers.endgame.loggedOffDescription": "已注销", - "xpack.siem.timeline.body.renderers.endgame.logonTypeBatchDescription": "批量", - "xpack.siem.timeline.body.renderers.endgame.logonTypeCachedInteractiveDescription": "缓存交互", - "xpack.siem.timeline.body.renderers.endgame.logonTypeInteractiveDescription": "交互", - "xpack.siem.timeline.body.renderers.endgame.logonTypeNetworkCleartextDescription": "网络明文", - "xpack.siem.timeline.body.renderers.endgame.logonTypeNetworkDescription": "网络", - "xpack.siem.timeline.body.renderers.endgame.logonTypeNewCredentialsDescription": "新凭据", - "xpack.siem.timeline.body.renderers.endgame.logonTypeRemoteInteractiveDescription": "远程交互", - "xpack.siem.timeline.body.renderers.endgame.logonTypeServiceDescription": "服务", - "xpack.siem.timeline.body.renderers.endgame.logonTypeUnlockDescription": "解锁", - "xpack.siem.timeline.body.renderers.endgame.subjectLogonIdDescription": "主语登录 ID", - "xpack.siem.timeline.body.renderers.endgame.successfullyLoggedInDescription": "已成功登录", - "xpack.siem.timeline.body.renderers.endgame.targetLogonIdDescription": "目标登录 ID", - "xpack.siem.timeline.body.renderers.endgame.toDescription": "到", - "xpack.siem.timeline.body.renderers.endgame.usingLogonTypeDescription": "使用登录类型", - "xpack.siem.timeline.body.renderers.endgame.viaDescription": "通过", - "xpack.siem.timeline.body.renderers.endgame.withSpecialPrivilegesDescription": "使用特殊权限,", - "xpack.siem.timeline.callOut.unauthorized.message.description": "您需要在 SIEM 内自动保存时间线的权限,但您可以继续使用该时间线搜索和筛选安全事件", - "xpack.siem.timeline.categoryTooltip": "类别", - "xpack.siem.timeline.defaultTimelineDescription": "创建新时间线时默认提供的时间线。", - "xpack.siem.timeline.defaultTimelineTitle": "默认空白时间线", - "xpack.siem.timeline.descriptionTooltip": "描述", - "xpack.siem.timeline.destination": "目标", - "xpack.siem.timeline.eventsSelect.actions.pinSelected": "固定所选", - "xpack.siem.timeline.eventsSelect.actions.selectAll": "全部", - "xpack.siem.timeline.eventsSelect.actions.selectNone": "无", - "xpack.siem.timeline.eventsSelect.actions.selectPinned": "已固定", - "xpack.siem.timeline.eventsSelect.actions.selectUnpinned": "取消固定", - "xpack.siem.timeline.eventsSelect.actions.unpinSelected": "取消固定所选", - "xpack.siem.timeline.expandableEvent.copyToClipboardToolTip": "复制到剪贴板", - "xpack.siem.timeline.expandableEvent.eventToolTipTitle": "时间", - "xpack.siem.timeline.fieldTooltip": "字段", - "xpack.siem.timeline.flyout.header.closeTimelineButtonLabel": "关闭时间线", - "xpack.siem.timeline.flyout.pane.removeColumnButtonLabel": "删除列", - "xpack.siem.timeline.flyout.pane.timelinePropertiesAriaLabel": "时间线属性", - "xpack.siem.timeline.properties.descriptionPlaceholder": "描述", - "xpack.siem.timeline.properties.descriptionTooltip": "此时间线中事件和备注的摘要", - "xpack.siem.timeline.properties.favoriteTooltip": "收藏", - "xpack.siem.timeline.properties.historyLabel": "历史记录", - "xpack.siem.timeline.properties.historyToolTip": "与此时间线相关的操作历史记录(按时间顺序排列)", - "xpack.siem.timeline.properties.inspectTimelineTitle": "鏃堕棿绾", - "xpack.siem.timeline.properties.isViewingTooltip": "正在查看此时间线", - "xpack.siem.timeline.properties.lockDatePickerDescription": "将日期选取器锁定到全局日期选取器", - "xpack.siem.timeline.properties.lockDatePickerTooltip": "禁用当前查看的页面和您的时间线之间的日期/时间范围同步", - "xpack.siem.timeline.properties.newCaseButtonLabel": "将时间线附加到新案例", - "xpack.siem.timeline.properties.newTimelineButtonLabel": "创建新的时间线", - "xpack.siem.timeline.properties.notAFavoriteTooltip": "取消收藏", - "xpack.siem.timeline.properties.notesButtonLabel": "备注", - "xpack.siem.timeline.properties.notesToolTip": "添加并复查此时间线的备注。也可以向事件添加备注。", - "xpack.siem.timeline.properties.streamLiveButtonLabel": "实时流式传输", - "xpack.siem.timeline.properties.streamLiveToolTip": "新数据到达时更新时间线", - "xpack.siem.timeline.properties.timelineDescription": "时间线描述", - "xpack.siem.timeline.properties.timelineTitleAriaLabel": "时间线标题", - "xpack.siem.timeline.properties.titleTitle": "标题", - "xpack.siem.timeline.properties.unlockDatePickerDescription": "从全局日期选取器解除锁定日期选取器", - "xpack.siem.timeline.properties.unlockDatePickerTooltip": "启用当前查看的页面和您的时间线之间的日期/时间范围同步", - "xpack.siem.timeline.properties.untitledTimelinePlaceholder": "未命名时间线", - "xpack.siem.timeline.protocol": "协议", - "xpack.siem.timeline.rangePicker.oneDay": "1 日", - "xpack.siem.timeline.rangePicker.oneMonth": "1 个月", - "xpack.siem.timeline.rangePicker.oneWeek": "1 周", - "xpack.siem.timeline.rangePicker.oneYear": "1 年", - "xpack.siem.timeline.searchOrFilter.eventTypeAllEvent": "所有事件", - "xpack.siem.timeline.searchOrFilter.eventTypeRawEvent": "原始事件", - "xpack.siem.timeline.searchOrFilter.eventTypeSignalEvent": "信号事件", - "xpack.siem.timeline.searchOrFilter.filterDescription": "来自上述数据提供程序的事件按相邻 KQL 进行筛选", - "xpack.siem.timeline.searchOrFilter.filterKqlPlaceholder": "筛选事件", - "xpack.siem.timeline.searchOrFilter.filterKqlSelectedText": "筛选", - "xpack.siem.timeline.searchOrFilter.filterKqlTooltip": "来自上述数据提供程序的事件按此 KQL 进行筛选", - "xpack.siem.timeline.searchOrFilter.filterOrSearchWithKql": "使用 KQL 筛选或搜索", - "xpack.siem.timeline.searchOrFilter.searchDescription": "来自上述数据提供程序的事件与来自相邻 KQL 的结果合并", - "xpack.siem.timeline.searchOrFilter.searchKqlPlaceholder": "搜索事件", - "xpack.siem.timeline.searchOrFilter.searchKqlSelectedText": "搜索", - "xpack.siem.timeline.searchOrFilter.searchKqlTooltip": "来自上述数据提供程序的事件与来自此 KQL 的结果合并", - "xpack.siem.timeline.source": "源", - "xpack.siem.timeline.tcp": "TCP", - "xpack.siem.timeline.typeTooltip": "类型", - "xpack.siem.timelines.allTimelines.errorFetchingTimelinesTitle": "无法查询所有时间线数据", - "xpack.siem.timelines.allTimelines.importTimelineTitle": "导入时间线", - "xpack.siem.timelines.allTimelines.panelTitle": "所有时间线", - "xpack.siem.timelines.components.importTimelineModal.importFailedDetailedTitle": "时间线 ID:{id}\n 状态代码:{statusCode}\n 消息:{message}", - "xpack.siem.timelines.components.importTimelineModal.importFailedTitle": "无法导入时间线", - "xpack.siem.timelines.components.importTimelineModal.importTimelineTitle": "导入时间线", - "xpack.siem.timelines.components.importTimelineModal.importTitle": "导入时间线……", - "xpack.siem.timelines.components.importTimelineModal.initialPromptTextDescription": "选择或拖放有效的 rules_export.ndjson 文件", - "xpack.siem.timelines.components.importTimelineModal.overwriteDescription": "自动覆盖具有相同时间线 ID 的已保存对象", - "xpack.siem.timelines.components.importTimelineModal.selectTimelineDescription": "选择要导入的 SIEM 时间线(如从“时间线”视图导出的)", - "xpack.siem.timelines.components.importTimelineModal.successfullyImportedTimelinesTitle": "已成功导入 {totalCount} 条{totalCount, plural, =1 {时间线} other {时间线}}", - "xpack.siem.timelines.components.tabs.templatesTitle": "模板", - "xpack.siem.timelines.components.tabs.timelinesTitle": "时间线", - "xpack.siem.timelines.pageTitle": "时间线", - "xpack.siem.topN.allEventsSelectLabel": "所有事件", - "xpack.siem.topN.closeButtonLabel": "关闭", - "xpack.siem.topN.rawEventsSelectLabel": "原始事件", - "xpack.siem.uiSettings.defaultAnomalyScoreDescription": "

在显示异常之前要超过的默认异常分数阈值。

有效值:0 到 100。

", - "xpack.siem.uiSettings.defaultAnomalyScoreLabel": "默认异常阈值", - "xpack.siem.uiSettings.defaultIndexDescription": "

SIEM 应用要从其中搜索事件的 Elasticsearch 索引逗号分隔列表。

", - "xpack.siem.uiSettings.defaultIndexLabel": "默认索引", - "xpack.siem.uiSettings.defaultRefreshIntervalDescription": "

SIEM 时间筛选的默认刷新时间间隔(毫秒)。

", - "xpack.siem.uiSettings.defaultRefreshIntervalLabel": "时间筛选刷新时间间隔", - "xpack.siem.uiSettings.defaultTimeRangeDescription": "

SIEM 时间筛选中的默认时间期间。

", - "xpack.siem.uiSettings.defaultTimeRangeLabel": "时间筛选默认值", - "xpack.siem.uiSettings.enableNewsFeedDescription": "

启用新闻源

", - "xpack.siem.uiSettings.enableNewsFeedLabel": "新闻源", - "xpack.siem.uiSettings.ipReputationLinks": "IP 信誉链接", - "xpack.siem.uiSettings.ipReputationLinksDescription": "用于构建要显示在“IP 详细信息”页面上的信誉 URL 列表的 URL 模板数组。", - "xpack.siem.uiSettings.newsFeedUrl": "新闻源 URL", - "xpack.siem.uiSettings.newsFeedUrlDescription": "

将从此 URL 检索新闻源内容

", - "xpack.siem.uncommonProcessTable.hostsTitle": "主机", - "xpack.siem.uncommonProcessTable.lastCommandTitle": "上一命令", - "xpack.siem.uncommonProcessTable.lastUserTitle": "上一用户", - "xpack.siem.uncommonProcessTable.nameTitle": "名称", - "xpack.siem.uncommonProcessTable.numberOfHostsTitle": "主机数目", - "xpack.siem.uncommonProcessTable.numberOfInstances": "实例", - "xpack.siem.uncommonProcessTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", - "xpack.siem.uncommonProcessTable.unit": "{totalCount, plural, =1 {个进程} other {个进程}}", - "xpack.siem.zeek.othDescription": "未看到 SYN,仅中游流量", - "xpack.siem.zeek.rejDescription": "已拒绝连接尝试", - "xpack.siem.zeek.rstoODescription": "连接已建立,发起方已中止(已发送 RST)", - "xpack.siem.zeek.rstosoDescription": "发起方已发送 SYN,后跟 RST,响应方未发送 SYN-ACK", - "xpack.siem.zeek.rstrDescription": "已建立,响应方已中止", - "xpack.siem.zeek.rstrhDescription": "响应方已发送 SYN ACK,后跟 RST,(假设)发起方未发送 SYN", - "xpack.siem.zeek.s0Description": "已看到连接尝试,无答复", - "xpack.siem.zeek.s1Description": "连接已建立,未终止", - "xpack.siem.zeek.s2Description": "连接已建立,已看到发起方的关闭尝试(但没有响应方的答复)", - "xpack.siem.zeek.s3Description": "连接已建立,已看到响应方的关闭尝试(但没有发起方的答复)", - "xpack.siem.zeek.sfDescription": "正常 SYN/FIN 完成", - "xpack.siem.zeek.shDescription": "发起方已发送 SYN,后跟 FIN,响应方未发送 SYN ACK", - "xpack.siem.zeek.shrDescription": "响应方已发送 SYN ACK,后跟 FIN,发起方未发送 SYN", + "xpack.securitySolution.add_filter_to_global_search_bar.filterForValueHoverAction": "筛留值", + "xpack.securitySolution.add_filter_to_global_search_bar.filterOutValueHoverAction": "筛除值", + "xpack.securitySolution.alertsView.alertsDocumentType": "外部告警", + "xpack.securitySolution.alertsView.alertsGraphTitle": "外部告警计数", + "xpack.securitySolution.alertsView.alertsStackByOptions.module": "模块", + "xpack.securitySolution.alertsView.alertsTableTitle": "外部告警", + "xpack.securitySolution.alertsView.categoryLabel": "类别", + "xpack.securitySolution.alertsView.errorFetchingAlertsData": "无法查询告警数据", + "xpack.securitySolution.alertsView.moduleLabel": "模块", + "xpack.securitySolution.alertsView.showing": "显示", + "xpack.securitySolution.alertsView.totalCountOfAlerts": "个外部告警匹配搜索条件", + "xpack.securitySolution.alertsView.unit": "个外部{totalCount, plural, =1 {告警} other {告警}}", + "xpack.securitySolution.andOrBadge.and": "AND", + "xpack.securitySolution.andOrBadge.or": "OR", + "xpack.securitySolution.anomaliesTable.table.anomaliesDescription": "异常", + "xpack.securitySolution.anomaliesTable.table.anomaliesTooltip": "异常表无法通过 Security 全局 KQL 搜索进行筛选。", + "xpack.securitySolution.anomaliesTable.table.showingDescription": "显示", + "xpack.securitySolution.anomaliesTable.table.unit": "{totalCount, plural, =1 {个异常} other {个异常}}", + "xpack.securitySolution.auditd.abortedAuditStartupDescription": "已中止审计启动", + "xpack.securitySolution.auditd.accessErrorDescription": "访问错误", + "xpack.securitySolution.auditd.accessPermissionDescription": "访问权限", + "xpack.securitySolution.auditd.accessResultDescription": "访问结果", + "xpack.securitySolution.auditd.acquiredCredentialsDescription": "已获得凭据 - 至", + "xpack.securitySolution.auditd.adddedGroupAccountUsingDescription": "已添加组帐户 - 使用", + "xpack.securitySolution.auditd.addedUserAccountDescription": "已添加用户帐户", + "xpack.securitySolution.auditd.allocatedMemoryForDescription": "已分配内存 - 为", + "xpack.securitySolution.auditd.asDescription": "作为", + "xpack.securitySolution.auditd.assignedUserRoleToDescription": "已将用户角色分配给", + "xpack.securitySolution.auditd.assignedVmIdDescription": "已分配 vm id", + "xpack.securitySolution.auditd.assignedVMResourceDescription": "已分配 vm 资源", + "xpack.securitySolution.auditd.attemptedLoginDescription": "已尝试登录 - 通过", + "xpack.securitySolution.auditd.attemptedLoginFromUnusalPlaceDescription": "尝试异常位置的登录", + "xpack.securitySolution.auditd.attemptedLoginFromUnusualHourDescription": "尝试异常时段的登录", + "xpack.securitySolution.auditd.auditErrorDescription": "审计错误", + "xpack.securitySolution.auditd.authenticatedToGroupDescription": "已验证到组", + "xpack.securitySolution.auditd.authenticatedUsingDescription": "已验证 - 使用", + "xpack.securitySolution.auditd.bootedSystemDescription": "已启动系统", + "xpack.securitySolution.auditd.boundSocketFromDescription": "绑定套接字 - 来自", + "xpack.securitySolution.auditd.causedMacPolicyErrorDescription": "已导致 mac 策略错误", + "xpack.securitySolution.auditd.changedAuditConfigurationDescription": "已更改审计配置", + "xpack.securitySolution.auditd.changedAuditFeatureDescription": "已更改审计功能", + "xpack.securitySolution.auditd.changedConfigurationWIthDescription": "已更改配置", + "xpack.securitySolution.auditd.ChangedFileAttributesOfDescription": "已更改文件属性 -", + "xpack.securitySolution.auditd.changedFilePermissionOfDescription": "已更改文件权限 -", + "xpack.securitySolution.auditd.changedGroupDescription": "已更改组", + "xpack.securitySolution.auditd.changedGroupPasswordDescription": "已更改组密码", + "xpack.securitySolution.auditd.changedIdentityUsingDescription": "已更改身份 - 使用", + "xpack.securitySolution.auditd.changedLoginIdToDescription": "已将登录 id 更改为", + "xpack.securitySolution.auditd.changedMacConfigurationDescription": "已更改 mac 配置", + "xpack.securitySolution.auditd.changedPasswordWithDescription": "已更改密码 -", + "xpack.securitySolution.auditd.changedRoleUsingDescription": "已更改角色 - 使用", + "xpack.securitySolution.auditd.changedSeLinuxBooleanDescription": "已更改 selinux 布尔值", + "xpack.securitySolution.auditd.changedSelinuxEnforcementDescription": "已 更改 selinux 强制", + "xpack.securitySolution.auditd.changedSystemNameDescription": "已更改系统名称", + "xpack.securitySolution.auditd.changedSystemTimeWithDescription": "已更改系统时间 -", + "xpack.securitySolution.auditd.changedTimeStampOfDescription": "已更改时间戳 -", + "xpack.securitySolution.auditd.changedToRunLevelWithDescription": "已更改到运行级别 -", + "xpack.securitySolution.auditd.changedUserIdDescription": "已更改用户 id", + "xpack.securitySolution.auditd.changeidleOwernshipOfDescription": "已更改文件所有权 -", + "xpack.securitySolution.auditd.checkedFileSystemMetadataOfDescription": "已检查文件系统元数据 -", + "xpack.securitySolution.auditd.checkedIntegrityOfDescription": "已更改完整性 -", + "xpack.securitySolution.auditd.chedckedMetaDataOfDescription": "已更改元数据 -", + "xpack.securitySolution.auditd.connectedUsingDescription": "已连接 - 使用", + "xpack.securitySolution.auditd.crashedProgramDescription": "已崩溃程序", + "xpack.securitySolution.auditd.createdDirectoryDescription": "已创建目录", + "xpack.securitySolution.auditd.createdVmImageDescription": "已创建 vm 映像", + "xpack.securitySolution.auditd.cryptoOfficerLoggedInDescription": "加密员已登录", + "xpack.securitySolution.auditd.cryptoOfficerLoggedOutDescription": "加密员已注销", + "xpack.securitySolution.auditd.deletedDescription": "已删除", + "xpack.securitySolution.auditd.deletedGroupAccountUsingDescription": "已删除组帐户 - 使用", + "xpack.securitySolution.auditd.deletedUserAccountUsingDescription": "已删除用户帐户 - 使用", + "xpack.securitySolution.auditd.deletedVmImageDescription": "已删除 vm 映像", + "xpack.securitySolution.auditd.disposedCredentialsDescription": "已将凭据处置到", + "xpack.securitySolution.auditd.endedFromDescription": "结束自", + "xpack.securitySolution.auditd.errorFromDescription": "错误来自", + "xpack.securitySolution.auditd.executedDescription": "已执行", + "xpack.securitySolution.auditd.executionOfForbiddenProgramDescription": "已禁止程序的执行", + "xpack.securitySolution.auditd.failedLoginTooManyTimesDescription": "由于登录次数过多,登录失败", + "xpack.securitySolution.auditd.inDescription": "传入", + "xpack.securitySolution.auditd.initializedAuditSubsystemDescription": "已初始化审计子系统", + "xpack.securitySolution.auditd.issuedVmControlDescription": "已签发 vm 控制", + "xpack.securitySolution.auditd.killedProcessIdDescription": "已终止进程 id -", + "xpack.securitySolution.auditd.ListeningForConnectionsUsingDescription": "正在侦听连接 - 使用", + "xpack.securitySolution.auditd.loadedFirewallRuleDescription": "已加载防火墙规则", + "xpack.securitySolution.auditd.loadedMacPolicyDescription": "已加载 mac 策略", + "xpack.securitySolution.auditd.loadedSeLinuxPolicyDescription": "已加载 selinux 策略", + "xpack.securitySolution.auditd.loaedKernelModuleOfDescription": "已加载内核模块 -", + "xpack.securitySolution.auditd.lockedAccountDescription": "已锁定帐户", + "xpack.securitySolution.auditd.loggedOutDescription": "已注销", + "xpack.securitySolution.auditd.macPermissionDescription": "mac 权限", + "xpack.securitySolution.auditd.madeDeviceWithDescription": "已制作设备 -", + "xpack.securitySolution.auditd.migratedVmFromDescription": "已迁移 vm - 从", + "xpack.securitySolution.auditd.migratedVmToDescription": "已将 vm 迁移至", + "xpack.securitySolution.auditd.modifiedGroupAccountDescription": "已修改组帐户", + "xpack.securitySolution.auditd.modifiedLevelOfDescription": "已修改级别 -", + "xpack.securitySolution.auditd.modifiedRoleDescription": "已修改角色", + "xpack.securitySolution.auditd.modifiedUserAccountDescription": "已修改用户帐户", + "xpack.securitySolution.auditd.mountedDescription": "已安装", + "xpack.securitySolution.auditd.negotiatedCryptoKeyDescription": "已协商加密密钥", + "xpack.securitySolution.auditd.nonExistentDescription": "至未知进程", + "xpack.securitySolution.auditd.OpenedFileDescription": "已打开文件", + "xpack.securitySolution.auditd.openedTooManySessionsDescription": "已打开过多会话", + "xpack.securitySolution.auditd.overrodeLabelOfDescription": "已覆盖标签 -", + "xpack.securitySolution.auditd.promiscuousModeDescription": "已更改设备上的混杂模式 - 使用", + "xpack.securitySolution.auditd.ranCommandDescription": "已运行命令", + "xpack.securitySolution.auditd.receivedFromDescription": "已接收 - 从", + "xpack.securitySolution.auditd.reconfiguredAuditDescription": "已重新配置审计", + "xpack.securitySolution.auditd.refreshedCredentialsForDescription": "已刷新凭据 -", + "xpack.securitySolution.auditd.relabeledFileSystemDescription": "已重新标记文件系统", + "xpack.securitySolution.auditd.remoteAuditConnectedDescription": "远程审计已连接", + "xpack.securitySolution.auditd.remoteAuditDisconnectedDescription": "远程审计已断开连接", + "xpack.securitySolution.auditd.removedUserRoleFromDescription": "已移除用户角色 - 从", + "xpack.securitySolution.auditd.renamedDescription": "已重命名", + "xpack.securitySolution.auditd.resumedAuditLoggingDescription": "已恢复审计日志记录", + "xpack.securitySolution.auditd.rotatedAuditLogsDescription": "rotated-audit-logs", + "xpack.securitySolution.auditd.scheduledPolicyOFDescription": "已排定策略 -", + "xpack.securitySolution.auditd.sentMessageDescription": "已发送消息", + "xpack.securitySolution.auditd.sentTestDescription": "已发送测试", + "xpack.securitySolution.auditd.sentToDescription": "已发送至", + "xpack.securitySolution.auditd.sessionDescription": "会话", + "xpack.securitySolution.auditd.shutDownAuditDescription": "关闭审计", + "xpack.securitySolution.auditd.shutdownSystemDescription": "关闭系统", + "xpack.securitySolution.auditd.startedAtDescription": "已启动", + "xpack.securitySolution.auditd.startedAuditDescription": "已启动审计", + "xpack.securitySolution.auditd.startedCryptoSessionDescription": "已启动加密会话", + "xpack.securitySolution.auditd.startedServiceDescription": "已启动服务", + "xpack.securitySolution.auditd.stoppedServiceDescription": "已停止服务", + "xpack.securitySolution.auditd.suspiciousProgramDescription": "已使用可疑程序", + "xpack.securitySolution.auditd.symLinkedDescription": "已象征性链接", + "xpack.securitySolution.auditd.testedFileSystemIntegrityDescription": "已测试文件系统完整性", + "xpack.securitySolution.auditd.unknownDescription": "未知", + "xpack.securitySolution.auditd.unloadedKernelModuleOfDescription": "已加载内核模块", + "xpack.securitySolution.auditd.unlockedAccountDescription": "已解锁帐户", + "xpack.securitySolution.auditd.unmountedDescription": "已卸载", + "xpack.securitySolution.auditd.usingDescription": "使用", + "xpack.securitySolution.auditd.violatedAppArmorPolicyFromDescription": "已违反应用防护策略 - 来自", + "xpack.securitySolution.auditd.violatedSeccompPolicyWithDescription": "已违反 seccomp 策略 -", + "xpack.securitySolution.auditd.violatedSeLinuxPolicyDescription": "已违反 selinux 策略", + "xpack.securitySolution.auditd.wasAuthorizedToUseDescription": "有权使用", + "xpack.securitySolution.auditd.withResultDescription": ",结果为", + "xpack.securitySolution.authenticationsTable.authenticationFailures": "身份验证", + "xpack.securitySolution.authenticationsTable.failures": "失败", + "xpack.securitySolution.authenticationsTable.lastFailedDestination": "上一失败目标", + "xpack.securitySolution.authenticationsTable.lastFailedSource": "上一失败源", + "xpack.securitySolution.authenticationsTable.lastFailedTime": "上次失败", + "xpack.securitySolution.authenticationsTable.lastSuccessfulDestination": "上一成功目标", + "xpack.securitySolution.authenticationsTable.lastSuccessfulSource": "上一成功源", + "xpack.securitySolution.authenticationsTable.lastSuccessfulTime": "上次成功", + "xpack.securitySolution.authenticationsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.authenticationsTable.successes": "成功", + "xpack.securitySolution.authenticationsTable.uncommonProcessTable": "不常见进程", + "xpack.securitySolution.authenticationsTable.unit": "{totalCount, plural, =1 {个用户} other {个用户}}", + "xpack.securitySolution.authenticationsTable.user": "用户", + "xpack.securitySolution.case.allCases.actions": "操作", + "xpack.securitySolution.case.allCases.comments": "注释", + "xpack.securitySolution.case.allCases.noTagsAvailable": "没有可用标记", + "xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage": "要查看案例,必须对 Kibana 工作区中的已保存对象管理功能有权限。有关详细信息,请联系您的 Kibana 管理员。", + "xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle": "需要 Kibana 功能权限", + "xpack.securitySolution.case.caseTable.addNewCase": "添加新案例", + "xpack.securitySolution.case.caseTable.bulkActions": "批处理操作", + "xpack.securitySolution.case.caseTable.bulkActions.closeSelectedTitle": "关闭选定", + "xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle": "删除选定", + "xpack.securitySolution.case.caseTable.bulkActions.openSelectedTitle": "重新打开选定", + "xpack.securitySolution.case.caseTable.caseDetailsLinkAria": "单击以访问标题为 {detailName} 的案例", + "xpack.securitySolution.case.caseTable.closed": "已关闭", + "xpack.securitySolution.case.caseTable.closedCases": "已关闭案例", + "xpack.securitySolution.case.caseTable.delete": "删除", + "xpack.securitySolution.case.caseTable.incidentSystem": "事件管理系统", + "xpack.securitySolution.case.caseTable.noCases.body": "没有可显示的案例。请创建新案例或在上面更改您的筛选设置。", + "xpack.securitySolution.case.caseTable.noCases.title": "无案例", + "xpack.securitySolution.case.caseTable.notPushed": "未推送", + "xpack.securitySolution.case.caseTable.openCases": "未结案例", + "xpack.securitySolution.case.caseTable.refreshTitle": "刷新", + "xpack.securitySolution.case.caseTable.requiresUpdate": " 需要更新", + "xpack.securitySolution.case.caseTable.searchAriaLabel": "搜索案例", + "xpack.securitySolution.case.caseTable.searchPlaceholder": "例如案例名", + "xpack.securitySolution.case.caseTable.selectedCasesTitle": "已选择 {totalRules} 个{totalRules, plural, =1 {案例} other {案例}}", + "xpack.securitySolution.case.caseTable.serviceNowLinkAria": "单击可在 servicenow 上查看该事件", + "xpack.securitySolution.case.caseTable.showingCasesTitle": "正在显示 {totalRules} 个{totalRules, plural, =1 {案例} other {案例}}", + "xpack.securitySolution.case.caseTable.snIncident": "外部事件", + "xpack.securitySolution.case.caseTable.unit": "{totalCount, plural, =1 {案例} other {案例}}", + "xpack.securitySolution.case.caseTable.upToDate": " 是最新的", + "xpack.securitySolution.case.caseView.actionHeadline": "{userName} 在 {actionDate}{actionName}", + "xpack.securitySolution.case.caseView.actionLabel.addComment": "添加了注释", + "xpack.securitySolution.case.caseView.actionLabel.addDescription": "添加了描述", + "xpack.securitySolution.case.caseView.actionLabel.addedField": "添加了", + "xpack.securitySolution.case.caseView.actionLabel.changededField": "更改了", + "xpack.securitySolution.case.caseView.actionLabel.editedField": "编辑了", + "xpack.securitySolution.case.caseView.actionLabel.on": "在", + "xpack.securitySolution.case.caseView.actionLabel.pushedNewIncident": "已推送为新事件", + "xpack.securitySolution.case.caseView.actionLabel.removedField": "移除了", + "xpack.securitySolution.case.caseView.actionLabel.removedThirdParty": "已移除外部事件管理系统", + "xpack.securitySolution.case.caseView.actionLabel.selectedThirdParty": "已选择 { thirdParty } 作为事件管理系统", + "xpack.securitySolution.case.caseView.actionLabel.updateIncident": "更新了事件", + "xpack.securitySolution.case.caseView.actionLabel.viewIncident": "查看 {incidentNumber}", + "xpack.securitySolution.case.caseView.alreadyPushedToExternalService": "已推送到 { externalService } 事件", + "xpack.securitySolution.case.caseView.backLabel": "返回到案例", + "xpack.securitySolution.case.caseView.breadcrumb": "创建", + "xpack.securitySolution.case.caseView.cancel": "取消", + "xpack.securitySolution.case.caseView.case": "案例", + "xpack.securitySolution.case.caseView.caseClosed": "案例已关闭", + "xpack.securitySolution.case.caseView.caseName": "案例名称", + "xpack.securitySolution.case.caseView.caseOpened": "案例已打开", + "xpack.securitySolution.case.caseView.caseRefresh": "刷新案例", + "xpack.securitySolution.case.caseView.closeCase": "关闭案例", + "xpack.securitySolution.case.caseView.closedCase": "已关闭案例", + "xpack.securitySolution.case.caseView.closedOn": "关闭时间", + "xpack.securitySolution.case.caseView.cloudDeploymentLink": "云部署", + "xpack.securitySolution.case.caseView.comment": "注释", + "xpack.securitySolution.case.caseView.comment.addComment": "添加注释", + "xpack.securitySolution.case.caseView.comment.addCommentHelpText": "添加新注释......", + "xpack.securitySolution.case.caseView.commentFieldRequiredError": "注释必填。", + "xpack.securitySolution.case.caseView.connectorConfigureLink": "连接器", + "xpack.securitySolution.case.caseView.connectors": "外部事件管理系统", + "xpack.securitySolution.case.caseView.copyCommentLinkAria": "复制引用链接", + "xpack.securitySolution.case.caseView.create": "创建新案例", + "xpack.securitySolution.case.caseView.createCase": "创建案例", + "xpack.securitySolution.case.caseView.description": "描述", + "xpack.securitySolution.case.caseView.description.save": "保存", + "xpack.securitySolution.case.caseView.edit": "编辑", + "xpack.securitySolution.case.caseView.edit.comment": "编辑注释", + "xpack.securitySolution.case.caseView.edit.description": "编辑描述", + "xpack.securitySolution.case.caseView.edit.quote": "引述", + "xpack.securitySolution.case.caseView.editActionsLinkAria": "单击可查看所有操作", + "xpack.securitySolution.case.caseView.editConnector": "更改外部事件管理系统", + "xpack.securitySolution.case.caseView.editTagsLinkAria": "单击可编辑标记", + "xpack.securitySolution.case.caseView.emailBody": "案例参考:{caseUrl}", + "xpack.securitySolution.case.caseView.emailSubject": "Security 案例 - {caseTitle}", + "xpack.securitySolution.case.caseView.errorsPushServiceCallOutTitle": "要将案例发送到外部系统,您需要:", + "xpack.securitySolution.case.caseView.fieldRequiredError": "必填字段", + "xpack.securitySolution.case.caseView.goToDocumentationButton": "查看文档", + "xpack.securitySolution.case.caseView.moveToCommentAria": "高亮显示引用的注释", + "xpack.securitySolution.case.caseView.name": "名称", + "xpack.securitySolution.case.caseView.noReportersAvailable": "没有报告者。", + "xpack.securitySolution.case.caseView.noTags": "当前没有为此案例分配标记。", + "xpack.securitySolution.case.caseView.openedOn": "打开时间", + "xpack.securitySolution.case.caseView.optional": "可选", + "xpack.securitySolution.case.caseView.pageBadgeLabel": "公测版", + "xpack.securitySolution.case.caseView.pageBadgeTooltip": "案例工作流仍为公测版。请通过在 Kibana 存储库中报告问题或错误,帮助我们改进产品。", + "xpack.securitySolution.case.caseView.particpantsLabel": "参与者", + "xpack.securitySolution.case.caseView.pushNamedIncident": "推送为 { thirdParty } 事件", + "xpack.securitySolution.case.caseView.pushThirdPartyIncident": "推送为第三方事件", + "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedDescription": "关闭的案例无法发送到外部系统。如果希望在外部系统中打开或更新案例,请重新打开案例。", + "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedTitle": "重新打开案例", + "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigDescription": "kibana.yml 文件已配置为仅允许特定连接器。要在外部系统中打开案例,请将 .servicenow 添加到 xpack.actions.enabledActiontypes 设置。有关更多信息,请参阅 {link}。", + "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigTitle": "在 Kibana 配置文件中启用 ServiceNow", + "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseDescription": "要在外部系统中打开案例,必须将许可证更新到白金级,开始为期 30 天的免费试用,或在 AWS、GCP 或 Azure 上快速部署 {link}。", + "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseTitle": "升级到 Elastic 白金级", + "xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigTitle": "选择外部连接器", + "xpack.securitySolution.case.caseView.pushToServiceDisableByNoConfigTitle": "配置外部连接器", + "xpack.securitySolution.case.caseView.reopenCase": "重新打开案例", + "xpack.securitySolution.case.caseView.reopenedCase": "重新打开的案例", + "xpack.securitySolution.case.caseView.reporterLabel": "报告者", + "xpack.securitySolution.case.caseView.requiredUpdateToExternalService": "需要更新 { externalService } 事件", + "xpack.securitySolution.case.caseView.sendEmalLinkAria": "单击可向 {user} 发送电子邮件", + "xpack.securitySolution.case.caseView.statusLabel": "状态", + "xpack.securitySolution.case.caseView.tags": "标记", + "xpack.securitySolution.case.caseView.to": "到", + "xpack.securitySolution.case.caseView.unknown": "未知", + "xpack.securitySolution.case.caseView.updateNamedIncident": "更新 { thirdParty } 事件", + "xpack.securitySolution.case.caseView.updateThirdPartyIncident": "更新第三方事件", + "xpack.securitySolution.case.configure.errorPushingToService": "推送到服务时出错", + "xpack.securitySolution.case.configure.successSaveToast": "已保存外部连接设置", + "xpack.securitySolution.case.configureCases.addNewConnector": "添加新连接器", + "xpack.securitySolution.case.configureCases.cancelButton": "取消", + "xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident": "在外部系统中关闭事件时自动关闭 Security 案例", + "xpack.securitySolution.case.configureCases.caseClosureOptionsDesc": "定义关闭 Security 案例的方式。要自动关闭案例,需要与外部事件管理系统建立连接。", + "xpack.securitySolution.case.configureCases.caseClosureOptionsLabel": "案例关闭选项", + "xpack.securitySolution.case.configureCases.caseClosureOptionsManual": "手动关闭 Security 案例", + "xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident": "将新事件推送到外部系统时自动关闭 Security 案例", + "xpack.securitySolution.case.configureCases.caseClosureOptionsTitle": "案例关闭", + "xpack.securitySolution.case.configureCases.fieldMappingDesc": "将数据推送到第三方时映射 Security 案例字段。字段映射需要与外部事件管理系统建立连接。", + "xpack.securitySolution.case.configureCases.fieldMappingEditAppend": "追加", + "xpack.securitySolution.case.configureCases.fieldMappingEditNothing": "无内容", + "xpack.securitySolution.case.configureCases.fieldMappingEditOverwrite": "覆盖", + "xpack.securitySolution.case.configureCases.fieldMappingFirstCol": "Security 案例字段", + "xpack.securitySolution.case.configureCases.fieldMappingSecondCol": "外部事件字段", + "xpack.securitySolution.case.configureCases.fieldMappingThirdCol": "编辑和更新时", + "xpack.securitySolution.case.configureCases.fieldMappingTitle": "字段映射", + "xpack.securitySolution.case.configureCases.headerTitle": "配置案例", + "xpack.securitySolution.case.configureCases.incidentManagementSystemDesc": "您可能会根据需要将 Security 案例连接到选择的外部事件管理系统。这将允许您将案例数据作为事件推送到所选第三方系统。", + "xpack.securitySolution.case.configureCases.incidentManagementSystemLabel": "事件管理系统", + "xpack.securitySolution.case.configureCases.incidentManagementSystemTitle": "连接到外部事件管理系统", + "xpack.securitySolution.case.configureCases.mappingFieldComments": "注释", + "xpack.securitySolution.case.configureCases.mappingFieldDescription": "描述", + "xpack.securitySolution.case.configureCases.mappingFieldNotMapped": "未映射", + "xpack.securitySolution.case.configureCases.mappingFieldShortDescription": "简短描述", + "xpack.securitySolution.case.configureCases.mappingFieldSummary": "摘要", + "xpack.securitySolution.case.configureCases.noConnector": "未选择连接器", + "xpack.securitySolution.case.configureCases.updateConnector": "更新连接器", + "xpack.securitySolution.case.configureCases.updateSelectedConnector": "更新 { connectorName }", + "xpack.securitySolution.case.configureCases.warningMessage": "选定的连接器已删除。选择不同的连接器或创建新的连接器。", + "xpack.securitySolution.case.configureCases.warningTitle": "警告", + "xpack.securitySolution.case.configureCasesButton": "编辑外部连接", + "xpack.securitySolution.case.confirmDeleteCase.confirmQuestion": "通过删除此案例,将会永久移除所有相关案例数据,您将无法再将数据推送到外部事件管理系统。是否确定要继续?", + "xpack.securitySolution.case.confirmDeleteCase.confirmQuestionPlural": "通过删除这些案例,将会永久移除所有相关案例数据,您将无法再将数据推送到外部事件管理系统。是否确定要继续?", + "xpack.securitySolution.case.confirmDeleteCase.deleteCase": "删除案例", + "xpack.securitySolution.case.confirmDeleteCase.deleteCases": "删除案例", + "xpack.securitySolution.case.confirmDeleteCase.deleteTitle": "删除“{caseTitle}”", + "xpack.securitySolution.case.confirmDeleteCase.selectedCases": "删除选定案例", + "xpack.securitySolution.case.connectors.common.apiTokenTextFieldLabel": "Api 令牌", + "xpack.securitySolution.case.connectors.common.apiUrlTextFieldLabel": "URL", + "xpack.securitySolution.case.connectors.common.emailTextFieldLabel": "电子邮件", + "xpack.securitySolution.case.connectors.common.invalidApiUrlTextField": "URL 无效", + "xpack.securitySolution.case.connectors.common.passwordTextFieldLabel": "密码", + "xpack.securitySolution.case.connectors.common.requiredApiTokenTextField": "“Api 令牌”必填", + "xpack.securitySolution.case.connectors.common.requiredApiUrlTextField": "“URL”必填", + "xpack.securitySolution.case.connectors.common.requiredEmailTextField": "“URL”必填", + "xpack.securitySolution.case.connectors.common.requiredPasswordTextField": "“密码”必填", + "xpack.securitySolution.case.connectors.common.requiredUsernameTextField": "“用户名”必填", + "xpack.securitySolution.case.connectors.common.usernameTextFieldLabel": "用户名", + "xpack.securitySolution.case.connectors.jira.actionTypeTitle": "Jira", + "xpack.securitySolution.case.connectors.jira.projectKey": "项目键", + "xpack.securitySolution.case.connectors.jira.requiredProjectKeyTextField": "项目键必填。", + "xpack.securitySolution.case.connectors.jira.selectMessageText": "将 Security 案例数据推送或更新到 Jira 中的新问题", + "xpack.securitySolution.case.connectors.servicenow.actionTypeTitle": "ServiceNow", + "xpack.securitySolution.case.connectors.servicenow.selectMessageText": "将 Security 案例数据推送或更新到 ServiceNow 中的新事件", + "xpack.securitySolution.case.createCase.descriptionFieldRequiredError": "描述必填。", + "xpack.securitySolution.case.createCase.fieldTagsHelpText": "为此案例键入一个或多个定制识别标记。在每个标记后按 Enter 键可开始新的标记。", + "xpack.securitySolution.case.createCase.titleFieldRequiredError": "标题必填。", + "xpack.securitySolution.case.dismissErrorsPushServiceCallOutTitle": "关闭", + "xpack.securitySolution.case.pageTitle": "案例", + "xpack.securitySolution.case.readOnlySavedObjectDescription": "您仅有权查看案例。如果需要创建和更新案例,请联系您的 Kibana 管理员", + "xpack.securitySolution.case.readOnlySavedObjectTitle": "您具有只读功能权限", + "xpack.securitySolution.certificate.fingerprint.clientCertLabel": "客户端证书", + "xpack.securitySolution.certificate.fingerprint.serverCertLabel": "服务器证书", + "xpack.securitySolution.chart.allOthersGroupingLabel": "所有其他", + "xpack.securitySolution.chart.dataAllValuesZerosTitle": "所有值返回零", + "xpack.securitySolution.chart.dataNotAvailableTitle": "图表数据不可用", + "xpack.securitySolution.chrome.help.appName": "Security", + "xpack.securitySolution.chrome.helpMenu.documentation": "Security 文档", + "xpack.securitySolution.chrome.helpMenu.documentation.ecs": "ECS 文档", + "xpack.securitySolution.clipboard.copied": "已复制", + "xpack.securitySolution.clipboard.copy": "复制", + "xpack.securitySolution.clipboard.copy.to.the.clipboard": "复制到剪贴板", + "xpack.securitySolution.clipboard.to.the.clipboard": "至剪贴板", + "xpack.securitySolution.components.embeddables.embeddedMap.clientLayerLabel": "客户端点", + "xpack.securitySolution.components.embeddables.embeddedMap.destinationLayerLabel": "目标点", + "xpack.securitySolution.components.embeddables.embeddedMap.embeddableHeaderHelp": "地图配置帮助", + "xpack.securitySolution.components.embeddables.embeddedMap.embeddableHeaderTitle": "网络地图", + "xpack.securitySolution.components.embeddables.embeddedMap.embeddablePanelTitle": "源 -> 目标点对点地图", + "xpack.securitySolution.components.embeddables.embeddedMap.errorConfiguringEmbeddableApiTitle": "配置可嵌入 API 时出错", + "xpack.securitySolution.components.embeddables.embeddedMap.errorCreatingMapEmbeddableTitle": "创建地图可嵌入对象时出错", + "xpack.securitySolution.components.embeddables.embeddedMap.lineLayerLabel": "折线图", + "xpack.securitySolution.components.embeddables.embeddedMap.serverLayerLabel": "服务器点", + "xpack.securitySolution.components.embeddables.embeddedMap.sourceLayerLabel": "源点", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel": "配置索引模式", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorDescription1": "要显示地图数据,必须使用匹配的全局模式定义 Security 索引 ({defaultIndex}) 和 Kibana 索引模式。使用 {beats} 时,可以在主机上运行 {setup} 命令,以自动创建索引模式。例如:{example}。", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorDescription2": "还可以在 Kibana 中配置索引模式。", + "xpack.securitySolution.components.embeddables.indexPatternsMissingPrompt.errorTitle": "未配置所需的索引模式", + "xpack.securitySolution.components.embeddables.mapToolTip.errorTitle": "加载地图特征时出错", + "xpack.securitySolution.components.embeddables.mapToolTip.filterForValueHoverAction": "筛留值", + "xpack.securitySolution.components.embeddables.mapToolTip.footerLabel": "{currentFeature} / {totalFeatures} {totalFeatures, plural, =1 {feature} other {features}}", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.clientLabel": "客户端", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.destinationLabel": "目标", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.serverLabel": "服务器", + "xpack.securitySolution.components.embeddables.mapToolTip.lineContent.sourceLabel": "源", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.asnTitle": "ASN", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.clientDomainTitle": "客户端域", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.clientIPTitle": "客户端 IP", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.destinationDomainTitle": "目标域", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.destinationIPTitle": "目标 IP", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.hostTitle": "主机", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.locationTitle": "位置", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.serverDomainTitle": "服务器域", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.serverIPTitle": "服务器 IP", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.sourceDomainTitle": "源域", + "xpack.securitySolution.components.embeddables.mapToolTip.pointContent.sourceIPTitle": "源 IP", + "xpack.securitySolution.components.flowControls.selectFlowDirection.bidirectionalButtonLabel": "双向", + "xpack.securitySolution.components.flowControls.selectFlowDirection.unidirectionalButtonLabel": "单向", + "xpack.securitySolution.components.flowControls.selectFlowTarget.clientDropDownOptionLabel": "客户端", + "xpack.securitySolution.components.flowControls.selectFlowTarget.destinationDropDownOptionLabel": "目标", + "xpack.securitySolution.components.flowControls.selectFlowTarget.serverDropDownOptionLabel": "服务器", + "xpack.securitySolution.components.flowControls.selectFlowTarget.sourceDropDownOptionLabel": "源", + "xpack.securitySolution.components.histogram.stackByOptions.stackByLabel": "堆叠依据", + "xpack.securitySolution.components.ml.anomaly.errors.anomaliesTableFetchFailureTitle": "异常表提取失败", + "xpack.securitySolution.components.ml.api.errors.networkErrorFailureTitle": "网络错误:", + "xpack.securitySolution.components.ml.api.errors.statusCodeFailureTitle": "状态代码:", + "xpack.securitySolution.components.ml.permissions.errors.machineLearningPermissionsFailureTitle": "Machine Learning 权限错误", + "xpack.securitySolution.components.mlJobSelect.machineLearningLink": "Machine Learning", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.groupsLabel": "组", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.noGroupsAvailableDescription": "没有可用的组", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.searchFilterPlaceholder": "例如 rare_process_linux", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.showAllJobsLabel": "Elastic 作业", + "xpack.securitySolution.components.mlPopover.jobsTable.filters.showSiemJobsLabel": "定制作业", + "xpack.securitySolution.components.mlPopup.anomalyDetectionDescription": "运行下面的任意 Machine Learning 作业以准备创建将产生已检测异常信号的信号检测规则以及查看整个 Security 应用程序内的异常事件。我们提供一系列常见检测作业帮助您入门。如果您希望添加自己的定制 ML 作业,请从 {machineLearning} 应用程序中创建并将它们添加到“SIEM”组。", + "xpack.securitySolution.components.mlPopup.cloudLink": "云部署", + "xpack.securitySolution.components.mlPopup.errors.createJobFailureTitle": "创建作业失败", + "xpack.securitySolution.components.mlPopup.errors.startJobFailureTitle": "启动作业失败", + "xpack.securitySolution.components.mlPopup.hooks.errors.indexPatternFetchFailureTitle": "索引模式提取失败", + "xpack.securitySolution.components.mlPopup.hooks.errors.siemJobFetchFailureTitle": "Security 作业提取失败", + "xpack.securitySolution.components.mlPopup.jobsTable.createCustomJobButtonLabel": "创建定制作业", + "xpack.securitySolution.components.mlPopup.jobsTable.jobNameColumn": "作业名称", + "xpack.securitySolution.components.mlPopup.jobsTable.noItemsDescription": "未找到任何 Security Machine Learning 作业", + "xpack.securitySolution.components.mlPopup.jobsTable.runJobColumn": "运行作业", + "xpack.securitySolution.components.mlPopup.jobsTable.tagsColumn": "组", + "xpack.securitySolution.components.mlPopup.licenseButtonLabel": "管理许可", + "xpack.securitySolution.components.mlPopup.machineLearningLink": "Machine Learning", + "xpack.securitySolution.components.mlPopup.mlJobSettingsButtonLabel": "ML 作业设置", + "xpack.securitySolution.components.mlPopup.moduleNotCompatibleDescription": "我们找不到任何数据,有关 Machine Learning 作业要求的详细信息,请参阅 {mlDocs}。", + "xpack.securitySolution.components.mlPopup.moduleNotCompatibleTitle": "{incompatibleJobCount} {incompatibleJobCount, plural, =1 {job} other {jobs}}当前不可用。", + "xpack.securitySolution.components.mlPopup.showingLabel": "显示:{filterResultsLength} 个 {filterResultsLength, plural, one {作业} other {作业}}", + "xpack.securitySolution.components.mlPopup.upgradeButtonLabel": "订阅选项", + "xpack.securitySolution.components.mlPopup.upgradeDescription": "要访问 Security 的异常检测功能,必须将您的许可更新到白金级、开始 30 天免费试用或在 AWS、GCP 或 Azurein 实施{cloudLink}。然后便可以运行 Machine Learning 作业并查看异常。", + "xpack.securitySolution.components.mlPopup.upgradeTitle": "升级 Elastic 白金级", + "xpack.securitySolution.components.stepDefineRule.ruleTypeField.subscriptionsLink": "白金级订阅", + "xpack.securitySolution.containers.anomalies.errorFetchingAnomaliesData": "无法查询异常数据", + "xpack.securitySolution.containers.anomalies.stackByJobId": "作业", + "xpack.securitySolution.containers.anomalies.title": "异常", + "xpack.securitySolution.containers.case.closedCases": "已关闭 {totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases} 个案例}}", + "xpack.securitySolution.containers.case.deletedCases": "已删除 {totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases} 个案例}}", + "xpack.securitySolution.containers.case.errorDeletingTitle": "删除数据时出错", + "xpack.securitySolution.containers.case.errorTitle": "提取数据时出错", + "xpack.securitySolution.containers.case.reopenedCases": "已重新打开 {totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases} 个案例}}", + "xpack.securitySolution.containers.case.updatedCase": "已更新“{caseTitle}”", + "xpack.securitySolution.containers.detectionEngine.addRuleFailDescription": "无法添加规则", + "xpack.securitySolution.containers.detectionEngine.createPrePackagedRuleFailDescription": "无法安装 elastic 的预打包规则", + "xpack.securitySolution.containers.detectionEngine.createPrePackagedRuleSuccesDescription": "已安装 elastic 的预打包规则", + "xpack.securitySolution.containers.detectionEngine.rules": "无法提取规则", + "xpack.securitySolution.containers.detectionEngine.tagFetchFailDescription": "无法提取标记", + "xpack.securitySolution.containers.errors.dataFetchFailureTitle": "数据提取失败", + "xpack.securitySolution.containers.errors.networkFailureTitle": "网络故障", + "xpack.securitySolution.containers.errors.stopJobFailureTitle": "停止作业失败", + "xpack.securitySolution.dataProviders.and": "AND", + "xpack.securitySolution.dataProviders.copyToClipboardTooltip": "复制到剪贴板", + "xpack.securitySolution.dataProviders.deleteDataProvider": "删除", + "xpack.securitySolution.dataProviders.dropAnything": "放置任何内容", + "xpack.securitySolution.dataProviders.dropHere": "放在此处", + "xpack.securitySolution.dataProviders.dropHereToAddAnLabel": "放在此处以添加", + "xpack.securitySolution.dataProviders.edit": "编辑", + "xpack.securitySolution.dataProviders.editMenuItem": "编辑筛选", + "xpack.securitySolution.dataProviders.editTitle": "编辑筛选", + "xpack.securitySolution.dataProviders.excludeDataProvider": "排除结果", + "xpack.securitySolution.dataProviders.existsLabel": "存在", + "xpack.securitySolution.dataProviders.fieldLabel": "字段", + "xpack.securitySolution.dataProviders.filterForFieldPresentLabel": "筛留存在的字段", + "xpack.securitySolution.dataProviders.hereToBuildAn": "在此处以构建", + "xpack.securitySolution.dataProviders.highlighted": "已突出显示", + "xpack.securitySolution.dataProviders.includeDataProvider": "包括结果", + "xpack.securitySolution.dataProviders.not": "非", + "xpack.securitySolution.dataProviders.or": "或", + "xpack.securitySolution.dataProviders.query": "查询", + "xpack.securitySolution.dataProviders.reEnableDataProvider": "重新启用", + "xpack.securitySolution.dataProviders.removeDataProvider": "移除数据提供程序", + "xpack.securitySolution.dataProviders.showOptionsDataProvider": "显示选项 - 适用于", + "xpack.securitySolution.dataProviders.temporaryDisableDataProvider": "暂时禁用", + "xpack.securitySolution.dataProviders.toBuildAn": "以构建", + "xpack.securitySolution.dataProviders.toggle": "切换", + "xpack.securitySolution.dataProviders.valueAriaLabel": "值", + "xpack.securitySolution.dataProviders.valuePlaceholder": "值", + "xpack.securitySolution.detectionEngine.alertTitle": "外部告警", + "xpack.securitySolution.detectionEngine.buttonManageRules": "管理信号检测规则", + "xpack.securitySolution.detectionEngine.components.importRuleModal.cancelTitle": "取消", + "xpack.securitySolution.detectionEngine.components.importRuleModal.importFailedDetailedTitle": "规则 ID:{ruleId}\n 状态代码:{statusCode}\n 消息:{message}", + "xpack.securitySolution.detectionEngine.components.importRuleModal.importFailedTitle": "无法导入规则", + "xpack.securitySolution.detectionEngine.components.importRuleModal.importRuleTitle": "导入规则", + "xpack.securitySolution.detectionEngine.components.importRuleModal.initialPromptTextDescription": "选择或拖放有效的 rules_export.ndjson 文件", + "xpack.securitySolution.detectionEngine.components.importRuleModal.overwriteDescription": "自动覆盖具有相同规则 ID 的已保存对象", + "xpack.securitySolution.detectionEngine.components.importRuleModal.selectRuleDescription": "选择要导入的 Security 规则(如从检测引擎视图导出的)", + "xpack.securitySolution.detectionEngine.components.importRuleModal.successfullyImportedRulesTitle": "已成功导入 {totalRules} 个{totalRules, plural, =1 {规则} other {规则}}", + "xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithActivatingTitle": "创建并激活规则", + "xpack.securitySolution.detectionEngine.createRule. stepScheduleRule.completeWithoutActivatingTitle": "创建规则但不激活", + "xpack.securitySolution.detectionEngine.createRule.backToRulesDescription": "返回到信号检测规则", + "xpack.securitySolution.detectionEngine.createRule.editRuleButton": "编辑", + "xpack.securitySolution.detectionEngine.createRule.filtersLabel": "筛选", + "xpack.securitySolution.detectionEngine.createRule.mlRuleTypeDescription": "Machine Learning", + "xpack.securitySolution.detectionEngine.createRule.pageTitle": "创建新规则", + "xpack.securitySolution.detectionEngine.createRule.QueryLabel": "定制查询", + "xpack.securitySolution.detectionEngine.createRule.queryRuleTypeDescription": "查询", + "xpack.securitySolution.detectionEngine.createRule.savedIdLabel": "已保存查询名称", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.descriptionFieldRequiredError": "描述必填。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fiedIndexPatternsLabel": "索引模式", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldDescriptionLabel": "描述", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldFalsePositiveLabel": "误报示例", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel": "MITRE ATT&CK\\u2122", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNameLabel": "名称", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldReferenceUrlsLabel": "引用 URL", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldRiskScoreLabel": "风险分数", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldSeverityLabel": "严重性", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTagsHelpText": "为此规则键入一个或多个定制识别标记。在每个标记后按 Enter 键可开始新的标记。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTagsLabel": "标记", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateHelpText": "选择现有时间线以将其用作调查生成的信号时的模板。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldTimelineTemplateLabel": "时间线模板", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.guideHelpText": "为执行信号调查的分析师提供有用信息。此指南将显示在规则详情页面上以及从此规则所生成的信号创建的时间线中。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.guideLabel": "调查指南", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError": "名称必填。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutrule.noteHelpText": "添加规则调查指南......", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRule.severityFieldRequiredError": "严重性必填。", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.addFalsePositiveDescription": "添加误报示例", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.addReferenceDescription": "添加引用 URL", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.advancedSettingsButton": "高级设置", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionCriticalDescription": "紧急", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionHighDescription": "高", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionLowDescription": "低", + "xpack.securitySolution.detectionEngine.createRule.stepAboutRuleForm.severityOptionMediumDescription": "中", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customMitreAttackTechniquesFieldRequiredError": "一个策略至少需要一个技术。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError": "KQL 无效", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldRequiredError": "需要定制查询。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "异常分数阈值", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "Machine Learning 作业", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "定制查询", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldRuleTypeLabel": "规则类型", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.importTimelineModalTitle": "从已保存时间线导入查询", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.importTimelineQueryButton": "从已保存时间线导入查询", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesCustomDescription": "提供定制的索引列表", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesFromConfigDescription": "使用 Security 高级设置的 Elasticsearch 索引", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.indicesHelperDescription": "输入要运行此规则的 Elasticsearch 索引的模式。默认情况下,将包括 Security 高级设置中定义的索引模式。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningJobIdHelpText": "我们提供若干可让您入门的常规作业。要添加自己的定制规则,在 {machineLearning} 应用程序中请将一组“siem”分配给这些作业,以使它们显示在此处。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningJobIdRequired": "Machine Learning 作业必填。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlEnableJobWarningTitle": "此 ML 作业当前未运行。在激活此规则之前请通过“ML 作业设置”设置此作业以使其运行。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText": "选择作业", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.outputIndiceNameFieldRequiredError": "至少需要一个索引模式。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "Url 的格式无效", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "重置为默认索引模式", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDescription": "选择 ML 作业以检测异常活动。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeDisabledDescription": "要访问 ML,需要{subscriptionsLink}。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.mlTypeTitle": "Machine Learning", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeDescription": "使用 KQL 或 Lucene 跨索引检测问题。", + "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.ruleTypeField.queryTypeTitle": "定制查询", + "xpack.securitySolution.detectionEngine.createRule.stepRuleActions.fieldThrottleHelpText": "选择在规则评估为 true 时应执行自动操作的时间。", + "xpack.securitySolution.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel": "操作频率", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackHelpText": "增加回查时段的时间以防止信号缺失。", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldAdditionalLookBackLabel": "更多回查时间", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalHelpText": "规则定期运行并检测指定时间范围内的信号。", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.fieldIntervalLabel": "运行间隔:", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription": "小时", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.invalidTimeMessageDescription": "时间必填。", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription": "分钟", + "xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription": "秒", + "xpack.securitySolution.detectionEngine.details.stepAboutRule.aboutText": "关于", + "xpack.securitySolution.detectionEngine.details.stepAboutRule.detailsLabel": "详情", + "xpack.securitySolution.detectionEngine.details.stepAboutRule.investigationGuideLabel": "调查指南", + "xpack.securitySolution.detectionEngine.detectionsPageTitle": "检测", + "xpack.securitySolution.detectionEngine.dismissButton": "关闭", + "xpack.securitySolution.detectionEngine.dismissNoApiIntegrationKeyButton": "关闭", + "xpack.securitySolution.detectionEngine.editRule.backToDescription": "返回到", + "xpack.securitySolution.detectionEngine.editRule.cancelTitle": "取消", + "xpack.securitySolution.detectionEngine.editRule.errorMsgDescription": "抱歉", + "xpack.securitySolution.detectionEngine.editRule.pageTitle": "编辑规则设置", + "xpack.securitySolution.detectionEngine.editRule.saveChangeTitle": "保存更改", + "xpack.securitySolution.detectionEngine.emptyActionPrimary": "查看设置说明", + "xpack.securitySolution.detectionEngine.emptyActionSecondary": "前往文档", + "xpack.securitySolution.detectionEngine.emptyTitle": "似乎您没有与 Security 应用程序的检测引擎相关的索引", + "xpack.securitySolution.detectionEngine.goToDocumentationButton": "查看文档", + "xpack.securitySolution.detectionEngine.headerPage.pageBadgeLabel": "公测版", + "xpack.securitySolution.detectionEngine.headerPage.pageBadgeTooltip": "“检测”仍为公测版。请通过在 Kibana 存储库中报告问题或错误,帮助我们改进产品。", + "xpack.securitySolution.detectionEngine.mitreAttack.addTitle": "添加 MITRE ATT&CK\\u2122 威胁", + "xpack.securitySolution.detectionEngine.mitreAttack.tacticPlaceHolderDescription": "选择策略......", + "xpack.securitySolution.detectionEngine.mitreAttack.tacticsDescription": "策略", + "xpack.securitySolution.detectionEngine.mitreAttack.techniquesDescription": "技术", + "xpack.securitySolution.detectionEngine.mitreAttack.techniquesPlaceHolderDescription": "选择技术......", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.collectionDescription": "Collection (TA0009)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.commandAndControlDescription": "Command and Control (TA0011)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.credentialAccessDescription": "Credential Access (TA0006)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.defenseEvasionDescription": "Defense Evasion (TA0005)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.discoveryDescription": "Discovery (TA0007)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.executionDescription": "Execution (TA0002)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.exfiltrationDescription": "Exfiltration (TA0010)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.impactDescription": "Impact (TA0040)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.initialAccessDescription": "Initial Access (TA0001)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.lateralMovementDescription": "Lateral Movement (TA0008)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.persistenceDescription": "Persistence (TA0003)", + "xpack.securitySolution.detectionEngine.mitreAttackTactics.privilegeEscalationDescription": "Privilege Escalation (TA0004)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accessibilityFeaturesDescription": "Accessibility Features (T1015)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accessTokenManipulationDescription": "Access Token Manipulation (T1134)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountAccessRemovalDescription": "Account Access Removal (T1531)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountDiscoveryDescription": "Account Discovery (T1087)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.accountManipulationDescription": "Account Manipulation (T1098)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.appCertDlLsDescription": "AppCert DLLs (T1182)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.appInitDlLsDescription": "AppInit DLLs (T1103)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.appleScriptDescription": "AppleScript (T1155)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationAccessTokenDescription": "Application Access Token (T1527)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationDeploymentSoftwareDescription": "Application Deployment Software (T1017)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationShimmingDescription": "Application Shimming (T1138)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.applicationWindowDiscoveryDescription": "Application Window Discovery (T1010)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.audioCaptureDescription": "Audio Capture (T1123)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.authenticationPackageDescription": "Authentication Package (T1131)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.automatedCollectionDescription": "Automated Collection (T1119)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.automatedExfiltrationDescription": "Automated Exfiltration (T1020)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bashHistoryDescription": "Bash History (T1139)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bashProfileAndBashrcDescription": ".bash_profile and .bashrc (T1156)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.binaryPaddingDescription": "Binary Padding (T1009)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bitsJobsDescription": "BITS Jobs (T1197)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bootkitDescription": "Bootkit (T1067)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.browserBookmarkDiscoveryDescription": "Browser Bookmark Discovery (T1217)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.browserExtensionsDescription": "Browser Extensions (T1176)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bruteForceDescription": "Brute Force (T1110)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.bypassUserAccountControlDescription": "Bypass User Account Control (T1088)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.changeDefaultFileAssociationDescription": "Change Default File Association (T1042)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.clearCommandHistoryDescription": "Clear Command History (T1146)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.clipboardDataDescription": "Clipboard Data (T1115)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudInstanceMetadataApiDescription": "Cloud Instance Metadata API (T1522)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudServiceDashboardDescription": "Cloud Service Dashboard (T1538)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cloudServiceDiscoveryDescription": "Cloud Service Discovery (T1526)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.cmstpDescription": "CMSTP (T1191)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.codeSigningDescription": "Code Signing (T1116)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.commandLineInterfaceDescription": "Command-Line Interface (T1059)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.commonlyUsedPortDescription": "Commonly Used Port (T1043)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.communicationThroughRemovableMediaDescription": "Communication Through Removable Media (T1092)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.compileAfterDeliveryDescription": "Compile After Delivery (T1500)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.compiledHtmlFileDescription": "Compiled HTML File (T1223)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentFirmwareDescription": "Component Firmware (T1109)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentObjectModelAndDistributedComDescription": "Component Object Model and Distributed COM (T1175)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.componentObjectModelHijackingDescription": "Component Object Model Hijacking (T1122)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.connectionProxyDescription": "Connection Proxy (T1090)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.controlPanelItemsDescription": "Control Panel Items (T1196)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.createAccountDescription": "Create Account (T1136)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialDumpingDescription": "Credential Dumping (T1003)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsFromWebBrowsersDescription": "Credentials from Web Browsers (T1503)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsInFilesDescription": "Credentials in Files (T1081)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.credentialsInRegistryDescription": "Credentials in Registry (T1214)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.customCommandAndControlProtocolDescription": "Custom Command and Control Protocol (T1094)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.customCryptographicProtocolDescription": "Custom Cryptographic Protocol (T1024)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataCompressedDescription": "Data Compressed (T1002)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataDestructionDescription": "Data Destruction (T1485)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncodingDescription": "Data Encoding (T1132)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncryptedDescription": "Data Encrypted (T1022)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataEncryptedForImpactDescription": "Data Encrypted for Impact (T1486)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromCloudStorageObjectDescription": "Data from Cloud Storage Object (T1530)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromInformationRepositoriesDescription": "Data from Information Repositories (T1213)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromLocalSystemDescription": "Data from Local System (T1005)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromNetworkSharedDriveDescription": "Data from Network Shared Drive (T1039)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataFromRemovableMediaDescription": "Data from Removable Media (T1025)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataObfuscationDescription": "Data Obfuscation (T1001)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataStagedDescription": "Data Staged (T1074)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dataTransferSizeLimitsDescription": "Data Transfer Size Limits (T1030)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dcShadowDescription": "DCShadow (T1207)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.defacementDescription": "Defacement (T1491)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.deobfuscateDecodeFilesOrInformationDescription": "Deobfuscate/Decode Files or Information (T1140)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.disablingSecurityToolsDescription": "Disabling Security Tools (T1089)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.diskContentWipeDescription": "Disk Content Wipe (T1488)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.diskStructureWipeDescription": "Disk Structure Wipe (T1487)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dllSearchOrderHijackingDescription": "DLL Search Order Hijacking (T1038)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dllSideLoadingDescription": "DLL Side-Loading (T1073)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainFrontingDescription": "Domain Fronting (T1172)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainGenerationAlgorithmsDescription": "Domain Generation Algorithms (T1483)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.domainTrustDiscoveryDescription": "Domain Trust Discovery (T1482)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.driveByCompromiseDescription": "Drive-by Compromise (T1189)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dylibHijackingDescription": "Dylib Hijacking (T1157)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.dynamicDataExchangeDescription": "Dynamic Data Exchange (T1173)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.elevatedExecutionWithPromptDescription": "Elevated Execution with Prompt (T1514)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.emailCollectionDescription": "Email Collection (T1114)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.emondDescription": "Emond (T1519)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.endpointDenialOfServiceDescription": "Endpoint Denial of Service (T1499)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionGuardrailsDescription": "Execution Guardrails (T1480)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionThroughApiDescription": "Execution through API (T1106)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.executionThroughModuleLoadDescription": "Execution through Module Load (T1129)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverAlternativeProtocolDescription": "Exfiltration Over Alternative Protocol (T1048)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverCommandAndControlChannelDescription": "Exfiltration Over Command and Control Channel (T1041)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverOtherNetworkMediumDescription": "Exfiltration Over Other Network Medium (T1011)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exfiltrationOverPhysicalMediumDescription": "Exfiltration Over Physical Medium (T1052)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForClientExecutionDescription": "Exploitation for Client Execution (T1203)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForCredentialAccessDescription": "Exploitation for Credential Access (T1212)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForDefenseEvasionDescription": "Exploitation for Defense Evasion (T1211)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationForPrivilegeEscalationDescription": "Exploitation for Privilege Escalation (T1068)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitationOfRemoteServicesDescription": "Exploitation of Remote Services (T1210)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.exploitPublicFacingApplicationDescription": "Exploit Public-Facing Application (T1190)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.externalRemoteServicesDescription": "External Remote Services (T1133)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.extraWindowMemoryInjectionDescription": "Extra Window Memory Injection (T1181)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fallbackChannelsDescription": "Fallback Channels (T1008)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileAndDirectoryDiscoveryDescription": "File and Directory Discovery (T1083)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileAndDirectoryPermissionsModificationDescription": "File and Directory Permissions Modification (T1222)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileDeletionDescription": "File Deletion (T1107)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileSystemLogicalOffsetsDescription": "File System Logical Offsets (T1006)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.fileSystemPermissionsWeaknessDescription": "File System Permissions Weakness (T1044)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.firmwareCorruptionDescription": "Firmware Corruption (T1495)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.forcedAuthenticationDescription": "Forced Authentication (T1187)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.gatekeeperBypassDescription": "Gatekeeper Bypass (T1144)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.graphicalUserInterfaceDescription": "Graphical User Interface (T1061)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.groupPolicyModificationDescription": "Group Policy Modification (T1484)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hardwareAdditionsDescription": "Hardware Additions (T1200)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenFilesAndDirectoriesDescription": "Hidden Files and Directories (T1158)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenUsersDescription": "Hidden Users (T1147)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hiddenWindowDescription": "Hidden Window (T1143)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.histcontrolDescription": "HISTCONTROL (T1148)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hookingDescription": "Hooking (T1179)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.hypervisorDescription": "Hypervisor (T1062)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.imageFileExecutionOptionsInjectionDescription": "Image File Execution Options Injection (T1183)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.implantContainerImageDescription": "Implant Container Image (T1525)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorBlockingDescription": "Indicator Blocking (T1054)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorRemovalFromToolsDescription": "Indicator Removal from Tools (T1066)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indicatorRemovalOnHostDescription": "Indicator Removal on Host (T1070)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.indirectCommandExecutionDescription": "Indirect Command Execution (T1202)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.inhibitSystemRecoveryDescription": "Inhibit System Recovery (T1490)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.inputCaptureDescription": "Input Capture (T1056)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.inputPromptDescription": "Input Prompt (T1141)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.installRootCertificateDescription": "Install Root Certificate (T1130)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.installUtilDescription": "InstallUtil (T1118)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.internalSpearphishingDescription": "Internal Spearphishing (T1534)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.kerberoastingDescription": "Kerberoasting (T1208)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.kernelModulesAndExtensionsDescription": "Kernel Modules and Extensions (T1215)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.keychainDescription": "Keychain (T1142)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchAgentDescription": "Launch Agent (T1159)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchctlDescription": "Launchctl (T1152)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.launchDaemonDescription": "Launch Daemon (T1160)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.lcLoadDylibAdditionDescription": "LC_LOAD_DYLIB Addition (T1161)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.lcMainHijackingDescription": "LC_MAIN Hijacking (T1149)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.llmnrNbtNsPoisoningAndRelayDescription": "LLMNR/NBT-NS Poisoning and Relay (T1171)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.localJobSchedulingDescription": "Local Job Scheduling (T1168)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.loginItemDescription": "Login Item (T1162)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.logonScriptsDescription": "Logon Scripts (T1037)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.lsassDriverDescription": "LSASS Driver (T1177)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.manInTheBrowserDescription": "Man in the Browser (T1185)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.masqueradingDescription": "Masquerading (T1036)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.modifyExistingServiceDescription": "Modify Existing Service (T1031)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.modifyRegistryDescription": "Modify Registry (T1112)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.mshtaDescription": "Mshta (T1170)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multibandCommunicationDescription": "Multiband Communication (T1026)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multiHopProxyDescription": "Multi-hop Proxy (T1188)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multilayerEncryptionDescription": "Multilayer Encryption (T1079)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.multiStageChannelsDescription": "Multi-Stage Channels (T1104)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.netshHelperDllDescription": "Netsh Helper DLL (T1128)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkDenialOfServiceDescription": "Network Denial of Service (T1498)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkServiceScanningDescription": "Network Service Scanning (T1046)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkShareConnectionRemovalDescription": "Network Share Connection Removal (T1126)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkShareDiscoveryDescription": "Network Share Discovery (T1135)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.networkSniffingDescription": "Network Sniffing (T1040)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.newServiceDescription": "New Service (T1050)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.ntfsFileAttributesDescription": "NTFS File Attributes (T1096)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.obfuscatedFilesOrInformationDescription": "Obfuscated Files or Information (T1027)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.officeApplicationStartupDescription": "Office Application Startup (T1137)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.parentPidSpoofingDescription": "Parent PID Spoofing (T1502)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passTheHashDescription": "Pass the Hash (T1075)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passTheTicketDescription": "Pass the Ticket (T1097)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passwordFilterDllDescription": "Password Filter DLL (T1174)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.passwordPolicyDiscoveryDescription": "Password Policy Discovery (T1201)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.pathInterceptionDescription": "Path Interception (T1034)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.peripheralDeviceDiscoveryDescription": "Peripheral Device Discovery (T1120)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.permissionGroupsDiscoveryDescription": "Permission Groups Discovery (T1069)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.plistModificationDescription": "Plist Modification (T1150)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.portKnockingDescription": "Port Knocking (T1205)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.portMonitorsDescription": "Port Monitors (T1013)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.powerShellDescription": "PowerShell (T1086)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.powerShellProfileDescription": "PowerShell Profile (T1504)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.privateKeysDescription": "Private Keys (T1145)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processDiscoveryDescription": "Process Discovery (T1057)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processDoppelgangingDescription": "Process Doppelgänging (T1186)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processHollowingDescription": "Process Hollowing (T1093)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.processInjectionDescription": "Process Injection (T1055)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.queryRegistryDescription": "Query Registry (T1012)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.rcCommonDescription": "Rc.common (T1163)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.redundantAccessDescription": "Redundant Access (T1108)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.registryRunKeysStartupFolderDescription": "Registry Run Keys / Startup Folder (T1060)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.regsvcsRegasmDescription": "Regsvcs/Regasm (T1121)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.regsvr32Description": "Regsvr32 (T1117)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteAccessToolsDescription": "Remote Access Tools (T1219)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteDesktopProtocolDescription": "Remote Desktop Protocol (T1076)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteFileCopyDescription": "Remote File Copy (T1105)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteServicesDescription": "Remote Services (T1021)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.remoteSystemDiscoveryDescription": "Remote System Discovery (T1018)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.reOpenedApplicationsDescription": "Re-opened Applications (T1164)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.replicationThroughRemovableMediaDescription": "Replication Through Removable Media (T1091)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.resourceHijackingDescription": "Resource Hijacking (T1496)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.revertCloudInstanceDescription": "Revert Cloud Instance (T1536)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.rootkitDescription": "Rootkit (T1014)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.rundll32Description": "Rundll32 (T1085)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.runtimeDataManipulationDescription": "Runtime Data Manipulation (T1494)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.scheduledTaskDescription": "Scheduled Task (T1053)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.scheduledTransferDescription": "Scheduled Transfer (T1029)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.screenCaptureDescription": "Screen Capture (T1113)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.screensaverDescription": "Screensaver (T1180)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.scriptingDescription": "Scripting (T1064)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitydMemoryDescription": "Securityd Memory (T1167)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitySoftwareDiscoveryDescription": "Security Software Discovery (T1063)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.securitySupportProviderDescription": "Security Support Provider (T1101)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serverSoftwareComponentDescription": "Server Software Component (T1505)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceExecutionDescription": "Service Execution (T1035)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceRegistryPermissionsWeaknessDescription": "Service Registry Permissions Weakness (T1058)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.serviceStopDescription": "Service Stop (T1489)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.setuidAndSetgidDescription": "Setuid and Setgid (T1166)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sharedWebrootDescription": "Shared Webroot (T1051)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.shortcutModificationDescription": "Shortcut Modification (T1023)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sidHistoryInjectionDescription": "SID-History Injection (T1178)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.signedBinaryProxyExecutionDescription": "Signed Binary Proxy Execution (T1218)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.signedScriptProxyExecutionDescription": "Signed Script Proxy Execution (T1216)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sipAndTrustProviderHijackingDescription": "SIP and Trust Provider Hijacking (T1198)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.softwareDiscoveryDescription": "Software Discovery (T1518)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.softwarePackingDescription": "Software Packing (T1045)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sourceDescription": "Source (T1153)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spaceAfterFilenameDescription": "Space after Filename (T1151)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingAttachmentDescription": "Spearphishing Attachment (T1193)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingLinkDescription": "Spearphishing Link (T1192)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.spearphishingViaServiceDescription": "Spearphishing via Service (T1194)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sshHijackingDescription": "SSH Hijacking (T1184)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardApplicationLayerProtocolDescription": "Standard Application Layer Protocol (T1071)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardCryptographicProtocolDescription": "Standard Cryptographic Protocol (T1032)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.standardNonApplicationLayerProtocolDescription": "Standard Non-Application Layer Protocol (T1095)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.startupItemsDescription": "Startup Items (T1165)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.stealApplicationAccessTokenDescription": "Steal Application Access Token (T1528)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.stealWebSessionCookieDescription": "Steal Web Session Cookie (T1539)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.storedDataManipulationDescription": "Stored Data Manipulation (T1492)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sudoCachingDescription": "Sudo Caching (T1206)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.sudoDescription": "Sudo (T1169)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.supplyChainCompromiseDescription": "Supply Chain Compromise (T1195)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemdServiceDescription": "Systemd Service (T1501)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemFirmwareDescription": "System Firmware (T1019)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemInformationDiscoveryDescription": "System Information Discovery (T1082)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemNetworkConfigurationDiscoveryDescription": "System Network Configuration Discovery (T1016)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemNetworkConnectionsDiscoveryDescription": "System Network Connections Discovery (T1049)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemOwnerUserDiscoveryDescription": "System Owner/User Discovery (T1033)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemServiceDiscoveryDescription": "System Service Discovery (T1007)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemShutdownRebootDescription": "System Shutdown/Reboot (T1529)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.systemTimeDiscoveryDescription": "System Time Discovery (T1124)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.taintSharedContentDescription": "Taint Shared Content (T1080)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.templateInjectionDescription": "Template Injection (T1221)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.thirdPartySoftwareDescription": "Third-party Software (T1072)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.timeProvidersDescription": "Time Providers (T1209)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.timestompDescription": "Timestomp (T1099)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.transferDataToCloudAccountDescription": "Transfer Data to Cloud Account (T1537)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.transmittedDataManipulationDescription": "Transmitted Data Manipulation (T1493)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.trapDescription": "Trap (T1154)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.trustedDeveloperUtilitiesDescription": "Trusted Developer Utilities (T1127)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.trustedRelationshipDescription": "Trusted Relationship (T1199)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.twoFactorAuthenticationInterceptionDescription": "Two-Factor Authentication Interception (T1111)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.uncommonlyUsedPortDescription": "Uncommonly Used Port (T1065)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.unusedUnsupportedCloudRegionsDescription": "Unused/Unsupported Cloud Regions (T1535)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.userExecutionDescription": "User Execution (T1204)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.validAccountsDescription": "Valid Accounts (T1078)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.videoCaptureDescription": "Video Capture (T1125)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.virtualizationSandboxEvasionDescription": "Virtualization/Sandbox Evasion (T1497)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.webServiceDescription": "Web Service (T1102)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.webSessionCookieDescription": "Web Session Cookie (T1506)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.webShellDescription": "Web Shell (T1100)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsAdminSharesDescription": "Windows Admin Shares (T1077)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationDescription": "Windows Management Instrumentation (T1047)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsManagementInstrumentationEventSubscriptionDescription": "Windows Management Instrumentation Event Subscription (T1084)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.windowsRemoteManagementDescription": "Windows Remote Management (T1028)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.winlogonHelperDllDescription": "Winlogon Helper DLL (T1004)", + "xpack.securitySolution.detectionEngine.mitreAttackTechniques.xslScriptProcessingDescription": "XSL Script Processing (T1220)", + "xpack.securitySolution.detectionEngine.mlRulesDisabledMessageTitle": "ML 规则需要白金级许可证以及 ML 管理员权限", + "xpack.securitySolution.detectionEngine.mlUnavailableTitle": "{totalRules} 个 {totalRules, plural, =1 {规则需要} other {规则需要}}启用 Machine Learning。", + "xpack.securitySolution.detectionEngine.noApiIntegrationKeyCallOutMsg": "每次启动 Kibana,都会为已保存对象生成新的加密密钥。没有持久性密钥,在 Kibana 重新启动后,将无法删除或修改规则。要设置持久性密钥,请将文本值为 32 个或更多任意字符的 xpack.encryptedSavedObjects.encryptionKey 设置添加到 kibana.yml 文件。", + "xpack.securitySolution.detectionEngine.noApiIntegrationKeyCallOutTitle": "需要 API 集成密钥", + "xpack.securitySolution.detectionEngine.noIndexMsgBody": "要使用检测引擎,具有所需集群和索引权限的用户必须首先访问此页面。若需要更多帮助,请联系您的管理员。", + "xpack.securitySolution.detectionEngine.noIndexTitle": "让我们来设置您的检测引擎", + "xpack.securitySolution.detectionEngine.pageTitle": "检测引擎", + "xpack.securitySolution.detectionEngine.panelSubtitleShowing": "正在显示", + "xpack.securitySolution.detectionEngine.readOnlyCallOutMsg": "您当前缺少所需的权限,无法创建/编辑检测引擎规则。有关进一步帮助,请联系您的管理员。", + "xpack.securitySolution.detectionEngine.readOnlyCallOutTitle": "需要规则权限", + "xpack.securitySolution.detectionEngine.rule.editRule.errorMsgDescription": "您在{countError, plural, one {以下选项卡} other {以下选项卡}}中的输入无效:{tabHasError}", + "xpack.securitySolution.detectionEngine.ruleDescription.mlJobStartedDescription": "已启动", + "xpack.securitySolution.detectionEngine.ruleDescription.mlJobStoppedDescription": "已停止", + "xpack.securitySolution.detectionEngine.ruleDetails.activateRuleLabel": "激活", + "xpack.securitySolution.detectionEngine.ruleDetails.backToRulesDescription": "返回到信号检测规则", + "xpack.securitySolution.detectionEngine.ruleDetails.errorCalloutTitle": "规则故障位置", + "xpack.securitySolution.detectionEngine.ruleDetails.experimentalDescription": "实验性", + "xpack.securitySolution.detectionEngine.ruleDetails.failureHistoryTab": "失败历史记录", + "xpack.securitySolution.detectionEngine.ruleDetails.lastFiveErrorsTitle": "上五个错误", + "xpack.securitySolution.detectionEngine.ruleDetails.pageTitle": "规则详情", + "xpack.securitySolution.detectionEngine.ruleDetails.ruleCreationDescription": "由 {by} 于 {date}创建", + "xpack.securitySolution.detectionEngine.ruleDetails.ruleUpdateDescription": "由 {by} 于 {date}更新", + "xpack.securitySolution.detectionEngine.ruleDetails.statusFailedAtColumn": "失败于", + "xpack.securitySolution.detectionEngine.ruleDetails.statusFailedDescription": "失败", + "xpack.securitySolution.detectionEngine.ruleDetails.statusFailedMsgColumn": "失败消息", + "xpack.securitySolution.detectionEngine.ruleDetails.statusTypeColumn": "类型", + "xpack.securitySolution.detectionEngine.ruleDetails.unknownDescription": "未知", + "xpack.securitySolution.detectionEngine.rules.aboutRuleTitle": "关于规则", + "xpack.securitySolution.detectionEngine.rules.addNewRuleTitle": "创建新规则", + "xpack.securitySolution.detectionEngine.rules.addPageTitle": "创建", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.deleteeRuleDescription": "删除规则……", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleDescription": "复制规则……", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription": "复制规则时出错……", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.duplicateTitle": "复制", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.editRuleSettingsDescription": "编辑规则设置", + "xpack.securitySolution.detectionEngine.rules.allRules.actions.exportRuleDescription": "导出规则", + "xpack.securitySolution.detectionEngine.rules.allRules.activeRuleDescription": "活动", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedErrorTitle": "激活 {totalRules, plural, =1 {个规则} other {个规则}}时出错……", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.activateSelectedTitle": "激活选定", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedErrorTitle": "停用 {totalRules, plural, =1 {个规则} other {个规则}}时出错……", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deactivateSelectedTitle": "停用选定", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedErrorTitle": "删除 {totalRules, plural, =1 {个规则} other {个规则}}时出错……", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedImmutableTitle": "选择内容包含无法删除的不可变规则", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.deleteSelectedTitle": "删除选定……", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.duplicateSelectedTitle": "复制选定……", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActions.exportSelectedTitle": "导出选定", + "xpack.securitySolution.detectionEngine.rules.allRules.batchActionsTitle": "批处理操作", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.activateTitle": "已激活", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.gap": "缺口(如果有)", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.indexingTimes": "索引时间 (ms)", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.lastLookBackDate": "最后回查日期", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.lastResponseTitle": "上次响应", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.lastRunTitle": "上次运行", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.queryTimes": "查询时间 (ms)", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.riskScoreTitle": "风险分数", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.ruleTitle": "规则", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.severityTitle": "严重性", + "xpack.securitySolution.detectionEngine.rules.allRules.columns.tagsTitle": "标记", + "xpack.securitySolution.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.customRulesTitle": "定制规则", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.elasticRulesTitle": "Elastic 规则", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.noRulesBodyTitle": "使用上述筛选,我们无法找到任何规则。", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.noRulesTitle": "未找到任何规则", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.noTagsAvailableDescription": "没有可用标记", + "xpack.securitySolution.detectionEngine.rules.allRules.filters.tagsLabel": "标记", + "xpack.securitySolution.detectionEngine.rules.allRules.inactiveRuleDescription": "非活动", + "xpack.securitySolution.detectionEngine.rules.allRules.refreshTitle": "刷新", + "xpack.securitySolution.detectionEngine.rules.allRules.searchAriaLabel": "搜索规则", + "xpack.securitySolution.detectionEngine.rules.allRules.searchPlaceholder": "例如规则名", + "xpack.securitySolution.detectionEngine.rules.allRules.selectedRulesTitle": "已选择 {selectedRules} 个{selectedRules, plural, =1 {规则} other {规则}}", + "xpack.securitySolution.detectionEngine.rules.allRules.showingRulesTitle": "正在显示 {totalRules} 个{totalRules, plural, =1 {规则} other {规则}}", + "xpack.securitySolution.detectionEngine.rules.allRules.successfullyDuplicatedRulesTitle": "已成功复制 {totalRules, plural, =1 {{totalRules} 个规则} other {{totalRules} 个规则}}", + "xpack.securitySolution.detectionEngine.rules.allRules.successfullyExportedRulesTitle": "已成功导出{totalRules, plural, =0 {所有规则} =1 { {totalRules} 个规则} other { {totalRules} 个规则}}", + "xpack.securitySolution.detectionEngine.rules.allRules.tableTitle": "所有规则", + "xpack.securitySolution.detectionEngine.rules.allRules.tabs.monitoring": "监测", + "xpack.securitySolution.detectionEngine.rules.allRules.tabs.rules": "规则", + "xpack.securitySolution.detectionEngine.rules.backOptionsHeader": "返回到检测", + "xpack.securitySolution.detectionEngine.rules.components.ruleActionsOverflow.allActionsTitle": "所有操作", + "xpack.securitySolution.detectionEngine.rules.components.ruleDownloader.exportFailureTitle": "无法导出规则……", + "xpack.securitySolution.detectionEngine.rules.continueButtonTitle": "继续", + "xpack.securitySolution.detectionEngine.rules.create.successfullyCreatedRuleTitle": "{ruleName} 已创建", + "xpack.securitySolution.detectionEngine.rules.defineRuleTitle": "定义规则", + "xpack.securitySolution.detectionEngine.rules.deleteDescription": "删除", + "xpack.securitySolution.detectionEngine.rules.editPageTitle": "编辑", + "xpack.securitySolution.detectionEngine.rules.importRuleTitle": "导入规则……", + "xpack.securitySolution.detectionEngine.rules.loadPrePackagedRulesButton": "加载 Elastic 预构建规则", + "xpack.securitySolution.detectionEngine.rules.optionalFieldDescription": "可选", + "xpack.securitySolution.detectionEngine.rules.pageTitle": "信号检测规则", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.createOwnRuletButton": "创建自己的规则", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptMessage": "Elastic Security 提供预构建检测规则,它们运行在后台并在条件满足时创建信号。默认情况下,所有预构建规则处于禁用状态,请选择您要激活的规则。", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptTitle": "加载 Elastic 预构建检测规则", + "xpack.securitySolution.detectionEngine.rules.prePackagedRules.loadPreBuiltButton": "加载预构建检测规则", + "xpack.securitySolution.detectionEngine.rules.releaseNotesHelp": "发行说明", + "xpack.securitySolution.detectionEngine.rules.reloadMissingPrePackagedRulesButton": "安装 {missingRules} 个 Elastic 预构建{missingRules, plural, =1 {规则} other {规则}} ", + "xpack.securitySolution.detectionEngine.rules.ruleActionsTitle": "规则操作", + "xpack.securitySolution.detectionEngine.rules.scheduleRuleTitle": "计划规则", + "xpack.securitySolution.detectionEngine.rules.stepAboutTitle": "关于", + "xpack.securitySolution.detectionEngine.rules.stepActionsTitle": "操作", + "xpack.securitySolution.detectionEngine.rules.stepDefinitionTitle": "定义", + "xpack.securitySolution.detectionEngine.rules.stepScheduleTitle": "计划", + "xpack.securitySolution.detectionEngine.rules.update.successfullySavedRuleTitle": "{ruleName} 已保存", + "xpack.securitySolution.detectionEngine.rules.updateButtonTitle": "更新", + "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesButton": "更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}} ", + "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesMsg": "您可更新 {updateRules} 个 Elastic 预构建{updateRules, plural, =1 {规则} other {规则}}。注意,这将重新加载删除的 Elastic 预构建规则。", + "xpack.securitySolution.detectionEngine.rules.updatePrePackagedRulesTitle": "有 Elastic 预构建规则的更新", + "xpack.securitySolution.detectionEngine.ruleStatus.refreshButton": "刷新", + "xpack.securitySolution.detectionEngine.ruleStatus.statusAtDescription": "处于", + "xpack.securitySolution.detectionEngine.ruleStatus.statusDateDescription": "状态日期", + "xpack.securitySolution.detectionEngine.ruleStatus.statusDescription": "上次响应", + "xpack.securitySolution.detectionEngine.signalRuleAlert.actionGroups.default": "默认值", + "xpack.securitySolution.detectionEngine.userUnauthenticatedMsgBody": "您没有所需的权限,无法查看检测引擎。若需要更多帮助,请联系您的管理员。", + "xpack.securitySolution.detectionEngine.userUnauthenticatedTitle": "需要检测引擎权限", + "xpack.securitySolution.dragAndDrop.addToTimeline": "添加到时间线调查", + "xpack.securitySolution.dragAndDrop.closeButtonLabel": "关闭", + "xpack.securitySolution.dragAndDrop.copyToClipboardTooltip": "复制到剪贴板", + "xpack.securitySolution.dragAndDrop.fieldLabel": "字段", + "xpack.securitySolution.dragAndDrop.filterForValueHoverAction": "筛留值", + "xpack.securitySolution.dragAndDrop.filterOutValueHoverAction": "筛除值", + "xpack.securitySolution.draggables.field.categoryLabel": "类别", + "xpack.securitySolution.draggables.field.fieldLabel": "字段", + "xpack.securitySolution.draggables.field.typeLabel": "类型", + "xpack.securitySolution.draggables.field.viewCategoryTooltip": "查看类别", + "xpack.securitySolution.editDataProvider.doesNotExistLabel": "不存在", + "xpack.securitySolution.editDataProvider.existsLabel": "存在", + "xpack.securitySolution.editDataProvider.fieldLabel": "字段", + "xpack.securitySolution.editDataProvider.isLabel": "是", + "xpack.securitySolution.editDataProvider.isNotLabel": "不是", + "xpack.securitySolution.editDataProvider.operatorLabel": "运算符", + "xpack.securitySolution.editDataProvider.placeholder": "选择字段", + "xpack.securitySolution.editDataProvider.saveButton": "保存", + "xpack.securitySolution.editDataProvider.selectAnOperatorPlaceholder": "选择运算符", + "xpack.securitySolution.editDataProvider.valueLabel": "值", + "xpack.securitySolution.editDataProvider.valuePlaceholder": "值", + "xpack.securitySolution.emptyString.emptyStringDescription": "空字符串", + "xpack.securitySolution.event.module.linkToElasticEndpointSecurityDescription": "在 Elastic Endpoint Security 中打开", + "xpack.securitySolution.eventDetails.blank": " ", + "xpack.securitySolution.eventDetails.copyToClipboard": "复制到剪贴板", + "xpack.securitySolution.eventDetails.copyToClipboardTooltip": "复制到剪贴板", + "xpack.securitySolution.eventDetails.description": "描述", + "xpack.securitySolution.eventDetails.field": "字段", + "xpack.securitySolution.eventDetails.filter.placeholder": "按字段、值或描述筛选......", + "xpack.securitySolution.eventDetails.jsonView": "JSON 视图", + "xpack.securitySolution.eventDetails.table": "表", + "xpack.securitySolution.eventDetails.toggleColumnTooltip": "切换列", + "xpack.securitySolution.eventDetails.value": "值", + "xpack.securitySolution.eventsViewer.errorFetchingEventsData": "无法查询事件数据", + "xpack.securitySolution.eventsViewer.eventsLabel": "事件", + "xpack.securitySolution.eventsViewer.footer.loadingEventsDataLabel": "正在加载事件", + "xpack.securitySolution.eventsViewer.showingLabel": "显示", + "xpack.securitySolution.eventsViewer.unit": "{totalCount, plural, =1 {个事件} other {个事件}}", + "xpack.securitySolution.featureCatalogue.description": "浏览安全指标和日志以了解事件和告警", + "xpack.securitySolution.featureCatalogue.title": "Security", + "xpack.securitySolution.featureRegistry.linkSecuritySolutionTitle": "Security", + "xpack.securitySolution.fieldBrowser.categoriesCountTitle": "{totalCount} {totalCount, plural, =1 {个类别} other {个类别}}", + "xpack.securitySolution.fieldBrowser.categoriesTitle": "类别", + "xpack.securitySolution.fieldBrowser.categoryLabel": "类别", + "xpack.securitySolution.fieldBrowser.copyToClipboard": "复制到剪贴板", + "xpack.securitySolution.fieldBrowser.customizeColumnsTitle": "定制列", + "xpack.securitySolution.fieldBrowser.descriptionLabel": "描述", + "xpack.securitySolution.fieldBrowser.fieldLabel": "字段", + "xpack.securitySolution.fieldBrowser.fieldsCountTitle": "{totalCount} {totalCount, plural, =1 {个字段} other {个字段}}", + "xpack.securitySolution.fieldBrowser.fieldsTitle": "字段", + "xpack.securitySolution.fieldBrowser.filterPlaceholder": "字段名称", + "xpack.securitySolution.fieldBrowser.noFieldsMatchInputLabel": "没有字段匹配 {searchInput}", + "xpack.securitySolution.fieldBrowser.noFieldsMatchLabel": "没有字段匹配", + "xpack.securitySolution.fieldBrowser.resetFieldsLink": "重置字段", + "xpack.securitySolution.fieldBrowser.toggleColumnTooltip": "切换列", + "xpack.securitySolution.fieldBrowser.viewCategoryTooltip": "查看所有 {categoryId} 字段", + "xpack.securitySolution.fieldRenderers.moreLabel": "更多", + "xpack.securitySolution.flyout.button.text": "时间线", + "xpack.securitySolution.flyout.button.timeline": "时间线", + "xpack.securitySolution.footer.autoRefreshActiveDescription": "自动刷新已启用", + "xpack.securitySolution.footer.autoRefreshActiveTooltip": "自动刷新已启用时,时间线将显示匹配查询的最近 {numberOfItems} 个事件。", + "xpack.securitySolution.footer.data": "数据", + "xpack.securitySolution.footer.events": "事件", + "xpack.securitySolution.footer.live": "实时", + "xpack.securitySolution.footer.loadingLabel": "正在加载", + "xpack.securitySolution.footer.loadingTimelineData": "正在加载 Timeline 数据", + "xpack.securitySolution.footer.loadMoreLabel": "加载更多", + "xpack.securitySolution.footer.of": "的", + "xpack.securitySolution.footer.rows": "行", + "xpack.securitySolution.footer.totalCountOfEvents": "匹配搜索条件的事件", + "xpack.securitySolution.footer.updated": "已更新", + "xpack.securitySolution.formatted.duration.aFewMillisecondsTooltip": "几毫秒", + "xpack.securitySolution.formatted.duration.aFewNanosecondsTooltip": "几纳秒", + "xpack.securitySolution.formatted.duration.aMillisecondTooltip": "一毫秒", + "xpack.securitySolution.formatted.duration.aNanosecondTooltip": "一纳秒", + "xpack.securitySolution.formatted.duration.aSecondTooltip": "一秒", + "xpack.securitySolution.formatted.duration.invalidDurationTooltip": "持续时间无效", + "xpack.securitySolution.formatted.duration.noDurationTooltip": "无持续时间", + "xpack.securitySolution.formatted.duration.zeroNanosecondsTooltip": "零纳秒", + "xpack.securitySolution.formattedDuration.tooltipLabel": "原始", + "xpack.securitySolution.getCurrentUser.Error": "获取用户时出错", + "xpack.securitySolution.getCurrentUser.unknownUser": "未知", + "xpack.securitySolution.header.editableTitle.cancel": "取消", + "xpack.securitySolution.header.editableTitle.editButtonAria": "通过单击,可以编辑 {title}", + "xpack.securitySolution.header.editableTitle.save": "保存", + "xpack.securitySolution.headerGlobal.buttonAddData": "添加数据", + "xpack.securitySolution.headerGlobal.siem": "Security", + "xpack.securitySolution.headerPage.pageSubtitle": "最后事件:{beat}", + "xpack.securitySolution.hooks.useAddToTimeline.addedFieldMessage": "已将 {fieldOrValue} 添加到时间线", + "xpack.securitySolution.host.details.architectureLabel": "架构", + "xpack.securitySolution.host.details.firstSeenTitle": "首次看到时间", + "xpack.securitySolution.host.details.lastSeenTitle": "最后看到时间", + "xpack.securitySolution.host.details.overview.cloudProviderTitle": "云服务提供商", + "xpack.securitySolution.host.details.overview.familyTitle": "系列", + "xpack.securitySolution.host.details.overview.hostIdTitle": "主机 ID", + "xpack.securitySolution.host.details.overview.inspectTitle": "主机概览", + "xpack.securitySolution.host.details.overview.instanceIdTitle": "实例 ID", + "xpack.securitySolution.host.details.overview.ipAddressesTitle": "IP 地址", + "xpack.securitySolution.host.details.overview.macAddressesTitle": "MAC 地址", + "xpack.securitySolution.host.details.overview.machineTypeTitle": "机器类型", + "xpack.securitySolution.host.details.overview.maxAnomalyScoreByJobTitle": "最大异常分数(按作业)", + "xpack.securitySolution.host.details.overview.osTitle": "操作系统", + "xpack.securitySolution.host.details.overview.platformTitle": "平台", + "xpack.securitySolution.host.details.overview.regionTitle": "地区", + "xpack.securitySolution.host.details.versionLabel": "版本", + "xpack.securitySolution.hosts.kqlPlaceholder": "例如 host.name:“foo”", + "xpack.securitySolution.hosts.navigation.alertsTitle": "外部告警", + "xpack.securitySolution.hosts.navigation.allHostsTitle": "所有主机", + "xpack.securitySolution.hosts.navigation.anomaliesTitle": "异常", + "xpack.securitySolution.hosts.navigation.authenticationsTitle": "身份验证", + "xpack.securitySolution.hosts.navigation.dns.histogram.errorFetchingDnsData": "无法查询 DNS 数据", + "xpack.securitySolution.hosts.navigation.eventsTitle": "事件", + "xpack.securitySolution.hosts.navigation.uncommonProcessesTitle": "不常见进程", + "xpack.securitySolution.hosts.navigaton.matrixHistogram.errorFetchingAuthenticationsData": "无法查询身份验证数据", + "xpack.securitySolution.hosts.navigaton.matrixHistogram.errorFetchingEventsData": "无法查询事件数据", + "xpack.securitySolution.hosts.pageTitle": "主机", + "xpack.securitySolution.hostsTable.firstLastSeenToolTip": "相对于选定日期范围", + "xpack.securitySolution.hostsTable.hostsTitle": "所有主机", + "xpack.securitySolution.hostsTable.lastSeenTitle": "最后看到时间", + "xpack.securitySolution.hostsTable.nameTitle": "名称", + "xpack.securitySolution.hostsTable.osTitle": "操作系统", + "xpack.securitySolution.hostsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.hostsTable.unit": "{totalCount, plural, =1 {个主机} other {个主机}}", + "xpack.securitySolution.hostsTable.versionTitle": "版本", + "xpack.securitySolution.insert.timeline.insertTimelineButton": "插入时间线链接", + "xpack.securitySolution.inspect.modal.closeTitle": "鍏抽棴", + "xpack.securitySolution.inspect.modal.indexPatternDescription": "连接到 Elasticsearch 索引的索引模式。可以在“Kibana”>“高级设置”中配置这些索引。", + "xpack.securitySolution.inspect.modal.indexPatternLabel": "索引模式", + "xpack.securitySolution.inspect.modal.queryTimeDescription": "处理查询所花费的时间。不包括发送请求或在浏览器中解析它的时间。", + "xpack.securitySolution.inspect.modal.queryTimeLabel": "查询时间", + "xpack.securitySolution.inspect.modal.reqTimestampDescription": "记录请求启动的时间", + "xpack.securitySolution.inspect.modal.reqTimestampLabel": "请求时间戳", + "xpack.securitySolution.inspect.modal.somethingWentWrongDescription": "抱歉,出现问题。", + "xpack.securitySolution.inspectDescription": "检查", + "xpack.securitySolution.ja3.fingerprint.ja3.fingerprintLabel": "ja3", + "xpack.securitySolution.kpiHosts.hosts.title": "主机", + "xpack.securitySolution.kpiHosts.uniqueIps.destinationChartLabel": "目标", + "xpack.securitySolution.kpiHosts.uniqueIps.destinationUnitLabel": "目标", + "xpack.securitySolution.kpiHosts.uniqueIps.sourceChartLabel": "源", + "xpack.securitySolution.kpiHosts.uniqueIps.sourceUnitLabel": "源", + "xpack.securitySolution.kpiHosts.uniqueIps.title": "唯一 IP", + "xpack.securitySolution.kpiHosts.userAuthentications.failChartLabel": "失败", + "xpack.securitySolution.kpiHosts.userAuthentications.failUnitLabel": "失败", + "xpack.securitySolution.kpiHosts.userAuthentications.successChartLabel": "成功", + "xpack.securitySolution.kpiHosts.userAuthentications.successUnitLabel": "成功", + "xpack.securitySolution.kpiHosts.userAuthentications.title": "用户身份验证", + "xpack.securitySolution.kpiNetwork.dnsQueries.title": "DNS 查询", + "xpack.securitySolution.kpiNetwork.networkEvents.title": "网络事件", + "xpack.securitySolution.kpiNetwork.tlsHandshakes.title": "TLS 握手", + "xpack.securitySolution.kpiNetwork.uniqueFlowIds.title": "唯一流 ID", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.destinationChartLabel": "目标", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.destinationUnitLabel": "目标", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.sourceChartLabel": "源", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.sourceUnitLabel": "源", + "xpack.securitySolution.kpiNetwork.uniquePrivateIps.title": "唯一专用 IP", + "xpack.securitySolution.licensing.unsupportedMachineLearningMessage": "您的许可证不支持 Machine Learning。请升级您的许可证。", + "xpack.securitySolution.markdown.hint.boldLabel": "**粗体**", + "xpack.securitySolution.markdown.hint.bulletLabel": "* 项目符号", + "xpack.securitySolution.markdown.hint.codeLabel": "`code`", + "xpack.securitySolution.markdown.hint.headingLabel": "# 标题", + "xpack.securitySolution.markdown.hint.imageUrlLabel": "![image](url)", + "xpack.securitySolution.markdown.hint.italicsLabel": "_italics_", + "xpack.securitySolution.markdown.hint.preformattedLabel": "```preformatted```", + "xpack.securitySolution.markdown.hint.quoteLabel": ">引用", + "xpack.securitySolution.markdown.hint.strikethroughLabel": "删除线", + "xpack.securitySolution.markdown.hint.urlLabel": "[链接](url)", + "xpack.securitySolution.markdownEditor.markdown": "Markdown", + "xpack.securitySolution.markdownEditor.markdownInputHelp": "Markdown 语法帮助", + "xpack.securitySolution.markdownEditor.preview": "预览", + "xpack.securitySolution.ml.score.anomalousEntityTitle": "异常实体", + "xpack.securitySolution.ml.score.anomalyJobTitle": "作业", + "xpack.securitySolution.ml.score.detectedTitle": "已检测到", + "xpack.securitySolution.ml.score.influencedByTitle": "影响因素", + "xpack.securitySolution.ml.score.maxAnomalyScoreTitle": "最大异常分数", + "xpack.securitySolution.ml.score.narrowToThisDateRangeLink": "缩小至此日期范围", + "xpack.securitySolution.ml.score.viewInMachineLearningLink": "在 Machine Learning 中查看", + "xpack.securitySolution.ml.table.detectorTitle": "作业名称", + "xpack.securitySolution.ml.table.entityTitle": "实体", + "xpack.securitySolution.ml.table.hostNameTitle": "主机名", + "xpack.securitySolution.ml.table.influencedByTitle": "影响因素", + "xpack.securitySolution.ml.table.networkNameTitle": "网络 IP", + "xpack.securitySolution.ml.table.scoreTitle": "异常分数", + "xpack.securitySolution.ml.table.timestampTitle": "时间戳", + "xpack.securitySolution.modalAllErrors.close.button": "关闭", + "xpack.securitySolution.modalAllErrors.seeAllErrors.button": "请参阅完整的错误信息", + "xpack.securitySolution.modalAllErrors.title": "您的可视化有错误", + "xpack.securitySolution.navigation.case": "案例", + "xpack.securitySolution.navigation.detectionEngine": "检测", + "xpack.securitySolution.navigation.hosts": "主机", + "xpack.securitySolution.navigation.network": "网络", + "xpack.securitySolution.navigation.overview": "概览", + "xpack.securitySolution.navigation.timelines": "时间线", + "xpack.securitySolution.network.dns.stackByUniqueSubdomain": "排名最前域(按 {groupByField})", + "xpack.securitySolution.network.ipDetails.ipOverview.asDestinationDropDownOptionLabel": "作为目标", + "xpack.securitySolution.network.ipDetails.ipOverview.asSourceDropDownOptionLabel": "作为源", + "xpack.securitySolution.network.ipDetails.ipOverview.autonomousSystemTitle": "自治系统", + "xpack.securitySolution.network.ipDetails.ipOverview.firstSeenTitle": "首次看到时间", + "xpack.securitySolution.network.ipDetails.ipOverview.hostIdTitle": "主机 ID", + "xpack.securitySolution.network.ipDetails.ipOverview.hostNameTitle": "主机名", + "xpack.securitySolution.network.ipDetails.ipOverview.inspectTitle": "IP 概览", + "xpack.securitySolution.network.ipDetails.ipOverview.ipReputationTitle": "信誉", + "xpack.securitySolution.network.ipDetails.ipOverview.lastSeenTitle": "最后看到时间", + "xpack.securitySolution.network.ipDetails.ipOverview.locationTitle": "位置", + "xpack.securitySolution.network.ipDetails.ipOverview.maxAnomalyScoreByJobTitle": "最大异常分数(按作业)", + "xpack.securitySolution.network.ipDetails.ipOverview.viewTalosIntelligenceTitle": "talosIntelligence.com", + "xpack.securitySolution.network.ipDetails.ipOverview.viewVirusTotalTitle.": "virustotal.com", + "xpack.securitySolution.network.ipDetails.ipOverview.viewWhoisTitle": "iana.org", + "xpack.securitySolution.network.ipDetails.ipOverview.whoIsTitle": "WhoIs", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.issuerTitle": "颁发者", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.ja3FingerPrintTitle": "JA3 指纹", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.sha1FingerPrintTitle": "SHA1 指纹", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.subjectTitle": "主题", + "xpack.securitySolution.network.ipDetails.tlsTable.columns.validUntilTitle": "失效日期", + "xpack.securitySolution.network.ipDetails.tlsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.network.ipDetails.tlsTable.transportLayerSecurityTitle": "传输层安全", + "xpack.securitySolution.network.ipDetails.tlsTable.unit": "{totalCount, plural, =1 {服务器证书} other {服务器证书}}", + "xpack.securitySolution.network.ipDetails.usersTable.columns.documentCountTitle": "文档计数", + "xpack.securitySolution.network.ipDetails.usersTable.columns.groupIdTitle": "组 ID", + "xpack.securitySolution.network.ipDetails.usersTable.columns.groupNameTitle": "组名称", + "xpack.securitySolution.network.ipDetails.usersTable.columns.userIdTitle": "ID", + "xpack.securitySolution.network.ipDetails.usersTable.columns.userNameTitle": "用户", + "xpack.securitySolution.network.ipDetails.usersTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.network.ipDetails.usersTable.unit": "{totalCount, plural, =1 {个用户} other {个用户}}", + "xpack.securitySolution.network.ipDetails.usersTable.usersTitle": "用户", + "xpack.securitySolution.network.kqlPlaceholder": "例如 source.ip:“foo”", + "xpack.securitySolution.network.navigation.alertsTitle": "外部告警", + "xpack.securitySolution.network.navigation.anomaliesTitle": "异常", + "xpack.securitySolution.network.navigation.dnsTitle": "DNS", + "xpack.securitySolution.network.navigation.flowsTitle": "Flows", + "xpack.securitySolution.network.navigation.httpTitle": "HTTP", + "xpack.securitySolution.network.navigation.tlsTitle": "TLS", + "xpack.securitySolution.network.pageTitle": "网络", + "xpack.securitySolution.networkDnsTable.column.bytesInTitle": "DNS 传入字节", + "xpack.securitySolution.networkDnsTable.column.bytesOutTitle": "DNS 传出字节", + "xpack.securitySolution.networkDnsTable.column.registeredDomain": "已注册域", + "xpack.securitySolution.networkDnsTable.column.TotalQueriesTitle": "查询总数", + "xpack.securitySolution.networkDnsTable.column.uniqueDomainsTitle": "唯一域", + "xpack.securitySolution.networkDnsTable.helperTooltip": "其仅显示 DNS 协议流量,可用于捕获 DNS 数据外泄中使用的域。", + "xpack.securitySolution.networkDnsTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.networkDnsTable.select.includePtrRecords": "包括 PTR 记录", + "xpack.securitySolution.networkDnsTable.title": "排名靠前的 DNS 域", + "xpack.securitySolution.networkDnsTable.unit": "{totalCount, plural, =1 {个域} other {个域}}", + "xpack.securitySolution.networkHttpTable.column.domainTitle": "域", + "xpack.securitySolution.networkHttpTable.column.lastHostTitle": "上一主机", + "xpack.securitySolution.networkHttpTable.column.lastSourceIpTitle": "上一源 IP", + "xpack.securitySolution.networkHttpTable.column.methodTitle": "方法", + "xpack.securitySolution.networkHttpTable.column.pathTitle": "路径", + "xpack.securitySolution.networkHttpTable.column.requestsTitle": "请求", + "xpack.securitySolution.networkHttpTable.column.statusTitle": "状态", + "xpack.securitySolution.networkHttpTable.rows": "{numRows} {numRows, plural, =0 {rows} =1 {行} other {行}}", + "xpack.securitySolution.networkHttpTable.title": "HTTP 请求", + "xpack.securitySolution.networkHttpTable.unit": "{totalCount, plural, =1 {个请求} other {个请求}}", + "xpack.securitySolution.networkTopCountriesTable.column.bytesInTitle": "传入字节", + "xpack.securitySolution.networkTopCountriesTable.column.bytesOutTitle": "传出字节", + "xpack.securitySolution.networkTopCountriesTable.column.countryTitle": "国家/地区", + "xpack.securitySolution.networkTopCountriesTable.column.destinationIps": "目标 IP", + "xpack.securitySolution.networkTopCountriesTable.column.flows": "Flows", + "xpack.securitySolution.networkTopCountriesTable.column.sourceIps": "源 IP", + "xpack.securitySolution.networkTopCountriesTable.heading.destinationCountries": "目标国家/地区", + "xpack.securitySolution.networkTopCountriesTable.heading.sourceCountries": "源国家/地区", + "xpack.securitySolution.networkTopCountriesTable.heading.unit": "{totalCount, plural, =1 {个国家或地区} other {个国家或地区}}", + "xpack.securitySolution.networkTopCountriesTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.networkTopNFlowTable.column.asTitle": "自治系统", + "xpack.securitySolution.networkTopNFlowTable.column.bytesInTitle": "传入字节", + "xpack.securitySolution.networkTopNFlowTable.column.bytesOutTitle": "传出字节", + "xpack.securitySolution.networkTopNFlowTable.column.destinationIpTitle": "目标 IP", + "xpack.securitySolution.networkTopNFlowTable.column.domainTitle": "域", + "xpack.securitySolution.networkTopNFlowTable.column.IpTitle": "IP", + "xpack.securitySolution.networkTopNFlowTable.column.sourceIpTitle": "源 IP", + "xpack.securitySolution.networkTopNFlowTable.destinationIps": "目标 IP", + "xpack.securitySolution.networkTopNFlowTable.flows": "Flows", + "xpack.securitySolution.networkTopNFlowTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.networkTopNFlowTable.sourceIps": "源 IP", + "xpack.securitySolution.networkTopNFlowTable.unit": "{totalCount, plural, =1 {个 IP} other {个 IP}}", + "xpack.securitySolution.newsFeed.advancedSettingsLinkTitle": "Security 高级设置", + "xpack.securitySolution.newsFeed.noNewsMessage": "您当前的新闻源 URL 未返回最近的新闻。要更新 URL 或禁用安全新闻,您可以通过", + "xpack.securitySolution.notes.addANotePlaceholder": "添加备注", + "xpack.securitySolution.notes.addedANoteLabel": "已添加备注", + "xpack.securitySolution.notes.addNoteButtonLabel": "添加备注", + "xpack.securitySolution.notes.cancelButtonLabel": "取消", + "xpack.securitySolution.notes.copyToClipboardButtonLabel": "复制到剪贴板", + "xpack.securitySolution.notes.noteLabel": "注释", + "xpack.securitySolution.notes.notesTitle": "备注", + "xpack.securitySolution.notes.previewMarkdownTitle": "预览 (Markdown)", + "xpack.securitySolution.notes.search.FilterByUserOrNotePlaceholder": "按用户或备注筛选", + "xpack.securitySolution.open.timeline.allActionsTooltip": "所有操作", + "xpack.securitySolution.open.timeline.batchActionsTitle": "批处理操作", + "xpack.securitySolution.open.timeline.cancelButton": "取消", + "xpack.securitySolution.open.timeline.collapseButton": "折叠", + "xpack.securitySolution.open.timeline.deleteButton": "删除", + "xpack.securitySolution.open.timeline.deleteSelectedButton": "删除选定", + "xpack.securitySolution.open.timeline.deleteTimelineModalTitle": "删除“{title}”?", + "xpack.securitySolution.open.timeline.deleteWarningLabel": "一旦删除,将无法恢复此时间线或其备注。", + "xpack.securitySolution.open.timeline.descriptionTableHeader": "描述", + "xpack.securitySolution.open.timeline.expandButton": "展开", + "xpack.securitySolution.open.timeline.exportFileNameTitle": "timelines_export", + "xpack.securitySolution.open.timeline.exportSelectedButton": "导出选定", + "xpack.securitySolution.open.timeline.favoriteSelectedButton": "收藏所选", + "xpack.securitySolution.open.timeline.favoritesTooltip": "收藏夹", + "xpack.securitySolution.open.timeline.filterByTimelineTypesTitle": "仅 {timelineType}", + "xpack.securitySolution.open.timeline.lastModifiedTableHeader": "最后修改时间", + "xpack.securitySolution.open.timeline.missingSavedObjectIdTooltip": "缺失 savedObjectId", + "xpack.securitySolution.open.timeline.modifiedByTableHeader": "修改者", + "xpack.securitySolution.open.timeline.notesTooltip": "备注", + "xpack.securitySolution.open.timeline.onlyFavoritesButtonLabel": "仅收藏夹", + "xpack.securitySolution.open.timeline.openAsDuplicateTooltip": "复制时间线", + "xpack.securitySolution.open.timeline.openTimelineButton": "打开时间线......", + "xpack.securitySolution.open.timeline.openTimelineTitle": "打开时间线", + "xpack.securitySolution.open.timeline.pinnedEventsTooltip": "置顶事件", + "xpack.securitySolution.open.timeline.postedLabel": "已发表:", + "xpack.securitySolution.open.timeline.refreshTitle": "刷新", + "xpack.securitySolution.open.timeline.searchPlaceholder": "例如时间线名称或描述", + "xpack.securitySolution.open.timeline.selectedTimelinesTitle": "已选择 {selectedTimelines} 条{selectedTimelines, plural, =1 {时间线} other {时间线}}", + "xpack.securitySolution.open.timeline.showingLabel": "正在显示:", + "xpack.securitySolution.open.timeline.showingNTimelinesLabel": "{totalSearchResultsCount} 条 {totalSearchResultsCount, plural, one {时间线} other {时间线}} {with}", + "xpack.securitySolution.open.timeline.successfullyExportedTimelinesTitle": "已成功导出{totalTimelines, plural, =0 {全部时间线} =1 { {totalTimelines} 条时间线} other { {totalTimelines} 条时间线}}", + "xpack.securitySolution.open.timeline.timelineNameTableHeader": "时间线名称", + "xpack.securitySolution.open.timeline.untitledTimelineLabel": "未命名时间线", + "xpack.securitySolution.open.timeline.withLabel": "具有", + "xpack.securitySolution.open.timeline.zeroTimelinesMatchLabel": "0 个时间线匹配搜索条件", + "xpack.securitySolution.overview.alertsGraphTitle": "外部告警计数", + "xpack.securitySolution.overview.auditBeatAuditTitle": "审计", + "xpack.securitySolution.overview.auditBeatFimTitle": "文件完整性模块", + "xpack.securitySolution.overview.auditBeatLoginTitle": "登录", + "xpack.securitySolution.overview.auditBeatPackageTitle": "软件包", + "xpack.securitySolution.overview.auditBeatProcessTitle": "进程", + "xpack.securitySolution.overview.auditBeatSocketTitle": "套接字", + "xpack.securitySolution.overview.auditBeatUserTitle": "用户", + "xpack.securitySolution.overview.endgameDnsTitle": "DNS", + "xpack.securitySolution.overview.endgameFileTitle": "文件", + "xpack.securitySolution.overview.endgameImageLoadTitle": "映像加载", + "xpack.securitySolution.overview.endgameNetworkTitle": "网络", + "xpack.securitySolution.overview.endgameProcessTitle": "进程", + "xpack.securitySolution.overview.endgameRegistryTitle": "注册表", + "xpack.securitySolution.overview.endgameSecurityTitle": "安全性", + "xpack.securitySolution.overview.eventsTitle": "事件计数", + "xpack.securitySolution.overview.feedbackText": "如果您对 Elastic Security 体验有任何建议,请随时{feedback}。", + "xpack.securitySolution.overview.feedbackText.feedbackLinkText": "在线提交反馈", + "xpack.securitySolution.overview.feedbackTitle": "反馈", + "xpack.securitySolution.overview.filebeatCiscoTitle": "Cisco", + "xpack.securitySolution.overview.filebeatNetflowTitle": "NetFlow", + "xpack.securitySolution.overview.filebeatPanwTitle": "Palo Alto Networks", + "xpack.securitySolution.overview.fileBeatSuricataTitle": "Suricata", + "xpack.securitySolution.overview.filebeatSystemModuleTitle": "系统模块", + "xpack.securitySolution.overview.fileBeatZeekTitle": "Zeek", + "xpack.securitySolution.overview.hostsAction": "查看主机", + "xpack.securitySolution.overview.hostStatGroupAuditbeat": "Auditbeat", + "xpack.securitySolution.overview.hostStatGroupElasticEndpointSecurity": "Elastic Endpoint Security", + "xpack.securitySolution.overview.hostStatGroupFilebeat": "Filebeat", + "xpack.securitySolution.overview.hostStatGroupWinlogbeat": "Winlogbeat", + "xpack.securitySolution.overview.hostsTitle": "主机事件", + "xpack.securitySolution.overview.myRecentlyReportedCasesButtonLabel": "我最近报告的案例", + "xpack.securitySolution.overview.networkAction": "查看网络", + "xpack.securitySolution.overview.networkStatGroupAuditbeat": "Auditbeat", + "xpack.securitySolution.overview.networkStatGroupFilebeat": "Filebeat", + "xpack.securitySolution.overview.networkStatGroupPacketbeat": "Packetbeat", + "xpack.securitySolution.overview.networkTitle": "网络事件", + "xpack.securitySolution.overview.newsFeedSidebarTitle": "安全新闻", + "xpack.securitySolution.overview.overviewHost.hostsSubtitle": "正在显示:{formattedHostEventsCount} 个{hostEventsCount, plural, one {事件} other {事件}}", + "xpack.securitySolution.overview.overviewNetwork.networkSubtitle": "正在显示:{formattedNetworkEventsCount} 个{networkEventsCount, plural, one {事件} other {事件}}", + "xpack.securitySolution.overview.packetBeatDnsTitle": "DNS", + "xpack.securitySolution.overview.packetBeatFlowTitle": "流", + "xpack.securitySolution.overview.packetbeatTLSTitle": "TLS", + "xpack.securitySolution.overview.pageSubtitle": "Elastic Stack 的安全信息和事件管理功能", + "xpack.securitySolution.overview.pageTitle": "Security", + "xpack.securitySolution.overview.recentCasesSidebarTitle": "最近案例", + "xpack.securitySolution.overview.recentlyCreatedCasesButtonLabel": "最近创建的案例", + "xpack.securitySolution.overview.recentTimelinesSidebarTitle": "最近的时间线", + "xpack.securitySolution.overview.showTopTooltip": "显示热门{fieldName}", + "xpack.securitySolution.overview.startedText": "欢迎使用安全信息和事件管理 (Security)。首先,查看我们的 {docs} 或 {data}。有关即将推出的功能和教程,确保查看我们的{siemSolution}页。", + "xpack.securitySolution.overview.startedText.dataLinkText": "正在采集数据", + "xpack.securitySolution.overview.startedText.docsLinkText": "文档", + "xpack.securitySolution.overview.startedText.siemSolutionLinkText": "Security 解决方案", + "xpack.securitySolution.overview.startedTitle": "入门", + "xpack.securitySolution.overview.topNLabel": "热门{fieldName}", + "xpack.securitySolution.overview.viewAlertsButtonLabel": "查看告警", + "xpack.securitySolution.overview.viewEventsButtonLabel": "查看事件", + "xpack.securitySolution.overview.winlogbeatMWSysmonOperational": "Microsoft-Windows-Sysmon/Operational", + "xpack.securitySolution.overview.winlogbeatSecurityTitle": "安全", + "xpack.securitySolution.pages.common.emptyActionPrimary": "使用 Beats 添加数据", + "xpack.securitySolution.pages.common.emptyActionSecondary": "查看入门指南", + "xpack.securitySolution.pages.common.emptyMessage": "要开始使用安全信息和事件管理 (Security),您将需要将 Security 相关数据以 Elastic Common Schema (ECS) 格式添加到 Elastic Stack。较为轻松的入门方式是安装并配置我们称作 Beats 的数据采集器。让我们现在就动手!", + "xpack.securitySolution.pages.common.emptyTitle": "欢迎使用 SIEM。让我们教您如何入门。", + "xpack.securitySolution.pages.fourohfour.noContentFoundDescription": "未找到任何内容", + "xpack.securitySolution.paginatedTable.rowsButtonLabel": "每页行数", + "xpack.securitySolution.paginatedTable.showingSubtitle": "显示", + "xpack.securitySolution.paginatedTable.tooManyResultsToastText": "缩减您的查询范围,以更好地筛选结果", + "xpack.securitySolution.paginatedTable.tooManyResultsToastTitle": " - 结果过多", + "xpack.securitySolution.recentCases.commentsTooltip": "注释", + "xpack.securitySolution.recentCases.noCasesMessage": "尚未创建任何案例。以侦探的眼光", + "xpack.securitySolution.recentCases.startNewCaseLink": "建立新案例", + "xpack.securitySolution.recentCases.viewAllCasesLink": "查看所有案例", + "xpack.securitySolution.recentTimelines.errorRetrievingUserDetailsMessage": "最近的时间线:检索用户详情时发生错误", + "xpack.securitySolution.recentTimelines.favoritesButtonLabel": "收藏夹", + "xpack.securitySolution.recentTimelines.lastUpdatedButtonLabel": "最后更新时间", + "xpack.securitySolution.recentTimelines.noFavoriteTimelinesMessage": "您尚未收藏任何时间线。实际操练一下,开始狩猎威胁!", + "xpack.securitySolution.recentTimelines.notesTooltip": "备注", + "xpack.securitySolution.recentTimelines.noTimelinesMessage": "您尚未创建任何时间线。实际操练一下,开始狩猎威胁!", + "xpack.securitySolution.recentTimelines.openAsDuplicateTooltip": "作为时间线副本打开", + "xpack.securitySolution.recentTimelines.pinnedEventsTooltip": "置顶事件", + "xpack.securitySolution.recentTimelines.untitledTimelineLabel": "未命名时间线", + "xpack.securitySolution.recentTimelines.viewAllTimelinesLink": "查看所有时间线", + "xpack.securitySolution.source.destination.packetsLabel": "pkts", + "xpack.securitySolution.system.acceptedAConnectionViaDescription": "已接受连接,通过", + "xpack.securitySolution.system.acceptedDescription": "已接受该用户 - 通过", + "xpack.securitySolution.system.attemptedLoginDescription": "已尝试登录 - 通过", + "xpack.securitySolution.system.createdFileDescription": "已创建文件", + "xpack.securitySolution.system.deletedFileDescription": "已删除文件", + "xpack.securitySolution.system.disconnectedViaDescription": "已断开连接,通过", + "xpack.securitySolution.system.errorDescription": "遇到错误 -", + "xpack.securitySolution.system.existingPackageDescription": "正在使用现有软件包", + "xpack.securitySolution.system.existingProcessDescription": "正在运行进程", + "xpack.securitySolution.system.existingSocketDescription": "正在使用现有套接字 - 来自", + "xpack.securitySolution.system.existingUserDescription": "是现有用户", + "xpack.securitySolution.system.hostDescription": "主机信息", + "xpack.securitySolution.system.invalidDescription": "已尝试无效使用", + "xpack.securitySolution.system.loggedOutDescription": "已注销 - 通过", + "xpack.securitySolution.system.packageInstalledDescription": "已安装软件包", + "xpack.securitySolution.system.packageRemovedDescription": "已移除软件包", + "xpack.securitySolution.system.packageSystemStartedDescription": "系统已启动", + "xpack.securitySolution.system.packageUpdatedDescription": "已更新软件包", + "xpack.securitySolution.system.processErrorDescription": "遇到进程错误 -", + "xpack.securitySolution.system.processStartedDescription": "已启动进程", + "xpack.securitySolution.system.processStoppedDescription": "已停止进程", + "xpack.securitySolution.system.socketClosedDescription": "已关闭套接字 -", + "xpack.securitySolution.system.socketOpenedDescription": "已打开套接字 -", + "xpack.securitySolution.system.systemDescription": "系统", + "xpack.securitySolution.system.terminatedProcessDescription": "已终止进程", + "xpack.securitySolution.system.userAddedDescription": "用户已添加", + "xpack.securitySolution.system.userChangedDescription": "用户已更改", + "xpack.securitySolution.system.userRemovedDescription": "已移除", + "xpack.securitySolution.system.usingDescription": "使用", + "xpack.securitySolution.system.viaDescription": "通过", + "xpack.securitySolution.system.viaParentProcessDescription": "通过父进程", + "xpack.securitySolution.system.wasAuthorizedToUseDescription": "有权使用", + "xpack.securitySolution.system.withExitCodeDescription": "退出代码为", + "xpack.securitySolution.system.withResultDescription": ",结果为", + "xpack.securitySolution.tables.rowItemHelper.moreDescription": "未显示", + "xpack.securitySolution.timeline.autosave.warning.description": "其他用户已更改此时间线。您所做的任何更改不会自动保存,直至您刷新了此时间线以吸收这些更改。", + "xpack.securitySolution.timeline.autosave.warning.refresh.title": "刷新时间线", + "xpack.securitySolution.timeline.autosave.warning.title": "刷新后才会启用自动保存", + "xpack.securitySolution.timeline.body.actions.collapseAriaLabel": "折叠", + "xpack.securitySolution.timeline.body.actions.expandAriaLabel": "展开", + "xpack.securitySolution.timeline.body.copyToClipboardButtonLabel": "复制到剪贴板", + "xpack.securitySolution.timeline.body.notes.addOrViewNotesForThisEventTooltip": "添加或查看此事件的备注", + "xpack.securitySolution.timeline.body.pinning.pinnedTooltip": "置顶事件", + "xpack.securitySolution.timeline.body.pinning.pinnnedWithNotesTooltip": "此事件无法固定,因为其有备注", + "xpack.securitySolution.timeline.body.pinning.unpinnedTooltip": "非置顶事件", + "xpack.securitySolution.timeline.body.renderers.dns.askedForDescription": "请求过", + "xpack.securitySolution.timeline.body.renderers.dns.responseCodeDescription": "响应代码:", + "xpack.securitySolution.timeline.body.renderers.dns.viaDescription": "通过", + "xpack.securitySolution.timeline.body.renderers.dns.whichResolvedToDescription": ",其已解析为", + "xpack.securitySolution.timeline.body.renderers.dns.withQuestionTypeDescription": ",问题类型为", + "xpack.securitySolution.timeline.body.renderers.endgame.aLoginWasAttemptedUsingExplicitCredentialsDescription": "已使用显式凭据尝试登录", + "xpack.securitySolution.timeline.body.renderers.endgame.asRequestedBySubjectDescription": ",如主语所请求", + "xpack.securitySolution.timeline.body.renderers.endgame.loggedOffDescription": "已注销", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeBatchDescription": "批量", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeCachedInteractiveDescription": "缓存交互", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeInteractiveDescription": "交互", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNetworkCleartextDescription": "网络明文", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNetworkDescription": "网络", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeNewCredentialsDescription": "新凭据", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeRemoteInteractiveDescription": "远程交互", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeServiceDescription": "服务", + "xpack.securitySolution.timeline.body.renderers.endgame.logonTypeUnlockDescription": "解锁", + "xpack.securitySolution.timeline.body.renderers.endgame.subjectLogonIdDescription": "主语登录 ID", + "xpack.securitySolution.timeline.body.renderers.endgame.successfullyLoggedInDescription": "已成功登录", + "xpack.securitySolution.timeline.body.renderers.endgame.targetLogonIdDescription": "目标登录 ID", + "xpack.securitySolution.timeline.body.renderers.endgame.toDescription": "到", + "xpack.securitySolution.timeline.body.renderers.endgame.usingLogonTypeDescription": "使用登录类型", + "xpack.securitySolution.timeline.body.renderers.endgame.viaDescription": "通过", + "xpack.securitySolution.timeline.body.renderers.endgame.withSpecialPrivilegesDescription": "使用特殊权限,", + "xpack.securitySolution.timeline.callOut.unauthorized.message.description": "您需要在 Security 内自动保存时间线的权限,但您可以继续使用该时间线搜索和筛选安全事件", + "xpack.securitySolution.timeline.categoryTooltip": "类别", + "xpack.securitySolution.timeline.defaultTimelineDescription": "创建新时间线时默认提供的时间线。", + "xpack.securitySolution.timeline.defaultTimelineTitle": "默认空白时间线", + "xpack.securitySolution.timeline.descriptionTooltip": "描述", + "xpack.securitySolution.timeline.destination": "目标", + "xpack.securitySolution.timeline.eventsSelect.actions.pinSelected": "固定所选", + "xpack.securitySolution.timeline.eventsSelect.actions.selectAll": "全部", + "xpack.securitySolution.timeline.eventsSelect.actions.selectNone": "无", + "xpack.securitySolution.timeline.eventsSelect.actions.selectPinned": "已固定", + "xpack.securitySolution.timeline.eventsSelect.actions.selectUnpinned": "取消固定", + "xpack.securitySolution.timeline.eventsSelect.actions.unpinSelected": "取消固定所选", + "xpack.securitySolution.timeline.expandableEvent.copyToClipboardToolTip": "复制到剪贴板", + "xpack.securitySolution.timeline.expandableEvent.eventToolTipTitle": "时间", + "xpack.securitySolution.timeline.fieldTooltip": "字段", + "xpack.securitySolution.timeline.flyout.header.closeTimelineButtonLabel": "关闭时间线", + "xpack.securitySolution.timeline.flyout.pane.removeColumnButtonLabel": "删除列", + "xpack.securitySolution.timeline.flyout.pane.timelinePropertiesAriaLabel": "时间线属性", + "xpack.securitySolution.timeline.properties.descriptionPlaceholder": "描述", + "xpack.securitySolution.timeline.properties.descriptionTooltip": "此时间线中事件和备注的摘要", + "xpack.securitySolution.timeline.properties.favoriteTooltip": "收藏", + "xpack.securitySolution.timeline.properties.historyLabel": "历史记录", + "xpack.securitySolution.timeline.properties.historyToolTip": "与此时间线相关的操作历史记录(按时间顺序排列)", + "xpack.securitySolution.timeline.properties.inspectTimelineTitle": "鏃堕棿绾", + "xpack.securitySolution.timeline.properties.isViewingTooltip": "正在查看此时间线", + "xpack.securitySolution.timeline.properties.lockDatePickerDescription": "将日期选取器锁定到全局日期选取器", + "xpack.securitySolution.timeline.properties.lockDatePickerTooltip": "禁用当前查看的页面和您的时间线之间的日期/时间范围同步", + "xpack.securitySolution.timeline.properties.newCaseButtonLabel": "将时间线附加到新案例", + "xpack.securitySolution.timeline.properties.newTimelineButtonLabel": "创建新的时间线", + "xpack.securitySolution.timeline.properties.notAFavoriteTooltip": "取消收藏", + "xpack.securitySolution.timeline.properties.notesButtonLabel": "备注", + "xpack.securitySolution.timeline.properties.notesToolTip": "添加并复查此时间线的备注。也可以向事件添加备注。", + "xpack.securitySolution.timeline.properties.streamLiveButtonLabel": "实时流式传输", + "xpack.securitySolution.timeline.properties.streamLiveToolTip": "新数据到达时更新时间线", + "xpack.securitySolution.timeline.properties.timelineDescription": "时间线描述", + "xpack.securitySolution.timeline.properties.timelineTitleAriaLabel": "时间线标题", + "xpack.securitySolution.timeline.properties.titleTitle": "标题", + "xpack.securitySolution.timeline.properties.unlockDatePickerDescription": "从全局日期选取器解除锁定日期选取器", + "xpack.securitySolution.timeline.properties.unlockDatePickerTooltip": "启用当前查看的页面和您的时间线之间的日期/时间范围同步", + "xpack.securitySolution.timeline.properties.untitledTimelinePlaceholder": "未命名时间线", + "xpack.securitySolution.timeline.protocol": "协议", + "xpack.securitySolution.timeline.rangePicker.oneDay": "1 日", + "xpack.securitySolution.timeline.rangePicker.oneMonth": "1 个月", + "xpack.securitySolution.timeline.rangePicker.oneWeek": "1 周", + "xpack.securitySolution.timeline.rangePicker.oneYear": "1 年", + "xpack.securitySolution.timeline.searchOrFilter.eventTypeAllEvent": "所有事件", + "xpack.securitySolution.timeline.searchOrFilter.eventTypeRawEvent": "原始事件", + "xpack.securitySolution.timeline.searchOrFilter.eventTypeSignalEvent": "信号事件", + "xpack.securitySolution.timeline.searchOrFilter.filterDescription": "来自上述数据提供程序的事件按相邻 KQL 进行筛选", + "xpack.securitySolution.timeline.searchOrFilter.filterKqlPlaceholder": "筛选事件", + "xpack.securitySolution.timeline.searchOrFilter.filterKqlSelectedText": "筛选", + "xpack.securitySolution.timeline.searchOrFilter.filterKqlTooltip": "来自上述数据提供程序的事件按此 KQL 进行筛选", + "xpack.securitySolution.timeline.searchOrFilter.filterOrSearchWithKql": "使用 KQL 筛选或搜索", + "xpack.securitySolution.timeline.searchOrFilter.searchDescription": "来自上述数据提供程序的事件与来自相邻 KQL 的结果合并", + "xpack.securitySolution.timeline.searchOrFilter.searchKqlPlaceholder": "搜索事件", + "xpack.securitySolution.timeline.searchOrFilter.searchKqlSelectedText": "搜索", + "xpack.securitySolution.timeline.searchOrFilter.searchKqlTooltip": "来自上述数据提供程序的事件与来自此 KQL 的结果合并", + "xpack.securitySolution.timeline.source": "源", + "xpack.securitySolution.timeline.tcp": "TCP", + "xpack.securitySolution.timeline.typeTooltip": "类型", + "xpack.securitySolution.timelines.allTimelines.errorFetchingTimelinesTitle": "无法查询所有时间线数据", + "xpack.securitySolution.timelines.allTimelines.importTimelineTitle": "导入时间线", + "xpack.securitySolution.timelines.allTimelines.panelTitle": "所有时间线", + "xpack.securitySolution.timelines.components.importTimelineModal.importFailedDetailedTitle": "时间线 ID:{id}\n 状态代码:{statusCode}\n 消息:{message}", + "xpack.securitySolution.timelines.components.importTimelineModal.importFailedTitle": "无法导入时间线", + "xpack.securitySolution.timelines.components.importTimelineModal.importTimelineTitle": "导入时间线", + "xpack.securitySolution.timelines.components.importTimelineModal.importTitle": "导入时间线……", + "xpack.securitySolution.timelines.components.importTimelineModal.initialPromptTextDescription": "选择或拖放有效的 rules_export.ndjson 文件", + "xpack.securitySolution.timelines.components.importTimelineModal.overwriteDescription": "自动覆盖具有相同时间线 ID 的已保存对象", + "xpack.securitySolution.timelines.components.importTimelineModal.selectTimelineDescription": "选择要导入的 Security 时间线(如从“时间线”视图导出的)", + "xpack.securitySolution.timelines.components.importTimelineModal.successfullyImportedTimelinesTitle": "已成功导入 {totalCount} 条{totalCount, plural, =1 {时间线} other {时间线}}", + "xpack.securitySolution.timelines.components.tabs.templatesTitle": "模板", + "xpack.securitySolution.timelines.components.tabs.timelinesTitle": "时间线", + "xpack.securitySolution.timelines.pageTitle": "时间线", + "xpack.securitySolution.topN.allEventsSelectLabel": "所有事件", + "xpack.securitySolution.topN.closeButtonLabel": "关闭", + "xpack.securitySolution.topN.rawEventsSelectLabel": "原始事件", + "xpack.securitySolution.uiSettings.defaultAnomalyScoreDescription": "

在显示异常之前要超过的默认异常分数阈值。

有效值:0 到 100。

", + "xpack.securitySolution.uiSettings.defaultAnomalyScoreLabel": "默认异常阈值", + "xpack.securitySolution.uiSettings.defaultIndexDescription": "

Security 应用要从其中搜索事件的 Elasticsearch 索引逗号分隔列表。

", + "xpack.securitySolution.uiSettings.defaultIndexLabel": "默认索引", + "xpack.securitySolution.uiSettings.defaultRefreshIntervalDescription": "

Security 时间筛选的默认刷新时间间隔(毫秒)。

", + "xpack.securitySolution.uiSettings.defaultRefreshIntervalLabel": "时间筛选刷新时间间隔", + "xpack.securitySolution.uiSettings.defaultTimeRangeDescription": "

Security 时间筛选中的默认时间期间。

", + "xpack.securitySolution.uiSettings.defaultTimeRangeLabel": "时间筛选默认值", + "xpack.securitySolution.uiSettings.enableNewsFeedDescription": "

启用新闻源

", + "xpack.securitySolution.uiSettings.enableNewsFeedLabel": "新闻源", + "xpack.securitySolution.uiSettings.ipReputationLinks": "IP 信誉链接", + "xpack.securitySolution.uiSettings.ipReputationLinksDescription": "用于构建要显示在“IP 详细信息”页面上的信誉 URL 列表的 URL 模板数组。", + "xpack.securitySolution.uiSettings.newsFeedUrl": "新闻源 URL", + "xpack.securitySolution.uiSettings.newsFeedUrlDescription": "

将从此 URL 检索新闻源内容

", + "xpack.securitySolution.uncommonProcessTable.hostsTitle": "主机", + "xpack.securitySolution.uncommonProcessTable.lastCommandTitle": "上一命令", + "xpack.securitySolution.uncommonProcessTable.lastUserTitle": "上一用户", + "xpack.securitySolution.uncommonProcessTable.nameTitle": "名称", + "xpack.securitySolution.uncommonProcessTable.numberOfHostsTitle": "主机数目", + "xpack.securitySolution.uncommonProcessTable.numberOfInstances": "实例", + "xpack.securitySolution.uncommonProcessTable.rows": "{numRows} {numRows, plural, =0 {行} =1 {行} other {行}}", + "xpack.securitySolution.uncommonProcessTable.unit": "{totalCount, plural, =1 {个进程} other {个进程}}", + "xpack.securitySolution.zeek.othDescription": "未看到 SYN,仅中游流量", + "xpack.securitySolution.zeek.rejDescription": "已拒绝连接尝试", + "xpack.securitySolution.zeek.rstoODescription": "连接已建立,发起方已中止(已发送 RST)", + "xpack.securitySolution.zeek.rstosoDescription": "发起方已发送 SYN,后跟 RST,响应方未发送 SYN-ACK", + "xpack.securitySolution.zeek.rstrDescription": "已建立,响应方已中止", + "xpack.securitySolution.zeek.rstrhDescription": "响应方已发送 SYN ACK,后跟 RST,(假设)发起方未发送 SYN", + "xpack.securitySolution.zeek.s0Description": "已看到连接尝试,无答复", + "xpack.securitySolution.zeek.s1Description": "连接已建立,未终止", + "xpack.securitySolution.zeek.s2Description": "连接已建立,已看到发起方的关闭尝试(但没有响应方的答复)", + "xpack.securitySolution.zeek.s3Description": "连接已建立,已看到响应方的关闭尝试(但没有发起方的答复)", + "xpack.securitySolution.zeek.sfDescription": "正常 SYN/FIN 完成", + "xpack.securitySolution.zeek.shDescription": "发起方已发送 SYN,后跟 FIN,响应方未发送 SYN ACK", + "xpack.securitySolution.zeek.shrDescription": "响应方已发送 SYN ACK,后跟 FIN,发起方未发送 SYN", "xpack.snapshotRestore.addPolicy.breadcrumbTitle": "添加策略", "xpack.snapshotRestore.addPolicy.loadingIndicesDescription": "正在加载可用索引……", "xpack.snapshotRestore.addPolicy.LoadingIndicesErrorMessage": "加载可用索引时出错", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx index 7ce952e9b3e0a..7db6b5145f895 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx @@ -3,7 +3,7 @@ * 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, { Fragment } from 'react'; +import React, { Fragment, lazy } from 'react'; import { mountWithIntl, nextTick } from 'test_utils/enzyme_helpers'; import { coreMock } from '../../../../../../../src/core/public/mocks'; import { ReactWrapper } from 'enzyme'; @@ -18,6 +18,13 @@ jest.mock('../../lib/action_connector_api', () => ({ const actionTypeRegistry = actionTypeRegistryMock.create(); describe('action_form', () => { let deps: any; + + const mockedActionParamsFields = lazy(async () => ({ + default() { + return ; + }, + })); + const alertType = { id: 'my-alert-type', iconClass: 'test', @@ -41,7 +48,7 @@ describe('action_form', () => { return validationResult; }, actionConnectorFields: null, - actionParamsFields: null, + actionParamsFields: mockedActionParamsFields, }; const disabledByConfigActionType = { @@ -56,7 +63,7 @@ describe('action_form', () => { return validationResult; }, actionConnectorFields: null, - actionParamsFields: null, + actionParamsFields: mockedActionParamsFields, }; const disabledByLicenseActionType = { @@ -71,7 +78,7 @@ describe('action_form', () => { return validationResult; }, actionConnectorFields: null, - actionParamsFields: null, + actionParamsFields: mockedActionParamsFields, }; const preconfiguredOnly = { @@ -86,6 +93,21 @@ describe('action_form', () => { return validationResult; }, actionConnectorFields: null, + actionParamsFields: mockedActionParamsFields, + }; + + const actionTypeWithoutParams = { + id: 'my-action-type-without-params', + iconClass: 'test', + selectMessage: 'test', + validateConnector: (): ValidationResult => { + return { errors: {} }; + }, + validateParams: (): ValidationResult => { + const validationResult = { errors: {} }; + return validationResult; + }, + actionConnectorFields: null, actionParamsFields: null, }; @@ -153,6 +175,7 @@ describe('action_form', () => { disabledByConfigActionType, disabledByLicenseActionType, preconfiguredOnly, + actionTypeWithoutParams, ]); actionTypeRegistry.has.mockReturnValue(true); actionTypeRegistry.get.mockReturnValue(actionType); @@ -237,6 +260,14 @@ describe('action_form', () => { enabledInLicense: false, minimumLicenseRequired: 'gold', }, + { + id: actionTypeWithoutParams.id, + name: 'Action type without params', + enabled: true, + enabledInConfig: true, + enabledInLicense: true, + minimumLicenseRequired: 'basic', + }, ]} toastNotifications={deps!.toastNotifications} docLinks={deps.docLinks} @@ -340,5 +371,13 @@ describe('action_form', () => { .exists() ).toBeTruthy(); }); + + it(`shouldn't render action types without params component`, async () => { + await setup(); + const actionOption = wrapper.find( + `[data-test-subj="${actionTypeWithoutParams.id}-ActionTypeSelectOption"]` + ); + expect(actionOption.exists()).toBeFalsy(); + }); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx index 4c3a8d133922d..201852ddeee48 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx @@ -547,6 +547,7 @@ export const ActionForm = ({ actionTypeNodes = actionTypeRegistry .list() .filter((item) => actionTypesIndex[item.id]) + .filter((item) => !!item.actionParamsFields) .sort((a, b) => actionTypeCompare(actionTypesIndex[a.id], actionTypesIndex[b.id], preconfiguredConnectors) ) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx index a317c31a6e4b1..09d94e2418cb8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx @@ -165,7 +165,7 @@ describe('actions_connectors_list component with items', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'actions:show': true, 'actions:save': true, 'actions:delete': true, @@ -248,7 +248,7 @@ describe('actions_connectors_list component empty with show only capability', () navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'actions:show': true, 'actions:save': false, 'actions:delete': false, @@ -334,7 +334,7 @@ describe('actions_connectors_list with show only capability', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'actions:show': true, 'actions:save': false, 'actions:delete': false, @@ -432,7 +432,7 @@ describe('actions_connectors_list component with disabled items', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'actions:show': true, 'actions:save': true, 'actions:delete': true, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx index 99a059e475a90..d8f0d0b6b20a0 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.test.tsx @@ -27,7 +27,7 @@ jest.mock('../../../app_context', () => ({ http: jest.fn(), capabilities: { get: jest.fn(() => ({})), - siem: { + securitySolution: { 'alerting:show': true, 'alerting:save': true, 'alerting:delete': true, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx index 8166aa9bf6925..dc2c1f972a5db 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx @@ -97,7 +97,7 @@ describe('alerts_list component empty', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'alerting:show': true, 'alerting:save': true, 'alerting:delete': true, @@ -216,7 +216,7 @@ describe('alerts_list component with items', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'alerting:show': true, 'alerting:save': true, 'alerting:delete': true, @@ -298,7 +298,7 @@ describe('alerts_list component empty with show only capability', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'alerting:show': true, 'alerting:save': false, 'alerting:delete': false, @@ -413,7 +413,7 @@ describe('alerts_list with show only capability', () => { navigateToApp, capabilities: { ...capabilities, - siem: { + securitySolution: { 'alerting:show': true, 'alerting:save': false, 'alerting:delete': false, diff --git a/x-pack/plugins/advanced_ui_actions/kibana.json b/x-pack/plugins/ui_actions_enhanced/kibana.json similarity index 60% rename from x-pack/plugins/advanced_ui_actions/kibana.json rename to x-pack/plugins/ui_actions_enhanced/kibana.json index 45907e2d8b602..027004f165c3b 100644 --- a/x-pack/plugins/advanced_ui_actions/kibana.json +++ b/x-pack/plugins/ui_actions_enhanced/kibana.json @@ -1,7 +1,7 @@ { - "id": "advancedUiActions", + "id": "uiActionsEnhanced", "version": "kibana", - "configPath": ["xpack", "advanced_ui_actions"], + "configPath": ["xpack", "ui_actions_enhanced"], "requiredPlugins": [ "embeddable", "uiActions" diff --git a/x-pack/plugins/advanced_ui_actions/public/can_inherit_time_range.test.ts b/x-pack/plugins/ui_actions_enhanced/public/can_inherit_time_range.test.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/can_inherit_time_range.test.ts rename to x-pack/plugins/ui_actions_enhanced/public/can_inherit_time_range.test.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/can_inherit_time_range.ts b/x-pack/plugins/ui_actions_enhanced/public/can_inherit_time_range.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/can_inherit_time_range.ts rename to x-pack/plugins/ui_actions_enhanced/public/can_inherit_time_range.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.scss b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.scss similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.scss rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.scss diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.story.tsx b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.story.tsx similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.story.tsx rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.story.tsx diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.test.tsx b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.test.tsx similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.test.tsx rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.test.tsx diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.tsx b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.tsx rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/i18n.ts b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/i18n.ts similarity index 85% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/i18n.ts rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/i18n.ts index a315184bf68ef..3e7e211dc7738 100644 --- a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/i18n.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/i18n.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const txtChangeButton = i18n.translate( - 'xpack.advancedUiActions.components.actionWizard.changeButton', + 'xpack.uiActionsEnhanced.components.actionWizard.changeButton', { defaultMessage: 'Change', } diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/index.ts b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/index.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/index.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/test_data.tsx b/x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/action_wizard/test_data.tsx rename to x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx diff --git a/x-pack/plugins/advanced_ui_actions/public/components/index.ts b/x-pack/plugins/ui_actions_enhanced/public/components/index.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/components/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/components/index.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/custom_time_range_action.test.ts b/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.test.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/custom_time_range_action.test.ts rename to x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.test.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/custom_time_range_action.tsx b/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.tsx similarity index 98% rename from x-pack/plugins/advanced_ui_actions/public/custom_time_range_action.tsx rename to x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.tsx index c0cd8d5540db2..4da4d648bc0ec 100644 --- a/x-pack/plugins/advanced_ui_actions/public/custom_time_range_action.tsx +++ b/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.tsx @@ -61,7 +61,7 @@ export class CustomTimeRangeAction implements ActionByType - {i18n.translate('xpack.advancedUiActions.customizeTimeRange.modal.headerTitle', { + {i18n.translate('xpack.uiActionsEnhanced.customizeTimeRange.modal.headerTitle', { defaultMessage: 'Customize panel time range', })} @@ -104,7 +104,7 @@ export class CustomizeTimeRangeModal extends Component {i18n.translate( - 'xpack.advancedUiActions.customizePanelTimeRange.modal.removeButtonTitle', + 'xpack.uiActionsEnhanced.customizePanelTimeRange.modal.removeButtonTitle', { defaultMessage: 'Remove', } @@ -152,7 +152,7 @@ export class CustomizeTimeRangeModal extends Component {i18n.translate( - 'xpack.advancedUiActions.customizePanelTimeRange.modal.cancelButtonTitle', + 'xpack.uiActionsEnhanced.customizePanelTimeRange.modal.cancelButtonTitle', { defaultMessage: 'Cancel', } @@ -163,13 +163,13 @@ export class CustomizeTimeRangeModal extends Component {this.state.inheritTimeRange ? i18n.translate( - 'xpack.advancedUiActions.customizePanelTimeRange.modal.addToPanelButtonTitle', + 'xpack.uiActionsEnhanced.customizePanelTimeRange.modal.addToPanelButtonTitle', { defaultMessage: 'Add to panel', } ) : i18n.translate( - 'xpack.advancedUiActions.customizePanelTimeRange.modal.updatePanelTimeRangeButtonTitle', + 'xpack.uiActionsEnhanced.customizePanelTimeRange.modal.updatePanelTimeRangeButtonTitle', { defaultMessage: 'Update', } diff --git a/x-pack/plugins/advanced_ui_actions/public/does_inherit_time_range.ts b/x-pack/plugins/ui_actions_enhanced/public/does_inherit_time_range.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/does_inherit_time_range.ts rename to x-pack/plugins/ui_actions_enhanced/public/does_inherit_time_range.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/drilldowns/drilldown_definition.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_definition.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/drilldowns/drilldown_definition.ts rename to x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_definition.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/drilldowns/index.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/index.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/drilldowns/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/drilldowns/index.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/action_factory.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/action_factory.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/action_factory.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/action_factory.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/action_factory_definition.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/action_factory_definition.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/action_factory_definition.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/action_factory_definition.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_manager.test.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.test.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_manager.test.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.test.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_manager.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_manager.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_manager_state.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager_state.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_manager_state.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager_state.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_storage.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_storage.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/dynamic_action_storage.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_storage.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/index.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/index.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/index.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/dynamic_actions/types.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/types.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/dynamic_actions/types.ts rename to x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/types.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/index.ts b/x-pack/plugins/ui_actions_enhanced/public/index.ts similarity index 91% rename from x-pack/plugins/advanced_ui_actions/public/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/index.ts index 024cfe5530b97..a3cfddb31d663 100644 --- a/x-pack/plugins/advanced_ui_actions/public/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/index.ts @@ -19,8 +19,8 @@ export { export { ActionWizard } from './components'; export { - ActionFactoryDefinition as AdvancedUiActionsActionFactoryDefinition, - ActionFactory as AdvancedUiActionsActionFactory, + ActionFactoryDefinition as UiActionsEnhancedActionFactoryDefinition, + ActionFactory as UiActionsEnhancedActionFactory, SerializedAction as UiActionsEnhancedSerializedAction, SerializedEvent as UiActionsEnhancedSerializedEvent, AbstractActionStorage as UiActionsEnhancedAbstractActionStorage, diff --git a/x-pack/plugins/advanced_ui_actions/public/mocks.ts b/x-pack/plugins/ui_actions_enhanced/public/mocks.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/mocks.ts rename to x-pack/plugins/ui_actions_enhanced/public/mocks.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/plugin.ts b/x-pack/plugins/ui_actions_enhanced/public/plugin.ts similarity index 93% rename from x-pack/plugins/advanced_ui_actions/public/plugin.ts rename to x-pack/plugins/ui_actions_enhanced/public/plugin.ts index f042130158aec..d79996d5ecc1b 100644 --- a/x-pack/plugins/advanced_ui_actions/public/plugin.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/plugin.ts @@ -11,6 +11,7 @@ import { Plugin, } from '../../../../src/core/public'; import { createReactOverlays } from '../../../../src/plugins/kibana_react/public'; +import { UI_SETTINGS } from '../../../../src/plugins/data/public'; import { UiActionsSetup, UiActionsStart } from '../../../../src/plugins/ui_actions/public'; import { CONTEXT_MENU_TRIGGER, @@ -72,7 +73,9 @@ export class AdvancedUiActionsPublicPlugin public start(core: CoreStart, { uiActions }: StartDependencies): StartContract { const dateFormat = core.uiSettings.get('dateFormat') as string; - const commonlyUsedRanges = core.uiSettings.get('timepicker:quickRanges') as CommonlyUsedRange[]; + const commonlyUsedRanges = core.uiSettings.get( + UI_SETTINGS.TIMEPICKER_QUICK_RANGES + ) as CommonlyUsedRange[]; const { openModal } = createReactOverlays(core); const timeRangeAction = new CustomTimeRangeAction({ openModal, diff --git a/x-pack/plugins/advanced_ui_actions/public/services/index.ts b/x-pack/plugins/ui_actions_enhanced/public/services/index.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/services/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/services/index.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/services/ui_actions_service_enhancements.test.ts b/x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.test.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/services/ui_actions_service_enhancements.test.ts rename to x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.test.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/services/ui_actions_service_enhancements.ts b/x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/services/ui_actions_service_enhancements.ts rename to x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/test_helpers/index.ts b/x-pack/plugins/ui_actions_enhanced/public/test_helpers/index.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/test_helpers/index.ts rename to x-pack/plugins/ui_actions_enhanced/public/test_helpers/index.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/test_helpers/time_range_container.ts b/x-pack/plugins/ui_actions_enhanced/public/test_helpers/time_range_container.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/test_helpers/time_range_container.ts rename to x-pack/plugins/ui_actions_enhanced/public/test_helpers/time_range_container.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/test_helpers/time_range_embeddable.ts b/x-pack/plugins/ui_actions_enhanced/public/test_helpers/time_range_embeddable.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/test_helpers/time_range_embeddable.ts rename to x-pack/plugins/ui_actions_enhanced/public/test_helpers/time_range_embeddable.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/test_helpers/time_range_embeddable_factory.ts b/x-pack/plugins/ui_actions_enhanced/public/test_helpers/time_range_embeddable_factory.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/test_helpers/time_range_embeddable_factory.ts rename to x-pack/plugins/ui_actions_enhanced/public/test_helpers/time_range_embeddable_factory.ts diff --git a/x-pack/plugins/advanced_ui_actions/public/types.ts b/x-pack/plugins/ui_actions_enhanced/public/types.ts similarity index 100% rename from x-pack/plugins/advanced_ui_actions/public/types.ts rename to x-pack/plugins/ui_actions_enhanced/public/types.ts diff --git a/x-pack/plugins/advanced_ui_actions/scripts/storybook.js b/x-pack/plugins/ui_actions_enhanced/scripts/storybook.js similarity index 93% rename from x-pack/plugins/advanced_ui_actions/scripts/storybook.js rename to x-pack/plugins/ui_actions_enhanced/scripts/storybook.js index 3da0a3b37bfaf..2a192fc56469e 100644 --- a/x-pack/plugins/advanced_ui_actions/scripts/storybook.js +++ b/x-pack/plugins/ui_actions_enhanced/scripts/storybook.js @@ -8,6 +8,6 @@ import { join } from 'path'; // eslint-disable-next-line require('@kbn/storybook').runStorybookCli({ - name: 'advanced_ui_actions', + name: 'ui_actions_enhanced', storyGlobs: [join(__dirname, '..', 'public', 'components', '**', '*.story.tsx')], }); diff --git a/x-pack/plugins/uptime/README.md b/x-pack/plugins/uptime/README.md index 10c1fc0edcd00..54bf48e8d3c86 100644 --- a/x-pack/plugins/uptime/README.md +++ b/x-pack/plugins/uptime/README.md @@ -55,7 +55,7 @@ In another shell, from **~kibana/x-pack**: #### API tests If instead you need to run API tests, start up the test server and then in another shell, from **~kibana/x-pack**: -`node ../scripts/functional_test_runner.js --config test/api_integration/config.js --grep="{TEST_NAME}"`. +`node ../scripts/functional_test_runner.js --config test/api_integration/config.ts --grep="{TEST_NAME}"`. You can update snapshots by prefixing the runner command with `env UPDATE_UPTIME_FIXTURES=1` diff --git a/x-pack/plugins/uptime/public/apps/plugin.ts b/x-pack/plugins/uptime/public/apps/plugin.ts index 5d9bbacb49006..d3a67f81004da 100644 --- a/x-pack/plugins/uptime/public/apps/plugin.ts +++ b/x-pack/plugins/uptime/public/apps/plugin.ts @@ -56,7 +56,7 @@ export class UptimePlugin appRoute: '/app/uptime#/', id: PLUGIN.ID, euiIconType: 'uptimeApp', - order: 8900, + order: 8400, title: PLUGIN.TITLE, category: DEFAULT_APP_CATEGORIES.observability, mount: async (params: AppMountParameters) => { diff --git a/x-pack/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx b/x-pack/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx index daf404937ca02..c83a04e4e9939 100644 --- a/x-pack/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx +++ b/x-pack/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx @@ -73,7 +73,7 @@ export const getKibanaFrameworkAdapter = ( links: [ { linkType: 'documentation', - href: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/xpack-uptime.html`, + href: `${ELASTIC_WEBSITE_URL}guide/en/uptime/${DOC_LINK_VERSION}/uptime-app-overview.html`, }, { linkType: 'discuss', diff --git a/x-pack/plugins/watcher/public/legacy/time_buckets.js b/x-pack/plugins/watcher/public/legacy/time_buckets.js index c1674bc68ab42..9df254d2bb1e6 100644 --- a/x-pack/plugins/watcher/public/legacy/time_buckets.js +++ b/x-pack/plugins/watcher/public/legacy/time_buckets.js @@ -6,7 +6,7 @@ import _ from 'lodash'; import moment from 'moment'; -import { search, FIELD_FORMAT_IDS } from '../../../../../src/plugins/data/public'; +import { search, FIELD_FORMAT_IDS, UI_SETTINGS } from '../../../../../src/plugins/data/public'; import { calcAutoIntervalLessThan, calcAutoIntervalNear } from './calc_auto_interval'; import { convertDurationToNormalizedEsInterval, @@ -219,14 +219,14 @@ TimeBuckets.prototype.getInterval = function (useNormalizedEsInterval = true) { function readInterval() { const interval = self._i; if (moment.isDuration(interval)) return interval; - return calcAutoIntervalNear(self.getConfig('histogram:barTarget'), Number(duration)); + return calcAutoIntervalNear(self.getConfig(UI_SETTINGS.HISTOGRAM_BAR_TARGET), Number(duration)); } // check to see if the interval should be scaled, and scale it if so function maybeScaleInterval(interval) { if (!self.hasBounds()) return interval; - const maxLength = self.getConfig('histogram:maxBars'); + const maxLength = self.getConfig(UI_SETTINGS.HISTOGRAM_MAX_BARS); const approxLen = duration / interval; let scaled; diff --git a/x-pack/scripts/functional_tests.js b/x-pack/scripts/functional_tests.js index fc78e1b80bc68..4392299a78e72 100644 --- a/x-pack/scripts/functional_tests.js +++ b/x-pack/scripts/functional_tests.js @@ -11,8 +11,9 @@ const alwaysImportedTests = [ require.resolve('../test/functional/config_security_trial.ts'), ]; const onlyNotInCoverageTests = [ - require.resolve('../test/api_integration/config_security_basic.js'), - require.resolve('../test/api_integration/config.js'), + require.resolve('../test/api_integration/config_security_basic.ts'), + require.resolve('../test/api_integration/config_security_trial.ts'), + require.resolve('../test/api_integration/config.ts'), require.resolve('../test/alerting_api_integration/basic/config.ts'), require.resolve('../test/alerting_api_integration/spaces_only/config.ts'), require.resolve('../test/alerting_api_integration/security_and_spaces/config.ts'), diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index e6b9c0bf5409f..19aee29e9b36d 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -40,7 +40,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) return async ({ readConfigFile }: FtrConfigProviderContext) => { const xPackApiIntegrationTestsConfig = await readConfigFile( - require.resolve('../../api_integration/config.js') + require.resolve('../../api_integration/config.ts') ); const servers = { ...xPackApiIntegrationTestsConfig.get('servers'), diff --git a/x-pack/test/api_integration/apis/endpoint/alerts/index.ts b/x-pack/test/api_integration/apis/endpoint/alerts/index.ts index 155513aefc609..67ef3ea42cf16 100644 --- a/x-pack/test/api_integration/apis/endpoint/alerts/index.ts +++ b/x-pack/test/api_integration/apis/endpoint/alerts/index.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect/expect.js'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { AlertData } from '../../../../../plugins/siem/common/endpoint_alerts/types'; -import { AlertId } from '../../../../../plugins/siem/server/endpoint/alerts/handlers/lib/index'; +import { AlertData } from '../../../../../plugins/security_solution/common/endpoint_alerts/types'; +import { AlertId } from '../../../../../plugins/security_solution/server/endpoint/alerts/handlers/lib/index'; /** * The number of alert documents in the es archive. diff --git a/x-pack/test/api_integration/apis/endpoint/resolver.ts b/x-pack/test/api_integration/apis/endpoint/resolver.ts index e9ef8f581299b..43f42f700a4c8 100644 --- a/x-pack/test/api_integration/apis/endpoint/resolver.ts +++ b/x-pack/test/api_integration/apis/endpoint/resolver.ts @@ -14,10 +14,18 @@ import { ResolverChildren, ResolverTree, LegacyEndpointEvent, -} from '../../../../plugins/siem/common/endpoint/types'; -import { parentEntityId } from '../../../../plugins/siem/common/endpoint/models/event'; + ResolverNodeStats, +} from '../../../../plugins/security_solution/common/endpoint/types'; +import { parentEntityId } from '../../../../plugins/security_solution/common/endpoint/models/event'; import { FtrProviderContext } from '../../ftr_provider_context'; -import { Event, Tree, TreeNode } from '../../../../plugins/siem/common/endpoint/generate_data'; +import { + Event, + Tree, + TreeNode, + RelatedEventCategory, + RelatedEventInfo, + categoryMapping, +} from '../../../../plugins/security_solution/common/endpoint/generate_data'; import { Options, GeneratedTrees } from '../../services/resolver'; /** @@ -137,16 +145,60 @@ const compareArrays = ( }); }; +/** + * Verifies that the stats received from ES for a node reflect the categories of events that the generator created. + * + * @param relatedEvents the related events received for a particular node + * @param categories the related event info used when generating the resolver tree + */ +const verifyStats = (stats: ResolverNodeStats | undefined, categories: RelatedEventInfo[]) => { + expect(stats).to.not.be(undefined); + let totalExpEvents = 0; + for (const cat of categories) { + const ecsCategories = categoryMapping[cat.category]; + if (Array.isArray(ecsCategories)) { + // if there are multiple ecs categories used to define a related event, the count for all of them should be the same + // and they should equal what is defined in the categories used to generate the related events + for (const ecsCat of ecsCategories) { + expect(stats?.events.byCategory[ecsCat]).to.be(cat.count); + } + } else { + expect(stats?.events.byCategory[ecsCategories]).to.be(cat.count); + } + + totalExpEvents += cat.count; + } + expect(stats?.events.total).to.be(totalExpEvents); +}; + +/** + * A helper function for verifying the stats information an array of nodes. + * + * @param nodes an array of lifecycle nodes that should have a stats field defined + * @param categories the related event info used when generating the resolver tree + */ +const verifyLifecycleStats = (nodes: LifecycleNode[], categories: RelatedEventInfo[]) => { + for (const node of nodes) { + verifyStats(node.stats, categories); + } +}; + export default function resolverAPIIntegrationTests({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); const resolver = getService('resolverGenerator'); + const relatedEventsToGen = [ + { category: RelatedEventCategory.Driver, count: 2 }, + { category: RelatedEventCategory.File, count: 1 }, + { category: RelatedEventCategory.Registry, count: 1 }, + ]; + let resolverTrees: GeneratedTrees; let tree: Tree; const treeOptions: Options = { ancestors: 5, - relatedEvents: 4, + relatedEvents: relatedEventsToGen, children: 3, generations: 2, percentTerminated: 100, @@ -559,14 +611,17 @@ export default function resolverAPIIntegrationTests({ getService }: FtrProviderC expect(body.children.nextChild).to.equal(null); expect(body.children.childNodes.length).to.equal(12); verifyChildren(body.children.childNodes, tree, 4, 3); + verifyLifecycleStats(body.children.childNodes, relatedEventsToGen); expect(body.ancestry.nextAncestor).to.equal(null); verifyAncestry(body.ancestry.ancestors, tree, true); + verifyLifecycleStats(body.ancestry.ancestors, relatedEventsToGen); expect(body.relatedEvents.nextEvent).to.equal(null); compareArrays(tree.origin.relatedEvents, body.relatedEvents.events, true); compareArrays(tree.origin.lifecycle, body.lifecycle, true); + verifyStats(body.stats, relatedEventsToGen); }); }); }); diff --git a/x-pack/test/api_integration/apis/features/features/features.ts b/x-pack/test/api_integration/apis/features/features/features.ts index 11fb9b2de7199..ed93b627f003c 100644 --- a/x-pack/test/api_integration/apis/features/features/features.ts +++ b/x-pack/test/api_integration/apis/features/features/features.ts @@ -110,7 +110,7 @@ export default function ({ getService }: FtrProviderContext) { 'logs', 'maps', 'uptime', - 'siem', + 'securitySolution', 'ingestManager', ].sort() ); diff --git a/x-pack/test/api_integration/apis/index.js b/x-pack/test/api_integration/apis/index.js index b76cc00d842fe..2719486d0c502 100644 --- a/x-pack/test/api_integration/apis/index.js +++ b/x-pack/test/api_integration/apis/index.js @@ -23,7 +23,7 @@ export default function ({ loadTestFile }) { loadTestFile(require.resolve('./management')); loadTestFile(require.resolve('./uptime')); loadTestFile(require.resolve('./maps')); - loadTestFile(require.resolve('./siem')); + loadTestFile(require.resolve('./security_solution')); loadTestFile(require.resolve('./short_urls')); loadTestFile(require.resolve('./lens')); loadTestFile(require.resolve('./fleet')); diff --git a/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts b/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts index 80ffc8fd36e49..77e23bd74cc22 100644 --- a/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts +++ b/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts @@ -7,6 +7,7 @@ import expect from '@kbn/expect'; import { SuperTest } from 'supertest'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { CSV_QUOTE_VALUES_SETTING } from '../../../../../../src/plugins/share/common/constants'; export default function featureControlsTests({ getService }: FtrProviderContext) { const supertest: SuperTest = getService('supertestWithoutAuth'); @@ -32,7 +33,7 @@ export default function featureControlsTests({ getService }: FtrProviderContext) .post(`${basePath}/api/kibana/settings`) .auth(username, password) .set('kbn-xsrf', 'foo') - .send({ changes: { 'csv:quoteValues': null } }) + .send({ changes: { [CSV_QUOTE_VALUES_SETTING]: null } }) .then((response: any) => ({ error: undefined, response })) .catch((error: any) => ({ error, response: undefined })); } diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/fixtures.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/fixtures.js index 6dc1982d70f69..12975c484ebee 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/fixtures.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/fixtures.js @@ -4,21 +4,22 @@ * you may not use this file except in compliance with the Elastic License. */ -import { getRandomString } from './lib'; import { INDEX_TEMPLATE_PATTERN_PREFIX } from './constants'; -export const getPolicyPayload = ({ name = getRandomString() } = {}) => ({ +export const getPolicyPayload = (name) => ({ name, phases: { hot: { + min_age: '1d', actions: { + set_priority: { + priority: 100, + }, + unfollow: {}, rollover: { max_age: '30d', max_size: '50gb', }, - set_priority: { - priority: 100, - }, }, }, warm: { @@ -26,6 +27,26 @@ export const getPolicyPayload = ({ name = getRandomString() } = {}) => ({ set_priority: { priority: 50, }, + unfollow: {}, + readonly: {}, + allocate: { + number_of_replicas: 5, + include: { + a: 'a', + }, + exclude: { + b: 'b', + }, + require: { + c: 'c', + }, + }, + shrink: { + number_of_shards: 1, + }, + forcemerge: { + max_num_segments: 1, + }, }, }, cold: { @@ -34,12 +55,34 @@ export const getPolicyPayload = ({ name = getRandomString() } = {}) => ({ set_priority: { priority: 0, }, + unfollow: {}, + allocate: { + number_of_replicas: 5, + include: { + a: 'a', + }, + exclude: { + b: 'b', + }, + require: { + c: 'c', + }, + }, + freeze: {}, + searchable_snapshot: { + snapshot_repository: 'backing_repo', + }, }, }, delete: { min_age: '10d', actions: { - delete: {}, + wait_for_snapshot: { + policy: 'policy', + }, + delete: { + delete_searchable_snapshot: true, + }, }, }, }, diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/indices.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/indices.js index 6a6b8d790d9e5..af9ff4bf1bd9a 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/indices.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/indices.js @@ -29,7 +29,7 @@ export default function ({ getService }) { describe('policies', () => { it('should add a lifecycle policy to the index', async () => { // Create a policy - const policy = getPolicyPayload(); + const policy = getPolicyPayload('indices-test-policy'); const { name: policyName } = policy; await createPolicy(policy); @@ -52,7 +52,7 @@ export default function ({ getService }) { it('should remove a lifecycle policy from an index', async () => { // Create a policy - const policy = getPolicyPayload(); + const policy = getPolicyPayload('remove-test-policy'); const { name: policyName } = policy; await createPolicy(policy); @@ -77,7 +77,7 @@ export default function ({ getService }) { describe('index management extension', () => { it('should have an endpoint to retry a policy for an index that is in the ERROR step', async () => { // Create a policy - const policy = getPolicyPayload(); + const policy = getPolicyPayload('extension-test-policy'); const { name: policyName } = policy; await createPolicy(policy); diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.helpers.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.helpers.js index a8863c5dc6c78..d2b00365cd3e0 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.helpers.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.helpers.js @@ -5,7 +5,6 @@ */ import { API_BASE_PATH, DEFAULT_POLICY_NAME } from './constants'; -import { getPolicyPayload } from './fixtures'; import { getPolicyNames } from './lib'; export const registerHelpers = ({ supertest }) => { @@ -14,7 +13,7 @@ export const registerHelpers = ({ supertest }) => { ? supertest.get(`${API_BASE_PATH}/policies?withIndices=true`) : supertest.get(`${API_BASE_PATH}/policies`); - const createPolicy = (policy = getPolicyPayload()) => { + const createPolicy = (policy) => { return supertest.post(`${API_BASE_PATH}/policies`).set('kbn-xsrf', 'xxx').send(policy); }; diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js index 9fd38a6b32a60..fad7fb848122d 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js @@ -32,9 +32,7 @@ export default function ({ getService }) { after(() => Promise.all([cleanUpEsResources(), cleanUpPolicies()])); describe('list', () => { - // Disabled as the underline ES API has changed. Need to investigate - // Opened issue: https://github.com/elastic/kibana/issues/62778 - it.skip('should have a default policy to manage the Watcher history indices', async () => { + it('should have a default policy to manage the Watcher history indices', async () => { const { body } = await loadPolicies().expect(200); const policy = body.find((policy) => policy.name === DEFAULT_POLICY_NAME); @@ -50,7 +48,9 @@ export default function ({ getService }) { delete: { min_age: '7d', actions: { - delete: {}, + delete: { + delete_searchable_snapshot: true, + }, }, }, }, @@ -61,7 +61,7 @@ export default function ({ getService }) { it('should add the indices linked to the policies', async () => { // Create a policy - const policy = getPolicyPayload(); + const policy = getPolicyPayload('link-test-policy'); const { name: policyName } = policy; await createPolicy(policy); @@ -78,7 +78,7 @@ export default function ({ getService }) { describe('create', () => { it('should create a lifecycle policy', async () => { - const policy = getPolicyPayload(); + const policy = getPolicyPayload('create-test-policy'); const { name } = policy; // Load current policies @@ -96,7 +96,7 @@ export default function ({ getService }) { describe('delete', () => { it('should delete the policy created', async () => { - const policy = getPolicyPayload(); + const policy = getPolicyPayload('delete-test-policy'); const { name } = policy; // Create new policy diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/templates.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/templates.js index 2287558d9ef32..7fb9b35b8475e 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/templates.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/templates.js @@ -51,7 +51,7 @@ export default function ({ getService }) { describe('update', () => { it('should add a policy to a template', async () => { // Create policy - const policy = getPolicyPayload(); + const policy = getPolicyPayload('template-test-policy'); const { name: policyName } = policy; await createPolicy(policy); diff --git a/x-pack/test/api_integration/apis/management/index_management/templates.helpers.js b/x-pack/test/api_integration/apis/management/index_management/templates.helpers.js index efe41ad47b019..9f1fab4039397 100644 --- a/x-pack/test/api_integration/apis/management/index_management/templates.helpers.js +++ b/x-pack/test/api_integration/apis/management/index_management/templates.helpers.js @@ -7,12 +7,12 @@ import { API_BASE_PATH, INDEX_PATTERNS } from './constants'; export const registerHelpers = ({ supertest }) => { - const getAllTemplates = () => supertest.get(`${API_BASE_PATH}/templates`); + const getAllTemplates = () => supertest.get(`${API_BASE_PATH}/index-templates`); - const getOneTemplate = (name, formatVersion = 1) => - supertest.get(`${API_BASE_PATH}/templates/${name}?v=${formatVersion}`); + const getOneTemplate = (name, isLegacy = true) => + supertest.get(`${API_BASE_PATH}/index-templates/${name}?legacy=${isLegacy}`); - const getTemplatePayload = (name, formatVersion = 1) => ({ + const getTemplatePayload = (name, isLegacy = true) => ({ name, order: 1, indexPatterns: INDEX_PATTERNS, @@ -45,19 +45,22 @@ export const registerHelpers = ({ supertest }) => { }, }, _kbnMeta: { - formatVersion, + isLegacy, }, }); const createTemplate = (payload) => - supertest.put(`${API_BASE_PATH}/templates`).set('kbn-xsrf', 'xxx').send(payload); + supertest.post(`${API_BASE_PATH}/index-templates`).set('kbn-xsrf', 'xxx').send(payload); const deleteTemplates = (templates) => - supertest.post(`${API_BASE_PATH}/delete-templates`).set('kbn-xsrf', 'xxx').send({ templates }); + supertest + .post(`${API_BASE_PATH}/delete-index-templates`) + .set('kbn-xsrf', 'xxx') + .send({ templates }); const updateTemplate = (payload, templateName) => supertest - .put(`${API_BASE_PATH}/templates/${templateName}`) + .put(`${API_BASE_PATH}/index-templates/${templateName}`) .set('kbn-xsrf', 'xxx') .send(payload); diff --git a/x-pack/test/api_integration/apis/management/index_management/templates.js b/x-pack/test/api_integration/apis/management/index_management/templates.js index 625719443c56b..cd7f5fb209eca 100644 --- a/x-pack/test/api_integration/apis/management/index_management/templates.js +++ b/x-pack/test/api_integration/apis/management/index_management/templates.js @@ -35,10 +35,18 @@ export default function ({ getService }) { await createTemplate(payload).expect(200); }); + // TODO: When the "Create" API handler is added for V2 template, + // update this test to list composable templates. it('should list all the index templates with the expected parameters', async () => { - const { body: templates } = await getAllTemplates().expect(200); + const { body: allTemplates } = await getAllTemplates().expect(200); - const createdTemplate = templates.find((template) => template.name === payload.name); + // Composable templates + expect(allTemplates.templates).to.eql([]); + + // Legacy templates + const legacyTemplate = allTemplates.legacyTemplates.find( + (template) => template.name === payload.name + ); const expectedKeys = [ 'name', 'indexPatterns', @@ -46,13 +54,12 @@ export default function ({ getService }) { 'hasAliases', 'hasMappings', 'ilmPolicy', - 'isManaged', 'order', 'version', '_kbnMeta', ].sort(); - expect(Object.keys(createdTemplate).sort()).to.eql(expectedKeys); + expect(Object.keys(legacyTemplate).sort()).to.eql(expectedKeys); }); }); @@ -71,7 +78,6 @@ export default function ({ getService }) { 'indexPatterns', 'template', 'ilmPolicy', - 'isManaged', 'order', 'version', '_kbnMeta', @@ -155,7 +161,7 @@ export default function ({ getService }) { ).to.equal(templateName); const { body } = await deleteTemplates([ - { name: templateName, formatVersion: payload._kbnMeta.formatVersion }, + { name: templateName, isLegacy: payload._kbnMeta.isLegacy }, ]).expect(200); expect(body.errors).to.be.empty; diff --git a/x-pack/test/api_integration/apis/security/license_downgrade.ts b/x-pack/test/api_integration/apis/security/license_downgrade.ts new file mode 100644 index 0000000000000..1811f99977b60 --- /dev/null +++ b/x-pack/test/api_integration/apis/security/license_downgrade.ts @@ -0,0 +1,56 @@ +/* + * 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 expect from '@kbn/expect/expect.js'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + describe('Privileges registration', function () { + this.tags(['skipCloud']); + + it('privileges are re-registered on license downgrade', async () => { + // Verify currently registered privileges for TRIAL license. + // If you're adding a privilege to the following, that's great! + // If you're removing a privilege, this breaks backwards compatibility + // Roles are associated with these privileges, and we shouldn't be removing them in a minor version. + const expectedTrialLicenseDiscoverPrivileges = [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'url_create', + ]; + const trialPrivileges = await supertest + .get('/api/security/privileges') + .set('kbn-xsrf', 'xxx') + .send() + .expect(200); + + expect(trialPrivileges.body.features.discover).to.eql(expectedTrialLicenseDiscoverPrivileges); + + // Revert license to basic. + await supertest + .post('/api/license/start_basic?acknowledge=true') + .set('kbn-xsrf', 'xxx') + .expect(200, { + basic_was_started: true, + acknowledged: true, + }); + + // Verify that privileges were re-registered. + const expectedBasicLicenseDiscoverPrivileges = ['all', 'read']; + const basicPrivileges = await supertest + .get('/api/security/privileges') + .set('kbn-xsrf', 'xxx') + .send() + .expect(200); + + expect(basicPrivileges.body.features.discover).to.eql(expectedBasicLicenseDiscoverPrivileges); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index de0abe2350eb5..bcadd4fa06360 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -35,7 +35,7 @@ export default function ({ getService }: FtrProviderContext) { logs: ['all', 'read'], uptime: ['all', 'read'], apm: ['all', 'read'], - siem: ['all', 'read'], + securitySolution: ['all', 'read'], ingestManager: ['all', 'read'], }, global: ['all', 'read'], diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index 00bfcdc119e47..1270c03b8a977 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -33,7 +33,7 @@ export default function ({ getService }: FtrProviderContext) { logs: ['all', 'read'], uptime: ['all', 'read'], apm: ['all', 'read'], - siem: ['all', 'read'], + securitySolution: ['all', 'read'], ingestManager: ['all', 'read'], }, global: ['all', 'read'], diff --git a/x-pack/test/api_integration/apis/security/security_trial.ts b/x-pack/test/api_integration/apis/security/security_trial.ts new file mode 100644 index 0000000000000..c646fecc1909f --- /dev/null +++ b/x-pack/test/api_integration/apis/security/security_trial.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('security (trial license)', function () { + this.tags('ciGroup6'); + + // THIS TEST NEEDS TO BE LAST. IT IS DESTRUCTIVE! IT REMOVES TRIAL LICENSE!!! + loadTestFile(require.resolve('./license_downgrade')); + }); +} diff --git a/x-pack/test/api_integration/apis/siem/authentications.ts b/x-pack/test/api_integration/apis/security_solution/authentications.ts similarity index 90% rename from x-pack/test/api_integration/apis/siem/authentications.ts rename to x-pack/test/api_integration/apis/security_solution/authentications.ts index 886248150998b..90784ec786d48 100644 --- a/x-pack/test/api_integration/apis/siem/authentications.ts +++ b/x-pack/test/api_integration/apis/security_solution/authentications.ts @@ -6,8 +6,8 @@ import expect from '@kbn/expect'; -import { authenticationsQuery } from '../../../../plugins/siem/public/hosts/containers/authentications/index.gql_query'; -import { GetAuthenticationsQuery } from '../../../../plugins/siem/public/graphql/types'; +import { authenticationsQuery } from '../../../../plugins/security_solution/public/hosts/containers/authentications/index.gql_query'; +import { GetAuthenticationsQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); @@ -20,7 +20,7 @@ const EDGE_LENGTH = 1; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('authentications', () => { before(() => esArchiver.load('auditbeat/hosts')); diff --git a/x-pack/test/api_integration/apis/siem/feature_controls.ts b/x-pack/test/api_integration/apis/security_solution/feature_controls.ts similarity index 97% rename from x-pack/test/api_integration/apis/siem/feature_controls.ts rename to x-pack/test/api_integration/apis/security_solution/feature_controls.ts index 78d3c42e0d4b2..3df7641ebb09d 100644 --- a/x-pack/test/api_integration/apis/siem/feature_controls.ts +++ b/x-pack/test/api_integration/apis/security_solution/feature_controls.ts @@ -23,7 +23,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const security = getService('security'); const spaces = getService('spaces'); - const clientFactory = getService('siemGraphQLClientFactory'); + const clientFactory = getService('securitySolutionGraphQLClientFactory'); const expectGraphQL404 = (result: any) => { expect(result.response).to.be(undefined); @@ -75,7 +75,7 @@ export default function ({ getService }: FtrProviderContext) { const basePath = spaceId ? `/s/${spaceId}` : ''; return supertest - .get(`${basePath}/api/siem/graphql/graphiql`) + .get(`${basePath}/api/security_solution/graphql/graphiql`) .auth(username, password) .then((response: any) => ({ error: undefined, response })) .catch((error: any) => ({ error, response: undefined })); @@ -204,7 +204,7 @@ export default function ({ getService }: FtrProviderContext) { kibana: [ { feature: { - siem: ['read'], + securitySolution: ['read'], }, spaces: [space1Id], }, diff --git a/x-pack/test/api_integration/apis/siem/hosts.ts b/x-pack/test/api_integration/apis/security_solution/hosts.ts similarity index 91% rename from x-pack/test/api_integration/apis/siem/hosts.ts rename to x-pack/test/api_integration/apis/security_solution/hosts.ts index f548057df0c54..35fab4ceab7d1 100644 --- a/x-pack/test/api_integration/apis/siem/hosts.ts +++ b/x-pack/test/api_integration/apis/security_solution/hosts.ts @@ -12,10 +12,10 @@ import { GetHostFirstLastSeenQuery, GetHostsTableQuery, HostsFields, -} from '../../../../plugins/siem/public/graphql/types'; -import { HostOverviewQuery } from '../../../../plugins/siem/public/hosts/containers/hosts/overview/host_overview.gql_query'; -import { HostFirstLastSeenGqlQuery } from '../../../../plugins/siem/public/hosts/containers/hosts/first_last_seen/first_last_seen.gql_query'; -import { HostsTableQuery } from '../../../../plugins/siem/public/hosts/containers/hosts/hosts_table.gql_query'; +} from '../../../../plugins/security_solution/public/graphql/types'; +import { HostOverviewQuery } from '../../../../plugins/security_solution/public/hosts/containers/hosts/overview/host_overview.gql_query'; +import { HostFirstLastSeenGqlQuery } from '../../../../plugins/security_solution/public/hosts/containers/hosts/first_last_seen/first_last_seen.gql_query'; +import { HostsTableQuery } from '../../../../plugins/security_solution/public/hosts/containers/hosts/hosts_table.gql_query'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); @@ -29,7 +29,7 @@ const CURSOR_ID = '2ab45fc1c41e4c84bbd02202a7e5761f'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('hosts', () => { before(() => esArchiver.load('auditbeat/hosts')); diff --git a/x-pack/test/api_integration/apis/siem/index.js b/x-pack/test/api_integration/apis/security_solution/index.js similarity index 100% rename from x-pack/test/api_integration/apis/siem/index.js rename to x-pack/test/api_integration/apis/security_solution/index.js diff --git a/x-pack/test/api_integration/apis/siem/ip_overview.ts b/x-pack/test/api_integration/apis/security_solution/ip_overview.ts similarity index 89% rename from x-pack/test/api_integration/apis/siem/ip_overview.ts rename to x-pack/test/api_integration/apis/security_solution/ip_overview.ts index da37b09d7855e..1dc0f6390ce7e 100644 --- a/x-pack/test/api_integration/apis/siem/ip_overview.ts +++ b/x-pack/test/api_integration/apis/security_solution/ip_overview.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { ipOverviewQuery } from '../../../../plugins/siem/public/network/containers/ip_overview/index.gql_query'; -import { GetIpOverviewQuery } from '../../../../plugins/siem/public/graphql/types'; +import { ipOverviewQuery } from '../../../../plugins/security_solution/public/network/containers/ip_overview/index.gql_query'; +import { GetIpOverviewQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('IP Overview', () => { describe('With filebeat', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/kpi_host_details.ts b/x-pack/test/api_integration/apis/security_solution/kpi_host_details.ts similarity index 95% rename from x-pack/test/api_integration/apis/siem/kpi_host_details.ts rename to x-pack/test/api_integration/apis/security_solution/kpi_host_details.ts index bf03e4e337190..4b296078ff443 100644 --- a/x-pack/test/api_integration/apis/siem/kpi_host_details.ts +++ b/x-pack/test/api_integration/apis/security_solution/kpi_host_details.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { kpiHostDetailsQuery } from '../../../../plugins/siem/public/hosts/containers/kpi_host_details/index.gql_query'; -import { GetKpiHostDetailsQuery } from '../../../../plugins/siem/public/graphql/types'; +import { kpiHostDetailsQuery } from '../../../../plugins/security_solution/public/hosts/containers/kpi_host_details/index.gql_query'; +import { GetKpiHostDetailsQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Kpi Host Details', () => { describe('With filebeat', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/kpi_hosts.ts b/x-pack/test/api_integration/apis/security_solution/kpi_hosts.ts similarity index 96% rename from x-pack/test/api_integration/apis/siem/kpi_hosts.ts rename to x-pack/test/api_integration/apis/security_solution/kpi_hosts.ts index f570edfb985ed..30a0eac386c9d 100644 --- a/x-pack/test/api_integration/apis/siem/kpi_hosts.ts +++ b/x-pack/test/api_integration/apis/security_solution/kpi_hosts.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { kpiHostsQuery } from '../../../../plugins/siem/public/hosts/containers/kpi_hosts/index.gql_query'; -import { GetKpiHostsQuery } from '../../../../plugins/siem/public/graphql/types'; +import { kpiHostsQuery } from '../../../../plugins/security_solution/public/hosts/containers/kpi_hosts/index.gql_query'; +import { GetKpiHostsQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Kpi Hosts', () => { describe('With filebeat', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/kpi_network.ts b/x-pack/test/api_integration/apis/security_solution/kpi_network.ts similarity index 95% rename from x-pack/test/api_integration/apis/siem/kpi_network.ts rename to x-pack/test/api_integration/apis/security_solution/kpi_network.ts index d67f291ba4489..6d6eee7d3468d 100644 --- a/x-pack/test/api_integration/apis/siem/kpi_network.ts +++ b/x-pack/test/api_integration/apis/security_solution/kpi_network.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { kpiNetworkQuery } from '../../../../plugins/siem/public/network/containers/kpi_network/index.gql_query'; -import { GetKpiNetworkQuery } from '../../../../plugins/siem/public/graphql/types'; +import { kpiNetworkQuery } from '../../../../plugins/security_solution/public/network/containers/kpi_network/index.gql_query'; +import { GetKpiNetworkQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Kpi Network', () => { describe('With filebeat', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/network_dns.ts b/x-pack/test/api_integration/apis/security_solution/network_dns.ts similarity index 93% rename from x-pack/test/api_integration/apis/siem/network_dns.ts rename to x-pack/test/api_integration/apis/security_solution/network_dns.ts index 722e2f03a3bc6..9d88c7bc2389b 100644 --- a/x-pack/test/api_integration/apis/siem/network_dns.ts +++ b/x-pack/test/api_integration/apis/security_solution/network_dns.ts @@ -5,17 +5,17 @@ */ import expect from '@kbn/expect'; -import { networkDnsQuery } from '../../../../plugins/siem/public/network/containers/network_dns/index.gql_query'; +import { networkDnsQuery } from '../../../../plugins/security_solution/public/network/containers/network_dns/index.gql_query'; import { Direction, GetNetworkDnsQuery, NetworkDnsFields, -} from '../../../../plugins/siem/public/graphql/types'; +} from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Network DNS', () => { describe('With packetbeat', () => { before(() => esArchiver.load('packetbeat/dns')); diff --git a/x-pack/test/api_integration/apis/siem/network_top_n_flow.ts b/x-pack/test/api_integration/apis/security_solution/network_top_n_flow.ts similarity index 96% rename from x-pack/test/api_integration/apis/siem/network_top_n_flow.ts rename to x-pack/test/api_integration/apis/security_solution/network_top_n_flow.ts index 1a91027eb7977..bbe934d840deb 100644 --- a/x-pack/test/api_integration/apis/siem/network_top_n_flow.ts +++ b/x-pack/test/api_integration/apis/security_solution/network_top_n_flow.ts @@ -5,20 +5,20 @@ */ import expect from '@kbn/expect'; -import { networkTopNFlowQuery } from '../../../../plugins/siem/public/network/containers/network_top_n_flow/index.gql_query'; +import { networkTopNFlowQuery } from '../../../../plugins/security_solution/public/network/containers/network_top_n_flow/index.gql_query'; import { Direction, FlowTargetSourceDest, GetNetworkTopNFlowQuery, NetworkTopTablesFields, -} from '../../../../plugins/siem/public/graphql/types'; +} from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const EDGE_LENGTH = 10; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Network Top N Flow', () => { describe('With filebeat', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/overview_host.ts b/x-pack/test/api_integration/apis/security_solution/overview_host.ts similarity index 83% rename from x-pack/test/api_integration/apis/siem/overview_host.ts rename to x-pack/test/api_integration/apis/security_solution/overview_host.ts index ec020c8e8f1ca..1224fe3bd7ddd 100644 --- a/x-pack/test/api_integration/apis/siem/overview_host.ts +++ b/x-pack/test/api_integration/apis/security_solution/overview_host.ts @@ -6,14 +6,14 @@ import expect from '@kbn/expect'; -import { DEFAULT_INDEX_PATTERN } from '../../../../plugins/siem/common/constants'; -import { overviewHostQuery } from '../../../../plugins/siem/public/overview/containers//overview_host/index.gql_query'; -import { GetOverviewHostQuery } from '../../../../plugins/siem/public/graphql/types'; +import { DEFAULT_INDEX_PATTERN } from '../../../../plugins/security_solution/common/constants'; +import { overviewHostQuery } from '../../../../plugins/security_solution/public/overview/containers//overview_host/index.gql_query'; +import { GetOverviewHostQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Overview Host', () => { describe('With auditbeat', () => { before(() => esArchiver.load('auditbeat/overview')); diff --git a/x-pack/test/api_integration/apis/siem/overview_network.ts b/x-pack/test/api_integration/apis/security_solution/overview_network.ts similarity index 93% rename from x-pack/test/api_integration/apis/siem/overview_network.ts rename to x-pack/test/api_integration/apis/security_solution/overview_network.ts index d5c7e87ff66ee..b7f4184f2eeca 100644 --- a/x-pack/test/api_integration/apis/siem/overview_network.ts +++ b/x-pack/test/api_integration/apis/security_solution/overview_network.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { overviewNetworkQuery } from '../../../../plugins/siem/public/overview/containers/overview_network/index.gql_query'; -import { GetOverviewNetworkQuery } from '../../../../plugins/siem/public/graphql/types'; +import { overviewNetworkQuery } from '../../../../plugins/security_solution/public/overview/containers/overview_network/index.gql_query'; +import { GetOverviewNetworkQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Overview Network', () => { describe('With filebeat', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/saved_objects/notes.ts b/x-pack/test/api_integration/apis/security_solution/saved_objects/notes.ts similarity index 96% rename from x-pack/test/api_integration/apis/siem/saved_objects/notes.ts rename to x-pack/test/api_integration/apis/security_solution/saved_objects/notes.ts index 2766f9e5881a5..0f4d06435107e 100644 --- a/x-pack/test/api_integration/apis/siem/saved_objects/notes.ts +++ b/x-pack/test/api_integration/apis/security_solution/saved_objects/notes.ts @@ -8,11 +8,11 @@ import expect from '@kbn/expect'; import gql from 'graphql-tag'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { persistTimelineNoteMutation } from '../../../../../plugins/siem/public/timelines/containers/notes/persist.gql_query'; +import { persistTimelineNoteMutation } from '../../../../../plugins/security_solution/public/timelines/containers/notes/persist.gql_query'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Note - Saved Objects', () => { beforeEach(() => esArchiver.load('empty_kibana')); diff --git a/x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts b/x-pack/test/api_integration/apis/security_solution/saved_objects/pinned_events.ts similarity index 93% rename from x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts rename to x-pack/test/api_integration/apis/security_solution/saved_objects/pinned_events.ts index cf998b84bc9cc..9913a695fba01 100644 --- a/x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts +++ b/x-pack/test/api_integration/apis/security_solution/saved_objects/pinned_events.ts @@ -7,11 +7,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { persistTimelinePinnedEventMutation } from '../../../../../plugins/siem/public/timelines/containers/pinned_event/persist.gql_query'; +import { persistTimelinePinnedEventMutation } from '../../../../../plugins/security_solution/public/timelines/containers/pinned_event/persist.gql_query'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Pinned Events - Saved Objects', () => { beforeEach(() => esArchiver.load('empty_kibana')); diff --git a/x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts b/x-pack/test/api_integration/apis/security_solution/saved_objects/timeline.ts similarity index 96% rename from x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts rename to x-pack/test/api_integration/apis/security_solution/saved_objects/timeline.ts index 945ebad9aa39a..12e2378037c0a 100644 --- a/x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts +++ b/x-pack/test/api_integration/apis/security_solution/saved_objects/timeline.ts @@ -15,14 +15,14 @@ import ApolloClient from 'apollo-client'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { deleteTimelineMutation } from '../../../../../plugins/siem/public/timelines/containers/delete/persist.gql_query'; -import { persistTimelineFavoriteMutation } from '../../../../../plugins/siem/public/timelines/containers/favorite/persist.gql_query'; -import { persistTimelineMutation } from '../../../../../plugins/siem/public/timelines/containers/persist.gql_query'; -import { TimelineResult } from '../../../../../plugins/siem/public/graphql/types'; +import { deleteTimelineMutation } from '../../../../../plugins/security_solution/public/timelines/containers/delete/persist.gql_query'; +import { persistTimelineFavoriteMutation } from '../../../../../plugins/security_solution/public/timelines/containers/favorite/persist.gql_query'; +import { persistTimelineMutation } from '../../../../../plugins/security_solution/public/timelines/containers/persist.gql_query'; +import { TimelineResult } from '../../../../../plugins/security_solution/public/graphql/types'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Timeline - Saved Objects', () => { beforeEach(() => esArchiver.load('empty_kibana')); diff --git a/x-pack/test/api_integration/apis/siem/sources.ts b/x-pack/test/api_integration/apis/security_solution/sources.ts similarity index 82% rename from x-pack/test/api_integration/apis/siem/sources.ts rename to x-pack/test/api_integration/apis/security_solution/sources.ts index 520832255cab3..7b4df5e23ca26 100644 --- a/x-pack/test/api_integration/apis/siem/sources.ts +++ b/x-pack/test/api_integration/apis/security_solution/sources.ts @@ -5,14 +5,14 @@ */ import expect from '@kbn/expect'; -import { sourceQuery } from '../../../../plugins/siem/public/common/containers/source/index.gql_query'; -import { SourceQuery } from '../../../../plugins/siem/public/graphql/types'; +import { sourceQuery } from '../../../../plugins/security_solution/public/common/containers/source/index.gql_query'; +import { SourceQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('sources', () => { before(() => esArchiver.load('auditbeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/timeline.ts b/x-pack/test/api_integration/apis/security_solution/timeline.ts similarity index 92% rename from x-pack/test/api_integration/apis/siem/timeline.ts rename to x-pack/test/api_integration/apis/security_solution/timeline.ts index 8f8eab0b28e32..9d4084a0e41b0 100644 --- a/x-pack/test/api_integration/apis/siem/timeline.ts +++ b/x-pack/test/api_integration/apis/security_solution/timeline.ts @@ -6,8 +6,11 @@ import expect from '@kbn/expect'; -import { timelineQuery } from '../../../../plugins/siem/public/timelines/containers/index.gql_query'; -import { Direction, GetTimelineQuery } from '../../../../plugins/siem/public/graphql/types'; +import { timelineQuery } from '../../../../plugins/security_solution/public/timelines/containers/index.gql_query'; +import { + Direction, + GetTimelineQuery, +} from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const LTE = new Date('3000-01-01T00:00:00.000Z').valueOf(); @@ -53,7 +56,7 @@ const FILTER_VALUE = { export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Timeline', () => { before(() => esArchiver.load('auditbeat/hosts')); diff --git a/x-pack/test/api_integration/apis/siem/timeline_details.ts b/x-pack/test/api_integration/apis/security_solution/timeline_details.ts similarity index 96% rename from x-pack/test/api_integration/apis/siem/timeline_details.ts rename to x-pack/test/api_integration/apis/security_solution/timeline_details.ts index 03a8591746975..3524d7bf2db07 100644 --- a/x-pack/test/api_integration/apis/siem/timeline_details.ts +++ b/x-pack/test/api_integration/apis/security_solution/timeline_details.ts @@ -7,8 +7,11 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; -import { timelineDetailsQuery } from '../../../../plugins/siem/public/timelines/containers/details/index.gql_query'; -import { DetailItem, GetTimelineDetailsQuery } from '../../../../plugins/siem/public/graphql/types'; +import { timelineDetailsQuery } from '../../../../plugins/security_solution/public/timelines/containers/details/index.gql_query'; +import { + DetailItem, + GetTimelineDetailsQuery, +} from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; type DetailsData = Array< @@ -296,7 +299,7 @@ const EXPECTED_DATA: DetailItem[] = [ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Timeline Details', () => { before(() => esArchiver.load('filebeat/default')); diff --git a/x-pack/test/api_integration/apis/siem/tls.ts b/x-pack/test/api_integration/apis/security_solution/tls.ts similarity index 96% rename from x-pack/test/api_integration/apis/siem/tls.ts rename to x-pack/test/api_integration/apis/security_solution/tls.ts index adcfe4894c473..cbddcf6b0f935 100644 --- a/x-pack/test/api_integration/apis/siem/tls.ts +++ b/x-pack/test/api_integration/apis/security_solution/tls.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { tlsQuery } from '../../../../plugins/siem/public/network/containers/tls/index.gql_query'; +import { tlsQuery } from '../../../../plugins/security_solution/public/network/containers/tls/index.gql_query'; import { Direction, TlsFields, FlowTarget, GetTlsQuery, -} from '../../../../plugins/siem/public/graphql/types'; +} from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); @@ -90,7 +90,7 @@ const expectedOverviewSourceResult = { export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Tls Test with Packetbeat', () => { describe('Tls Test', () => { before(() => esArchiver.load('packetbeat/tls')); diff --git a/x-pack/test/api_integration/apis/siem/uncommon_processes.ts b/x-pack/test/api_integration/apis/security_solution/uncommon_processes.ts similarity index 95% rename from x-pack/test/api_integration/apis/siem/uncommon_processes.ts rename to x-pack/test/api_integration/apis/security_solution/uncommon_processes.ts index ea4833fa4f053..a08ba8d8a7cd1 100644 --- a/x-pack/test/api_integration/apis/siem/uncommon_processes.ts +++ b/x-pack/test/api_integration/apis/security_solution/uncommon_processes.ts @@ -6,8 +6,8 @@ import expect from '@kbn/expect'; -import { uncommonProcessesQuery } from '../../../../plugins/siem/public/hosts/containers/uncommon_processes/index.gql_query'; -import { GetUncommonProcessesQuery } from '../../../../plugins/siem/public/graphql/types'; +import { uncommonProcessesQuery } from '../../../../plugins/security_solution/public/hosts/containers/uncommon_processes/index.gql_query'; +import { GetUncommonProcessesQuery } from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); @@ -18,7 +18,7 @@ const TOTAL_COUNT = 3; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('uncommon_processes', () => { before(() => esArchiver.load('auditbeat/hosts')); diff --git a/x-pack/test/api_integration/apis/siem/users.ts b/x-pack/test/api_integration/apis/security_solution/users.ts similarity index 89% rename from x-pack/test/api_integration/apis/siem/users.ts rename to x-pack/test/api_integration/apis/security_solution/users.ts index 4ecbe80070992..eb7fba88a6a46 100644 --- a/x-pack/test/api_integration/apis/siem/users.ts +++ b/x-pack/test/api_integration/apis/security_solution/users.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { usersQuery } from '../../../../plugins/siem/public/network/containers/users/index.gql_query'; +import { usersQuery } from '../../../../plugins/security_solution/public/network/containers/users/index.gql_query'; import { Direction, UsersFields, FlowTarget, GetUsersQuery, -} from '../../../../plugins/siem/public/graphql/types'; +} from '../../../../plugins/security_solution/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); @@ -20,7 +20,7 @@ const IP = '0.0.0.0'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); - const client = getService('siemGraphQLClient'); + const client = getService('securitySolutionGraphQLClient'); describe('Users', () => { describe('With auditbeat', () => { before(() => esArchiver.load('auditbeat/default')); diff --git a/x-pack/test/api_integration/config.js b/x-pack/test/api_integration/config.ts similarity index 88% rename from x-pack/test/api_integration/config.js rename to x-pack/test/api_integration/config.ts index 41ae65062b113..71da903d33b29 100644 --- a/x-pack/test/api_integration/config.js +++ b/x-pack/test/api_integration/config.ts @@ -4,9 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ +import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; -export async function getApiIntegrationConfig({ readConfigFile }) { +export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProviderContext) { const xPackFunctionalTestsConfig = await readConfigFile( require.resolve('../functional/config.js') ); @@ -28,7 +29,7 @@ export async function getApiIntegrationConfig({ readConfigFile }) { '--optimize.enabled=false', '--telemetry.optIn=true', '--xpack.ingestManager.enabled=true', - '--xpack.siem.alertResultListDefaultDateRange.from=2018-01-10T00:00:00.000Z', + '--xpack.securitySolution.alertResultListDefaultDateRange.from=2018-01-10T00:00:00.000Z', ], }, esTestCluster: { diff --git a/x-pack/test/api_integration/config_security_basic.js b/x-pack/test/api_integration/config_security_basic.ts similarity index 67% rename from x-pack/test/api_integration/config_security_basic.js rename to x-pack/test/api_integration/config_security_basic.ts index 713045e8c4d3c..8489940505686 100644 --- a/x-pack/test/api_integration/config_security_basic.js +++ b/x-pack/test/api_integration/config_security_basic.ts @@ -4,11 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ +/* eslint-disable import/no-default-export */ + +import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { default as createTestConfig } from './config'; -export default async function ({ readConfigFile }) { - //security APIs should function the same under a basic or trial license - return createTestConfig({ readConfigFile }).then((config) => { +export default async function (context: FtrConfigProviderContext) { + // security APIs should function the same under a basic or trial license + return createTestConfig(context).then((config) => { config.esTestCluster.license = 'basic'; config.esTestCluster.serverArgs = [ 'xpack.license.self_generated.type=basic', diff --git a/x-pack/test/api_integration/config_security_trial.ts b/x-pack/test/api_integration/config_security_trial.ts new file mode 100644 index 0000000000000..4c1e2913b987c --- /dev/null +++ b/x-pack/test/api_integration/config_security_trial.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +/* eslint-disable import/no-default-export */ + +import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; +import { default as createTestConfig } from './config'; + +export default async function (context: FtrConfigProviderContext) { + return createTestConfig(context).then((config) => { + config.testFiles = [require.resolve('./apis/security/security_trial')]; + return config; + }); +} diff --git a/x-pack/test/api_integration/services/index.ts b/x-pack/test/api_integration/services/index.ts index 687984340d7d6..e7e166237c602 100644 --- a/x-pack/test/api_integration/services/index.ts +++ b/x-pack/test/api_integration/services/index.ts @@ -19,7 +19,10 @@ import { InfraOpsGraphQLClientProvider, InfraOpsGraphQLClientFactoryProvider, } from './infraops_graphql_client'; -import { SiemGraphQLClientProvider, SiemGraphQLClientFactoryProvider } from './siem_graphql_client'; +import { + SecuritySolutionGraphQLClientProvider, + SecuritySolutionGraphQLClientFactoryProvider, +} from './security_solution_graphql_client'; import { InfraOpsSourceConfigurationProvider } from './infraops_source_configuration'; import { InfraLogSourceConfigurationProvider } from './infra_log_source_configuration'; import { MachineLearningProvider } from './ml'; @@ -38,8 +41,8 @@ export const services = { infraOpsGraphQLClientFactory: InfraOpsGraphQLClientFactoryProvider, infraOpsSourceConfiguration: InfraOpsSourceConfigurationProvider, infraLogSourceConfiguration: InfraLogSourceConfigurationProvider, - siemGraphQLClient: SiemGraphQLClientProvider, - siemGraphQLClientFactory: SiemGraphQLClientFactoryProvider, + securitySolutionGraphQLClient: SecuritySolutionGraphQLClientProvider, + securitySolutionGraphQLClientFactory: SecuritySolutionGraphQLClientFactoryProvider, supertestWithoutAuth: SupertestWithoutAuthProvider, usageAPI: UsageAPIProvider, ml: MachineLearningProvider, diff --git a/x-pack/test/api_integration/services/resolver.ts b/x-pack/test/api_integration/services/resolver.ts index b1e58a0a1a3d1..ec0067f6a24af 100644 --- a/x-pack/test/api_integration/services/resolver.ts +++ b/x-pack/test/api_integration/services/resolver.ts @@ -7,7 +7,7 @@ import { TreeOptions, Tree, EndpointDocGenerator, -} from '../../../plugins/siem/common/endpoint/generate_data'; +} from '../../../plugins/security_solution/common/endpoint/generate_data'; import { FtrProviderContext } from '../ftr_provider_context'; /** diff --git a/x-pack/test/api_integration/services/siem_graphql_client.ts b/x-pack/test/api_integration/services/security_solution_graphql_client.ts similarity index 71% rename from x-pack/test/api_integration/services/siem_graphql_client.ts rename to x-pack/test/api_integration/services/security_solution_graphql_client.ts index 4369e42fb3646..0bcf94fdb7d3f 100644 --- a/x-pack/test/api_integration/services/siem_graphql_client.ts +++ b/x-pack/test/api_integration/services/security_solution_graphql_client.ts @@ -11,24 +11,24 @@ import { ApolloClient } from 'apollo-client'; import { HttpLink } from 'apollo-link-http'; import { FtrProviderContext } from '../ftr_provider_context'; -import introspectionQueryResultData from '../../../plugins/siem/public/graphql/introspection.json'; +import introspectionQueryResultData from '../../../plugins/security_solution/public/graphql/introspection.json'; -interface SiemGraphQLClientFactoryOptions { +interface SecuritySolutionGraphQLClientFactoryOptions { username?: string; password?: string; basePath?: string; } -export function SiemGraphQLClientProvider(context: FtrProviderContext) { - return SiemGraphQLClientFactoryProvider(context)(); +export function SecuritySolutionGraphQLClientProvider(context: FtrProviderContext) { + return SecuritySolutionGraphQLClientFactoryProvider(context)(); } -export function SiemGraphQLClientFactoryProvider({ getService }: FtrProviderContext) { +export function SecuritySolutionGraphQLClientFactoryProvider({ getService }: FtrProviderContext) { const config = getService('config'); const superAuth: string = config.get('servers.elasticsearch.auth'); const [superUsername, superPassword] = superAuth.split(':'); - return function (options?: SiemGraphQLClientFactoryOptions) { + return function (options?: SecuritySolutionGraphQLClientFactoryOptions) { const { username = superUsername, password = superPassword, basePath = null } = options || {}; const kbnURLWithoutAuth = formatUrl({ ...config.get('servers.kibana'), auth: false }); @@ -40,7 +40,7 @@ export function SiemGraphQLClientFactoryProvider({ getService }: FtrProviderCont 'kbn-xsrf': 'xxx', authorization: `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`, }, - uri: `${kbnURLWithoutAuth}${basePath || ''}/api/siem/graphql`, + uri: `${kbnURLWithoutAuth}${basePath || ''}/api/solutions/security/graphql`, }); return new ApolloClient({ diff --git a/x-pack/test/apm_api_integration/common/config.ts b/x-pack/test/apm_api_integration/common/config.ts index 9e011a98bbfcd..83dc597829a3c 100644 --- a/x-pack/test/apm_api_integration/common/config.ts +++ b/x-pack/test/apm_api_integration/common/config.ts @@ -17,7 +17,7 @@ export function createTestConfig(settings: Settings) { return async ({ readConfigFile }: FtrConfigProviderContext) => { const xPackAPITestsConfig = await readConfigFile( - require.resolve('../../api_integration/config.js') + require.resolve('../../api_integration/config.ts') ); return { diff --git a/x-pack/test/case_api_integration/common/config.ts b/x-pack/test/case_api_integration/common/config.ts index 45b34b7d26940..098d94f35d9ca 100644 --- a/x-pack/test/case_api_integration/common/config.ts +++ b/x-pack/test/case_api_integration/common/config.ts @@ -39,7 +39,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) return async ({ readConfigFile }: FtrConfigProviderContext) => { const xPackApiIntegrationTestsConfig = await readConfigFile( - require.resolve('../../api_integration/config.js') + require.resolve('../../api_integration/config.ts') ); const servers = { diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/add_prepackaged_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/add_prepackaged_rules.ts index af5abef22fd0a..04564fc00ec2f 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/add_prepackaged_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/add_prepackaged_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, deleteAllAlerts, deleteSignalsIndex } from '../../utils'; diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/create_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/create_rules.ts index 7aaa9f469b905..237feb84932d2 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/create_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/create_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/create_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/basic/tests/create_rules_bulk.ts index 4aee1c845aad2..6c3b1c45e202e 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/create_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/create_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules.ts index 6b4f5956cb6bf..e91b735e1629b 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules_bulk.ts index 770df50ebc2e1..687551c2d8313 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/delete_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/export_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/export_rules.ts index 1a22873d752c2..4a819c8029b9d 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/export_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/export_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { binaryToString, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/find_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/find_rules.ts index b661e5c56285f..9c3fe6c80679c 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/find_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/find_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/find_statuses.ts b/x-pack/test/detection_engine_api_integration/basic/tests/find_statuses.ts index ef662dd7a6244..6ff5a8c552ab7 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/find_statuses.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/find_statuses.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/get_prepackaged_rules_status.ts b/x-pack/test/detection_engine_api_integration/basic/tests/get_prepackaged_rules_status.ts index 2727781d3f103..8af67f818ea91 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/get_prepackaged_rules_status.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/get_prepackaged_rules_status.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { DETECTION_ENGINE_PREPACKAGED_URL, DETECTION_ENGINE_RULES_URL, -} from '../../../../plugins/siem/common/constants'; +} from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/import_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/import_rules.ts index bfe55da4acd74..e3c4233383be4 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/import_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/import_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/open_close_signals.ts b/x-pack/test/detection_engine_api_integration/basic/tests/open_close_signals.ts index 2837f2ed52eeb..fe7783fa2d045 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/open_close_signals.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/open_close_signals.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules.ts index 5501802c11e7b..099ea950d128c 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules_bulk.ts index 87b1d543864bc..0bf80204e2445 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/patch_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/query_signals.ts b/x-pack/test/detection_engine_api_integration/basic/tests/query_signals.ts index f4e3c2fa2ae1a..80e848a0addd2 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/query_signals.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/query_signals.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { getSignalStatus, createSignalsIndex, deleteSignalsIndex } from '../../utils'; diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/read_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/read_rules.ts index c4e42c56376a3..bd83ef00ccf1a 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/read_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/read_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/update_rules.ts b/x-pack/test/detection_engine_api_integration/basic/tests/update_rules.ts index 2f890674a6841..83fb991ecef1b 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/update_rules.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/update_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/basic/tests/update_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/basic/tests/update_rules_bulk.ts index 27117cfff18ea..655f2b5d2e33f 100644 --- a/x-pack/test/detection_engine_api_integration/basic/tests/update_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/basic/tests/update_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/common/config.ts b/x-pack/test/detection_engine_api_integration/common/config.ts index 0e3f3d94ed675..6a1add60b19f1 100644 --- a/x-pack/test/detection_engine_api_integration/common/config.ts +++ b/x-pack/test/detection_engine_api_integration/common/config.ts @@ -8,7 +8,7 @@ import path from 'path'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; -import { listsEnvFeatureFlagName } from '../../../plugins/siem/server/lib/detection_engine/feature_flags'; +import { listsEnvFeatureFlagName } from '../../../plugins/security_solution/server/lib/detection_engine/feature_flags'; interface CreateTestConfigOptions { license: string; @@ -42,7 +42,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) return async ({ readConfigFile }: FtrConfigProviderContext) => { const xPackApiIntegrationTestsConfig = await readConfigFile( - require.resolve('../../api_integration/config.js') + require.resolve('../../api_integration/config.ts') ); const servers = { ...xPackApiIntegrationTestsConfig.get('servers'), diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts index af5abef22fd0a..04564fc00ec2f 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, deleteAllAlerts, deleteSignalsIndex } from '../../utils'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts index 71567ebc01a26..449168d73f4ef 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts index 4aee1c845aad2..6c3b1c45e202e 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts index 6b4f5956cb6bf..e91b735e1629b 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts index 770df50ebc2e1..687551c2d8313 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts index 1a22873d752c2..4a819c8029b9d 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { binaryToString, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts index b661e5c56285f..9c3fe6c80679c 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts index ef662dd7a6244..6ff5a8c552ab7 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts index 2727781d3f103..8af67f818ea91 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { DETECTION_ENGINE_PREPACKAGED_URL, DETECTION_ENGINE_RULES_URL, -} from '../../../../plugins/siem/common/constants'; +} from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts index bfe55da4acd74..e3c4233383be4 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts index 2837f2ed52eeb..fe7783fa2d045 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts index 033c009b59d1e..a199382f29213 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts index 87b1d543864bc..0bf80204e2445 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts index f4e3c2fa2ae1a..80e848a0addd2 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { getSignalStatus, createSignalsIndex, deleteSignalsIndex } from '../../utils'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts index c4e42c56376a3..bd83ef00ccf1a 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts index 3e1a2382d7e62..003c8645f1b22 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts index 27117cfff18ea..655f2b5d2e33f 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/security_solution/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/utils.ts b/x-pack/test/detection_engine_api_integration/utils.ts index e70b84a2d98f1..b4330ce5d3912 100644 --- a/x-pack/test/detection_engine_api_integration/utils.ts +++ b/x-pack/test/detection_engine_api_integration/utils.ts @@ -7,8 +7,8 @@ import { Client } from '@elastic/elasticsearch'; import { SuperTest } from 'supertest'; import supertestAsPromised from 'supertest-as-promised'; -import { OutputRuleAlertRest } from '../../plugins/siem/server/lib/detection_engine/types'; -import { DETECTION_ENGINE_INDEX_URL } from '../../plugins/siem/common/constants'; +import { OutputRuleAlertRest } from '../../plugins/security_solution/server/lib/detection_engine/types'; +import { DETECTION_ENGINE_INDEX_URL } from '../../plugins/security_solution/common/constants'; /** * This will remove server generated properties such as date times, etc... diff --git a/x-pack/test/encrypted_saved_objects_api_integration/config.ts b/x-pack/test/encrypted_saved_objects_api_integration/config.ts index f4b3091bec234..fb643c2c5a901 100644 --- a/x-pack/test/encrypted_saved_objects_api_integration/config.ts +++ b/x-pack/test/encrypted_saved_objects_api_integration/config.ts @@ -9,7 +9,7 @@ import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); return { testFiles: [require.resolve('./tests')], diff --git a/x-pack/test/endpoint_api_integration_no_ingest/config.ts b/x-pack/test/endpoint_api_integration_no_ingest/config.ts index 00a65b9fbaec6..0cda1cfaf1433 100644 --- a/x-pack/test/endpoint_api_integration_no_ingest/config.ts +++ b/x-pack/test/endpoint_api_integration_no_ingest/config.ts @@ -7,7 +7,7 @@ import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); return { ...xPackAPITestsConfig.getAll(), diff --git a/x-pack/test/epm_api_integration/config.ts b/x-pack/test/epm_api_integration/config.ts index b77d763313588..6b08c7ec57955 100644 --- a/x-pack/test/epm_api_integration/config.ts +++ b/x-pack/test/epm_api_integration/config.ts @@ -7,7 +7,7 @@ import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); return { testFiles: [require.resolve('./apis')], diff --git a/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts b/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts index cbf1f3e1af2df..d1acbf436bbe7 100644 --- a/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts +++ b/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts @@ -69,7 +69,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows management navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Stack Management']); + expect(navLinks).to.contain('Stack Management'); }); it(`allows settings to be changed`, async () => { @@ -125,7 +125,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows Management navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Stack Management']); + expect(navLinks).to.contain('Stack Management'); }); it(`does not allow settings to be changed`, async () => { @@ -140,7 +140,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { // FLAKY: https://github.com/elastic/kibana/issues/57377 describe.skip('no advanced_settings privileges', function () { - this.tags(['skipCoverage']); before(async () => { await security.role.create('no_advanced_settings_privileges_role', { elasticsearch: { @@ -178,7 +177,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows Management navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Discover', 'Stack Management']); + expect(navLinks).to.contain('Stack Management'); }); it(`does not allow navigation to advanced settings; redirects to management home`, async () => { diff --git a/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_spaces.ts b/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_spaces.ts index f7991e62fdaa9..c8adb3ce67d55 100644 --- a/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_spaces.ts +++ b/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_spaces.ts @@ -60,7 +60,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); describe('space with Advanced Settings disabled', function () { - this.tags('skipCoverage'); before(async () => { // we need to load the following in every situation as deleting // a space deletes all of the associated saved objects diff --git a/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts b/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts index aa12543004656..4c3c1556d621c 100644 --- a/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts +++ b/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts @@ -60,7 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows apm navlink', async () => { const navLinks = await appsMenu.readLinks(); - expect(navLinks.map((link) => link.text)).to.eql(['APM', 'Stack Management']); + expect(navLinks.map((link) => link.text)).to.contain('APM'); }); it('can navigate to APM app', async () => { @@ -109,7 +109,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows apm navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['APM', 'Stack Management']); + expect(navLinks).to.contain('APM'); }); it('can navigate to APM app', async () => { diff --git a/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts b/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts index e9fa4ccf8e48b..b776d358b1673 100644 --- a/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts +++ b/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts @@ -66,7 +66,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows canvas navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Canvas', 'Stack Management']); + expect(navLinks).to.contain('Canvas'); }); it(`landing page shows "Create new workpad" button`, async () => { @@ -142,7 +142,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows canvas navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Canvas', 'Stack Management']); + expect(navLinks).to.contain('Canvas'); }); it(`landing page shows disabled "Create new workpad" button`, async () => { diff --git a/x-pack/test/functional/apps/dashboard/_async_dashboard.ts b/x-pack/test/functional/apps/dashboard/_async_dashboard.ts index 626ca6add6a3c..b4dfffcdeff57 100644 --- a/x-pack/test/functional/apps/dashboard/_async_dashboard.ts +++ b/x-pack/test/functional/apps/dashboard/_async_dashboard.ts @@ -6,6 +6,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/common'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); @@ -95,7 +96,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } ]`; - await kibanaServer.uiSettings.update({ 'timepicker:quickRanges': SAMPLE_DATA_RANGE }); + await kibanaServer.uiSettings.update({ + [UI_SETTINGS.TIMEPICKER_QUICK_RANGES]: SAMPLE_DATA_RANGE, + }); // refresh page to make sure ui settings update is picked up await browser.refresh(); await PageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts b/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts index 803ff6399a035..5d5f6b8aaa324 100644 --- a/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts +++ b/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts @@ -63,7 +63,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows Dev Tools navlink', async () => { const navLinks = await appsMenu.readLinks(); - expect(navLinks.map((link) => link.text)).to.eql(['Dev Tools', 'Stack Management']); + expect(navLinks.map((link) => link.text)).to.contain('Dev Tools'); }); describe('console', () => { @@ -144,7 +144,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it(`shows 'Dev Tools' navlink`, async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Dev Tools', 'Stack Management']); + expect(navLinks).to.contain('Dev Tools'); }); describe('console', () => { diff --git a/x-pack/test/functional/apps/dev_tools/feature_controls/index.ts b/x-pack/test/functional/apps/dev_tools/feature_controls/index.ts index 214a462447ef1..1df48971ba8cc 100644 --- a/x-pack/test/functional/apps/dev_tools/feature_controls/index.ts +++ b/x-pack/test/functional/apps/dev_tools/feature_controls/index.ts @@ -7,7 +7,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('feature controls', function () { - this.tags(['skipFirefox', 'skipCoverage']); + this.tags(['skipFirefox']); loadTestFile(require.resolve('./dev_tools_security')); loadTestFile(require.resolve('./dev_tools_spaces')); }); diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts index 03a5cc6ac8fa0..6a11daa8d2c26 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts @@ -82,7 +82,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows discover navlink', async () => { const navLinks = await appsMenu.readLinks(); - expect(navLinks.map((link) => link.text)).to.eql(['Discover', 'Stack Management']); + expect(navLinks.map((link) => link.text)).to.contain('Discover'); }); it('shows save button', async () => { @@ -169,7 +169,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows discover navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Discover', 'Stack Management']); + expect(navLinks).to.contain('Discover'); }); it(`doesn't show save button`, async () => { @@ -260,7 +260,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows discover navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Discover', 'Stack Management']); + expect(navLinks).to.contain('Discover'); }); it(`doesn't show save button`, async () => { diff --git a/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts b/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts index 9121028c14404..f13d73bc95dbe 100644 --- a/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts +++ b/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts @@ -64,7 +64,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows graph navlink', async () => { const navLinks = await appsMenu.readLinks(); - expect(navLinks.map((link) => link.text)).to.eql(['Graph', 'Stack Management']); + expect(navLinks.map((link) => link.text)).to.contain('Graph'); }); it('landing page shows "Create new graph" button', async () => { @@ -127,7 +127,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows graph navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Graph', 'Stack Management']); + expect(navLinks).to.contain('Graph'); }); it('does not show a "Create new Workspace" button', async () => { diff --git a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts index cd892c4424290..a6d2c13cd2b31 100644 --- a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts +++ b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts @@ -71,7 +71,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows management navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Stack Management']); + expect(navLinks).to.contain('Stack Management'); }); it(`index pattern listing shows create button`, async () => { @@ -125,7 +125,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows management navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Stack Management']); + expect(navLinks).to.contain('Stack Management'); }); it(`index pattern listing doesn't show create button`, async () => { @@ -177,7 +177,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows Management navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Discover', 'Stack Management']); + expect(navLinks).to.contain('Stack Management'); }); it(`doesn't show Index Patterns in management side-nav`, async () => { diff --git a/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts b/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts index 6e186fc9ab9b2..a15b2b33b229c 100644 --- a/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts +++ b/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts @@ -61,7 +61,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows metrics navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Metrics', 'Stack Management']); + expect(navLinks).to.contain('Metrics'); }); describe('infrastructure landing page without data', () => { @@ -177,7 +177,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows metrics navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Metrics', 'Stack Management']); + expect(navLinks).to.contain('Metrics'); }); describe('infrastructure landing page without data', () => { diff --git a/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts b/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts index fafc88287a6ab..ce83a22fb2e1f 100644 --- a/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts +++ b/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts @@ -58,7 +58,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows logs navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Logs', 'Stack Management']); + expect(navLinks).to.contain('Logs'); }); describe('logs landing page without data', () => { @@ -121,7 +121,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows logs navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Logs', 'Stack Management']); + expect(navLinks).to.contain('Logs'); }); describe('logs landing page without data', () => { diff --git a/x-pack/test/functional/apps/maps/embeddable/dashboard.js b/x-pack/test/functional/apps/maps/embeddable/dashboard.js index 25770ea55a5d5..3c935b385cb39 100644 --- a/x-pack/test/functional/apps/maps/embeddable/dashboard.js +++ b/x-pack/test/functional/apps/maps/embeddable/dashboard.js @@ -5,6 +5,7 @@ */ import expect from '@kbn/expect'; +import { UI_SETTINGS } from '../../../../../../src/plugins/data/common'; export default function ({ getPageObjects, getService }) { const PageObjects = getPageObjects(['common', 'dashboard', 'maps']); @@ -19,7 +20,7 @@ export default function ({ getPageObjects, getService }) { before(async () => { await kibanaServer.uiSettings.replace({ defaultIndex: 'c698b940-e149-11e8-a35a-370a8516603a', - 'courier:ignoreFilterIfFieldNotInIndex': true, + [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: true, }); await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.loadSavedDashboard('map embeddable example'); @@ -27,7 +28,7 @@ export default function ({ getPageObjects, getService }) { after(async () => { await kibanaServer.uiSettings.replace({ - 'courier:ignoreFilterIfFieldNotInIndex': false, + [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: false, }); }); diff --git a/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts b/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts index 2449430ac85c2..f1c5b3f82f7da 100644 --- a/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts +++ b/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts @@ -66,7 +66,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows maps navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Maps', 'Stack Management']); + expect(navLinks).to.contain('Maps'); }); it(`allows a map to be created`, async () => { @@ -153,7 +153,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows Maps navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Maps', 'Stack Management']); + expect(navLinks).to.contain('Maps'); }); it(`does not show create new button`, async () => { diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts index 4f56015227fdf..c8baa13b56408 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts @@ -11,7 +11,8 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - describe('classification creation', function () { + // flaky test, see https://github.com/elastic/kibana/issues/68356 + describe.skip('classification creation', function () { before(async () => { await esArchiver.loadIfNeeded('ml/bm_classification'); await ml.testResources.createIndexPatternIfNeeded('ft_bank_marketing', '@timestamp'); @@ -60,35 +61,19 @@ export default function ({ getService }: FtrProviderContext) { await ml.navigation.navigateToDataFrameAnalytics(); }); - it('loads the job creation flyout', async () => { + it('loads the source selection modal', async () => { await ml.dataFrameAnalytics.startAnalyticsCreation(); }); + it('selects the source data and loads the job wizard page', async () => { + ml.jobSourceSelection.selectSourceForAnalyticsJob(testData.source); + }); + it('selects the job type', async () => { await ml.dataFrameAnalyticsCreation.assertJobTypeSelectExists(); await ml.dataFrameAnalyticsCreation.selectJobType(testData.jobType); }); - it('inputs the job id', async () => { - await ml.dataFrameAnalyticsCreation.assertJobIdInputExists(); - await ml.dataFrameAnalyticsCreation.setJobId(testData.jobId); - }); - - it('inputs the job description', async () => { - await ml.dataFrameAnalyticsCreation.assertJobDescriptionInputExists(); - await ml.dataFrameAnalyticsCreation.setJobDescription(testData.jobDescription); - }); - - it('selects the source index', async () => { - await ml.dataFrameAnalyticsCreation.assertSourceIndexInputExists(); - await ml.dataFrameAnalyticsCreation.selectSourceIndex(testData.source); - }); - - it('inputs the destination index', async () => { - await ml.dataFrameAnalyticsCreation.assertDestIndexInputExists(); - await ml.dataFrameAnalyticsCreation.setDestIndex(testData.destinationIndex); - }); - it('inputs the dependent variable', async () => { await ml.dataFrameAnalyticsCreation.assertDependentVariableInputExists(); await ml.dataFrameAnalyticsCreation.selectDependentVariable(testData.dependentVariable); @@ -99,11 +84,34 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.setTrainingPercent(testData.trainingPercent); }); + it('continues to the additional options step', async () => { + await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep(); + }); + it('inputs the model memory limit', async () => { await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists(); await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory); }); + it('continues to the details step', async () => { + await ml.dataFrameAnalyticsCreation.continueToDetailsStep(); + }); + + it('inputs the job id', async () => { + await ml.dataFrameAnalyticsCreation.assertJobIdInputExists(); + await ml.dataFrameAnalyticsCreation.setJobId(testData.jobId); + }); + + it('inputs the job description', async () => { + await ml.dataFrameAnalyticsCreation.assertJobDescriptionInputExists(); + await ml.dataFrameAnalyticsCreation.setJobDescription(testData.jobDescription); + }); + + it('inputs the destination index', async () => { + await ml.dataFrameAnalyticsCreation.assertDestIndexInputExists(); + await ml.dataFrameAnalyticsCreation.setDestIndex(testData.destinationIndex); + }); + it('sets the create index pattern switch', async () => { await ml.dataFrameAnalyticsCreation.assertCreateIndexPatternSwitchExists(); await ml.dataFrameAnalyticsCreation.setCreateIndexPatternSwitchState( @@ -111,19 +119,14 @@ export default function ({ getService }: FtrProviderContext) { ); }); - it('creates the analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertCreateButtonExists(); - await ml.dataFrameAnalyticsCreation.createAnalyticsJob(testData.jobId); - }); - - it('starts the analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertStartButtonExists(); - await ml.dataFrameAnalyticsCreation.startAnalyticsJob(); + it('continues to the create step', async () => { + await ml.dataFrameAnalyticsCreation.continueToCreateStep(); }); - it('closes the create job flyout', async () => { - await ml.dataFrameAnalyticsCreation.assertCloseButtonExists(); - await ml.dataFrameAnalyticsCreation.closeCreateAnalyticsJobFlyout(); + it('creates and starts the analytics job', async () => { + await ml.dataFrameAnalyticsCreation.assertCreateButtonExists(); + await ml.dataFrameAnalyticsCreation.assertStartJobCheckboxCheckState(true); + await ml.dataFrameAnalyticsCreation.createAnalyticsJob(testData.jobId); }); it('finishes analytics processing', async () => { @@ -131,6 +134,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('displays the analytics table', async () => { + await ml.dataFrameAnalyticsCreation.navigateToJobManagementPage(); await ml.dataFrameAnalytics.assertAnalyticsTableExists(); }); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts index 7636b87033bf8..b3e47db826787 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/cloning.ts @@ -182,16 +182,6 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.createAnalyticsJob(cloneJobId); }); - it('should start the clone analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertStartButtonExists(); - await ml.dataFrameAnalyticsCreation.startAnalyticsJob(); - }); - - it('should close the create job flyout', async () => { - await ml.dataFrameAnalyticsCreation.assertCloseButtonExists(); - await ml.dataFrameAnalyticsCreation.closeCreateAnalyticsJobFlyout(); - }); - it('finishes analytics processing', async () => { await ml.dataFrameAnalytics.waitForAnalyticsCompletion(cloneJobId); }); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/index.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/index.ts index 0202c8431ce34..cff59fa42abb0 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/index.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/index.ts @@ -12,6 +12,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./outlier_detection_creation')); loadTestFile(require.resolve('./regression_creation')); loadTestFile(require.resolve('./classification_creation')); - loadTestFile(require.resolve('./cloning')); + // loadTestFile(require.resolve('./cloning')); }); } diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts index 7d10d6724d9e2..b5c2b7528437c 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts @@ -58,10 +58,14 @@ export default function ({ getService }: FtrProviderContext) { await ml.navigation.navigateToDataFrameAnalytics(); }); - it('loads the job creation flyout', async () => { + it('loads the source selection modal', async () => { await ml.dataFrameAnalytics.startAnalyticsCreation(); }); + it('selects the source data and loads the job wizard page', async () => { + ml.jobSourceSelection.selectSourceForAnalyticsJob(testData.source); + }); + it('selects the job type', async () => { await ml.dataFrameAnalyticsCreation.assertJobTypeSelectExists(); await ml.dataFrameAnalyticsCreation.selectJobType(testData.jobType); @@ -75,6 +79,19 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.assertTrainingPercentInputMissing(); }); + it('continues to the additional options step', async () => { + await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep(); + }); + + it('inputs the model memory limit', async () => { + await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists(); + await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory); + }); + + it('continues to the details step', async () => { + await ml.dataFrameAnalyticsCreation.continueToDetailsStep(); + }); + it('inputs the job id', async () => { await ml.dataFrameAnalyticsCreation.assertJobIdInputExists(); await ml.dataFrameAnalyticsCreation.setJobId(testData.jobId); @@ -85,21 +102,11 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.setJobDescription(testData.jobDescription); }); - it('selects the source index', async () => { - await ml.dataFrameAnalyticsCreation.assertSourceIndexInputExists(); - await ml.dataFrameAnalyticsCreation.selectSourceIndex(testData.source); - }); - it('inputs the destination index', async () => { await ml.dataFrameAnalyticsCreation.assertDestIndexInputExists(); await ml.dataFrameAnalyticsCreation.setDestIndex(testData.destinationIndex); }); - it('inputs the model memory limit', async () => { - await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists(); - await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory); - }); - it('sets the create index pattern switch', async () => { await ml.dataFrameAnalyticsCreation.assertCreateIndexPatternSwitchExists(); await ml.dataFrameAnalyticsCreation.setCreateIndexPatternSwitchState( @@ -107,19 +114,14 @@ export default function ({ getService }: FtrProviderContext) { ); }); - it('creates the analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertCreateButtonExists(); - await ml.dataFrameAnalyticsCreation.createAnalyticsJob(testData.jobId); - }); - - it('starts the analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertStartButtonExists(); - await ml.dataFrameAnalyticsCreation.startAnalyticsJob(); + it('continues to the create step', async () => { + await ml.dataFrameAnalyticsCreation.continueToCreateStep(); }); - it('closes the create job flyout', async () => { - await ml.dataFrameAnalyticsCreation.assertCloseButtonExists(); - await ml.dataFrameAnalyticsCreation.closeCreateAnalyticsJobFlyout(); + it('creates and starts the analytics job', async () => { + await ml.dataFrameAnalyticsCreation.assertCreateButtonExists(); + await ml.dataFrameAnalyticsCreation.assertStartJobCheckboxCheckState(true); + await ml.dataFrameAnalyticsCreation.createAnalyticsJob(testData.jobId); }); it('finishes analytics processing', async () => { @@ -127,6 +129,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('displays the analytics table', async () => { + await ml.dataFrameAnalyticsCreation.navigateToJobManagementPage(); await ml.dataFrameAnalytics.assertAnalyticsTableExists(); }); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts index 8322a4a1dd139..c818619a18378 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts @@ -11,7 +11,8 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - describe('regression creation', function () { + // flaky test, see https://github.com/elastic/kibana/issues/68352 + describe.skip('regression creation', function () { before(async () => { await esArchiver.loadIfNeeded('ml/egs_regression'); await ml.testResources.createIndexPatternIfNeeded('ft_egs_regression', '@timestamp'); @@ -60,35 +61,19 @@ export default function ({ getService }: FtrProviderContext) { await ml.navigation.navigateToDataFrameAnalytics(); }); - it('loads the job creation flyout', async () => { + it('loads the source selection modal', async () => { await ml.dataFrameAnalytics.startAnalyticsCreation(); }); + it('selects the source data and loads the job wizard page', async () => { + ml.jobSourceSelection.selectSourceForAnalyticsJob(testData.source); + }); + it('selects the job type', async () => { await ml.dataFrameAnalyticsCreation.assertJobTypeSelectExists(); await ml.dataFrameAnalyticsCreation.selectJobType(testData.jobType); }); - it('inputs the job id', async () => { - await ml.dataFrameAnalyticsCreation.assertJobIdInputExists(); - await ml.dataFrameAnalyticsCreation.setJobId(testData.jobId); - }); - - it('inputs the job description', async () => { - await ml.dataFrameAnalyticsCreation.assertJobDescriptionInputExists(); - await ml.dataFrameAnalyticsCreation.setJobDescription(testData.jobDescription); - }); - - it('selects the source index', async () => { - await ml.dataFrameAnalyticsCreation.assertSourceIndexInputExists(); - await ml.dataFrameAnalyticsCreation.selectSourceIndex(testData.source); - }); - - it('inputs the destination index', async () => { - await ml.dataFrameAnalyticsCreation.assertDestIndexInputExists(); - await ml.dataFrameAnalyticsCreation.setDestIndex(testData.destinationIndex); - }); - it('inputs the dependent variable', async () => { await ml.dataFrameAnalyticsCreation.assertDependentVariableInputExists(); await ml.dataFrameAnalyticsCreation.selectDependentVariable(testData.dependentVariable); @@ -99,11 +84,34 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.setTrainingPercent(testData.trainingPercent); }); + it('continues to the additional options step', async () => { + await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep(); + }); + it('inputs the model memory limit', async () => { await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists(); await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory); }); + it('continues to the details step', async () => { + await ml.dataFrameAnalyticsCreation.continueToDetailsStep(); + }); + + it('inputs the job id', async () => { + await ml.dataFrameAnalyticsCreation.assertJobIdInputExists(); + await ml.dataFrameAnalyticsCreation.setJobId(testData.jobId); + }); + + it('inputs the job description', async () => { + await ml.dataFrameAnalyticsCreation.assertJobDescriptionInputExists(); + await ml.dataFrameAnalyticsCreation.setJobDescription(testData.jobDescription); + }); + + it('inputs the destination index', async () => { + await ml.dataFrameAnalyticsCreation.assertDestIndexInputExists(); + await ml.dataFrameAnalyticsCreation.setDestIndex(testData.destinationIndex); + }); + it('sets the create index pattern switch', async () => { await ml.dataFrameAnalyticsCreation.assertCreateIndexPatternSwitchExists(); await ml.dataFrameAnalyticsCreation.setCreateIndexPatternSwitchState( @@ -111,19 +119,14 @@ export default function ({ getService }: FtrProviderContext) { ); }); - it('creates the analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertCreateButtonExists(); - await ml.dataFrameAnalyticsCreation.createAnalyticsJob(testData.jobId); - }); - - it('starts the analytics job', async () => { - await ml.dataFrameAnalyticsCreation.assertStartButtonExists(); - await ml.dataFrameAnalyticsCreation.startAnalyticsJob(); + it('continues to the create step', async () => { + await ml.dataFrameAnalyticsCreation.continueToCreateStep(); }); - it('closes the create job flyout', async () => { - await ml.dataFrameAnalyticsCreation.assertCloseButtonExists(); - await ml.dataFrameAnalyticsCreation.closeCreateAnalyticsJobFlyout(); + it('creates and starts the analytics job', async () => { + await ml.dataFrameAnalyticsCreation.assertCreateButtonExists(); + await ml.dataFrameAnalyticsCreation.assertStartJobCheckboxCheckState(true); + await ml.dataFrameAnalyticsCreation.createAnalyticsJob(testData.jobId); }); it('finishes analytics processing', async () => { @@ -131,6 +134,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('displays the analytics table', async () => { + await ml.dataFrameAnalyticsCreation.navigateToJobManagementPage(); await ml.dataFrameAnalytics.assertAnalyticsTableExists(); }); diff --git a/x-pack/test/functional/apps/timelion/feature_controls/timelion_security.ts b/x-pack/test/functional/apps/timelion/feature_controls/timelion_security.ts index a3ade23f5c178..5021bd8cce0fc 100644 --- a/x-pack/test/functional/apps/timelion/feature_controls/timelion_security.ts +++ b/x-pack/test/functional/apps/timelion/feature_controls/timelion_security.ts @@ -60,7 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows timelion navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Timelion', 'Stack Management']); + expect(navLinks).to.contain('Timelion'); }); it(`allows a timelion sheet to be created`, async () => { @@ -112,7 +112,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows timelion navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Timelion', 'Stack Management']); + expect(navLinks).to.contain('Timelion'); }); it(`does not allow a timelion sheet to be created`, async () => { diff --git a/x-pack/test/functional/apps/transform/creation_index_pattern.ts b/x-pack/test/functional/apps/transform/creation_index_pattern.ts index 8b407a4a24103..a72f1691af647 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation_index_pattern.ts @@ -50,6 +50,14 @@ export default function ({ getService }: FtrProviderContext) { identifier: 'avg(products.base_price)', label: 'products.base_price.avg', }, + { + identifier: 'filter(geoip.city_name)', + label: 'geoip.city_name.filter', + form: { + transformFilterAggTypeSelector: 'term', + transformFilterTermValueSelector: 'New York', + }, + }, ], transformId: `ec_1_${Date.now()}`, transformDescription: @@ -79,6 +87,13 @@ export default function ({ getService }: FtrProviderContext) { field: 'products.base_price', }, }, + 'geoip.city_name.filter': { + filter: { + term: { + 'geoip.city_name': 'New York', + }, + }, + }, }, }, pivotPreview: { @@ -110,6 +125,13 @@ export default function ({ getService }: FtrProviderContext) { identifier: 'percentiles(products.base_price)', label: 'products.base_price.percentiles', }, + { + identifier: 'filter(customer_phone)', + label: 'customer_phone.filter', + form: { + transformFilterAggTypeSelector: 'exists', + }, + }, ], transformId: `ec_2_${Date.now()}`, transformDescription: @@ -134,6 +156,13 @@ export default function ({ getService }: FtrProviderContext) { percents: [1, 5, 25, 50, 75, 95, 99], }, }, + 'customer_phone.filter': { + filter: { + exists: { + field: 'customer_phone', + }, + }, + }, }, }, pivotPreview: { @@ -223,7 +252,7 @@ export default function ({ getService }: FtrProviderContext) { for (const [index, agg] of testData.aggregationEntries.entries()) { await transform.wizard.assertAggregationInputExists(); await transform.wizard.assertAggregationInputValue([]); - await transform.wizard.addAggregationEntry(index, agg.identifier, agg.label); + await transform.wizard.addAggregationEntry(index, agg.identifier, agg.label, agg.form); } }); diff --git a/x-pack/test/functional/apps/uptime/certificates.ts b/x-pack/test/functional/apps/uptime/certificates.ts index 0ae56a3c5f256..c7ba7816e0255 100644 --- a/x-pack/test/functional/apps/uptime/certificates.ts +++ b/x-pack/test/functional/apps/uptime/certificates.ts @@ -14,15 +14,18 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const es = getService('es'); - // FLAKY: https://github.com/elastic/kibana/issues/66869 - describe.skip('certificates', function () { - beforeEach(async () => { + describe('certificates', function () { + before(async () => { + await makeCheck({ es, tls: true }); await uptime.goToRoot(true); + }); + + beforeEach(async () => { await makeCheck({ es, tls: true }); - await uptimeService.navigation.refreshApp(); }); it('can navigate to cert page', async () => { + await uptimeService.cert.isUptimeDataMissing(); await uptimeService.cert.hasViewCertButton(); await uptimeService.navigation.goToCertificates(); }); @@ -30,6 +33,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('page', () => { beforeEach(async () => { await uptimeService.navigation.goToCertificates(); + await uptimeService.navigation.refreshApp(); }); it('displays certificates', async () => { diff --git a/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts b/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts index ae13cf0742432..991cd07dce513 100644 --- a/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts +++ b/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts @@ -64,7 +64,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows uptime navlink', async () => { const navLinks = await appsMenu.readLinks(); - expect(navLinks.map((link) => link.text)).to.eql(['Uptime', 'Stack Management']); + expect(navLinks.map((link) => link.text)).to.contain('Uptime'); }); it('can navigate to Uptime app', async () => { @@ -115,7 +115,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows uptime navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Uptime', 'Stack Management']); + expect(navLinks).to.contain('Uptime'); }); it('can navigate to Uptime app', async () => { diff --git a/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts b/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts index 9410a6f9435f2..f74643939477c 100644 --- a/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts +++ b/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts @@ -77,7 +77,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows visualize navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Visualize', 'Stack Management']); + expect(navLinks).to.contain('Visualize'); }); it(`landing page shows "Create new Visualization" button`, async () => { @@ -201,7 +201,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows visualize navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Visualize', 'Stack Management']); + expect(navLinks).to.contain('Visualize'); }); it(`landing page shows "Create new Visualization" button`, async () => { @@ -316,7 +316,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows visualize navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Visualize', 'Stack Management']); + expect(navLinks).to.contain('Visualize'); }); it(`landing page shows "Create new Visualization" button`, async () => { diff --git a/x-pack/test/functional/apps/visualize/index.ts b/x-pack/test/functional/apps/visualize/index.ts index 1c23b8cde8606..0f64ecf0022d0 100644 --- a/x-pack/test/functional/apps/visualize/index.ts +++ b/x-pack/test/functional/apps/visualize/index.ts @@ -8,7 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function visualize({ loadTestFile }: FtrProviderContext) { describe('Visualize', function visualizeTestSuite() { - this.tags(['ciGroup4', 'skipFirefox', 'skipCoverage']); + this.tags(['ciGroup4', 'skipFirefox']); loadTestFile(require.resolve('./feature_controls/visualize_security')); loadTestFile(require.resolve('./feature_controls/visualize_spaces')); diff --git a/x-pack/test/functional/services/ml/api.ts b/x-pack/test/functional/services/ml/api.ts index fc2ce4bb16b99..a48159cd7515f 100644 --- a/x-pack/test/functional/services/ml/api.ts +++ b/x-pack/test/functional/services/ml/api.ts @@ -214,22 +214,60 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) { ); }, - async getAnalyticsState(analyticsId: string): Promise { - log.debug(`Fetching analytics state for job ${analyticsId}`); + async getDFAJobStats(analyticsId: string): Promise { + log.debug(`Fetching data frame analytics job stats for job ${analyticsId}...`); const analyticsStats = await esSupertest .get(`/_ml/data_frame/analytics/${analyticsId}/_stats`) .expect(200) .then((res: any) => res.body); + return analyticsStats; + }, + + async getAnalyticsState(analyticsId: string): Promise { + log.debug(`Fetching analytics state for job ${analyticsId}`); + const analyticsStats = await this.getDFAJobStats(analyticsId); + expect(analyticsStats.data_frame_analytics).to.have.length( 1, `Expected dataframe analytics stats to have exactly one object (got '${analyticsStats.data_frame_analytics.length}')` ); + const state: DATA_FRAME_TASK_STATE = analyticsStats.data_frame_analytics[0].state; return state; }, + async getDFAJobTrainingRecordCount(analyticsId: string): Promise { + const analyticsStats = await this.getDFAJobStats(analyticsId); + + expect(analyticsStats.data_frame_analytics).to.have.length( + 1, + `Expected dataframe analytics stats to have exactly one object (got '${analyticsStats.data_frame_analytics.length}')` + ); + const trainingRecordCount: number = + analyticsStats.data_frame_analytics[0].data_counts.training_docs_count; + + return trainingRecordCount; + }, + + async waitForDFAJobTrainingRecordCountToBePositive(analyticsId: string) { + await retry.waitForWithTimeout( + `'${analyticsId}' to have training_docs_count > 0`, + 10 * 1000, + async () => { + const trainingRecordCount = await this.getDFAJobTrainingRecordCount(analyticsId); + if (trainingRecordCount > 0) { + return true; + } else { + throw new Error( + `expected data frame analytics job '${analyticsId}' to have training_docs_count > 0 (got ${trainingRecordCount})` + ); + } + } + ); + }, + async waitForAnalyticsState( analyticsId: string, expectedAnalyticsState: DATA_FRAME_TASK_STATE diff --git a/x-pack/test/functional/services/ml/data_frame_analytics.ts b/x-pack/test/functional/services/ml/data_frame_analytics.ts index bd7d76e34b447..634b0d4d41fca 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics.ts @@ -67,10 +67,11 @@ export function MachineLearningDataFrameAnalyticsProvider( } else { await testSubjects.click('mlAnalyticsButtonCreate'); } - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyout'); + await testSubjects.existOrFail('analyticsCreateSourceIndexModal'); }, async waitForAnalyticsCompletion(analyticsId: string) { + await mlApi.waitForDFAJobTrainingRecordCountToBePositive(analyticsId); await mlApi.waitForAnalyticsState(analyticsId, DATA_FRAME_TASK_STATE.STOPPED); }, }; diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts b/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts index cff7e00eef688..081eb8775fa5b 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts @@ -42,12 +42,12 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( return { async assertJobTypeSelectExists() { - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyoutJobTypeSelect'); + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardJobTypeSelect'); }, async assertJobTypeSelection(expectedSelection: string) { const actualSelection = await testSubjects.getAttribute( - 'mlAnalyticsCreateJobFlyoutJobTypeSelect', + 'mlAnalyticsCreateJobWizardJobTypeSelect', 'value' ); expect(actualSelection).to.eql( @@ -57,12 +57,13 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( }, async selectJobType(jobType: string) { - await testSubjects.selectValue('mlAnalyticsCreateJobFlyoutJobTypeSelect', jobType); + await testSubjects.click('mlAnalyticsCreateJobWizardJobTypeSelect'); + await testSubjects.click(`mlAnalyticsCreation-${jobType}-option`); await this.assertJobTypeSelection(jobType); }, async assertAdvancedEditorSwitchExists() { - await testSubjects.existOrFail(`mlAnalyticsCreateJobFlyoutAdvancedEditorSwitch`, { + await testSubjects.existOrFail(`mlAnalyticsCreateJobWizardAdvancedEditorSwitch`, { allowHidden: true, }); }, @@ -70,7 +71,7 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( async assertAdvancedEditorSwitchCheckState(expectedCheckState: boolean) { const actualCheckState = (await testSubjects.getAttribute( - 'mlAnalyticsCreateJobFlyoutAdvancedEditorSwitch', + 'mlAnalyticsCreateJobWizardAdvancedEditorSwitch', 'aria-checked' )) === 'true'; expect(actualCheckState).to.eql( @@ -182,20 +183,22 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( }, async assertDependentVariableInputExists() { - await testSubjects.existOrFail( - 'mlAnalyticsCreateJobFlyoutDependentVariableSelect > comboBoxInput' - ); + await retry.tryForTime(8000, async () => { + await testSubjects.existOrFail( + 'mlAnalyticsCreateJobWizardDependentVariableSelect > comboBoxInput' + ); + }); }, async assertDependentVariableInputMissing() { await testSubjects.missingOrFail( - 'mlAnalyticsCreateJobFlyoutDependentVariableSelect > comboBoxInput' + 'mlAnalyticsCreateJobWizardDependentVariableSelect > comboBoxInput' ); }, async assertDependentVariableSelection(expectedSelection: string[]) { const actualSelection = await comboBox.getComboBoxSelectedOptions( - 'mlAnalyticsCreateJobFlyoutDependentVariableSelect > comboBoxInput' + 'mlAnalyticsCreateJobWizardDependentVariableSelect > comboBoxInput' ); expect(actualSelection).to.eql( expectedSelection, @@ -205,23 +208,23 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( async selectDependentVariable(dependentVariable: string) { await comboBox.set( - 'mlAnalyticsCreateJobFlyoutDependentVariableSelect > comboBoxInput', + 'mlAnalyticsCreateJobWizardDependentVariableSelect > comboBoxInput', dependentVariable ); await this.assertDependentVariableSelection([dependentVariable]); }, async assertTrainingPercentInputExists() { - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyoutTrainingPercentSlider'); + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardTrainingPercentSlider'); }, async assertTrainingPercentInputMissing() { - await testSubjects.missingOrFail('mlAnalyticsCreateJobFlyoutTrainingPercentSlider'); + await testSubjects.missingOrFail('mlAnalyticsCreateJobWizardTrainingPercentSlider'); }, async assertTrainingPercentValue(expectedValue: string) { const actualTrainingPercent = await testSubjects.getAttribute( - 'mlAnalyticsCreateJobFlyoutTrainingPercentSlider', + 'mlAnalyticsCreateJobWizardTrainingPercentSlider', 'value' ); expect(actualTrainingPercent).to.eql( @@ -231,7 +234,7 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( }, async setTrainingPercent(trainingPercent: string) { - const slider = await testSubjects.find('mlAnalyticsCreateJobFlyoutTrainingPercentSlider'); + const slider = await testSubjects.find('mlAnalyticsCreateJobWizardTrainingPercentSlider'); let currentValue = await slider.getAttribute('value'); let currentDiff = +currentValue - +trainingPercent; @@ -271,13 +274,28 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( await this.assertTrainingPercentValue(trainingPercent); }, + async continueToAdditionalOptionsStep() { + await testSubjects.click('mlAnalyticsCreateJobWizardContinueButton'); + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardAdvancedStep'); + }, + + async continueToDetailsStep() { + await testSubjects.click('mlAnalyticsCreateJobWizardContinueButton'); + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardDetailsStep'); + }, + + async continueToCreateStep() { + await testSubjects.click('mlAnalyticsCreateJobWizardContinueButton'); + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardCreateStep'); + }, + async assertModelMemoryInputExists() { - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyoutModelMemoryInput'); + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardModelMemoryInput'); }, async assertModelMemoryValue(expectedValue: string) { const actualModelMemory = await testSubjects.getAttribute( - 'mlAnalyticsCreateJobFlyoutModelMemoryInput', + 'mlAnalyticsCreateJobWizardModelMemoryInput', 'value' ); expect(actualModelMemory).to.eql( @@ -289,7 +307,7 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( async setModelMemory(modelMemory: string) { await retry.tryForTime(15 * 1000, async () => { await mlCommon.setValueWithChecks( - 'mlAnalyticsCreateJobFlyoutModelMemoryInput', + 'mlAnalyticsCreateJobWizardModelMemoryInput', modelMemory, { clearWithKeyboard: true, @@ -300,14 +318,14 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( }, async assertCreateIndexPatternSwitchExists() { - await testSubjects.existOrFail(`mlAnalyticsCreateJobFlyoutCreateIndexPatternSwitch`, { + await testSubjects.existOrFail(`mlAnalyticsCreateJobWizardCreateIndexPatternSwitch`, { allowHidden: true, }); }, async getCreateIndexPatternSwitchCheckState(): Promise { const state = await testSubjects.getAttribute( - 'mlAnalyticsCreateJobFlyoutCreateIndexPatternSwitch', + 'mlAnalyticsCreateJobWizardCreateIndexPatternSwitch', 'aria-checked' ); return state === 'true'; @@ -323,58 +341,46 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( async setCreateIndexPatternSwitchState(checkState: boolean) { if ((await this.getCreateIndexPatternSwitchCheckState()) !== checkState) { - await testSubjects.click('mlAnalyticsCreateJobFlyoutCreateIndexPatternSwitch'); + await testSubjects.click('mlAnalyticsCreateJobWizardCreateIndexPatternSwitch'); } await this.assertCreateIndexPatternSwitchCheckState(checkState); }, - async assertCreateButtonExists() { - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyoutCreateButton'); + async assertStartJobCheckboxExists() { + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardStartJobCheckbox'); + }, + + async assertStartJobCheckboxCheckState(expectedCheckState: boolean) { + const actualCheckState = + (await testSubjects.getAttribute( + 'mlAnalyticsCreateJobWizardStartJobCheckbox', + 'checked' + )) === 'true'; + expect(actualCheckState).to.eql( + expectedCheckState, + `Start job check state should be ${expectedCheckState} (got ${actualCheckState})` + ); }, - async assertCreateButtonMissing() { - await testSubjects.missingOrFail('mlAnalyticsCreateJobFlyoutCreateButton'); + async assertCreateButtonExists() { + await testSubjects.existOrFail('mlAnalyticsCreateJobWizardCreateButton'); }, async isCreateButtonDisabled() { - const isEnabled = await testSubjects.isEnabled('mlAnalyticsCreateJobFlyoutCreateButton'); + const isEnabled = await testSubjects.isEnabled('mlAnalyticsCreateJobWizardCreateButton'); return !isEnabled; }, async createAnalyticsJob(analyticsId: string) { - await testSubjects.click('mlAnalyticsCreateJobFlyoutCreateButton'); + await testSubjects.click('mlAnalyticsCreateJobWizardCreateButton'); await retry.tryForTime(5000, async () => { - await this.assertCreateButtonMissing(); - await this.assertStartButtonExists(); + await this.assertBackToManagementCardExists(); }); await mlApi.waitForDataFrameAnalyticsJobToExist(analyticsId); }, - async assertStartButtonExists() { - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyoutStartButton'); - }, - - async assertStartButtonMissing() { - await testSubjects.missingOrFail('mlAnalyticsCreateJobFlyoutStartButton'); - }, - - async startAnalyticsJob() { - await testSubjects.click('mlAnalyticsCreateJobFlyoutStartButton'); - await retry.tryForTime(5000, async () => { - await this.assertStartButtonMissing(); - await this.assertCloseButtonExists(); - }); - }, - - async assertCloseButtonExists() { - await testSubjects.existOrFail('mlAnalyticsCreateJobFlyoutCloseButton'); - }, - - async closeCreateAnalyticsJobFlyout() { - await retry.tryForTime(10 * 1000, async () => { - await testSubjects.click('mlAnalyticsCreateJobFlyoutCloseButton'); - await testSubjects.missingOrFail('mlAnalyticsCreateJobFlyout'); - }); + async assertBackToManagementCardExists() { + await testSubjects.existOrFail('analyticsWizardCardManagement'); }, async getHeaderText() { @@ -395,5 +401,19 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( await this.assertExcludedFieldsSelection(job.analyzed_fields.excludes); await this.assertModelMemoryValue(job.model_memory_limit); }, + + async assertCreationCalloutMessagesExist() { + await testSubjects.existOrFail('analyticsWizardCreationCallout_0'); + await testSubjects.existOrFail('analyticsWizardCreationCallout_1'); + await testSubjects.existOrFail('analyticsWizardCreationCallout_2'); + }, + + async navigateToJobManagementPage() { + await retry.tryForTime(5000, async () => { + await this.assertCreationCalloutMessagesExist(); + }); + await testSubjects.click('analyticsWizardCardManagement'); + await testSubjects.existOrFail('mlPageDataFrameAnalytics'); + }, }; } diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_table.ts b/x-pack/test/functional/services/ml/data_frame_analytics_table.ts index d5f4ee63f615b..60507f5ab3331 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_table.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_table.ts @@ -105,6 +105,7 @@ export function MachineLearningDataFrameAnalyticsTableProvider({ getService }: F } public async assertAnalyticsRowFields(analyticsId: string, expectedRow: object) { + await this.refreshAnalyticsTable(); const rows = await this.parseAnalyticsTable(); const analyticsRow = rows.filter((row) => row.id === analyticsId)[0]; expect(analyticsRow).to.eql( diff --git a/x-pack/test/functional/services/ml/job_source_selection.ts b/x-pack/test/functional/services/ml/job_source_selection.ts index a1857d882be3d..8da7318b642ad 100644 --- a/x-pack/test/functional/services/ml/job_source_selection.ts +++ b/x-pack/test/functional/services/ml/job_source_selection.ts @@ -34,6 +34,10 @@ export function MachineLearningJobSourceSelectionProvider({ getService }: FtrPro await this.selectSource(sourceName, 'mlPageJobTypeSelection'); }, + async selectSourceForAnalyticsJob(sourceName: string) { + await this.selectSource(sourceName, 'mlAnalyticsCreationContainer'); + }, + async selectSourceForIndexBasedDataVisualizer(sourceName: string) { await this.selectSource(sourceName, 'mlPageIndexDataVisualizer'); }, diff --git a/x-pack/test/functional/services/transform/wizard.ts b/x-pack/test/functional/services/transform/wizard.ts index 6a99e6ed007b6..03c8b2867b240 100644 --- a/x-pack/test/functional/services/transform/wizard.ts +++ b/x-pack/test/functional/services/transform/wizard.ts @@ -270,10 +270,48 @@ export function TransformWizardProvider({ getService }: FtrProviderContext) { ); }, - async addAggregationEntry(index: number, identifier: string, expectedLabel: string) { + async addAggregationEntry( + index: number, + identifier: string, + expectedLabel: string, + formData?: Record + ) { await comboBox.set('transformAggregationSelection > comboBoxInput', identifier); await this.assertAggregationInputValue([]); await this.assertAggregationEntryExists(index, expectedLabel); + + if (formData !== undefined) { + await this.fillPopoverForm(identifier, expectedLabel, formData); + } + }, + + async fillPopoverForm( + identifier: string, + expectedLabel: string, + formData: Record + ) { + await testSubjects.existOrFail(`transformAggPopoverForm_${expectedLabel}`); + + for (const [testObj, value] of Object.entries(formData)) { + switch (testObj) { + case 'transformFilterAggTypeSelector': + await this.selectFilerAggType(value); + break; + case 'transformFilterTermValueSelector': + await this.fillFilterTermValue(value); + break; + } + } + await testSubjects.clickWhenNotDisabled('transformApplyAggChanges'); + await testSubjects.missingOrFail(`transformAggPopoverForm_${expectedLabel}`); + }, + + async selectFilerAggType(value: string) { + await testSubjects.selectValue('transformFilterAggTypeSelector', value); + }, + + async fillFilterTermValue(value: string) { + await comboBox.set('transformFilterTermValueSelector', value); }, async assertAdvancedPivotEditorContent(expectedValue: string[]) { diff --git a/x-pack/test/functional/services/uptime/certificates.ts b/x-pack/test/functional/services/uptime/certificates.ts index fb7cb6191b0ae..2ceab1ca89e54 100644 --- a/x-pack/test/functional/services/uptime/certificates.ts +++ b/x-pack/test/functional/services/uptime/certificates.ts @@ -17,31 +17,49 @@ export function UptimeCertProvider({ getService }: FtrProviderContext) { await input.type(text); }; + const refreshApp = async () => { + await testSubjects.click('superDatePickerApplyTimeButton', 10000); + }; + return { + async isUptimeDataMissing() { + return retry.tryForTime(60 * 1000, async () => { + if (await testSubjects.exists('data-missing', { timeout: 0 })) { + await refreshApp(); + } + await testSubjects.missingOrFail('data-missing'); + }); + }, async hasViewCertButton() { return retry.tryForTime(15000, async () => { await testSubjects.existOrFail('uptimeCertificatesLink'); }); }, async certificateExists(cert: { certId: string; monitorId: string }) { - return retry.tryForTime(15000, async () => { + return retry.tryForTime(60 * 1000, async () => { + if (!(await testSubjects.exists(cert.certId))) { + await refreshApp(); + } await testSubjects.existOrFail(cert.certId); await testSubjects.existOrFail('monitor-page-link-' + cert.monitorId); }); }, async hasCertificates(expectedTotal?: number) { - return retry.tryForTime(15000, async () => { + return retry.tryForTime(60 * 1000, async () => { const totalCerts = await testSubjects.getVisibleText('uptimeCertTotal'); if (expectedTotal) { - expect(Number(totalCerts) === expectedTotal).to.eql(true); + expect(Number(totalCerts)).to.eql(expectedTotal); } else { + if (Number(totalCerts) < 1) { + await refreshApp(); + } expect(Number(totalCerts) > 0).to.eql(true); } }); }, async searchIsWorking(monId: string) { const self = this; - return retry.tryForTime(15000, async () => { + return retry.tryForTime(60 * 1000, async () => { await changeSearchField(monId); await self.hasCertificates(1); }); diff --git a/x-pack/test/functional/services/uptime/navigation.ts b/x-pack/test/functional/services/uptime/navigation.ts index d372bd53c081b..7c5a4632f8627 100644 --- a/x-pack/test/functional/services/uptime/navigation.ts +++ b/x-pack/test/functional/services/uptime/navigation.ts @@ -26,7 +26,7 @@ export function UptimeNavigationProvider({ getService, getPageObjects }: FtrProv }; const refreshApp = async () => { - await testSubjects.click('superDatePickerApplyTimeButton'); + await testSubjects.click('superDatePickerApplyTimeButton', 10000); }; return { @@ -65,10 +65,15 @@ export function UptimeNavigationProvider({ getService, getPageObjects }: FtrProv }, goToCertificates: async () => { - return retry.try(async () => { - await testSubjects.click('uptimeCertificatesLink'); - await testSubjects.existOrFail('uptimeCertificatesPage'); - }); + if (!(await testSubjects.exists('uptimeCertificatesPage', { timeout: 0 }))) { + return retry.try(async () => { + if (await testSubjects.exists('uptimeCertificatesLink', { timeout: 0 })) { + await testSubjects.click('uptimeCertificatesLink', 10000); + } + await testSubjects.existOrFail('uptimeCertificatesPage'); + }); + } + return true; }, async loadDataAndGoToMonitorPage(dateStart: string, dateEnd: string, monitorId: string) { diff --git a/x-pack/test/functional_endpoint/services/endpoint_policy.ts b/x-pack/test/functional_endpoint/services/endpoint_policy.ts index 5142c083a0891..29f72cf0fa962 100644 --- a/x-pack/test/functional_endpoint/services/endpoint_policy.ts +++ b/x-pack/test/functional_endpoint/services/endpoint_policy.ts @@ -9,8 +9,8 @@ import { CreateAgentConfigResponse, CreateDatasourceResponse, } from '../../../plugins/ingest_manager/common'; -import { Immutable } from '../../../plugins/siem/common/endpoint/types'; -import { factory as policyConfigFactory } from '../../../plugins/siem/common/endpoint/models/policy_config'; +import { Immutable } from '../../../plugins/security_solution/common/endpoint/types'; +import { factory as policyConfigFactory } from '../../../plugins/security_solution/common/endpoint/models/policy_config'; const INGEST_API_ROOT = '/api/ingest_manager'; const INGEST_API_AGENT_CONFIGS = `${INGEST_API_ROOT}/agent_configs`; diff --git a/x-pack/test/kerberos_api_integration/config.ts b/x-pack/test/kerberos_api_integration/config.ts index 1e8e62e048411..7b65d79e18e7d 100644 --- a/x-pack/test/kerberos_api_integration/config.ts +++ b/x-pack/test/kerberos_api_integration/config.ts @@ -9,7 +9,7 @@ import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); const kerberosKeytabPath = resolve( __dirname, diff --git a/x-pack/test/login_selector_api_integration/config.ts b/x-pack/test/login_selector_api_integration/config.ts index 33fa5df7cd1e0..ba7aadb121e82 100644 --- a/x-pack/test/login_selector_api_integration/config.ts +++ b/x-pack/test/login_selector_api_integration/config.ts @@ -12,7 +12,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const kibanaAPITestsConfig = await readConfigFile( require.resolve('../../../test/api_integration/config.js') ); - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); const kibanaPort = xPackAPITestsConfig.get('servers.kibana.port'); const kerberosKeytabPath = resolve(__dirname, '../kerberos_api_integration/fixtures/krb5.keytab'); diff --git a/x-pack/test/observability_api_integration/common/config.ts b/x-pack/test/observability_api_integration/common/config.ts index 9e011a98bbfcd..83dc597829a3c 100644 --- a/x-pack/test/observability_api_integration/common/config.ts +++ b/x-pack/test/observability_api_integration/common/config.ts @@ -17,7 +17,7 @@ export function createTestConfig(settings: Settings) { return async ({ readConfigFile }: FtrConfigProviderContext) => { const xPackAPITestsConfig = await readConfigFile( - require.resolve('../../api_integration/config.js') + require.resolve('../../api_integration/config.ts') ); return { diff --git a/x-pack/test/oidc_api_integration/config.ts b/x-pack/test/oidc_api_integration/config.ts index a78d6c3febc2d..7a0d786e20130 100644 --- a/x-pack/test/oidc_api_integration/config.ts +++ b/x-pack/test/oidc_api_integration/config.ts @@ -9,7 +9,7 @@ import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); const plugin = resolve(__dirname, './fixtures/oidc_provider'); const kibanaPort = xPackAPITestsConfig.get('servers.kibana.port'); const jwksPath = resolve(__dirname, './fixtures/jwks.json'); diff --git a/x-pack/test/page_load_metrics/config.ts b/x-pack/test/page_load_metrics/config.ts new file mode 100644 index 0000000000000..641099ff8e934 --- /dev/null +++ b/x-pack/test/page_load_metrics/config.ts @@ -0,0 +1,42 @@ +/* + * 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 { resolve } from 'path'; + +import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; +import { PuppeteerTestRunner } from './runner'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const kibanaCommonTestsConfig = await readConfigFile( + require.resolve('../../../test/common/config.js') + ); + const xpackFunctionalTestsConfig = await readConfigFile( + require.resolve('../functional/config.js') + ); + + return { + ...kibanaCommonTestsConfig.getAll(), + + testRunner: PuppeteerTestRunner, + + esArchiver: { + directory: resolve(__dirname, 'es_archives'), + }, + + screenshots: { + directory: resolve(__dirname, 'screenshots'), + }, + + esTestCluster: { + ...xpackFunctionalTestsConfig.get('esTestCluster'), + serverArgs: [...xpackFunctionalTestsConfig.get('esTestCluster.serverArgs')], + }, + + kbnTestServer: { + ...xpackFunctionalTestsConfig.get('kbnTestServer'), + }, + }; +} diff --git a/x-pack/test/page_load_metrics/es_archives/default/data.json.gz b/x-pack/test/page_load_metrics/es_archives/default/data.json.gz new file mode 100644 index 0000000000000..5a5290ddf6447 Binary files /dev/null and b/x-pack/test/page_load_metrics/es_archives/default/data.json.gz differ diff --git a/x-pack/test/page_load_metrics/es_archives/default/mappings.json b/x-pack/test/page_load_metrics/es_archives/default/mappings.json new file mode 100644 index 0000000000000..c36f9576c4df1 --- /dev/null +++ b/x-pack/test/page_load_metrics/es_archives/default/mappings.json @@ -0,0 +1,2402 @@ +{ + "type": "index", + "value": { + "aliases": { + ".kibana": { + } + }, + "index": ".kibana_1", + "mappings": { + "_meta": { + "migrationMappingPropertyHashes": { + "action": "6e96ac5e648f57523879661ea72525b7", + "action_task_params": "a9d49f184ee89641044be0ca2950fa3a", + "alert": "7b44fba6773e37c806ce290ea9b7024e", + "apm-indices": "9bb9b2bf1fa636ed8619cbab5ce6a1dd", + "apm-telemetry": "3525d7c22c42bc80f5e6e9cb3f2b26a2", + "application_usage_totals": "c897e4310c5f24b07caaff3db53ae2c1", + "application_usage_transactional": "965839e75f809fefe04f92dc4d99722a", + "canvas-element": "7390014e1091044523666d97247392fc", + "canvas-workpad": "b0a1706d356228dbdcb4a17e6b9eb231", + "cases": "32aa96a6d3855ddda53010ae2048ac22", + "cases-comments": "c2061fb929f585df57425102fa928b4b", + "cases-configure": "42711cbb311976c0687853f4c1354572", + "cases-user-actions": "32277330ec6b721abe3b846cfd939a71", + "config": "ae24d22d5986d04124cc6568f771066f", + "dashboard": "d00f614b29a80360e1190193fd333bab", + "file-upload-telemetry": "0ed4d3e1983d1217a30982630897092e", + "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", + "index-pattern": "66eccb05066c5a89924f48a9e9736499", + "infrastructure-ui-source": "ddc0ecb18383f6b26101a2fadb2dab0c", + "inventory-view": "88fc7e12fd1b45b6f0787323ce4f18d2", + "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", + "lens": "21c3ea0763beb1ecb0162529706b88c5", + "lens-ui-telemetry": "509bfa5978586998e05f9e303c07a327", + "map": "23d7aa4a720d4938ccde3983f87bd58d", + "maps-telemetry": "bfd39d88aadadb4be597ea984d433dbe", + "metrics-explorer-view": "428e319af3e822c80a84cf87123ca35c", + "migrationVersion": "4a1746014a75ade3a714e1db5763276f", + "ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9", + "namespace": "2f4316de49999235636386fe51dc06c1", + "namespaces": "2f4316de49999235636386fe51dc06c1", + "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", + "references": "7997cf5a56cc02bdc9c93361bde732b0", + "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", + "search": "181661168bbadd1eff5902361e2a0d5c", + "space": "c5ca8acafa0beaa4d08d014a97b6bc6b", + "telemetry": "36a616f7026dfa617d6655df850fe16d", + "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", + "tsvb-validation-telemetry": "3a37ef6c8700ae6fc97d5c7da00e9215", + "type": "2f4316de49999235636386fe51dc06c1", + "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", + "updated_at": "00da57df13e94e9d98437d13ace4bfe0", + "upgrade-assistant-reindex-operation": "296a89039fc4260292be36b1b005d8f2", + "upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b", + "uptime-dynamic-settings": "fcdb453a30092f022f2642db29523d80", + "url": "b675c3be8d76ecf029294d51dc7ec65d", + "visualization": "52d7a13ad68a150c4525b292d23e12cc" + } + }, + "dynamic": "strict", + "properties": { + "action": { + "properties": { + "actionTypeId": { + "type": "keyword" + }, + "config": { + "enabled": false, + "type": "object" + }, + "name": { + "fields": { + "keyword": { + "type": "keyword" + } + }, + "type": "text" + }, + "secrets": { + "type": "binary" + } + } + }, + "action_task_params": { + "properties": { + "actionId": { + "type": "keyword" + }, + "apiKey": { + "type": "binary" + }, + "params": { + "enabled": false, + "type": "object" + } + } + }, + "alert": { + "properties": { + "actions": { + "properties": { + "actionRef": { + "type": "keyword" + }, + "actionTypeId": { + "type": "keyword" + }, + "group": { + "type": "keyword" + }, + "params": { + "enabled": false, + "type": "object" + } + }, + "type": "nested" + }, + "alertTypeId": { + "type": "keyword" + }, + "apiKey": { + "type": "binary" + }, + "apiKeyOwner": { + "type": "keyword" + }, + "consumer": { + "type": "keyword" + }, + "createdAt": { + "type": "date" + }, + "createdBy": { + "type": "keyword" + }, + "enabled": { + "type": "boolean" + }, + "muteAll": { + "type": "boolean" + }, + "mutedInstanceIds": { + "type": "keyword" + }, + "name": { + "fields": { + "keyword": { + "type": "keyword" + } + }, + "type": "text" + }, + "params": { + "enabled": false, + "type": "object" + }, + "schedule": { + "properties": { + "interval": { + "type": "keyword" + } + } + }, + "scheduledTaskId": { + "type": "keyword" + }, + "tags": { + "type": "keyword" + }, + "throttle": { + "type": "keyword" + }, + "updatedBy": { + "type": "keyword" + } + } + }, + "apm-indices": { + "properties": { + "apm_oss": { + "properties": { + "errorIndices": { + "type": "keyword" + }, + "metricsIndices": { + "type": "keyword" + }, + "onboardingIndices": { + "type": "keyword" + }, + "sourcemapIndices": { + "type": "keyword" + }, + "spanIndices": { + "type": "keyword" + }, + "transactionIndices": { + "type": "keyword" + } + } + } + } + }, + "apm-telemetry": { + "properties": { + "agents": { + "properties": { + "dotnet": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "go": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "java": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "js-base": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "nodejs": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "python": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "ruby": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "rum-js": { + "properties": { + "agent": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "service": { + "properties": { + "framework": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "language": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "runtime": { + "properties": { + "composite": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + } + } + }, + "cardinality": { + "properties": { + "transaction": { + "properties": { + "name": { + "properties": { + "all_agents": { + "properties": { + "1d": { + "type": "long" + } + } + }, + "rum": { + "properties": { + "1d": { + "type": "long" + } + } + } + } + } + } + }, + "user_agent": { + "properties": { + "original": { + "properties": { + "all_agents": { + "properties": { + "1d": { + "type": "long" + } + } + }, + "rum": { + "properties": { + "1d": { + "type": "long" + } + } + } + } + } + } + } + } + }, + "counts": { + "properties": { + "agent_configuration": { + "properties": { + "all": { + "type": "long" + } + } + }, + "error": { + "properties": { + "1d": { + "type": "long" + }, + "all": { + "type": "long" + } + } + }, + "max_error_groups_per_service": { + "properties": { + "1d": { + "type": "long" + } + } + }, + "max_transaction_groups_per_service": { + "properties": { + "1d": { + "type": "long" + } + } + }, + "metric": { + "properties": { + "1d": { + "type": "long" + }, + "all": { + "type": "long" + } + } + }, + "onboarding": { + "properties": { + "1d": { + "type": "long" + }, + "all": { + "type": "long" + } + } + }, + "services": { + "properties": { + "1d": { + "type": "long" + } + } + }, + "sourcemap": { + "properties": { + "1d": { + "type": "long" + }, + "all": { + "type": "long" + } + } + }, + "span": { + "properties": { + "1d": { + "type": "long" + }, + "all": { + "type": "long" + } + } + }, + "traces": { + "properties": { + "1d": { + "type": "long" + } + } + }, + "transaction": { + "properties": { + "1d": { + "type": "long" + }, + "all": { + "type": "long" + } + } + } + } + }, + "has_any_services": { + "type": "boolean" + }, + "indices": { + "properties": { + "all": { + "properties": { + "total": { + "properties": { + "docs": { + "properties": { + "count": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + } + } + } + } + } + } + }, + "shards": { + "properties": { + "total": { + "type": "long" + } + } + } + } + }, + "integrations": { + "properties": { + "ml": { + "properties": { + "all_jobs_count": { + "type": "long" + } + } + } + } + }, + "retainment": { + "properties": { + "error": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "metric": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "onboarding": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "span": { + "properties": { + "ms": { + "type": "long" + } + } + }, + "transaction": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "services_per_agent": { + "properties": { + "dotnet": { + "null_value": 0, + "type": "long" + }, + "go": { + "null_value": 0, + "type": "long" + }, + "java": { + "null_value": 0, + "type": "long" + }, + "js-base": { + "null_value": 0, + "type": "long" + }, + "nodejs": { + "null_value": 0, + "type": "long" + }, + "python": { + "null_value": 0, + "type": "long" + }, + "ruby": { + "null_value": 0, + "type": "long" + }, + "rum-js": { + "null_value": 0, + "type": "long" + } + } + }, + "tasks": { + "properties": { + "agent_configuration": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "agents": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "cardinality": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "groupings": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "indices_stats": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "integrations": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "processor_events": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "services": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + }, + "versions": { + "properties": { + "took": { + "properties": { + "ms": { + "type": "long" + } + } + } + } + } + } + }, + "version": { + "properties": { + "apm_server": { + "properties": { + "major": { + "type": "long" + }, + "minor": { + "type": "long" + }, + "patch": { + "type": "long" + } + } + } + } + } + } + }, + "application_usage_totals": { + "properties": { + "appId": { + "type": "keyword" + }, + "minutesOnScreen": { + "type": "float" + }, + "numberOfClicks": { + "type": "long" + } + } + }, + "application_usage_transactional": { + "properties": { + "appId": { + "type": "keyword" + }, + "minutesOnScreen": { + "type": "float" + }, + "numberOfClicks": { + "type": "long" + }, + "timestamp": { + "type": "date" + } + } + }, + "canvas-element": { + "dynamic": "false", + "properties": { + "@created": { + "type": "date" + }, + "@timestamp": { + "type": "date" + }, + "content": { + "type": "text" + }, + "help": { + "type": "text" + }, + "image": { + "type": "text" + }, + "name": { + "fields": { + "keyword": { + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "canvas-workpad": { + "dynamic": "false", + "properties": { + "@created": { + "type": "date" + }, + "@timestamp": { + "type": "date" + }, + "name": { + "fields": { + "keyword": { + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "cases": { + "properties": { + "closed_at": { + "type": "date" + }, + "closed_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + }, + "connector_id": { + "type": "keyword" + }, + "created_at": { + "type": "date" + }, + "created_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + }, + "description": { + "type": "text" + }, + "external_service": { + "properties": { + "connector_id": { + "type": "keyword" + }, + "connector_name": { + "type": "keyword" + }, + "external_id": { + "type": "keyword" + }, + "external_title": { + "type": "text" + }, + "external_url": { + "type": "text" + }, + "pushed_at": { + "type": "date" + }, + "pushed_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + } + } + }, + "status": { + "type": "keyword" + }, + "tags": { + "type": "keyword" + }, + "title": { + "type": "keyword" + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + } + } + }, + "cases-comments": { + "properties": { + "comment": { + "type": "text" + }, + "created_at": { + "type": "date" + }, + "created_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + }, + "pushed_at": { + "type": "date" + }, + "pushed_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + } + } + }, + "cases-configure": { + "properties": { + "closure_type": { + "type": "keyword" + }, + "connector_id": { + "type": "keyword" + }, + "connector_name": { + "type": "keyword" + }, + "created_at": { + "type": "date" + }, + "created_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + } + } + }, + "cases-user-actions": { + "properties": { + "action": { + "type": "keyword" + }, + "action_at": { + "type": "date" + }, + "action_by": { + "properties": { + "email": { + "type": "keyword" + }, + "full_name": { + "type": "keyword" + }, + "username": { + "type": "keyword" + } + } + }, + "action_field": { + "type": "keyword" + }, + "new_value": { + "type": "text" + }, + "old_value": { + "type": "text" + } + } + }, + "config": { + "dynamic": "true", + "properties": { + "buildNum": { + "type": "keyword" + }, + "defaultIndex": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "dashboard": { + "properties": { + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "optionsJSON": { + "type": "text" + }, + "panelsJSON": { + "type": "text" + }, + "refreshInterval": { + "properties": { + "display": { + "type": "keyword" + }, + "pause": { + "type": "boolean" + }, + "section": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "timeFrom": { + "type": "keyword" + }, + "timeRestore": { + "type": "boolean" + }, + "timeTo": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "file-upload-telemetry": { + "properties": { + "filesUploadedTotalCount": { + "type": "long" + } + } + }, + "graph-workspace": { + "properties": { + "description": { + "type": "text" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "numLinks": { + "type": "integer" + }, + "numVertices": { + "type": "integer" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + }, + "wsState": { + "type": "text" + } + } + }, + "index-pattern": { + "properties": { + "fieldFormatMap": { + "type": "text" + }, + "fields": { + "type": "text" + }, + "intervalName": { + "type": "keyword" + }, + "notExpandable": { + "type": "boolean" + }, + "sourceFilters": { + "type": "text" + }, + "timeFieldName": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "type": { + "type": "keyword" + }, + "typeMeta": { + "type": "keyword" + } + } + }, + "infrastructure-ui-source": { + "properties": { + "description": { + "type": "text" + }, + "fields": { + "properties": { + "container": { + "type": "keyword" + }, + "host": { + "type": "keyword" + }, + "pod": { + "type": "keyword" + }, + "tiebreaker": { + "type": "keyword" + }, + "timestamp": { + "type": "keyword" + } + } + }, + "logAlias": { + "type": "keyword" + }, + "logColumns": { + "properties": { + "fieldColumn": { + "properties": { + "field": { + "type": "keyword" + }, + "id": { + "type": "keyword" + } + } + }, + "messageColumn": { + "properties": { + "id": { + "type": "keyword" + } + } + }, + "timestampColumn": { + "properties": { + "id": { + "type": "keyword" + } + } + } + }, + "type": "nested" + }, + "metricAlias": { + "type": "keyword" + }, + "name": { + "type": "text" + } + } + }, + "inventory-view": { + "properties": { + "accountId": { + "type": "keyword" + }, + "autoBounds": { + "type": "boolean" + }, + "autoReload": { + "type": "boolean" + }, + "boundsOverride": { + "properties": { + "max": { + "type": "integer" + }, + "min": { + "type": "integer" + } + } + }, + "customMetrics": { + "properties": { + "aggregation": { + "type": "keyword" + }, + "field": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "label": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "customOptions": { + "properties": { + "field": { + "type": "keyword" + }, + "text": { + "type": "keyword" + } + }, + "type": "nested" + }, + "filterQuery": { + "properties": { + "expression": { + "type": "keyword" + }, + "kind": { + "type": "keyword" + } + } + }, + "groupBy": { + "properties": { + "field": { + "type": "keyword" + }, + "label": { + "type": "keyword" + } + }, + "type": "nested" + }, + "legend": { + "properties": { + "palette": { + "type": "keyword" + }, + "reverseColors": { + "type": "boolean" + }, + "steps": { + "type": "long" + } + } + }, + "metric": { + "properties": { + "aggregation": { + "type": "keyword" + }, + "field": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "label": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "name": { + "type": "keyword" + }, + "nodeType": { + "type": "keyword" + }, + "region": { + "type": "keyword" + }, + "sort": { + "properties": { + "by": { + "type": "keyword" + }, + "direction": { + "type": "keyword" + } + } + }, + "time": { + "type": "long" + }, + "view": { + "type": "keyword" + } + } + }, + "kql-telemetry": { + "properties": { + "optInCount": { + "type": "long" + }, + "optOutCount": { + "type": "long" + } + } + }, + "lens": { + "properties": { + "expression": { + "index": false, + "type": "keyword" + }, + "state": { + "type": "flattened" + }, + "title": { + "type": "text" + }, + "visualizationType": { + "type": "keyword" + } + } + }, + "lens-ui-telemetry": { + "properties": { + "count": { + "type": "integer" + }, + "date": { + "type": "date" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "map": { + "properties": { + "bounds": { + "type": "geo_shape" + }, + "description": { + "type": "text" + }, + "layerListJSON": { + "type": "text" + }, + "mapStateJSON": { + "type": "text" + }, + "title": { + "type": "text" + }, + "uiStateJSON": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "maps-telemetry": { + "properties": { + "attributesPerMap": { + "properties": { + "dataSourcesCount": { + "properties": { + "avg": { + "type": "long" + }, + "max": { + "type": "long" + }, + "min": { + "type": "long" + } + } + }, + "emsVectorLayersCount": { + "dynamic": "true", + "type": "object" + }, + "layerTypesCount": { + "dynamic": "true", + "type": "object" + }, + "layersCount": { + "properties": { + "avg": { + "type": "long" + }, + "max": { + "type": "long" + }, + "min": { + "type": "long" + } + } + } + } + }, + "indexPatternsWithGeoFieldCount": { + "type": "long" + }, + "indexPatternsWithGeoPointFieldCount": { + "type": "long" + }, + "indexPatternsWithGeoShapeFieldCount": { + "type": "long" + }, + "mapsTotalCount": { + "type": "long" + }, + "settings": { + "properties": { + "showMapVisualizationTypes": { + "type": "boolean" + } + } + }, + "timeCaptured": { + "type": "date" + } + } + }, + "metrics-explorer-view": { + "properties": { + "chartOptions": { + "properties": { + "stack": { + "type": "boolean" + }, + "type": { + "type": "keyword" + }, + "yAxisMode": { + "type": "keyword" + } + } + }, + "currentTimerange": { + "properties": { + "from": { + "type": "keyword" + }, + "interval": { + "type": "keyword" + }, + "to": { + "type": "keyword" + } + } + }, + "name": { + "type": "keyword" + }, + "options": { + "properties": { + "aggregation": { + "type": "keyword" + }, + "filterQuery": { + "type": "keyword" + }, + "forceInterval": { + "type": "boolean" + }, + "groupBy": { + "type": "keyword" + }, + "limit": { + "type": "integer" + }, + "metrics": { + "properties": { + "aggregation": { + "type": "keyword" + }, + "color": { + "type": "keyword" + }, + "field": { + "type": "keyword" + }, + "label": { + "type": "keyword" + } + }, + "type": "nested" + } + } + } + } + }, + "migrationVersion": { + "dynamic": "true", + "properties": { + "index-pattern": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + }, + "space": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "ml-telemetry": { + "properties": { + "file_data_visualizer": { + "properties": { + "index_creation_count": { + "type": "long" + } + } + } + } + }, + "namespace": { + "type": "keyword" + }, + "namespaces": { + "type": "keyword" + }, + "query": { + "properties": { + "description": { + "type": "text" + }, + "filters": { + "enabled": false, + "type": "object" + }, + "query": { + "properties": { + "language": { + "type": "keyword" + }, + "query": { + "index": false, + "type": "keyword" + } + } + }, + "timefilter": { + "enabled": false, + "type": "object" + }, + "title": { + "type": "text" + } + } + }, + "references": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + }, + "type": "nested" + }, + "sample-data-telemetry": { + "properties": { + "installCount": { + "type": "long" + }, + "unInstallCount": { + "type": "long" + } + } + }, + "search": { + "properties": { + "columns": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "sort": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "space": { + "properties": { + "_reserved": { + "type": "boolean" + }, + "color": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "disabledFeatures": { + "type": "keyword" + }, + "imageUrl": { + "index": false, + "type": "text" + }, + "initials": { + "type": "keyword" + }, + "name": { + "fields": { + "keyword": { + "ignore_above": 2048, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "telemetry": { + "properties": { + "allowChangingOptInStatus": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "lastReported": { + "type": "date" + }, + "lastVersionChecked": { + "type": "keyword" + }, + "reportFailureCount": { + "type": "integer" + }, + "reportFailureVersion": { + "type": "keyword" + }, + "sendUsageFrom": { + "type": "keyword" + }, + "userHasSeenNotice": { + "type": "boolean" + } + } + }, + "timelion-sheet": { + "properties": { + "description": { + "type": "text" + }, + "hits": { + "type": "integer" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "timelion_chart_height": { + "type": "integer" + }, + "timelion_columns": { + "type": "integer" + }, + "timelion_interval": { + "type": "keyword" + }, + "timelion_other_interval": { + "type": "keyword" + }, + "timelion_rows": { + "type": "integer" + }, + "timelion_sheet": { + "type": "text" + }, + "title": { + "type": "text" + }, + "version": { + "type": "integer" + } + } + }, + "tsvb-validation-telemetry": { + "properties": { + "failedRequests": { + "type": "long" + } + } + }, + "type": { + "type": "keyword" + }, + "ui-metric": { + "properties": { + "count": { + "type": "integer" + } + } + }, + "updated_at": { + "type": "date" + }, + "upgrade-assistant-reindex-operation": { + "properties": { + "errorMessage": { + "type": "keyword" + }, + "indexName": { + "type": "keyword" + }, + "lastCompletedStep": { + "type": "integer" + }, + "locked": { + "type": "date" + }, + "newIndexName": { + "type": "keyword" + }, + "reindexOptions": { + "properties": { + "openAndClose": { + "type": "boolean" + }, + "queueSettings": { + "properties": { + "queuedAt": { + "type": "long" + }, + "startedAt": { + "type": "long" + } + } + } + } + }, + "reindexTaskId": { + "type": "keyword" + }, + "reindexTaskPercComplete": { + "type": "float" + }, + "runningReindexCount": { + "type": "integer" + }, + "status": { + "type": "integer" + } + } + }, + "upgrade-assistant-telemetry": { + "properties": { + "features": { + "properties": { + "deprecation_logging": { + "properties": { + "enabled": { + "null_value": true, + "type": "boolean" + } + } + } + } + }, + "ui_open": { + "properties": { + "cluster": { + "null_value": 0, + "type": "long" + }, + "indices": { + "null_value": 0, + "type": "long" + }, + "overview": { + "null_value": 0, + "type": "long" + } + } + }, + "ui_reindex": { + "properties": { + "close": { + "null_value": 0, + "type": "long" + }, + "open": { + "null_value": 0, + "type": "long" + }, + "start": { + "null_value": 0, + "type": "long" + }, + "stop": { + "null_value": 0, + "type": "long" + } + } + } + } + }, + "uptime-dynamic-settings": { + "properties": { + "certAgeThreshold": { + "type": "long" + }, + "certExpirationThreshold": { + "type": "long" + }, + "heartbeatIndices": { + "type": "keyword" + } + } + }, + "url": { + "properties": { + "accessCount": { + "type": "long" + }, + "accessDate": { + "type": "date" + }, + "createDate": { + "type": "date" + }, + "url": { + "fields": { + "keyword": { + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "visualization": { + "properties": { + "description": { + "type": "text" + }, + "kibanaSavedObjectMeta": { + "properties": { + "searchSourceJSON": { + "type": "text" + } + } + }, + "savedSearchRefName": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "uiStateJSON": { + "type": "text" + }, + "version": { + "type": "integer" + }, + "visState": { + "type": "text" + } + } + } + } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1" + } + } + } +} + +{ + "type": "index", + "value": { + "aliases": { + }, + "index": "test", + "mappings": { + "properties": { + "foo": { + "fields": { + "keyword": { + "ignore_above": 256, + "type": "keyword" + } + }, + "type": "text" + } + } + }, + "settings": { + "index": { + "number_of_replicas": "1", + "number_of_shards": "1" + } + } + } +} \ No newline at end of file diff --git a/x-pack/test/page_load_metrics/runner.ts b/x-pack/test/page_load_metrics/runner.ts new file mode 100644 index 0000000000000..05f293730f843 --- /dev/null +++ b/x-pack/test/page_load_metrics/runner.ts @@ -0,0 +1,33 @@ +/* + * 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 { CiStatsReporter } from '@kbn/dev-utils'; +import { capturePageLoadMetrics } from '@kbn/test'; +// @ts-ignore not TS yet +import getUrl from '../../../src/test_utils/get_url'; + +import { FtrProviderContext } from './../functional/ftr_provider_context'; + +export async function PuppeteerTestRunner({ getService }: FtrProviderContext) { + const log = getService('log'); + const config = getService('config'); + const esArchiver = getService('esArchiver'); + + await esArchiver.load('default'); + const metrics = await capturePageLoadMetrics(log, { + headless: true, + appConfig: { + url: getUrl.baseUrl(config.get('servers.kibana')), + username: config.get('servers.kibana.username'), + password: config.get('servers.kibana.password'), + }, + screenshotsDir: config.get('screenshots.directory'), + }); + const reporter = CiStatsReporter.fromEnv(log); + + log.debug('Report page load asset size'); + await reporter.metrics(metrics); +} diff --git a/x-pack/test/pki_api_integration/config.ts b/x-pack/test/pki_api_integration/config.ts index e67ab0c6197f6..5ce3111530dd9 100644 --- a/x-pack/test/pki_api_integration/config.ts +++ b/x-pack/test/pki_api_integration/config.ts @@ -10,7 +10,7 @@ import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; import { services } from './services'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); const servers = { ...xPackAPITestsConfig.get('servers'), diff --git a/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts index 5c8fac9586e3a..e16d55f8fad2c 100644 --- a/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts +++ b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts @@ -27,7 +27,14 @@ export default function ({ getService }: FtrProviderContext) { const response = await supertest.get('/api/licensing/feature_usage').expect(200); - expect(response.body).to.eql({ + const testFeaturesResponse = { + ...response.body, + features: response.body.features.filter((feature: { name: string }) => + feature.name.startsWith('Test feature ') + ), + }; + + expect(testFeaturesResponse).to.eql({ features: [ { last_used: null, diff --git a/x-pack/test/plugin_functional/config.ts b/x-pack/test/plugin_functional/config.ts index bc9569968bf16..9a0519960f850 100644 --- a/x-pack/test/plugin_functional/config.ts +++ b/x-pack/test/plugin_functional/config.ts @@ -5,6 +5,7 @@ */ import { resolve } from 'path'; import fs from 'fs'; +import { KIBANA_ROOT } from '@kbn/test'; import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; import { pageObjects } from './page_objects'; @@ -26,7 +27,10 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { return { // list paths to the files that contain your plugins tests - testFiles: [resolve(__dirname, './test_suites/resolver')], + testFiles: [ + resolve(__dirname, './test_suites/resolver'), + resolve(__dirname, './test_suites/global_search'), + ], services, pageObjects, @@ -40,6 +44,10 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { serverArgs: [ ...xpackFunctionalConfig.get('kbnTestServer.serverArgs'), ...plugins.map((pluginDir) => `--plugin-path=${resolve(__dirname, 'plugins', pluginDir)}`), + `--plugin-path=${resolve( + KIBANA_ROOT, + 'test/plugin_functional/plugins/core_provider_plugin' + )}`, // Required to load new platform plugins via `--plugin-path` flag. '--env.name=development', ], diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/common/utils.ts b/x-pack/test/plugin_functional/plugins/global_search_test/common/utils.ts new file mode 100644 index 0000000000000..c1be54ac49153 --- /dev/null +++ b/x-pack/test/plugin_functional/plugins/global_search_test/common/utils.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { GlobalSearchProviderResult } from '../../../../../plugins/global_search/common/types'; + +export const createResult = ( + parts: Partial +): GlobalSearchProviderResult => ({ + id: 'test', + title: 'test result', + type: 'test_type', + url: '/some-url', + score: 100, + ...parts, +}); diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/kibana.json b/x-pack/test/plugin_functional/plugins/global_search_test/kibana.json new file mode 100644 index 0000000000000..934c6cce63387 --- /dev/null +++ b/x-pack/test/plugin_functional/plugins/global_search_test/kibana.json @@ -0,0 +1,9 @@ +{ + "id": "globalSearchTest", + "version": "1.0.0", + "kibanaVersion": "kibana", + "configPath": ["xpack", "global_search_test"], + "requiredPlugins": ["globalSearch"], + "server": true, + "ui": true +} diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts b/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts new file mode 100644 index 0000000000000..ff2783f4fd4fa --- /dev/null +++ b/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { PluginInitializer } from 'src/core/public'; +import { + GlobalSearchTestPlugin, + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps, +} from './plugin'; + +export const plugin: PluginInitializer< + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps +> = () => new GlobalSearchTestPlugin(); + +export { + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps, +} from './plugin'; diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/public/plugin.ts b/x-pack/test/plugin_functional/plugins/global_search_test/public/plugin.ts new file mode 100644 index 0000000000000..27434202d77f1 --- /dev/null +++ b/x-pack/test/plugin_functional/plugins/global_search_test/public/plugin.ts @@ -0,0 +1,89 @@ +/* + * 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 { of } from 'rxjs'; +import { map, reduce } from 'rxjs/operators'; +import { Plugin, CoreSetup, CoreStart, AppMountParameters } from 'kibana/public'; +import { + GlobalSearchPluginSetup, + GlobalSearchPluginStart, + GlobalSearchResult, +} from '../../../../../plugins/global_search/public'; +import { createResult } from '../common/utils'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface GlobalSearchTestPluginSetup {} +export interface GlobalSearchTestPluginStart { + findAll: (term: string) => Promise; +} + +export interface GlobalSearchTestPluginSetupDeps { + globalSearch: GlobalSearchPluginSetup; +} +export interface GlobalSearchTestPluginStartDeps { + globalSearch: GlobalSearchPluginStart; +} + +export class GlobalSearchTestPlugin + implements + Plugin< + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps + > { + public setup( + { application, getStartServices }: CoreSetup, + { globalSearch }: GlobalSearchTestPluginSetupDeps + ) { + application.register({ + id: 'globalSearchTestApp', + title: 'GlobalSearch test', + mount: (params: AppMountParameters) => { + return () => undefined; + }, + }); + + globalSearch.registerResultProvider({ + id: 'gs_test_client', + find: (term, options) => { + if (term.includes('client')) { + return of([ + createResult({ + id: 'client1', + type: 'test_client_type', + }), + createResult({ + id: 'client2', + type: 'test_client_type', + }), + ]); + } + return of([]); + }, + }); + + return {}; + } + + public start( + {}: CoreStart, + { globalSearch }: GlobalSearchTestPluginStartDeps + ): GlobalSearchTestPluginStart { + return { + findAll: (term) => + globalSearch + .find(term, {}) + .pipe( + map((batch) => batch.results), + // restrict to test type to avoid failure when real providers are present + map((results) => results.filter((r) => r.type.startsWith('test_'))), + reduce((memo, results) => [...memo, ...results]) + ) + .toPromise(), + }; + } +} diff --git a/x-pack/plugins/siem/public/common/components/empty_value/translations.ts b/x-pack/test/plugin_functional/plugins/global_search_test/public/types.ts similarity index 59% rename from x-pack/plugins/siem/public/common/components/empty_value/translations.ts rename to x-pack/test/plugin_functional/plugins/global_search_test/public/types.ts index 985cb1ef1a1f5..02969e97b6c8a 100644 --- a/x-pack/plugins/siem/public/common/components/empty_value/translations.ts +++ b/x-pack/test/plugin_functional/plugins/global_search_test/public/types.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { i18n } from '@kbn/i18n'; +import { GlobalSearchTestPluginStart } from './plugin'; -export const EMPTY_STRING = i18n.translate('xpack.siem.emptyString.emptyStringDescription', { - defaultMessage: 'Empty String', -}); +export type GlobalSearchTestApi = GlobalSearchTestPluginStart; diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/server/index.ts b/x-pack/test/plugin_functional/plugins/global_search_test/server/index.ts new file mode 100644 index 0000000000000..7f9cdf423718b --- /dev/null +++ b/x-pack/test/plugin_functional/plugins/global_search_test/server/index.ts @@ -0,0 +1,21 @@ +/* + * 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 { PluginInitializer } from 'src/core/server'; +import { + GlobalSearchTestPlugin, + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps, +} from './plugin'; + +export const plugin: PluginInitializer< + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps +> = () => new GlobalSearchTestPlugin(); diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/server/plugin.ts b/x-pack/test/plugin_functional/plugins/global_search_test/server/plugin.ts new file mode 100644 index 0000000000000..d8ad94ab74207 --- /dev/null +++ b/x-pack/test/plugin_functional/plugins/global_search_test/server/plugin.ts @@ -0,0 +1,61 @@ +/* + * 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 { of } from 'rxjs'; +import { Plugin, CoreSetup, CoreStart } from 'kibana/server'; +import { + GlobalSearchPluginSetup, + GlobalSearchPluginStart, +} from '../../../../../plugins/global_search/server'; +import { createResult } from '../common/utils'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface GlobalSearchTestPluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface GlobalSearchTestPluginStart {} + +export interface GlobalSearchTestPluginSetupDeps { + globalSearch: GlobalSearchPluginSetup; +} +export interface GlobalSearchTestPluginStartDeps { + globalSearch: GlobalSearchPluginStart; +} + +export class GlobalSearchTestPlugin + implements + Plugin< + GlobalSearchTestPluginSetup, + GlobalSearchTestPluginStart, + GlobalSearchTestPluginSetupDeps, + GlobalSearchTestPluginStartDeps + > { + public setup(core: CoreSetup, { globalSearch }: GlobalSearchTestPluginSetupDeps) { + globalSearch.registerResultProvider({ + id: 'gs_test_server', + find: (term, options, context) => { + if (term.includes('server')) { + return of([ + createResult({ + id: 'server1', + type: 'test_server_type', + }), + createResult({ + id: 'server2', + type: 'test_server_type', + }), + ]); + } + return of([]); + }, + }); + + return {}; + } + + public start(core: CoreStart) { + return {}; + } +} diff --git a/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts b/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts new file mode 100644 index 0000000000000..4cc056fd51c2a --- /dev/null +++ b/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts @@ -0,0 +1,51 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { GlobalSearchResult } from '../../../../plugins/global_search/common/types'; +import { GlobalSearchTestApi } from '../../plugins/global_search_test/public/types'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const pageObjects = getPageObjects(['common']); + const browser = getService('browser'); + + const findResultsWithAPI = async (t: string): Promise => { + return browser.executeAsync(async (term: string, cb: Function) => { + const { start } = window.__coreProvider; + const globalSearchTestApi: GlobalSearchTestApi = start.plugins.globalSearchTest; + globalSearchTestApi.findAll(term).then((results) => { + cb(results); + }); + }, t) as any; // executeAsync signature is broken. return type should be inferred from the cb param. + }; + + describe('GlobalSearch API', function () { + beforeEach(async function () { + await pageObjects.common.navigateToApp('globalSearchTestApp'); + }); + + it('return no results when no provider return results', async () => { + const results = await findResultsWithAPI('no_match'); + expect(results.length).to.be(0); + }); + it('return results from the client provider', async () => { + const results = await findResultsWithAPI('client'); + expect(results.length).to.be(2); + expect(results.map((r) => r.id)).to.eql(['client1', 'client2']); + }); + it('return results from the server provider', async () => { + const results = await findResultsWithAPI('server'); + expect(results.length).to.be(2); + expect(results.map((r) => r.id)).to.eql(['server1', 'server2']); + }); + it('return mixed results from both client and server providers', async () => { + const results = await findResultsWithAPI('server+client'); + expect(results.length).to.be(4); + expect(results.map((r) => r.id)).to.eql(['client1', 'client2', 'server1', 'server2']); + }); + }); +} diff --git a/x-pack/test/plugin_functional/test_suites/global_search/index.ts b/x-pack/test/plugin_functional/test_suites/global_search/index.ts new file mode 100644 index 0000000000000..1e5a765612f45 --- /dev/null +++ b/x-pack/test/plugin_functional/test_suites/global_search/index.ts @@ -0,0 +1,14 @@ +/* + * 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('GlobalSearch API', function () { + this.tags('ciGroup7'); + loadTestFile(require.resolve('./global_search_api')); + }); +} diff --git a/x-pack/test/saml_api_integration/config.ts b/x-pack/test/saml_api_integration/config.ts index d2aef5561dd11..1bc85a803a7c2 100644 --- a/x-pack/test/saml_api_integration/config.ts +++ b/x-pack/test/saml_api_integration/config.ts @@ -11,7 +11,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const kibanaAPITestsConfig = await readConfigFile( require.resolve('../../../test/api_integration/config.js') ); - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); const kibanaPort = xPackAPITestsConfig.get('servers.kibana.port'); const idpPath = resolve(__dirname, '../../test/saml_api_integration/fixtures/idp_metadata.xml'); diff --git a/x-pack/test/saved_object_api_integration/common/config.ts b/x-pack/test/saved_object_api_integration/common/config.ts index fc04a9774e023..378f27082d9e0 100644 --- a/x-pack/test/saved_object_api_integration/common/config.ts +++ b/x-pack/test/saved_object_api_integration/common/config.ts @@ -24,7 +24,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) functional: await readConfigFile(require.resolve('../../../../test/functional/config.js')), }, xpack: { - api: await readConfigFile(require.resolve('../../api_integration/config.js')), + api: await readConfigFile(require.resolve('../../api_integration/config.ts')), }, }; diff --git a/x-pack/test/siem_cypress/config.ts b/x-pack/test/security_solution_cypress/config.ts similarity index 100% rename from x-pack/test/siem_cypress/config.ts rename to x-pack/test/security_solution_cypress/config.ts diff --git a/x-pack/test/siem_cypress/es_archives/alerts/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/alerts/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/alerts/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/alerts/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/alerts/mappings.json b/x-pack/test/security_solution_cypress/es_archives/alerts/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/alerts/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/alerts/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/auditbeat/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/auditbeat/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/auditbeat/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/auditbeat/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/auditbeat/mappings.json b/x-pack/test/security_solution_cypress/es_archives/auditbeat/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/auditbeat/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/auditbeat/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/closed_alerts/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/closed_alerts/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/closed_alerts/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/closed_alerts/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/closed_alerts/mappings.json b/x-pack/test/security_solution_cypress/es_archives/closed_alerts/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/closed_alerts/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/closed_alerts/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/custom_rule_with_timeline/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/custom_rule_with_timeline/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/custom_rule_with_timeline/mappings.json b/x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/custom_rule_with_timeline/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/custom_rules/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/custom_rules/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/custom_rules/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/custom_rules/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/custom_rules/mappings.json b/x-pack/test/security_solution_cypress/es_archives/custom_rules/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/custom_rules/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/custom_rules/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/empty_kibana/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/empty_kibana/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/empty_kibana/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/empty_kibana/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/empty_kibana/mappings.json b/x-pack/test/security_solution_cypress/es_archives/empty_kibana/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/empty_kibana/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/empty_kibana/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/prebuilt_rules_loaded/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/prebuilt_rules_loaded/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/prebuilt_rules_loaded/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/prebuilt_rules_loaded/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/prebuilt_rules_loaded/mappings.json b/x-pack/test/security_solution_cypress/es_archives/prebuilt_rules_loaded/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/prebuilt_rules_loaded/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/prebuilt_rules_loaded/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/timeline/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/timeline/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/timeline/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/timeline/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/timeline/mappings.json b/x-pack/test/security_solution_cypress/es_archives/timeline/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/timeline/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/timeline/mappings.json diff --git a/x-pack/test/siem_cypress/es_archives/timeline_alerts/data.json.gz b/x-pack/test/security_solution_cypress/es_archives/timeline_alerts/data.json.gz similarity index 100% rename from x-pack/test/siem_cypress/es_archives/timeline_alerts/data.json.gz rename to x-pack/test/security_solution_cypress/es_archives/timeline_alerts/data.json.gz diff --git a/x-pack/test/siem_cypress/es_archives/timeline_alerts/mappings.json b/x-pack/test/security_solution_cypress/es_archives/timeline_alerts/mappings.json similarity index 100% rename from x-pack/test/siem_cypress/es_archives/timeline_alerts/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/timeline_alerts/mappings.json diff --git a/x-pack/test/siem_cypress/ftr_provider_context.d.ts b/x-pack/test/security_solution_cypress/ftr_provider_context.d.ts similarity index 100% rename from x-pack/test/siem_cypress/ftr_provider_context.d.ts rename to x-pack/test/security_solution_cypress/ftr_provider_context.d.ts diff --git a/x-pack/test/siem_cypress/runner.ts b/x-pack/test/security_solution_cypress/runner.ts similarity index 94% rename from x-pack/test/siem_cypress/runner.ts rename to x-pack/test/security_solution_cypress/runner.ts index b0197806b5ab6..e3bea8b9bbbcf 100644 --- a/x-pack/test/siem_cypress/runner.ts +++ b/x-pack/test/security_solution_cypress/runner.ts @@ -23,7 +23,7 @@ export async function SiemCypressTestRunner({ getService }: FtrProviderContext) await procs.run('cypress', { cmd: 'yarn', args: ['cypress:run'], - cwd: resolve(__dirname, '../../plugins/siem'), + cwd: resolve(__dirname, '../../plugins/security_solution'), env: { FORCE_COLOR: '1', CYPRESS_baseUrl: Url.format(config.get('servers.kibana')), diff --git a/x-pack/test/siem_cypress/services.ts b/x-pack/test/security_solution_cypress/services.ts similarity index 100% rename from x-pack/test/siem_cypress/services.ts rename to x-pack/test/security_solution_cypress/services.ts diff --git a/x-pack/test/spaces_api_integration/common/config.ts b/x-pack/test/spaces_api_integration/common/config.ts index 27dc67b92b4e2..89a49c7d3d4fa 100644 --- a/x-pack/test/spaces_api_integration/common/config.ts +++ b/x-pack/test/spaces_api_integration/common/config.ts @@ -25,7 +25,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) functional: await readConfigFile(require.resolve('../../../../test/functional/config.js')), }, xpack: { - api: await readConfigFile(require.resolve('../../api_integration/config.js')), + api: await readConfigFile(require.resolve('../../api_integration/config.ts')), }, }; diff --git a/x-pack/test/token_api_integration/config.js b/x-pack/test/token_api_integration/config.js index efb2813b489bb..31ec2f1bc6bfb 100644 --- a/x-pack/test/token_api_integration/config.js +++ b/x-pack/test/token_api_integration/config.js @@ -5,7 +5,7 @@ */ export default async function ({ readConfigFile }) { - const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); return { testFiles: [require.resolve('./auth')], diff --git a/x-pack/test_utils/jest/config.js b/x-pack/test_utils/jest/config.js index 66b88cbdeba17..deee585b91fe4 100644 --- a/x-pack/test_utils/jest/config.js +++ b/x-pack/test_utils/jest/config.js @@ -9,6 +9,7 @@ import { RESERVED_DIR_JEST_INTEGRATION_TESTS } from '../../../src/dev/constants' export default { rootDir: '../../', roots: [ + '/plugins', '/legacy/plugins', '/legacy/server', '/legacy/common', diff --git a/x-pack/test_utils/stub_web_worker.ts b/x-pack/test_utils/stub_web_worker.ts index 2e7d5cf2098c8..10d0ee6517384 100644 --- a/x-pack/test_utils/stub_web_worker.ts +++ b/x-pack/test_utils/stub_web_worker.ts @@ -4,13 +4,20 @@ * you may not use this file except in compliance with the Elastic License. */ -if (!window.Worker) { - // @ts-ignore we aren't honoring the real Worker spec here - window.Worker = function Worker() { - this.postMessage = jest.fn(); +function stubWebWorker() { + if (!window.Worker) { + // @ts-ignore we aren't honoring the real Worker spec here + window.Worker = function Worker() { + this.postMessage = jest.fn(); - // @ts-ignore TypeScript doesn't think this exists on the Worker interface - // https://developer.mozilla.org/en-US/docs/Web/API/Worker/terminate - this.terminate = jest.fn(); - }; + // @ts-ignore TypeScript doesn't think this exists on the Worker interface + // https://developer.mozilla.org/en-US/docs/Web/API/Worker/terminate + this.terminate = jest.fn(); + }; + } } + +stubWebWorker(); + +// Add an export to avoid TS complaining "stub_web_worker.ts" is not a module. +export { stubWebWorker }; diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index f5da24fc74d13..e0bf3b8f16946 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -12,7 +12,7 @@ ], "exclude": [ "test/**/*", - "plugins/siem/cypress/**/*", + "plugins/security_solution/cypress/**/*", "plugins/apm/e2e/cypress/**/*", "**/typespec_tests.ts" ], @@ -27,9 +27,6 @@ "plugins/xpack_main/*": [ "x-pack/legacy/plugins/xpack_main/public/*" ], - "plugins/security/*": [ - "x-pack/legacy/plugins/security/public/*" - ], "plugins/spaces/*": [ "x-pack/legacy/plugins/spaces/public/*" ], diff --git a/x-pack/typings/hapi.d.ts b/x-pack/typings/hapi.d.ts index 6af723101fc22..253b639a52ff2 100644 --- a/x-pack/typings/hapi.d.ts +++ b/x-pack/typings/hapi.d.ts @@ -7,7 +7,6 @@ import 'hapi'; import { XPackMainPlugin } from '../legacy/plugins/xpack_main/server/xpack_main'; -import { SecurityPlugin } from '../legacy/plugins/security'; import { ActionsPlugin, ActionsClient } from '../plugins/actions/server'; import { AlertingPlugin, AlertsClient } from '../plugins/alerts/server'; import { TaskManager } from '../plugins/task_manager/server'; @@ -19,7 +18,6 @@ declare module 'hapi' { } interface PluginProperties { xpack_main: XPackMainPlugin; - security?: SecurityPlugin; actions?: ActionsPlugin; alerts?: AlertingPlugin; task_manager?: TaskManager; diff --git a/yarn.lock b/yarn.lock index 892fa1b5aa567..678ddfb052cd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4630,6 +4630,13 @@ dependencies: "@types/node" "*" +"@types/puppeteer@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-3.0.0.tgz#24cdcc131e319477608d893f0017e08befd70423" + integrity sha512-59+fkfHHXHzX5rgoXIMnZyzum7ZLx/Wc3fhsOduFThpTpKbzzdBHMZsrkKGLunimB4Ds/tI5lXTRLALK8Mmnhg== + dependencies: + "@types/node" "*" + "@types/q@^1.5.1": version "1.5.2" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" @@ -7695,6 +7702,15 @@ bl@^3.0.0: dependencies: readable-stream "^3.0.1" +bl@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a" + integrity sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blob@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" @@ -8208,6 +8224,14 @@ buffer@^5.1.0, buffer@^5.2.0: base64-js "^1.0.2" ieee754 "^1.1.4" +buffer@^5.2.1, buffer@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -12707,10 +12731,10 @@ eslint-plugin-prettier@^3.1.3: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-react-hooks@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a" - integrity sha512-gLKCa52G4ee7uXzdLiorca7JIQZPPXRAQDXV83J4bUEeUuc5pIEyZYAZ45Xnxe5IuupxEqHS+hUhSLIimK1EMw== +eslint-plugin-react-hooks@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.4.tgz#aed33b4254a41b045818cacb047b81e6df27fa58" + integrity sha512-equAdEIsUETLFNCmmCkiCGq6rkSK5MoJhXFPFYeUebcjKgBmWWcgVOqZyQC8Bv1BwVCnTq9tBxgJFgAJTWoJtA== eslint-plugin-react-perf@^3.2.3: version "3.2.3" @@ -16676,7 +16700,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -20841,6 +20865,11 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" +mkdirp-classic@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mkdirp@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -23967,6 +23996,22 @@ puppeteer@^2.0.0: rimraf "^2.6.1" ws "^6.1.0" +puppeteer@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.3.0.tgz#95839af9fdc0aa4de7e5ee073a4c0adeb9e2d3d7" + integrity sha512-23zNqRltZ1PPoK28uRefWJ/zKb5Jhnzbbwbpcna2o5+QMn17F0khq5s1bdH3vPlyj+J36pubccR8wiNA/VE0Vw== + dependencies: + debug "^4.1.0" + extract-zip "^2.0.0" + https-proxy-agent "^4.0.0" + mime "^2.0.3" + progress "^2.0.1" + proxy-from-env "^1.0.0" + rimraf "^3.0.2" + tar-fs "^2.0.0" + unbzip2-stream "^1.3.3" + ws "^7.2.3" + q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -26302,6 +26347,13 @@ rimraf@^2.5.4, rimraf@^2.7.1: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rimraf@~2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.0.3.tgz#f50a2965e7144e9afd998982f15df706730f56a9" @@ -28654,6 +28706,16 @@ tar-fs@^1.16.3: pump "^1.0.0" tar-stream "^1.1.2" +tar-fs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" + integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.0.0" + tar-stream@^1.1.2, tar-stream@^1.5.2: version "1.5.5" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.5.tgz#5cad84779f45c83b1f2508d96b09d88c7218af55" @@ -28664,6 +28726,17 @@ tar-stream@^1.1.2, tar-stream@^1.5.2: readable-stream "^2.0.0" xtend "^4.0.0" +tar-stream@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" + integrity sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== + dependencies: + bl "^4.0.1" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar-stream@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.0.tgz#d1aaa3661f05b38b5acc9b7020efdca5179a2cc3" @@ -28962,7 +29035,7 @@ through2@~2.0.3: readable-stream "~2.3.6" xtend "~4.0.1" -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3.4, through@~2.3.6, through@~2.3.8: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.6, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -30151,6 +30224,14 @@ unbzip2-stream@^1.0.9: buffer "^3.0.1" through "^2.3.6" +unbzip2-stream@^1.3.3: + version "1.4.2" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.2.tgz#84eb9e783b186d8fb397515fbb656f312f1a7dbf" + integrity sha512-pZMVAofMrrHX6Ik39hCk470kulCbmZ2SWfQLPmTWqfJV/oUm0gn1CblvHdUu4+54Je6Jq34x8kY6XjTy6dMkOg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -32015,6 +32096,11 @@ ws@^7.0.0: dependencies: async-limiter "^1.0.0" +ws@^7.2.3: + version "7.3.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.0.tgz#4b2f7f219b3d3737bc1a2fbf145d825b94d38ffd" + integrity sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w== + ws@~3.3.1: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"