Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into alerting/api-…
Browse files Browse the repository at this point in the history
…key-on-create-fix
  • Loading branch information
mikecote committed Feb 7, 2020
2 parents 2b43dfd + a7be72c commit 31a28c1
Show file tree
Hide file tree
Showing 209 changed files with 15,855 additions and 13,309 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"src/plugins/management"
],
"advancedSettings": "src/plugins/advanced_settings",
"kibana_legacy": "src/plugins/kibana_legacy",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"kibana_utils": "src/plugins/kibana_utils",
Expand Down
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
1 change: 1 addition & 0 deletions src/core/server/elasticsearch/retry_call_cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe('migrationsRetryCallCluster', () => {
'RequestTimeout',
'AuthenticationException',
'AuthorizationException',
'Gone',
];

const mockLogger = loggingServiceMock.create();
Expand Down
4 changes: 3 additions & 1 deletion src/core/server/elasticsearch/retry_call_cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export function migrationsRetryCallCluster(
error instanceof esErrors.ServiceUnavailable ||
error instanceof esErrors.RequestTimeout ||
error instanceof esErrors.AuthenticationException ||
error instanceof esErrors.AuthorizationException
error instanceof esErrors.AuthorizationException ||
// @ts-ignore
error instanceof esErrors.Gone
);
},
timer(delay),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ import chrome from 'ui/chrome';
export const legacyChrome = chrome;
export { SavedObjectSaveOpts } from 'ui/saved_objects/types';
export { npSetup, npStart } from 'ui/new_platform';
export { IPrivate } from 'ui/private';
export { subscribeWithScope } from 'ui/utils/subscribe_with_scope';
// @ts-ignore
export { ConfirmationButtonTypes } from 'ui/modals/confirm_modal';
export { migrateLegacyQuery } from 'ui/utils/migrate_legacy_query';
export { KbnUrl } from 'ui/url/kbn_url';
// @ts-ignore
export { PrivateProvider } from 'ui/private/private';
// @ts-ignore
export { createTopNavDirective, createTopNavHelper } from 'ui/kbn_top_nav/kbn_top_nav';
// @ts-ignore
export { PromiseServiceCreator } from 'ui/promises/promises';
// @ts-ignore
export { KbnUrlProvider, RedirectWhenMissingProvider } from 'ui/url/index';
// @ts-ignore
export { confirmModalFactory } from 'ui/modals/confirm_modal';
export { configureAppAngularModule } from 'ui/legacy_compat';
export { ensureDefaultIndexPattern } from 'ui/legacy_compat';
export { IInjector } from 'ui/chrome';
export { SavedObjectLoader } from 'ui/saved_objects';
export { VISUALIZE_EMBEDDABLE_TYPE } from '../../../visualizations/public/embeddable';
export { registerTimefilterWithGlobalStateFactory } from 'ui/timefilter/setup_router';
export { absoluteToParsedUrl } from 'ui/url/absolute_to_parsed_url';
export {
configureAppAngularModule,
ensureDefaultIndexPattern,
IPrivate,
migrateLegacyQuery,
PrivateProvider,
PromiseServiceCreator,
} from '../../../../../plugins/kibana_legacy/public';
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,15 @@
// They can stay even after NP cutover
import angular from 'angular';
import 'ui/angular-bootstrap';
import { IPrivate } from 'ui/private';
import { EuiIcon } from '@elastic/eui';
// @ts-ignore
import { StateProvider } from 'ui/state_management/state';
// @ts-ignore
import { EventsProvider } from 'ui/events';
import { PersistedState } from 'ui/persisted_state';
// @ts-ignore
import { PromiseServiceCreator } from 'ui/promises/promises';
import { i18nDirective, i18nFilter, I18nProvider } from '@kbn/i18n/angular';
// @ts-ignore
import { PrivateProvider } from 'ui/private/private';
import { CoreStart, LegacyCoreStart, IUiSettingsClient } from 'kibana/public';
// @ts-ignore
import { watchMultiDecorator } from 'ui/directives/watch_multi/watch_multi';
// @ts-ignore
import { registerListenEventListener } from 'ui/directives/listen/listen';
// @ts-ignore
import { KbnAccessibleClickProvider } from 'ui/accessibility/kbn_accessible_click';
// @ts-ignore
import { AppStateProvider } from 'ui/state_management/app_state';
// @ts-ignore
import { GlobalStateProvider } from 'ui/state_management/global_state';
Expand All @@ -51,7 +40,6 @@ import { StateManagementConfigProvider } from 'ui/state_management/config_provid
import { KbnUrlProvider, RedirectWhenMissingProvider } from 'ui/url';
// @ts-ignore
import { createTopNavDirective, createTopNavHelper } from 'ui/kbn_top_nav/kbn_top_nav';
import { configureAppAngularModule } from 'ui/legacy_compat';
import { IndexPatterns, DataPublicPluginStart } from '../../../../../plugins/data/public';
import { Storage } from '../../../../../plugins/kibana_utils/public';
import { NavigationPublicPluginStart as NavigationStart } from '../../../../../plugins/navigation/public';
Expand Down Expand Up @@ -82,6 +70,15 @@ import { FixedScrollProvider } from './np_ready/angular/directives/fixed_scroll'
// @ts-ignore
import { DebounceProviderTimeout } from './np_ready/angular/directives/debounce/debounce';
import { createRenderCompleteDirective } from './np_ready/angular/directives/render_complete';
import {
configureAppAngularModule,
IPrivate,
KbnAccessibleClickProvider,
PrivateProvider,
PromiseServiceCreator,
registerListenEventListener,
watchMultiDecorator,
} from '../../../../../plugins/kibana_legacy/public';

