Skip to content

Add job template list view in job assistant drawer

Kun Qian请求将add-template-list-in-job-assistant合并到main-jh

What does this MR do and why?

closes #3311 , part of https://jihulab.com/groups/gitlab-cn/-/epics/5446

jh/app/assets/javascripts/ci/pipeline_editor/components/job_assistant_drawer/job_assistant_drawer.vue is just copied from /app/assets/javascripts/ci/pipeline_editor/components/job_assistant_drawer/job_assistant_drawer.vue and add job template list view in its drawer.

Screenshots or screen recordings

Recording for some edge cases

  1. Enter job template list -> waiting for api return -> no job template get from api.

QQ20230803-095053-HD__1_

  1. Enter job template list -> waiting for api return -> click blank template while requesting -> reopen drawer after request done

QQ20230803-094828-HD__1_

How to set up and validate locally

  1. Apply this patch
Index: app/assets/javascripts/ci/pipeline_editor/pipeline_editor_home.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_home.vue b/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_home.vue
--- a/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_home.vue	(revision 4bce1d86dcfefb3e981dd0948cea3a475a620edb)
+++ b/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_home.vue	(date 1691594720001)
@@ -3,9 +3,9 @@
 import { __ } from '~/locale';
 import { DRAWER_Z_INDEX } from '~/lib/utils/constants';
 import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
+import JobAssistantDrawer from 'jh_else_ce/ci/pipeline_editor/components/job_assistant_drawer/job_assistant_drawer.vue';
 import CommitSection from './components/commit/commit_section.vue';
 import PipelineEditorDrawer from './components/drawer/pipeline_editor_drawer.vue';
-import JobAssistantDrawer from './components/job_assistant_drawer/job_assistant_drawer.vue';
 import PipelineEditorFileNav from './components/file_nav/pipeline_editor_file_nav.vue';
 import PipelineEditorFileTree from './components/file_tree/container.vue';
 import PipelineEditorHeader from './components/header/pipeline_editor_header.vue';
  1. Apply changes from !1912 (closed)
  2. In rails console enable the experiment fully
    Feature.enable(:ci_job_assistant_drawer)
    Feature.enable(:job_template)
  3. Visit any project page
  4. Click the job assistant drawer.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Kun Qian 编辑于

合并请求报告

加载中