[Ovirt-devel] [PATCH] Add task list to dashboard

David Lutterkort lutter at redhat.com
Mon Jan 12 19:40:53 UTC 2009


On Fri, 2009-01-09 at 21:00 -0500, Scott Seago wrote:
> Note that I won't hold up pushing this patch on the above 5 points, as 
> they have more to do with the overall UI design of the existing task 
> list rather than the dashboard refactoring, and in some cases we have UI 
> design issues to work through before resolving them anyway.

Agreed, except for the one outright bug I mentioned, it's fine to push
as is for now. We can address the other points in subsequent commits.

> >
> > Not directly a comment about this patch: it would be cleaner if we had a
> > TaskController with an index action that accepts parameters to restrict
> > the list of tasks to a certain object, e.g. a hw pool or a vm pool.
> >
> > The implementation with TaskActions and the index -> show_tasks -> show
> > call sequence seems a little roundabout.
> >
> >   
> I tried to pull all of the generic stuff (that applies to more than one 
> of the 3 controllers that have task lists) into the task_actions module 
> which is included by the controllers that have task lists. I suppose we 
> could have a separate controller with 3 different actions  relating to 
> dashboard, vm, and hw pool, but it doesn't really match the model we're 
> already using for VM pool and HW pool controllers -- where one 
> controller handles the various UI tabs for an object type. So the bits 
> common to all task lists are already pulled out into task_actions -- and 
> on the view side in task/_show and task/_grid.

What I specifically object to is the TaskActions module. Simply for data
retrieval, the way to think about this is that there is a collection of
tasks that gets filtered by various criteria - some of them
user-supplied, and some of them context-dependant.

I would simply have a TaskController with only an index action; to
display tasks for a VM pool, pass in a vm_pool_id request param, for a
hardware pool a hw_pool_id etc.

Regardless of how this is done for the WUI, for the API, we'll need a
TaskController to pull down lists of tasks.

>  Some of the roundabout 
> nature here has to do with the way the flexigrid setup works -- we need 
> one action to generate the page itself -- with navigation, filters, 
> etc., and another action to return the json array for the table content.

To be clear: I was only talking about how the json array is generated.

> OK so of the above issues, the ones that I will rework into an updated 
> patch are as follows:
> 1) dashboard tab name changed to 'Tasks' (left nav is still 'dashboard')
> 2) fix the 'no tasks' view to remove the 'add' icon
> 3) Fix whatever's wrong with the VM pool template/controller in the 
> current patch.

Sounds good.

David




More information about the ovirt-devel mailing list