/**
* returns the main inner angular module, it contains all the parts of Angular Discover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,22 @@ export function setServices(newServices: any) {
export { angular };
export { wrapInI18nContext } from 'ui/i18n';
export { buildVislibDimensions } from '../../../visualizations/public';
// @ts-ignore
export { callAfterBindingsWorkaround } from 'ui/compat';
export { getRequestInspectorStats, getResponseInspectorStats } from '../../../data/public';
// @ts-ignore
export { intervalOptions } from 'ui/agg_types';
// @ts-ignore
export { migrateLegacyQuery } from 'ui/utils/migrate_legacy_query';
export { stateMonitorFactory } from 'ui/state_management/state_monitor_factory';
export { subscribeWithScope } from 'ui/utils/subscribe_with_scope';
// @ts-ignore
export { timezoneProvider } from 'ui/vis/lib/timezone';
// @ts-ignore
export { tabifyAggResponse } from 'ui/agg_response/tabify';
export { ensureDefaultIndexPattern } from 'ui/legacy_compat';
export { unhashUrl } from '../../../../../plugins/kibana_utils/public';
// @ts-ignore
export { formatMsg, formatStack } from 'ui/notify/lib/index';
export {
migrateLegacyQuery,
ensureDefaultIndexPattern,
formatMsg,
formatStack,
} from '../../../../../plugins/kibana_legacy/public';

// EXPORT types
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@
*
*/

export class InitAfterBindingsWorkaround {
static $inject = ['$injector', '$attrs', '$element', '$scope', '$transclude'];
constructor($injector, $attrs, $element, $scope, $transclude) {
if (!this.initAfterBindings) {
throw new Error(
'When using inheritance you must move the logic in the constructor to the `initAfterBindings` method'
);
}

this.$onInit = () => {
$injector.invoke(this.initAfterBindings, this, {
$attrs,
$element,
$scope,
$transclude,
});
};
}
}

