...@@ -10,7 +10,6 @@ plugins: ...@@ -10,7 +10,6 @@ plugins:
- import - import
- "@gitlab/i18n" - "@gitlab/i18n"
- "@gitlab/vue-i18n" - "@gitlab/vue-i18n"
- no-jquery
settings: settings:
import/resolver: import/resolver:
webpack: webpack:
...@@ -37,11 +36,6 @@ rules: ...@@ -37,11 +36,6 @@ rules:
vue/no-use-v-if-with-v-for: off vue/no-use-v-if-with-v-for: off
vue/no-v-html: off vue/no-v-html: off
vue/use-v-on-exact: off vue/use-v-on-exact: off
no-jquery/no-ajax: error
no-jquery/no-ajax-events: error
no-jquery/no-load: error
no-jquery/no-load-shorthand: error
no-jquery/no-serialize: error
overrides: overrides:
files: files:
- '**/spec/**/*' - '**/spec/**/*'
... ...
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
- rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here
only: only:
variables: variables:
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ # Matches the gitlab-org group and its subgroups - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
- $CI_SERVER_HOST == "dev.gitlab.org" - $CI_SERVER_HOST == "dev.gitlab.org"
tags: tags:
- gitlab-org - gitlab-org
... ...
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
- master - master
- /^[\d-]+-stable(-ee)?$/ - /^[\d-]+-stable(-ee)?$/
- /^\d+-\d+-auto-deploy-\d+$/ - /^\d+-\d+-auto-deploy-\d+$/
- /^security\//
- merge_requests - merge_requests
- tags - tags
...@@ -103,7 +102,7 @@ ...@@ -103,7 +102,7 @@
refs: refs:
- schedules - schedules
variables: variables:
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" - $REVIEW_APP_CLEANUP && $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
kubernetes: active kubernetes: active
.use-pg: .use-pg:
... ...
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- ./scripts/trigger-build omnibus - ./scripts/trigger-build omnibus
only: only:
variables: variables:
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ # Matches the gitlab-org group or its subgroups - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
package-and-qa-manual: package-and-qa-manual:
extends: extends:
... ...
......
...@@ -44,8 +44,6 @@ code_quality: ...@@ -44,8 +44,6 @@ code_quality:
# We need to duplicate this job's definition because it seems it's impossible to # We need to duplicate this job's definition because it seems it's impossible to
# override an included `only.refs`. # override an included `only.refs`.
# See https://gitlab.com/gitlab-org/gitlab/issues/31371. # See https://gitlab.com/gitlab-org/gitlab/issues/31371.
# Once https://gitlab.com/gitlab-org/gitlab/merge_requests/16487 will be deployed
# to GitLab.com, we should be able to use the template and set SAST_DISABLE_DIND: "true".
sast: sast:
extends: extends:
- .default-retry - .default-retry
... ...
......
.review-base:
extends:
- .default-tags
- .default-retry
- .default-only
- .only-review
- .only-code-qa-changes
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
dependencies: []
before_script:
- source scripts/utils.sh
.review-docker: .review-docker:
extends: extends:
- .default-tags - .default-tags
...@@ -29,25 +41,6 @@ build-qa-image: ...@@ -29,25 +41,6 @@ build-qa-image:
- echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY} - echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY}
- time docker push ${QA_IMAGE} - time docker push ${QA_IMAGE}
schedule:review-cleanup:
extends:
- .default-tags
- .default-retry
- .default-only
- .only-code-qa-changes
- .only-review-schedules
stage: prepare
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
allow_failure: true
environment:
name: review/auto-cleanup
action: stop
before_script:
- source scripts/utils.sh
- install_gitlab_gem
script:
- ruby -rrubygems scripts/review_apps/automated_cleanup.rb
.review-build-cng-base: .review-build-cng-base:
extends: extends:
- .default-only - .default-only
...@@ -75,15 +68,9 @@ schedule:review-build-cng: ...@@ -75,15 +68,9 @@ schedule:review-build-cng:
needs: ["gitlab:assets:compile"] needs: ["gitlab:assets:compile"]
.review-deploy-base: .review-deploy-base:
extends: extends: .review-base
- .default-tags
- .default-retry
- .default-only
- .only-code-qa-changes
stage: review
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
dependencies: []
allow_failure: true allow_failure: true
stage: review
variables: variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}" HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}" DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
...@@ -118,7 +105,6 @@ schedule:review-build-cng: ...@@ -118,7 +105,6 @@ schedule:review-build-cng:
review-deploy: review-deploy:
extends: extends:
- .review-deploy-base - .review-deploy-base
- .only-review
needs: ["review-build-cng"] needs: ["review-build-cng"]
schedule:review-deploy: schedule:review-deploy:
...@@ -162,7 +148,6 @@ review-cleanup-failed-deployment: ...@@ -162,7 +148,6 @@ review-cleanup-failed-deployment:
- .only-review - .only-review
- .only-code-qa-changes - .only-code-qa-changes
stage: qa stage: qa
allow_failure: true
variables: variables:
QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa" QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa"
QA_CAN_TEST_GIT_PROTOCOL_V2: "false" QA_CAN_TEST_GIT_PROTOCOL_V2: "false"
...@@ -191,11 +176,13 @@ review-cleanup-failed-deployment: ...@@ -191,11 +176,13 @@ review-cleanup-failed-deployment:
review-qa-smoke: review-qa-smoke:
extends: .review-qa-base extends: .review-qa-base
allow_failure: true
script: script:
- gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" - gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}"
review-qa-all: review-qa-all:
extends: .review-qa-base extends: .review-qa-base
allow_failure: true
when: manual when: manual
parallel: 5 parallel: 5
script: script:
...@@ -203,32 +190,39 @@ review-qa-all: ...@@ -203,32 +190,39 @@ review-qa-all:
- export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb - export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb
- gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation
.review-performance-base: parallel-spec-reports:
extends: extends:
- .review-docker - .default-tags
- .default-only
- .only-code-qa-changes - .only-code-qa-changes
stage: qa - .only-review
image: ruby:2.6-alpine
stage: post-test
dependencies: ["review-qa-all"]
variables:
NEW_PARALLEL_SPECS_REPORT: qa/report-new.html
BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
allow_failure: true allow_failure: true
before_script: when: manual
- export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
- echo "${CI_ENVIRONMENT_URL}"
- mkdir -p gitlab-exporter
- wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js
- mkdir -p sitespeed-results
script:
- docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}"
after_script:
- mv sitespeed-results/data/performance.json performance.json
artifacts: artifacts:
when: always
paths: paths:
- sitespeed-results/ - qa/report-new.html
- qa/gitlab-qa-run-*
reports: reports:
performance: performance.json junit: qa/gitlab-qa-run-*/**/rspec-*.xml
script:
- apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/*
- gem install nokogiri --no-document
- cd qa/gitlab-qa-run-*/gitlab-*
- ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
- cd -
- '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}'
- scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
review-performance: review-performance:
extends: extends: .review-qa-base
- .review-performance-base allow_failure: true
- .only-review
before_script: before_script:
- export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)" - export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
- echo "${CI_ENVIRONMENT_URL}" - echo "${CI_ENVIRONMENT_URL}"
...@@ -247,39 +241,24 @@ review-performance: ...@@ -247,39 +241,24 @@ review-performance:
schedule:review-performance: schedule:review-performance:
extends: extends:
- .review-performance-base - review-performance
- .only-review-schedules - .only-review-schedules
dependencies: ["schedule:review-deploy"] dependencies: ["schedule:review-deploy"]
parallel-spec-reports: schedule:review-cleanup:
extends: extends:
- .default-tags - .review-base
- .default-only - .only-review-schedules
- .only-code-qa-changes stage: prepare
- .only-review
image: ruby:2.6-alpine
stage: post-test
dependencies: ["review-qa-all"]
variables:
NEW_PARALLEL_SPECS_REPORT: qa/report-new.html
BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
allow_failure: true allow_failure: true
when: manual environment:
artifacts: name: review/auto-cleanup
when: always action: stop
paths: before_script:
- qa/report-new.html - source scripts/utils.sh
- qa/gitlab-qa-run-* - install_gitlab_gem
reports:
junit: qa/gitlab-qa-run-*/**/rspec-*.xml
script: script:
- apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/* - ruby -rrubygems scripts/review_apps/automated_cleanup.rb
- gem install nokogiri --no-document
- cd qa/gitlab-qa-run-*/gitlab-*
- ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
- cd -
- '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}'
- scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
danger-review: danger-review:
extends: extends:
... ...
......
...@@ -25,7 +25,7 @@ Then leave running while monitoring and performing some testing through web, api ...@@ -25,7 +25,7 @@ Then leave running while monitoring and performing some testing through web, api
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net) - [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana) - [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlab.net/gitlab/devgitlaborg/?query=is%3Aunresolved) - [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlap.com/gitlab/devgitlaborg/?query=is%3Aunresolved)
## 2. Staging Trial ## 2. Staging Trial
...@@ -41,7 +41,7 @@ Then leave running while monitoring for at least **15 minutes** while performing ...@@ -41,7 +41,7 @@ Then leave running while monitoring for at least **15 minutes** while performing
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net) - [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana) - [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved) - [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 4. Production Server Version Check ## 4. Production Server Version Check
...@@ -57,7 +57,7 @@ Then leave running while monitoring for at least **15 minutes** while performing ...@@ -57,7 +57,7 @@ Then leave running while monitoring for at least **15 minutes** while performing
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net) - [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana) - [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved) - [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 6. Low Impact Check ## 6. Low Impact Check
...@@ -69,7 +69,7 @@ Then leave running while monitoring for at least **30 minutes** while performing ...@@ -69,7 +69,7 @@ Then leave running while monitoring for at least **30 minutes** while performing
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net) - [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana) - [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved) - [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 7. Mid Impact Trial ## 7. Mid Impact Trial
...@@ -81,7 +81,7 @@ Then leave running while monitoring for at least **12 hours** while performing s ...@@ -81,7 +81,7 @@ Then leave running while monitoring for at least **12 hours** while performing s
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net) - [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana) - [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved) - [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 8. Full Impact Trial ## 8. Full Impact Trial
...@@ -93,7 +93,7 @@ Then leave running while monitoring for at least **1 week**. ...@@ -93,7 +93,7 @@ Then leave running while monitoring for at least **1 week**.
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net) - [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana) - [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlab.net/gitlab/devgitlaborg/?query=is%3Aunresolved) - [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlap.com/gitlab/devgitlaborg/?query=is%3Aunresolved)
#### Success? #### Success?
... ...
......
...@@ -252,10 +252,6 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -252,10 +252,6 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix alignment of activity dropdown in epic tabs; add counter to discussion tab. - Fix alignment of activity dropdown in epic tabs; add counter to discussion tab.
## 12.1.10
- No changes.
## 12.1.5 ## 12.1.5
- No changes. - No changes.
... ...
......
...@@ -320,10 +320,6 @@ entry. ...@@ -320,10 +320,6 @@ entry.
- Update Packer.gitlab-ci.yml to use latest image. (Kelly Hair) - Update Packer.gitlab-ci.yml to use latest image. (Kelly Hair)
   
   
## 12.1.10
- No changes.
## 12.1.5 ## 12.1.5
   
