Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into siem-keep-rel…
Browse files Browse the repository at this point in the history
…ative-date-real
  • Loading branch information
XavierM committed Feb 7, 2020
2 parents 9ff2b2c + fabb28d commit b74f25e
Show file tree
Hide file tree
Showing 69 changed files with 12,353 additions and 11,749 deletions.
3 changes: 3 additions & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ into the document when displaying it.
`metrics:max_buckets`:: The maximum numbers of buckets that a single
data source can return. This might arise when the user selects a
short interval (for example, 1s) for a long time period (1 year).
`pageNavigation`:: The style of navigation menu for Kibana.
Choices are Individual, the legacy style where every plugin is represented in the nav,
and Grouped, a new format that bundles related plugins together in nested navigation.
`query:allowLeadingWildcards`:: Allows a wildcard (*) as the first character
in a query clause. Only applies when experimental query features are
enabled in the query bar. To disallow leading wildcards in Lucene queries,
Expand Down
1 change: 0 additions & 1 deletion docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ If you are using Kibana's out-of-the-box settings, **Elastic Maps** is already c

EMS requests are made to the following domains:

* catalogue.maps.elastic.co
* tiles.maps.elastic.co
* vector.maps.elastic.co

Expand Down
37 changes: 29 additions & 8 deletions docs/setup/install/targz.asciidoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[[targz]]
=== Install Kibana with `.tar.gz`
=== Install {kib} from archive on Linux or MacOS

Kibana is provided for Linux and Darwin as a `.tar.gz` package. These packages
are the easiest formats to use when trying out Kibana.

These packages are free to use under the Elastic license. They contain open
source and free commercial features and access to paid commercial features.
{stack-ov}/license-management.html[Start a 30-day trial] to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
These packages are free to use under the Elastic license. They contain open
source and free commercial features and access to paid commercial features.
{stack-ov}/license-management.html[Start a 30-day trial] to try out all of the
paid commercial features. See the
https://www.elastic.co/subscriptions[Subscriptions] page for information about
Elastic license levels.

The latest stable version of Kibana can be found on the
Expand Down Expand Up @@ -47,6 +47,27 @@ endif::[]
[[install-darwin64]]
==== Download and install the Darwin package

[IMPORTANT]
.macOS Gatekeeper warnings
====
Apple's rollout of stricter notarization requirements affected the notarization
of the {version} {kib} artifacts. If macOS Catalina displays a dialog when you
first run {kib} that interrupts it, you will need to take an action to allow it
to run.
To prevent Gatekeeper checks on the {kib} files, run the following command on the
downloaded `.tar.gz` archive or the directory to which was extracted:
[source,sh]
----
xattr -d -r com.apple.quarantine <archive-or-directory>
----
Alternatively, you can add a security override if a Gatekeeper popup appears by
following the instructions in the _How to open an app that hasn’t been notarized
or is from an unidentified developer_ section of
https://support.apple.com/en-us/HT202491[Safely open apps on your Mac].
====

ifeval::["{release-state}"=="unreleased"]

Version {version} of Kibana has not yet been released.
Expand All @@ -68,9 +89,9 @@ cd kibana-{version}-darwin-x86_64/ <2>
`kibana-{version}-darwin-x86_64.tar.gz: OK`.
<2> This directory is known as `$KIBANA_HOME`.

Alternatively, you can download the following package, which contains only
Alternatively, you can download the following package, which contains only
features that are available under the Apache 2.0 license:
https://artifacts.elastic.co/downloads/kibana/kibana-oss-{version}-darwin-x86_64.tar.gz
https://artifacts.elastic.co/downloads/kibana/kibana-oss-{version}-darwin-x86_64.tar.gz

