# Revision history [back]

### Horizon Wizzard Customisation

Clould elements in up popping wizzards (f.a. create instance wizzard) be as easily manipulated like shown for tables in:

Quote: You can also override existing methods with your own versions:

Disable Floating IPs

from openstack_dashboard.dashboards.project.access_and_security import tabs from openstack_dashboard.dashboards.project.instances import tables

NO = lambda *x: False

tabs.FloatingIPsTab.allowed = NO tables.AssociateIP.allowed = NO tables.SimpleAssociateIP.allowed = NO tables.SimpleDisassociateIP.allowed = NO You could also customize what columns are displayed in an existing table, by redefining the columns attribute of its Meta class. This can be achieved in 3 steps:

Extend the table that you wish to modify Redefine the columns attribute under the Meta class for this new table Modify the table_class attribute for the related view so that it points to the new table For example, if you wished to remove the Admin State column from the NetworksTable, you could do the following:

from openstack_dashboard.dashboards.project.networks import tables from openstack_dashboard.dashboards.project.networks import views

class MyNetworksTable(tables.NetworksTable):

class Meta(tables.NetworksTable.Meta):
columns = ('name', 'subnets', 'shared', 'status')


views.IndexView.table_class = MyNetworksTable If you want to add a column you can override the parent table in a similar way, add the new column definition and then use the Meta columns attribute to control the column order as needed.

http://docs.openstack.org/developer/horizon/topics/customizing.html

 2 No.2 Revision smaffulli 6981 ●38 ●68 ●102 http://maffulli.net/

### Horizon Wizzard Customisation

Clould elements in up popping wizzards (f.a. create instance wizzard) be as easily manipulated like shown for tables in:

Quote: You can also override existing methods with your own versions:

 Disable Floating IPs IPs

from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables tables

NO = lambda *x: False False

tabs.FloatingIPsTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssociateIP.allowed = NO
tables.SimpleDisassociateIP.allowed = NO


You could also customize what columns are displayed in an existing table, by redefining the columns attribute of its Meta class. This can be achieved in 3 steps:

• Extend the table that you wish to modify modify
• Redefine the columns attribute under the Meta class for this new table table
• Modify the table_class attribute for the related view so that it points to the new table table

For example, if you wished to remove the Admin State column from the NetworksTable, you could do the following:

from openstack_dashboard.dashboards.project.networks import tables from openstack_dashboard.dashboards.project.networks import views

class MyNetworksTable(tables.NetworksTable):

from openstack_dashboard.dashboards.project.networks import tables
from openstack_dashboard.dashboards.project.networks import views

class MyNetworksTable(tables.NetworksTable):

class Meta(tables.NetworksTable.Meta):
columns = ('name', 'subnets', 'shared', 'status')

views.IndexView.table_class = MyNetworksTable


views.IndexView.table_class = MyNetworksTable If you want to add a column you can override the parent table in a similar way, add the new column definition and then use the Meta columns attribute to control the column order as needed.

http://docs.openstack.org/developer/horizon/topics/customizing.html

 3 No.3 Revision vincent-legoll 715 ●4 ●9 ●16 http://www.france-gril...

### Horizon Wizzard Customisation

Clould Cloud elements in up popping wizzards (f.a. create instance wizzard) wizards (f.e. the "create instance" wizard) be as easily manipulated like shown for tables in:

Quote: You can also override existing methods with your own versions:

To disable Floating IPs:

 Disable Floating IPs

from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables

NO = lambda *x: False

tabs.FloatingIPsTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssociateIP.allowed = NO
tables.SimpleDisassociateIP.allowed = NO


You could also customize what columns are displayed in an existing table, by redefining the columns attribute of its Meta class. This can be achieved in 3 steps:

• Extend the table that you wish to modify
• Redefine the columns attribute under the Meta class for this new table
• Modify the table_class attribute for the related view so that it points to the new table

For example, if you wished wish to remove the Admin State column from the NetworksTable, you could do the following:

from openstack_dashboard.dashboards.project.networks import tables
from openstack_dashboard.dashboards.project.networks import views

class MyNetworksTable(tables.NetworksTable):

class Meta(tables.NetworksTable.Meta):
columns = ('name', 'subnets', 'shared', 'status')

views.IndexView.table_class = MyNetworksTable


If you want to add a column you can override the parent table in a similar way, add the new column definition and then use the Meta columns attribute to control the column order as needed.

http://docs.openstack.org/developer/horizon/topics/customizing.html