Skip to content

Commit

Permalink
Merge branch 'master' into uptime_donut-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Oct 9, 2019
2 parents 955960d + e51e859 commit 3b028a6
Show file tree
Hide file tree
Showing 389 changed files with 14,108 additions and 10,422 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
/x-pack/test/functional/apps/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/ml.ts @elastic/ml-ui
/x-pack/legacy/plugins/transform/ @elastic/ml-ui

# Operations
/renovate.json5 @elastic/kibana-operations
Expand Down
2 changes: 0 additions & 2 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ To enable most recent entities, click "Show most recent documents by entity" and

. Set *Entity* to the field that identifies entities in your documents.
This field will be used in the terms aggregation to group your documents into entity buckets.
. Set *Time* to the date field that puts your documents in chronological order.
This field will be used to sort your documents in the top hits aggregation.
. Set *Documents per entity* to configure the maximum number of documents accumulated per entity.

[role="xpack"]
Expand Down
17 changes: 16 additions & 1 deletion docs/user/security/authentication/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ xpack.security.authc.saml.realm: realm-name
+
[source,yaml]
--------------------------------------------------------------------------------
server.xsrf.whitelist: [/api/security/v1/saml]
server.xsrf.whitelist: [/api/security/saml/callback]
--------------------------------------------------------------------------------

Users will be able to log in to {kib} via SAML Single Sign-On by navigating directly to the {kib} URL. Users who aren't authenticated are redirected to the Identity Provider for login. Most Identity Providers maintain a long-lived session—users who logged in to a different application using the same Identity Provider in the same browser are automatically authenticated. An exception is if {es} or the Identity Provider is configured to force user to re-authenticate. This login scenario is called _Service Provider initiated login_.
Expand All @@ -119,6 +119,21 @@ The order of `saml` and `basic` is important. Users who open {kib} will go throu

Basic authentication is supported _only_ if `basic` authentication provider is explicitly declared in `xpack.security.authc.providers` setting in addition to `saml`.

[float]
===== SAML and long URLs

At the beginning of the SAML handshake, {kib} stores the initial URL in the session cookie, so it can redirect the user back to that URL after successful SAML authentication.
If the URL is long, the session cookie might exceed the maximum size supported by the browser--typically 4KB for all cookies per domain. When this happens, the session cookie is truncated,
or dropped completely, and you might experience sporadic failures during SAML authentication.

To remedy this issue, you can decrease the maximum
size of the URL that {kib} is allowed to store during the SAML handshake. The default value is 2KB.

[source,yaml]
--------------------------------------------------------------------------------
xpack.security.authc.saml.maxRedirectURLSize: 1kb
--------------------------------------------------------------------------------

