mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [Reporting] Remove unused priority field * fix test 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
2dc84d93a7
commit
ab4d751c2e
7 changed files with 0 additions and 25 deletions
|
@ -76,7 +76,6 @@ export interface ReportSource {
|
|||
started_at?: string;
|
||||
completed_at?: string;
|
||||
created_at: string;
|
||||
priority?: number;
|
||||
process_expiration?: string;
|
||||
}
|
||||
|
||||
|
@ -115,7 +114,6 @@ export interface ReportApiJSON {
|
|||
kibana_id: string;
|
||||
browser_type: string | undefined;
|
||||
created_at: string;
|
||||
priority?: number;
|
||||
jobtype: string;
|
||||
created_by: string | false;
|
||||
timeout?: number;
|
||||
|
|
|
@ -87,7 +87,6 @@ export class ReportInfoButton extends Component<Props, State> {
|
|||
|
||||
const attempts = info.attempts ? info.attempts.toString() : NA;
|
||||
const maxAttempts = info.max_attempts ? info.max_attempts.toString() : NA;
|
||||
const priority = info.priority ? info.priority.toString() : NA;
|
||||
const timeout = info.timeout ? info.timeout.toString() : NA;
|
||||
const warnings = info.output && info.output.warnings ? info.output.warnings.join(',') : null;
|
||||
|
||||
|
@ -153,10 +152,6 @@ export class ReportInfoButton extends Component<Props, State> {
|
|||
title: 'Max Attempts',
|
||||
description: maxAttempts,
|
||||
},
|
||||
{
|
||||
title: 'Priority',
|
||||
description: priority,
|
||||
},
|
||||
{
|
||||
title: 'Timeout',
|
||||
description: timeout,
|
||||
|
|
|
@ -18,7 +18,6 @@ describe('Class Report', () => {
|
|||
payload: { headers: 'payload_test_field', objectType: 'testOt', title: 'cool report' },
|
||||
meta: { objectType: 'test' },
|
||||
timeout: 30000,
|
||||
priority: 1,
|
||||
});
|
||||
|
||||
expect(report.toEsDocsJSON()).toMatchObject({
|
||||
|
@ -32,7 +31,6 @@ describe('Class Report', () => {
|
|||
max_attempts: 50,
|
||||
meta: { objectType: 'test' },
|
||||
payload: { headers: 'payload_test_field', objectType: 'testOt' },
|
||||
priority: 1,
|
||||
started_at: undefined,
|
||||
status: 'pending',
|
||||
timeout: 30000,
|
||||
|
@ -47,7 +45,6 @@ describe('Class Report', () => {
|
|||
max_attempts: 50,
|
||||
payload: { headers: 'payload_test_field', objectType: 'testOt' },
|
||||
meta: { objectType: 'test' },
|
||||
priority: 1,
|
||||
status: 'pending',
|
||||
timeout: 30000,
|
||||
});
|
||||
|
@ -65,7 +62,6 @@ describe('Class Report', () => {
|
|||
payload: { headers: 'payload_test_field', objectType: 'testOt', title: 'hot report' },
|
||||
meta: { objectType: 'stange' },
|
||||
timeout: 30000,
|
||||
priority: 1,
|
||||
});
|
||||
|
||||
const metadata = {
|
||||
|
@ -88,7 +84,6 @@ describe('Class Report', () => {
|
|||
max_attempts: 50,
|
||||
meta: { objectType: 'stange' },
|
||||
payload: { objectType: 'testOt' },
|
||||
priority: 1,
|
||||
started_at: undefined,
|
||||
status: 'pending',
|
||||
timeout: 30000,
|
||||
|
@ -105,7 +100,6 @@ describe('Class Report', () => {
|
|||
max_attempts: 50,
|
||||
meta: { objectType: 'stange' },
|
||||
payload: { headers: 'payload_test_field', objectType: 'testOt' },
|
||||
priority: 1,
|
||||
started_at: undefined,
|
||||
status: 'pending',
|
||||
timeout: 30000,
|
||||
|
|
|
@ -36,7 +36,6 @@ export class Report implements Partial<ReportSource> {
|
|||
public readonly started_at?: ReportSource['started_at'];
|
||||
public readonly completed_at?: ReportSource['completed_at'];
|
||||
public readonly process_expiration?: ReportSource['process_expiration'];
|
||||
public readonly priority?: ReportSource['priority'];
|
||||
public readonly timeout?: ReportSource['timeout'];
|
||||
|
||||
/*
|
||||
|
@ -63,7 +62,6 @@ export class Report implements Partial<ReportSource> {
|
|||
this.created_by = opts.created_by || false;
|
||||
this.meta = opts.meta || { objectType: 'unknown' };
|
||||
this.browser_type = opts.browser_type;
|
||||
this.priority = opts.priority;
|
||||
|
||||
this.status = opts.status || JOB_STATUSES.PENDING;
|
||||
this.output = opts.output || null;
|
||||
|
@ -98,7 +96,6 @@ export class Report implements Partial<ReportSource> {
|
|||
meta: this.meta,
|
||||
timeout: this.timeout,
|
||||
max_attempts: this.max_attempts,
|
||||
priority: this.priority,
|
||||
browser_type: this.browser_type,
|
||||
status: this.status,
|
||||
attempts: this.attempts,
|
||||
|
@ -124,7 +121,6 @@ export class Report implements Partial<ReportSource> {
|
|||
meta: this.meta,
|
||||
timeout: this.timeout,
|
||||
max_attempts: this.max_attempts,
|
||||
priority: this.priority,
|
||||
browser_type: this.browser_type,
|
||||
status: this.status,
|
||||
attempts: this.attempts,
|
||||
|
|
|
@ -203,7 +203,6 @@ describe('ReportingStore', () => {
|
|||
browserTimezone: 'ABC',
|
||||
},
|
||||
timeout: 30000,
|
||||
priority: 1,
|
||||
});
|
||||
|
||||
await store.setReportClaimed(report, { testDoc: 'test' } as any);
|
||||
|
@ -244,7 +243,6 @@ describe('ReportingStore', () => {
|
|||
browserTimezone: 'BCD',
|
||||
},
|
||||
timeout: 30000,
|
||||
priority: 1,
|
||||
});
|
||||
|
||||
await store.setReportFailed(report, { errors: 'yes' } as any);
|
||||
|
@ -285,7 +283,6 @@ describe('ReportingStore', () => {
|
|||
browserTimezone: 'CDE',
|
||||
},
|
||||
timeout: 30000,
|
||||
priority: 1,
|
||||
});
|
||||
|
||||
await store.setReportCompleted(report, { certainly_completed: 'yes' } as any);
|
||||
|
@ -326,7 +323,6 @@ describe('ReportingStore', () => {
|
|||
browserTimezone: 'utc',
|
||||
},
|
||||
timeout: 30000,
|
||||
priority: 1,
|
||||
});
|
||||
|
||||
await store.setReportCompleted(report, {
|
||||
|
|
|
@ -157,7 +157,6 @@ describe('POST /api/reporting/generate', () => {
|
|||
|
||||
it(`returns 200 if job handler doesn't error`, async () => {
|
||||
callClusterStub.withArgs('index').resolves({ _id: 'foo', _index: 'foo-index' });
|
||||
|
||||
registerJobGenerationRoutes(core, mockLogger);
|
||||
|
||||
await server.start();
|
||||
|
@ -179,9 +178,7 @@ describe('POST /api/reporting/generate', () => {
|
|||
test1: 'yes',
|
||||
},
|
||||
},
|
||||
priority: 10,
|
||||
status: 'pending',
|
||||
timeout: 10000,
|
||||
},
|
||||
path: 'undefined/api/reporting/jobs/download/foo',
|
||||
});
|
||||
|
|
|
@ -45,7 +45,6 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
created_by: false,
|
||||
jobtype: 'csv',
|
||||
max_attempts: 1,
|
||||
priority: 10,
|
||||
status: 'pending',
|
||||
timeout: 120000,
|
||||
browser_type: 'chromium', // TODO: remove this field from the API response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue