Пример #1
0
 def get_ios_build_plugin(self, request, plugin_dict):
     vm_plugin = VM_IOSBuildPlugin(plugin_dict)
     build_tool_xcode = CICommonControllPageWorker.get_xcode_buildtools_dropdown_list(self,
                                                                                      vm_plugin.build_tool_xcode)
     build_tool_pods = CICommonControllPageWorker.get_pods_buildtools_dropdown_list(self, vm_plugin.build_tool_pods)
     pagefileds = {'plugin': vm_plugin, "build_tool_xcode": build_tool_xcode, "build_tool_pods": build_tool_pods}
     return self.get_webpart(pagefileds, vm_plugin.get_template_path())
Пример #2
0
 def get_gradle_build_plugin(self, request, plugin_dict):
     vm_plugin = VM_GradleBuildPlugin(plugin_dict)
     build_tool_jdk = CICommonControllPageWorker.get_jdk_buildtools_dropdown_list(self, vm_plugin.build_tool_jdk)
     build_tool_gradle = CICommonControllPageWorker.get_gradle_buildtools_dropdown_list(self,
                                                                                        vm_plugin.build_tool_gradle)
     pagefileds = {'plugin': vm_plugin, "build_tool_jdk": build_tool_jdk}
     pagefileds['build_tool_gradle'] = build_tool_gradle
     return self.get_webpart(pagefileds, vm_plugin.get_template_path())
Пример #3
0
 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())
Пример #4
0
 def get_git_plugin(self, request, plugin_dict):
     vm_plugin = VM_GitPlugin(plugin_dict)
     ci_credentials_list = CICommonControllPageWorker.get_credential_dropdown_list(self, request,
                                                                                   vm_plugin.ci_credentials)
     git_check_out_strategy = CICommonControllPageWorker.get_git_checkut_strategy_dropdown_list(self,
                                                                                                vm_plugin.git_check_out_strategy)
     pagefileds = {'plugin': vm_plugin, "ci_credentials_list": ci_credentials_list}
     pagefileds['git_check_out_strategy'] = git_check_out_strategy
     return self.get_webpart(pagefileds, vm_plugin.get_template_path())
Пример #5
0
 def auto_webuitesting_plugin(self, request, plugin_dict):
     vm_plugin = VM_AutoWebUITestingPlugin(plugin_dict)
     print(plugin_dict)
     auto_tool_jdk = CICommonControllPageWorker.get_jdk_buildtools_dropdown_list(self, vm_plugin.auto_tool_jdk)
     auto_host_info = CICommonControllPageWorker.host_env_dropdown_list(self, vm_plugin.auto_host_info)
     case_tag_list = CICommonControllPageWorker.get_casetag_dropdown_list(self, vm_plugin.case_filters)
     pagefileds = {'plugin': vm_plugin, "auto_tool_jdk": auto_tool_jdk, "auto_host_info": auto_host_info,
                   'case_tag_list': case_tag_list}
     return self.get_webpart(pagefileds, vm_plugin.get_template_path())
Пример #6
0
 def history_clean_webpart(self, request, task_id):
     common_page_worker = CICommonControllPageWorker(request)
     ci_task = CITask.objects.get(int(task_id))
     task_parameter_groups = common_page_worker.task_parameter_dropdown_list(
         task_id)
     page_fileds = {
         "task_parameter_groups": task_parameter_groups,
         "ci_task": ci_task
     }
     return self.get_webpart(page_fileds, CITaskPath.history_clean_page)
Пример #7
0
 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)
Пример #8
0
 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)
Пример #9
0
 def get_ci_settings_servers_form_webpart(self, request, server_id):
     if server_id == 0:
         temp_server = CIServer()
         vm_server = VM_CIServer(temp_server, True, server_id)
     else:
         temp_server = CIServer.objects.get(server_id)
         vm_server = VM_CIServer(temp_server, False, 0)
     ci_server_credential = CICommonControllPageWorker.get_credential_dropdown_list(
         self, request, temp_server.Credential)
     page_fileds = {
         "ci_server": vm_server,
         "ci_server_credential": ci_server_credential
     }
     return self.get_webpart(page_fileds,
                             CISettingsPath.settings_server_form)
Пример #10
0
 def get_ci_settings_credentials_form_webpart(self, request, credential_id):
     if credential_id == 0:
         temp_credentials = CICredentials()
         vm_credential = VM_CICredential(temp_credentials, True,
                                         credential_id)
     else:
         temp_credentials = CICredentials.objects.get(credential_id)
         vm_credential = VM_CICredential(temp_credentials, False, 0)
     ci_credential_type = CICommonControllPageWorker.get_credential_type_dropdown_list(
         self, temp_credentials.CredentialType)
     page_fileds = {
         "ci_credential": vm_credential,
         "ci_credential_type": ci_credential_type
     }
     return self.get_webpart(page_fileds,
                             CISettingsPath.settings_credential_form)
Пример #11
0
 def get_dashboard_task_list_webpart(self, request):
     dm_ci_tasks = CITaskService.get_my_ci_tasks(request, 0, "all")
     task_list_controll = self.get_ci_task_list_controll(
         request, dm_ci_tasks, False)
     project_pageworker = ProjectPageWorker(request)
     project_filter = project_pageworker.get_project_menu(
         request, CICommonControllPath.project_filter_menu)
     ci_common_pageworker = CICommonControllPageWorker(request)
     task_tag_filter = ci_common_pageworker.get_ci_task_tag_menu()
     pagefileds = {
         "ci_task_listcontroll": task_list_controll,
         "project_filter": project_filter,
         "ci_task_page_title": "dashboard"
     }
     pagefileds['task_tag_filter'] = task_tag_filter
     return self.get_webpart(pagefileds, CITaskPath.task_list_webpart)
Пример #12
0
 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)
Пример #13
0
 def copy2_server_plugin(self, request, plugin_dict, task_id):
     vm_plugin = VM_Copy2ServerPlugin(plugin_dict)
     deploy_servers = CICommonControllPageWorker.get_deploy_server_dropdown_list(self, vm_plugin.deploy_server)
     pagefileds = {"deploy_servers": deploy_servers, 'plugin': vm_plugin}
     return self.get_webpart(pagefileds, vm_plugin.get_template_path())