mirror of
https://github.com/ceph/ceph
synced 2024-12-14 23:46:28 +00:00
6ac9b3cfe1
Show "No RBD pools available" error page when accessing block/rbd if there are no rbd pools. Add a "button_name" and "button_route" property to `ModuleStatusGuardService` config to customize the button on the error page. Modify `ModuleStatusGuardService` to execute API calls to `/ui-api/<uiApiPath>/status` which uses the `UIRouter`. Fixes: https://tracker.ceph.com/issues/42109 Signed-off-by: Melissa Li <melissali@redhat.com>
28 lines
702 B
Python
28 lines
702 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import absolute_import
|
|
|
|
from .helper import DashboardTestCase
|
|
|
|
|
|
class OrchestratorControllerTest(DashboardTestCase):
|
|
|
|
AUTH_ROLES = ['cluster-manager']
|
|
|
|
URL_STATUS = '/ui-api/orchestrator/status'
|
|
|
|
ORCHESTRATOR = True
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
super(OrchestratorControllerTest, cls).setUpClass()
|
|
|
|
@classmethod
|
|
def tearDownClass(cls):
|
|
cmd = ['test_orchestrator', 'load_data', '-i', '-']
|
|
cls.mgr_cluster.mon_manager.raw_cluster_cmd_result(*cmd, stdin='{}')
|
|
|
|
def test_status_get(self):
|
|
data = self._get(self.URL_STATUS)
|
|
self.assertStatus(200)
|
|
self.assertTrue(data['available'])
|