Skip to content

Commit

Permalink
Merge branch 'master' into add-stable-id-option
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHassanabad committed Oct 14, 2019
2 parents 688da79 + 27c5cb2 commit 31b8add
Show file tree
Hide file tree
Showing 20 changed files with 465 additions and 382 deletions.
76 changes: 40 additions & 36 deletions docs/setup/upgrade.asciidoc
Original file line number Diff line number Diff line change
@@ -1,58 +1,62 @@
[[upgrade]]
== Upgrading {kib}

Depending on the {kib} version you're upgrading from, the upgrade process to 7.0
varies.

[IMPORTANT]
===========================================
Before upgrading {kib}:
[float]
[[upgrade-before-you-begin]]
=== Before you begin

* Consult the <<breaking-changes,breaking changes>> docs.
* Test upgrades in a dev environment before upgrading your production servers.
* Backup your data using the {es} {ref}/modules-snapshots.html[snapshots] feature.
You **cannot roll back** to an earlier version unless you have a backup of
your data.
* If you are using custom plugins, check that a compatible version is
available.
===========================================
Before you upgrade {kib}:

Depending on which version of {kib} you're upgrading from, the upgrade process to 7.0
will vary.
* Consult the <<breaking-changes,breaking changes>>.
* Before you upgrade production servers, test the upgrades in a dev environment.
* Backup your data with {es} {ref}/modules-snapshots.html[snapshots].
To roll back to an earlier version, you **must** have a backup of your data.
* If you are using custom plugins, check that a compatible version is
available.
* Shut down all {kib} nodes. Running more than one {kib} version against the
same Elasticseach index is unsupported. If you upgrade while older {kib} nodes are
running, the upgrade can fail.

The recommended path is to upgrade to 6.7 before upgrading to 7.0.
This makes it easier to identify the changes you need to make to upgrade and enables
you to perform a rolling upgrade with no downtime.
To identify the changes you need to make to upgrade, and to enable you to
perform an Elasticsearch rolling upgrade with no downtime, you must upgrade to
6.7 before you upgrade to 7.0.

Please see
*{stack-ref}/upgrading-elastic-stack.html[Upgrading the Elastic Stack]* for a
comprehensive overview of the upgrade process.
For a comprehensive overview of the upgrade process, refer to
*{stack-ref}/upgrading-elastic-stack.html[Upgrading the Elastic Stack]*.

[float]
==== Upgrading from 5.x or earlier
{es} can read indices created in the previous major version. If you have indices
created in 5.x or before, you must reindex or delete them before upgrading to 7.0.0.
See {stack-ref}/upgrading-elastic-stack.html#oss-stack-upgrade[Upgrading the Elastic Stack]
for more information.

Once your reindex is complete, you can follow the <<upgrade-standard, Standard upgrade>>
[[upgrade-5x-earlier]]
=== Upgrading from 5.x or earlier
{es} can read indices created in the previous major version. Before you upgrade
to 7.0.0, you must reindex or delete any indices created in 5.x or earlier.
For more information, refer to
{stack-ref}/upgrading-elastic-stack.html#oss-stack-upgrade[Upgrading the Elastic Stack].

When your reindex is complete, follow the <<upgrade-standard, Standard upgrade>>
instructions.

[float]
==== Upgrading from 6.x
[[upgrade-6x]]
=== Upgrading from 6.x

The recommended path is to upgrade to 6.7 before upgrading to 7.0. This makes it
easier to identify the required changes, and enables you to use the Upgrade Assistant
to prepare for your upgrade to 7.0 (see below).
easier to identify the required changes, and enables you to use the Upgrade
Assistant to prepare for your upgrade to 7.0.

*Note:* Saved searches, visualizations, and dashboards created in {kib} 6.x
can be generally imported into 7.x.
TIP: The ability to import {kib} 6.x saved searches, visualizations, and
dashboards is supported.