endif::[]

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"@elastic/eui": "18.3.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.3",
"@elastic/numeral": "2.3.5",
"@elastic/request-crypto": "^1.0.2",
"@elastic/ui-ace": "0.2.3",
"@hapi/wreck": "^15.0.1",
Expand Down
3 changes: 3 additions & 0 deletions src/legacy/core_plugins/kibana/ui_setting_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ export function getUiSettingDefaults() {
value: 'en',
type: 'select',
options: numeralLanguageIds,
optionLabels: Object.fromEntries(
numeralLanguages.map(language => [language.id, language.name])
),
description: i18n.translate('kbn.advancedSettings.format.formattingLocaleText', {
defaultMessage: `{numeralLanguageLink} locale`,
description:
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/data/common/field_formats/converters/boolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
import { FieldFormat } from '../field_format';
import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types';
import { asPrettyString } from '../utils';

export class BoolFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.BOOLEAN;
static title = 'Boolean';
static title = i18n.translate('data.fieldFormats.boolean.title', {
defaultMessage: 'Boolean',
});
static fieldType = [KBN_FIELD_TYPES.BOOLEAN, KBN_FIELD_TYPES.NUMBER, KBN_FIELD_TYPES.STRING];

textConvert: TextContextTypeConvert = value => {
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/data/common/field_formats/converters/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { NumeralFormat } from './numeral';
import { FIELD_FORMAT_IDS } from '../types';

export class BytesFormat extends NumeralFormat {
static id = FIELD_FORMAT_IDS.BYTES;
static title = 'Bytes';
static title = i18n.translate('data.fieldFormats.bytes.title', {
defaultMessage: 'Bytes',
});

id = BytesFormat.id;
title = BytesFormat.title;
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/data/common/field_formats/converters/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { findLast, cloneDeep, template, escape } from 'lodash';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
import { FieldFormat } from '../field_format';
Expand All @@ -28,7 +29,9 @@ const convertTemplate = template('<span style="<%- style %>"><%- val %></span>')

export class ColorFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.COLOR;
static title = 'Color';
static title = i18n.translate('data.fieldFormats.color.title', {
defaultMessage: 'Color',
});
static fieldType = [KBN_FIELD_TYPES.NUMBER, KBN_FIELD_TYPES.STRING];

getParamDefaults() {
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/data/common/field_formats/converters/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { memoize, noop } from 'lodash';
import moment from 'moment';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
Expand All @@ -25,7 +26,9 @@ import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types';

export class DateFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE;
static title = 'Date';
static title = i18n.translate('data.fieldFormats.date.title', {
defaultMessage: 'Date',
});
static fieldType = KBN_FIELD_TYPES.DATE;

private memoizedConverter: Function = noop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import moment, { Moment } from 'moment';
import { memoize, noop } from 'lodash';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
Expand Down Expand Up @@ -70,7 +71,9 @@ export function formatWithNanos(

export class DateNanosFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE_NANOS;
static title = 'Date Nanos';
static title = i18n.translate('data.fieldFormats.date_nanos.title', {
defaultMessage: 'Date nanos',
});
static fieldType = KBN_FIELD_TYPES.DATE;

private memoizedConverter: Function = noop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { memoize, noop } from 'lodash';
import moment from 'moment-timezone';
import { KBN_FIELD_TYPES } from '../../kbn_field_types/types';
Expand All @@ -30,14 +31,16 @@ import {

export class DateFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE;
static title = 'Date';
static title = i18n.translate('data.fieldFormats.date.title', {
defaultMessage: 'Date',
});
static fieldType = KBN_FIELD_TYPES.DATE;

private memoizedConverter: Function = noop;
private memoizedPattern: string = '';
private timeZone: string = '';

constructor(params: IFieldFormatMetaParams, getConfig: GetConfigFn) {
constructor(params: IFieldFormatMetaParams, getConfig?: GetConfigFn) {
super(params, getConfig);

this.memoizedConverter = memoize((val: any) => {
Expand Down
51 changes: 29 additions & 22 deletions src/plugins/data/common/field_formats/converters/duration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,126 +31,126 @@ const ratioToSeconds: Record<string, number> = {
const HUMAN_FRIENDLY = 'humanize';
const DEFAULT_OUTPUT_PRECISION = 2;
const DEFAULT_INPUT_FORMAT = {
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.seconds', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.seconds', {
defaultMessage: 'Seconds',
}),
kind: 'seconds',
};
const inputFormats = [
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.picoseconds', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.picoseconds', {
defaultMessage: 'Picoseconds',
}),
kind: 'picoseconds',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.nanoseconds', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.nanoseconds', {
defaultMessage: 'Nanoseconds',
}),
kind: 'nanoseconds',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.microseconds', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.microseconds', {
defaultMessage: 'Microseconds',
}),
kind: 'microseconds',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.milliseconds', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.milliseconds', {
defaultMessage: 'Milliseconds',
}),
kind: 'milliseconds',
},
{ ...DEFAULT_INPUT_FORMAT },
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.minutes', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.minutes', {
defaultMessage: 'Minutes',
}),
kind: 'minutes',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.hours', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.hours', {
defaultMessage: 'Hours',
}),
kind: 'hours',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.days', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.days', {
defaultMessage: 'Days',
}),
kind: 'days',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.weeks', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.weeks', {
defaultMessage: 'Weeks',
}),
kind: 'weeks',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.months', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.months', {
defaultMessage: 'Months',
}),
kind: 'months',
},
{
text: i18n.translate('data.common.fieldFormats.duration.inputFormats.years', {
text: i18n.translate('data.fieldFormats.duration.inputFormats.years', {
defaultMessage: 'Years',
}),
kind: 'years',
},
];
const DEFAULT_OUTPUT_FORMAT = {
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.humanize', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.humanize', {
defaultMessage: 'Human Readable',
}),
method: 'humanize',
};
const outputFormats = [
{ ...DEFAULT_OUTPUT_FORMAT },
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asMilliseconds', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asMilliseconds', {
defaultMessage: 'Milliseconds',
}),
method: 'asMilliseconds',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asSeconds', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asSeconds', {
defaultMessage: 'Seconds',
}),
method: 'asSeconds',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asMinutes', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asMinutes', {
defaultMessage: 'Minutes',
}),
method: 'asMinutes',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asHours', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asHours', {
defaultMessage: 'Hours',
}),
method: 'asHours',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asDays', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asDays', {
defaultMessage: 'Days',
}),
method: 'asDays',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asWeeks', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asWeeks', {
defaultMessage: 'Weeks',
}),
method: 'asWeeks',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asMonths', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asMonths', {
defaultMessage: 'Months',
}),
method: 'asMonths',
},
{
text: i18n.translate('data.common.fieldFormats.duration.outputFormats.asYears', {
text: i18n.translate('data.fieldFormats.duration.outputFormats.asYears', {
defaultMessage: 'Years',
}),
method: 'asYears',
Expand All @@ -167,7 +167,9 @@ function parseInputAsDuration(val: number, inputFormat: string) {

export class DurationFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DURATION;
static title = 'Duration';
static title = i18n.translate('data.fieldFormats.duration.title', {
defaultMessage: 'Duration',
});
static fieldType = KBN_FIELD_TYPES.NUMBER;
static inputFormats = inputFormats;
static outputFormats = outputFormats;
Expand All @@ -189,7 +191,12 @@ export class DurationFormat extends FieldFormat {
const outputFormat = this.param('outputFormat') as keyof Duration;
const outputPrecision = this.param('outputPrecision');
const human = this.isHuman();
const prefix = val < 0 && human ? 'minus ' : '';
const prefix =
val < 0 && human
? i18n.translate('data.fieldFormats.duration.negativeLabel', {
defaultMessage: 'minus',
}) + ' '
: '';
const duration = parseInputAsDuration(val, inputFormat) as Record<keyof Duration, Function>;
const formatted = duration[outputFormat]();
const precise = human ? formatted : formatted.toFixed(outputPrecision);
Expand Down
Loading

0 comments on commit b74f25e

Please sign in to comment.