Merge remote-tracking branch 'origin/master' into feature/merge-code
|
@ -21,6 +21,5 @@ tar -cf "$HOME/.kibana/bootstrap_cache/master.tar" \
|
|||
x-pack/node_modules \
|
||||
x-pack/plugins/*/node_modules \
|
||||
x-pack/plugins/reporting/.chromium \
|
||||
x-pack/plugins/reporting/.phantom \
|
||||
test/plugin_functional/plugins/*/node_modules \
|
||||
.es;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
"xpack.idxMgmt": "x-pack/plugins/index_management",
|
||||
"xpack.indexLifecycleMgmt": "x-pack/plugins/index_lifecycle_management",
|
||||
"xpack.infra": "x-pack/plugins/infra",
|
||||
"xpack.kueryAutocomplete": "x-pack/plugins/kuery_autocomplete",
|
||||
"xpack.licenseMgmt": "x-pack/plugins/license_management",
|
||||
"xpack.ml": "x-pack/plugins/ml",
|
||||
"xpack.logstash": "x-pack/plugins/logstash",
|
||||
|
|
|
@ -237,6 +237,7 @@ Operations::
|
|||
* Creates separate startup scripts for development and production {pull}13806[#13806]
|
||||
* Sets default port based on protocol {pull}21564[#21564]
|
||||
* Removes deprecated `/shorten` API {pull}21861[#21861]
|
||||
* Plugin installer defers optimization step until server start {pull}26983[#26983]
|
||||
|
||||
[float]
|
||||
[[deprecation-7.0.0]]
|
||||
|
|
|
@ -21,6 +21,8 @@ Note: You cannot access this endpoint via the Console in Kibana.
|
|||
(number) The page of objects to return
|
||||
`search` (optional)::
|
||||
(string) A {ref}/query-dsl-simple-query-string-query.html[simple_query_string] Elasticsearch query to filter the objects in the response
|
||||
`default_search_operator` (optional)::
|
||||
(string) The default operator to use for the `simple_query_string`
|
||||
`search_fields` (optional)::
|
||||
(array|string) The fields to perform the `simple_query_string` parsed query against
|
||||
`fields` (optional)::
|
||||
|
|
|
@ -2,25 +2,24 @@
|
|||
[[apm-bottlenecks]]
|
||||
== Visualizing Application Bottlenecks
|
||||
|
||||
Elastic APM monitors transactions and errors in your application. A transaction
|
||||
can be a request to your server or a batch job or a custom transaction type.
|
||||
You can see information about response times, requests per minute, and status
|
||||
codes per endpoint. You can also dive into a specific request sample and get a
|
||||
complete waterfall view of what your application is spending its time on. For
|
||||
example, you might see that the bottlenecks are in database queries, cache
|
||||
calls, or external requests. This information enables you to easily compare and
|
||||
debug fast responses to slow responses.
|
||||
Elastic APM captures different types of information from within instrumented applications:
|
||||
|
||||
//TBD: What are we wanting them to notice in the following screenshot?
|
||||
//For example, the APM UI shows that the following transaction is spending over 400 ms querying the orders database?
|
||||
* {apm-overview-ref-v}/transaction-spans.html[*Spans*] contain information about a specific code path that has been executed.
|
||||
They measure from the start to end of an activity,
|
||||
and they can have a parent/child relationship with other spans.
|
||||
* {apm-overview-ref-v}/transactions.html[*Transactions*] are a special kind of span that have extra metadata associated with them.
|
||||
You can think of transactions as the highest level of work you’re measuring within a service.
|
||||
As an example, a transaction could be a request to your server, a batch job, or a custom transaction type.
|
||||
* {apm-overview-ref-v}/errors.html[*Errors*] contain information about the original exception that occurred or about a log created when the exception occurred.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transaction.png[Example view of a transaction in the APM UI in Kibana]
|
||||
Each of these information types have a specific page associated with them in the APM UI.
|
||||
These various pages display the captured data in curated charts and tables that allow you to easily compare and debug your applications.
|
||||
|
||||
For each incoming request and each application error, you can also see
|
||||
contextual information such as the request header, user information, system
|
||||
values, or custom data that you manually attached to the request.
|
||||
For example, you can see information about response times, requests per minute, and status codes per endpoint.
|
||||
You can even dive into a specific request sample and get a complete waterfall view of what your application is spending its time on.
|
||||
You might see that your bottlenecks are in database queries, cache calls, or external requests.
|
||||
For each incoming request and each application error,
|
||||
you can also see contextual information such as the request header, user information,
|
||||
system values, or custom data that you manually attached to the request.
|
||||
|
||||
Having access to application-level insights with just a few clicks can
|
||||
drastically decrease the time you spend debugging errors, slow response times,
|
||||
and crashes.
|
||||
Having access to application-level insights with just a few clicks can drastically decrease the time you spend debugging errors, slow response times, and crashes.
|
||||
|
|
46
docs/apm/errors.asciidoc
Normal file
|
@ -0,0 +1,46 @@
|
|||
[[errors]]
|
||||
=== Errors overview
|
||||
|
||||
TIP: {apm-overview-ref-v}/errors.html[Errors] are defined as groups of exceptions with matching exception or log messages.
|
||||
|
||||
The *Errors* overview provides a high-level view of the error message and culprit,
|
||||
the number of occurrences, and the most recent occurrence.
|
||||
Just like the transaction overview, you'll notice we group together like errors.
|
||||
This makes it very easy to quickly see which errors are affecting your services,
|
||||
and to take actions to rectify them.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-errors-overview.png[Example view of the errors overview in the APM UI in Kibana]
|
||||
|
||||
Selecting an error group ID or error message brings you to the *Error group*.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-error-group.png[Example view of the error group page in the APM UI in Kibana]
|
||||
|
||||
Here, you'll see the error message, culprit, and the number of occurrences over time.
|
||||
|
||||
Further down, you'll see the Error occurrence table.
|
||||
This is where you can see the details of a sampled error within this group.
|
||||
The error shown is always the most recent to occur.
|
||||
|
||||
Each error occurrence features a breakdown of the exception, including the stack trace from when the error occurred,
|
||||
and additional contextual information to help debug the issue.
|
||||
In some cases, you might also see a Transaction sample ID.
|
||||
This feature allows you to make a connection between the errors and transactions,
|
||||
by linking you to the specific transaction where the error occurred.
|
||||
This allows you to see the whole trace, including which services the request went through.
|
||||
|
||||
[float]
|
||||
[[errors-alerts-with-watcher]]
|
||||
==== Error reports with Watcher
|
||||
|
||||
You can use the power of the alerting features with Watcher to get reports on error occurrences.
|
||||
The Watcher assistant, which is available on the errors overview, can help you set up a watch per service.
|
||||
|
||||
Configure the watch with an occurrences threshold, time interval, and the desired actions, such as email or Slack notifications.
|
||||
With Watcher, your team can set up reports within minutes.
|
||||
|
||||
Watches are managed separately in the dedicated Watcher UI available in Advanced Settings.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-errors-watcher-assistant.png[Example view of the Watcher assistant for errors in APM UI in Kibana]
|
|
@ -2,21 +2,20 @@
|
|||
[[apm-getting-started]]
|
||||
== Getting Started
|
||||
|
||||
If you have not already installed and configured Elastic APM, the
|
||||
**APM > Getting Started** page in {kib} provides information to help you
|
||||
complete the setup.
|
||||
If you have not already installed and configured Elastic APM,
|
||||
the *Setup Instructions* will get you started.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-setup.jpg[Installation instructions on the APM page in Kibana]
|
||||
image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana]
|
||||
|
||||
After you install the Elastic APM agent library in your application, the
|
||||
application automatically appears in the APM UI in {kib}. No further
|
||||
configuration is required.
|
||||
After you install the Elastic APM agent library in your application,
|
||||
the application automatically appears in the APM UI in {kib}.
|
||||
No further configuration is required.
|
||||
|
||||
If you also use Elastic Stack for logging and server-level metrics, you can
|
||||
optionally import the APM dashboards that come with the APM Server. You can use
|
||||
these APM-specific visualizations to correlate APM data with other data sources.
|
||||
To get the dashboards, click the "Load Kibana objects" button at the bottom of the Getting Started guides for APM in Kibana.
|
||||
If you also use the Elastic Stack for logging and server-level metrics,
|
||||
you can import the APM dashboards that come with the APM Server.
|
||||
You can use these APM specific visualizations to correlate APM data with other data sources.
|
||||
To get the dashboards, click *Load Kibana objects* at the bottom of the Setup Instructions.
|
||||
|
||||
For more setup information, see
|
||||
{apm-get-started-ref}/index.html[Getting Started with APM].
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-setup-dashboards.png[Install dashboards for APM in Kibana]
|
||||
|
|
BIN
docs/apm/images/apm-distributed-tracing.png
Normal file
After Width: | Height: | Size: 393 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 364 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 340 KiB |
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 480 KiB |
BIN
docs/apm/images/apm-metrics.png
Normal file
After Width: | Height: | Size: 317 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 430 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 264 KiB |
BIN
docs/apm/images/apm-services-trace.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/apm/images/apm-setup-dashboards.png
Normal file
After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 121 KiB |
BIN
docs/apm/images/apm-setup.png
Normal file
After Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 401 KiB |
BIN
docs/apm/images/apm-traces.png
Normal file
After Width: | Height: | Size: 423 KiB |
Before Width: | Height: | Size: 112 KiB |
BIN
docs/apm/images/apm-transaction-duration-dist.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
docs/apm/images/apm-transaction-response-dist.png
Normal file
After Width: | Height: | Size: 384 KiB |
BIN
docs/apm/images/apm-transaction-sample.png
Normal file
After Width: | Height: | Size: 286 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 264 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 381 KiB |
BIN
docs/apm/images/apm-view-full-trace.png
Normal file
After Width: | Height: | Size: 289 KiB |
BIN
docs/apm/images/transaction-icon.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
|
@ -11,11 +11,16 @@ The **APM** page in {kib} is provided with the basic license. It
|
|||
enables developers to drill down into the performance data for their applications
|
||||
and quickly locate the performance bottlenecks.
|
||||
|
||||
For more information about the components of Elastic APM, see
|
||||
{apm-get-started-ref}/overview.html[APM Overview].
|
||||
* <<apm-getting-started>>
|
||||
* <<apm-bottlenecks>>
|
||||
* <<apm-ui>>
|
||||
|
||||
NOTE: For more information about the components of Elastic APM,
|
||||
see the {apm-get-started-ref}/overview.html[APM Overview].
|
||||
--
|
||||
|
||||
include::getting-started.asciidoc[]
|
||||
|
||||
include::bottlenecks.asciidoc[]
|
||||
|
||||
include::using-the-apm-ui.asciidoc[]
|
||||
|
|
26
docs/apm/metrics.asciidoc
Normal file
|
@ -0,0 +1,26 @@
|
|||
[[metrics]]
|
||||
=== Metrics overview
|
||||
|
||||
The *Metrics* overview shows a combination of transaction, error, CPU, and memory data.
|
||||
|
||||
If you're experiencing a problem with your service, you can use this page to attempt to find the underlying cause.
|
||||
For example, you might be able to correlate a high number of errors with a long transaction duration, high CPU usage, or a memory leak.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-metrics.png[Example view of the Metrics overview in APM UI in Kibana]
|
||||
|
||||
[[machine-learning-integration]]
|
||||
=== Machine Learning integration
|
||||
|
||||
The Machine Learning integration will initiate a new job predefined to calculate anomaly scores on transaction response times.
|
||||
The response time graph will show the expected bounds and annotate the graph when the anomaly score is 75 or above.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in APM UI in Kibana]
|
||||
|
||||
Jobs can be created per transaction type and based on the average response time.
|
||||
You can manage jobs in the *Machine Learning jobs management*.
|
||||
It might take some time for results to appear on the graph.
|
||||
|
||||
Machine learning is a platinum feature. For a comparison of the Elastic license levels,
|
||||
see https://www.elastic.co/subscriptions[the subscription page].
|
31
docs/apm/query-bar.asciidoc
Normal file
|
@ -0,0 +1,31 @@
|
|||
[[query-bar]]
|
||||
=== Advanced queries
|
||||
|
||||
The query bar is a powerful data query feature.
|
||||
Similar to the query bar in {kibana-ref}/discover.html[Discover],
|
||||
it enables you to pass advanced queries on your data to filter on particular pieces of information that you're interested in.
|
||||
It comes with a handy autocomplete that helps find the fields and even provides suggestions to the data they include.
|
||||
You can select the query bar and hit the down arrow on your keyboard to begin seeing recommendations.
|
||||
|
||||
When querying, you're simply searching and selecting data from fields in Elasticsearch documents.
|
||||
It may be helpful to view some of your documents in {kibana-ref}/discover.html[Discover] to better understand how APM data is stored in Elasticsearch.
|
||||
|
||||
The query bar is available in the Services, Transactions, Errors, Metrics, and Traces views,
|
||||
and any input will persist as you move between pages.
|
||||
|
||||
TIP: Interactions with the query bar change the URL of the page you're on.
|
||||
This means you can simply copy and paste the URL of your page to share a specific query or view with others.
|
||||
|
||||
In the screenshot below, you can begin to see some of the transaction fields available for filtering on:
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-query-bar.png[Example of the Kibana Query bar in APM UI in Kibana]
|
||||
|
||||
==== Example queries
|
||||
|
||||
* Exclude response times slower than 2000 ms: `transaction.duration.us > 2000000`
|
||||
* Filter by response status code: `context.response.status_code >= 400`
|
||||
* Filter by single user ID: `context.user.id : 12`
|
||||
* View _all_ transactions for an endpoint, instead of just a sample - `processor.event: "transaction" AND transaction.name: "<TRANSACTION_NAME_HERE>"`
|
||||
|
||||
TIP: Read the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] documentation to learn more about the capabilities of the {kib} query language.
|
10
docs/apm/services.asciidoc
Normal file
|
@ -0,0 +1,10 @@
|
|||
[[services]]
|
||||
=== Services overview
|
||||
|
||||
The *Services* overview gives you quick insights into the health and general performance of each service.
|
||||
The <<set-time-filter,global time range filter>> in {kib} defines which services are available.
|
||||
|
||||
You can add services by setting the `service.name` configuration in each of the {apm-agents-ref}[APM agents] you’re instrumenting.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-services-overview.png[Example view of services table the APM UI in Kibana]
|
40
docs/apm/spans.asciidoc
Normal file
|
@ -0,0 +1,40 @@
|
|||
[[spans]]
|
||||
=== Span timeline
|
||||
|
||||
TIP: A {apm-overview-ref-v}/transaction-spans.html[span] is defined as the duration of a single event.
|
||||
Spans are automatically captured by APM agents, and you can also define custom spans.
|
||||
Each span has a type and is defined by a different color in the timeline/waterfall visualization.
|
||||
|
||||
The span timeline visualization is a bird's-eye view of what your application was doing while it was trying to respond to the request that came in.
|
||||
This makes it useful for visualizing where the selected transaction spent most of its time.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-distributed-tracing.png[Example view of the distributed tracing in APM UI in Kibana]
|
||||
|
||||
View a span in detail by clicking on it in the timeline waterfall.
|
||||
For example, in the below screenshot we've clicked on an SQL Select database query.
|
||||
The information displayed includes the actual SQL that was executed, how long it took,
|
||||
and the percentage of the trace's total time.
|
||||
You also get a stack trace, which shows the SQL query in your code.
|
||||
Finally, APM knows which files are your code and which are just modules or libraries that you've installed.
|
||||
These library frames will be minimized by default in order to show you the most relevant stack trace.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-span-detail.png[Example view of a span detail in the APM UI in Kibana]
|
||||
|
||||
If your span timeline is colorful, it's indicative of a <<distributed-tracing,distributed trace>>.
|
||||
Services in a distributed trace are separated by color and listed in the order they occur.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-services-trace.png[Example of distributed trace colors in the APM UI in Kibana]
|
||||
|
||||
Don't forget, a distributed trace includes more than one transaction.
|
||||
When viewing these distributed traces in the timeline waterfall, you'll see this image:apm/images/transaction-icon.png[APM icon] icon,
|
||||
which indicates the next transaction in the trace.
|
||||
These transactions can be expanded and viewed in detail by clicking on them.
|
||||
|
||||
After exploring these traces,
|
||||
you can return to the full trace by clicking *View full trace* in the upper right hand corner of the page.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-view-full-trace.png[Example of distributed trace colors in the APM UI in Kibana]
|
36
docs/apm/traces.asciidoc
Normal file
|
@ -0,0 +1,36 @@
|
|||
[[traces]]
|
||||
=== Traces overview
|
||||
|
||||
The *Traces* overview displays the entry transaction for all traces in your application.
|
||||
If you're using <<distributed-tracing>>, this view is key to finding the critical paths within your application.
|
||||
Transactions with the same name are grouped together and only shown once in this table.
|
||||
|
||||
By default, transactions are sorted by _Impact_.
|
||||
Impact helps show the most used and slowest endpoints in your service - in other words,
|
||||
it's the collective amount of pain a specific endpoint is causing your users.
|
||||
If there's a particular endpoint you're worried about, you can click on it to view the <<transaction-details, transaction details>>.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-traces.png[Example view of the Traces overview in APM UI in Kibana]
|
||||
|
||||
[float]
|
||||
[[distributed-tracing]]
|
||||
==== Distributed tracing
|
||||
|
||||
Elastic APM supports distributed tracing.
|
||||
Distributed tracing is a key feature of modern application performance monitoring as application architectures are shifting from monolithic to more distributed,
|
||||
service-based architectures.
|
||||
|
||||
Distributed tracing allows APM users to automatically trace requests all the way through the service architecture,
|
||||
and visualize those traces in one single view in the APM UI.
|
||||
This is accomplished by tracing all of the requests, from the initial web request to your front-end service,
|
||||
to queries made to your back-end services.
|
||||
This makes finding possible bottlenecks throughout your application much easier and faster.
|
||||
|
||||
By definition, a distributed trace includes more than one transaction.
|
||||
You can use the <<spans,span timeline visualization>> to view a waterfall display of all of the transactions from individual services that are connected in a trace.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-distributed-tracing.png[Example view of the distributed tracing in APM UI in Kibana]
|
||||
|
||||
TIP: Distributed tracing is supported by all APM agents and there’s no additional configuration needed.
|
90
docs/apm/transactions.asciidoc
Normal file
|
@ -0,0 +1,90 @@
|
|||
[[transactions]]
|
||||
=== Transaction overview
|
||||
|
||||
TIP: A {apm-overview-ref-v}/transactions.html[transaction] describes an event captured by an Elastic APM agent instrumenting a service.
|
||||
The APM agents automatically collect performance metrics on HTTP requests, database queries, and much more.
|
||||
|
||||
// Clicking *service* brings you to detail of transaction
|
||||
Selecting a <<services,*service*>> will display all associated *transactions*.
|
||||
The charts and table on this dashboard display the transaction duration, requests per minute, and a list of transactions for the selected service.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transactions-overview.png[Example view of transactions table in the APM UI in Kibana]
|
||||
|
||||
*Transaction duration* shows the response times for this service and is broken down into average, 95th, and 99th percentile.
|
||||
If there's a weird spike that you'd like to investigate,
|
||||
you can simply zoom in on the graph - this will adjust the specific time range,
|
||||
and all of the data on the page will update accordingly.
|
||||
|
||||
*Requests per minute* is divided into response codes: 2xx, 3xx, 4xx, etc.,
|
||||
and is useful for determining if you're serving more of one code than you typically do.
|
||||
Like in the Transaction duration graph, you can zoom in on anomalies to further investigate them.
|
||||
|
||||
The table at the bottom is similar to the <<traces,traces>> overview and shows the name of each transaction occurring in the selected service.
|
||||
Transactions with the same name are grouped together and only shown once in this table.
|
||||
By default, transactions are sorted by _Impact_.
|
||||
Impact helps show the most used and slowest endpoints in your service - in other words,
|
||||
it's the collective amount of pain a specific endpoint is causing your users.
|
||||
If there's a particular endpoint you're worried about, you can click on it to view the <<transaction-details, transaction details>>.
|
||||
|
||||
[IMPORTANT]
|
||||
====
|
||||
The transaction overview will only display helpful information when the transactions in your service are named correctly.
|
||||
|
||||
Elastic APM Agents come with built-in support for popular frameworks out-of-the-box.
|
||||
However, if you only see one route in the Transaction overview page, or if you have transactions named "unknown route",
|
||||
it could be a symptom that the agent either wasn't installed correctly or doesn't support your framework.
|
||||
|
||||
For further details, including troubleshooting and custom implementation instructions,
|
||||
refer to the documentation for each {apm-agents-ref}[APM Agent] you've implemented.
|
||||
====
|
||||
|
||||
[[transaction-details]]
|
||||
==== Transaction details
|
||||
|
||||
Selecting a transaction group will bring you to the *transaction* details.
|
||||
Transaction details include a high-level overview of the transaction group duration,
|
||||
requests per minute, and transaction group duration distribution.
|
||||
It's important to note that all three of these graphs show data from every transaction within the selected transaction group.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transaction-response-dist.png[Example view of response time distribution]
|
||||
|
||||
A single sampled transaction is also displayed.
|
||||
This sampled transaction is based on your selection in the *Transactions duration distribution*.
|
||||
You can update the sampled transaction by selecting a new _bucket_ in the transactions duration distribution graph.
|
||||
The number of requests per bucket is displayed when hovering over the graph, and the selected bucket is highlighted to stand out.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transaction-duration-dist.png[Example view of transactions duration distribution graph]
|
||||
|
||||
Let's look at an example.
|
||||
In the screenshot below,
|
||||
you'll notice most of our requests fall into buckets on the left side of the graph,
|
||||
with a long tail of smaller buckets to the right.
|
||||
This is a typical distribution, and indicates most of our requests were served quickly - awesome!
|
||||
It's the requests on the right, the ones taking longer than average, that we probably want to focus on.
|
||||
By clicking on these buckets,
|
||||
we're presented with a span timeline waterfall showing what a typical request in that bucket was doing.
|
||||
By investigating this timeline waterfall, we can hopefully see why it was slow and then implement a fix.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transaction-sample.png[Example view of transactions sample]
|
||||
|
||||
NOTE: More information on timeline waterfalls is available in <<spans, spans>>.
|
||||
|
||||
For a particular transaction sample, we can get even more information in the tabs:
|
||||
|
||||
* *Timeline* - See the <<spans, Spans>> section for more information.
|
||||
* *Request* - The URL, headers, body, etc..
|
||||
* *Response* - The response.
|
||||
* *System* - The system hostname, architecture, platform, etc..
|
||||
* *Service* - The service/application runtime, agent, name, etc..
|
||||
* *Process* - The process id that served up the request.
|
||||
* *User* - This requires additional configuration, but allows you to see which user experienced the current transaction.
|
||||
This can be extremely useful if it's determined that specific users are getting slow requests.
|
||||
* *Tags* - Useful if you want to start correlating transactions with log files or metrics from Metricbeat.
|
||||
* *Custom* - You can configure your agent to add custom contextual information on transactions.
|
||||
|
||||
TIP: All of this data is stored in documents in Elasticsearch.
|
||||
This means you can select "Actions - View sample document" to see the actual Elasticsearch document under the discover tab.
|
|
@ -1,91 +1,32 @@
|
|||
[role="xpack"]
|
||||
[[apm-ui]]
|
||||
== Using the APM UI
|
||||
== Using APM
|
||||
|
||||
The APM UI is designed to be as intuitive as possible, but you might come across certain terms or concepts that don’t feel native to you. Not to worry, that’s why we’ve created this guide to help you get the most out of the solution.
|
||||
APM is designed to be as intuitive as possible,
|
||||
but you might come across certain terms or concepts that don’t feel native to you.
|
||||
Not to worry, we've created this guide to help you get the most out of Elastic APM.
|
||||
|
||||
* <<services>>
|
||||
* <<transactions>>
|
||||
* <<spans>>
|
||||
* <<errors>>
|
||||
* <<errors-alerts-with-watcher>>
|
||||
* <<machine-learning-integration>>
|
||||
* <<query-bar>>
|
||||
APM is available via the navigation sidebar in {Kib}.
|
||||
|
||||
[[services]]
|
||||
=== Services
|
||||
* <<services,Services overview>>
|
||||
* <<traces,Traces overview>>
|
||||
* <<transactions,Transaction overview>>
|
||||
* <<spans,Span timeline visualization>>
|
||||
* <<errors,Debug errors>>
|
||||
* <<metrics,Metrics overview>>
|
||||
* <<machine-learning-integration,Machine learning integration>>
|
||||
* <<query-bar,Advanced queries>>
|
||||
|
||||
You can add services by setting the `service.name` in the APM agent configuration per service you’re instrumenting. The global time range filter in Kibana defines which services are available. The Services overview gives you a quick insight into the health and general performance of each service.
|
||||
include::services.asciidoc[]
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-services-overview.png[Example view of services table the APM UI in Kibana]
|
||||
include::traces.asciidoc[]
|
||||
|
||||
[[transactions]]
|
||||
=== Transactions
|
||||
include::transactions.asciidoc[]
|
||||
|
||||
The APM agents automatically collect performance metrics on HTTP requests, database queries, and much more. Please refer to the documentation for each agent for more detail. Each `transaction.type` is displayed separately to make it easy for you to navigate to the transaction.
|
||||
include::spans.asciidoc[]
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transactions-overview.png[Example view of transactions table in the APM UI in Kibana]
|
||||
include::errors.asciidoc[]
|
||||
|
||||
[[spans]]
|
||||
=== Spans
|
||||
include::metrics.asciidoc[]
|
||||
|
||||
A span is defined as the duration of a single event. Spans are automatically captured by the APM agents, but you can also define custom spans. Each span has a type and is defined by a different colour in the Timeline visualization (also known as the waterfall).
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transaction-detail.png[Example view of transactions detail page in the APM UI in Kibana]
|
||||
|
||||
You can view a span in detail by clicking it in the Timeline. This displays the recorded SQL database query or source code (in-app frames) around the event that was captured.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-span-detail.png[Example view of a span detail in the APM UI in Kibana]
|
||||
|
||||
[[errors]]
|
||||
=== Errors
|
||||
|
||||
Errors are defined as groups of exceptions with matching exception or log messages. Each error group features a breakdown of the exception including the stackframes from when the error occurred and additional contextual information to help debug the issue.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-errors-overview.png[Example view of the errors overview in the APM UI in Kibana]
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-error-group.png[Example view of the error group page in the APM UI in Kibana]
|
||||
|
||||
[[errors-alerts-with-watcher]]
|
||||
=== Errors alerts with Watcher
|
||||
|
||||
You can use the power of the alerting features with Watcher to get alerts on error occurrences. The Watcher assistant, which is available on the Errors overview page, can help you set up a watch per service.
|
||||
|
||||
Configure the watch with occurrences threshold and time interval and set the desired actions, such as email or Slack notifications. Your team can be set up with alerts in minutes.
|
||||
|
||||
Watches are managed separately in the dedicated Watcher UI available in Advanced Settings.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-errors-watcher-assistant.png[Example view of the Watcher assistant for errors in APM UI in Kibana]
|
||||
|
||||
[[machine-learning-integration]]
|
||||
=== Machine Learning integration
|
||||
|
||||
The Machine Learning integration will initiate a new job predefined to calculate anomaly scores on transaction response times. The response time graph will show the expected bounds and annotate the graph when the anomaly score is 75 or above.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in APM UI in Kibana]
|
||||
|
||||
Jobs can be created per transaction type and based on the average response time. You can manage jobs in the Machine Learning jobs management page. It might take some time for results to appear on the graph.
|
||||
|
||||
[[query-bar]]
|
||||
=== Query bar
|
||||
|
||||
The query bar is a powerful data query feature. Similar to the query bar in {kibana-ref}/discover.html[Discover] it enables you to pass advanced queries on your data to filter on particular pieces of information that you're interested in. It comes with a handy autocomplete that helps find the fields and even provides suggestions to the data they include. The query bar is available on Services, Transaction and Errors views, and any input will persist as you move between them.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-query-bar.png[Example of the Kibana Query bar in APM UI in Kibana]
|
||||
|
||||
==== Example queries
|
||||
|
||||
* Exclude response times faster than 2000 ms; `transaction.duration.us > 2000000`
|
||||
* Filter by response status code; `context.response.status_code >= 400`
|
||||
* Filter by single user ID; `context.user.id : 12`
|
||||
|
||||
Read the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] documentation to learn more about the capabilities in the Kibana query language.
|
||||
include::query-bar.asciidoc[]
|
|
@ -85,6 +85,34 @@ to Kibana's advanced setting.
|
|||
on each Elasticsearch node, Logstash node, Kibana instance, and Beat to collect and index metrics. Each node and instance is
|
||||
considered unique based on its persistent UUID, which is written to the path.data directory when the node or instance starts.
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `xpack.monitoring.elasticsearch.url` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `xpack.monitoring.elasticsearch.hosts` should be used instead.
|
||||
In prior versions of Kibana, if no port was specified in `xpack.monitoring.elasticsearch.url` a default of 9200 was chosen.
|
||||
The port in `xpack.monitoring.elasticsearch.hosts` is protocol dependent: https ports will use 443, and http ports will use 80.
|
||||
|
||||
*Impact:* Users with `xpack.monitoring.elasticsearch.url` set should use `xpack.monitoring.elasticsearch.hosts` instead and if
|
||||
`xpack.monitoring.elasticsearch.url` was dependent on an unspecified port set to 9200, `:9200` will have to be appended to the url.
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `xpack.monitoring.elasticsearch.ssl.cert` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `xpack.monitoring.elasticsearch.ssl.certificate` should be used instead.
|
||||
|
||||
*Impact:* Users with `xpack.monitoring.elasticsearch.ssl.cert` set should use `xpack.monitoring.elasticsearch.ssl.certificate` instead
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `xpack.monitoring.elasticsearch.ssl.ca` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `xpack.monitoring.elasticsearch.ssl.certificateAuthorities` should be used instead.
|
||||
|
||||
*Impact:* Users with `xpack.monitoring.elasticsearch.ssl.ca` set should use `xpack.monitoring.elasticsearch.ssl.certificateAuthorities` instead
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `xpack.monitoring.elasticsearch.ssl.verify` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `xpack.monitoring.elasticsearch.ssl.verificationMode` should be used instead.
|
||||
|
||||
*Impact:* Users with `xpack.monitoring.elasticsearch.ssl.verify` set should use `xpack.monitoring.elasticsearch.ssl.verificationMode` instead.
|
||||
Previously set `xpack.monitoring.elasticsearch.ssl.verify` is equal to `xpack.monitoring.elasticsearch.ssl.verificationMode: full`.
|
||||
|
||||
[float]
|
||||
=== Deprecated API `/shorten` has been removed
|
||||
*Details:* The `/shorten` API has been deprecated since 6.5, when it was replaced by the `/api/shorten_url` API.
|
||||
|
@ -97,13 +125,6 @@ considered unique based on its persistent UUID, which is written to the path.dat
|
|||
|
||||
*Impact:* The logging.useUTC flag will have to be replaced with a timezone id. If set to true the id is `UTC`.
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `elasticsearch.url` sets port based on protocol
|
||||
*Details:* In prior versions of Kibana, if no port was specified in `elasticsearch.url` a default of 9200 was chosen.
|
||||
The port is now protocol dependent: https ports will use 443, and http ports will use 80.
|
||||
|
||||
*Impact:* If your `elasticsearch.url` was dependent on an unspecified port set to 9200, `:9200` will have to be appended to the url.
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `server.ssl.supportedProtocols` excludes TLSv1 by default
|
||||
*Details:* TLSv1 support has been removed by default, it's still possible to opt-in to TLSv1 support by explicitly setting
|
||||
|
@ -123,3 +144,43 @@ The port is now protocol dependent: https ports will use 443, and http ports wil
|
|||
It's now required that the user sets `server.ssl.enabled` to true for this to occur.
|
||||
|
||||
*Impact:* Users with both `server.ssl.certificate` and `server.ssl.key` set must now also set `server.ssl.enabled` to enable SSL.
|
||||
|
||||
[float]
|
||||
=== Optimization step deferred until server start
|
||||
*Details:* Prior versions of Kibana would run the optimization step after each plugin installation. This is now run on server start when necessary.
|
||||
|
||||
*Impact:* Users can trigger a standalone optimization after all plugins have been installed with `bin/kibana --optimize` or let the server manage it on startup.
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `i18n.defaultLocale` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `i18n.locale` should be used instead.
|
||||
|
||||
*Impact:* Users with `i18n.defaultLocale` set should use `i18n.locale` instead
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `elasticsearch.url` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `elasticsearch.hosts` should be used instead.
|
||||
In prior versions of Kibana, if no port was specified in `elasticsearch.url` a default of 9200 was chosen. The port in
|
||||
`elasticsearch.hosts` is protocol dependent: https ports will use 443, and http ports will use 80.
|
||||
|
||||
*Impact:* Users with `elasticsearch.url` set should use `elasticsearch.hosts` instead and if `elasticsearch.url` was
|
||||
dependent on an unspecified port set to 9200, `:9200` will have to be appended to the url.
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `elasticsearch.ssl.cert` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `elasticsearch.ssl.certificate` should be used instead.
|
||||
|
||||
*Impact:* Users with `elasticsearch.ssl.cert` set should use `elasticsearch.ssl.certificate` instead
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `elasticsearch.ssl.ca` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `elasticsearch.ssl.certificateAuthorities` should be used instead.
|
||||
|
||||
*Impact:* Users with `elasticsearch.ssl.ca` set should use `elasticsearch.ssl.certificateAuthorities` instead
|
||||
|
||||
[float]
|
||||
=== kibana.yml setting `elasticsearch.ssl.verify` is no longer valid
|
||||
*Details:* This deprecated setting has been removed and `elasticsearch.ssl.verificationMode` should be used instead.
|
||||
|
||||
*Impact:* Users with `elasticsearch.ssl.verify` set should use `elasticsearch.ssl.verificationMode` instead.
|
||||
Previously set `elasticsearch.ssl.verify` is equal to `elasticsearch.ssl.verificationMode: full`.
|
||||
|
|
|
@ -54,27 +54,6 @@ NOTE: This command creates the specified directory if it does not already exist.
|
|||
|
||||
WARNING: This option is deprecated and will be removed in Kibana 7. It is known to not work with some plugins, including {xpack}.
|
||||
|
||||
[float]
|
||||
=== Installing Plugins with Linux packages
|
||||
|
||||
The Kibana server needs to be able to write to files in the `optimize` directory. If you're installing plugins using sudo or su you'll
|
||||
want to make sure these commands are ran as the user `kibana`. This user is already added for you as part of the package installation.
|
||||
|
||||
[source,shell]
|
||||
$ sudo -u kibana bin/kibana-plugin install x-pack
|
||||
|
||||
If plugins were installed as a different user and the server is not starting, then you will need to change the owner of these files:
|
||||
|
||||
[source,shell]
|
||||
$ chown -R kibana:kibana /path/to/kibana/optimize
|
||||
|
||||
[float]
|
||||
=== Installing plugins while deferring optimization
|
||||
|
||||
The majority of the time spent installing a plugin is running the optimizer. If you're installing multiple plugins it can make sense to omit that step and only run it once.
|
||||
This can be done by providing --no-optimize to the plugin installation command. You can then either execute bin/kibana --optimize to run the optimizer,
|
||||
or it will be ran the first time Kibana is started.
|
||||
|
||||
[float]
|
||||
=== Proxy support for plugin installation
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@elastic/datemath": "5.0.2",
|
||||
"@elastic/eui": "6.7.2",
|
||||
"@elastic/eui": "6.7.4",
|
||||
"@elastic/filesaver": "1.1.2",
|
||||
"@elastic/good": "8.1.1-kibana2",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
|
|
|
@ -94,7 +94,7 @@ async function insertUser(port, auth, username, password, roles = [], retries =
|
|||
auth,
|
||||
hostname: 'localhost',
|
||||
port,
|
||||
pathname: `/_xpack/security/user/${username}`,
|
||||
pathname: `/_security/user/${username}`,
|
||||
}),
|
||||
json: true,
|
||||
body: { password, roles },
|
||||
|
|
82
packages/kbn-ui-framework/dist/kui_dark.css
vendored
|
@ -1003,9 +1003,17 @@ main {
|
|||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding-left: 10px;
|
||||
padding: 12px 8px;
|
||||
/* 1 */
|
||||
height: 100%; }
|
||||
border-bottom: 1px solid #333;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex-grow: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
-webkit-flex-basis: 100%;
|
||||
-ms-flex-preferred-size: 100%;
|
||||
flex-basis: 100%;
|
||||
background-color: #222; }
|
||||
|
||||
.kuiLocalBreadcrumb {
|
||||
font-size: 14px;
|
||||
|
@ -1100,8 +1108,8 @@ main {
|
|||
/* 1 */
|
||||
outline: none !important;
|
||||
/* 2 */
|
||||
-webkit-box-shadow: 0 0 0 1px #242424, 0 0 0 2px #4DA1C0;
|
||||
box-shadow: 0 0 0 1px #242424, 0 0 0 2px #4DA1C0;
|
||||
-webkit-box-shadow: 0 0 0 1px transparent, 0 0 0 2px #4DA1C0;
|
||||
box-shadow: 0 0 0 1px transparent, 0 0 0 2px #4DA1C0;
|
||||
/* 3 */
|
||||
color: #DDD;
|
||||
/* 1 */ }
|
||||
|
@ -1147,8 +1155,8 @@ main {
|
|||
/* 1 */
|
||||
outline: none !important;
|
||||
/* 2 */
|
||||
-webkit-box-shadow: 0 0 0 1px #242424, 0 0 0 2px #4DA1C0;
|
||||
box-shadow: 0 0 0 1px #242424, 0 0 0 2px #4DA1C0;
|
||||
-webkit-box-shadow: 0 0 0 1px transparent, 0 0 0 2px #4DA1C0;
|
||||
box-shadow: 0 0 0 1px transparent, 0 0 0 2px #4DA1C0;
|
||||
/* 3 */
|
||||
color: #DDD;
|
||||
/* 1 */ }
|
||||
|
@ -1170,10 +1178,8 @@ main {
|
|||
|
||||
.kuiLocalDropdown {
|
||||
position: relative;
|
||||
padding: 10px 10px 14px;
|
||||
background-color: #242424;
|
||||
border-bottom: solid 1px #333;
|
||||
border-top: solid 1px #333;
|
||||
padding: 10px 8px 14px;
|
||||
background-color: transparent;
|
||||
margin-bottom: 10px;
|
||||
line-height: 20px; }
|
||||
|
||||
|
@ -1308,7 +1314,9 @@ main {
|
|||
-webkit-box-align: stretch;
|
||||
-webkit-align-items: stretch;
|
||||
-ms-flex-align: stretch;
|
||||
align-items: stretch; }
|
||||
align-items: stretch;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px; }
|
||||
|
||||
.kuiLocalMenuItem {
|
||||
display: -webkit-box;
|
||||
|
@ -1319,32 +1327,29 @@ main {
|
|||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
padding: 2px 8px;
|
||||
font-size: 14px;
|
||||
background-color: transparent;
|
||||
color: #DDD;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
border-right: solid 1px transparent;
|
||||
border-left: solid 1px transparent; }
|
||||
border-bottom: solid 2px transparent; }
|
||||
.kuiLocalMenuItem:hover, .kuiLocalMenuItem:focus {
|
||||
background-color: #4DA1C0;
|
||||
color: #242424; }
|
||||
background-color: rgba(77, 161, 192, 0.15);
|
||||
text-decoration: underline; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isSelected {
|
||||
background-color: #242424;
|
||||
border-color: #333;
|
||||
height: calc(100% + 1px);
|
||||
z-index: 2;
|
||||
color: #4DA1C0; }
|
||||
color: #4DA1C0;
|
||||
background-color: transparent;
|
||||
border-color: #4DA1C0;
|
||||
z-index: 2; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isSelected:hover, .kuiLocalMenuItem.kuiLocalMenuItem-isSelected:focus {
|
||||
color: #4DA1C0; }
|
||||
text-decoration: none; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isDisabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isDisabled:hover {
|
||||
background-color: transparent;
|
||||
color: #DDD; }
|
||||
text-decoration: none; }
|
||||
|
||||
.kuiLocalMenuItem__icon {
|
||||
margin-right: 5px;
|
||||
|
@ -1390,11 +1395,7 @@ main {
|
|||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
min-height: 29px;
|
||||
/* 1 */
|
||||
line-height: 29px;
|
||||
/* 1 */ }
|
||||
justify-content: space-between; }
|
||||
|
||||
.kuiLocalNavRow__section {
|
||||
display: -webkit-box;
|
||||
|
@ -1414,7 +1415,7 @@ main {
|
|||
* of this container using padding.
|
||||
*/
|
||||
.kuiLocalNavRow--secondary {
|
||||
padding: 0 10px;
|
||||
padding: 0 8px;
|
||||
/* 1 */
|
||||
-webkit-box-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
|
@ -1422,11 +1423,6 @@ main {
|
|||
align-items: flex-start;
|
||||
/* 1 */ }
|
||||
|
||||
.kuiLocalNav__popover {
|
||||
height: 100%; }
|
||||
.kuiLocalNav__popover .kuiLocalNav__popoverAnchor {
|
||||
height: 100%; }
|
||||
|
||||
.kuiLocalSearch {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
|
@ -1632,9 +1628,21 @@ main {
|
|||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding-left: 10px;
|
||||
padding: 12px 8px;
|
||||
font-size: 14px;
|
||||
font-weight: bold; }
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #333;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex-grow: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
-webkit-flex-basis: 100%;
|
||||
-ms-flex-preferred-size: 100%;
|
||||
flex-basis: 100%;
|
||||
background-color: #222; }
|
||||
.kuiLocalTitle:empty {
|
||||
padding: 0;
|
||||
display: none; }
|
||||
|
||||
/**
|
||||
* 1. Allow class to be applied to `ul` and `ol` elements
|
||||
|
|
82
packages/kbn-ui-framework/dist/kui_light.css
vendored
|
@ -1003,9 +1003,17 @@ main {
|
|||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding-left: 10px;
|
||||
padding: 12px 8px;
|
||||
/* 1 */
|
||||
height: 100%; }
|
||||
border-bottom: 1px solid #D3DAE6;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex-grow: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
-webkit-flex-basis: 100%;
|
||||
-ms-flex-preferred-size: 100%;
|
||||
flex-basis: 100%;
|
||||
background-color: #FFF; }
|
||||
|
||||
.kuiLocalBreadcrumb {
|
||||
font-size: 14px;
|
||||
|
@ -1100,8 +1108,8 @@ main {
|
|||
/* 1 */
|
||||
outline: none !important;
|
||||
/* 2 */
|
||||
-webkit-box-shadow: 0 0 0 1px #F5F7FA, 0 0 0 2px #006BB4;
|
||||
box-shadow: 0 0 0 1px #F5F7FA, 0 0 0 2px #006BB4;
|
||||
-webkit-box-shadow: 0 0 0 1px transparent, 0 0 0 2px #006BB4;
|
||||
box-shadow: 0 0 0 1px transparent, 0 0 0 2px #006BB4;
|
||||
/* 3 */
|
||||
color: #2D2D2D;
|
||||
/* 1 */ }
|
||||
|
@ -1147,8 +1155,8 @@ main {
|
|||
/* 1 */
|
||||
outline: none !important;
|
||||
/* 2 */
|
||||
-webkit-box-shadow: 0 0 0 1px #F5F7FA, 0 0 0 2px #006BB4;
|
||||
box-shadow: 0 0 0 1px #F5F7FA, 0 0 0 2px #006BB4;
|
||||
-webkit-box-shadow: 0 0 0 1px transparent, 0 0 0 2px #006BB4;
|
||||
box-shadow: 0 0 0 1px transparent, 0 0 0 2px #006BB4;
|
||||
/* 3 */
|
||||
color: #2D2D2D;
|
||||
/* 1 */ }
|
||||
|
@ -1170,10 +1178,8 @@ main {
|
|||
|
||||
.kuiLocalDropdown {
|
||||
position: relative;
|
||||
padding: 10px 10px 14px;
|
||||
background-color: #F5F7FA;
|
||||
border-bottom: solid 1px #D3DAE6;
|
||||
border-top: solid 1px #D3DAE6;
|
||||
padding: 10px 8px 14px;
|
||||
background-color: transparent;
|
||||
margin-bottom: 10px;
|
||||
line-height: 20px; }
|
||||
|
||||
|
@ -1308,7 +1314,9 @@ main {
|
|||
-webkit-box-align: stretch;
|
||||
-webkit-align-items: stretch;
|
||||
-ms-flex-align: stretch;
|
||||
align-items: stretch; }
|
||||
align-items: stretch;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px; }
|
||||
|
||||
.kuiLocalMenuItem {
|
||||
display: -webkit-box;
|
||||
|
@ -1319,32 +1327,29 @@ main {
|
|||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
padding: 2px 8px;
|
||||
font-size: 14px;
|
||||
background-color: transparent;
|
||||
color: #2D2D2D;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
border-right: solid 1px transparent;
|
||||
border-left: solid 1px transparent; }
|
||||
border-bottom: solid 2px transparent; }
|
||||
.kuiLocalMenuItem:hover, .kuiLocalMenuItem:focus {
|
||||
background-color: #006BB4;
|
||||
color: #F5F7FA; }
|
||||
background-color: rgba(0, 107, 180, 0.15);
|
||||
text-decoration: underline; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isSelected {
|
||||
background-color: #F5F7FA;
|
||||
border-color: #D3DAE6;
|
||||
height: calc(100% + 1px);
|
||||
z-index: 2;
|
||||
color: #006BB4; }
|
||||
color: #006BB4;
|
||||
background-color: transparent;
|
||||
border-color: #006BB4;
|
||||
z-index: 2; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isSelected:hover, .kuiLocalMenuItem.kuiLocalMenuItem-isSelected:focus {
|
||||
color: #006BB4; }
|
||||
text-decoration: none; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isDisabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed; }
|
||||
.kuiLocalMenuItem.kuiLocalMenuItem-isDisabled:hover {
|
||||
background-color: transparent;
|
||||
color: #2D2D2D; }
|
||||
text-decoration: none; }
|
||||
|
||||
.kuiLocalMenuItem__icon {
|
||||
margin-right: 5px;
|
||||
|
@ -1390,11 +1395,7 @@ main {
|
|||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
min-height: 29px;
|
||||
/* 1 */
|
||||
line-height: 29px;
|
||||
/* 1 */ }
|
||||
justify-content: space-between; }
|
||||
|
||||
.kuiLocalNavRow__section {
|
||||
display: -webkit-box;
|
||||
|
@ -1414,7 +1415,7 @@ main {
|
|||
* of this container using padding.
|
||||
*/
|
||||
.kuiLocalNavRow--secondary {
|
||||
padding: 0 10px;
|
||||
padding: 0 8px;
|
||||
/* 1 */
|
||||
-webkit-box-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
|
@ -1422,11 +1423,6 @@ main {
|
|||
align-items: flex-start;
|
||||
/* 1 */ }
|
||||
|
||||
.kuiLocalNav__popover {
|
||||
height: 100%; }
|
||||
.kuiLocalNav__popover .kuiLocalNav__popoverAnchor {
|
||||
height: 100%; }
|
||||
|
||||
.kuiLocalSearch {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
|
@ -1632,9 +1628,21 @@ main {
|
|||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding-left: 10px;
|
||||
padding: 12px 8px;
|
||||
font-size: 14px;
|
||||
font-weight: bold; }
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #D3DAE6;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex-grow: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
-webkit-flex-basis: 100%;
|
||||
-ms-flex-preferred-size: 100%;
|
||||
flex-basis: 100%;
|
||||
background-color: #FFF; }
|
||||
.kuiLocalTitle:empty {
|
||||
padding: 0;
|
||||
display: none; }
|
||||
|
||||
/**
|
||||
* 1. Allow class to be applied to `ul` and `ol` elements
|
||||
|
|
|
@ -5,7 +5,7 @@ $localNavButtonTextColor: $kuiTextColor;
|
|||
$localNavButtonTextColor-isHover: $kuiColorLightestGray;
|
||||
$localNavButtonBackgroundColor: transparent;
|
||||
$localNavButtonBackgroundColor-isHover: $kuiColorBlue;
|
||||
$localNavButtonBackgroundColor-isSelected: $kuiColorLightestGray;
|
||||
$localNavButtonBackgroundColor-isSelected: transparent;
|
||||
$localNavBreadcrumbDelimiterColor: $euiBorderColor;
|
||||
$localSearchBackgroundColor: $euiColorGhost;
|
||||
$localSearchBorderColor-isInvalid: $euiColorDanger;
|
||||
|
@ -22,7 +22,7 @@ $localDatePickerCellSelectedBackgroundColor: $euiColorDarkShade;
|
|||
$localDatePickerCellSelectedTextColor: $euiTextColor;
|
||||
|
||||
// Spacing
|
||||
$localNavSideSpacing: 10px;
|
||||
$localNavSideSpacing: $euiSizeS;
|
||||
$localSearchHeight: 32px;
|
||||
$localDatePickerBottomSpacing: 4px;
|
||||
$localDatePickerButtonPadding: 3px 6px;
|
||||
|
|
|
@ -5,8 +5,11 @@
|
|||
.kuiLocalBreadcrumbs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: $localNavSideSpacing; /* 1 */
|
||||
height: 100%;
|
||||
padding: ($localNavSideSpacing * 1.5) $localNavSideSpacing; /* 1 */
|
||||
border-bottom: $euiBorderThin;
|
||||
flex-grow: 1;
|
||||
flex-basis: 100%;
|
||||
background-color: $euiColorEmptyShade;
|
||||
}
|
||||
|
||||
.kuiLocalBreadcrumb {
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
position: relative;
|
||||
padding: 10px $localNavSideSpacing 14px;
|
||||
background-color: $localDropdownBackgroundColor;
|
||||
border-bottom: solid 1px $kuiColorLightGray;
|
||||
border-top: solid 1px $kuiColorLightGray;
|
||||
margin-bottom: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
|
|
@ -1,35 +1,34 @@
|
|||
.kuiLocalMenu {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
padding-top: $euiSizeS;
|
||||
padding-bottom: $euiSizeS;
|
||||
}
|
||||
|
||||
.kuiLocalMenuItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding: 0 $localNavSideSpacing;
|
||||
padding: ($localNavSideSpacing * .25) $localNavSideSpacing;
|
||||
font-size: $kuiFontSize;
|
||||
background-color: $localNavButtonBackgroundColor;
|
||||
color: $localNavButtonTextColor;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
border-right: solid 1px transparent;
|
||||
border-left: solid 1px transparent;
|
||||
border-bottom: solid 2px transparent;
|
||||
|
||||
&:hover, &:focus {
|
||||
background-color: $localNavButtonBackgroundColor-isHover;
|
||||
color: $localNavButtonTextColor-isHover;
|
||||
background-color: rgba($localNavButtonBackgroundColor-isHover, .15);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&.kuiLocalMenuItem-isSelected {
|
||||
background-color: $localNavButtonBackgroundColor-isSelected;
|
||||
border-color: $kuiColorLightGray;
|
||||
height: calc(100% + 1px); // Cheat the border when opened
|
||||
z-index: 2;
|
||||
color: $kuiColorBlue;
|
||||
background-color: $localNavButtonBackgroundColor-isSelected;
|
||||
border-color: $euiColorPrimary;
|
||||
z-index: 2;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $kuiColorBlue;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,8 +37,8 @@
|
|||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
background-color: $localNavButtonBackgroundColor;
|
||||
color: $localNavButtonTextColor;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
display: flex;
|
||||
align-items: stretch;
|
||||
justify-content: space-between;
|
||||
min-height: 29px; /* 1 */
|
||||
line-height: 29px; /* 1 */
|
||||
}
|
||||
|
||||
.kuiLocalNavRow__section {
|
||||
|
@ -40,12 +38,3 @@
|
|||
padding: 0 $localNavSideSpacing; /* 1 */
|
||||
align-items: flex-start; /* 1 */
|
||||
}
|
||||
|
||||
.kuiLocalNav__popover {
|
||||
height: 100%;
|
||||
|
||||
.kuiLocalNav__popoverAnchor {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,16 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding-left: $localNavSideSpacing;
|
||||
padding: ($localNavSideSpacing * 1.5) $localNavSideSpacing;
|
||||
font-size: $kuiFontSize;
|
||||
font-weight: bold;
|
||||
border-bottom: $euiBorderThin;
|
||||
flex-grow: 1;
|
||||
flex-basis: 100%;
|
||||
background-color: $euiColorEmptyShade;
|
||||
|
||||
&:empty {
|
||||
padding: 0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ function processCommand(command, options) {
|
|||
} catch (ex) {
|
||||
//The logger has not yet been initialized.
|
||||
console.error(ex.message);
|
||||
process.exit(64); // eslint-disable-line no-process-exit
|
||||
process.exit(64);
|
||||
}
|
||||
|
||||
const logger = new Logger(settings);
|
||||
|
@ -47,7 +47,6 @@ export default function pluginInstall(program) {
|
|||
.command('install <plugin/url>')
|
||||
.option('-q, --quiet', 'disable all process messaging except errors')
|
||||
.option('-s, --silent', 'disable all process messaging')
|
||||
.option('--no-optimize', 'disable optimization after plugin extraction')
|
||||
.option(
|
||||
'-c, --config <path>',
|
||||
'path to the config file',
|
||||
|
|
|
@ -25,7 +25,7 @@ import { extract, getPackData } from './pack';
|
|||
import { renamePlugin } from './rename';
|
||||
import { sync as rimrafSync } from 'rimraf';
|
||||
import { errorIfXPackInstall } from '../lib/error_if_x_pack';
|
||||
import { existingInstall, rebuildCache, assertVersion } from './kibana';
|
||||
import { existingInstall, assertVersion } from './kibana';
|
||||
import { prepareExternalProjectDependencies } from '@kbn/pm';
|
||||
import mkdirp from 'mkdirp';
|
||||
|
||||
|
@ -55,14 +55,10 @@ export default async function install(settings, logger) {
|
|||
|
||||
await renamePlugin(settings.workingPath, path.join(settings.pluginDir, settings.plugins[0].name));
|
||||
|
||||
if (settings.optimize) {
|
||||
await rebuildCache(settings, logger);
|
||||
}
|
||||
|
||||
logger.log('Plugin installation complete');
|
||||
} catch (err) {
|
||||
logger.error(`Plugin installation was unsuccessful due to error "${err.message}"`);
|
||||
cleanArtifacts(settings);
|
||||
process.exit(70); // eslint-disable-line no-process-exit
|
||||
process.exit(70);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
|
||||
import path from 'path';
|
||||
import execa from 'execa';
|
||||
import { fromRoot, watchStdioForLine } from '../../utils';
|
||||
import { versionSatisfies, cleanVersion } from '../../utils/version';
|
||||
import { statSync } from 'fs';
|
||||
|
||||
|
@ -28,34 +26,15 @@ export function existingInstall(settings, logger) {
|
|||
statSync(path.join(settings.pluginDir, settings.plugins[0].name));
|
||||
|
||||
logger.error(`Plugin ${settings.plugins[0].name} already exists, please remove before installing a new version`);
|
||||
process.exit(70); // eslint-disable-line no-process-exit
|
||||
process.exit(70);
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') throw e;
|
||||
}
|
||||
}
|
||||
|
||||
export async function rebuildCache(settings, logger) {
|
||||
logger.log('Optimizing and caching browser bundles...');
|
||||
|
||||
const kibanaArgs = [
|
||||
fromRoot('./src/cli'),
|
||||
'--env.name=production',
|
||||
'--optimize.useBundleCache=false',
|
||||
'--server.autoListen=false',
|
||||
'--plugins.initialize=false'
|
||||
];
|
||||
|
||||
const proc = execa(process.execPath, kibanaArgs, {
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
cwd: fromRoot('.'),
|
||||
});
|
||||
|
||||
await watchStdioForLine(proc, () => {}, /Optimization .+ complete/);
|
||||
}
|
||||
|
||||
export function assertVersion(settings) {
|
||||
if (!settings.plugins[0].kibanaVersion) {
|
||||
throw new Error (`Plugin package.json is missing both a version property (required) and a kibana.version property (optional).`);
|
||||
throw new Error(`Plugin package.json is missing both a version property (required) and a kibana.version property (optional).`);
|
||||
}
|
||||
|
||||
const actual = cleanVersion(settings.plugins[0].kibanaVersion);
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
export KIBANA_DIR="$dir"
|
||||
export XPACK_DIR="$KIBANA_DIR/x-pack"
|
||||
export PARENT_DIR="$(cd "$KIBANA_DIR/.."; pwd)"
|
||||
export TEST_ES_SNAPSHOT_VERSION="7.0.0-fbd1a09d"
|
||||
|
||||
echo "-> KIBANA_DIR $KIBANA_DIR"
|
||||
echo "-> XPACK_DIR $XPACK_DIR"
|
||||
echo "-> PARENT_DIR $PARENT_DIR"
|
||||
|
|
|
@ -113,6 +113,7 @@ describe('esArchiver: createCreateIndexStream()', () => {
|
|||
sinon.assert.calledWith(client.indices.create, {
|
||||
method: 'PUT',
|
||||
index: 'index',
|
||||
include_type_name: false,
|
||||
body: {
|
||||
settings: undefined,
|
||||
mappings: undefined,
|
||||
|
|
|
@ -44,6 +44,9 @@ export function createCreateIndexStream({ client, stats, skipExisting, log, kiba
|
|||
async function handleIndex(record) {
|
||||
const { index, settings, mappings, aliases } = record.value;
|
||||
|
||||
// Determine if the mapping belongs to a pre-7.0 instance, for BWC tests, mainly
|
||||
const isPre7Mapping = !!mappings && Object.keys(mappings).length > 0 && !mappings.properties;
|
||||
|
||||
async function attemptToCreate(attemptNumber = 1) {
|
||||
try {
|
||||
if (index.startsWith('.kibana')) {
|
||||
|
@ -53,6 +56,7 @@ export function createCreateIndexStream({ client, stats, skipExisting, log, kiba
|
|||
await client.indices.create({
|
||||
method: 'PUT',
|
||||
index,
|
||||
include_type_name: isPre7Mapping,
|
||||
body: { settings, mappings, aliases },
|
||||
});
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ async function getKibanaStatuses({ kibanaUrl }) {
|
|||
export async function createDefaultSpace({ index, client }) {
|
||||
await client.index({
|
||||
index,
|
||||
type: 'doc',
|
||||
type: '_doc',
|
||||
id: 'space:default',
|
||||
body: {
|
||||
type: 'space',
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
* 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 { Deprecations } from '../../../../deprecation';
|
||||
import expect from 'expect.js';
|
||||
import index from '../index';
|
||||
import { noop, set } from 'lodash';
|
||||
import sinon from 'sinon';
|
||||
|
||||
describe('plugins/elasticsearch', function () {
|
||||
describe('#deprecations()', function () {
|
||||
let transformDeprecations;
|
||||
|
||||
before(function () {
|
||||
const Plugin = function (options) {
|
||||
this.deprecations = options.deprecations;
|
||||
};
|
||||
|
||||
const plugin = index({ Plugin });
|
||||
|
||||
const deprecations = plugin.deprecations(Deprecations);
|
||||
transformDeprecations = (settings, log = noop) => {
|
||||
deprecations.forEach(deprecation => deprecation(settings, log));
|
||||
};
|
||||
});
|
||||
|
||||
describe('ssl.verificationMode', function () {
|
||||
let settings;
|
||||
let sslSettings;
|
||||
|
||||
beforeEach(function () {
|
||||
settings = {};
|
||||
sslSettings = {};
|
||||
set(settings, 'ssl', sslSettings);
|
||||
});
|
||||
|
||||
it(`sets verificationMode to none when verify is false`, function () {
|
||||
sslSettings.verify = false;
|
||||
|
||||
transformDeprecations(settings);
|
||||
expect(sslSettings.verificationMode).to.be('none');
|
||||
expect(sslSettings.verify).to.be(undefined);
|
||||
});
|
||||
|
||||
it('should log when deprecating verify from false', function () {
|
||||
sslSettings.verify = false;
|
||||
|
||||
const log = sinon.spy();
|
||||
transformDeprecations(settings, log);
|
||||
expect(log.calledOnce).to.be(true);
|
||||
});
|
||||
|
||||
it('sets verificationMode to full when verify is true', function () {
|
||||
sslSettings.verify = true;
|
||||
|
||||
transformDeprecations(settings);
|
||||
expect(sslSettings.verificationMode).to.be('full');
|
||||
expect(sslSettings.verify).to.be(undefined);
|
||||
});
|
||||
|
||||
it('should log when deprecating verify from true', function () {
|
||||
sslSettings.verify = true;
|
||||
|
||||
const log = sinon.spy();
|
||||
transformDeprecations(settings, log);
|
||||
expect(log.calledOnce).to.be(true);
|
||||
});
|
||||
|
||||
it(`shouldn't set verificationMode when verify isn't present`, function () {
|
||||
transformDeprecations(settings);
|
||||
expect(sslSettings.verificationMode).to.be(undefined);
|
||||
});
|
||||
|
||||
it(`shouldn't log when verify isn't present`, function () {
|
||||
const log = sinon.spy();
|
||||
transformDeprecations(settings, log);
|
||||
expect(log.called).to.be(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
161
src/legacy/core_plugins/elasticsearch/index.d.ts
vendored
|
@ -149,7 +149,7 @@ import {
|
|||
|
||||
export class Cluster {
|
||||
public callWithRequest: CallClusterWithRequest;
|
||||
public callWithInternalUser: CallClusterWithInternalUser;
|
||||
public callWithInternalUser: CallCluster;
|
||||
public constructor(config: ClusterConfig);
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ interface ElasticsearchClientLogging {
|
|||
}
|
||||
|
||||
interface AssistantAPIClientParams extends GenericParams {
|
||||
path: '/_xpack/migration/assistance';
|
||||
path: '/_migration/assistance';
|
||||
method: 'GET';
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ export interface AssistanceAPIResponse {
|
|||
}
|
||||
|
||||
interface DeprecationAPIClientParams extends GenericParams {
|
||||
path: '/_xpack/migration/deprecations';
|
||||
path: '/_migration/deprecations';
|
||||
method: 'GET';
|
||||
}
|
||||
|
||||
|
@ -376,11 +376,156 @@ export interface CallClusterWithRequest {
|
|||
): Promise<T>;
|
||||
}
|
||||
|
||||
export type CallClusterWithInternalUser = <T = any>(
|
||||
endpoint: string,
|
||||
clientParams: GenericParams,
|
||||
options?: CallClusterOptions
|
||||
) => Promise<T>;
|
||||
export interface CallCluster {
|
||||
/* tslint:disable */
|
||||
(endpoint: 'bulk', params: BulkIndexDocumentsParams, options?: CallClusterOptions): ReturnType<ESClient['bulk']>;
|
||||
(endpoint: 'clearScroll', params: ClearScrollParams, options?: CallClusterOptions): ReturnType<ESClient['clearScroll']>;
|
||||
(endpoint: 'count', params: CountParams, options?: CallClusterOptions): ReturnType<ESClient['count']>;
|
||||
(endpoint: 'create', params: CreateDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['create']>;
|
||||
(endpoint: 'delete', params: DeleteDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['delete']>;
|
||||
(endpoint: 'deleteByQuery', params: DeleteDocumentByQueryParams, options?: CallClusterOptions): ReturnType<ESClient['deleteByQuery']>;
|
||||
(endpoint: 'deleteScript', params: DeleteScriptParams, options?: CallClusterOptions): ReturnType<ESClient['deleteScript']>;
|
||||
(endpoint: 'deleteTemplate', params: DeleteTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['deleteTemplate']>;
|
||||
(endpoint: 'exists', params: ExistsParams, options?: CallClusterOptions): ReturnType<ESClient['exists']>;
|
||||
(endpoint: 'explain', params: ExplainParams, options?: CallClusterOptions): ReturnType<ESClient['explain']>;
|
||||
(endpoint: 'fieldStats', params: FieldStatsParams, options?: CallClusterOptions): ReturnType<ESClient['fieldStats']>;
|
||||
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
|
||||
<T>(endpoint: 'get', params: GetParams, options?: CallClusterOptions): Promise<GetResponse<T>>;
|
||||
(endpoint: 'getScript', params: GetScriptParams, options?: CallClusterOptions): ReturnType<ESClient['getScript']>;
|
||||
(endpoint: 'getSource', params: GetSourceParams, options?: CallClusterOptions): ReturnType<ESClient['getSource']>;
|
||||
(endpoint: 'getTemplate', params: GetTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['getTemplate']>;
|
||||
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
|
||||
<T>(endpoint: 'index', params: IndexDocumentParams<T>, options?: CallClusterOptions): ReturnType<ESClient['index']>;
|
||||
(endpoint: 'info', params: InfoParams, options?: CallClusterOptions): ReturnType<ESClient['info']>;
|
||||
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
|
||||
<T>(endpoint: 'mget', params: MGetParams, options?: CallClusterOptions): Promise<MGetResponse<T>>;
|
||||
<T>(endpoint: 'msearch', params: MSearchParams, options?: CallClusterOptions): Promise<MSearchResponse<T>>;
|
||||
<T>(endpoint: 'msearchTemplate', params: MSearchTemplateParams, options?: CallClusterOptions): Promise<MSearchResponse<T>>;
|
||||
(endpoint: 'mtermvectors', params: MTermVectorsParams, options?: CallClusterOptions): ReturnType<ESClient['mtermvectors']>;
|
||||
(endpoint: 'ping', params: PingParams, options?: CallClusterOptions): ReturnType<ESClient['ping']>;
|
||||
(endpoint: 'putScript', params: PutScriptParams, options?: CallClusterOptions): ReturnType<ESClient['putScript']>;
|
||||
(endpoint: 'putTemplate', params: PutTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['putTemplate']>;
|
||||
(endpoint: 'reindex', params: ReindexParams, options?: CallClusterOptions): ReturnType<ESClient['reindex']>;
|
||||
(endpoint: 'reindexRethrottle', params: ReindexRethrottleParams, options?: CallClusterOptions): ReturnType<ESClient['reindexRethrottle']>;
|
||||
(endpoint: 'renderSearchTemplate', params: RenderSearchTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['renderSearchTemplate']>;
|
||||
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
|
||||
<T>(endpoint: 'scroll', params: ScrollParams, options?: CallClusterOptions): Promise<SearchResponse<T>>;
|
||||
<T>(endpoint: 'search', params: SearchParams, options?: CallClusterOptions): Promise<SearchResponse<T>>;
|
||||
(endpoint: 'searchShards', params: SearchShardsParams, options?: CallClusterOptions): ReturnType<ESClient['searchShards']>;
|
||||
(endpoint: 'searchTemplate', params: SearchTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['searchTemplate']>;
|
||||
(endpoint: 'suggest', params: SuggestParams, options?: CallClusterOptions): ReturnType<ESClient['suggest']>;
|
||||
(endpoint: 'termvectors', params: TermvectorsParams, options?: CallClusterOptions): ReturnType<ESClient['termvectors']>;
|
||||
(endpoint: 'update', params: UpdateDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['update']>;
|
||||
(endpoint: 'updateByQuery', params: UpdateDocumentByQueryParams, options?: CallClusterOptions): ReturnType<ESClient['updateByQuery']>;
|
||||
|
||||
// cat namespace
|
||||
(endpoint: 'cat.aliases', params: CatAliasesParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['aliases']>;
|
||||
(endpoint: 'cat.allocation', params: CatAllocationParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['allocation']>;
|
||||
(endpoint: 'cat.count', params: CatAllocationParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['count']>;
|
||||
(endpoint: 'cat.fielddata', params: CatFielddataParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['fielddata']>;
|
||||
(endpoint: 'cat.health', params: CatHealthParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['health']>;
|
||||
(endpoint: 'cat.help', params: CatHelpParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['help']>;
|
||||
(endpoint: 'cat.indices', params: CatIndicesParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['indices']>;
|
||||
(endpoint: 'cat.master', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['master']>;
|
||||
(endpoint: 'cat.nodeattrs', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['nodeattrs']>;
|
||||
(endpoint: 'cat.nodes', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['nodes']>;
|
||||
(endpoint: 'cat.pendingTasks', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['pendingTasks']>;
|
||||
(endpoint: 'cat.plugins', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['plugins']>;
|
||||
(endpoint: 'cat.recovery', params: CatRecoveryParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['recovery']>;
|
||||
(endpoint: 'cat.repositories', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['repositories']>;
|
||||
(endpoint: 'cat.segments', params: CatSegmentsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['segments']>;
|
||||
(endpoint: 'cat.shards', params: CatShardsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['shards']>;
|
||||
(endpoint: 'cat.snapshots', params: CatSnapshotsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['snapshots']>;
|
||||
(endpoint: 'cat.tasks', params: CatTasksParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['tasks']>;
|
||||
(endpoint: 'cat.threadPool', params: CatThreadPoolParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['threadPool']>;
|
||||
|
||||
// cluster namespace
|
||||
(endpoint: 'cluster.allocationExplain', params: ClusterAllocationExplainParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['allocationExplain']>;
|
||||
(endpoint: 'cluster.getSettings', params: ClusterGetSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['getSettings']>;
|
||||
(endpoint: 'cluster.health', params: ClusterHealthParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['health']>;
|
||||
(endpoint: 'cluster.pendingTasks', params: ClusterPendingTasksParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['pendingTasks']>;
|
||||
(endpoint: 'cluster.putSettings', params: ClusterPutSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['putSettings']>;
|
||||
(endpoint: 'cluster.reroute', params: ClusterRerouteParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['reroute']>;
|
||||
(endpoint: 'cluster.state', params: ClusterStateParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['state']>;
|
||||
(endpoint: 'cluster.stats', params: ClusterStatsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['stats']>;
|
||||
|
||||
// indices namespace
|
||||
(endpoint: 'indices.analyze', params: IndicesAnalyzeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['analyze']>;
|
||||
(endpoint: 'indices.clearCache', params: IndicesClearCacheParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['clearCache']>;
|
||||
(endpoint: 'indices.close', params: IndicesCloseParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['close']>;
|
||||
(endpoint: 'indices.create', params: IndicesCreateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['create']>;
|
||||
(endpoint: 'indices.delete', params: IndicesDeleteParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['delete']>;
|
||||
(endpoint: 'indices.deleteAlias', params: IndicesDeleteAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['deleteAlias']>;
|
||||
(endpoint: 'indices.deleteTemplate', params: IndicesDeleteTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['deleteTemplate']>;
|
||||
(endpoint: 'indices.exists', params: IndicesExistsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['exists']>;
|
||||
(endpoint: 'indices.existsAlias', params: IndicesExistsAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsAlias']>;
|
||||
(endpoint: 'indices.existsTemplate', params: IndicesExistsTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsTemplate']>;
|
||||
(endpoint: 'indices.existsType', params: IndicesExistsTypeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsType']>;
|
||||
(endpoint: 'indices.flush', params: IndicesFlushParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['flush']>;
|
||||
(endpoint: 'indices.flushSynced', params: IndicesFlushSyncedParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['flushSynced']>;
|
||||
(endpoint: 'indices.forcemerge', params: IndicesForcemergeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['forcemerge']>;
|
||||
(endpoint: 'indices.get', params: IndicesGetParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['get']>;
|
||||
(endpoint: 'indices.getAlias', params: IndicesGetAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getAlias']>;
|
||||
(endpoint: 'indices.getFieldMapping', params: IndicesGetFieldMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getFieldMapping']>;
|
||||
(endpoint: 'indices.getMapping', params: IndicesGetMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getMapping']>;
|
||||
(endpoint: 'indices.getSettings', params: IndicesGetSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getSettings']>;
|
||||
(endpoint: 'indices.getTemplate', params: IndicesGetTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getTemplate']>;
|
||||
(endpoint: 'indices.getUpgrade', params: IndicesGetUpgradeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getUpgrade']>;
|
||||
(endpoint: 'indices.open', params: IndicesOpenParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['open']>;
|
||||
(endpoint: 'indices.putAlias', params: IndicesPutAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putAlias']>;
|
||||
(endpoint: 'indices.putMapping', params: IndicesPutMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putMapping']>;
|
||||
(endpoint: 'indices.putSettings', params: IndicesPutSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putSettings']>;
|
||||
(endpoint: 'indices.putTemplate', params: IndicesPutTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putTemplate']>;
|
||||
(endpoint: 'indices.recovery', params: IndicesRecoveryParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['recovery']>;
|
||||
(endpoint: 'indices.refresh', params: IndicesRefreshParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['refresh']>;
|
||||
(endpoint: 'indices.rollover', params: IndicesRolloverParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['rollover']>;
|
||||
(endpoint: 'indices.segments', params: IndicesSegmentsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['segments']>;
|
||||
(endpoint: 'indices.shardStores', params: IndicesShardStoresParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['shardStores']>;
|
||||
(endpoint: 'indices.shrink', params: IndicesShrinkParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['shrink']>;
|
||||
(endpoint: 'indices.stats', params: IndicesStatsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['stats']>;
|
||||
(endpoint: 'indices.updateAliases', params: IndicesUpdateAliasesParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['updateAliases']>;
|
||||
(endpoint: 'indices.upgrade', params: IndicesUpgradeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['upgrade']>;
|
||||
(endpoint: 'indices.validateQuery', params: IndicesValidateQueryParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['validateQuery']>;
|
||||
|
||||
// ingest namepsace
|
||||
(endpoint: 'ingest.deletePipeline', params: IngestDeletePipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['deletePipeline']>;
|
||||
(endpoint: 'ingest.getPipeline', params: IngestGetPipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['getPipeline']>;
|
||||
(endpoint: 'ingest.putPipeline', params: IngestPutPipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['putPipeline']>;
|
||||
(endpoint: 'ingest.simulate', params: IngestSimulateParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['simulate']>;
|
||||
|
||||
// nodes namespace
|
||||
(endpoint: 'nodes.hotThreads', params: NodesHotThreadsParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['hotThreads']>;
|
||||
(endpoint: 'nodes.info', params: NodesInfoParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['info']>;
|
||||
(endpoint: 'nodes.stats', params: NodesStatsParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['stats']>;
|
||||
|
||||
// snapshot namespace
|
||||
(endpoint: 'snapshot.create', params: SnapshotCreateParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['create']>;
|
||||
(endpoint: 'snapshot.createRepository', params: SnapshotCreateRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['createRepository']>;
|
||||
(endpoint: 'snapshot.delete', params: SnapshotDeleteParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['delete']>;
|
||||
(endpoint: 'snapshot.deleteRepository', params: SnapshotDeleteRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['deleteRepository']>;
|
||||
(endpoint: 'snapshot.get', params: SnapshotGetParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['get']>;
|
||||
(endpoint: 'snapshot.getRepository', params: SnapshotGetRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['getRepository']>;
|
||||
(endpoint: 'snapshot.restore', params: SnapshotRestoreParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['restore']>;
|
||||
(endpoint: 'snapshot.status', params: SnapshotStatusParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['status']>;
|
||||
(endpoint: 'snapshot.verifyRepository', params: SnapshotVerifyRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['verifyRepository']>;
|
||||
|
||||
// tasks namespace
|
||||
(endpoint: 'tasks.cancel', params: TasksCancelParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['cancel']>;
|
||||
(endpoint: 'tasks.get', params: TasksGetParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['get']>;
|
||||
(endpoint: 'tasks.list', params: TasksListParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['list']>;
|
||||
/* tslint:enable */
|
||||
|
||||
// other APIs accessed via transport.request
|
||||
(endpoint: 'transport.request', clientParams: AssistantAPIClientParams, options?: {}): Promise<
|
||||
AssistanceAPIResponse
|
||||
>;
|
||||
(endpoint: 'transport.request', clientParams: DeprecationAPIClientParams, options?: {}): Promise<
|
||||
DeprecationAPIResponse
|
||||
>;
|
||||
|
||||
// Catch-all definition
|
||||
<T = any>(endpoint: string, clientParams: any, options?: CallClusterOptions): Promise<T>;
|
||||
}
|
||||
|
||||
export interface ElasticsearchPlugin {
|
||||
ElasticsearchClientLogging: ElasticsearchClientLogging;
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import { compact, get, has, set } from 'lodash';
|
||||
import { unset } from '../../../utils';
|
||||
|
||||
import healthCheck from './lib/health_check';
|
||||
import { createDataCluster } from './lib/create_data_cluster';
|
||||
import { createAdminCluster } from './lib/create_admin_cluster';
|
||||
|
@ -67,52 +64,6 @@ export default function (kibana) {
|
|||
}).default();
|
||||
},
|
||||
|
||||
deprecations({ rename }) {
|
||||
const sslVerify = (basePath) => {
|
||||
const getKey = (path) => {
|
||||
return compact([basePath, path]).join('.');
|
||||
};
|
||||
|
||||
return (settings, log) => {
|
||||
const sslSettings = get(settings, getKey('ssl'));
|
||||
|
||||
if (!has(sslSettings, 'verify')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const verificationMode = get(sslSettings, 'verify') ? 'full' : 'none';
|
||||
set(sslSettings, 'verificationMode', verificationMode);
|
||||
unset(sslSettings, 'verify');
|
||||
|
||||
log(`Config key "${getKey('ssl.verify')}" is deprecated. It has been replaced with "${getKey('ssl.verificationMode')}"`);
|
||||
};
|
||||
};
|
||||
|
||||
const url = () => {
|
||||
return (settings, log) => {
|
||||
const deprecatedUrl = get(settings, 'url');
|
||||
const hosts = get(settings, 'hosts.length');
|
||||
if (!deprecatedUrl) {
|
||||
return;
|
||||
}
|
||||
if (hosts) {
|
||||
log('Deprecated config key "elasticsearch.url" conflicts with "elasticsearch.hosts". Ignoring "elasticsearch.url"');
|
||||
} else {
|
||||
set(settings, 'hosts', [deprecatedUrl]);
|
||||
log('Config key "elasticsearch.url" is deprecated. It has been replaced with "elasticsearch.hosts"');
|
||||
}
|
||||
unset(settings, 'url');
|
||||
};
|
||||
};
|
||||
|
||||
return [
|
||||
rename('ssl.ca', 'ssl.certificateAuthorities'),
|
||||
rename('ssl.cert', 'ssl.certificate'),
|
||||
url(),
|
||||
sslVerify(),
|
||||
];
|
||||
},
|
||||
|
||||
uiExports: {
|
||||
injectDefaultVars(server, options) {
|
||||
return {
|
||||
|
|
|
@ -35,7 +35,7 @@ class RequestDetailsStats extends Component {
|
|||
renderStatRow = (stat) => {
|
||||
return [
|
||||
<EuiTableRow
|
||||
key={stat.name}
|
||||
key={stat.id}
|
||||
>
|
||||
<EuiTableRowCell>
|
||||
<span className="insRequestDetailsStats__icon">
|
||||
|
@ -55,7 +55,7 @@ class RequestDetailsStats extends Component {
|
|||
/>
|
||||
}
|
||||
</span>
|
||||
{stat.name}
|
||||
{stat.label}
|
||||
</EuiTableRowCell>
|
||||
<EuiTableRowCell>{stat.value}</EuiTableRowCell>
|
||||
</EuiTableRow>
|
||||
|
@ -64,7 +64,7 @@ class RequestDetailsStats extends Component {
|
|||
|
||||
render() {
|
||||
const { stats } = this.props.request;
|
||||
const sortedStats = Object.keys(stats).sort().map(name => ({ name, ...stats[name] }));
|
||||
const sortedStats = Object.keys(stats).sort().map(id => ({ id, ...stats[id] }));
|
||||
// TODO: Replace by property once available
|
||||
return (
|
||||
<EuiTable
|
||||
|
|
|
@ -21,6 +21,7 @@ import Promise from 'bluebird';
|
|||
import { mkdirp as mkdirpNode } from 'mkdirp';
|
||||
import { resolve } from 'path';
|
||||
|
||||
import { migrations } from './migrations';
|
||||
import manageUuid from './server/lib/manage_uuid';
|
||||
import { searchApi } from './server/routes/api/search';
|
||||
import { scrollSearchApi } from './server/routes/api/scroll_search';
|
||||
|
@ -160,6 +161,8 @@ export default function (kibana) {
|
|||
|
||||
mappings,
|
||||
uiSettingDefaults: getUiSettingDefaults(),
|
||||
|
||||
migrations,
|
||||
},
|
||||
|
||||
preInit: async function (server) {
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
<div class="kuiLocalNav" ng-if="!k7design">
|
||||
<div class="kuiLocalNavRow">
|
||||
<div class="kuiLocalNavRow__section">
|
||||
<div
|
||||
class="kuiLocalTitle"
|
||||
role="heading"
|
||||
aria-level="1"
|
||||
i18n-id="kbn.context.surroundingDocumentsDescription"
|
||||
i18n-default-message="Surrounding Documents in {indexPatternId}"
|
||||
i18n-values="{
|
||||
indexPatternId: contextApp.state.queryParameters.indexPatternId
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kbnTopNav" ng-if="!k7design">
|
||||
<div
|
||||
class="kuiLocalTitle"
|
||||
role="heading"
|
||||
aria-level="1"
|
||||
i18n-id="kbn.context.surroundingDocumentsDescription"
|
||||
i18n-default-message="Surrounding Documents in {indexPatternId}"
|
||||
i18n-values="{
|
||||
indexPatternId: contextApp.state.queryParameters.indexPatternId
|
||||
}"
|
||||
></div>
|
||||
|
||||
<div class="kuiLocalNavRow kuiLocalNavRow--secondary">
|
||||
<div class="kuiLocalTabs">
|
||||
<div class="kuiLocalTab kuiLocalTab-isSelected" >
|
||||
|
|
|
@ -54,8 +54,6 @@ export function showOptionsPopover({
|
|||
const element = (
|
||||
<I18nProvider>
|
||||
<EuiWrappingPopover
|
||||
className="kuiLocalNav__popover"
|
||||
anchorClassName="kuiLocalNav__popoverAnchor"
|
||||
id="popover"
|
||||
button={anchorElement}
|
||||
isOpen={true}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<div data-transclude-slots>
|
||||
<!-- Breadcrumbs. -->
|
||||
<div data-transclude-slot="topLeftCorner" class="kuiLocalBreadcrumbs">
|
||||
<h1 tabindex="0" id="kui_local_breadcrumb" class="kuiLocalBreadcrumb">
|
||||
<span ng-show="opts.savedSearch.id" class="kuiLocalBreadcrumb__emphasis">
|
||||
<h1 tabindex="0" id="kui_local_breadcrumb" class="kuiLocalBreadcrumb" ng-if="opts.savedSearch.id">
|
||||
<span class="kuiLocalBreadcrumb__emphasis">
|
||||
<span data-test-subj="discoverCurrentQuery" ng-bind="opts.savedSearch.lastSavedTitle" ng-hide="k7design"></span>
|
||||
<span
|
||||
id="reload_saved_search"
|
||||
|
@ -17,13 +17,15 @@
|
|||
class="kuiIcon fa-undo small"
|
||||
></span>
|
||||
</span>
|
||||
</h1>
|
||||
<div class="kuiLocalBreadcrumb">
|
||||
<span data-test-subj="discoverQueryHits" class="kuiLocalBreadcrumb__emphasis">{{(hits || 0) | number:0}}</span>
|
||||
<span
|
||||
i18n-id="kbn.discover.hitsPluralTitle"
|
||||
i18n-default-message="{hits, plural, one {hit} other {hits}}"
|
||||
i18n-values="{ hits }"
|
||||
></span>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Search. -->
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
<div ng-controller="doc" class="app-container">
|
||||
<div class="kuiLocalNav" ng-if="!k7design">
|
||||
<div class="kuiLocalNavRow">
|
||||
<div class="kuiLocalNavRow__section">
|
||||
<div
|
||||
class="kuiLocalTitle"
|
||||
i18n-id="kbn.doc.singleDocumentTitle"
|
||||
i18n-default-message="Single Document"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kbnTopNav" ng-if="!k7design">
|
||||
<div
|
||||
class="kuiLocalTitle"
|
||||
i18n-id="kbn.doc.singleDocumentTitle"
|
||||
i18n-default-message="Single Document"
|
||||
></div>
|
||||
<div class="kuiLocalNavRow kuiLocalNavRow--secondary">
|
||||
<div class="kuiLocalTabs">
|
||||
<div
|
||||
|
@ -42,7 +38,7 @@
|
|||
<div
|
||||
class="kuiInfoPanelBody__message"
|
||||
i18n-id="kbn.doc.couldNotFindDocumentsDescription"
|
||||
i18n-default-message="Unfortunately I could not find any documents matching that id, of that type, in that index. I tried really hard. I wanted it to be there. Sometimes I swear documents grow legs and just walk out of the index. Sneaky. I wish I could offer some advice here, something to make you feel better"
|
||||
i18n-default-message="Unfortunately I could not find any documents matching that id, of that type, in that index. I tried really hard. I wanted it to be there. Sometimes I swear documents grow legs and just walk out of the index. Sneaky. I wish I could offer some advice here, something to make you feel better"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -63,7 +59,7 @@
|
|||
<div
|
||||
class="kuiInfoPanelBody__message"
|
||||
i18n-id="kbn.doc.somethingWentWrongDescription"
|
||||
i18n-default-message="Oh no. Something went very wrong. Its not just that I couldn't find your document, I couldn't even try. The index was missing, or the type. Go check out Elasticsearch, something isn't quite right here."
|
||||
i18n-default-message="Oh no. Something went very wrong. Its not just that I couldn't find your document, I couldn't even try. The index was missing, or the type. Go check out Elasticsearch, something isn't quite right here."
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -276,7 +276,7 @@ exports[`apmUiEnabled 1`] = `
|
|||
</strong>
|
||||
<EuiLink
|
||||
color="primary"
|
||||
href="#/management/kibana/index"
|
||||
href="#/management/kibana/index_pattern"
|
||||
style={
|
||||
Object {
|
||||
"display": "block",
|
||||
|
@ -537,7 +537,7 @@ exports[`isNewKibanaInstance 1`] = `
|
|||
</strong>
|
||||
<EuiLink
|
||||
color="primary"
|
||||
href="#/management/kibana/index"
|
||||
href="#/management/kibana/index_pattern"
|
||||
style={
|
||||
Object {
|
||||
"display": "block",
|
||||
|
@ -875,7 +875,7 @@ exports[`mlEnabled 1`] = `
|
|||
</strong>
|
||||
<EuiLink
|
||||
color="primary"
|
||||
href="#/management/kibana/index"
|
||||
href="#/management/kibana/index_pattern"
|
||||
style={
|
||||
Object {
|
||||
"display": "block",
|
||||
|
@ -1136,7 +1136,7 @@ exports[`render 1`] = `
|
|||
</strong>
|
||||
<EuiLink
|
||||
color="primary"
|
||||
href="#/management/kibana/index"
|
||||
href="#/management/kibana/index_pattern"
|
||||
style={
|
||||
Object {
|
||||
"display": "block",
|
||||
|
|
|
@ -246,7 +246,7 @@ const AddDataUi = ({ apmUiEnabled, isNewKibanaInstance, intl, mlEnabled }) => {
|
|||
</strong>
|
||||
<EuiLink
|
||||
style={{ display: 'block', textAlign: 'center' }}
|
||||
href="#/management/kibana/index"
|
||||
href="#/management/kibana/index_pattern"
|
||||
>
|
||||
<FormattedMessage
|
||||
id="kbn.home.addData.yourDataLink"
|
||||
|
|
After Width: | Height: | Size: 392 KiB |
|
@ -51,7 +51,7 @@ uiRoutes
|
|||
});
|
||||
|
||||
require('ui/index_patterns/route_setup/load_default')({
|
||||
whenMissingRedirectTo: '/management/kibana/index'
|
||||
whenMissingRedirectTo: '/management/kibana/index_pattern'
|
||||
});
|
||||
|
||||
export function updateLandingPage(version) {
|
||||
|
|
|
@ -39,7 +39,7 @@ export function getEditBreadcrumbs($route) {
|
|||
MANAGEMENT_BREADCRUMB,
|
||||
{
|
||||
text: indexPattern.title,
|
||||
href: `#/management/kibana/indices/${indexPattern.id}`
|
||||
href: `#/management/kibana/index_patterns/${indexPattern.id}`
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -63,10 +63,10 @@ function updateObjectsTable($scope, $injector, i18n) {
|
|||
$http={$http}
|
||||
perPageConfig={config.get('savedObjects:perPage')}
|
||||
basePath={chrome.getBasePath()}
|
||||
newIndexPatternUrl={kbnUrl.eval('#/management/kibana/index')}
|
||||
newIndexPatternUrl={kbnUrl.eval('#/management/kibana/index_pattern')}
|
||||
getEditUrl={(id, type) => {
|
||||
if (type === 'index-pattern' || type === 'indexPatterns') {
|
||||
return kbnUrl.eval(`#/management/kibana/indices/${id}`);
|
||||
return kbnUrl.eval(`#/management/kibana/index_patterns/${id}`);
|
||||
}
|
||||
const serviceName = typeToServiceName(type);
|
||||
if (!serviceName) {
|
||||
|
|
|
@ -32,13 +32,13 @@ describe('getInAppUrl', () => {
|
|||
|
||||
it('should handle index patterns', () => {
|
||||
expect(getInAppUrl(1, 'index-pattern')).toEqual(
|
||||
'/management/kibana/indices/1'
|
||||
'/management/kibana/index_patterns/1'
|
||||
);
|
||||
expect(getInAppUrl(1, 'index-patterns')).toEqual(
|
||||
'/management/kibana/indices/1'
|
||||
'/management/kibana/index_patterns/1'
|
||||
);
|
||||
expect(getInAppUrl(1, 'indexPatterns')).toEqual(
|
||||
'/management/kibana/indices/1'
|
||||
'/management/kibana/index_patterns/1'
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export function getInAppUrl(id, type) {
|
|||
case 'index-pattern':
|
||||
case 'index-patterns':
|
||||
case 'indexPatterns':
|
||||
return `/management/kibana/indices/${id}`;
|
||||
return `/management/kibana/index_patterns/${id}`;
|
||||
case 'dashboard':
|
||||
case 'dashboards':
|
||||
return `/dashboard/${id}`;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<!-- Breadcrumbs. -->
|
||||
<bread-crumbs
|
||||
data-transclude-slot="topLeftCorner"
|
||||
class="fullWidth"
|
||||
page-title="getVisualizationTitle()"
|
||||
use-links="true"
|
||||
omit-current-page="true"
|
||||
|
@ -18,7 +19,7 @@
|
|||
ng-show="chrome.getVisible()"
|
||||
class="fullWidth"
|
||||
>
|
||||
<div ng-if="vis.type.requiresSearch && state.linked">
|
||||
<div ng-if="vis.type.requiresSearch && state.linked" class="kuiVerticalRhythmSmall">
|
||||
{{ ::'kbn.visualize.linkedToSearchInfoText' | i18n: { defaultMessage: 'Linked to Saved Search' } }}
|
||||
<a
|
||||
href="#/discover/{{savedVis.savedSearch.id}}"
|
||||
|
@ -36,7 +37,7 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<div ng-if="vis.type.requiresSearch && vis.type.options.showQueryBar" class="fullWidth">
|
||||
<div ng-if="vis.type.requiresSearch && vis.type.options.showQueryBar" class="fullWidth kuiVerticalRhythmSmall">
|
||||
<query-bar
|
||||
query="state.query"
|
||||
app-name="'visualize'"
|
||||
|
|
|
@ -104,6 +104,19 @@ describe('NewVisModal', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('filter for visualization types', () => {
|
||||
it('should render as expected', () => {
|
||||
const wrapper = mountWithIntl(
|
||||
<I18nProvider>
|
||||
<NewVisModal isOpen={true} onClose={() => null} visTypesRegistry={visTypes} />
|
||||
</I18nProvider>
|
||||
);
|
||||
const searchBox = wrapper.find('input[data-test-subj="filterVisType"]');
|
||||
searchBox.simulate('change', { target: { value: 'with' } });
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
describe('experimental visualizations', () => {
|
||||
it('should not show experimental visualizations if visualize:enableLabs is false', () => {
|
||||
settingsGet.mockReturnValue(false);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<!-- Breadcrumbs. -->
|
||||
<bread-crumbs
|
||||
data-transclude-slot="topLeftCorner"
|
||||
class="fullWidth"
|
||||
use-links="true"
|
||||
omit-current-page="true"
|
||||
page-title="::'kbn.visualize.newVisWizard.pageTitle' | i18n: { defaultMessage: 'Choose search source' }"
|
||||
|
|
|
@ -30,6 +30,7 @@ import {
|
|||
EuiKeyPadMenuItemButton,
|
||||
EuiModalHeader,
|
||||
EuiModalHeaderTitle,
|
||||
EuiScreenReaderOnly,
|
||||
EuiSpacer,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
|
@ -91,9 +92,30 @@ class TypeSelection extends React.Component<TypeSelectionProps, TypeSelectionSta
|
|||
value={query}
|
||||
onChange={this.onQueryChange}
|
||||
fullWidth
|
||||
data-test-subj="filterVisType"
|
||||
aria-label={i18n.translate(
|
||||
'kbn.visualize.newVisWizard.filterVisTypeAriaLabel',
|
||||
{
|
||||
defaultMessage: 'Filter for a visualization type',
|
||||
}
|
||||
)}
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={1} className="visNewVisDialog__typesWrapper">
|
||||
<EuiScreenReaderOnly>
|
||||
<span aria-live="polite">
|
||||
{query && (
|
||||
<FormattedMessage
|
||||
id="kbn.visualize.newVisWizard.resultsFound"
|
||||
defaultMessage="{resultCount} {resultCount, plural,
|
||||
one {type}
|
||||
other {types}
|
||||
} found"
|
||||
values={{ resultCount: visTypes.filter(type => type.highlighted).length }}
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
</EuiScreenReaderOnly>
|
||||
<EuiKeyPadMenu
|
||||
className="visNewVisDialog__types"
|
||||
data-test-subj="visNewDialogTypes"
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
|
||||
import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions';
|
||||
|
||||
export function awsMetricsSpecProvider(server, context) {
|
||||
const moduleName = 'aws';
|
||||
return {
|
||||
id: 'awsMetrics',
|
||||
name: i18n.translate('kbn.server.tutorials.awsMetrics.nameTitle', {
|
||||
defaultMessage: 'AWS metrics',
|
||||
}),
|
||||
category: TUTORIAL_CATEGORY.METRICS,
|
||||
shortDescription: i18n.translate('kbn.server.tutorials.awsMetrics.shortDescription', {
|
||||
defaultMessage: 'Fetch monitoring metrics for EC2 instances from the AWS APIs and Cloudwatch.',
|
||||
}),
|
||||
longDescription: i18n.translate('kbn.server.tutorials.awsMetrics.longDescription', {
|
||||
defaultMessage: 'The `aws` Metricbeat module fetches monitoring metrics from the AWS APIs and Cloudwatch. \
|
||||
[Learn more]({learnMoreLink}).',
|
||||
values: {
|
||||
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-aws.html',
|
||||
},
|
||||
}),
|
||||
euiIconType: 'logoAWS',
|
||||
isBeta: true,
|
||||
artifacts: {
|
||||
dashboards: [
|
||||
{
|
||||
id: 'c5846400-f7fb-11e8-af03-c999c9dea608',
|
||||
linkLabel: i18n.translate('kbn.server.tutorials.awsMetrics.artifacts.dashboards.linkLabel', {
|
||||
defaultMessage: 'AWS metrics dashboard',
|
||||
}),
|
||||
isOverview: true
|
||||
}
|
||||
],
|
||||
exportedFields: {
|
||||
documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-aws.html'
|
||||
}
|
||||
},
|
||||
completionTimeMinutes: 10,
|
||||
previewImagePath: '/plugins/kibana/home/tutorial_resources/aws_metrics/screenshot.png',
|
||||
onPrem: onPremInstructions(moduleName, null, null, null, context),
|
||||
elasticCloud: cloudInstructions(moduleName),
|
||||
onPremElasticCloud: onPremCloudInstructions(moduleName)
|
||||
};
|
||||
}
|
|
@ -63,6 +63,7 @@ import { prometheusMetricsSpecProvider } from './prometheus_metrics';
|
|||
import { zookeeperMetricsSpecProvider } from './zookeeper_metrics';
|
||||
import { uptimeMonitorsSpecProvider } from './uptime_monitors';
|
||||
import { cloudwatchLogsSpecProvider } from './cloudwatch_logs';
|
||||
import { awsMetricsSpecProvider } from './aws_metrics';
|
||||
|
||||
export function registerTutorials(server) {
|
||||
server.registerTutorial(systemLogsSpecProvider);
|
||||
|
@ -111,4 +112,5 @@ export function registerTutorials(server) {
|
|||
server.registerTutorial(zookeeperMetricsSpecProvider);
|
||||
server.registerTutorial(uptimeMonitorsSpecProvider);
|
||||
server.registerTutorial(cloudwatchLogsSpecProvider);
|
||||
server.registerTutorial(awsMetricsSpecProvider);
|
||||
}
|
||||
|
|
|
@ -777,30 +777,52 @@ export function getUiSettingDefaults() {
|
|||
defaultMessage: 'Time picker quick ranges',
|
||||
}),
|
||||
value: JSON.stringify([
|
||||
{ from: 'now/d', to: 'now/d', display: 'Today', section: 0 },
|
||||
{ from: 'now/w', to: 'now/w', display: 'This week', section: 0 },
|
||||
{ from: 'now/M', to: 'now/M', display: 'This month', section: 0 },
|
||||
{ from: 'now/y', to: 'now/y', display: 'This year', section: 0 },
|
||||
{ from: 'now/d', to: 'now', display: 'Today so far', section: 0 },
|
||||
{ from: 'now/w', to: 'now', display: 'Week to date', section: 0 },
|
||||
{ from: 'now/M', to: 'now', display: 'Month to date', section: 0 },
|
||||
{ from: 'now/y', to: 'now', display: 'Year to date', section: 0 },
|
||||
{ from: 'now/d', to: 'now/d',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.today', { defaultMessage: 'Today' }), section: 0 },
|
||||
{ from: 'now/w', to: 'now/w',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.thisWeek', { defaultMessage: 'This week' }), section: 0 },
|
||||
{ from: 'now/M', to: 'now/M',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.thisMonth', { defaultMessage: 'This month' }), section: 0 },
|
||||
{ from: 'now/y', to: 'now/y',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.thisYear', { defaultMessage: 'This year' }), section: 0 },
|
||||
{ from: 'now/d', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.todaySoFar', { defaultMessage: 'Today so far' }), section: 0 },
|
||||
{ from: 'now/w', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.weekToDate', { defaultMessage: 'Week to date' }), section: 0 },
|
||||
{ from: 'now/M', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.monthToDate', { defaultMessage: 'Month to date' }), section: 0 },
|
||||
{ from: 'now/y', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.yearToDate', { defaultMessage: 'Year to date' }), section: 0 },
|
||||
|
||||
{ from: 'now-15m', to: 'now', display: 'Last 15 minutes', section: 1 },
|
||||
{ from: 'now-30m', to: 'now', display: 'Last 30 minutes', section: 1 },
|
||||
{ from: 'now-1h', to: 'now', display: 'Last 1 hour', section: 1 },
|
||||
{ from: 'now-4h', to: 'now', display: 'Last 4 hours', section: 1 },
|
||||
{ from: 'now-12h', to: 'now', display: 'Last 12 hours', section: 1 },
|
||||
{ from: 'now-24h', to: 'now', display: 'Last 24 hours', section: 1 },
|
||||
{ from: 'now-7d', to: 'now', display: 'Last 7 days', section: 1 },
|
||||
{ from: 'now-15m', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last15Minutes', { defaultMessage: 'Last 15 minutes' }), section: 1 },
|
||||
{ from: 'now-30m', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last30Minutes', { defaultMessage: 'Last 30 minutes' }), section: 1 },
|
||||
{ from: 'now-1h', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last1Hour', { defaultMessage: 'Last 1 hour' }), section: 1 },
|
||||
{ from: 'now-4h', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last4Hours', { defaultMessage: 'Last 4 hours' }), section: 1 },
|
||||
{ from: 'now-12h', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last12Hours', { defaultMessage: 'Last 12 hours' }), section: 1 },
|
||||
{ from: 'now-24h', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last24Hours', { defaultMessage: 'Last 24 hours' }), section: 1 },
|
||||
{ from: 'now-7d', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last7Days', { defaultMessage: 'Last 7 days' }), section: 1 },
|
||||
|
||||
{ from: 'now-30d', to: 'now', display: 'Last 30 days', section: 2 },
|
||||
{ from: 'now-60d', to: 'now', display: 'Last 60 days', section: 2 },
|
||||
{ from: 'now-90d', to: 'now', display: 'Last 90 days', section: 2 },
|
||||
{ from: 'now-6M', to: 'now', display: 'Last 6 months', section: 2 },
|
||||
{ from: 'now-1y', to: 'now', display: 'Last 1 year', section: 2 },
|
||||
{ from: 'now-2y', to: 'now', display: 'Last 2 years', section: 2 },
|
||||
{ from: 'now-5y', to: 'now', display: 'Last 5 years', section: 2 },
|
||||
{ from: 'now-30d', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last30Days', { defaultMessage: 'Last 30 days' }), section: 2 },
|
||||
{ from: 'now-60d', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last60Days', { defaultMessage: 'Last 60 days' }), section: 2 },
|
||||
{ from: 'now-90d', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last90Days', { defaultMessage: 'Last 90 days' }), section: 2 },
|
||||
{ from: 'now-6M', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last6Months', { defaultMessage: 'Last 6 months' }), section: 2 },
|
||||
{ from: 'now-1y', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last1Year', { defaultMessage: 'Last 1 year' }), section: 2 },
|
||||
{ from: 'now-2y', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last2Years', { defaultMessage: 'Last 2 years' }), section: 2 },
|
||||
{ from: 'now-5y', to: 'now',
|
||||
display: i18n.translate('kbn.advancedSettings.timepicker.last5Years', { defaultMessage: 'Last 5 years' }), section: 2 },
|
||||
|
||||
], null, 2),
|
||||
type: 'json',
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { migrations } from './migrations';
|
||||
|
||||
export default function (kibana) {
|
||||
|
||||
|
@ -28,7 +27,6 @@ export default function (kibana) {
|
|||
'plugins/table_vis/table_vis'
|
||||
],
|
||||
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
|
||||
migrations,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 0 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.table-vis-container {
|
||||
|
|
|
@ -8,11 +8,9 @@
|
|||
<span ng-show="opts.savedSheet.id && !k7design">
|
||||
{{opts.savedSheet.lastSavedTitle}}
|
||||
|
||||
<span class="fa fa-bolt" ng-click="showStats = !showStats"></span>
|
||||
|
||||
</span>
|
||||
|
||||
<span class="timApp__stats" ng-show="stats && (showStats || k7design)">
|
||||
<span class="timApp__stats" ng-show="stats">
|
||||
<span
|
||||
i18n-id="timelion.topNavMenu.statsDescription"
|
||||
i18n-default-message="Query Time {queryTime}ms / Processing Time {processingTime}ms"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
i18n-default-message="Sheet options"
|
||||
></h2>
|
||||
|
||||
<div>
|
||||
<div class="clearfix">
|
||||
<div class="form-group col-md-6">
|
||||
<label
|
||||
for="timelionColCount"
|
||||
|
|
|
@ -64,7 +64,6 @@ const deprecations = [
|
|||
rename('optimize.lazyHost', 'optimize.watchHost'),
|
||||
rename('optimize.lazyPrebuild', 'optimize.watchPrebuild'),
|
||||
rename('optimize.lazyProxyTimeout', 'optimize.watchProxyTimeout'),
|
||||
rename('i18n.defaultLocale', 'i18n.locale'),
|
||||
savedObjectsIndexCheckTimeout,
|
||||
rewriteBasePath,
|
||||
loggingTimezone,
|
||||
|
|
12
src/server/kbn_server.d.ts
vendored
|
@ -18,9 +18,10 @@
|
|||
*/
|
||||
|
||||
import { Server } from 'hapi';
|
||||
|
||||
import { CallClusterWithRequest, ElasticsearchPlugin } from '../legacy/core_plugins/elasticsearch';
|
||||
import { IndexPatternsServiceFactory } from './index_patterns';
|
||||
import { SavedObjectsService } from './saved_objects';
|
||||
import { SavedObjectsClient, SavedObjectsService } from './saved_objects';
|
||||
|
||||
export interface KibanaConfig {
|
||||
get<T>(key: string): T;
|
||||
|
@ -31,6 +32,7 @@ declare module 'hapi' {
|
|||
interface PluginProperties {
|
||||
elasticsearch: ElasticsearchPlugin;
|
||||
kibana: any;
|
||||
spaces: any;
|
||||
// add new plugin types here
|
||||
}
|
||||
|
||||
|
@ -41,11 +43,9 @@ declare module 'hapi' {
|
|||
}
|
||||
|
||||
interface Request {
|
||||
getBasePath: () => string;
|
||||
}
|
||||
|
||||
interface Request {
|
||||
getUiSettingsService: () => any;
|
||||
getSavedObjectsClient(): SavedObjectsClient;
|
||||
getBasePath(): string;
|
||||
getUiSettingsService(): any;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
export {
|
||||
getTypes,
|
||||
getRootType,
|
||||
getProperty,
|
||||
getRootProperties,
|
||||
getRootPropertiesObjects,
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
import toPath from 'lodash/internal/toPath';
|
||||
|
||||
import { getRootType } from './get_root_type';
|
||||
|
||||
/**
|
||||
* Recursively read properties from the mapping object of type "object"
|
||||
* until the `path` is resolved.
|
||||
|
@ -53,7 +51,7 @@ function getPropertyMappingFromObjectMapping(mapping, path) {
|
|||
*/
|
||||
export function getProperty(mappings, path) {
|
||||
return getPropertyMappingFromObjectMapping(
|
||||
mappings[getRootType(mappings)],
|
||||
mappings,
|
||||
toPath(path)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,26 +20,24 @@
|
|||
import { getProperty } from './get_property';
|
||||
|
||||
const MAPPINGS = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {
|
||||
name: {
|
||||
type: 'text'
|
||||
},
|
||||
description: {
|
||||
type: 'text'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {
|
||||
name: {
|
||||
type: 'text'
|
||||
},
|
||||
description: {
|
||||
type: 'text'
|
||||
}
|
||||
},
|
||||
bar: {
|
||||
properties: {
|
||||
baz: {
|
||||
type: 'text',
|
||||
fields: {
|
||||
box: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
},
|
||||
bar: {
|
||||
properties: {
|
||||
baz: {
|
||||
type: 'text',
|
||||
fields: {
|
||||
box: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,28 +56,28 @@ function runTest(key, mapping) {
|
|||
describe('getProperty(mappings, path)', () => {
|
||||
describe('string key', () => {
|
||||
it('finds root properties', () => {
|
||||
runTest('foo', MAPPINGS.rootType.properties.foo);
|
||||
runTest('foo', MAPPINGS.properties.foo);
|
||||
});
|
||||
it('finds nested properties', () => {
|
||||
runTest('foo.name', MAPPINGS.rootType.properties.foo.properties.name);
|
||||
runTest('foo.description', MAPPINGS.rootType.properties.foo.properties.description);
|
||||
runTest('bar.baz', MAPPINGS.rootType.properties.bar.properties.baz);
|
||||
runTest('foo.name', MAPPINGS.properties.foo.properties.name);
|
||||
runTest('foo.description', MAPPINGS.properties.foo.properties.description);
|
||||
runTest('bar.baz', MAPPINGS.properties.bar.properties.baz);
|
||||
});
|
||||
it('finds nested multi-fields', () => {
|
||||
runTest('bar.baz.box', MAPPINGS.rootType.properties.bar.properties.baz.fields.box);
|
||||
runTest('bar.baz.box', MAPPINGS.properties.bar.properties.baz.fields.box);
|
||||
});
|
||||
});
|
||||
describe('array of string keys', () => {
|
||||
it('finds root properties', () => {
|
||||
runTest(['foo'], MAPPINGS.rootType.properties.foo);
|
||||
runTest(['foo'], MAPPINGS.properties.foo);
|
||||
});
|
||||
it('finds nested properties', () => {
|
||||
runTest(['foo', 'name'], MAPPINGS.rootType.properties.foo.properties.name);
|
||||
runTest(['foo', 'description'], MAPPINGS.rootType.properties.foo.properties.description);
|
||||
runTest(['bar', 'baz'], MAPPINGS.rootType.properties.bar.properties.baz);
|
||||
runTest(['foo', 'name'], MAPPINGS.properties.foo.properties.name);
|
||||
runTest(['foo', 'description'], MAPPINGS.properties.foo.properties.description);
|
||||
runTest(['bar', 'baz'], MAPPINGS.properties.bar.properties.baz);
|
||||
});
|
||||
it('finds nested multi-fields', () => {
|
||||
runTest(['bar', 'baz', 'box'], MAPPINGS.rootType.properties.bar.properties.baz.fields.box);
|
||||
runTest(['bar', 'baz', 'box'], MAPPINGS.properties.bar.properties.baz.fields.box);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import { getRootType } from './get_root_type';
|
||||
|
||||
/**
|
||||
* Get the property mappings for the root type in the EsMappingsDsl
|
||||
*
|
||||
|
@ -34,12 +32,10 @@ import { getRootType } from './get_root_type';
|
|||
* This data can be found at `{indexName}.mappings.{typeName}.properties`
|
||||
* in the es indices.get() response.
|
||||
*
|
||||
* @param {EsMappingsDsl} mappings
|
||||
* @param {EsMappingsDsl} mapping
|
||||
* @return {EsPropertyMappings}
|
||||
*/
|
||||
export function getRootProperties(mappings) {
|
||||
const mapping = mappings[getRootType(mappings)];
|
||||
|
||||
export function getRootProperties(mapping) {
|
||||
if (mapping.type !== 'object' && !mapping.properties) {
|
||||
throw new TypeError('Unable to get property names non-object root mapping');
|
||||
}
|
||||
|
|
|
@ -21,11 +21,9 @@ import { getRootPropertiesObjects } from './get_root_properties_objects';
|
|||
|
||||
test(`returns single object with properties`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {}
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -40,11 +38,9 @@ test(`returns single object with properties`, () => {
|
|||
|
||||
test(`returns single object with type === 'object'`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'object'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'object'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -59,14 +55,12 @@ test(`returns single object with type === 'object'`, () => {
|
|||
|
||||
test(`returns two objects with properties`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {}
|
||||
},
|
||||
bar: {
|
||||
properties: {}
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {}
|
||||
},
|
||||
bar: {
|
||||
properties: {}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -84,14 +78,12 @@ test(`returns two objects with properties`, () => {
|
|||
|
||||
test(`returns two objects with type === 'object'`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'object'
|
||||
},
|
||||
bar: {
|
||||
type: 'object'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'object'
|
||||
},
|
||||
bar: {
|
||||
type: 'object'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -109,11 +101,9 @@ test(`returns two objects with type === 'object'`, () => {
|
|||
|
||||
test(`excludes objects without properties and type of keyword`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'keyword'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -124,14 +114,12 @@ test(`excludes objects without properties and type of keyword`, () => {
|
|||
|
||||
test(`excludes two objects without properties and type of keyword`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'keyword'
|
||||
},
|
||||
bar: {
|
||||
type: 'keyword'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'keyword'
|
||||
},
|
||||
bar: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -142,14 +130,12 @@ test(`excludes two objects without properties and type of keyword`, () => {
|
|||
|
||||
test(`includes one object with properties and excludes one object without properties`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {}
|
||||
},
|
||||
bar: {
|
||||
type: 'keyword'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
properties: {}
|
||||
},
|
||||
bar: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -164,14 +150,12 @@ test(`includes one object with properties and excludes one object without proper
|
|||
|
||||
test(`includes one object with type === 'object' and excludes one object without properties`, () => {
|
||||
const mappings = {
|
||||
rootType: {
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'object'
|
||||
},
|
||||
bar: {
|
||||
type: 'keyword'
|
||||
}
|
||||
properties: {
|
||||
foo: {
|
||||
type: 'object'
|
||||
},
|
||||
bar: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* 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 { getTypes } from './get_types';
|
||||
|
||||
/**
|
||||
* Get the singular root type in the EsMappingsDsl
|
||||
* object. If there are no types, or there are more
|
||||
* that one type, this function will throw an error.
|
||||
*
|
||||
* @param {EsMappingsDsl} mappings
|
||||
* @return {string}
|
||||
*/
|
||||
export function getRootType(mappings) {
|
||||
const allTypes = getTypes(mappings);
|
||||
|
||||
if (allTypes.length !== 1) {
|
||||
throw new TypeError(`Unable to get root type of mappings object with ${allTypes.length} root types.`);
|
||||
}
|
||||
|
||||
return allTypes[0];
|
||||
}
|
|
@ -19,6 +19,5 @@
|
|||
|
||||
export { getProperty } from './get_property';
|
||||
export { getTypes } from './get_types';
|
||||
export { getRootType } from './get_root_type';
|
||||
export { getRootProperties } from './get_root_properties';
|
||||
export { getRootPropertiesObjects } from './get_root_properties_objects';
|
||||
|
|
|
@ -113,9 +113,7 @@ export const createInstallRoute = () => ({
|
|||
}
|
||||
},
|
||||
mappings: {
|
||||
_doc: {
|
||||
properties: dataIndexConfig.fields
|
||||
}
|
||||
properties: dataIndexConfig.fields
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,36 +2,34 @@
|
|||
|
||||
exports[`buildActiveMappings combines all mappings and includes core mappings 1`] = `
|
||||
Object {
|
||||
"doc": Object {
|
||||
"dynamic": "strict",
|
||||
"properties": Object {
|
||||
"aaa": Object {
|
||||
"type": "text",
|
||||
},
|
||||
"bbb": Object {
|
||||
"type": "long",
|
||||
},
|
||||
"config": Object {
|
||||
"dynamic": "true",
|
||||
"properties": Object {
|
||||
"buildNum": Object {
|
||||
"type": "keyword",
|
||||
},
|
||||
"dynamic": "strict",
|
||||
"properties": Object {
|
||||
"aaa": Object {
|
||||
"type": "text",
|
||||
},
|
||||
"bbb": Object {
|
||||
"type": "long",
|
||||
},
|
||||
"config": Object {
|
||||
"dynamic": "true",
|
||||
"properties": Object {
|
||||
"buildNum": Object {
|
||||
"type": "keyword",
|
||||
},
|
||||
},
|
||||
"migrationVersion": Object {
|
||||
"dynamic": "true",
|
||||
"type": "object",
|
||||
},
|
||||
"namespace": Object {
|
||||
"type": "keyword",
|
||||
},
|
||||
"type": Object {
|
||||
"type": "keyword",
|
||||
},
|
||||
"updated_at": Object {
|
||||
"type": "date",
|
||||
},
|
||||
},
|
||||
"migrationVersion": Object {
|
||||
"dynamic": "true",
|
||||
"type": "object",
|
||||
},
|
||||
"namespace": Object {
|
||||
"type": "keyword",
|
||||
},
|
||||
"type": Object {
|
||||
"type": "keyword",
|
||||
},
|
||||
"updated_at": Object {
|
||||
"type": "date",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ Array [
|
|||
"index": Object {
|
||||
"_id": "niceguy:fredrogers",
|
||||
"_index": ".myalias",
|
||||
"_type": "doc",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
|
@ -25,7 +24,6 @@ Array [
|
|||
"index": Object {
|
||||
"_id": "badguy:rickygervais",
|
||||
"_index": ".myalias",
|
||||
"_type": "doc",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
|
|
|
@ -39,10 +39,8 @@ export function buildActiveMappings({
|
|||
}): IndexMapping {
|
||||
const mapping = defaultMapping();
|
||||
return _.cloneDeep({
|
||||
doc: {
|
||||
...mapping.doc,
|
||||
properties: validateAndMerge(mapping.doc.properties, properties),
|
||||
},
|
||||
...mapping,
|
||||
properties: validateAndMerge(mapping.properties, properties),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,30 +51,28 @@ export function buildActiveMappings({
|
|||
*/
|
||||
function defaultMapping(): IndexMapping {
|
||||
return {
|
||||
doc: {
|
||||
dynamic: 'strict',
|
||||
properties: {
|
||||
config: {
|
||||
dynamic: 'true',
|
||||
properties: {
|
||||
buildNum: {
|
||||
type: 'keyword',
|
||||
},
|
||||
dynamic: 'strict',
|
||||
properties: {
|
||||
config: {
|
||||
dynamic: 'true',
|
||||
properties: {
|
||||
buildNum: {
|
||||
type: 'keyword',
|
||||
},
|
||||
},
|
||||
migrationVersion: {
|
||||
dynamic: 'true',
|
||||
type: 'object',
|
||||
},
|
||||
type: {
|
||||
type: 'keyword',
|
||||
},
|
||||
namespace: {
|
||||
type: 'keyword',
|
||||
},
|
||||
updated_at: {
|
||||
type: 'date',
|
||||
},
|
||||
},
|
||||
migrationVersion: {
|
||||
dynamic: 'true',
|
||||
type: 'object',
|
||||
},
|
||||
type: {
|
||||
type: 'keyword',
|
||||
},
|
||||
namespace: {
|
||||
type: 'keyword',
|
||||
},
|
||||
updated_at: {
|
||||
type: 'date',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|