[Toaster] review request: Bug #4865 "We need empty states for the different pages"
Reyna, David
david.reyna at windriver.com
Mon Mar 17 20:11:17 PDT 2014
Hi Belen,
You can find my implementation of 4865 here, including the PNG file you passed:
dreyna/empty_4865
I could not figure out a proper way to get an empty task list, so I simulated it by commenting out the "objects" value in the context for the "tasks" view (as described below in my test plan).
Thanks,
David
[ Test Instructions ]
1) Set up an empty database
If you have an existing project and database, first do this:
$ source toaster stop
$ mv toaster.sqlite toaster.sqlite_saved
Start the toaster, which will also create an empty database:
$ source toaster start
2) Open the home toaster page with no build nor builds pending
Observe that it has the "This is Toaster" message, and an image of Toaster.
Observe that there is no build displayed, plus the message at the bottom stating "Toaster has not recorded any builds yet...".
3) Open the home toaster page with no builds, but with a build in progress
Start a build, and wait until the tasks start to execute.
$ bitbake core-image-minimal
Refresh the home toaster page.
Observe that you still have what you observed in #2, but you also have a "Recent builds" section listing the "core-image-minimal" in progress.
You can stop that build now (with a CTRL-C), to complete this test.
4) Open the All Packages page with no packages
Make the following target, and wait for it to complete.
$ bitbake -C cleansstate base-files
Open Toaster. Observe that you now have the normal home page display, with the one build.
Select this new build, and click on the "Packages" link on the left.
Observe the "No Packages were built..." message, and no table.
5) Open the All Tasks page with no tasks
Simulate a "no tasks" state by making this temporary change to "bitbake/lib/toaster/toastergui/views.py":
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 7f61ade..52f4bd2 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -625,7 +625,7 @@ def tasks_common(request, build_id, variant):
'filter_search_display': filter_search_display,
'title': title_variant,
'build': Build.objects.filter(pk=build_id)[0],
- 'objects': tasks,
+# 'objects': tasks,
'search_term': search_term,
'total_count': queryset_with_search.count(),
'tablecols':[
Open Toaster, select any build, and click on the "Tasks" link on the left.
Observe the "No data was recorded for this build." message, and no table.
Restore the change to the "views.py" page.
Refresh the tasks page, and observe that the tasks reappear as expected.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20140318/2a2dde67/attachment.html>
More information about the toaster
mailing list