[Toaster] [review-request] 6040 Implement "from ... to" option in the "Started on" and "Completed on" filters

Barros Pena, Belen belen.barros.pena at intel.com
Fri Apr 11 03:59:50 PDT 2014


Hi David,

Sorry for the delay in reviewing this. It is enormous progress, but I have
found a few rough edges. There they go:

* minDate and maxDate don't seem to be set. From the spec: "We should
restrict the date range in the widget by setting the minDate to the
earliest build start date in the table, and the maxDate to the latest
build start date in the table."

* Applied filter tooltip not working

* The filter should remember the selected date. Steps to reproduce:

** Open the started on filter
** Select the "Builds from" radio button
** Select a date in the from and to fields and click Apply
** Click on the filter button to open the filter again

Outcome: the "all builds" option is selected.

Expected outcome: the "Builds from" option should still be selected, with
my selected dates still showing in the from and to fields

* If you leave the "to" field blank and click the Apply button you get the
following error

Traceback:
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in
get_response
  115.                         response = callback(request,
*callback_args, **callback_kwargs)
File "/home/yocto/poky/bitbake/lib/toaster/toastergui/views.py" in builds
  268.     (filter_string, search_term, ordering_string) =
_search_tuple(request, Build)
File "/home/yocto/poky/bitbake/lib/toaster/toastergui/views.py" in
_search_tuple
  171.         raise BaseException("Invalid filter " + str(invalid))

Exception Type: BaseException at /gui/builds/
Exception Value: Invalid filter We have an invalid number of separators:
26/03/2014 -> [u'26/03/2014']


* In the Completed on filter, the "Builds from" radio button is selected
but input fields are disabled when I use the back button. Steps to
reproduce:

** Open the Completed on filter
** Select the "Builds from" radio button and select dates in the from to
fields
** Click apply
** In the results page, click the back button
** Open the "Completed on" filter

Outcome: The "Builds from" radio button is still selected, but the from
and to fields are disabled.

Expected outcome: Whenever the "Builds from" radio button is selected, the
from and to fields should be enabled

Let me know if you have any questions.

Cheers

Belén



On 09/04/2014 04:08, "Reyna, David" <david.reyna at windriver.com> wrote:

>Hi Belén,
> 
>Thanks to yours and Alex¹s help, I have completed the date range
>selection for the build page.
> 
>The branch is here: dreyna/build_datepicker_6040
> 
>This commit is on top of Alex¹s commit: ³bitbake: toaster: fix filtering
>query for multiple filters² (
>
>adamian/20140408-getfilteringquery
><http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=adamian/201
>40408-getfilteringquery> )
> 
>[ Implementation Notes ]
> 
>  * The date format error handling is done in the python class, where as
>a rule today¹s date is substituted for bad dates. This code also
>automatically swaps date ranges when they are in reverse order. An
>enhancement (when we have more time) is to move
> this code to the javascript side.
> 
>  * The new feature is keyed by an option having the value of ³from-to²,
>which we can do since this option is user selected and there is no good
>single value to pass. A later enhancement would to pass the current range
>to preset the to-from values. When
> this is set, a new option[4] field is added which passes a prefix so
>that the generated code can uniquely connect the instance of filter to
>the respective jquery methods in ³main.js².
> 
>* Since the ³__lte² does not work for dates - it does an ³__le² instead -
>the ³to² date is internally incremented by one day to convert an
>inclusive date to an exclusive one.
> 
>  * The ³from² variable is given the name ³filter² to allow the normal
>interface code to work, and the ³to² variable is unique. That is caught
>in the view class, the two dates are normalized and joined into a full
>filter, and ³_redirect_parameters² is
> called to pass a clean filter URL context back to the ³build² class.
> 
>- David
> 
> 



More information about the toaster mailing list