From 2423203815346ecf7a7906a5d84abdd6e1868744 Mon Sep 17 00:00:00 2001 From: Karthik Suresh Date: Fri, 14 Aug 2015 18:35:38 +0530 Subject: [PATCH] Added small block to remove default panels Described details on removing default panels with example Change-Id: I21ff642de4b0712ed1e06631dad2facd4fbc3675 --- doc/source/topics/customizing.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/source/topics/customizing.rst b/doc/source/topics/customizing.rst index 5a5b436f14..cdadf5799c 100644 --- a/doc/source/topics/customizing.rst +++ b/doc/source/topics/customizing.rst @@ -173,6 +173,17 @@ Or just remove it entirely:: projects_dashboard.unregister(instances_panel.__class__) +You cannot unregister a ``default_panel``. If you wish to remove a +``default_panel``, you need to make a different panel in the dashboard as a +``default_panel`` and then unregister the former. For example, if you wished +to remove the ``overview_panel`` from the ``Project`` dashboard, you could do +the following:: + + project = horizon.get_dashboard('project') + project.default_panel = "instances" + overview = project.get_panel('overview') + project.unregister(overview.__class__) + You can also override existing methods with your own versions:: # Disable Floating IPs