def test_required_services(self): horizon.register(MyDash) MyDash.register(MyPanel) dash = horizon.get_dashboard("mydash") panel = dash.get_panel("myslug") self._reload_urls() # With the required service, the page returns fine. resp = self.client.get(panel.get_absolute_url()) self.assertEqual(resp.status_code, 200) # Remove the required service from the service catalog and we # should get a 404. new_catalog = [ service for service in self.request.user.service_catalog if service["type"] != MyPanel.services[0] ] tenants = self.context["authorized_tenants"] self.setActiveUser( token=self.token.id, username=self.user.name, tenant_id=self.tenant.id, service_catalog=new_catalog, authorized_tenants=tenants, ) resp = self.client.get(panel.get_absolute_url()) self.assertEqual(resp.status_code, 404)
def test_required_services(self): horizon.register(MyDash) MyDash.register(MyPanel) dash = horizon.get_dashboard("mydash") panel = dash.get_panel('myslug') self._reload_urls() # Set roles for admin user self.setActiveUser(token=self.token, username=self.user.name, tenant_id=self.tenant.id, service_catalog=self.request.user.service_catalog, roles=[{'name': 'admin'}]) # With the required service, the page returns fine. resp = self.client.get(panel.get_absolute_url()) self.assertEqual(resp.status_code, 200) # Remove the required service from the service catalog and we # should get a 404. service_name = MyPanel.permissions[0].split(".")[-1] new_catalog = [service for service in self.request.user.service_catalog if service['type'] != service_name] tenants = self.context['authorized_tenants'] self.setActiveUser(token=self.token, username=self.user.name, tenant_id=self.tenant.id, service_catalog=new_catalog, authorized_tenants=tenants) resp = self.client.get(panel.get_absolute_url()) self.assertEqual(resp.status_code, 302)
def tearDown(self): # Restore dash cats = horizon.get_dashboard("cats") cats.name = "Cats" horizon.register(Dogs) self._discovered_dashboards.append(Dogs) Dogs.register(Puppies) Cats.register(Tigers) super(CustomPanelTests, self).tearDown() settings.HORIZON_CONFIG.pop('customization_module') # refresh config conf.HORIZON_CONFIG._setup()
def test_registry(self): """Verify registration and autodiscovery work correctly. Please note that this implicitly tests that autodiscovery works by virtue of the fact that the dashboards listed in ``settings.INSTALLED_APPS`` are loaded from the start. """ # Registration self.assertEqual(2, len(base.Horizon._registry)) horizon.register(MyDash) self.assertEqual(3, len(base.Horizon._registry)) with self.assertRaises(ValueError): horizon.register(MyPanel) with self.assertRaises(ValueError): horizon.register("MyPanel") # Retrieval my_dash_instance_by_name = horizon.get_dashboard("mydash") self.assertIsInstance(my_dash_instance_by_name, MyDash) my_dash_instance_by_class = horizon.get_dashboard(MyDash) self.assertEqual(my_dash_instance_by_name, my_dash_instance_by_class) with self.assertRaises(base.NotRegistered): horizon.get_dashboard("fake") self.assertQuerysetEqual(horizon.get_dashboards(), ['<Dashboard: cats>', '<Dashboard: dogs>', '<Dashboard: mydash>']) # Removal self.assertEqual(3, len(base.Horizon._registry)) horizon.unregister(MyDash) self.assertEqual(2, len(base.Horizon._registry)) with self.assertRaises(base.NotRegistered): horizon.get_dashboard(MyDash)
def test_required_services(self): horizon.register(MyDash) MyDash.register(MyPanel) dash = horizon.get_dashboard("mydash") panel = dash.get_panel('myslug') self._reload_urls() # With the required service, the page returns fine. resp = self.client.get(panel.get_absolute_url()) self.assertEqual(resp.status_code, 200) # Remove the required service from the service catalog and we # should get a 404. new_catalog = [service for service in self.request.user.service_catalog if service['type'] != MyPanel.services[0]] tenants = self.TEST_CONTEXT['authorized_tenants'] self.setActiveUser(token=self.TEST_TOKEN, username=self.TEST_USER, tenant_id=self.TEST_TENANT, service_catalog=new_catalog, authorized_tenants=tenants) resp = self.client.get(panel.get_absolute_url()) self.assertEqual(resp.status_code, 404)
from django.utils.translation import ugettext_lazy as _ import horizon class TemperDash(horizon.Dashboard): name = _("Temper") slug = "temper" panels = ("angular", "#/projects", "#/services") default_panel = "angular" roles = ("admin",) horizon.register(TemperDash)
# 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 from nec_portal.nec_portal_index.panel import Default class NECPortalDashboard(horizon.Dashboard): name = "NEC Portal Index" slug = "nec_portal" panels = ('nec_portal_index',) default_panel = 'nec_portal_index' nav = False horizon.register(NECPortalDashboard) NECPortalDashboard.register(Default)
from django.utils.translation import ugettext_lazy as _ import horizon class Accounts(horizon.PanelGroup): slug = "accounts" name = _("Accounts") panels = ('keys',) class Workspace(horizon.PanelGroup): slug = "workspace" name = _("Workspace") panels = ('workload',) class Cnext(horizon.Dashboard): name = _("Cnext") slug = "cnext" panels = ('images', 'keypairs', 'securitygroups','instances','volume','snapshots',) # Add your panels here. default_panel = 'keypairs' # Specify the slug of the dashboard's default panel. horizon.register(Cnext)
# 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. # # @author: Abishek Subramanian, Cisco Systems, Inc. from django.utils.translation import ugettext_lazy as _ # noqa from openstack_dashboard.api import neutron import horizon class Router(horizon.Dashboard): name = _("Router") slug = "router" panels = ('nexus1000v',) default_panel = 'nexus1000v' permissions = ('openstack.roles.admin',) if neutron.is_port_profiles_supported(): horizon.register(Router)
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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.utils.translation import ugettext_lazy as _ import horizon class Logmanagement(horizon.Dashboard): name = _("Log Management") slug = "logmanagement" default_panel = 'view' panels = ('view', 'config', ) horizon.register(Logmanagement)
# 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.utils.translation import ugettext_lazy as _ import horizon class FloatGroup(horizon.PanelGroup): slug = "floatgroup" name = _("Float") panels = ('access_and_security', ) class Floatingtest(horizon.Dashboard): name = _("Floatingtest") slug = "floatingtest" panels = (FloatGroup,) # Add your panels here. default_panel = 'access_and_security' # Specify the slug of the dashboard's default panel. horizon.register(Floatingtest)
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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.utils.translation import ugettext_lazy as _ import horizon class Identity(horizon.Dashboard): name = _("Identity") slug = "identity" default_panel = 'projects' permissions = ('openstack.roles.admin',) horizon.register(Identity)
# 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.utils.translation import ugettext_lazy as _ import horizon class Mydashboard(horizon.Dashboard): name = _("Mydashboard") slug = "mydashboard" panels = () # Add your panels here. default_panel = '' # Specify the slug of the dashboard's default panel. horizon.register(Mydashboard)
# 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.utils.translation import ugettext_lazy as _ import horizon class BroadViewBSTGroup(horizon.PanelGroup): slug = "broadviewbstgroup" name = _("BroadView BST") panels = ('featurepanel', 'thresholdspanel', 'trackingpanel') class BroadViewBST(horizon.Dashboard): name = _("BroadView") slug = "broadview" panels = (BroadViewBSTGroup, ) default_panel = 'featurepanel' horizon.register(BroadViewBST)
from django.utils.translation import ugettext_lazy as _ import horizon class UsageResources(horizon.PanelGroup): slug = "usageresources" name = _("Available Reports") panels = ('usageresources', ) class Reports(horizon.Dashboard): name = _("Reports") slug = "reports" panels = (UsageResources, ) # Add your panels here. default_panel = 'usageresources' # Specify the slug of the dashboard's default panel. horizon.register(Reports)
# under the License. from django.utils.translation import ugettext_lazy as _ import horizon class Group2(horizon.PanelGroup): slug = "group1" name = _("Group1") panels = ('images_OPS', ) class Group1(horizon.PanelGroup): slug = "docker" name = _("Docker") panels = ('container', 'linechart_docker') class Custom_Horizon(horizon.Dashboard): name = _("Custom_Horizon") slug = "custom_horizon" panels = ( Group1, Group2, ) # Add your panels here. default_panel = 'container' # Specify the slug of the dashboard's default panel. horizon.register(Custom_Horizon)
# Copyright (c) 2017 Huawei, Inc. # # 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 import settings from django.utils.translation import ugettext_lazy as _ import horizon import conveyordashboard.api.rest # noqa class Conveyor(horizon.Dashboard): name = _(getattr(settings, 'CONVEYOR_DASHBOARD_NAME', "Conveyor")) supports_tenants = True slug = "conveyor" default_panel = 'plans' horizon.register(Conveyor)
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Red Hat, Inc. # # 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.utils.translation import ugettext_lazy as _ import horizon class Infrastructure(horizon.Dashboard): name = _("Infrastructure") slug = "infrastructure" panels = ('resource_management', ) default_panel = 'resource_management' permissions = ('openstack.roles.admin', ) horizon.register(Infrastructure)
from django.utils.translation import ugettext_lazy as _ import horizon class AuditGroup(horizon.PanelGroup): slug = "auditgroup" name = _("Audit") panels = ('auditreports', ) class OpenAuditDashboard(horizon.Dashboard): name = _("OpenAudit") slug = "openaudit" panels = (AuditGroup, ) default_panel = 'auditreports' horizon.register(OpenAuditDashboard)
from django.utils.translation import ugettext_lazy as _ import horizon class DemoPanelGroup(horizon.PanelGroup): name = _("Demo Panel") slug = "demopanel" panels = ("ovewview", "aliases", "nat", "portforward", "firewall",) class DemoPanel(horizon.Dashboard): name = _("Admin") slug = "demopanel" panels = (DemoPanelGroup,) default_panel = "overview" roles = ("admin",) horizon.register(DemoPanel)
import horizon class CuteGroup(horizon.PanelGroup): slug = "cute" name = "Cute Cats" panels = ('kittens',) class FierceGroup(horizon.PanelGroup): slug = "fierce" name = "Fierce Cats" panels = ("tigers",) class Cats(horizon.Dashboard): name = "Cats" slug = "cats" panels = (CuteGroup, FierceGroup) default_panel = 'kittens' horizon.register(Cats)
# # Copyright 2017 NephoScale # from django.utils.translation import ugettext_lazy as _ import horizon #class M1AstutePanels(horizon.PanelGroup): class M1AstutePanels(horizon.Dashboard): slug = "billing" name = _("Billing") panels = ('plan_mappings', 'config', 'invoices', 'discounts', 'type_mappings') default_panel = 'billing_config' permissions = (('openstack.roles.admin', 'openstack.roles.provisioning', \ 'openstack.roles.finance', \ 'openstack.roles.support', \ 'openstack.roles.catalogue' ),) horizon.register(M1AstutePanels) #horizon.register(AstutePanels)
# Copyright 2012 Nebula, Inc. # # 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.utils.translation import ugettext_lazy as _ import horizon class System(horizon.Dashboard): name = _("SystemMan") slug = "system" icon = ("img/menu_icon/menu_icon8.png") default_panel = 'defaults' horizon.register(System)
from django.utils.translation import ugettext_lazy as _ import horizon class Custom_Backup(horizon.Dashboard): name = _("Custom_Backup") slug = "custom_backup" panels = ('jobs', 'notifications') # Specify the slug of the dashboard's default panel. default_panel = 'jobs' horizon.register(Custom_Backup)
from django.utils.translation import ugettext_lazy as _ import horizon class InstanceJghost(horizon.PanelGroup): name = _("Instance Jghost") slug = "instance_jghost" panels = ('geiao',) class Jghost(horizon.Dashboard): name = _("Jghost") slug = "jghost" panels = (InstanceJghost,) # Add your panels here. default_panel = 'geiao' # Specify the slug of the dashboard's default panel. horizon.register(Jghost)
# 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.utils.translation import ugettext_lazy as _ import horizon class NiMano(horizon.Dashboard): name = _("NI mano") slug = "ni_mano" panels = ('nodes', 'links', 'topos', 'vnfflavors', 'vnfinstances', 'sfcrs', 'sfcs') # Add your panels here. default_panel = 'nodes' # Specify the slug of the dashboard's default panel. policy_rules = (('identity', 'admin_required'), ) horizon.register(NiMano)
from django.utils.translation import ugettext_lazy as _ import horizon class InstanceVisualizations(horizon.PanelGroup): slug = "instance_visualizations" name = _("Instance Visualizations") panels = ('flocking',) class VizDash(horizon.Dashboard): name = _("Visualizations") slug = "visualizations" panels = (InstanceVisualizations,) default_panel = 'flocking' roles = ('admin',) horizon.register(VizDash)
# 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.utils.translation import ugettext_lazy as _ from openstack_auth import utils import horizon from django.conf import settings class Monitor(horizon.Dashboard): name = _("Monitor") slug = "monitor" if getattr(settings, 'POLICY_CHECK_FUNCTION', None): policy_rules = (('monitor_info_panel', 'admin_required'), ) else: permissions = (tuple(utils.get_admin_permissions()), ) horizon.register(Monitor)
# Copyright (c) 2016 Huawei, Inc. # # 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.utils.translation import ugettext_lazy as _ import horizon class StorageGateway(horizon.Dashboard): name = _("Storage Gateway") slug = "storage-gateway" panel = ('volumes', 'snapshots', 'backups', 'replications', 'checkpoints') default_panel = 'volumes' horizon.register(StorageGateway)
from django.utils.translation import ugettext_lazy as _ import horizon class Amazon(horizon.Dashboard): name = _("Amazon") slug = "amazon" panels = ('instances', 'images', 'keypairs', 'securitygroups', 'volume', 'snapshots', 'elastic_ip') # Add your panels here. default_panel = 'instances' # Specify the slug of the dashboard's default panel. horizon.register(Amazon)
# 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.utils.translation import ugettext_lazy as _ import horizon class Storage(horizon.Dashboard): name = _("Storage") slug = "storage" default_panel = "volumes" panels = ('volumes', 'snapshots', 'backups',) horizon.register(Storage)
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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.utils.translation import ugettext_lazy as _ import horizon class Identity(horizon.Dashboard): name = _("Account") slug = "identity" #default_panel = 'projects' default_panel = 'xprojects' horizon.register(Identity)
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <*****@*****.**> # # 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.utils.translation import ugettext_lazy as _ import horizon class Dns(horizon.Dashboard): name = _("DNS") slug = "dns" panels = ('domains', ) default_panel = 'domains' supports_tenants = True permissions = ('openstack.roles.admin',) horizon.register(Dns)
name = _("Database") slug = "database" panels = ( 'databases', 'database_backups', ) class DataProcessingPanels(horizon.PanelGroup): name = _("Data Processing") slug = "data_processing" panels = ('data_processing.data_plugins', ) class Project(horizon.Dashboard): name = _("Project") slug = "project" panels = ( BasePanels, NetworkPanels, ObjectStorePanels, OrchestrationPanels, DatabasePanels, DataProcessingPanels, ) default_panel = 'overview' supports_tenants = True horizon.register(Project)
# Copyright 2012 Nebula, Inc. # # 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.utils.translation import ugettext_lazy as _ import horizon class Syspanel(horizon.Dashboard): name = _("Admin") slug = "syspanel" panels = {_("System Panel"): ('overview', 'instances', 'services', 'flavors', 'images', 'projects', 'users', 'quotas',)} default_panel = 'overview' roles = ('admin',) horizon.register(Syspanel)
# 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.utils.translation import ugettext_lazy as _ import horizon class Settings(horizon.Dashboard): name = _("Settings") slug = "settings" panels = ('user', 'password', 'authsettings', ) default_panel = 'user' def nav(self, context): dash = context['request'].horizon.get('dashboard', None) if dash and dash.slug == self.slug: return True return False horizon.register(Settings)
# 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.utils.translation import ugettext_lazy as _ import horizon class Onboarding(horizon.Dashboard): name = _("Onboarding") slug = "onboarding" # Add your panels here. panels = ('exporting', 'importing') default_panel = 'exporting' # Specify the slug of the dashboard's default panel. horizon.register(Onboarding)
# 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.utils.translation import ugettext_lazy as _ import horizon class Cisco(horizon.Dashboard): name = _("Cisco") slug = "cisco" default_panel = 'nexus1000v' permissions = ('openstack.roles.admin', ) horizon.register(Cisco)
panels = ("networks", "routers", "loadbalancers", "network_topology") class ObjectStorePanels(horizon.PanelGroup): slug = "object_store" name = _("Object Store") panels = ("containers",) class OrchestrationPanels(horizon.PanelGroup): name = _("Orchestration") slug = "orchestration" panels = ("stacks",) class TDAFServices(horizon.PanelGroup): name = _("App Services") slug = "tdafservices" panels = ("httprelayer", "servdirstack", "identity", "bigdata") class Project(horizon.Dashboard): name = _("Project") slug = "project" panels = (BasePanels, NetworkPanels, ObjectStorePanels, OrchestrationPanels, TDAFServices) default_panel = "overview" supports_tenants = True horizon.register(Project)
""" view file File: dashboard.py Description: Dash board menu Created On: 09-March-2016 Created By: [email protected] """ #importing the packages from django.utils.translation import ugettext_lazy as _ import horizon #My account class class Myaccount(horizon.Dashboard): #Defining the panels name = _("My Account") slug = "myaccount" panels = ('myinvoice',) default_panel = 'myinvoice' #Registering the panel horizon.register(Myaccount)
# # 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.utils.translation import ugettext as _ import horizon class SavannaDashboard(horizon.Dashboard): name = _("Savanna") slug = "savanna" panels = ('clusters', 'cluster_templates', 'nodegroup_templates', 'image_registry', 'plugins', 'queries') default_panel = 'clusters' nav = True supports_tenants = True horizon.register(SavannaDashboard)
# 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.utils.translation import ugettext_lazy as _ from monitoring.config import local_settings as settings import horizon class Monitoring(horizon.Dashboard): name = _("Monitoring") slug = "monitoring" panels = ( 'overview', 'alarmdefs', 'alarms', 'notifications', ) default_panel = 'overview' policy_rules = (("monitoring", "monitoring:monitoring"), ) permissions = (('openstack.services.' + settings.MONITORING_SERVICE_TYPE), ) horizon.register(Monitoring)
import horizon class Dogs(horizon.Dashboard): name = "Dogs" slug = "dogs" panels = ("puppies",) default_panel = "puppies" horizon.register(Dogs)
# # 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.utils.translation import ugettext_lazy as _ import horizon class SystemPanels(horizon.PanelGroup): slug = "syspanel" name = _("System Panel") panels = ('overview', 'instances', 'volumes', 'services', 'flavors', 'images', 'projects', 'users', 'quotas',) class Syspanel(horizon.Dashboard): name = _("Admin") slug = "syspanel" panels = (SystemPanels,) default_panel = 'overview' permissions = ('openstack.roles.admin',) horizon.register(Syspanel)
# Copyright 2012 Nebula, Inc. # # 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.utils.translation import ugettext_lazy as _ import horizon class Compute(horizon.Dashboard): name = _("Compute") slug = "instances" default_panel = 'instances' panels = ('instances', 'images',) horizon.register(Compute)
# 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 import settings from django.utils.translation import ugettext_lazy as _ import horizon class Developer(horizon.Dashboard): name = _("Developer") slug = "developer" default_panel = "theme_preview" def allowed(self, context): if not settings.DEBUG: return False return super(Developer, self).allowed(context) horizon.register(Developer)
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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.utils.translation import ugettext_lazy as _ import horizon class Market(horizon.Dashboard): name = _("Market") slug = "market" panels = ('browse', 'vms', ) default_panel = 'browse' permissions = ('openstack.roles.admin', ) horizon.register(Market)
from django.utils.translation import ugettext_lazy as _ import horizon class MonitoringPanels(horizon.PanelGroup): slug = "monitoring" name = _("Monitoring Panel") panels = ('checks', ) class MonitoringDashboard(horizon.Dashboard): name = _("Monitoring") slug = "monitoring" panels = (MonitoringPanels, ) default_panel = 'checks' permissions = ('openstack.roles.admin', ) horizon.register(MonitoringDashboard)
# -*- coding: utf-8 -*- # Copyright 2016 Mellanox Technologies, Ltd # # 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.utils.translation import ugettext_lazy as _ import horizon # import horizon_mellanox.api.rest class MlnxDashboard(horizon.Dashboard): name = _("Mellanox Technologies") slug = "horizon_mellanox" panels = ('settingspanel', 'neopanel', 'ufmpanel', 'aboutpanel') default_panel = 'settingspanel' horizon.register(MlnxDashboard)
# under the License. from django.utils.translation import ugettext_lazy as _ import horizon class SystemPanels(horizon.PanelGroup): slug = "admin" name = _("System Panel") panels = ('overview', 'metering', 'hypervisors', 'aggregates', 'instances', 'volumes', 'flavors', 'images', 'networks', 'routers', 'defaults', 'info') class IdentityPanels(horizon.PanelGroup): slug = "identity" name = _("Identity Panel") panels = ('domains', 'projects', 'users', 'groups', 'roles') class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" panels = (SystemPanels, IdentityPanels) default_panel = 'overview' permissions = ('openstack.roles.admin',) horizon.register(Admin)
# 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.utils.translation import ugettext_lazy as _ import horizon class Mydashboard(horizon.Dashboard): name = _("My Dashboard") slug = "mydashboard" panels = ('mypanel',) # Add your panels here. default_panel = 'mypanel' # Specify the slug of the dashboard's default panel. horizon.register(Mydashboard)
# Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # # 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.utils.translation import ugettext_lazy as _ # noqa import horizon class Settings(horizon.Dashboard): name = _("Settings") slug = "settings" panels = ('user', 'password', ) default_panel = 'user' nav = False horizon.register(Settings)
# 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.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', 'info', 'avos') class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" panels = (SystemPanels, ) default_panel = 'overview' permissions = ('openstack.roles.admin', ) horizon.register(Admin)
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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.utils.translation import ugettext_lazy as _ import horizon class Overview(horizon.Dashboard): name = _("Overview") slug = "overview" default_panel = 'overview' panels = ('overview', ) horizon.register(Overview)
# 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.utils.translation import ugettext_lazy as _ import horizon from mistraldashboard.default.panel import Default class MistralDashboard(horizon.Dashboard): name = _("Workflow") slug = "mistral" panels = ( 'default', 'workbooks', 'workflows', 'executions', 'tasks', 'actions', 'cron_triggers', 'delayt_workloads', ) default_panel = 'default' roles = ('admin',) horizon.register(MistralDashboard) MistralDashboard.register(Default)
import horizon class BasePanels(horizon.PanelGroup): slug = "compute" name = _("Manage Compute") panels = ('overview', 'instances', 'volumes', 'images_and_snapshots', 'access_and_security', 'networks') class ObjectStorePanels(horizon.PanelGroup): slug = "object_store" name = _("Object Store") panels = ('containers',) class Nova(horizon.Dashboard): name = _("Project") slug = "nova" panels = (BasePanels, ObjectStorePanels) default_panel = 'overview' supports_tenants = True horizon.register(Nova)
from django.utils.translation import ugettext_lazy as _ import horizon class Results(horizon.Dashboard): name = _("Results") slug = "results" panels = ('browser', 'vnc', 'rdp', 'ports') # Add your panels here. default_panel = 'vnc' # Specify the slug of the dashboard's default panel. horizon.register(Results)
# # 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.utils.translation import ugettext_lazy as _ import horizon class Testgroup(horizon.PanelGroup): slug = "testgroup" name = _("Test Group") panels = ('testpanel', ) class Testdashboard(horizon.Dashboard): name = _("Test Dashhboard") slug = "testdashboard" panels = (Testgroup, ) # Add your panels here. default_panel = 'testpanel' # Specify the slug of the dashboard's default panel. #import pdb #pdb.set_trace() horizon.register(Testdashboard)
from django.utils.translation import ugettext_lazy as _ import horizon class UsageResources(horizon.PanelGroup): slug = "usageresources" name = _("Available Reports") panels = ('usageresources',) class Reports(horizon.Dashboard): name = _("Reports") slug = "reports" panels = (UsageResources,) # Add your panels here. default_panel = 'usageresources' # Specify the slug of the dashboard's default panel. horizon.register(Reports)
# 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. # # @author: Abishek Subramanian, Cisco Systems, Inc. from django.utils.translation import ugettext_lazy as _ from openstack_dashboard.api import neutron import horizon class Router(horizon.Dashboard): name = _("Router") slug = "router" panels = ('nexus1000v', ) default_panel = 'nexus1000v' permissions = ('openstack.roles.admin', ) if neutron.is_port_profiles_supported(): horizon.register(Router)