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_ci_settings_agent_create_form(self, agent_id): if str(agent_id) == "0": temp_agent = Agent() vm_agent = VM_CIAgent(temp_agent, agent_id) else: temp_agent = Agent.objects.get(agent_id) vm_agent = VM_CIAgent(temp_agent, agent_id) os_dropdown_list = ProjectCommonControllPageWorker.get_issue_field_dropdown_list( self, ProjectOS, temp_agent.OS) agent_tag_list = CICommonControllPageWorker.get_agent_filter_dropdown_list( self, temp_agent.AgentTags) page_fileds = { "agent": vm_agent, 'os_dropdown_list': os_dropdown_list, 'agent_tag_list': agent_tag_list } return self.get_webpart(page_fileds, CISettingsPath.settings_agent_create_form)