[float]
==== Upgrading from 6.7
6.7 includes an https://www.elastic.co/guide/en/kibana/6.7/upgrade-assistant.html[Upgrade Assistant]
to help you prepare for your upgrade to 7.0. To access the assistant, go to *Management > 7.0 Upgrade Assistant*.
[[upgrade-67]]
=== Upgrading from 6.7
To help you prepare for your upgrade to 7.0, 6.7 includes an https://www.elastic.co/guide/en/kibana/6.7/upgrade-assistant.html[Upgrade Assistant]
To access the assistant, go to *Management > 7.0 Upgrade Assistant*.

After you have addressed any issues that were identified by the Upgrade Assistant,
<<upgrade-standard,upgrade to 7.0>>.
After you have addressed any issues that were identified by the Upgrade
Assistant, <<upgrade-standard,upgrade to 7.0>>.


include::upgrade/upgrade-standard.asciidoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class DashboardContainerExample extends React.Component<Props, State> {
}

public switchViewMode = () => {
this.setState((prevState: State) => {
this.setState<'viewMode'>((prevState: State) => {
if (!this.container || isErrorEmbeddable<DashboardContainer>(this.container)) {
return prevState;
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/actions/server/actions_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function isWhitelistedHostnameInUri(config: ActionsConfigType, uri: string): boo
tryCatch(() => new URL(uri)),
map(url => url.hostname),
mapNullable(hostname => isWhitelisted(config, hostname)),
getOrElse(() => false)
getOrElse<boolean>(() => false)
);
}

Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/alerting/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { AlertInstance } from './lib';
import { AlertTypeRegistry } from './alert_type_registry';
import { AlertTypeRegistry as OrigAlertTypeRegistry } from './alert_type_registry';
import { PluginSetupContract, PluginStartContract } from './plugin';
import { SavedObjectAttributes, SavedObjectsClientContract } from '../../../../../src/core/server';

Expand Down Expand Up @@ -95,4 +95,4 @@ export interface AlertingPlugin {
start: PluginStartContract;
}

export type AlertTypeRegistry = PublicMethodsOf<AlertTypeRegistry>;
export type AlertTypeRegistry = PublicMethodsOf<OrigAlertTypeRegistry>;
19 changes: 19 additions & 0 deletions x-pack/legacy/plugins/canvas/i18n/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,16 @@ export const ComponentStrings = {
description: 'Title for the "My elements" tab when adding a new element',
}),
},
Error: {
getDescription: () =>
i18n.translate('xpack.canvas.errorComponent.description', {
defaultMessage: 'Expression failed with the message:',
}),
getTitle: () =>
i18n.translate('xpack.canvas.errorComponent.title', {
defaultMessage: 'Whoops! Expression failed',
}),
},
Expression: {
getCancelButtonLabel: () =>
i18n.translate('xpack.canvas.expression.cancelButtonLabel', {
Expand Down Expand Up @@ -504,6 +514,15 @@ export const ComponentStrings = {
defaultMessage: 'Keyboard Shortcuts',
}),
},
Link: {
getErrorMessage: (message: string) =>
i18n.translate('xpack.canvas.link.errorMessage', {
defaultMessage: 'LINK ERROR: {message}',
values: {
message,
},
}),
},
MultiElementSettings: {
getMultipleElementsActionsDescription: () =>
i18n.translate('xpack.canvas.groupSettings.multipleElementsActionsDescription', {
Expand Down
9 changes: 9 additions & 0 deletions x-pack/legacy/plugins/canvas/i18n/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ export const ErrorStrings = {
defaultMessage: "Couldn't fetch Elasticsearch indices",
}),
},
RenderWithFn: {
getRenderErrorMessage: (functionName: string) =>
i18n.translate('xpack.canvas.error.RenderWithFn.renderErrorMessage', {
defaultMessage: "Rendering '{functionName}' failed",
values: {
functionName: functionName || 'function',
},
}),
},
WorkpadFileUpload: {
getAcceptJSONOnlyErrorMessage: () =>
i18n.translate('xpack.canvas.error.workpadUpload.acceptJSONOnlyErrorMessage', {
Expand Down
7 changes: 5 additions & 2 deletions x-pack/legacy/plugins/canvas/public/components/error/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import { EuiCallOut } from '@elastic/eui';
import { get } from 'lodash';
import { ComponentStrings } from '../../../i18n';
import { ShowDebugging } from './show_debugging';

const { Error: strings } = ComponentStrings;

export const Error = ({ payload }) => {
const message = get(payload, 'error.message');

Expand All @@ -18,9 +21,9 @@ export const Error = ({ payload }) => {
style={{ maxWidth: 500 }}
color="danger"
iconType="cross"
title="Whoops! Expression failed"
title={strings.getTitle()}
>
<p>{message ? 'Expression failed with the message:' : ''}</p>
<p>{message ? strings.getDescription() : ''}</p>
{message && <p style={{ padding: '0 16px' }}>{message}</p>}

<ShowDebugging payload={payload} />
Expand Down
6 changes: 5 additions & 1 deletion x-pack/legacy/plugins/canvas/public/components/link/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import React from 'react';
import PropTypes from 'prop-types';
import { EuiLink } from '@elastic/eui';

import { ComponentStrings } from '../../../i18n';

const { Link: strings } = ComponentStrings;

const isModifiedEvent = ev => !!(ev.metaKey || ev.altKey || ev.ctrlKey || ev.shiftKey);

export class Link extends React.PureComponent {
Expand Down Expand Up @@ -53,7 +57,7 @@ export class Link extends React.PureComponent {
return <EuiLink {...props}>{children}</EuiLink>;
} catch (e) {
console.error(e);
return <div>LINK ERROR: {e.message}</div>;
return <div>{strings.getErrorMessage(e.message)}</div>;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import { isEqual, cloneDeep } from 'lodash';
import { RenderToDom } from '../render_to_dom';
import { ErrorStrings } from '../../../i18n';

const { RenderWithFn: strings } = ErrorStrings;

export class RenderWithFn extends React.Component {
static propTypes = {
Expand Down Expand Up @@ -87,7 +90,7 @@ export class RenderWithFn extends React.Component {
this.firstRender = false;
} catch (err) {
console.error('renderFn threw', err);
this.props.onError(err, { title: `Rendering '${functionName || 'function'}' failed` });
this.props.onError(err, { title: strings.getRenderErrorMessage(functionName) });
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function loadSampleData(addSavedObjectsToSampleDataset, addAppLinksToSamp

addSavedObjectsToSampleDataset('logs', updateCanvasWorkpadTimestamps(webLogsSavedObjects));
addAppLinksToSampleDataset('logs', {
path: '/app/canvas#/workpad/workpad-5563cc40-5760-4afe-bf33-9da72fac53b7',
path: '/app/canvas#/workpad/workpad-ad72a4e9-b422-480c-be6d-a64a0b79541d',
icon: 'canvasApp',
label,
});
Expand Down
1 change: 1 addition & 0 deletions x-pack/legacy/plugins/infra/types/eui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ declare module '@elastic/eui' {
message?: any;
rowProps?: any;
cellProps?: any;
responsive?: boolean;
};
export const EuiInMemoryTable: React.SFC<EuiInMemoryTableProps>;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
export const URL_TYPE = {
KIBANA_DASHBOARD: 'KIBANA_DASHBOARD',
KIBANA_DISCOVER: 'KIBANA_DISCOVER',
OTHER: 'OTHER'
OTHER: 'OTHER',
};

export const TIME_RANGE_TYPE = {
AUTO: 'auto',
INTERVAL: 'interval'
INTERVAL: 'interval',
};
Loading

0 comments on commit 31b8add

Please sign in to comment.