Fish Trophy

Tamas Sule got a fish trophy!

HUE-7793 [dashboard] Do not convert dates with non traditional format

Review Request #12821 - Created April 12, 2018 and updated

Tamas Sule
hue
hue
romain

commit 3e284e94e707460b9660aaccf14339d47d9a110a (HEAD -> HUE-7793)
Author: Tamas Sule tamas.sule@cloudera.com
Date: Thu Apr 12 21:51:29 2018 +0200

HUE-7793 [dashboard] Do not convert dates with non traditional format

:100644 100644 2c1971f30d... 627375908f... M desktop/libs/dashboard/src/dashboard/templates/common_search.mako

Tested with local instance

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
  1. Nice!

    I guess this fixes the issues when we have 5.15.0 like CDH versions that accidentally are being converted to dates.
    We will test with Impala dates too, but this should be safe.

    Do you want to send a git-format patch or a pull request?

    1. I just realized that this might be too strict. It will only be valid if the format is exactly "YYYY-MM-DD HH:mm:ss". So even having no seconds will cause it to be invalid. I'm not sure what all the formats that are possible here. An array can be also passed in to allow multiple formats: moment("1991-09-10", ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD"], true).isValid().

  2. 
      
  1. +1

    This seems safer and Solr/Hive usually always have 4-digit years

  2. "no 4 digit year" --> "no 4 digit year at either end"?

    1. fixed and created pull request: https://github.com/cloudera/hue/pull/676/commits/f4708950499dd7513e55c856326422ac8bbc297c

  3. 
      
Review request changed

Change Summary:

Changed comment to be more clear about the validation

Diff:

Revision 3 (+14 -1)

Show changes

Loading...