[[oidc]]
==== OpenID Connect Single Sign-On

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/register": "^7.5.5",
"@elastic/charts": "^13.4.0",
"@elastic/charts": "^13.5.1",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "14.4.0",
"@elastic/filesaver": "1.1.2",
Expand Down Expand Up @@ -303,7 +303,7 @@
"@types/getopts": "^2.0.1",
"@types/glob": "^7.1.1",
"@types/globby": "^8.0.0",
"@types/graphql": "^0.13.1",
"@types/graphql": "^0.13.2",
"@types/hapi": "^17.0.18",
"@types/hapi-auth-cookie": "^9.1.0",
"@types/has-ansi": "^3.0.0",
Expand Down
24 changes: 16 additions & 8 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,22 @@
'@types/tinycolor2',
],
},
{
groupSlug: 'xml2js',
groupName: 'xml2js related packages',
packageNames: [
'xml2js',
'@types/xml2js',
],
},
{
groupSlug: 'xml-crypto',
groupName: 'xml-crypto related packages',
packageNames: [
'xml-crypto',
'@types/xml-crypto',
],
},
{
groupSlug: 'intl-relativeformat',
groupName: 'intl-relativeformat related packages',
Expand Down Expand Up @@ -919,14 +935,6 @@
'@types/parse-link-header',
],
},
{
groupSlug: 'xml2js',
groupName: 'xml2js related packages',
packageNames: [
'xml2js',
'@types/xml2js',
],
},
{
packagePatterns: [
'^@kbn/.*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ kibana_vars=(
xpack.security.authc.providers
xpack.security.authc.oidc.realm
xpack.security.authc.saml.realm
xpack.security.authc.saml.maxRedirectURLSize
xpack.security.cookieName
xpack.security.enabled
xpack.security.encryptionKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import React, { Component } from 'react';

import { EuiButtonIcon, EuiContextMenuPanel, EuiContextMenuItem, EuiPopover } from '@elastic/eui';
import { EuiIcon, EuiContextMenuPanel, EuiContextMenuItem, EuiPopover } from '@elastic/eui';

import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -103,18 +103,16 @@ export class ConsoleMenu extends Component<Props, State> {

render() {
const button = (
<EuiButtonIcon
iconType="wrench"
<button
className="euiButtonIcon--primary"
onClick={this.onButtonClick}
data-test-subj="toggleConsoleMenu"
// @ts-ignore
aria-label={
<FormattedMessage
id="console.requestOptionsButtonAriaLabel"
defaultMessage="Request options"
/>
}
/>
aria-label={i18n.translate('console.requestOptionsButtonAriaLabel', {
defaultMessage: 'Request options',
})}
>
<EuiIcon type="wrench" />
</button>
);

const items = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { i18n } from '@kbn/i18n';

import $ from 'jquery';

import { EuiIcon } from '@elastic/eui';
import { EuiIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { useAppContext } from '../../../../context';
import { useUIAceKeyboardMode } from '../use_ui_ace_keyboard_mode';
import { ConsoleMenu } from '../../../../components';
Expand Down Expand Up @@ -173,33 +173,43 @@ function _Editor({ previousStateLocation = 'stored' }: EditorProps) {
<div style={abs} className="conApp">
<div className="conApp__editor">
<ul className="conApp__autoComplete" id="autocomplete" />
<div ref={actionsRef} className="conApp__editorActions" id="ConAppEditorActions">
<EuiToolTip
content={i18n.translate('console.sendRequestButtonTooltip', {
defaultMessage: 'click to send request',
})}
>
<button
onClick={sendCurrentRequestToES}
data-test-subj="sendRequestButton"
className="conApp__editorActionButton conApp__editorActionButton--success"
<EuiFlexGroup
ref={actionsRef}
className="conApp__editorActions"
id="ConAppEditorActions"
gutterSize="none"
responsive={false}
>
<EuiFlexItem>
<EuiToolTip
content={i18n.translate('console.sendRequestButtonTooltip', {
defaultMessage: 'click to send request',
})}
>
<EuiIcon type="play" />
</button>
</EuiToolTip>
<ConsoleMenu
getCurl={(cb: any) => {
editorInstanceRef.current!.getRequestsAsCURL(cb);
}}
getDocumentation={() => {
return getDocumentation(editorInstanceRef.current!, docLinkVersion);
}}
autoIndent={(event: any) => {
autoIndent(editorInstanceRef.current!, event);
}}
addNotification={({ title }) => notifications.toasts.add({ title })}
/>
</div>
<button
onClick={sendCurrentRequestToES}
data-test-subj="sendRequestButton"
className="conApp__editorActionButton conApp__editorActionButton--success"
>
<EuiIcon type="play" />
</button>
</EuiToolTip>
</EuiFlexItem>
<EuiFlexItem>
<ConsoleMenu
getCurl={(cb: any) => {
editorInstanceRef.current!.getRequestsAsCURL(cb);
}}
getDocumentation={() => {
return getDocumentation(editorInstanceRef.current!, docLinkVersion);
}}
autoIndent={(event: any) => {
autoIndent(editorInstanceRef.current!, event);
}}
addNotification={({ title }) => notifications.toasts.add({ title })}
/>
</EuiFlexItem>
</EuiFlexGroup>
<div
ref={editorRef}
id="ConAppEditor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

export function subscribeResizeChecker(ResizeChecker: any, $el: any, ...editors: any[]) {
const checker = new ResizeChecker($el);
checker.on('resize', () => editors.forEach(e => e.resize()));
checker.on('resize', () =>
editors.forEach(e => {
e.resize();
if (e.updateActionsBar) e.updateActionsBar();
})
);
return () => checker.destroy();
}
5 changes: 5 additions & 0 deletions src/legacy/core_plugins/console/public/quarantined/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@
}

.conApp__editorActions {
button {
line-height: inherit;
}
position: absolute;
z-index: $euiZLevel1;
top: 0;
// Adjust for possible scrollbars
right: $euiSize;
line-height: 1;
// For IE11
min-width: 40px;
}

.conApp__editorActionButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,26 +624,35 @@ export default function SenseEditor($el) {
// pageY is relative to page, so subtract the offset
// from pageY to get the new top value
const offsetFromPage = editor.$el.offset().top;
let startRow = CURRENT_REQ_RANGE.start.row;
const startRow = CURRENT_REQ_RANGE.start.row;
const startColumn = CURRENT_REQ_RANGE.start.column;
const session = editor.session;
const firstLine = session.getLine(startRow);

if (firstLine.length > session.getWrapLimit() - 5) {
// overlap first row
if (startRow > 0) {
startRow--;
}
else {
startRow++;
}
}


const topOfReq = editor.renderer.textToScreenCoordinates(startRow, startColumn).pageY - offsetFromPage;
const maxLineLength = session.getWrapLimit() - 5;
const isWrapping = firstLine.length > maxLineLength;
const getScreenCoords = (row) => editor.renderer.textToScreenCoordinates(row, startColumn).pageY - offsetFromPage;
const topOfReq = getScreenCoords(startRow);

if (topOfReq >= 0) {
return set(topOfReq);
let offset = 0;
if (isWrapping) {
// Try get the line height of the text area in pixels.
const textArea = editor.$el.find('textArea');
const hasRoomOnNextLine = session.getLine(startRow + 1).length < maxLineLength;
if (textArea && hasRoomOnNextLine) {
// Line height + the number of wraps we have on a line.
offset += (session.getRowLength(startRow) * textArea.height());
} else {
if (startRow > 0) {
set(getScreenCoords(startRow - 1, startColumn));
return;
}
set(getScreenCoords(startRow + 1, startColumn));
return;
}
}
set(topOfReq + offset);
return;
}

const bottomOfReq = editor.renderer.textToScreenCoordinates(
Expand All @@ -652,7 +661,8 @@ export default function SenseEditor($el) {
).pageY - offsetFromPage;

if (bottomOfReq >= 0) {
return set(0);
set(0);
return;
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/visualize/_gauge_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);

// FLAKY: https://github.com/elastic/kibana/issues/45089
describe.skip('gauge chart', function indexPatternCreation() {
describe('gauge chart', function indexPatternCreation() {
this.tags('smoke');
const fromTime = '2015-09-19 06:31:44.000';
const toTime = '2015-09-23 18:31:44.000';
Expand Down
1 change: 1 addition & 0 deletions x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"xpack.server": "legacy/server",
"xpack.snapshotRestore": "legacy/plugins/snapshot_restore",
"xpack.spaces": "legacy/plugins/spaces",
"xpack.transform": "legacy/plugins/transform",
"xpack.upgradeAssistant": "legacy/plugins/upgrade_assistant",
"xpack.uptime": "legacy/plugins/uptime",
"xpack.watcher": "legacy/plugins/watcher"
Expand Down
2 changes: 2 additions & 0 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { fileUpload } from './legacy/plugins/file_upload';
import { telemetry } from './legacy/plugins/telemetry';
import { encryptedSavedObjects } from './legacy/plugins/encrypted_saved_objects';
import { snapshotRestore } from './legacy/plugins/snapshot_restore';
import { transform } from './legacy/plugins/transform';
import { actions } from './legacy/plugins/actions';
import { alerting } from './legacy/plugins/alerting';
import { lens } from './legacy/plugins/lens';
Expand Down Expand Up @@ -75,6 +76,7 @@ module.exports = function (kibana) {
infra(kibana),
taskManager(kibana),
rollup(kibana),
transform(kibana),
siem(kibana),
remoteClusters(kibana),
crossClusterReplication(kibana),
Expand Down
18 changes: 18 additions & 0 deletions x-pack/legacy/plugins/canvas/canvas_plugin_src/strings/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,20 @@ export const DataSourceStrings = {
};

export const ModelStrings = {
Math: {
getDisplayName: () =>
i18n.translate('xpack.canvas.uis.models.mathTitle', {
defaultMessage: 'Measure',
}),
getValueDisplayName: () =>
i18n.translate('xpack.canvas.uis.models.math.args.valueTitle', {
defaultMessage: 'Value',
}),
getValueHelp: () =>
i18n.translate('xpack.canvas.uis.models.math.args.valueLabel', {
defaultMessage: 'Function and column to use in extracting a value from the datasource',
}),
},
PointSeries: {
getColorDisplayName: () =>
i18n.translate('xpack.canvas.uis.models.pointSeries.args.colorTitle', {
Expand Down Expand Up @@ -594,6 +608,10 @@ export const ViewStrings = {
i18n.translate('xpack.canvas.uis.views.metricTitle', {
defaultMessage: 'Metric',
}),
getNumberDisplayName: () =>
i18n.translate('xpack.canvas.uis.views.numberArgTitle', {
defaultMessage: 'Number',
}),
getLabelDisplayName: () =>
i18n.translate('xpack.canvas.uis.views.metric.args.labelArgTitle', {
defaultMessage: 'Label',
Expand Down
Loading

0 comments on commit 3b028a6

Please sign in to comment.