Move Horizon to pure plugin loading only
The root cause of 1479018 was the mixed method for loading content in horizon. This patch moves horizon to load purely from enabled files. There are a couple of things that were required to allow this change. 1) Adding a mechanism, can_register() to horizon/base.py to handle the configuration based loading checks that had been accumulating in the panel.py files. This is an optional static method in Panel to encapsulate such configuration (read settings) based panel loading logic. And added testing for and documentation for this addition. 2) Create a numbering scheme for plugins. Moved the base dashboards to _1000_project.py _2000_admin.py _3000_identity.py _5000_settings.py. then populated the required panel_group and panel enabled files sparsely in those ranges. The sparseness is to allow for future additions. Additionally, I moved the already added Angular based panels next to their Django counterparts. Once the configuration loading was normalized, the bug reported in 1479018 was resolved and tests work with plugins panels in all dashboards. Close-Bug: #1479018 Partially implements: blueprint plugin-sanity Change-Id: I657e7ce37b2593a901a859cebf3d6ff8ada91941
This commit is contained in:
parent
d6f5c24c06
commit
8303782f1e
horizon
openstack_dashboard
dashboards
admin
aggregates
dashboard.pydefaults
flavors
hypervisors
images
info
instances
metadata_defs
metering
networks
routers
volumes
identity
project
access_and_security
containers
dashboard.pydatabase_backups
databases
firewalls
images
instances
loadbalancers
network_topology
networks
ngimages
overview
routers
stacks
volumes
vpn
enabled
_1000_project.py_1010_compute_panel_group.py_1020_project_overview_panel.py_1030_project_instances_panel.py_1040_project_volumes_panel.py_1050_project_images_panel.py_1051_project_ng_images_panel.py_1060_project_access_panel.py_1410_network_panel_group.py_1420_project_network_topology_panel.py_1430_project_network_panel.py_1440_project_routers_panel.py_1450_project_loadbalancers_panel.py_1460_project_firewalls_panel.py_1470_project_vpn_panel.py_1610_orchestration_panel_group.py_1620_project_stacks_panel.py_1630_project_resource_types_panel.py_1710_database_panel_group.py_1720_project_databases_panel.py_1730_project_database_backups_panel.py_1810_data_processing_panel_group.py_1815_data_processing_wizard_panel.py_1820_data_processing_clusters_panel.py_1825_data_processing_job_executions_panel.py_1830_data_processing_cluster_templates_panel.py_1835_data_processing_nodegroup_templates_panel.py_1840_data_processing_jobs_panel.py_1845_data_processing_job_binaries_panel.py_1850_data_processing_data_sources_panel.py_1855_data_processing_data_image_registry_panel.py_1860_data_processing_data_plugins_panel.py_1910_object_store_panel_group.py_1920_project_containers_panel.py_2000_admin.py_2010_admin_system_panel_group.py_2020_admin_overview_panel.py_2030_admin_metering_panel.py_2040_admin_hypervisors_panel.py_2050_admin_aggregates_panel.py_2060_admin_instances_panel.py_2070_admin_volumes_panel.py_2080_admin_flavors_panel.py_2090_admin_images_panel.py_2100_admin_networks_panel.py_2110_admin_routers_panel.py_2120_admin_defaults_panel.py_2130_admin_metadata_defs_panel.py_2140_admin_info_panel.py_3000_identity.py_3010_identity_domains_panel.py_3020_identity_projects_panel.py_3030_identity_users_panel.py_3031_identity_users_panel.py_3040_identity_groups_panel.py_3050_identity_roles_panel.py_5000_settings.py
test/test_panels/nonloading_panel
@ -255,6 +255,18 @@ class Panel(HorizonComponent):
|
||||
The ``name`` argument for the URL pattern which corresponds to
|
||||
the index view for this ``Panel``. This is the view that
|
||||
:meth:`.Panel.get_absolute_url` will attempt to reverse.
|
||||
|
||||
.. staticmethod:: can_register
|
||||
|
||||
This optional static method can be used to specify conditions that
|
||||
need to be satisfied to load this panel. Unlike ``permissions`` and
|
||||
``allowed`` this method is intended to handle settings based
|
||||
conditions rather than user based permission and policy checks.
|
||||
The return value is boolean. If the method returns ``True``, then the
|
||||
panel will be registered and available to user (if ``permissions`` and
|
||||
``allowed`` runtime checks are also satisfied). If the method returns
|
||||
``False``, then the panel will not be registered and will not be
|
||||
available via normal navigation or direct URL access.
|
||||
"""
|
||||
name = ''
|
||||
slug = ''
|
||||
@ -922,6 +934,14 @@ class Site(Registry, HorizonComponent):
|
||||
LOG.warning("Could not load panel: %s", mod_path)
|
||||
return
|
||||
panel = getattr(mod, panel_cls)
|
||||
# test is can_register method is present and call method if
|
||||
# it is to determine if the panel should be loaded
|
||||
if hasattr(panel, 'can_register') and \
|
||||
callable(getattr(panel, 'can_register')):
|
||||
if not panel.can_register():
|
||||
LOG.debug("Load condition failed for panel: %(panel)s",
|
||||
{'panel': panel_slug})
|
||||
return
|
||||
dashboard_cls.register(panel)
|
||||
if panel_group:
|
||||
dashboard_cls.get_panel_group(panel_group).\
|
||||
|
@ -17,7 +17,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import nova
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -39,6 +38,3 @@ class Aggregates(horizon.Panel):
|
||||
"endpoint. Host Aggregates panel will not be displayed.")
|
||||
return False
|
||||
return super(Aggregates, self).allowed(context)
|
||||
|
||||
|
||||
dashboard.Admin.register(Aggregates)
|
||||
|
@ -17,19 +17,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
|
||||
class SystemPanels(horizon.PanelGroup):
|
||||
slug = "admin"
|
||||
name = _("System")
|
||||
panels = ('overview', 'metering', 'hypervisors', 'aggregates',
|
||||
'instances', 'volumes', 'flavors', 'images',
|
||||
'networks', 'routers', 'defaults', 'metadata_defs', 'info')
|
||||
|
||||
|
||||
class Admin(horizon.Dashboard):
|
||||
name = _("Admin")
|
||||
slug = "admin"
|
||||
panels = (SystemPanels,)
|
||||
default_panel = 'overview'
|
||||
permissions = ('openstack.roles.admin',)
|
||||
|
||||
|
||||
|
@ -16,12 +16,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Defaults(horizon.Panel):
|
||||
name = _("Defaults")
|
||||
slug = 'defaults'
|
||||
|
||||
|
||||
dashboard.Admin.register(Defaults)
|
||||
|
@ -20,13 +20,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Flavors(horizon.Panel):
|
||||
name = _("Flavors")
|
||||
slug = 'flavors'
|
||||
permissions = ('openstack.services.compute',)
|
||||
|
||||
|
||||
dashboard.Admin.register(Flavors)
|
||||
|
@ -15,13 +15,9 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Hypervisors(horizon.Panel):
|
||||
name = _("Hypervisors")
|
||||
slug = 'hypervisors'
|
||||
permissions = ('openstack.roles.admin', 'openstack.services.compute')
|
||||
|
||||
|
||||
dashboard.Admin.register(Hypervisors)
|
||||
|
@ -20,13 +20,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Images(horizon.Panel):
|
||||
name = _("Images")
|
||||
slug = 'images'
|
||||
permissions = ('openstack.services.image',)
|
||||
|
||||
|
||||
dashboard.Admin.register(Images)
|
||||
|
@ -20,12 +20,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Info(horizon.Panel):
|
||||
name = _("System Information")
|
||||
slug = 'info'
|
||||
|
||||
|
||||
dashboard.Admin.register(Info)
|
||||
|
@ -20,13 +20,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Instances(horizon.Panel):
|
||||
name = _("Instances")
|
||||
slug = 'instances'
|
||||
permissions = ('openstack.roles.admin', 'openstack.services.compute')
|
||||
|
||||
|
||||
dashboard.Admin.register(Instances)
|
||||
|
@ -18,7 +18,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import glance
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class MetadataDefinitions(horizon.Panel):
|
||||
@ -26,6 +25,6 @@ class MetadataDefinitions(horizon.Panel):
|
||||
slug = 'metadata_defs'
|
||||
permissions = ('openstack.roles.admin',)
|
||||
|
||||
|
||||
if glance.VERSIONS.active >= 2:
|
||||
dashboard.Admin.register(MetadataDefinitions)
|
||||
@staticmethod
|
||||
def can_register():
|
||||
return glance.VERSIONS.active >= 2
|
||||
|
@ -13,7 +13,6 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Metering(horizon.Panel):
|
||||
@ -23,6 +22,3 @@ class Metering(horizon.Panel):
|
||||
policy_rules = (('identity', 'identity:list_projects'),
|
||||
('telemetry', 'telemetry:compute_statistics'),
|
||||
('telemetry', 'telemetry:get_meter'),)
|
||||
|
||||
|
||||
dashboard.Admin.register(Metering)
|
||||
|
@ -16,12 +16,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Networks(horizon.Panel):
|
||||
name = _("Networks")
|
||||
slug = 'networks'
|
||||
permissions = ('openstack.services.network',)
|
||||
|
||||
dashboard.Admin.register(Networks)
|
||||
|
@ -17,14 +17,13 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Routers(horizon.Panel):
|
||||
name = _("Routers")
|
||||
slug = 'routers'
|
||||
permissions = ('openstack.services.network',)
|
||||
|
||||
network_config = getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {})
|
||||
if network_config.get('enable_router', True):
|
||||
dashboard.Admin.register(Routers)
|
||||
@staticmethod
|
||||
def can_register():
|
||||
network_config = getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {})
|
||||
return network_config.get('enable_router', True)
|
||||
|
@ -14,13 +14,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.admin import dashboard
|
||||
|
||||
|
||||
class Volumes(horizon.Panel):
|
||||
name = _("Volumes")
|
||||
slug = "volumes"
|
||||
permissions = ('openstack.services.volume',)
|
||||
|
||||
|
||||
dashboard.Admin.register(Volumes)
|
||||
|
@ -22,7 +22,6 @@ class Identity(horizon.Dashboard):
|
||||
name = _("Identity")
|
||||
slug = "identity"
|
||||
default_panel = 'projects'
|
||||
panels = ('domains', 'projects', 'users', 'groups', 'roles',)
|
||||
|
||||
|
||||
horizon.register(Identity)
|
||||
|
@ -17,7 +17,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import keystone
|
||||
from openstack_dashboard.dashboards.identity import dashboard
|
||||
|
||||
|
||||
class Domains(horizon.Panel):
|
||||
@ -26,6 +25,6 @@ class Domains(horizon.Panel):
|
||||
policy_rules = (("identity", "identity:get_domain"),
|
||||
("identity", "identity:list_domains"))
|
||||
|
||||
|
||||
if keystone.VERSIONS.active >= 3:
|
||||
dashboard.Identity.register(Domains)
|
||||
@staticmethod
|
||||
def can_register():
|
||||
return keystone.VERSIONS.active >= 3
|
||||
|
@ -17,7 +17,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import keystone
|
||||
from openstack_dashboard.dashboards.identity import dashboard
|
||||
|
||||
|
||||
class Groups(horizon.Panel):
|
||||
@ -25,6 +24,6 @@ class Groups(horizon.Panel):
|
||||
slug = 'groups'
|
||||
policy_rules = (("identity", "identity:list_groups"),)
|
||||
|
||||
|
||||
if keystone.VERSIONS.active >= 3:
|
||||
dashboard.Identity.register(Groups)
|
||||
@staticmethod
|
||||
def can_register():
|
||||
return keystone.VERSIONS.active >= 3
|
||||
|
@ -20,14 +20,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.identity import dashboard
|
||||
|
||||
|
||||
class Tenants(horizon.Panel):
|
||||
name = _("Projects")
|
||||
slug = 'projects'
|
||||
policy_rules = (("identity", "identity:list_projects"),
|
||||
("identity", "identity:list_user_projects"))
|
||||
|
||||
|
||||
dashboard.Identity.register(Tenants)
|
||||
|
@ -17,7 +17,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import keystone
|
||||
from openstack_dashboard.dashboards.identity import dashboard
|
||||
|
||||
|
||||
class Roles(horizon.Panel):
|
||||
@ -25,6 +24,6 @@ class Roles(horizon.Panel):
|
||||
slug = 'roles'
|
||||
policy_rules = (("identity", "identity:list_roles"),)
|
||||
|
||||
|
||||
if keystone.VERSIONS.active >= 3:
|
||||
dashboard.Identity.register(Roles)
|
||||
@staticmethod
|
||||
def can_register():
|
||||
return keystone.VERSIONS.active >= 3
|
||||
|
@ -20,14 +20,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.identity import dashboard
|
||||
|
||||
|
||||
class Users(horizon.Panel):
|
||||
name = _("Users")
|
||||
slug = 'users'
|
||||
policy_rules = (("identity", "identity:get_user"),
|
||||
("identity", "identity:list_users"))
|
||||
|
||||
|
||||
dashboard.Identity.register(Users)
|
||||
|
@ -17,12 +17,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class AccessAndSecurity(horizon.Panel):
|
||||
name = _("Access & Security")
|
||||
slug = 'access_and_security'
|
||||
|
||||
|
||||
dashboard.Project.register(AccessAndSecurity)
|
||||
|
@ -20,12 +20,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Containers(horizon.Panel):
|
||||
name = _("Containers")
|
||||
slug = 'containers'
|
||||
permissions = ('openstack.services.object-store',)
|
||||
|
||||
dashboard.Project.register(Containers)
|
||||
|
@ -17,57 +17,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
|
||||
class BasePanels(horizon.PanelGroup):
|
||||
slug = "compute"
|
||||
name = _("Compute")
|
||||
panels = ('overview',
|
||||
'instances',
|
||||
'volumes',
|
||||
'images',
|
||||
'access_and_security',)
|
||||
|
||||
|
||||
class NetworkPanels(horizon.PanelGroup):
|
||||
slug = "network"
|
||||
name = _("Network")
|
||||
panels = ('network_topology',
|
||||
'networks',
|
||||
'routers',
|
||||
'loadbalancers',
|
||||
'firewalls',
|
||||
'vpn',)
|
||||
|
||||
|
||||
class ObjectStorePanels(horizon.PanelGroup):
|
||||
slug = "object_store"
|
||||
name = _("Object Store")
|
||||
panels = ('containers',)
|
||||
|
||||
|
||||
class OrchestrationPanels(horizon.PanelGroup):
|
||||
slug = "orchestration"
|
||||
name = _("Orchestration")
|
||||
panels = ('stacks',
|
||||
'stacks.resource_types',)
|
||||
|
||||
|
||||
class DatabasePanels(horizon.PanelGroup):
|
||||
slug = "database"
|
||||
name = _("Database")
|
||||
panels = ('databases',
|
||||
'database_backups',)
|
||||
|
||||
|
||||
class Project(horizon.Dashboard):
|
||||
name = _("Project")
|
||||
slug = "project"
|
||||
panels = (
|
||||
BasePanels,
|
||||
NetworkPanels,
|
||||
ObjectStorePanels,
|
||||
OrchestrationPanels,
|
||||
DatabasePanels,)
|
||||
default_panel = 'overview'
|
||||
|
||||
|
||||
horizon.register(Project)
|
||||
|
@ -16,14 +16,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Backups(horizon.Panel):
|
||||
name = _("Backups")
|
||||
slug = 'database_backups'
|
||||
permissions = ('openstack.services.database',
|
||||
'openstack.services.object-store',)
|
||||
|
||||
|
||||
dashboard.Project.register(Backups)
|
||||
|
@ -16,13 +16,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Databases(horizon.Panel):
|
||||
name = _("Instances")
|
||||
slug = 'databases'
|
||||
permissions = ('openstack.services.database',)
|
||||
|
||||
|
||||
dashboard.Project.register(Databases)
|
||||
|
@ -17,7 +17,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import neutron
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -44,6 +43,3 @@ class Firewall(horizon.Panel):
|
||||
if not super(Firewall, self).allowed(context):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
dashboard.Project.register(Firewall)
|
||||
|
@ -17,13 +17,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Images(horizon.Panel):
|
||||
name = _("Images")
|
||||
slug = 'images'
|
||||
permissions = ('openstack.services.image',)
|
||||
|
||||
|
||||
dashboard.Project.register(Images)
|
||||
|
@ -16,13 +16,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Instances(horizon.Panel):
|
||||
name = _("Instances")
|
||||
slug = 'instances'
|
||||
permissions = ('openstack.services.compute',)
|
||||
|
||||
|
||||
dashboard.Project.register(Instances)
|
||||
|
@ -17,7 +17,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import neutron
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -44,6 +43,3 @@ class LoadBalancer(horizon.Panel):
|
||||
if not super(LoadBalancer, self).allowed(context):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
dashboard.Project.register(LoadBalancer)
|
||||
|
@ -20,13 +20,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class NetworkTopology(horizon.Panel):
|
||||
name = _("Network Topology")
|
||||
slug = 'network_topology'
|
||||
permissions = ('openstack.services.network', )
|
||||
|
||||
|
||||
dashboard.Project.register(NetworkTopology)
|
||||
|
@ -16,12 +16,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Networks(horizon.Panel):
|
||||
name = _("Networks")
|
||||
slug = 'networks'
|
||||
permissions = ('openstack.services.network',)
|
||||
|
||||
dashboard.Project.register(Networks)
|
||||
|
@ -16,13 +16,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class NGImages(horizon.Panel):
|
||||
name = _("Images")
|
||||
slug = 'ngimages'
|
||||
permissions = ('openstack.services.image',)
|
||||
|
||||
|
||||
dashboard.Project.register(NGImages)
|
||||
|
@ -20,12 +20,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Overview(horizon.Panel):
|
||||
name = _("Overview")
|
||||
slug = 'overview'
|
||||
|
||||
|
||||
dashboard.Project.register(Overview)
|
||||
|
@ -17,14 +17,13 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Routers(horizon.Panel):
|
||||
name = _("Routers")
|
||||
slug = 'routers'
|
||||
permissions = ('openstack.services.network',)
|
||||
|
||||
network_config = getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {})
|
||||
if network_config.get('enable_router', True):
|
||||
dashboard.Project.register(Routers)
|
||||
@staticmethod
|
||||
def can_register():
|
||||
network_config = getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {})
|
||||
return network_config.get('enable_router', True)
|
||||
|
@ -14,12 +14,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Stacks(horizon.Panel):
|
||||
name = _("Stacks")
|
||||
slug = "stacks"
|
||||
permissions = ('openstack.services.orchestration',)
|
||||
|
||||
dashboard.Project.register(Stacks)
|
||||
|
@ -15,12 +15,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class ResourceTypes(horizon.Panel):
|
||||
name = _("Resource Types")
|
||||
slug = "stacks.resource_types"
|
||||
permissions = ('openstack.services.orchestration',)
|
||||
|
||||
dashboard.Project.register(ResourceTypes)
|
||||
|
@ -16,13 +16,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
|
||||
class Volumes(horizon.Panel):
|
||||
name = _("Volumes")
|
||||
slug = 'volumes'
|
||||
permissions = ('openstack.services.volume',)
|
||||
|
||||
|
||||
dashboard.Project.register(Volumes)
|
||||
|
@ -19,7 +19,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from openstack_dashboard.api import neutron
|
||||
from openstack_dashboard.dashboards.project import dashboard
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -46,6 +45,3 @@ class VPN(horizon.Panel):
|
||||
if not super(VPN, self).allowed(context):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
dashboard.Project.register(VPN)
|
||||
|
8
openstack_dashboard/enabled/_1010_compute_panel_group.py
Normal file
8
openstack_dashboard/enabled/_1010_compute_panel_group.py
Normal file
@ -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 = 'project'
|
24
openstack_dashboard/enabled/_1020_project_overview_panel.py
Normal file
24
openstack_dashboard/enabled/_1020_project_overview_panel.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'overview'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'compute'
|
||||
|
||||
# If set, it will update the default panel of the PANEL_DASHBOARD.
|
||||
DEFAULT_PANEL = 'overview'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.overview.panel.Overview'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'instances'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'compute'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.instances.panel.Instances'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'volumes'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'compute'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.volumes.panel.Volumes'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'images'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'compute'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.images.panel.Images'
|
10
openstack_dashboard/enabled/_1060_project_access_panel.py
Normal file
10
openstack_dashboard/enabled/_1060_project_access_panel.py
Normal file
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'access_and_security'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'compute'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'access_and_security.panel.AccessAndSecurity')
|
8
openstack_dashboard/enabled/_1410_network_panel_group.py
Normal file
8
openstack_dashboard/enabled/_1410_network_panel_group.py
Normal file
@ -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 = 'project'
|
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'network_topology'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'network'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'network_topology.panel.NetworkTopology')
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'networks'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'network'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.networks.panel.Networks'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'routers'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'network'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.routers.panel.Routers'
|
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'loadbalancers'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'network'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'loadbalancers.panel.LoadBalancer')
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'firewalls'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'network'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.firewalls.panel.Firewall'
|
9
openstack_dashboard/enabled/_1470_project_vpn_panel.py
Normal file
9
openstack_dashboard/enabled/_1470_project_vpn_panel.py
Normal file
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'vpn'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'network'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.vpn.panel.VPN'
|
@ -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 = 'orchestration'
|
||||
# The display name of the PANEL_GROUP. Required.
|
||||
PANEL_GROUP_NAME = _('Ochestration')
|
||||
# The slug of the dashboard the PANEL_GROUP associated with. Required.
|
||||
PANEL_GROUP_DASHBOARD = 'project'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'stacks'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'orchestration'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.stacks.panel.Stacks'
|
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'stacks.resource_types'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'orchestration'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'stacks.resource_types.panel.ResourceTypes')
|
@ -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 = 'database'
|
||||
# The display name of the PANEL_GROUP. Required.
|
||||
PANEL_GROUP_NAME = _('Database')
|
||||
# The slug of the dashboard the PANEL_GROUP associated with. Required.
|
||||
PANEL_GROUP_DASHBOARD = 'project'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'databases'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'database'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.project.databases.panel.Databases'
|
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'database_backups'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'database'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'database_backups.panel.Backups')
|
@ -0,0 +1,5 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
PANEL_GROUP = 'object_store'
|
||||
PANEL_GROUP_NAME = _('Object Store')
|
||||
PANEL_GROUP_DASHBOARD = 'project'
|
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'containers'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'object_store'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'containers.panel.Containers')
|
@ -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 = 'admin'
|
||||
# The display name of the PANEL_GROUP. Required.
|
||||
PANEL_GROUP_NAME = _('System')
|
||||
# The slug of the dashboard the PANEL_GROUP associated with. Required.
|
||||
PANEL_GROUP_DASHBOARD = 'admin'
|
23
openstack_dashboard/enabled/_2020_admin_overview_panel.py
Normal file
23
openstack_dashboard/enabled/_2020_admin_overview_panel.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
# If set, it will update the default panel of the PANEL_DASHBOARD.
|
||||
DEFAULT_PANEL = 'overview'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.overview.panel.Overview'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'metering'
|
||||
# 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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.metering.panel.Metering'
|
10
openstack_dashboard/enabled/_2040_admin_hypervisors_panel.py
Normal file
10
openstack_dashboard/enabled/_2040_admin_hypervisors_panel.py
Normal file
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.admin.'
|
||||
'hypervisors.panel.Hypervisors')
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.aggregates.panel.Aggregates'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.instances.panel.Instances'
|
9
openstack_dashboard/enabled/_2070_admin_volumes_panel.py
Normal file
9
openstack_dashboard/enabled/_2070_admin_volumes_panel.py
Normal file
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.volumes.panel.Volumes'
|
9
openstack_dashboard/enabled/_2080_admin_flavors_panel.py
Normal file
9
openstack_dashboard/enabled/_2080_admin_flavors_panel.py
Normal file
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.flavors.panel.Flavors'
|
9
openstack_dashboard/enabled/_2090_admin_images_panel.py
Normal file
9
openstack_dashboard/enabled/_2090_admin_images_panel.py
Normal file
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.images.panel.Images'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.networks.panel.Networks'
|
9
openstack_dashboard/enabled/_2110_admin_routers_panel.py
Normal file
9
openstack_dashboard/enabled/_2110_admin_routers_panel.py
Normal file
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.routers.panel.Routers'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'defaults'
|
||||
# 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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.defaults.panel.Defaults'
|
@ -0,0 +1,10 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'metadata_defs'
|
||||
# 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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.admin.'
|
||||
'metadata_defs.panel.MetadataDefinitions')
|
9
openstack_dashboard/enabled/_2140_admin_info_panel.py
Normal file
9
openstack_dashboard/enabled/_2140_admin_info_panel.py
Normal file
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'info'
|
||||
# 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'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.admin.info.panel.Info'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'domains'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_GROUP = 'default'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_DASHBOARD = 'identity'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.identity.domains.panel.Domains'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'projects'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_GROUP = 'default'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_DASHBOARD = 'identity'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.identity.projects.panel.Tenants'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'users'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_GROUP = 'default'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_DASHBOARD = 'identity'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.identity.users.panel.Users'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'groups'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_GROUP = 'default'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_DASHBOARD = 'identity'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.identity.groups.panel.Groups'
|
@ -0,0 +1,9 @@
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'roles'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_GROUP = 'default'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_DASHBOARD = 'identity'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'openstack_dashboard.dashboards.identity.roles.panel.Roles'
|
@ -0,0 +1,22 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import horizon
|
||||
|
||||
|
||||
class NonloadingPanel(horizon.Panel):
|
||||
name = "NonLoading Plugin Panel"
|
||||
slug = 'nonloading'
|
||||
|
||||
@staticmethod
|
||||
def can_register():
|
||||
return False
|
11
openstack_dashboard/test/test_panels/nonloading_panel/templates/nonloading_panel/index.html
Normal file
11
openstack_dashboard/test/test_panels/nonloading_panel/templates/nonloading_panel/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}Nonloading Plugin-based Panel{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
Nonloading Plugin-based Panel
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -0,0 +1,21 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.test.test_panels.nonloading_panel import views
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
)
|
@ -0,0 +1,18 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from horizon import views
|
||||
|
||||
|
||||
class IndexView(views.HorizonTemplateView):
|
||||
template_name = 'admin/nonloading_panel/index.html'
|
||||
page_title = 'Nonloading Plugin-based Panel'
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user