### Security (2 changes) ### Security (2 changes)
... ...
......
...@@ -148,7 +148,7 @@ gem 'wikicloth', '0.8.1' ...@@ -148,7 +148,7 @@ gem 'wikicloth', '0.8.1'
gem 'asciidoctor', '~> 2.0.10' gem 'asciidoctor', '~> 2.0.10'
gem 'asciidoctor-include-ext', '~> 0.3.1', require: false gem 'asciidoctor-include-ext', '~> 0.3.1', require: false
gem 'asciidoctor-plantuml', '0.0.9' gem 'asciidoctor-plantuml', '0.0.9'
gem 'rouge', '~> 3.11.0' gem 'rouge', '~> 3.7'
gem 'truncato', '~> 0.7.11' gem 'truncato', '~> 0.7.11'
gem 'bootstrap_form', '~> 4.2.0' gem 'bootstrap_form', '~> 4.2.0'
gem 'nokogiri', '~> 1.10.4' gem 'nokogiri', '~> 1.10.4'
...@@ -446,7 +446,7 @@ group :ed25519 do ...@@ -446,7 +446,7 @@ group :ed25519 do
end end
# Gitaly GRPC protocol definitions # Gitaly GRPC protocol definitions
gem 'gitaly', '~> 1.65.0' gem 'gitaly', '~> 1.58.0'
gem 'grpc', '~> 1.19.0' gem 'grpc', '~> 1.19.0'
... ...
......
...@@ -358,7 +358,7 @@ GEM ...@@ -358,7 +358,7 @@ GEM
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
git (1.5.0) git (1.5.0)
gitaly (1.65.0) gitaly (1.58.0)
grpc (~> 1.0) grpc (~> 1.0)
github-markup (1.7.0) github-markup (1.7.0)
gitlab-labkit (0.5.2) gitlab-labkit (0.5.2)
...@@ -834,7 +834,7 @@ GEM ...@@ -834,7 +834,7 @@ GEM
retriable (3.1.2) retriable (3.1.2)
rinku (2.0.0) rinku (2.0.0)
rotp (2.1.2) rotp (2.1.2)
rouge (3.11.0) rouge (3.7.0)
rqrcode (0.7.0) rqrcode (0.7.0)
chunky_png chunky_png
rqrcode-rails3 (0.1.7) rqrcode-rails3 (0.1.7)
...@@ -1168,7 +1168,7 @@ DEPENDENCIES ...@@ -1168,7 +1168,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.3) gettext_i18n_rails_js (~> 1.3)
gitaly (~> 1.65.0) gitaly (~> 1.58.0)
github-markup (~> 1.7.0) github-markup (~> 1.7.0)
gitlab-labkit (~> 0.5) gitlab-labkit (~> 0.5)
gitlab-license (~> 1.0) gitlab-license (~> 1.0)
...@@ -1276,7 +1276,7 @@ DEPENDENCIES ...@@ -1276,7 +1276,7 @@ DEPENDENCIES
redis-rails (~> 5.0.2) redis-rails (~> 5.0.2)
request_store (~> 1.3) request_store (~> 1.3)
responders (~> 2.0) responders (~> 2.0)
rouge (~> 3.11.0) rouge (~> 3.7)
rqrcode-rails3 (~> 0.1.7) rqrcode-rails3 (~> 0.1.7)
rspec-parameterized rspec-parameterized
rspec-rails (~> 3.8.0) rspec-rails (~> 3.8.0)
... ...
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
## Canonical source ## Canonical source
The canonical source of GitLab where development takes place is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab). The canonical source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/).
A FOSS source of GitLab is hosted on a [mirrored, read-only project on GitLab.com](https://gitlab.com/gitlab-org/gitlab-foss/). The source of GitLab Enterprise Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ee).
## Free trial ## Free trial
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue'; import GlModal from '~/vue_shared/components/gl_modal.vue';
import Badge from './badge.vue'; import Badge from './badge.vue';
import BadgeForm from './badge_form.vue'; import BadgeForm from './badge_form.vue';
import BadgeList from './badge_list.vue'; import BadgeList from './badge_list.vue';
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
Badge, Badge,
BadgeForm, BadgeForm,
BadgeList, BadgeList,
GlModal: DeprecatedModal2, GlModal,
}, },
computed: { computed: {
...mapState(['badgeInModal', 'isEditing']), ...mapState(['badgeInModal', 'isEditing']),
... ...
......
import sqljs from 'sql.js'; import sqljs from 'sql.js';
import { template as _template } from 'underscore'; import { template as _template } from 'underscore';
import axios from '~/lib/utils/axios_utils';
import { successCodes } from '~/lib/utils/http_status';
const PREVIEW_TEMPLATE = _template(` const PREVIEW_TEMPLATE = _template(`
<div class="card"> <div class="card">
...@@ -18,25 +16,30 @@ class BalsamiqViewer { ...@@ -18,25 +16,30 @@ class BalsamiqViewer {
} }
loadFile(endpoint) { loadFile(endpoint) {
return axios return new Promise((resolve, reject) => {
.get(endpoint, { const xhr = new XMLHttpRequest();
responseType: 'arraybuffer',
validateStatus(status) { xhr.open('GET', endpoint, true);
return status !== successCodes.OK; xhr.responseType = 'arraybuffer';
}, xhr.onload = loadEvent => this.fileLoaded(loadEvent, resolve, reject);
}) xhr.onerror = reject;
.then(({ data }) => {
this.renderFile(data); xhr.send();
})
.catch(e => {
throw new Error(e);
}); });
} }
renderFile(fileBuffer) { fileLoaded(loadEvent, resolve, reject) {
if (loadEvent.target.status !== 200) return reject();
this.renderFile(loadEvent);
return resolve();
}
renderFile(loadEvent) {
const container = document.createElement('ul'); const container = document.createElement('ul');
this.initDatabase(fileBuffer); this.initDatabase(loadEvent.target.response);
const previews = this.getPreviews(); const previews = this.getPreviews();
previews.forEach(preview => { previews.forEach(preview => {
... ...
......
/* eslint-disable class-methods-use-this */ /* eslint-disable class-methods-use-this */
import $ from 'jquery'; import $ from 'jquery';
import '~/gl_dropdown';
export default class TemplateSelector { export default class TemplateSelector {
constructor({ dropdown, data, pattern, wrapper, editor, $input } = {}) { constructor({ dropdown, data, pattern, wrapper, editor, $input } = {}) {
... ...
......
...@@ -22,6 +22,7 @@ import Board from 'ee_else_ce/boards/components/board'; ...@@ -22,6 +22,7 @@ import Board from 'ee_else_ce/boards/components/board';
import BoardSidebar from 'ee_else_ce/boards/components/board_sidebar'; import BoardSidebar from 'ee_else_ce/boards/components/board_sidebar';
import initNewListDropdown from 'ee_else_ce/boards/components/new_list_dropdown'; import initNewListDropdown from 'ee_else_ce/boards/components/new_list_dropdown';
import BoardAddIssuesModal from '~/boards/components/modal/index.vue'; import BoardAddIssuesModal from '~/boards/components/modal/index.vue';
import '~/vue_shared/vue_resource_interceptor';
import { import {
NavigationType, NavigationType,
convertObjectPropsToCamelCase, convertObjectPropsToCamelCase,
... ...
......
import Vue from 'vue'; import Vue from 'vue';
import '../vue_shared/vue_resource_interceptor';
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
Vue.config.productionTip = false; Vue.config.productionTip = false;
... ...
......
import _ from 'underscore'; import _ from 'underscore';
import '~/gl_dropdown';
export default class CreateItemDropdown { export default class CreateItemDropdown {
/** /**
... ...
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Flash from '../../flash'; import Flash from '../../flash';
import '../../vue_shared/vue_resource_interceptor';
import { __ } from '~/locale'; import { __ } from '~/locale';
window.gl = window.gl || {}; window.gl = window.gl || {};
... ...
......
<script> <script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */ /* eslint-disable @gitlab/vue-i18n/no-bare-strings */
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective } from '@gitlab/ui';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue'; import GlModal from '~/vue_shared/components/gl_modal.vue';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
import LoadingButton from '~/vue_shared/components/loading_button.vue'; import LoadingButton from '~/vue_shared/components/loading_button.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
name: 'StopEnvironmentModal', name: 'StopEnvironmentModal',
components: { components: {
GlModal: DeprecatedModal2, GlModal,
LoadingButton, LoadingButton,
}, },
... ...
......