Active
Project:
Hosting
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2014 at 21:55 UTC
Updated:
21 Jan 2014 at 17:40 UTC
Jump to comment: Most recent
We added quite a bit of Views integration in the Aegir 2.x dev cycle. Much of this needs to be ported to Views 3.x.
I believe there's also still quite a bit of the original list-page generating code. This should be removed.
Comments
Comment #1
ergonlogicThe principle issue appears to be the way Views 3.x registers handlers. This is done with a files[] entry in the .info, rather than hook_views_handlers().
I'm also taking this opportunity to clean up and standardize the directory structure for views components. They'll now all go in /includes/views, with subdirectories for handlers, plugins, etc.
So far hosting and hosting_site are done.
Comment #2
ergonlogicComment #3
ergonlogicI'm also cleaning up name-spacing for our views plugins. The field handler standard appears to be _field_handler_. So, for example, hosting_platform_handler_field_status. The filename will be that with '.inc' appended. The class name within will have to change, as do any references to the class, such as in hook_views_data(). That is usually enough to fix the 'broken/missing handler' errors.
Also, VBO changed to being a field, from a style plugin. So, we need to switch the format to table. To get our styling, we need to add a row class (table format settings) of [status].
Finally, our Views are creating menu links in the wrong menu, so we need to update it to the main menu.
Comment #4
ergonlogicClient, Task, Package and Platform done. That should be pretty much it for the initial cleanup. We may be registering some missing handlers (i.e., hosting_task_handler_sort_default).
Comment #5
ergonlogicI've begun to use Views alter hooks to reduce the number of displays per view. This will make changes much easier to manage. For site views, for example, we'd previously had different block displays on profiles, platforms, etc. pages. Sometimes even more than one: an 'admin' display that had vbo enabled, and another that just listed the sites. All these displays were otherwise largely identical.
Now, we selectively alter them as appropriate. Currently, we remove the vbo for anyone without the 'administer sites' permission, and remove all but the appropriate contextual filter/argument depending on the type of node we're viewing. We also use a block alter hook to only show our views on servers running a db service, and profile packages.
Note that I'm not sure that last condition is really required. Currently, we only show the site list on package nodes that are install profiles. I think this is a legacy of previously limited relationship handlers. I believe we can (and probably should) display a list of sites on all package pages.