Skip to content

Commit

Permalink
Merge branch 'master' into eui/23.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed May 6, 2020
2 parents dbebb59 + c00b36e commit 295d3e7
Show file tree
Hide file tree
Showing 235 changed files with 3,163 additions and 1,227 deletions.
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"src/plugins/telemetry",
"src/plugins/telemetry_management_section"
],
"tileMap": "src/legacy/core_plugins/tile_map",
"tileMap": "src/plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/plugins/vis_type_timelion"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
Expand Down
Binary file modified docs/management/alerting/images/alerts-and-actions-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/alerting/images/alerts-details-muting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/alerting/images/alerts-filter-by-action-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/alerting/images/alerts-filter-by-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/alerting/images/individual-mute-disable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/user/alerting/defining-alerts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ image::images/alert-flyout-sections.png[The three sections of an alert definitio
All alert share the following four properties in common:

[role="screenshot"]
image::images/alert-flyout-general-details.png[All alerts have name, tags, check every, and re-notify every properties in common]
image::images/alert-flyout-general-details.png[alt='All alerts have name, tags, check every, and notify every properties in common']

Name:: The name of the alert. While this name does not have to be unique, the name can be referenced in actions and also appears in the searchable alert listing in the management UI. A distinctive name can help identify and find an alert.
Tags:: A list of tag names that can be applied to an alert. Tags can help you organize and find alerts, because tags appear in the alert listing in the management UI which is searchable by tag.
Check every:: This value determines how frequently the alert conditions below are checked. Note that the timing of background alert checks are not guaranteed, particularly for intervals of less than 10 seconds. See <<alerting-scale-performance>> for more information.
Re-notify every:: This value limits how often actions are repeated when an alert instance remains active across alert checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information.
Notify every:: This value limits how often actions are repeated when an alert instance remains active across alert checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information.

[float]
[[defining-alerts-type-conditions]]
Expand Down
Binary file modified docs/user/alerting/images/alert-flyout-action-type-selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/alert-flyout-alert-conditions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/alert-flyout-alert-type-selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/alert-flyout-general-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/alert-types-index-threshold-select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/alerting-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions docs/visualize/timelion.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ To start tracking the real-time percentage of CPU, enter the following in the *T

[source,text]
----------------------------------
.es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct')
.es(index=metricbeat-*,
timefield='@timestamp',
metric='avg:system.cpu.user.pct')
----------------------------------

[role="screenshot"]
Expand Down Expand Up @@ -70,7 +72,12 @@ To easily distinguish between the two data sets, add the label names:

[source,text]
----------------------------------
.es(offset=-1h,index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('last hour'), .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current hour') <1>
.es(offset=-1h,index=metricbeat-*,
timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('last hour'),
.es(index=metricbeat-*,
timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('current hour') <1>
----------------------------------

<1> `.label()` adds custom labels to the visualization.
Expand Down
4 changes: 2 additions & 2 deletions src/core/public/chrome/ui/_loading_indicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $kbnLoadingIndicatorColor2: tint($euiColorAccent, 60%);
top: 0; // 1
left: 0; // 1
right: 0; // 1
z-index: $euiZLevel1; // 1
z-index: $euiZLevel2; // 1
overflow: hidden; // 2
height: $euiSizeXS / 2;

Expand All @@ -28,7 +28,7 @@ $kbnLoadingIndicatorColor2: tint($euiColorAccent, 60%);
right: 0;
bottom: 0;
position: absolute;
z-index: $euiZLevel1 + 1;
z-index: $euiZLevel2 + 1;
visibility: visible;
display: block;
animation: kbn-animate-loading-indicator 2s linear infinite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import Bluebird from 'bluebird';
import expect from '@kbn/expect';
import ngMock from 'ng_mock';
import $ from 'jquery';

import 'leaflet/dist/leaflet.js';
import 'leaflet-vega';
// Will be replaced with new path when tests are moved
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { createVegaVisualization } from '../../../../../../plugins/vis_type_vega/public/vega_visualization';
Expand Down Expand Up @@ -100,6 +103,39 @@ describe('VegaVisualizations', () => {
setSavedObjects(npStart.core.savedObjects);
setNotifications(npStart.core.notifications);

const mockMapConfig = {
includeElasticMapsService: true,
proxyElasticMapsServiceInMaps: false,
tilemap: {
deprecated: {
config: {
options: {
attribution: '',
},
},
},
options: {
attribution: '',
minZoom: 0,
maxZoom: 10,
},
},
regionmap: {
includeElasticMapsService: true,
layers: [],
},
manifestServiceUrl: '',
emsFileApiUrl: 'https://vector.maps.elastic.co',
emsTileApiUrl: 'https://tiles.maps.elastic.co',
emsLandingPageUrl: 'https://maps.elastic.co/v7.7',
emsFontLibraryUrl: 'https://tiles.maps.elastic.co/fonts/{fontstack}/{range}.pbf',
emsTileLayerId: {
bright: 'road_map',
desaturated: 'road_map_desaturated',
dark: 'dark_map',
},
};

beforeEach(ngMock.module('kibana'));
beforeEach(
ngMock.inject(() => {
Expand Down Expand Up @@ -127,7 +163,7 @@ describe('VegaVisualizations', () => {
return 'not found';
}
});
const serviceSettings = new ServiceSettings();
const serviceSettings = new ServiceSettings(mockMapConfig, mockMapConfig.tilemap);
vegaVisualizationDependencies = {
serviceSettings,
core: {
Expand Down
1 change: 0 additions & 1 deletion src/legacy/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import 'ui/autoload/all';
import './management';
import './dev_tools';
import { showAppRedirectNotification } from '../../../../plugins/kibana_legacy/public';
import 'leaflet';
import { localApplicationService } from './local_application_service';

npSetup.plugins.kibanaLegacy.registerLegacyAppAlias('doc', 'discover', { keepPrefix: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import expect from '@kbn/expect';
import ngMock from 'ng_mock';
import _ from 'lodash';

import ChoroplethLayer from '../choropleth_layer';
import { ImageComparator } from 'test_utils/image_comparator';
import worldJson from './world.json';
Expand Down Expand Up @@ -103,31 +104,29 @@ describe('RegionMapsVisualizationTests', function() {
let getManifestStub;
beforeEach(
ngMock.inject(() => {
const mapConfig = {
emsFileApiUrl: '',
emsTileApiUrl: '',
emsLandingPageUrl: '',
};
const tilemapsConfig = {
deprecated: {
config: {
options: {
attribution: '123',
},
},
},
};
setInjectedVarFunc(injectedVar => {
switch (injectedVar) {
case 'mapConfig':
return {
emsFileApiUrl: '',
emsTileApiUrl: '',
emsLandingPageUrl: '',
};
case 'tilemapsConfig':
return {
deprecated: {
config: {
options: {
attribution: '123',
},
},
},
};
case 'version':
return '123';
default:
return 'not found';
}
});
const serviceSettings = new ServiceSettings();
const serviceSettings = new ServiceSettings(mapConfig, tilemapsConfig);
const regionmapsConfig = {
includeElasticMapsService: true,
layers: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

import $ from 'jquery';
import L from 'leaflet';
import _ from 'lodash';
import d3 from 'd3';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -86,6 +85,7 @@ export default class ChoroplethLayer extends KibanaMapLayer {
this._layerName = name;
this._layerConfig = layerConfig;

// eslint-disable-next-line no-undef
this._leafletLayer = L.geoJson(null, {
onEachFeature: (feature, layer) => {
layer.on('click', () => {
Expand All @@ -96,6 +96,7 @@ export default class ChoroplethLayer extends KibanaMapLayer {
mouseover: () => {
const tooltipContents = this._tooltipFormatter(feature);
if (!location) {
// eslint-disable-next-line no-undef
const leafletGeojson = L.geoJson(feature);
location = leafletGeojson.getBounds().getCenter();
}
Expand Down Expand Up @@ -428,13 +429,15 @@ CORS configuration of the server permits requests from the Kibana application on

const { min, max } = getMinMax(this._metrics);

// eslint-disable-next-line no-undef
const boundsOfAllFeatures = new L.LatLngBounds();
return {
leafletStyleFunction: geojsonFeature => {
const match = geojsonFeature.__kbnJoinedMetric;
if (!match) {
return emptyStyle();
}
// eslint-disable-next-line no-undef
const boundsOfFeature = L.geoJson(geojsonFeature).getBounds();
boundsOfAllFeatures.extend(boundsOfFeature);

Expand Down
50 changes: 0 additions & 50 deletions src/legacy/core_plugins/tile_map/index.ts

This file was deleted.

67 changes: 67 additions & 0 deletions src/plugins/maps_legacy/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* 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 { schema, TypeOf } from '@kbn/config-schema';
import { configSchema as tilemapSchema } from '../tile_map/config';

// TODO: Pull this portion from region_map
export const regionmapSchema = schema.object({
includeElasticMapsService: schema.boolean({ defaultValue: true }),
layers: schema.arrayOf(
schema.object({
url: schema.string(),
format: schema.object({
type: schema.string({ defaultValue: 'geojson' }),
}),
meta: schema.object({
feature_collection_path: schema.string({ defaultValue: 'data' }),
}),
attribution: schema.string(),
name: schema.string(),
fields: schema.arrayOf(
schema.object({
name: schema.string(),
description: schema.string(),
})
),
}),
{ defaultValue: [] }
),
});

export const configSchema = schema.object({
includeElasticMapsService: schema.boolean({ defaultValue: true }),
proxyElasticMapsServiceInMaps: schema.boolean({ defaultValue: false }),
tilemap: tilemapSchema,
regionmap: regionmapSchema,
manifestServiceUrl: schema.string({ defaultValue: '' }),
emsFileApiUrl: schema.string({ defaultValue: 'https://vector.maps.elastic.co' }),
emsTileApiUrl: schema.string({ defaultValue: 'https://tiles.maps.elastic.co' }),
emsLandingPageUrl: schema.string({ defaultValue: 'https://maps.elastic.co/v7.7' }),
emsFontLibraryUrl: schema.string({
defaultValue: 'https://tiles.maps.elastic.co/fonts/{fontstack}/{range}.pbf',
}),
emsTileLayerId: schema.object({
bright: schema.string({ defaultValue: 'road_map' }),
desaturated: schema.string({ defaultValue: 'road_map_desaturated' }),
dark: schema.string({ defaultValue: 'dark_map' }),
}),
});

export type ConfigSchema = TypeOf<typeof configSchema>;
4 changes: 3 additions & 1 deletion src/plugins/maps_legacy/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"id": "mapsLegacy",
"version": "8.0.0",
"kibanaVersion": "kibana",
"ui": true
"configPath": ["map"],
"ui": true,
"server": true
}
2 changes: 1 addition & 1 deletion src/plugins/maps_legacy/public/__tests__/map/kibana_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import expect from '@kbn/expect';
import { KibanaMap } from '../../map/kibana_map';
import { KibanaMapLayer } from '../../map/kibana_map_layer';
import L from 'leaflet';

describe('kibana_map tests', function() {
let domNode;
Expand Down Expand Up @@ -218,6 +217,7 @@ describe('kibana_map tests', function() {
function makeMockLayer(attribution) {
const layer = new KibanaMapLayer();
layer._attribution = attribution;
// eslint-disable-next-line no-undef
layer._leafletLayer = L.geoJson(null);
return layer;
}
Expand Down
Loading

0 comments on commit 295d3e7

Please sign in to comment.