當前位置: 首頁>>代碼示例>>Python>>正文


Python dashboard.Dogs類代碼示例

本文整理匯總了Python中horizon.test.test_dashboards.dogs.dashboard.Dogs的典型用法代碼示例。如果您正苦於以下問題:Python Dogs類的具體用法?Python Dogs怎麽用?Python Dogs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Dogs類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: tearDown

 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()
開發者ID:infraredgirl,項目名稱:horizon,代碼行數:12,代碼來源:base.py

示例2: setUp

 def setUp(self):
     super(BaseHorizonTests, self).setUp()
     # Adjust our horizon config and register our custom dashboards/panels.
     self.old_default_dash = settings.HORIZON_CONFIG['default_dashboard']
     settings.HORIZON_CONFIG['default_dashboard'] = 'cats'
     self.old_dashboards = settings.HORIZON_CONFIG['dashboards']
     settings.HORIZON_CONFIG['dashboards'] = ('cats', 'dogs')
     base.Horizon.register(Cats)
     base.Horizon.register(Dogs)
     Cats.register(Kittens)
     Cats.register(Tigers)
     Dogs.register(Puppies)
     # Trigger discovery, registration, and URLconf generation if it
     # hasn't happened yet.
     base.Horizon._urls()
     # Store our original dashboards
     self._discovered_dashboards = list(base.Horizon._registry)
     # Gather up and store our original panels for each dashboard
     self._discovered_panels = {}
     for dash in self._discovered_dashboards:
         panels = list(base.Horizon._registry[dash]._registry)
         self._discovered_panels[dash] = panels
開發者ID:infraredgirl,項目名稱:horizon,代碼行數:22,代碼來源:base.py

示例3: setUp

 def setUp(self):
     super(RbacHorizonTests, self).setUp()
     # Adjust our horizon config and register our custom dashboards/panels.
     self.old_default_dash = settings.HORIZON_CONFIG['default_dashboard']
     settings.HORIZON_CONFIG['default_dashboard'] = 'cats'
     self.old_dashboards = settings.HORIZON_CONFIG['dashboards']
     settings.HORIZON_CONFIG['dashboards'] = ('cats', 'dogs')
     base.Horizon.register(Cats)
     base.Horizon.register(Dogs)
     Cats.register(RbacNoAccessPanel)
     Cats.default_panel = 'rbac_panel_no'
     Dogs.register(RbacYesAccessPanel)
     Dogs.default_panel = 'rbac_panel_yes'
     # Trigger discovery, registration, and URLconf generation if it
     # hasn't happened yet.
     base.Horizon._urls()
     # Store our original dashboards
     self._discovered_dashboards = base.Horizon._registry.keys()
     # Gather up and store our original panels for each dashboard
     self._discovered_panels = {}
     for dash in self._discovered_dashboards:
         panels = base.Horizon._registry[dash]._registry.keys()
         self._discovered_panels[dash] = panels
開發者ID:akamat-ibm,項目名稱:Autoport,代碼行數:23,代碼來源:base.py


注:本文中的horizon.test.test_dashboards.dogs.dashboard.Dogs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。