[Openstack] Horizon: controlling table appearance

Fredric M lifeon2development at gmail.com
Mon Sep 10 11:15:04 UTC 2012


Hello Gabriel,

and thanks for the pointers, with them I managed to complete the task
of controlling row appearance! (For those who may wonder; the
resulting "status_up" and "status_down" render a row white with no
spinner (final state), "status_unknown" renders a row pale yellow with
spinner.)

I actually had looked at the calculate_row_status() and
get_row_status_class() functions of class DataTable before, but I did
not connect them with row state, probably due to the status naming of
True, False, None and "status_up", "status_down",  "status_unknown". I
expected to find something to describe state machine state, like final
(white row) and intermediate states (yellow row).

BR Fredric

On Mon, Aug 20, 2012 at 1:26 AM, Gabriel Hurley
<Gabriel.Hurley at nebula.com> wrote:
> There are two levels of "status" control in Horizon: one at the column level and one at the row level, which is an aggregate of the column statuses within that row.
>
> Column status is controlled by settings "status=True" on the column. If you want fine-grained control over which statuses are considered "good", "bad" or "unknown" you can use the status_choices keyword argument as well. Docs for that are here: http://docs.openstack.org/developer/horizon/ref/tables.html#horizon.tables.Column.status_choices
>
> The row status is defined in the tables "Meta" options by settings "status_columns" to a list of column names which should be considered. The aggregation is fairly naïve: if all columns are good then the row is good, if any or unknown it's unknown, and if any are bad then it's bad.
>
> Hopefully that's helpful to you.
>
>     - Gabriel
>
>> -----Original Message-----
>> From: openstack-bounces+gabriel.hurley=nebula.com at lists.launchpad.net
>> [mailto:openstack-
>> bounces+gabriel.hurley=nebula.com at lists.launchpad.net] On Behalf Of
>> LifeOn2 Development
>> Sent: Thursday, August 16, 2012 8:46 AM
>> To: openstack at lists.launchpad.net
>> Subject: [Openstack] Horizon: controlling table appearance
>>
>> Hello All,
>>
>> I am currently looking into how the appearance of tables in the Horizon UI is
>> controlled, more specifically the "Instances" table in
>> Project->Instances & Volumes. What I am trying to accomplish is to
>> control for which content combinations of the "Status" and "Task"
>> cells a certain row is rendered with the pale yellow background and the
>> spinner animation in the "Task" cell or not.
>>
>> Reasonably information about row state (including when to show the spinner
>> and yellow or not) is passed in the Ajax data for the row sent from nova. I
>> have looked into the contents of the Ajax data sent, but have not been able
>> to distinguish any data that would seem to control this row appearance.
>>
>> So, if anybody could point me to the mechanism that regulates this aspect of
>> row appearance, it would be super!
>>
>> Many Thanks,
>> Fredric
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack at lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>
>




More information about the Openstack mailing list