Ask Your Question
0

How to remove actions in Horizon?

asked 2016-01-26 10:25:50 -0600

herrsergio gravatar image

I would like to remove some actions in the dashboard like "Terminate instance", "Rebuild instance", etc. Is there a configuration file to do it or using profiles or using the steps in [1].

Thanks

[1] http://docs.openstack.org/developer/h...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-01-27 02:37:09 -0600

Hi, what i think your looking for is editing tables.py:

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/tables.py

There is a class where you need to remove the desired action:

class Meta(object):
        name = "instances"
        verbose_name = _("Instances")
        status_columns = ["status", "task"]
        row_class = UpdateRow
        table_actions_menu = (StartInstance, StopInstance, SoftRebootInstance)
        launch_actions = ()
        if getattr(settings, 'LAUNCH_INSTANCE_LEGACY_ENABLED', True):
            launch_actions = (LaunchLink,) + launch_actions
        if getattr(settings, 'LAUNCH_INSTANCE_NG_ENABLED', False):
            launch_actions = (LaunchLinkNG,) + launch_actions
        table_actions = launch_actions + (DeleteInstance,
                                          InstancesFilterAction)
        row_actions = (StartInstance, ConfirmResize, RevertResize,
                       CreateSnapshot, SimpleAssociateIP, AssociateIP,
                       SimpleDisassociateIP, AttachInterface,
                       DetachInterface, EditInstance, UpdateMetadata,
                       DecryptInstancePassword, EditInstanceSecurityGroups,
                       ConsoleLink, LogLink, TogglePause, ToggleSuspend,
                       ToggleShelve, ResizeLink, LockInstance, UnlockInstance,
                       SoftRebootInstance, RebootInstance,
                       StopInstance, RebuildInstance, DeleteInstance)

Regards

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-01-26 10:25:50 -0600

Seen: 149 times

Last updated: Jan 27 '16