From d409d12963ae433979c54a8ba54f3a1dd4455e52 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 17 Jan 2022 18:16:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../work_items_hierarchy/components/app.vue | 96 -------------- .../work_items_hierarchy/components/hierarchy.vue | 119 ----------------- .../javascripts/work_items_hierarchy/constants.js | 12 -- .../work_items_hierarchy/hierarchy_util.js | 10 -- .../work_items_hierarchy/static_response.js | 142 --------------------- .../work_items_hierarchy_bundle.js | 26 ---- 6 files changed, 405 deletions(-) delete mode 100644 app/assets/javascripts/work_items_hierarchy/components/app.vue delete mode 100644 app/assets/javascripts/work_items_hierarchy/components/hierarchy.vue delete mode 100644 app/assets/javascripts/work_items_hierarchy/constants.js delete mode 100644 app/assets/javascripts/work_items_hierarchy/hierarchy_util.js delete mode 100644 app/assets/javascripts/work_items_hierarchy/static_response.js delete mode 100644 app/assets/javascripts/work_items_hierarchy/work_items_hierarchy_bundle.js (limited to 'app/assets/javascripts/work_items_hierarchy') diff --git a/app/assets/javascripts/work_items_hierarchy/components/app.vue b/app/assets/javascripts/work_items_hierarchy/components/app.vue deleted file mode 100644 index ef8632df3be..00000000000 --- a/app/assets/javascripts/work_items_hierarchy/components/app.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/app/assets/javascripts/work_items_hierarchy/components/hierarchy.vue b/app/assets/javascripts/work_items_hierarchy/components/hierarchy.vue deleted file mode 100644 index 9b81218b6e4..00000000000 --- a/app/assets/javascripts/work_items_hierarchy/components/hierarchy.vue +++ /dev/null @@ -1,119 +0,0 @@ - - diff --git a/app/assets/javascripts/work_items_hierarchy/constants.js b/app/assets/javascripts/work_items_hierarchy/constants.js deleted file mode 100644 index f001f556c0e..00000000000 --- a/app/assets/javascripts/work_items_hierarchy/constants.js +++ /dev/null @@ -1,12 +0,0 @@ -export const WORK_ITEMS_SURVEY_COOKIE_NAME = 'hide_work_items_hierarchy_survey'; - -/** - * Hard-coded strings since we're rendering hierarchy - * items from mock responses. Remove this when we - * have a real hierarchy endpoint. - */ -export const LICENSE_PLAN = { - FREE: 'free', - PREMIUM: 'premium', - ULTIMATE: 'ultimate', -}; diff --git a/app/assets/javascripts/work_items_hierarchy/hierarchy_util.js b/app/assets/javascripts/work_items_hierarchy/hierarchy_util.js deleted file mode 100644 index 61d93acdb91..00000000000 --- a/app/assets/javascripts/work_items_hierarchy/hierarchy_util.js +++ /dev/null @@ -1,10 +0,0 @@ -import { LICENSE_PLAN } from './constants'; - -export function inferLicensePlan({ hasSubEpics, hasEpics }) { - if (hasSubEpics) { - return LICENSE_PLAN.ULTIMATE; - } else if (hasEpics) { - return LICENSE_PLAN.PREMIUM; - } - return LICENSE_PLAN.FREE; -} diff --git a/app/assets/javascripts/work_items_hierarchy/static_response.js b/app/assets/javascripts/work_items_hierarchy/static_response.js deleted file mode 100644 index d1e2e486082..00000000000 --- a/app/assets/javascripts/work_items_hierarchy/static_response.js +++ /dev/null @@ -1,142 +0,0 @@ -const FREE_TIER = 'free'; -const ULTIMATE_TIER = 'ultimate'; -const PREMIUM_TIER = 'premium'; - -const RESPONSE = { - [FREE_TIER]: [ - { - id: '1', - type: 'ISSUE', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '2', - type: 'TASK', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '3', - type: 'INCIDENT', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '4', - type: 'EPIC', - available: false, - license: 'Premium', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - { - id: '5', - type: 'SUB_EPIC', - available: false, - license: 'Ultimate', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - { - id: '6', - type: 'REQUIREMENT', - available: false, - license: 'Ultimate', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - { - id: '7', - type: 'TEST_CASE', - available: false, - license: 'Ultimate', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - ], - - [PREMIUM_TIER]: [ - { - id: '1', - type: 'EPIC', - available: true, - license: null, - nestedTypes: ['ISSUE'], - }, - { - id: '2', - type: 'TASK', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '3', - type: 'INCIDENT', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '5', - type: 'SUB_EPIC', - available: false, - license: 'Ultimate', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - { - id: '6', - type: 'REQUIREMENT', - available: false, - license: 'Ultimate', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - { - id: '7', - type: 'TEST_CASE', - available: false, - license: 'Ultimate', // eslint-disable-line @gitlab/require-i18n-strings - nestedTypes: null, - }, - ], - - [ULTIMATE_TIER]: [ - { - id: '1', - type: 'EPIC', - available: true, - license: null, - nestedTypes: ['SUB_EPIC', 'ISSUE'], - }, - { - id: '2', - type: 'TASK', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '3', - type: 'INCIDENT', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '6', - type: 'REQUIREMENT', - available: true, - license: null, - nestedTypes: null, - }, - { - id: '7', - type: 'TEST_CASE', - available: true, - license: null, - nestedTypes: null, - }, - ], -}; - -export default RESPONSE; diff --git a/app/assets/javascripts/work_items_hierarchy/work_items_hierarchy_bundle.js b/app/assets/javascripts/work_items_hierarchy/work_items_hierarchy_bundle.js deleted file mode 100644 index 2258c725301..00000000000 --- a/app/assets/javascripts/work_items_hierarchy/work_items_hierarchy_bundle.js +++ /dev/null @@ -1,26 +0,0 @@ -import Vue from 'vue'; -import { parseBoolean } from '~/lib/utils/common_utils'; -import App from './components/app.vue'; -import { inferLicensePlan } from './hierarchy_util'; - -export const initWorkItemsHierarchy = () => { - const el = document.querySelector('#js-work-items-hierarchy'); - - const { illustrationPath, hasEpics, hasSubEpics } = el.dataset; - - const licensePlan = inferLicensePlan({ - hasEpics: parseBoolean(hasEpics), - hasSubEpics: parseBoolean(hasSubEpics), - }); - - return new Vue({ - el, - provide: { - illustrationPath, - licensePlan, - }, - render(createElement) { - return createElement(App); - }, - }); -}; -- cgit v1.2.1