Skip to content

Commit

Permalink
Merge branch 'master' into reporting/fix-flaky-download-pdf-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jul 12, 2021
2 parents 09aad3a + 0c9777c commit b3aebd2
Show file tree
Hide file tree
Showing 54 changed files with 381 additions and 416 deletions.
21 changes: 21 additions & 0 deletions docs/user/dashboard/tsvb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,27 @@ The *Markdown* visualization supports Markdown with Handlebar (mustache) syntax

For answers to frequently asked *TSVB* question, review the following.

[float]
===== How do I create dashboard drilldowns for Top N and Table visualizations?

You can create dashboard drilldowns that include the specified time range for *Top N* and *Table* visualizations.

. Open the dashboard that you want to link to, then copy the URL.

. Open the dashboard with the *Top N* and *Table* visualization panel, then click *Edit* in the toolbar.

. Open the *Top N* or *Table* panel menu, then select *Edit visualization*.

. Click *Panel options*.

. In the *Item URL* field, enter the URL.
+
For example `dashboards#/view/f193ca90-c9f4-11eb-b038-dd3270053a27`.

. Click *Save and return*.

. In the toolbar, cick *Save as*, then make sure *Store time with dashboard* is deselected.

[float]
===== Why is my TSVB visualization missing data?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { setScopedHistory, setServices, setDocViewsRegistry } from '../../../../
import { coreMock } from '../../../../../../../core/public/mocks';
import { dataPluginMock } from '../../../../../../data/public/mocks';
import { navigationPluginMock } from '../../../../../../navigation/public/mocks';
import { initAngularBootstrap } from '../../../../../../kibana_legacy/public/angular_bootstrap';
import { getInnerAngularModule } from '../../get_inner_angular';
import { createBrowserHistory } from 'history';

Expand All @@ -41,6 +42,9 @@ describe('Doc Table', () => {
// Stub out a minimal mapping of 4 fields
let mapping;

beforeAll(async () => {
await initAngularBootstrap();
});
beforeAll(() => setScopedHistory(createBrowserHistory()));
beforeEach(() => {
angular.element.prototype.slice = jest.fn(function (index) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import hits from '../../../__fixtures__/real_hits';
import { coreMock } from '../../../../../../core/public/mocks';
import { dataPluginMock } from '../../../../../data/public/mocks';
import { navigationPluginMock } from '../../../../../navigation/public/mocks';
import { initAngularBootstrap } from '../../../../../kibana_legacy/public/angular_bootstrap';
import { setScopedHistory, setServices } from '../../../kibana_services';
import { getInnerAngularModule } from '../get_inner_angular';

Expand Down Expand Up @@ -54,6 +55,9 @@ describe('docTable', () => {
const core = coreMock.createStart();
let $elem;

beforeAll(async () => {
await initAngularBootstrap();
});
beforeAll(() => setScopedHistory(createBrowserHistory()));
beforeEach(() => {
angular.element.prototype.slice = jest.fn(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ import { createDocViewerDirective } from './doc_viewer';
import { createDiscoverGridDirective } from './create_discover_grid_directive';
import { createRenderCompleteDirective } from './directives/render_complete';
import {
initAngularBootstrap,
configureAppAngularModule,
PrivateProvider,
PromiseServiceCreator,
registerListenEventListener,
watchMultiDecorator,
} from '../../../../kibana_legacy/public';
import { PromiseServiceCreator } from './helpers';
import { DiscoverStartPlugins } from '../../plugin';
import { getScopedHistory } from '../../kibana_services';
import { createDiscoverDirective } from './create_discover_directive';
Expand All @@ -54,7 +53,6 @@ export function getInnerAngularModule(
deps: DiscoverStartPlugins,
context: PluginInitializerContext
) {
initAngularBootstrap();
const module = initializeInnerAngularModule(name, core, deps.navigation, deps.data);
configureAppAngularModule(module, { core, env: context.env }, true, getScopedHistory);
return module;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

export { formatRow, formatTopLevelObject } from './row_formatter';
export { handleSourceColumnState } from './state_helpers';
export { PromiseServiceCreator } from './promises';
2 changes: 2 additions & 0 deletions src/plugins/discover/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ export class DiscoverPlugin
}
// this is used by application mount and tests
const { getInnerAngularModule } = await import('./application/angular/get_inner_angular');
await plugins.kibanaLegacy.loadAngularBootstrap();
const module = getInnerAngularModule(
innerAngularName,
core,
Expand Down Expand Up @@ -473,6 +474,7 @@ export class DiscoverPlugin
throw Error('Discover plugin getEmbeddableInjector: initializeServices is undefined');
}
const { core, plugins } = await this.initializeServices();
await getServices().kibanaLegacy.loadAngularBootstrap();
getServices().kibanaLegacy.loadFontAwesome();
const { getInnerAngularModuleEmbeddable } = await import(
'./application/angular/get_inner_angular'
Expand Down
7 changes: 6 additions & 1 deletion src/plugins/kibana_legacy/public/angular/angular_config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
ILocationProvider,
IModule,
IRootScopeService,
IRequestConfig,
} from 'angular';
import $ from 'jquery';
import { set } from '@elastic/safer-lodash-set';
Expand All @@ -22,7 +23,6 @@ import { ChromeBreadcrumb, EnvironmentMode, PackageInfo } from 'kibana/public';
import { History } from 'history';

import { CoreStart } from 'kibana/public';
import { isSystemApiRequest } from '../utils';
import { formatAngularHttpError, isAngularHttpError } from '../notify/lib';

export interface RouteConfiguration {
Expand All @@ -38,6 +38,11 @@ export interface RouteConfiguration {
requireUICapability?: string;
}

function isSystemApiRequest(request: IRequestConfig) {
const { headers } = request;
return headers && !!headers['kbn-system-request'];
}

/**
* Detects whether a given angular route is a dummy route that doesn't
* require any action. There are two ways this can happen:
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/kibana_legacy/public/angular/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Side Public License, v 1.
*/

// @ts-ignore
export { PromiseServiceCreator } from './promises';
// @ts-ignore
export { watchMultiDecorator } from './watch_multi';
export * from './angular_config';
Expand Down
1 change: 0 additions & 1 deletion src/plugins/kibana_legacy/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const plugin = (initializerContext: PluginInitializerContext) =>

export * from './plugin';

export { initAngularBootstrap } from './angular_bootstrap';
export { PaginateDirectiveProvider, PaginateControlsDirectiveProvider } from './paginate/paginate';
export * from './angular';
export * from './notify';
Expand Down
1 change: 1 addition & 0 deletions src/plugins/kibana_legacy/public/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const createStartContract = (): Start => ({
getHideWriteControls: jest.fn(),
},
loadFontAwesome: jest.fn(),
loadAngularBootstrap: jest.fn(),
});

export const kibanaLegacyPluginMock = {
Expand Down
1 change: 0 additions & 1 deletion src/plugins/kibana_legacy/public/notify/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
* Side Public License, v 1.
*/

export * from './toasts';
export * from './lib';
100 changes: 0 additions & 100 deletions src/plugins/kibana_legacy/public/notify/toasts/TOAST_NOTIFICATIONS.md

This file was deleted.

9 changes: 0 additions & 9 deletions src/plugins/kibana_legacy/public/notify/toasts/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b3aebd2

Please sign in to comment.