From c83a38f18e25a9d12dde56355284d3fa2d11d110 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sat, 11 Mar 2017 22:59:27 +0000 Subject: [PATCH] Reorganize Admin dashboard menus Admin dashboard shows too many panels now. This commit introduces panel groups for Admin dashboard as we do for Project dashboard. The new order of admin panel groups are: Compute, Volume, Network and System. Note that the slug of "System" panel group is not changed to avoid breaking horizon plugins which register panels to Admin System panel group. Implements blueprint reorganize-admin-dashboard Change-Id: I533e60f7cbfab2539b9f8aa7044f7234165f2518 --- ...view_panel.py => _2010_admin_overview_panel.py} | 2 +- .../enabled/_2110_admin_compute_panel_group.py | 8 ++++++++ ...s_panel.py => _2120_admin_hypervisors_panel.py} | 2 +- ...es_panel.py => _2130_admin_aggregates_panel.py} | 2 +- ...ces_panel.py => _2140_admin_instances_panel.py} | 2 +- ...vors_panel.py => _2150__admin_flavors_panel.py} | 2 +- ...images_panel.py => _2160_admin_images_panel.py} | 2 +- .../enabled/_2210_admin_volume_panel_group.py | 8 ++++++++ ...lumes_panel.py => _2220_admin_volumes_panel.py} | 2 +- ...ots_panel.py => _2230_admin_snapshots_panel.py} | 2 +- ..._panel.py => _2240_admin_volume_types_panel.py} | 2 +- .../enabled/_2300_admin_network_panel_group.py | 8 ++++++++ ...orks_panel.py => _2310_admin_networks_panel.py} | 2 +- ...uters_panel.py => _2320_admin_routers_panel.py} | 2 +- ..._panel.py => _2330_admin_floating_ips_panel.py} | 2 +- ..._group.py => _2810_admin_system_panel_group.py} | 0 ...ults_panel.py => _2820_admin_defaults_panel.py} | 0 ...panel.py => _2830_admin_metadata_defs_panel.py} | 0 ...min_info_panel.py => _2840_admin_info_panel.py} | 0 ...eorganize-admin-dashboard-e180216d200357ec.yaml | 14 ++++++++++++++ 20 files changed, 50 insertions(+), 12 deletions(-) rename openstack_dashboard/enabled/{_2020_admin_overview_panel.py => _2010_admin_overview_panel.py} (97%) create mode 100644 openstack_dashboard/enabled/_2110_admin_compute_panel_group.py rename openstack_dashboard/enabled/{_2040_admin_hypervisors_panel.py => _2120_admin_hypervisors_panel.py} (94%) rename openstack_dashboard/enabled/{_2050_admin_aggregates_panel.py => _2130_admin_aggregates_panel.py} (93%) rename openstack_dashboard/enabled/{_2060_admin_instances_panel.py => _2140_admin_instances_panel.py} (93%) rename openstack_dashboard/enabled/{_2080_admin_flavors_panel.py => _2150__admin_flavors_panel.py} (97%) rename openstack_dashboard/enabled/{_2090_admin_images_panel.py => _2160_admin_images_panel.py} (93%) create mode 100644 openstack_dashboard/enabled/_2210_admin_volume_panel_group.py rename openstack_dashboard/enabled/{_2320_admin_volumes_panel.py => _2220_admin_volumes_panel.py} (93%) rename openstack_dashboard/enabled/{_2330_admin_snapshots_panel.py => _2230_admin_snapshots_panel.py} (94%) rename openstack_dashboard/enabled/{_2340_admin_volume_types_panel.py => _2240_admin_volume_types_panel.py} (94%) create mode 100644 openstack_dashboard/enabled/_2300_admin_network_panel_group.py rename openstack_dashboard/enabled/{_2100_admin_networks_panel.py => _2310_admin_networks_panel.py} (93%) rename openstack_dashboard/enabled/{_2110_admin_routers_panel.py => _2320_admin_routers_panel.py} (93%) rename openstack_dashboard/enabled/{_2111_admin_floating_ips_panel.py => _2330_admin_floating_ips_panel.py} (94%) rename openstack_dashboard/enabled/{_2010_admin_system_panel_group.py => _2810_admin_system_panel_group.py} (100%) rename openstack_dashboard/enabled/{_2120_admin_defaults_panel.py => _2820_admin_defaults_panel.py} (100%) rename openstack_dashboard/enabled/{_2130_admin_metadata_defs_panel.py => _2830_admin_metadata_defs_panel.py} (100%) rename openstack_dashboard/enabled/{_2140_admin_info_panel.py => _2840_admin_info_panel.py} (100%) create mode 100644 releasenotes/notes/reorganize-admin-dashboard-e180216d200357ec.yaml diff --git a/openstack_dashboard/enabled/_2020_admin_overview_panel.py b/openstack_dashboard/enabled/_2010_admin_overview_panel.py similarity index 97% rename from openstack_dashboard/enabled/_2020_admin_overview_panel.py rename to openstack_dashboard/enabled/_2010_admin_overview_panel.py index 8538f2b3ee..9f3c37512c 100644 --- a/openstack_dashboard/enabled/_2020_admin_overview_panel.py +++ b/openstack_dashboard/enabled/_2010_admin_overview_panel.py @@ -15,7 +15,7 @@ PANEL = 'overview' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'default' # If set, it will update the default panel of the PANEL_DASHBOARD. DEFAULT_PANEL = 'overview' diff --git a/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py b/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py new file mode 100644 index 0000000000..ce667c05cd --- /dev/null +++ b/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py @@ -0,0 +1,8 @@ +from django.utils.translation import ugettext_lazy as _ + +# The slug of the panel group to be added to HORIZON_CONFIG. Required. +PANEL_GROUP = 'compute' +# The display name of the PANEL_GROUP. Required. +PANEL_GROUP_NAME = _('Compute') +# The slug of the dashboard the PANEL_GROUP associated with. Required. +PANEL_GROUP_DASHBOARD = 'admin' diff --git a/openstack_dashboard/enabled/_2040_admin_hypervisors_panel.py b/openstack_dashboard/enabled/_2120_admin_hypervisors_panel.py similarity index 94% rename from openstack_dashboard/enabled/_2040_admin_hypervisors_panel.py rename to openstack_dashboard/enabled/_2120_admin_hypervisors_panel.py index db9d689e33..75462adf70 100644 --- a/openstack_dashboard/enabled/_2040_admin_hypervisors_panel.py +++ b/openstack_dashboard/enabled/_2120_admin_hypervisors_panel.py @@ -3,7 +3,7 @@ PANEL = 'hypervisors' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'compute' # Python panel class of the PANEL to be added. ADD_PANEL = ('openstack_dashboard.dashboards.admin.' diff --git a/openstack_dashboard/enabled/_2050_admin_aggregates_panel.py b/openstack_dashboard/enabled/_2130_admin_aggregates_panel.py similarity index 93% rename from openstack_dashboard/enabled/_2050_admin_aggregates_panel.py rename to openstack_dashboard/enabled/_2130_admin_aggregates_panel.py index c908304b97..09bc304472 100644 --- a/openstack_dashboard/enabled/_2050_admin_aggregates_panel.py +++ b/openstack_dashboard/enabled/_2130_admin_aggregates_panel.py @@ -3,7 +3,7 @@ PANEL = 'aggregates' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'compute' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.aggregates.panel.Aggregates' diff --git a/openstack_dashboard/enabled/_2060_admin_instances_panel.py b/openstack_dashboard/enabled/_2140_admin_instances_panel.py similarity index 93% rename from openstack_dashboard/enabled/_2060_admin_instances_panel.py rename to openstack_dashboard/enabled/_2140_admin_instances_panel.py index 78a7883909..9d78a7148a 100644 --- a/openstack_dashboard/enabled/_2060_admin_instances_panel.py +++ b/openstack_dashboard/enabled/_2140_admin_instances_panel.py @@ -3,7 +3,7 @@ PANEL = 'instances' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'compute' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.instances.panel.Instances' diff --git a/openstack_dashboard/enabled/_2080_admin_flavors_panel.py b/openstack_dashboard/enabled/_2150__admin_flavors_panel.py similarity index 97% rename from openstack_dashboard/enabled/_2080_admin_flavors_panel.py rename to openstack_dashboard/enabled/_2150__admin_flavors_panel.py index 9e4109767f..21d53d95b0 100644 --- a/openstack_dashboard/enabled/_2080_admin_flavors_panel.py +++ b/openstack_dashboard/enabled/_2150__admin_flavors_panel.py @@ -18,7 +18,7 @@ PANEL = 'flavors' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'compute' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.flavors.panel.Flavors' diff --git a/openstack_dashboard/enabled/_2090_admin_images_panel.py b/openstack_dashboard/enabled/_2160_admin_images_panel.py similarity index 93% rename from openstack_dashboard/enabled/_2090_admin_images_panel.py rename to openstack_dashboard/enabled/_2160_admin_images_panel.py index 1340113ac4..3d01320a27 100644 --- a/openstack_dashboard/enabled/_2090_admin_images_panel.py +++ b/openstack_dashboard/enabled/_2160_admin_images_panel.py @@ -3,7 +3,7 @@ PANEL = 'images' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'compute' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.images.panel.Images' diff --git a/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py b/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py new file mode 100644 index 0000000000..2bb19ee369 --- /dev/null +++ b/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py @@ -0,0 +1,8 @@ +from django.utils.translation import ugettext_lazy as _ + +# The slug of the panel group to be added to HORIZON_CONFIG. Required. +PANEL_GROUP = 'volume' +# The display name of the PANEL_GROUP. Required. +PANEL_GROUP_NAME = _('Volume') +# The slug of the dashboard the PANEL_GROUP associated with. Required. +PANEL_GROUP_DASHBOARD = 'admin' diff --git a/openstack_dashboard/enabled/_2320_admin_volumes_panel.py b/openstack_dashboard/enabled/_2220_admin_volumes_panel.py similarity index 93% rename from openstack_dashboard/enabled/_2320_admin_volumes_panel.py rename to openstack_dashboard/enabled/_2220_admin_volumes_panel.py index 204762076c..0d392f33a9 100644 --- a/openstack_dashboard/enabled/_2320_admin_volumes_panel.py +++ b/openstack_dashboard/enabled/_2220_admin_volumes_panel.py @@ -3,7 +3,7 @@ PANEL = 'volumes' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'volume' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.volumes.panel.Volumes' diff --git a/openstack_dashboard/enabled/_2330_admin_snapshots_panel.py b/openstack_dashboard/enabled/_2230_admin_snapshots_panel.py similarity index 94% rename from openstack_dashboard/enabled/_2330_admin_snapshots_panel.py rename to openstack_dashboard/enabled/_2230_admin_snapshots_panel.py index 54df7ea3ef..e7099c3a4f 100644 --- a/openstack_dashboard/enabled/_2330_admin_snapshots_panel.py +++ b/openstack_dashboard/enabled/_2230_admin_snapshots_panel.py @@ -3,7 +3,7 @@ PANEL = 'snapshots' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'volume' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.snapshots.panel.Snapshots' diff --git a/openstack_dashboard/enabled/_2340_admin_volume_types_panel.py b/openstack_dashboard/enabled/_2240_admin_volume_types_panel.py similarity index 94% rename from openstack_dashboard/enabled/_2340_admin_volume_types_panel.py rename to openstack_dashboard/enabled/_2240_admin_volume_types_panel.py index 943b0fe58e..5b18c17591 100644 --- a/openstack_dashboard/enabled/_2340_admin_volume_types_panel.py +++ b/openstack_dashboard/enabled/_2240_admin_volume_types_panel.py @@ -3,7 +3,7 @@ PANEL = 'volume_types' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'volume' # Python panel class of the PANEL to be added. ADD_PANEL = \ diff --git a/openstack_dashboard/enabled/_2300_admin_network_panel_group.py b/openstack_dashboard/enabled/_2300_admin_network_panel_group.py new file mode 100644 index 0000000000..fa7de76a07 --- /dev/null +++ b/openstack_dashboard/enabled/_2300_admin_network_panel_group.py @@ -0,0 +1,8 @@ +from django.utils.translation import ugettext_lazy as _ + +# The slug of the panel group to be added to HORIZON_CONFIG. Required. +PANEL_GROUP = 'network' +# The display name of the PANEL_GROUP. Required. +PANEL_GROUP_NAME = _('Network') +# The slug of the dashboard the PANEL_GROUP associated with. Required. +PANEL_GROUP_DASHBOARD = 'admin' diff --git a/openstack_dashboard/enabled/_2100_admin_networks_panel.py b/openstack_dashboard/enabled/_2310_admin_networks_panel.py similarity index 93% rename from openstack_dashboard/enabled/_2100_admin_networks_panel.py rename to openstack_dashboard/enabled/_2310_admin_networks_panel.py index d4323a06af..a2b38034b5 100644 --- a/openstack_dashboard/enabled/_2100_admin_networks_panel.py +++ b/openstack_dashboard/enabled/_2310_admin_networks_panel.py @@ -3,7 +3,7 @@ PANEL = 'networks' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'network' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.networks.panel.Networks' diff --git a/openstack_dashboard/enabled/_2110_admin_routers_panel.py b/openstack_dashboard/enabled/_2320_admin_routers_panel.py similarity index 93% rename from openstack_dashboard/enabled/_2110_admin_routers_panel.py rename to openstack_dashboard/enabled/_2320_admin_routers_panel.py index 3c2c635b27..20dafe2d09 100644 --- a/openstack_dashboard/enabled/_2110_admin_routers_panel.py +++ b/openstack_dashboard/enabled/_2320_admin_routers_panel.py @@ -3,7 +3,7 @@ PANEL = 'routers' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'network' # Python panel class of the PANEL to be added. ADD_PANEL = 'openstack_dashboard.dashboards.admin.routers.panel.Routers' diff --git a/openstack_dashboard/enabled/_2111_admin_floating_ips_panel.py b/openstack_dashboard/enabled/_2330_admin_floating_ips_panel.py similarity index 94% rename from openstack_dashboard/enabled/_2111_admin_floating_ips_panel.py rename to openstack_dashboard/enabled/_2330_admin_floating_ips_panel.py index a3b03a4f45..a71c5c2d2a 100644 --- a/openstack_dashboard/enabled/_2111_admin_floating_ips_panel.py +++ b/openstack_dashboard/enabled/_2330_admin_floating_ips_panel.py @@ -3,7 +3,7 @@ PANEL = 'floating_ips' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. -PANEL_GROUP = 'admin' +PANEL_GROUP = 'network' # Python panel class of the PANEL to be added. ADD_PANEL = \ diff --git a/openstack_dashboard/enabled/_2010_admin_system_panel_group.py b/openstack_dashboard/enabled/_2810_admin_system_panel_group.py similarity index 100% rename from openstack_dashboard/enabled/_2010_admin_system_panel_group.py rename to openstack_dashboard/enabled/_2810_admin_system_panel_group.py diff --git a/openstack_dashboard/enabled/_2120_admin_defaults_panel.py b/openstack_dashboard/enabled/_2820_admin_defaults_panel.py similarity index 100% rename from openstack_dashboard/enabled/_2120_admin_defaults_panel.py rename to openstack_dashboard/enabled/_2820_admin_defaults_panel.py diff --git a/openstack_dashboard/enabled/_2130_admin_metadata_defs_panel.py b/openstack_dashboard/enabled/_2830_admin_metadata_defs_panel.py similarity index 100% rename from openstack_dashboard/enabled/_2130_admin_metadata_defs_panel.py rename to openstack_dashboard/enabled/_2830_admin_metadata_defs_panel.py diff --git a/openstack_dashboard/enabled/_2140_admin_info_panel.py b/openstack_dashboard/enabled/_2840_admin_info_panel.py similarity index 100% rename from openstack_dashboard/enabled/_2140_admin_info_panel.py rename to openstack_dashboard/enabled/_2840_admin_info_panel.py diff --git a/releasenotes/notes/reorganize-admin-dashboard-e180216d200357ec.yaml b/releasenotes/notes/reorganize-admin-dashboard-e180216d200357ec.yaml new file mode 100644 index 0000000000..5a461f8e3d --- /dev/null +++ b/releasenotes/notes/reorganize-admin-dashboard-e180216d200357ec.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + Panel group is introduced in the Admin dashboard to organize admin panels + better. Panels in "System" group of Admin dashboard are now categorized + into four groups: "Compute", "Volume", "Network" and "System". +upgrade: + - | + As a result of Admin dashboard reorganization, panel groups of many Admin + panels have been changed. Operators who customize Admin panels (for example, + disable some Admin panels) through ``enabled`` directory need to update + panel groups in ``enabled`` files. Horizon plugin developers and deployers + may also need to update panel configurations under ``enabled`` directory + to adapt the new Admin menus.