Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] refactor routes files and helpers #30111

Merged
merged 19 commits into from
Feb 12, 2019

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Feb 5, 2019

  • Reorganize files in server/routes
    • Consolidate helper code
    • Split out legacy routes to a new file
  • Remove unused get_absolute_time
  • Files that were significantly changed after the refactoring were converted into Typescript

WIP: Hold off until #29977 is merged

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joelgriffith
Copy link
Contributor

This is a nice cleanup... what do you think about doing TS for some of this (at least the newer modules)?

@tsullivan tsullivan added WIP Work in progress and removed review labels Feb 5, 2019
@tsullivan
Copy link
Member Author

@joelgriffith sure, I can put some of the changes in as TS. I'm hunting down a failing unit test, and then I'll pick that up

@@ -6,7 +6,7 @@

import _ from 'lodash';

export function createFlattenHit(fields, metaFields, conflictedTypesFields) {
export function createFlattenHit(fields, metaFields, conflictedTypesFields = []) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, looks like there was a unit test expecting this to cause a failure

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan tsullivan added review v8.0.0 (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead refactoring and removed WIP Work in progress chore labels Feb 7, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -7,8 +7,7 @@
import { resolve } from 'path';
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from './common/constants';
import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice consolidation here

Copy link
Contributor

@joelgriffith joelgriffith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovin' that TS flavor! LGTM

@tsullivan tsullivan merged commit 925998e into elastic:master Feb 12, 2019
@tsullivan tsullivan deleted the refactor/reporting-routes branch February 12, 2019 18:33
tsullivan added a commit to tsullivan/kibana that referenced this pull request Feb 12, 2019
* remove unused file

* refactor routes files and helpers

* default empty array for conflictedTypesFields

* minor prettier

* remove some unrelated diff

* some typescript conversions

* more typescripts

* more typscript

* jobtype is a string

* revert some logic change

* set payload.headers to undefined + not mutate

* fix jest import
tsullivan added a commit to tsullivan/kibana that referenced this pull request Feb 12, 2019
* remove unused file

* refactor routes files and helpers

* default empty array for conflictedTypesFields

* minor prettier

* remove some unrelated diff

* some typescript conversions

* more typescripts

* more typscript

* jobtype is a string

* revert some logic change

* set payload.headers to undefined + not mutate

* fix jest import
tsullivan added a commit that referenced this pull request Feb 13, 2019
* remove unused file

* refactor routes files and helpers

* default empty array for conflictedTypesFields

* minor prettier

* remove some unrelated diff

* some typescript conversions

* more typescripts

* more typscript

* jobtype is a string

* revert some logic change

* set payload.headers to undefined + not mutate

* fix jest import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead refactoring review v7.0.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants