Skip to content

Commit

Permalink
Merge branch 'main' into onWeek/dashboardNavigation
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored May 17, 2023
2 parents 55dd8e2 + 60513d3 commit f27cbd2
Show file tree
Hide file tree
Showing 108 changed files with 1,534 additions and 1,420 deletions.
135 changes: 1 addition & 134 deletions api_docs/observability.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -12065,124 +12065,6 @@
}
]
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin",
"type": "Object",
"tags": [],
"label": "[profilingElasticsearchPlugin]",
"description": [],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.category",
"type": "Array",
"tags": [],
"label": "category",
"description": [],
"signature": [
"string[]"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.name",
"type": "Any",
"tags": [],
"label": "name",
"description": [],
"signature": [
"any"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.description",
"type": "Any",
"tags": [],
"label": "description",
"description": [],
"signature": [
"any"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.schema",
"type": "Object",
"tags": [],
"label": "schema",
"description": [],
"signature": [
{
"pluginId": "@kbn/config-schema",
"scope": "common",
"docId": "kibKbnConfigSchemaPluginApi",
"section": "def-common.Type",
"text": "Type"
},
"<boolean>"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.value",
"type": "boolean",
"tags": [],
"label": "value",
"description": [],
"signature": [
"true"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.requiresPageReload",
"type": "boolean",
"tags": [],
"label": "requiresPageReload",
"description": [],
"signature": [
"true"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.type",
"type": "string",
"tags": [],
"label": "type",
"description": [],
"signature": [
"\"boolean\""
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.syntheticsThrottlingEnabled",
Expand Down Expand Up @@ -13185,21 +13067,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "observability",
"id": "def-common.profilingElasticsearchPlugin",
"type": "string",
"tags": [],
"label": "profilingElasticsearchPlugin",
"description": [],
"signature": [
"\"observability:profilingElasticsearchPlugin\""
],
"path": "x-pack/plugins/observability/common/ui_settings_keys.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "observability",
"id": "def-common.ruleDetailsLocatorID",
Expand Down Expand Up @@ -13536,4 +13403,4 @@
],
"objects": []
}
}
}
2 changes: 1 addition & 1 deletion config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Disable APM and Uptime, enable Enterprise Search
xpack.apm.enabled: false
xpack.uptime.enabled: false
enterpriseSearch.enabled: true
enterpriseSearch.enabled: false

## Enable the Serverless Search plugin
xpack.serverless.search.enabled: true
Expand Down
8 changes: 7 additions & 1 deletion docs/api-generated/rules/rule-apis-passthru.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
"api_key_created_by_user" : false,
"params" : {
"key" : ""
},
Expand Down Expand Up @@ -407,6 +408,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
"api_key_created_by_user" : false,
"params" : {
"key" : ""
},
Expand Down Expand Up @@ -473,6 +475,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
"api_key_created_by_user" : false,
"params" : {
"key" : ""
},
Expand Down Expand Up @@ -654,6 +657,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
"api_key_created_by_user" : false,
"params" : {
"key" : ""
},
Expand Down Expand Up @@ -2012,6 +2016,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
"api_key_created_by_user" : false,
"params" : {
"key" : ""
},
Expand Down Expand Up @@ -2566,7 +2571,8 @@ Any modifications made to this file will be overwritten.
<div class='model-description'></div>
<div class="field-items">
<div class="param">actions </div><div class="param-desc"><span class="param-type"><a href="#actions_inner">array[actions_inner]</a></span> </div>
<div class="param">api_key_owner </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>
<div class="param">api_key_created_by_user (optional)</div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the API key that is associated with the rule was created by the user. </div>
<div class="param">api_key_owner </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The owner of the API key that is associated with the rule and used to run background tasks. </div>
<div class="param">consumer </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The application or feature that owns the rule. For example, <code>alerts</code>, <code>apm</code>, <code>discover</code>, <code>infrastructure</code>, <code>logs</code>, <code>metrics</code>, <code>ml</code>, <code>monitoring</code>, <code>securitySolution</code>, <code>siem</code>, <code>stackAlerts</code>, or <code>uptime</code>. </div>
<div class="param">created_at </div><div class="param-desc"><span class="param-type"><a href="#DateTime">Date</a></span> The date and time that the rule was created. format: date-time</div>
<div class="param">created_by </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The identifier for the user that created the rule. </div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/management/maintenance-windows/maintenance-windows.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[[maintenance-windows]]
== Maintenance windows
:description: Maintenance windows enable you to suppress rule notifications.
:tags-products: [kibana, alerting]
:tags-content-type: [overview]
:tags-user-goals: [manage]

preview::[]

You can schedule single or recurring maintenance windows to temporarily reduce rule notifications.
For example, a maintenance window prevents false alarms during planned outages.

Maintenance windows affect all rules in all {kib} apps and spaces.
Alerts continue to be generated, however notifications are suppressed as follows:

- When an alert occurs during a maintenance window, there are no notifications.
When the alert recovers, there are no notifications--even if the recovery occurs after the maintenance window ends.
- When an alert occurs before a maintenance window and recovers during or after the maintenance window, notifications are sent as usual.

[discrete]
[[setup-maintenance-windows]]
== Configure access to maintenance windows

To use maintenance windows, you must have the appropriate {subscriptions}[subscription] and {kib} feature privileges.

- To have full access to maintenance windows, you must have `All` privileges for the *Management > Maintenance Windows* feature.
- To have view-only access to maintenance windows, you must have `Read` privileges for the **Management > Maintenance Windows* feature.

For more details, refer to <<kibana-privileges>>.

[discrete]
[[manage-maintenance-windows]]
== Create and manange maintenance windows

In *Management > {stack-manage-app} > Maintenance Windows*, you can create, edit, and archive maintenance windows.

When you create a maintenance window, you must provide a name and a schedule.
You can optionally configure it to repeat daily, monthly, yearly, or on a custom interval.

[role="screenshot"]
image::images/create-maintenance-window.png[The Create Maintenance Window user interface in {kib}]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

A maintenance window can have any one of the following statuses:

- `Upcoming`: It will run at the scheduled date and time.
- `Running`: It is running.
- `Finished`: It ended and does not have a repeat schedule.
- `Archived`: It is archived. In a future release, archived maintenance windows will be queued for deletion.
1 change: 1 addition & 0 deletions docs/user/alerting/create-and-manage-rules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ image:images/snooze-panel.png[Snooze notifications for a rule]
When a rule is in a snoozed state, you can cancel or change the duration of
this state.

preview:[] To temporarily suppress notifications for _all_ rules, create a <<maintenance-windows,maintenance window>>.

[float]
[[importing-and-exporting-rules]]
Expand Down
5 changes: 5 additions & 0 deletions docs/user/management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ Viewer or Anomaly Explorer to see your {anomaly-detect} results.
For example, you might create an alert when the maximum total CPU usage on a machine goes
above a certain percentage.

| <<maintenance-windows,Maintenance windows>>
| Suppress rule notifications for scheduled periods of time.

|===

[float]
Expand Down Expand Up @@ -184,6 +187,8 @@ include::{kib-repo-dir}/management/action-types.asciidoc[]

include::{kib-repo-dir}/management/managing-licenses.asciidoc[]

include::{kib-repo-dir}/management/maintenance-windows/maintenance-windows.asciidoc[]

include::{kib-repo-dir}/management/manage-data-views.asciidoc[]

include::{kib-repo-dir}/management/numeral.asciidoc[]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@
"vega-tooltip": "^0.28.0",
"vinyl": "^2.2.0",
"whatwg-fetch": "^3.0.0",
"xml2js": "^0.4.22",
"xml2js": "^0.5.0",
"xstate": "^4.37.2",
"xterm": "^5.1.0",
"yauzl": "^2.10.0",
Expand Down Expand Up @@ -1316,7 +1316,7 @@
"@types/webpack-merge": "^4.1.5",
"@types/webpack-sources": "^0.1.4",
"@types/xml-crypto": "^1.4.2",
"@types/xml2js": "^0.4.5",
"@types/xml2js": "^0.4.11",
"@types/yargs": "^15.0.0",
"@types/yauzl": "^2.9.1",
"@types/yazl": "^2.4.2",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
indexAction: `${KIBANA_DOCS}index-action-type.html`,
esQuery: `${KIBANA_DOCS}rule-type-es-query.html`,
indexThreshold: `${KIBANA_DOCS}rule-type-index-threshold.html`,
maintenanceWindows: `${KIBANA_DOCS}maintenance-windows.html`,
pagerDutyAction: `${KIBANA_DOCS}pagerduty-action-type.html`,
preconfiguredConnectors: `${KIBANA_DOCS}pre-configured-connectors.html`,
preconfiguredAlertHistoryConnector: `${KIBANA_DOCS}index-action-type.html#preconfigured-connector-alert-history`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ export interface DocLinks {
indexAction: string;
esQuery: string;
indexThreshold: string;
maintenanceWindows: string;
pagerDutyAction: string;
preconfiguredConnectors: string;
preconfiguredAlertHistoryConnector: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pageLoadAssetSize:
securitySolution: 66738
serverless: 16573
serverlessObservability: 30000
serverlessSearch: 25600
serverlessSearch: 26000
serverlessSecurity: 41807
sessionView: 77750
share: 71239
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import { memoize } from 'lodash';

import dateMath from '@kbn/datemath';
import { CoreStart } from '@kbn/core/public';
import { getEsQueryConfig } from '@kbn/data-plugin/common';
import { buildEsQuery, type TimeRange } from '@kbn/es-query';
import { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public';

Expand All @@ -24,10 +26,12 @@ import { ControlsPluginStartDeps } from '../../types';
import { ControlsOptionsListService } from './types';

class OptionsListService implements ControlsOptionsListService {
private core: CoreStart;
private data: ControlsDataService;
private http: ControlsHTTPService;

constructor(requiredServices: OptionsListServiceRequiredServices) {
constructor(core: CoreStart, requiredServices: OptionsListServiceRequiredServices) {
this.core = core;
({ data: this.data, http: this.http } = requiredServices);
}

Expand Down Expand Up @@ -85,7 +89,8 @@ class OptionsListService implements ControlsOptionsListService {
const { query, filters, dataView, timeRange, field, ...passThroughProps } = request;
const timeFilter = timeRange ? timeService.createFilter(dataView, timeRange) : undefined;
const filtersToUse = [...(filters ?? []), ...(timeFilter ? [timeFilter] : [])];
const esFilters = [buildEsQuery(dataView, query ?? [], filtersToUse ?? [])];
const config = getEsQueryConfig(this.core.uiSettings);
const esFilters = [buildEsQuery(dataView, query ?? [], filtersToUse ?? [], config)];

return {
...passThroughProps,
Expand Down Expand Up @@ -145,5 +150,5 @@ export type OptionsListServiceFactory = KibanaPluginServiceFactory<
>;

export const optionsListServiceFactory: OptionsListServiceFactory = (core, requiredServices) => {
return new OptionsListService(requiredServices);
return new OptionsListService(core.coreStart, requiredServices);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
border-radius: 0;
}

.embPanel__content {
border-radius: 0;
}

.dshDashboardGrid__item--highlighted {
border-radius: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ async function mountComponent(
state: { columns: [], query, hideChart: false, interval: 'auto' },
stateContainer,
setExpandedDoc: jest.fn(),
persistDataView: jest.fn(),
updateDataViewList: jest.fn(),
};
stateContainer.searchSessionManager = createSearchSessionMock(session).searchSessionManager;
Expand Down
Loading

0 comments on commit f27cbd2

Please sign in to comment.