コード例 #1
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)
コード例 #2
0
 def get_ci_tasks(self, request, all_tasks, show_tag, is_full_part):
     task_list = list()
     for dm_task in all_tasks:
         tag_menu = self.get_task_tag_menu(dm_task, "ci-task-tag-inline", 1)
         parameter_group_menu = self.get_task_parameter_menu(dm_task.id)
         tmp_task = VM_CITask(dm_task, tag_menu, show_tag, is_full_part,
                              parameter_group_menu)
         task_list.append(tmp_task)
     return task_list
コード例 #3
0
 def get_ci_task_history_webpart(self, request, task_id):
     task_history_list_controll = self.get_ci_task_history_list(task_id)
     dm_ci_task = CITask.objects.get(int(task_id))
     vm_ci_task = VM_CITask(dm_ci_task, None, True, True)
     pagefileds = {
         "ci_task_history_list": task_history_list_controll,
         "ci_task": vm_ci_task
     }
     return self.get_webpart(pagefileds, CITaskPath.task_history_page)
コード例 #4
0
 def task_changelog_webpart(self, request, task_id):
     task_changelog_list = self.task_changelog_list(task_id)
     dm_ci_task = CITask.objects.get(int(task_id))
     vm_ci_task = VM_CITask(dm_ci_task, None, True, True)
     pagefileds = {
         "task_changelog_list": task_changelog_list,
         "ci_task": vm_ci_task
     }
     return self.get_webpart(pagefileds, CITaskPath.task_changelog_page)
コード例 #5
0
 def get_ci_task_parameter_webpart(self, request, task_id):
     task_parameter_list_controll = self.get_ci_task_parameter_list(task_id)
     dm_ci_task = CITask.objects.get(int(task_id))
     vm_ci_task = VM_CITask(dm_ci_task, None, True, True)
     task_parameter_group_type_menu = self.task_parameter_group_type_menu(
         task_id)
     pagefileds = {
         "task_parameter_group_list": task_parameter_list_controll,
         "ci_task": vm_ci_task
     }
     pagefileds[
         "task_parameter_group_type_menu"] = task_parameter_group_type_menu
     return self.get_webpart(pagefileds, CITaskPath.task_parameter_page)
コード例 #6
0
 def get_task_config_webpart(self, request, task_id):
     dm_ci_task = CITask.objects.get(task_id)
     vm_ci_task = VM_CITask(dm_ci_task, None, True, True)
     task_plugin_menus = self.get_task_plugin_menu(request,
                                                   dm_ci_task.TaskType)
     section_page_worker = CISectionPageWorker(request)
     post_section_plugins = section_page_worker.get_section_webpart(
         vm_ci_task.task_config.get_post_section(), task_id)
     build_section_plugins = section_page_worker.get_section_webpart(
         vm_ci_task.task_config.get_build_section(), task_id)
     scm_section_plugins = section_page_worker.get_section_webpart(
         vm_ci_task.task_config.get_scm_section(), task_id)
     pre_section_plugins = section_page_worker.get_section_webpart(
         vm_ci_task.task_config.get_pre_section(), task_id)
     pagefileds = {"task": vm_ci_task}
     pagefileds = dict(pagefileds, **task_plugin_menus)
     pagefileds['post_section_plugins'] = post_section_plugins
     pagefileds['build_section_plugins'] = build_section_plugins
     pagefileds['scm_section_plugins'] = scm_section_plugins
     pagefileds['pre_section_plugins'] = pre_section_plugins
     return self.get_webpart(pagefileds, CITaskPath.task_config_webpart)
コード例 #7
0
 def get_task_sub_navbar(self,
                         request,
                         dm_products,
                         sub_nav_action,
                         task_id=0,
                         task_property=None):
     if sub_nav_action:
         result = self.get_sub_nav_bar(request,
                                       self.subpage_model,
                                       CITaskPath.sub_nav_template_path,
                                       sub_nav_action=sub_nav_action,
                                       products=dm_products)
     else:
         dm_ci_task = CITask.objects.get(task_id)
         vm_ci_task = VM_CITask(dm_ci_task, None, False, True)
         result = self.get_property_nav_bar(
             request,
             self.task_property_model,
             CITaskPath.testing_property_nav,
             property_nav_action=task_property,
             ci_task=vm_ci_task)
     return result