diff --git a/docs/apm/transactions.asciidoc b/docs/apm/transactions.asciidoc
index e7555a6c3e3d6..e8c5d6600c0bd 100644
--- a/docs/apm/transactions.asciidoc
+++ b/docs/apm/transactions.asciidoc
@@ -151,7 +151,7 @@ Learn more about a trace sample in the *Metadata* tab:
* User - Requires additional configuration, but allows you to see which user experienced the current transaction.
TIP: All of this data is stored in documents in Elasticsearch.
-This means you can select "Actions - View sample document" to see the actual Elasticsearch document under the discover tab.
+This means you can select "Actions - View transaction in Discover" to see the actual Elasticsearch document under the discover tab.
*Trace sample logs*
diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js
index d390966a6a52f..607afa266da83 100644
--- a/packages/kbn-pm/dist/index.js
+++ b/packages/kbn-pm/dist/index.js
@@ -8987,6 +8987,13 @@ const BootstrapCommand = {
}, {
prefix: '[vscode]',
debug: false
+ });
+ await Object(_utils_child_process__WEBPACK_IMPORTED_MODULE_3__["spawnStreaming"])(process.execPath, ['scripts/build_ts_refs', '--ignore-type-failures'], {
+ cwd: kbn.getAbsolute(),
+ env: process.env
+ }, {
+ prefix: '[ts refs]',
+ debug: false
}); // send timings
await reporter.timings({
diff --git a/packages/kbn-pm/src/commands/bootstrap.ts b/packages/kbn-pm/src/commands/bootstrap.ts
index 0b3141ab9a5a9..e7b8cad7ebc16 100644
--- a/packages/kbn-pm/src/commands/bootstrap.ts
+++ b/packages/kbn-pm/src/commands/bootstrap.ts
@@ -137,6 +137,16 @@ export const BootstrapCommand: ICommand = {
{ prefix: '[vscode]', debug: false }
);
+ await spawnStreaming(
+ process.execPath,
+ ['scripts/build_ts_refs', '--ignore-type-failures'],
+ {
+ cwd: kbn.getAbsolute(),
+ env: process.env,
+ },
+ { prefix: '[ts refs]', debug: false }
+ );
+
// send timings
await reporter.timings({
upstreamBranch: kbn.kibanaProject.json.branch,
diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx
index 92ca4ce96bf72..34673310f2c6e 100644
--- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx
+++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx
@@ -408,7 +408,14 @@ export const DiscoverGrid = ({
if (!rowCount) {
return (
-
+
diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx
index 371eb014eab8f..bdf9268c73060 100644
--- a/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx
+++ b/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx
@@ -15,6 +15,7 @@ import {
EuiFlyout,
EuiFlyoutBody,
EuiFlyoutHeader,
+ EuiIconTip,
EuiTitle,
EuiButtonEmpty,
EuiText,
@@ -147,7 +148,8 @@ export function DiscoverGridFlyout({
{indexPattern.isTimeBased() && indexPattern.id && (
-
-
- {i18n.translate('discover.grid.tableRow.viewSurroundingDocumentsLinkTextSimple', {
- defaultMessage: 'Surrounding documents',
- })}
-
-
+
+
+
+ {i18n.translate(
+ 'discover.grid.tableRow.viewSurroundingDocumentsLinkTextSimple',
+ {
+ defaultMessage: 'Surrounding documents',
+ }
+ )}
+
+
+
+
+
+
)}
{activePage !== -1 && (
diff --git a/src/plugins/discover/public/embeddable/saved_search_grid.tsx b/src/plugins/discover/public/embeddable/saved_search_grid.tsx
index ca750ca6fb976..ff72ed378aff3 100644
--- a/src/plugins/discover/public/embeddable/saved_search_grid.tsx
+++ b/src/plugins/discover/public/embeddable/saved_search_grid.tsx
@@ -21,7 +21,13 @@ export function DiscoverGridEmbeddable(props: DiscoverGridEmbeddableProps) {
const [expandedDoc, setExpandedDoc] = useState(undefined);
return (
-
+
{props.totalHitCount !== 0 && (
diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts
index c9c9692e6986b..afd70cc5bbee7 100644
--- a/src/plugins/discover/server/ui_settings.ts
+++ b/src/plugins/discover/server/ui_settings.ts
@@ -164,7 +164,7 @@ export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record $(mark).text());
- expect(marks.length).to.above(10);
+ expect(marks.length).to.above(0);
});
it('removing a filter removes highlights', async function () {
diff --git a/test/functional/apps/discover/_discover_fields_api.ts b/test/functional/apps/discover/_discover_fields_api.ts
index 700c865031cd6..fb3ee3b9858d3 100644
--- a/test/functional/apps/discover/_discover_fields_api.ts
+++ b/test/functional/apps/discover/_discover_fields_api.ts
@@ -11,7 +11,6 @@ import { FtrProviderContext } from './ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const log = getService('log');
- const docTable = getService('docTable');
const retry = getService('retry');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
@@ -19,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const defaultSettings = {
defaultIndex: 'logstash-*',
'discover:searchFieldsFromSource': false,
+ 'doc_table:legacy': true,
};
describe('discover uses fields API test', function describeIndexTests() {
before(async function () {
@@ -27,13 +27,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
await kibanaServer.uiSettings.replace(defaultSettings);
- log.debug('discover');
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setDefaultAbsoluteRange();
});
after(async () => {
- await kibanaServer.uiSettings.replace({ 'discover:searchFieldsFromSource': true });
+ await kibanaServer.uiSettings.replace({});
});
it('should correctly display documents', async function () {
@@ -61,8 +60,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('displays _source viewer in doc viewer', async function () {
- await docTable.clickRowToggle({ rowIndex: 0 });
-
+ await PageObjects.discover.clickDocTableRowToggle(0);
await PageObjects.discover.isShowingDocViewer();
await PageObjects.discover.clickDocViewerTab(1);
await PageObjects.discover.expectSourceViewerToExist();
diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts
index effacb30bdc89..1583903be4991 100644
--- a/test/functional/page_objects/discover_page.ts
+++ b/test/functional/page_objects/discover_page.ts
@@ -240,7 +240,7 @@ export class DiscoverPageObject extends FtrService {
}
public async useLegacyTable() {
- return (await this.kibanaServer.uiSettings.get('doc_table:legacy')) !== false;
+ return (await this.kibanaServer.uiSettings.get('doc_table:legacy')) === true;
}
public async getDocTableIndex(index: number) {
@@ -276,6 +276,11 @@ export class DiscoverPageObject extends FtrService {
return result[usedCellIdx];
}
+ public async clickDocTableRowToggle(rowIndex: number = 0) {
+ const docTable = await this.getDocTable();
+ await docTable.clickRowToggle({ rowIndex });
+ }
+
public async skipToEndOfDocTable() {
// add the focus to the button to make it appear
const skipButton = await this.testSubjects.find('discoverSkipTableButton');
diff --git a/test/functional/services/dashboard/expectations.ts b/test/functional/services/dashboard/expectations.ts
index 75f60b1448eea..c56e7c1eae27e 100644
--- a/test/functional/services/dashboard/expectations.ts
+++ b/test/functional/services/dashboard/expectations.ts
@@ -226,11 +226,20 @@ export class DashboardExpectService extends FtrService {
async savedSearchRowCount(expectedMinCount: number) {
this.log.debug(`DashboardExpect.savedSearchRowCount(${expectedMinCount})`);
await this.retry.try(async () => {
- const savedSearchRows = await this.testSubjects.findAll(
- 'docTableExpandToggleColumn',
- this.findTimeout
- );
- expect(savedSearchRows.length).to.be.above(expectedMinCount);
+ const gridExists = await this.find.existsByCssSelector('[data-document-number]');
+ if (gridExists) {
+ const grid = await this.find.byCssSelector('[data-document-number]');
+ // in this case it's the document explorer
+ const docNr = Number(await grid.getAttribute('data-document-number'));
+ expect(docNr).to.be.above(expectedMinCount);
+ } else {
+ // in this case it's the classic table
+ const savedSearchRows = await this.testSubjects.findAll(
+ 'docTableExpandToggleColumn',
+ this.findTimeout
+ );
+ expect(savedSearchRows.length).to.be.above(expectedMinCount);
+ }
});
}
diff --git a/test/functional/services/inspector.ts b/test/functional/services/inspector.ts
index 753d9b7b0b85e..b8dec2a2092fb 100644
--- a/test/functional/services/inspector.ts
+++ b/test/functional/services/inspector.ts
@@ -195,8 +195,12 @@ export class InspectorService extends FtrService {
*/
public async openInspectorView(viewId: string): Promise {
this.log.debug(`Open Inspector view ${viewId}`);
- await this.testSubjects.click('inspectorViewChooser');
- await this.testSubjects.click(viewId);
+ await this.retry.try(async () => {
+ await this.testSubjects.click('inspectorViewChooser');
+ // check whether popover menu opens, if not, fail and retry opening
+ await this.testSubjects.existOrFail(viewId, { timeout: 2000 });
+ await this.testSubjects.click(viewId);
+ });
}
/**
diff --git a/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/__snapshots__/index.test.tsx.snap b/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/__snapshots__/index.test.tsx.snap
index de13bf910ce0f..5f300b45de80a 100644
--- a/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/__snapshots__/index.test.tsx.snap
+++ b/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/__snapshots__/index.test.tsx.snap
@@ -34,11 +34,7 @@ exports[`DetailView should render Discover button 1`] = `
}
kuery=""
>
-
- View 10 occurrences in Discover.
-
+ View 10 occurrences in Discover.
`;
diff --git a/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx b/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx
index 97118bf763d43..0a6b134275121 100644
--- a/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/error_group_details/detail_view/index.tsx
@@ -6,7 +6,6 @@
*/
import {
- EuiButtonEmpty,
EuiIcon,
EuiPanel,
EuiSpacer,
@@ -100,16 +99,14 @@ export function DetailView({ errorGroup, urlParams, kuery }: Props) {
-
- {i18n.translate(
- 'xpack.apm.errorGroupDetails.viewOccurrencesInDiscoverButtonLabel',
- {
- defaultMessage:
- 'View {occurrencesCount} {occurrencesCount, plural, one {occurrence} other {occurrences}} in Discover.',
- values: { occurrencesCount },
- }
- )}
-
+ {i18n.translate(
+ 'xpack.apm.errorGroupDetails.viewOccurrencesInDiscoverButtonLabel',
+ {
+ defaultMessage:
+ 'View {occurrencesCount} {occurrencesCount, plural, one {occurrence} other {occurrences}} in Discover.',
+ values: { occurrencesCount },
+ }
+ )}
diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx
index 0f7a6a295601b..477098aa81d04 100644
--- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx
@@ -7,7 +7,6 @@
import {
EuiBadge,
- EuiButtonEmpty,
EuiCallOut,
EuiFlexGroup,
EuiFlexItem,
@@ -126,14 +125,12 @@ export function SpanFlyout({
-
- {i18n.translate(
- 'xpack.apm.transactionDetails.spanFlyout.viewSpanInDiscoverButtonLabel',
- {
- defaultMessage: 'View span in Discover',
- }
- )}
-
+ {i18n.translate(
+ 'xpack.apm.transactionDetails.spanFlyout.viewSpanInDiscoverButtonLabel',
+ {
+ defaultMessage: 'View span in Discover',
+ }
+ )}
diff --git a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts
index bcb52f4721dd5..1d37dde6c6343 100644
--- a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts
+++ b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts
@@ -67,7 +67,7 @@ describe('Transaction action menu', () => {
actions: [
{
key: 'sampleDocument',
- label: 'View sample document',
+ label: 'View transaction in Discover',
href: 'some-basepath/app/discover#/?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-24h,to:now))&_a=(index:apm_static_index_pattern_id,interval:auto,query:(language:kuery,query:\'processor.event:"transaction" AND transaction.id:"123" AND trace.id:"123"\'))',
condition: true,
},
@@ -134,7 +134,7 @@ describe('Transaction action menu', () => {
actions: [
{
key: 'sampleDocument',
- label: 'View sample document',
+ label: 'View transaction in Discover',
href: 'some-basepath/app/discover#/?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-24h,to:now))&_a=(index:apm_static_index_pattern_id,interval:auto,query:(language:kuery,query:\'processor.event:"transaction" AND transaction.id:"123" AND trace.id:"123"\'))',
condition: true,
},
@@ -200,7 +200,7 @@ describe('Transaction action menu', () => {
actions: [
{
key: 'sampleDocument',
- label: 'View sample document',
+ label: 'View transaction in Discover',
href: 'some-basepath/app/discover#/?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-24h,to:now))&_a=(index:apm_static_index_pattern_id,interval:auto,query:(language:kuery,query:\'processor.event:"transaction" AND transaction.id:"123" AND trace.id:"123"\'))',
condition: true,
},
diff --git a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.ts b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.ts
index daf5cb0833b61..20c10b6d9557c 100644
--- a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.ts
+++ b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/sections.ts
@@ -191,7 +191,7 @@ export const getSections = ({
label: i18n.translate(
'xpack.apm.transactionActionMenu.viewSampleDocumentLinkLabel',
{
- defaultMessage: 'View sample document',
+ defaultMessage: 'View transaction in Discover',
}
),
href: getDiscoverHref({
diff --git a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx
index 4d82bb69ee9a5..851472cfedabe 100644
--- a/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx
+++ b/x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx
@@ -74,7 +74,7 @@ describe('TransactionActionMenu component', () => {
Transactions.transactionWithMinimalData
);
- expect(queryByText('View sample document')).not.toBeNull();
+ expect(queryByText('View transaction in Discover')).not.toBeNull();
});
it('always renders the trace logs link', async () => {
diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json
index 432e72db05e8c..bc6fd8bff0da0 100644
--- a/x-pack/plugins/fleet/common/openapi/bundled.json
+++ b/x-pack/plugins/fleet/common/openapi/bundled.json
@@ -4226,9 +4226,6 @@
"ca_trusted_fingerprint": {
"type": "string"
},
- "api_key": {
- "type": "string"
- },
"config": {
"type": "object"
},
diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml
index 439f56da63e5e..50a7463029f98 100644
--- a/x-pack/plugins/fleet/common/openapi/bundled.yaml
+++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml
@@ -2664,8 +2664,6 @@ components:
type: string
ca_trusted_fingerprint:
type: string
- api_key:
- type: string
config:
type: object
config_yaml:
diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/output.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/output.yaml
index a91ec2cb14e94..75823d02af865 100644
--- a/x-pack/plugins/fleet/common/openapi/components/schemas/output.yaml
+++ b/x-pack/plugins/fleet/common/openapi/components/schemas/output.yaml
@@ -20,8 +20,6 @@ properties:
type: string
ca_trusted_fingerprint:
type: string
- api_key:
- type: string
config:
type: object
config_yaml:
diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts
index d8dec7e64a6af..6fbb423507c3b 100644
--- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts
+++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts
@@ -75,7 +75,7 @@ export interface FullAgentPolicyOutputPermissions {
};
}
-export type FullAgentPolicyOutput = Pick