def get_ci_task_config_basic(self, request, task_id): dm_ci_task = CITask.objects.get(task_id) vm_ci_task = VM_CITask(dm_ci_task, None, False, True) common_page_worker = CICommonControllPageWorker(request) deploy_services = common_page_worker.get_deploy_service_dropdown_list( dm_ci_task.DeployService) my_projects = ProjectCommonControllPageWorker.get_myproject_dropdown_list( self, request, dm_ci_task.Project) ci_agent_list = CICommonControllPageWorker.get_agent_asgin_dropdown_list( self, vm_ci_task.task_config.get_basic_section().get_asgin_agent()) ci_agent_filter_condations = CICommonControllPageWorker.get_agent_filter_dropdown_list( self, vm_ci_task.task_config.get_basic_section(). get_agent_filter_condations()) case_tag_list = CICommonControllPageWorker.get_casetag_dropdown_list( self, vm_ci_task.task_config.get_basic_section().get_case_filters()) pagefileds = { "ci_task_project": my_projects, "task": vm_ci_task, "ci_deploy_services": deploy_services } pagefileds["ci_agent_filter_condations"] = ci_agent_filter_condations pagefileds['basic_section'] = vm_ci_task.task_config.get_basic_section( ) pagefileds['ci_agent_list'] = ci_agent_list pagefileds['case_tag_list'] = case_tag_list return self.get_webpart(pagefileds, CITaskPath.task_config_basic)
def get_deploy_service_plugin(self, request, plugin_dict, task_id): # replace_config=self.get_service_replace_config(request,task_id) # vm_plugin = VM_DeployServicePlugin(None, plugin_dict) vm_plugin = None deploy_servers = CICommonControllPageWorker.get_deploy_server_dropdown_list(self, vm_plugin.deploy_server) deploy_services = CICommonControllPageWorker.get_deploy_service_dropdown_list(self, vm_plugin.deploy_service) pagefileds = {'plugin': vm_plugin, "deploy_servers": deploy_servers, 'deploy_services': deploy_services} return self.get_webpart(pagefileds, vm_plugin.get_template_path())
def get_task_create_form(self, request): my_projects = ProjectCommonControllPageWorker.get_myproject_dropdown_list( self, request, 0) common_page_worker = CICommonControllPageWorker(request) deploy_services = common_page_worker.get_deploy_service_dropdown_list( 0) ci_my_all_tasks = common_page_worker.my_ci_task_dropdown_list() pagefileds = { "ci_task_project": my_projects, "ci_deploy_services": deploy_services, "ci_my_all_tasks": ci_my_all_tasks } return self.get_webpart(pagefileds, CITaskPath.task_create_form)