export function callAfterBindingsWorkaround(constructor) {
return function InitAfterBindingsWrapper($injector, $attrs, $element, $scope, $transclude) {
this.$onInit = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import _ from 'lodash';
import { callAfterBindingsWorkaround, getAngularModule } from '../../kibana_services';
import { getAngularModule } from '../../kibana_services';
import contextAppTemplate from './context_app.html';
import './context/components/action_bar';
import { getFirstSortableField } from './context/api/utils/sorting';
Expand All @@ -33,6 +33,7 @@ import {
LOADING_STATUS,
QueryActionsProvider,
} from './context/query';
import { callAfterBindingsWorkaround } from './context/helpers/call_after_bindings_workaround';

const module = getAngularModule();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import { EuiCallOut, EuiCodeBlock } from '@elastic/eui';
import { formatMsg, formatStack } from '../../../kibana_services';

interface Props {
error: Error | string | null;
error: Error | string;
}

export function DocViewerError({ error }: Props) {
const errMsg = formatMsg(error);
const errStack = error ? formatStack(error) : '';
const errStack = typeof error === 'object' ? formatStack(error) : '';

return (
<EuiCallOut title={errMsg} color="danger" iconType="cross" data-test-subj="docViewerError">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface Props {
}

interface State {
error: null | Error | string;
error: Error | string;
hasError: boolean;
}
/**
Expand All @@ -42,7 +42,7 @@ interface State {
export class DocViewerTab extends React.Component<Props, State> {
state = {
hasError: false,
error: null,
error: '',
};

static getDerivedStateFromError(error: unknown) {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/kibana/public/home/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import { FeatureCatalogueRegistryProvider } from 'ui/registry/feature_catalogue';
import { npSetup, npStart } from 'ui/new_platform';
import chrome from 'ui/chrome';
import { IPrivate } from 'ui/private';
import { HomePlugin, LegacyAngularInjectedDependencies } from './plugin';
import { TelemetryOptInProvider } from '../../../telemetry/public/services';
import { IPrivate } from '../../../../../plugins/kibana_legacy/public';

/**
* Get dependencies relying on the global angular context.
Expand Down
18 changes: 8 additions & 10 deletions src/legacy/core_plugins/kibana/public/visualize/legacy_imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,29 @@ export { stateMonitorFactory } from 'ui/state_management/state_monitor_factory';
export { PersistedState } from 'ui/persisted_state';

export { npSetup, npStart } from 'ui/new_platform';
export { IPrivate } from 'ui/private';
// @ts-ignore
export { PrivateProvider } from 'ui/private/private';

export { subscribeWithScope } from 'ui/utils/subscribe_with_scope';
export { migrateLegacyQuery } from 'ui/utils/migrate_legacy_query';
// @ts-ignore
export { EventsProvider } from 'ui/events';
// @ts-ignore
export { createTopNavDirective, createTopNavHelper } from 'ui/kbn_top_nav/kbn_top_nav';
// @ts-ignore
export { PromiseServiceCreator } from 'ui/promises/promises';
// @ts-ignore
export { confirmModalFactory } from 'ui/modals/confirm_modal';
export { configureAppAngularModule, ensureDefaultIndexPattern } from 'ui/legacy_compat';
export { registerTimefilterWithGlobalStateFactory } from 'ui/timefilter/setup_router';

// @ts-ignore
export { KbnUrlProvider, RedirectWhenMissingProvider } from 'ui/url';
export { absoluteToParsedUrl } from 'ui/url/absolute_to_parsed_url';
export { KibanaParsedUrl } from 'ui/url/kibana_parsed_url';

export { wrapInI18nContext } from 'ui/i18n';

export { DashboardConstants } from '../dashboard/np_ready/dashboard_constants';
export { VisSavedObject } from '../../../visualizations/public/embeddable/visualize_embeddable';
export { VISUALIZE_EMBEDDABLE_TYPE } from '../../../visualizations/public/embeddable';
export { VisType } from '../../../visualizations/public';
export {
configureAppAngularModule,
ensureDefaultIndexPattern,
IPrivate,
migrateLegacyQuery,
PrivateProvider,
PromiseServiceCreator,
} from '../../../../../plugins/kibana_legacy/public';
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function initListingDirective(app) {
);
}

export function VisualizeListingController($injector, createNewVis) {
export function VisualizeListingController($injector, $scope, createNewVis) {
const {
addBasePath,
chrome,
Expand All @@ -59,7 +59,7 @@ export function VisualizeListingController($injector, createNewVis) {
this.savedObjects = savedObjects;

this.createNewVis = () => {
visualizations.showNewVisModal();
this.closeNewVisModal = visualizations.showNewVisModal();
};

this.editItem = ({ editUrl }) => {
Expand All @@ -73,7 +73,7 @@ export function VisualizeListingController($injector, createNewVis) {

if (createNewVis) {
// In case the user navigated to the page via the /visualize/new URL we start the dialog immediately
visualizations.showNewVisModal({
this.closeNewVisModal = visualizations.showNewVisModal({
onClose: () => {
// In case the user came via a URL to this page, change the URL to the regular landing page URL after closing the modal
kbnUrl.changePath(VisualizeConstants.LANDING_PAGE_PATH);
Expand Down Expand Up @@ -124,4 +124,10 @@ export function VisualizeListingController($injector, createNewVis) {
this.listingLimit = uiSettings.get('savedObjects:listingLimit');

addHelpMenuToAppChrome(chrome, docLinks);

$scope.$on('$destroy', () => {
if (this.closeNewVisModal) {
this.closeNewVisModal();
}
});
}
Loading

0 comments on commit 31a28c1

Please sign in to comment.