def test_create_dashboard_multi_ds(self, mock_get_dashboard_name): """ Test the creation of dashboards with filtered data sources """ mock_get_dashboard_name.return_value = '' config = Config(CONF_FILE) task = TaskPanels(config) task.execute()
def get_panels(config): """Execute the panels phase :param config: a Mordred config object """ task = TaskPanels(config) task.execute() task = TaskPanelsMenu(config) task.execute() logging.info("Panels creation finished!")
def main(): """This script allows to upload the dashboards in use in the setup.cfg and the top menu. It relies on the TaskPanels and TaskPanelsMenu classes. Examples: Upload dashboards and menu: panels_config --cfg ./setup.cfg --dashboards --menu Upload only the dashboards: panels_config --cfg ./setup.cfg --dashboards Upload only the top menu: panels_config --cfg ./setup.cfg --menu """ args = get_params() config = Config(args.cfg_path) upload_dashboards = args.dashboards upload_menu = args.menu if upload_dashboards: task = TaskPanels(config) task.execute() if upload_menu: task = TaskPanelsMenu(config) task.execute()