mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* [Reporting] Use non-deprecated csv_searchsource API in integration tests * update snapshot * fix tests * update usage tests * test organization Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
d801c82276
commit
b5021e1d02
4 changed files with 104 additions and 56 deletions
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { JOB_PARAMS_RISON_CSV_DEPRECATED } from '../services/fixtures';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
import { ILM_POLICY_NAME } from '../../../plugins/reporting/common/constants';
|
||||
|
@ -19,6 +18,16 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const reportingAPI = getService('reportingAPI');
|
||||
const security = getService('security');
|
||||
|
||||
const JOB_PARAMS_RISON_CSV =
|
||||
`(columns:!(order_date,category,customer_full_name,taxful_total_price,currency)` +
|
||||
`,objectType:search,searchSource:(fields:!((field:'*',include_unmapped:true))` +
|
||||
`,filter:!((meta:(field:order_date,index:aac3e500-f2c7-11ea-8250-fb138aa491e7` +
|
||||
`,params:()),query:(range:(order_date:(format:strict_date_optional_time` +
|
||||
`,gte:'2019-06-02T12:28:40.866Z',lte:'2019-07-18T20:59:57.136Z')))))` +
|
||||
`,index:aac3e500-f2c7-11ea-8250-fb138aa491e7,parent:(filter:!(),highlightAll:!t` +
|
||||
`,index:aac3e500-f2c7-11ea-8250-fb138aa491e7,query:(language:kuery,query:'')` +
|
||||
`,version:!t),sort:!((order_date:desc)),trackTotalHits:!t),title:'EC SEARCH from DEFAULT')`;
|
||||
|
||||
describe('ILM policy migration APIs', () => {
|
||||
before(async () => {
|
||||
await reportingAPI.initLogs();
|
||||
|
@ -39,9 +48,9 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
// try creating a report
|
||||
await supertest
|
||||
.post(`/api/reporting/generate/csv`)
|
||||
.post(`/api/reporting/generate/csv_searchsource`)
|
||||
.set('kbn-xsrf', 'xxx')
|
||||
.send({ jobParams: JOB_PARAMS_RISON_CSV_DEPRECATED });
|
||||
.send({ jobParams: JOB_PARAMS_RISON_CSV });
|
||||
|
||||
expect(await reportingAPI.checkIlmMigrationStatus()).to.eql('ok');
|
||||
});
|
||||
|
@ -51,9 +60,9 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
await es.ilm.deleteLifecycle({ name: ILM_POLICY_NAME });
|
||||
|
||||
await supertest
|
||||
.post(`/api/reporting/generate/csv`)
|
||||
.post(`/api/reporting/generate/csv_searchsource`)
|
||||
.set('kbn-xsrf', 'xxx')
|
||||
.send({ jobParams: JOB_PARAMS_RISON_CSV_DEPRECATED });
|
||||
.send({ jobParams: JOB_PARAMS_RISON_CSV });
|
||||
|
||||
expect(await reportingAPI.checkIlmMigrationStatus()).to.eql('policy-not-found');
|
||||
// assert that migration fixes this
|
||||
|
@ -64,9 +73,9 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
it('detects when reporting indices should be migrated due to unmanaged indices', async () => {
|
||||
await reportingAPI.makeAllReportingIndicesUnmanaged();
|
||||
await supertest
|
||||
.post(`/api/reporting/generate/csv`)
|
||||
.post(`/api/reporting/generate/csv_searchsource`)
|
||||
.set('kbn-xsrf', 'xxx')
|
||||
.send({ jobParams: JOB_PARAMS_RISON_CSV_DEPRECATED });
|
||||
.send({ jobParams: JOB_PARAMS_RISON_CSV });
|
||||
|
||||
expect(await reportingAPI.checkIlmMigrationStatus()).to.eql('indices-not-managed-by-policy');
|
||||
// assert that migration fixes this
|
||||
|
|
|
@ -53,16 +53,38 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
await esArchiver.unload(spacesSharedObjectsArchive);
|
||||
});
|
||||
|
||||
/*
|
||||
* NOTE: All timestamps in the documents are midnight UTC.
|
||||
* "00:00:00.000" means the time is formatted in UTC timezone
|
||||
*/
|
||||
describe('CSV saved search export', () => {
|
||||
const JOB_PARAMS_CSV_DEFAULT_SPACE =
|
||||
`columns:!(order_date,category,customer_full_name,taxful_total_price,currency),objectType:search,searchSource:(fields:!((field:'*',include_unmapped:true))` +
|
||||
`,filter:!((meta:(field:order_date,index:aac3e500-f2c7-11ea-8250-fb138aa491e7,params:()),query:(range:(order_date:(format:strict_date_optional_time,gte:'2019-06-02T12:28:40.866Z'` +
|
||||
`,lte:'2019-07-18T20:59:57.136Z'))))),index:aac3e500-f2c7-11ea-8250-fb138aa491e7,parent:(filter:!(),highlightAll:!t,index:aac3e500-f2c7-11ea-8250-fb138aa491e7` +
|
||||
`,query:(language:kuery,query:''),version:!t),sort:!((order_date:desc)),trackTotalHits:!t)`;
|
||||
|
||||
const JOB_PARAMS_CSV_NONDEFAULT_SPACE =
|
||||
`columns:!(order_date,category,customer_full_name,taxful_total_price,currency),objectType:search,searchSource:(fields:!((field:'*',include_unmapped:true))` +
|
||||
`,filter:!((meta:(field:order_date,index:afac7364-c755-5f5c-acd5-8ed6605c5c77,params:()),query:(range:(order_date:(format:strict_date_optional_time` +
|
||||
`,gte:'2006-11-04T19:58:58.244Z',lte:'2021-11-04T18:58:58.244Z'))))),index:afac7364-c755-5f5c-acd5-8ed6605c5c77,parent:(filter:!(),highlightAll:!t` +
|
||||
`,index:afac7364-c755-5f5c-acd5-8ed6605c5c77,query:(language:kuery,query:''),version:!t),sort:!((order_date:desc)),trackTotalHits:!t)`;
|
||||
|
||||
it('should use formats from the default space', async () => {
|
||||
kibanaServer.uiSettings.update({ 'csv:separator': ',', 'dateFormat:tz': 'UTC' });
|
||||
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv`, {
|
||||
jobParams: `(conflictedTypesFields:!(),fields:!(order_date,order_date,customer_full_name,taxful_total_price),indexPatternId:aac3e500-f2c7-11ea-8250-fb138aa491e7,metaFields:!(_source,_id,_type,_index,_score),objectType:search,searchRequest:(body:(_source:(includes:!(order_date,customer_full_name,taxful_total_price)),docvalue_fields:!((field:order_date,format:date_time)),query:(bool:(filter:!((match_all:()),(range:(order_date:(format:strict_date_optional_time,gte:'2019-06-11T04:49:43.495Z',lte:'2019-07-14T10:25:34.149Z')))),must:!(),must_not:!(),should:!())),script_fields:(),sort:!((order_date:(order:desc,unmapped_type:boolean))),stored_fields:!(order_date,customer_full_name,taxful_total_price),version:!t),index:'ec*'),title:'EC SEARCH')`,
|
||||
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv_searchsource`, {
|
||||
jobParams: `(${JOB_PARAMS_CSV_DEFAULT_SPACE},title:'EC SEARCH')`,
|
||||
});
|
||||
const csv = await getCompleted$(path).toPromise();
|
||||
expect(csv).to.match(
|
||||
/^"order_date","order_date","customer_full_name","taxful_total_price"\n"Jul 12, 2019 @ 00:00:00.000","Jul 12, 2019 @ 00:00:00.000","Sultan Al Boone","173.96"/
|
||||
);
|
||||
|
||||
expectSnapshot(csv.slice(0, 500)).toMatchInline(`
|
||||
"\\"order_date\\",category,\\"customer_full_name\\",\\"taxful_total_price\\",currency
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Sultan Al Boone\\",174,EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",\\"Pia Richards\\",\\"41.969\\",EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Brigitte Meyer\\",\\"40.969\\",EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",\\"Abd Mccarthy\\",\\"41.969\\",EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",\\"Robert "
|
||||
`);
|
||||
});
|
||||
|
||||
it('should use formats from non-default spaces', async () => {
|
||||
|
@ -72,15 +94,21 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
'dateFormat:tz': 'US/Alaska',
|
||||
});
|
||||
const path = await reportingAPI.postJobJSON(
|
||||
`/s/non_default_space/api/reporting/generate/csv`,
|
||||
`/s/non_default_space/api/reporting/generate/csv_searchsource`,
|
||||
{
|
||||
jobParams: `(conflictedTypesFields:!(),fields:!(order_date,category,customer_first_name,customer_full_name,total_quantity,total_unique_products,taxless_total_price,taxful_total_price,currency),indexPatternId:'067dec90-e7ee-11ea-a730-d58e9ea7581b',metaFields:!(_source,_id,_type,_index,_score),objectType:search,searchRequest:(body:(_source:(includes:!(order_date,category,customer_first_name,customer_full_name,total_quantity,total_unique_products,taxless_total_price,taxful_total_price,currency)),docvalue_fields:!((field:order_date,format:date_time)),query:(bool:(filter:!((match_all:()),(range:(order_date:(format:strict_date_optional_time,gte:'2019-06-11T08:24:16.425Z',lte:'2019-07-13T09:31:07.520Z')))),must:!(),must_not:!(),should:!())),script_fields:(),sort:!((order_date:(order:desc,unmapped_type:boolean))),stored_fields:!(order_date,category,customer_first_name,customer_full_name,total_quantity,total_unique_products,taxless_total_price,taxful_total_price,currency),version:!t),index:'ecommerce*'),title:'Ecom Search')`,
|
||||
jobParams: `(${JOB_PARAMS_CSV_NONDEFAULT_SPACE},title:'Ecom Search from Non-Default')`,
|
||||
}
|
||||
);
|
||||
const csv = await getCompleted$(path).toPromise();
|
||||
expect(csv).to.match(
|
||||
/^order_date;category;customer_first_name;customer_full_name;total_quantity;total_unique_products;taxless_total_price;taxful_total_price;currency\nJul 11, 2019 @ 16:00:00.000;/
|
||||
);
|
||||
expectSnapshot(csv.slice(0, 500)).toMatchInline(`
|
||||
"order_date;category;customer_full_name;taxful_total_price;currency
|
||||
Jul 11, 2019 @ 16:00:00.000;Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories;Sultan Al Boone;174;EUR
|
||||
Jul 11, 2019 @ 16:00:00.000;Women's Shoes, Women's Clothing;Pia Richards;41.969;EUR
|
||||
Jul 11, 2019 @ 16:00:00.000;Women's Clothing;Brigitte Meyer;40.969;EUR
|
||||
Jul 11, 2019 @ 16:00:00.000;Men's Clothing;Abd Mccarthy;41.969;EUR
|
||||
Jul 11, 2019 @ 16:00:00.000;Men's Clothing;Robert Banks;36.969;EUR
|
||||
Jul 11, 2019 @ 16:00:00."
|
||||
`);
|
||||
});
|
||||
|
||||
it(`should use browserTimezone in jobParams for date formatting`, async () => {
|
||||
|
@ -90,25 +118,35 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
'csv:separator': ';',
|
||||
'dateFormat:tz': tzSettings,
|
||||
});
|
||||
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv`, {
|
||||
jobParams: `(browserTimezone:${tzParam},conflictedTypesFields:!(),fields:!(order_date,category,customer_full_name,taxful_total_price,currency),indexPatternId:aac3e500-f2c7-11ea-8250-fb138aa491e7,metaFields:!(_source,_id,_type,_index,_score),objectType:search,searchRequest:(body:(_source:(includes:!(order_date,category,customer_full_name,taxful_total_price,currency)),docvalue_fields:!((field:order_date,format:date_time)),query:(bool:(filter:!((match_all:()),(range:(order_date:(format:strict_date_optional_time,gte:'2019-05-30T05:09:59.743Z',lte:'2019-07-26T08:47:09.682Z')))),must:!(),must_not:!(),should:!())),script_fields:(),sort:!((order_date:(order:desc,unmapped_type:boolean))),stored_fields:!(order_date,category,customer_full_name,taxful_total_price,currency),version:!t),index:'ec*'),title:'EC SEARCH from DEFAULT')`,
|
||||
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv_searchsource`, {
|
||||
jobParams: `(browserTimezone:${tzParam},${JOB_PARAMS_CSV_DEFAULT_SPACE},title:'EC SEARCH')`,
|
||||
});
|
||||
|
||||
const csv = await getCompleted$(path).toPromise();
|
||||
expect(csv).to.match(
|
||||
/^"order_date",category,"customer_full_name","taxful_total_price",currency\n"Jul 11, 2019 @ 17:00:00.000"/
|
||||
);
|
||||
expectSnapshot(csv.slice(0, 500)).toMatchInline(`
|
||||
"\\"order_date\\",category,\\"customer_full_name\\",\\"taxful_total_price\\",currency
|
||||
\\"Jul 11, 2019 @ 17:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Sultan Al Boone\\",174,EUR
|
||||
\\"Jul 11, 2019 @ 17:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",\\"Pia Richards\\",\\"41.969\\",EUR
|
||||
\\"Jul 11, 2019 @ 17:00:00.000\\",\\"Women's Clothing\\",\\"Brigitte Meyer\\",\\"40.969\\",EUR
|
||||
\\"Jul 11, 2019 @ 17:00:00.000\\",\\"Men's Clothing\\",\\"Abd Mccarthy\\",\\"41.969\\",EUR
|
||||
\\"Jul 11, 2019 @ 17:00:00.000\\",\\"Men's Clothing\\",\\"Robert "
|
||||
`);
|
||||
});
|
||||
|
||||
it(`should default to UTC for date formatting when timezone is not known`, async () => {
|
||||
kibanaServer.uiSettings.update({ 'csv:separator': ',', 'dateFormat:tz': 'Browser' });
|
||||
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv`, {
|
||||
jobParams: `(conflictedTypesFields:!(),fields:!(order_date,order_date,customer_full_name,taxful_total_price),indexPatternId:aac3e500-f2c7-11ea-8250-fb138aa491e7,metaFields:!(_source,_id,_type,_index,_score),objectType:search,searchRequest:(body:(_source:(includes:!(order_date,customer_full_name,taxful_total_price)),docvalue_fields:!((field:order_date,format:date_time)),query:(bool:(filter:!((match_all:()),(range:(order_date:(format:strict_date_optional_time,gte:'2019-06-11T04:49:43.495Z',lte:'2019-07-14T10:25:34.149Z')))),must:!(),must_not:!(),should:!())),script_fields:(),sort:!((order_date:(order:desc,unmapped_type:boolean))),stored_fields:!(order_date,customer_full_name,taxful_total_price),version:!t),index:'ec*'),title:'EC SEARCH')`,
|
||||
const path = await reportingAPI.postJobJSON(`/api/reporting/generate/csv_searchsource`, {
|
||||
jobParams: `(${JOB_PARAMS_CSV_DEFAULT_SPACE},title:'EC SEARCH')`,
|
||||
});
|
||||
const csv = await getCompleted$(path).toPromise();
|
||||
expect(csv).to.match(
|
||||
/^"order_date","order_date","customer_full_name","taxful_total_price"\n"Jul 12, 2019 @ 00:00:00.000","Jul 12, 2019 @ 00:00:00.000","Sultan Al Boone","173.96"/
|
||||
);
|
||||
expectSnapshot(csv.slice(0, 500)).toMatchInline(`
|
||||
"\\"order_date\\",category,\\"customer_full_name\\",\\"taxful_total_price\\",currency
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories\\",\\"Sultan Al Boone\\",174,EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Shoes, Women's Clothing\\",\\"Pia Richards\\",\\"41.969\\",EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Women's Clothing\\",\\"Brigitte Meyer\\",\\"40.969\\",EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",\\"Abd Mccarthy\\",\\"41.969\\",EUR
|
||||
\\"Jul 12, 2019 @ 00:00:00.000\\",\\"Men's Clothing\\",\\"Robert "
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@ import { FtrProviderContext } from '../ftr_provider_context';
|
|||
import * as GenerationUrls from '../services/generation_urls';
|
||||
import { ReportingUsageStats } from '../services/usage';
|
||||
|
||||
const JOB_PARAMS_CSV_DEFAULT_SPACE =
|
||||
`columns:!(order_date,category,customer_full_name,taxful_total_price,currency),objectType:search,searchSource:(fields:!((field:'*',include_unmapped:true))` +
|
||||
`,filter:!((meta:(field:order_date,index:aac3e500-f2c7-11ea-8250-fb138aa491e7,params:()),query:(range:(order_date:(format:strict_date_optional_time,gte:'2019-06-02T12:28:40.866Z'` +
|
||||
`,lte:'2019-07-18T20:59:57.136Z'))))),index:aac3e500-f2c7-11ea-8250-fb138aa491e7,parent:(filter:!(),highlightAll:!t,index:aac3e500-f2c7-11ea-8250-fb138aa491e7` +
|
||||
`,query:(language:kuery,query:''),version:!t),sort:!((order_date:desc)),trackTotalHits:!t)`;
|
||||
const OSS_KIBANA_ARCHIVE_PATH = 'test/functional/fixtures/es_archiver/dashboard/current/kibana';
|
||||
const OSS_DATA_ARCHIVE_PATH = 'test/functional/fixtures/es_archiver/dashboard/current/data';
|
||||
|
||||
|
@ -20,30 +25,14 @@ interface UsageStats {
|
|||
// eslint-disable-next-line import/no-default-export
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const reportingAPI = getService('reportingAPI');
|
||||
const retry = getService('retry');
|
||||
const usageAPI = getService('usageAPI');
|
||||
|
||||
describe('Usage', () => {
|
||||
before(async () => {
|
||||
await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH);
|
||||
await esArchiver.load(OSS_DATA_ARCHIVE_PATH);
|
||||
|
||||
await kibanaServer.uiSettings.update({
|
||||
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
|
||||
});
|
||||
await reportingAPI.deleteAllReports();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload(OSS_KIBANA_ARCHIVE_PATH);
|
||||
await esArchiver.unload(OSS_DATA_ARCHIVE_PATH);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await reportingAPI.deleteAllReports();
|
||||
});
|
||||
const deleteAllReports = () => reportingAPI.deleteAllReports();
|
||||
beforeEach(deleteAllReports);
|
||||
after(deleteAllReports);
|
||||
|
||||
describe('initial state', () => {
|
||||
let usage: UsageStats;
|
||||
|
@ -69,8 +58,8 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
reportingAPI.expectAllTimePdfLayoutStats(usage, 'preserve_layout', 0);
|
||||
reportingAPI.expectAllTimePdfLayoutStats(usage, 'print', 0);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'print', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv', 0);
|
||||
reportingAPI.expectAllTimeJobTypeTotalStats(usage, 'csv', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv_searchsource', 0);
|
||||
reportingAPI.expectAllTimeJobTypeTotalStats(usage, 'csv_searchsource', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'printable_pdf', 0);
|
||||
reportingAPI.expectAllTimeJobTypeTotalStats(usage, 'printable_pdf', 0);
|
||||
});
|
||||
|
@ -123,10 +112,24 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
describe('from new jobs posted', () => {
|
||||
it('should handle csv', async () => {
|
||||
before(async () => {
|
||||
await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH);
|
||||
await esArchiver.load(OSS_DATA_ARCHIVE_PATH);
|
||||
await reportingAPI.initEcommerce();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload(OSS_KIBANA_ARCHIVE_PATH);
|
||||
await esArchiver.unload(OSS_DATA_ARCHIVE_PATH);
|
||||
await reportingAPI.teardownEcommerce();
|
||||
});
|
||||
|
||||
it('should handle csv_searchsource', async () => {
|
||||
await reportingAPI.expectAllJobsToFinishSuccessfully(
|
||||
await Promise.all([
|
||||
reportingAPI.postJob(GenerationUrls.CSV_DISCOVER_KUERY_AND_FILTER_6_3),
|
||||
reportingAPI.postJob(
|
||||
`/api/reporting/generate/csv_searchsource?jobParams=(${JOB_PARAMS_CSV_DEFAULT_SPACE})`
|
||||
),
|
||||
])
|
||||
);
|
||||
|
||||
|
@ -135,7 +138,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
reportingAPI.expectRecentPdfAppStats(usage, 'dashboard', 0);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'preserve_layout', 0);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'print', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv', 1);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv_searchsource', 1);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'printable_pdf', 0);
|
||||
});
|
||||
|
||||
|
@ -152,7 +155,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
reportingAPI.expectRecentPdfAppStats(usage, 'dashboard', 1);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'preserve_layout', 2);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'print', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv_searchsource', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'printable_pdf', 2);
|
||||
});
|
||||
|
||||
|
@ -171,14 +174,14 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
reportingAPI.expectRecentPdfAppStats(usage, 'dashboard', 1);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'preserve_layout', 0);
|
||||
reportingAPI.expectRecentPdfLayoutStats(usage, 'print', 2);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv_searchsource', 0);
|
||||
reportingAPI.expectRecentJobTypeTotalStats(usage, 'printable_pdf', 2);
|
||||
|
||||
reportingAPI.expectAllTimePdfAppStats(usage, 'visualization', 1);
|
||||
reportingAPI.expectAllTimePdfAppStats(usage, 'dashboard', 1);
|
||||
reportingAPI.expectAllTimePdfLayoutStats(usage, 'preserve_layout', 0);
|
||||
reportingAPI.expectAllTimePdfLayoutStats(usage, 'print', 2);
|
||||
reportingAPI.expectAllTimeJobTypeTotalStats(usage, 'csv', 0);
|
||||
reportingAPI.expectAllTimeJobTypeTotalStats(usage, 'csv_searchsource', 0);
|
||||
reportingAPI.expectAllTimeJobTypeTotalStats(usage, 'printable_pdf', 2);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -20,8 +20,6 @@ export const PDF_PRESERVE_PIE_VISUALIZATION_6_3 =
|
|||
'/api/reporting/generate/printablePdf?jobParams=(browserTimezone:America%2FNew_York,layout:(dimensions:(height:441,width:1002),id:preserve_layout),objectType:visualization,relativeUrls:!(%27%2Fapp%2Fkibana%23%2Fvisualize%2Fedit%2F3fe22200-3dcb-11e8-8660-4d65aa086b3c%3F_g%3D(refreshInterval:(display:Off,pause:!!f,value:0),time:(from:!%27Mon%2BApr%2B09%2B2018%2B17:56:08%2BGMT-0400!%27,mode:absolute,to:!%27Wed%2BApr%2B11%2B2018%2B17:56:08%2BGMT-0400!%27))%26_a%3D(filters:!!(),linked:!!f,query:(language:lucene,query:!%27!%27),uiState:(),vis:(aggs:!!((enabled:!!t,id:!%271!%27,params:(),schema:metric,type:count),(enabled:!!t,id:!%272!%27,params:(field:bytes,missingBucket:!!f,missingBucketLabel:Missing,order:desc,orderBy:!%271!%27,otherBucket:!!f,otherBucketLabel:Other,size:5),schema:segment,type:terms)),params:(addLegend:!!t,addTooltip:!!t,isDonut:!!t,labels:(last_level:!!t,show:!!f,truncate:100,values:!!t),legendPosition:right,type:pie),title:!%27Rendering%2BTest:%2Bpie!%27,type:pie))%27),title:%27Rendering%20Test:%20pie%27)';
|
||||
export const PDF_PRINT_PIE_VISUALIZATION_FILTER_AND_SAVED_SEARCH_6_3 =
|
||||
'/api/reporting/generate/printablePdf?jobParams=(browserTimezone:America%2FNew_York,layout:(id:print),objectType:visualization,relativeUrls:!(%27%2Fapp%2Fkibana%23%2Fvisualize%2Fedit%2Fbefdb6b0-3e59-11e8-9fc3-39e49624228e%3F_g%3D(refreshInterval:(display:Off,pause:!!f,value:0),time:(from:!%27Mon%2BApr%2B09%2B2018%2B17:56:08%2BGMT-0400!%27,mode:absolute,to:!%27Wed%2BApr%2B11%2B2018%2B17:56:08%2BGMT-0400!%27))%26_a%3D(filters:!!((!%27$state!%27:(store:appState),meta:(alias:!!n,disabled:!!f,index:a0f483a0-3dc9-11e8-8660-4d65aa086b3c,key:animal.keyword,negate:!!f,params:(query:dog,type:phrase),type:phrase,value:dog),query:(match:(animal.keyword:(query:dog,type:phrase))))),linked:!!t,query:(language:lucene,query:!%27!%27),uiState:(),vis:(aggs:!!((enabled:!!t,id:!%271!%27,params:(),schema:metric,type:count),(enabled:!!t,id:!%272!%27,params:(field:name.keyword,missingBucket:!!f,missingBucketLabel:Missing,order:desc,orderBy:!%271!%27,otherBucket:!!f,otherBucketLabel:Other,size:5),schema:segment,type:terms)),params:(addLegend:!!t,addTooltip:!!t,isDonut:!!t,labels:(last_level:!!t,show:!!f,truncate:100,values:!!t),legendPosition:right,type:pie),title:!%27Filter%2BTest:%2Banimals:%2Blinked%2Bto%2Bsearch%2Bwith%2Bfilter!%27,type:pie))%27),title:%27Filter%20Test:%20animals:%20linked%20to%20search%20with%20filter%27)';
|
||||
export const CSV_DISCOVER_KUERY_AND_FILTER_6_3 =
|
||||
'/api/reporting/generate/csv?jobParams=(conflictedTypesFields:!(),fields:!(%27@timestamp%27,agent,bytes,clientip),indexPatternId:%270bf35f60-3dc9-11e8-8660-4d65aa086b3c%27,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(%27@timestamp%27,agent,bytes,clientip)),docvalue_fields:!(%27@timestamp%27),query:(bool:(filter:!((bool:(minimum_should_match:1,should:!((match:(clientip:%2773.14.212.83%27)))))),must:!((range:(bytes:(gte:100,lt:1000))),(range:(%27@timestamp%27:(format:epoch_millis,gte:1369165215770,lte:1526931615770)))),must_not:!(),should:!())),script_fields:(),sort:!((%27@timestamp%27:(order:desc,unmapped_type:boolean))),stored_fields:!(%27@timestamp%27,agent,bytes,clientip),version:!t),index:%27logstash-*%27),title:%27Bytes%20and%20kuery%20in%20saved%20search%20with%20filter%27,type:search)';
|
||||
|
||||
export const PDF_PRINT_DASHBOARD_6_2 =
|
||||
'/api/reporting/generate/printablePdf?jobParams=(browserTimezone:America%2FNew_York,layout:(id:print),objectType:dashboard,queryString:%27_g%3D(refreshInterval:(display:Off,pause:!!f,value:0),time:(from:!%27Mon%2BApr%2B09%2B2018%2B17:56:08%2BGMT-0400!%27,mode:absolute,to:!%27Wed%2BApr%2B11%2B2018%2B17:56:08%2BGMT-0400!%27))%26_a%3D(description:!%27!%27,filters:!!((!%27$state!%27:(store:appState),meta:(alias:!!n,disabled:!!f,field:isDog,index:a0f483a0-3dc9-11e8-8660-4d65aa086b3c,key:isDog,negate:!!f,params:(value:!!t),type:phrase,value:true),script:(script:(inline:!%27boolean%2Bcompare(Supplier%2Bs,%2Bdef%2Bv)%2B%257Breturn%2Bs.get()%2B%253D%253D%2Bv%3B%257Dcompare(()%2B-%253E%2B%257B%2Breturn%2Bdoc%255B!!!%27animal.keyword!!!%27%255D.value%2B%253D%253D%2B!!!%27dog!!!%27%2B%257D,%2Bparams.value)%3B!%27,lang:painless,params:(value:!!t))))),fullScreenMode:!!f,options:(hidePanelTitles:!!f,useMargins:!!t),panels:!!((gridData:(h:3,i:!%274!%27,w:6,x:6,y:0),id:edb65990-53ca-11e8-b481-c9426d020fcd,panelIndex:!%274!%27,type:visualization,version:!%276.2.4!%27),(gridData:(h:3,i:!%275!%27,w:6,x:0,y:0),id:!%270644f890-53cb-11e8-b481-c9426d020fcd!%27,panelIndex:!%275!%27,type:visualization,version:!%276.2.4!%27)),query:(language:lucene,query:!%27weightLbs:%253E15!%27),timeRestore:!!t,title:!%27Animal%2BWeights%2B(created%2Bin%2B6.2)!%27,viewMode:view)%27,savedObjectId:%271b2f47b0-53cb-11e8-b481-c9426d020fcd%27)';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue