From 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 17 Dec 2020 11:59:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-7-stable-ee --- .../pipelines/components/graph/accessors.js | 25 ++ .../components/graph/action_component.vue | 4 +- .../pipelines/components/graph/constants.js | 3 + .../pipelines/components/graph/graph_component.vue | 270 +++++---------------- .../components/graph/graph_component_legacy.vue | 265 ++++++++++++++++++++ .../components/graph/graph_component_wrapper.vue | 106 ++++++++ .../components/graph/job_group_dropdown.vue | 19 +- .../pipelines/components/graph/job_item.vue | 32 ++- .../components/graph/job_name_component.vue | 12 +- .../pipelines/components/graph/linked_pipeline.vue | 70 ++++-- .../components/graph/linked_pipelines_column.vue | 139 ++++++++--- .../graph/linked_pipelines_column_legacy.vue | 87 +++++++ .../components/graph/stage_column_component.vue | 118 +++++---- .../graph/stage_column_component_legacy.vue | 108 +++++++++ .../pipelines/components/graph/utils.js | 57 +++++ .../graph_shared/linked_graph_wrapper.vue | 7 + .../components/graph_shared/main_graph_wrapper.vue | 32 +++ .../pipelines/components/header_component.vue | 1 + .../components/pipeline_graph/drawing_utils.js | 10 +- .../gitlab_ci_yaml_visualization.vue | 76 ------ .../components/pipeline_graph/job_pill.vue | 8 +- .../components/pipeline_graph/pipeline_graph.vue | 109 ++++++--- .../components/pipelines_list/empty_state.vue | 13 +- .../components/pipelines_list/pipeline_url.vue | 43 ++-- .../components/pipelines_list/pipelines.vue | 4 +- .../pipelines_list/pipelines_actions.vue | 2 +- .../components/pipelines_list/time_ago.vue | 4 +- .../components/test_reports/test_suite_table.vue | 26 +- .../pipelines/components/unwrapping_utils.js | 53 ++++ 29 files changed, 1208 insertions(+), 495 deletions(-) create mode 100644 app/assets/javascripts/pipelines/components/graph/accessors.js create mode 100644 app/assets/javascripts/pipelines/components/graph/graph_component_legacy.vue create mode 100644 app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue create mode 100644 app/assets/javascripts/pipelines/components/graph/linked_pipelines_column_legacy.vue create mode 100644 app/assets/javascripts/pipelines/components/graph/stage_column_component_legacy.vue create mode 100644 app/assets/javascripts/pipelines/components/graph/utils.js create mode 100644 app/assets/javascripts/pipelines/components/graph_shared/linked_graph_wrapper.vue create mode 100644 app/assets/javascripts/pipelines/components/graph_shared/main_graph_wrapper.vue delete mode 100644 app/assets/javascripts/pipelines/components/pipeline_graph/gitlab_ci_yaml_visualization.vue create mode 100644 app/assets/javascripts/pipelines/components/unwrapping_utils.js (limited to 'app/assets/javascripts/pipelines/components') diff --git a/app/assets/javascripts/pipelines/components/graph/accessors.js b/app/assets/javascripts/pipelines/components/graph/accessors.js new file mode 100644 index 00000000000..6ece855bcd8 --- /dev/null +++ b/app/assets/javascripts/pipelines/components/graph/accessors.js @@ -0,0 +1,25 @@ +import { get } from 'lodash'; +import { REST, GRAPHQL } from './constants'; + +const accessors = { + [REST]: { + detailsPath: 'details_path', + groupId: 'id', + hasDetails: 'has_details', + pipelineStatus: ['details', 'status'], + sourceJob: ['source_job', 'name'], + }, + [GRAPHQL]: { + detailsPath: 'detailsPath', + groupId: 'name', + hasDetails: 'hasDetails', + pipelineStatus: 'status', + sourceJob: ['sourceJob', 'name'], + }, +}; + +const accessValue = (dataMethod, prop, item) => { + return get(item, accessors[dataMethod][prop]); +}; + +export { accessors, accessValue }; diff --git a/app/assets/javascripts/pipelines/components/graph/action_component.vue b/app/assets/javascripts/pipelines/components/graph/action_component.vue index a580ee11627..4e9b21a5c55 100644 --- a/app/assets/javascripts/pipelines/components/graph/action_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/action_component.vue @@ -87,10 +87,10 @@ export default { :title="tooltipText" :class="cssClass" :disabled="isDisabled" - class="js-ci-action ci-action-icon-container ci-action-icon-wrapper gl-display-flex gl-align-items-center gl-justify-content-center" + class="js-ci-action gl-ci-action-icon-container ci-action-icon-container ci-action-icon-wrapper gl-display-flex gl-align-items-center gl-justify-content-center" @click.stop="onClickAction" > - + diff --git a/app/assets/javascripts/pipelines/components/graph/constants.js b/app/assets/javascripts/pipelines/components/graph/constants.js index ba1922b6dae..6f0deccfef6 100644 --- a/app/assets/javascripts/pipelines/components/graph/constants.js +++ b/app/assets/javascripts/pipelines/components/graph/constants.js @@ -1,3 +1,6 @@ export const DOWNSTREAM = 'downstream'; export const MAIN = 'main'; export const UPSTREAM = 'upstream'; + +export const REST = 'rest'; +export const GRAPHQL = 'graphql'; diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index 16ce279a591..67b2ed3b596 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -1,35 +1,23 @@ diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component_legacy.vue b/app/assets/javascripts/pipelines/components/graph/graph_component_legacy.vue new file mode 100644 index 00000000000..9ca4dc1e27a --- /dev/null +++ b/app/assets/javascripts/pipelines/components/graph/graph_component_legacy.vue @@ -0,0 +1,265 @@ + + diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue b/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue new file mode 100644 index 00000000000..d98e3aad054 --- /dev/null +++ b/app/assets/javascripts/pipelines/components/graph/graph_component_wrapper.vue @@ -0,0 +1,106 @@ + + diff --git a/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue b/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue index 49591a80752..203d6a12edd 100644 --- a/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue +++ b/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue @@ -44,17 +44,18 @@ export default { type="button" data-toggle="dropdown" data-display="static" - class="dropdown-menu-toggle build-content" + class="dropdown-menu-toggle build-content gl-build-content" > - +
+ + + + {{ group.name }} + + - - {{ group.name }} - - - {{ group.size }} + {{ group.size }} +