Commit ca780e27 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'resolve-global-vue-ee' into 'master'

Port of 'resolve-global-vue' to EE

See merge request !1457
parents 9b477ff1 98e4829c
/* eslint-disable one-var, quote-props, comma-dangle, space-before-function-paren */ /* eslint-disable one-var, quote-props, comma-dangle, space-before-function-paren */
/* global Vue */
/* global BoardService */ /* global BoardService */
import Vue from 'vue';
import VueResource from 'vue-resource';
import FilteredSearchBoards from './filtered_search_boards'; import FilteredSearchBoards from './filtered_search_boards';
import eventHub from './eventhub'; import eventHub from './eventhub';
import collapseIcon from './icons/fullscreen_collapse.svg'; import collapseIcon from './icons/fullscreen_collapse.svg';
import expandIcon from './icons/fullscreen_expand.svg'; import expandIcon from './icons/fullscreen_expand.svg';
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
require('./models/issue'); require('./models/issue');
require('./models/label'); require('./models/label');
require('./models/list'); require('./models/list');
...@@ -27,6 +26,8 @@ require('./components/new_list_dropdown'); ...@@ -27,6 +26,8 @@ require('./components/new_list_dropdown');
require('./components/modal/index'); require('./components/modal/index');
require('../vue_shared/vue_resource_interceptor'); require('../vue_shared/vue_resource_interceptor');
Vue.use(VueResource);
$(() => { $(() => {
const $boardApp = document.getElementById('board-app'); const $boardApp = document.getElementById('board-app');
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
/* eslint-disable comma-dangle, space-before-function-paren, one-var */ /* eslint-disable comma-dangle, space-before-function-paren, one-var */
/* global Vue */
/* global Sortable */ /* global Sortable */
import Vue from 'vue';
import boardBlankState from './board_blank_state'; import boardBlankState from './board_blank_state';
require('./board_delete'); require('./board_delete');
......
/* global Vue */
require('./issue_card_inner'); require('./issue_card_inner');
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
/* eslint-disable comma-dangle, space-before-function-paren, no-alert */ /* eslint-disable comma-dangle, space-before-function-paren, no-alert */
/* global Vue */
import Vue from 'vue';
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/* eslint-disable comma-dangle, space-before-function-paren, max-len */ /* eslint-disable comma-dangle, space-before-function-paren, max-len */
/* global Vue */
/* global Sortable */ /* global Sortable */
import Vue from 'vue';
import boardNewIssue from './board_new_issue'; import boardNewIssue from './board_new_issue';
import boardCard from './board_card'; import boardCard from './board_card';
......
/* global Vue */
/* global BoardService */ /* global BoardService */
import Vue from 'vue';
const boardMilestoneSelect = require('./milestone_select'); const boardMilestoneSelect = require('./milestone_select');
const extraMilestones = require('../mixins/extra_milestones'); const extraMilestones = require('../mixins/extra_milestones');
......
/* eslint-disable comma-dangle, space-before-function-paren, no-new */ /* eslint-disable comma-dangle, space-before-function-paren, no-new */
/* global Vue */
/* global IssuableContext */ /* global IssuableContext */
/* global MilestoneSelect */ /* global MilestoneSelect */
/* global LabelsSelect */ /* global LabelsSelect */
/* global Sidebar */ /* global Sidebar */
import Vue from 'vue';
require('./sidebar/remove_issue'); require('./sidebar/remove_issue');
(() => { (() => {
......
/* global Vue */ import Vue from 'vue';
require('./board_new_form'); require('./board_new_form');
......
/* global Vue */ import Vue from 'vue';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
(() => { (() => {
......
/* global BoardService */ /* global BoardService */
/* global Vue */
const extraMilestones = require('../mixins/extra_milestones'); const extraMilestones = require('../mixins/extra_milestones');
module.exports = { module.exports = {
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* eslint-disable no-new */ /* eslint-disable no-new */
/* global Vue */
/* global Flash */ /* global Flash */
import Vue from 'vue';
require('./lists_dropdown'); require('./lists_dropdown');
(() => { (() => {
......
/* global Vue */
/* global ListIssue */ /* global ListIssue */
import Vue from 'vue';
import queryData from '../../utils/query_data'; import queryData from '../../utils/query_data';
require('./header'); require('./header');
......
/* global Vue */
/* global ListIssue */ /* global ListIssue */
/* global bp */ /* global bp */
import Vue from 'vue';
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* eslint-disable no-new */ /* eslint-disable no-new */
/* global Vue */
/* global Flash */ /* global Flash */
import Vue from 'vue';
(() => { (() => {
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
/* global Vue */
/* global dateFormat */ /* global dateFormat */
import Vue from 'vue';
Vue.filter('due-date', (value) => { Vue.filter('due-date', (value) => {
const date = new Date(value); const date = new Date(value);
return dateFormat(date, 'mmm d, yyyy', true); return dateFormat(date, 'mmm d, yyyy', true);
......
/* eslint-disable no-unused-vars, space-before-function-paren, arrow-body-style, arrow-parens, comma-dangle, max-len */ /* eslint-disable no-unused-vars, space-before-function-paren, arrow-body-style, arrow-parens, comma-dangle, max-len */
/* global Vue */
/* global ListLabel */ /* global ListLabel */
/* global ListMilestone */ /* global ListMilestone */
/* global ListUser */ /* global ListUser */
import Vue from 'vue';
class ListIssue { class ListIssue {
constructor (obj) { constructor (obj) {
this.globalId = obj.id; this.globalId = obj.id;
......
/* eslint-disable space-before-function-paren, comma-dangle, no-param-reassign, camelcase, max-len, no-unused-vars, no-else-return */ /* eslint-disable space-before-function-paren, comma-dangle, no-param-reassign, camelcase, max-len, no-unused-vars */
/* global Vue */
import Vue from 'vue';
class BoardService { class BoardService {
constructor (root, bulkUpdatePath, boardId) { constructor (root, bulkUpdatePath, boardId) {
...@@ -36,9 +37,8 @@ class BoardService { ...@@ -36,9 +37,8 @@ class BoardService {
createBoard (board) { createBoard (board) {
if (board.id) { if (board.id) {
return this.boards.update({ id: board.id }, board); return this.boards.update({ id: board.id }, board);
} else {
return this.boards.save({}, board);
} }
return this.boards.save({}, board);
} }
all () { all () {
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import Vue from 'vue';
import VueResource from 'vue-resource';
import CommitPipelinesTable from './pipelines_table'; import CommitPipelinesTable from './pipelines_table';
window.Vue = require('vue'); Vue.use(VueResource);
window.Vue.use(require('vue-resource'));
/** /**
* Commits View > Pipelines Tab > Pipelines Table. * Commits View > Pipelines Tab > Pipelines Table.
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.cycleAnalytics = global.cycleAnalytics || {}; global.cycleAnalytics = global.cycleAnalytics || {};
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.cycleAnalytics = global.cycleAnalytics || {}; global.cycleAnalytics = global.cycleAnalytics || {};
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.cycleAnalytics = global.cycleAnalytics || {}; global.cycleAnalytics = global.cycleAnalytics || {};
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.cycleAnalytics = global.cycleAnalytics || {}; global.cycleAnalytics = global.cycleAnalytics || {};
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.cycleAnalytics = global.cycleAnalytics || {}; global.cycleAnalytics = global.cycleAnalytics || {};
......
/* global Vue */
/* global Cookies */ /* global Cookies */
/* global Flash */ /* global Flash */
window.Vue = require('vue'); import Vue from 'vue';
window.Cookies = require('js-cookie'); window.Cookies = require('js-cookie');
require('./components/stage_code_component'); require('./components/stage_code_component');
require('./components/stage_issue_component'); require('./components/stage_issue_component');
......
/* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, quotes, no-lonely-if, max-len */ /* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, quotes, no-lonely-if, max-len */
/* global CommentsStore */ /* global CommentsStore */
const Vue = require('vue');
import Vue from 'vue';
(() => { (() => {
const CommentAndResolveBtn = Vue.extend({ const CommentAndResolveBtn = Vue.extend({
......
/* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, guard-for-in, no-restricted-syntax, one-var, space-before-function-paren, no-lonely-if, no-continue, brace-style, max-len, quotes */ /* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, guard-for-in, no-restricted-syntax, one-var, space-before-function-paren, no-lonely-if, no-continue, brace-style, max-len, quotes */
/* global DiscussionMixins */ /* global DiscussionMixins */
/* global CommentsStore */ /* global CommentsStore */
const Vue = require('vue');
import Vue from 'vue';
(() => { (() => {
const JumpToDiscussion = Vue.extend({ const JumpToDiscussion = Vue.extend({
......
/* global Vue */
/* global CommentsStore */ /* global CommentsStore */
import Vue from 'vue';
(() => { (() => {
const NewIssueForDiscussion = Vue.extend({ const NewIssueForDiscussion = Vue.extend({
props: { props: {
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
/* global CommentsStore */ /* global CommentsStore */
/* global ResolveService */ /* global ResolveService */
/* global Flash */ /* global Flash */
const Vue = require('vue');
import Vue from 'vue';
(() => { (() => {
const ResolveBtn = Vue.extend({ const ResolveBtn = Vue.extend({
......
/* eslint-disable comma-dangle, object-shorthand, func-names, no-param-reassign */ /* eslint-disable comma-dangle, object-shorthand, func-names, no-param-reassign */
/* global DiscussionMixins */ /* global DiscussionMixins */
/* global CommentsStore */ /* global CommentsStore */
const Vue = require('vue');
import Vue from 'vue';
((w) => { ((w) => {
w.ResolveCount = Vue.extend({ w.ResolveCount = Vue.extend({
......
/* eslint-disable object-shorthand, func-names, space-before-function-paren, comma-dangle, no-else-return, quotes, max-len */ /* eslint-disable object-shorthand, func-names, space-before-function-paren, comma-dangle, no-else-return, quotes, max-len */
/* global CommentsStore */ /* global CommentsStore */
/* global ResolveService */ /* global ResolveService */
const Vue = require('vue');
import Vue from 'vue';
(() => { (() => {
const ResolveDiscussionBtn = Vue.extend({ const ResolveDiscussionBtn = Vue.extend({
......
/* eslint-disable func-names, comma-dangle, new-cap, no-new, max-len */ /* eslint-disable func-names, comma-dangle, new-cap, no-new, max-len */
/* global Vue */
/* global ResolveCount */ /* global ResolveCount */
/* global ResolveServiceClass */ /* global ResolveServiceClass */
const Vue = require('vue'); import Vue from 'vue';
require('./models/discussion'); require('./models/discussion');
require('./models/note'); require('./models/note');
require('./stores/comments'); require('./stores/comments');
......
/* eslint-disable space-before-function-paren, camelcase, guard-for-in, no-restricted-syntax, no-unused-vars, max-len */ /* eslint-disable space-before-function-paren, camelcase, guard-for-in, no-restricted-syntax, no-unused-vars, max-len */
/* global Vue */
/* global NoteModel */ /* global NoteModel */
import Vue from 'vue';
class DiscussionModel { class DiscussionModel {
constructor (discussionId) { constructor (discussionId) {
this.id = discussionId; this.id = discussionId;
......
...@@ -2,10 +2,13 @@ ...@@ -2,10 +2,13 @@
/* global Flash */ /* global Flash */
/* global CommentsStore */ /* global CommentsStore */
const Vue = window.Vue = require('vue'); import Vue from 'vue';
window.Vue.use(require('vue-resource')); import VueResource from 'vue-resource';
require('../../vue_shared/vue_resource_interceptor'); require('../../vue_shared/vue_resource_interceptor');
Vue.use(VueResource);
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/* eslint-disable object-shorthand, func-names, camelcase, no-restricted-syntax, guard-for-in, comma-dangle, max-len, no-param-reassign */ /* eslint-disable object-shorthand, func-names, camelcase, no-restricted-syntax, guard-for-in, comma-dangle, max-len, no-param-reassign */
/* global Vue */
/* global DiscussionModel */ /* global DiscussionModel */
import Vue from 'vue';
((w) => { ((w) => {
w.CommentsStore = { w.CommentsStore = {
state: {}, state: {},
......
/* global Vue */ import Vue from 'vue';
import stopwatchSvg from 'icons/_icon_stopwatch.svg'; import stopwatchSvg from 'icons/_icon_stopwatch.svg';
require('../../../lib/utils/pretty_time'); require('../../../lib/utils/pretty_time');
......
/* global Vue */ import Vue from 'vue';
require('../../../lib/utils/pretty_time'); require('../../../lib/utils/pretty_time');
(() => { (() => {
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
Vue.component('time-tracking-estimate-only-pane', { Vue.component('time-tracking-estimate-only-pane', {
name: 'time-tracking-estimate-only-pane', name: 'time-tracking-estimate-only-pane',
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
Vue.component('time-tracking-help-state', { Vue.component('time-tracking-help-state', {
name: 'time-tracking-help-state', name: 'time-tracking-help-state',
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
Vue.component('time-tracking-no-tracking-pane', { Vue.component('time-tracking-no-tracking-pane', {
name: 'time-tracking-no-tracking-pane', name: 'time-tracking-no-tracking-pane',
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
Vue.component('time-tracking-spent-only-pane', { Vue.component('time-tracking-spent-only-pane', {
name: 'time-tracking-spent-only-pane', name: 'time-tracking-spent-only-pane',
......
/* global Vue */ import Vue from 'vue';
require('./help_state'); require('./help_state');
require('./collapsed_state'); require('./collapsed_state');
......
/* global Vue */ import Vue from 'vue';
import VueResource from 'vue-resource';
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
require('./components/time_tracker'); require('./components/time_tracker');
require('../../smart_interval'); require('../../smart_interval');
require('../../subbable_resource'); require('../../subbable_resource');
Vue.use(VueResource);
(() => { (() => {
/* This Vue instance represents what will become the parent instance for the /* This Vue instance represents what will become the parent instance for the
* sidebar. It will be responsible for managing `issuable` state and propagating * sidebar. It will be responsible for managing `issuable` state and propagating
......
/* eslint-disable */ /* eslint-disable space-before-function-paren, prefer-arrow-callback, no-var, one-var, one-var-declaration-per-line, object-shorthand, quotes, comma-dangle, consistent-return, no-unused-vars, padded-blocks, func-names, max-len */
/* global Api */
(function() { (function() {
$(function() { $(function() {
var groupFormatSelection, ldapGroupResult; var groupFormatSelection, ldapGroupResult;
......
/* eslint-disable comma-dangle, quote-props, no-useless-computed-key, object-shorthand, no-new, no-param-reassign, max-len */ /* eslint-disable comma-dangle, quote-props, no-useless-computed-key, object-shorthand, no-new, no-param-reassign, max-len */
/* global Vue */
/* global ace */ /* global ace */
/* global Flash */ /* global Flash */
import Vue from 'vue';
((global) => { ((global) => {
global.mergeConflicts = global.mergeConflicts || {}; global.mergeConflicts = global.mergeConflicts || {};
......
/* eslint-disable no-param-reassign, comma-dangle */ /* eslint-disable no-param-reassign, comma-dangle */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.mergeConflicts = global.mergeConflicts || {}; global.mergeConflicts = global.mergeConflicts || {};
......
/* eslint-disable no-param-reassign, comma-dangle */ /* eslint-disable no-param-reassign, comma-dangle */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.mergeConflicts = global.mergeConflicts || {}; global.mergeConflicts = global.mergeConflicts || {};
......
/* eslint-disable comma-dangle, object-shorthand, no-param-reassign, camelcase, no-nested-ternary, no-continue, max-len */ /* eslint-disable comma-dangle, object-shorthand, no-param-reassign, camelcase, no-nested-ternary, no-continue, max-len */
/* global Cookies */ /* global Cookies */
/* global Vue */
import Vue from 'vue';
((global) => { ((global) => {
global.mergeConflicts = global.mergeConflicts || {}; global.mergeConflicts = global.mergeConflicts || {};
......
/* eslint-disable new-cap, comma-dangle, no-new */ /* eslint-disable new-cap, comma-dangle, no-new */
/* global Vue */
/* global Flash */ /* global Flash */
window.Vue = require('vue'); import Vue from 'vue';
require('./merge_conflict_store'); require('./merge_conflict_store');
require('./merge_conflict_service'); require('./merge_conflict_service');
require('./mixins/line_conflict_utils'); require('./mixins/line_conflict_utils');
......
/* global Flash */ /* global Flash */
window.Vue = require('vue'); import Vue from 'vue';
window.Vue.use(require('vue-resource'));
const Vue = window.Vue;
require('./approvals_store'); require('./approvals_store');
class ApprovalsApi { class ApprovalsApi {
......
/* global Vue */ import Vue from 'vue';
const Vue = require('vue');
require('../approvals_store'); require('../approvals_store');
require('../approvals_api'); require('../approvals_api');
......
/* global Vue */ import Vue from 'vue';
const Vue = require('vue');
require('../approvals_store'); require('../approvals_store');
require('../../../vue_common_component/link_to_member_avatar'); require('../../../vue_common_component/link_to_member_avatar');
......
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, one-var-declaration-per-line, no-unused-vars, object-shorthand, comma-dangle, no-else-return, no-self-compare, consistent-return, no-param-reassign, no-shadow */ /* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, one-var-declaration-per-line, no-unused-vars, object-shorthand, comma-dangle, no-else-return, no-self-compare, consistent-return, no-param-reassign, no-shadow */
/* global Vue */
/* global Issuable */ /* global Issuable */
/* global ListMilestone */ /* global ListMilestone */
import Vue from 'vue';
(function() { (function() {
this.MilestoneSelect = (function() { this.MilestoneSelect = (function() {
function MilestoneSelect(currentProject, els) { function MilestoneSelect(currentProject, els) {
......
/* eslint-disable */ /* eslint-disable space-before-function-paren, wrap-iife, one-var, no-var, one-var-declaration-per-line, no-unused-vars, object-shorthand, comma-dangle, prefer-arrow-callback, padded-blocks, func-names, max-len */
(function() { (function() {
this.PathLocks = (function() { this.PathLocks = (function() {
function PathLocks() {} function PathLocks() {}
......
/* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-undef, no-else-return, prefer-arrow-callback, max-len */ /* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-else-return, prefer-arrow-callback, max-len */
// Render Gitlab flavoured Markdown // Render Gitlab flavoured Markdown
// //
// Delegates to syntax highlight and render math // Delegates to syntax highlight and render math
......
/* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-undef, no-else-return, prefer-arrow-callback, max-len, no-console */ /* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-else-return, prefer-arrow-callback, max-len, no-console */
/* global katex */
// Renders math using KaTeX in any element with the // Renders math using KaTeX in any element with the
// `js-render-math` class // `js-render-math` class
// //
......
/* global Vue */ import Vue from 'vue';
(() => { (() => {
class Subscription { class Subscription {
......
/* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, wrap-iife, quotes, max-len, one-var-declaration-per-line, vars-on-top, prefer-arrow-callback, consistent-return, comma-dangle, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, no-lonely-if, yoda, prefer-spread, no-void, camelcase, no-param-reassign */ /* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, wrap-iife, quotes, max-len, one-var-declaration-per-line, vars-on-top, prefer-arrow-callback, consistent-return, comma-dangle, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, no-lonely-if, yoda, prefer-spread, no-void, camelcase, no-param-reassign */
/* global Vue */
/* global Issuable */ /* global Issuable */
/* global ListUser */ /* global ListUser */
import Vue from 'vue';
(function() { (function() {
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }, var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; },
slice = [].slice; slice = [].slice;
......
/* global Vue */ import Vue from 'vue';
// Analogue of link_to_member_avatar in app/helpers/projects_helper.rb // Analogue of link_to_member_avatar in app/helpers/projects_helper.rb
(() => { (() => {
......
import Vue from 'vue';
import PipelinesStore from './stores/pipelines_store'; import PipelinesStore from './stores/pipelines_store';
import PipelinesComponent from './pipelines'; import PipelinesComponent from './pipelines';
import '../vue_shared/vue_resource_interceptor'; import '../vue_shared/vue_resource_interceptor';
const Vue = window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
$(() => new Vue({ $(() => new Vue({
el: document.querySelector('.vue-pipelines-index'), el: document.querySelector('.vue-pipelines-index'),
......
/* eslint-disable no-param-reassign, no-plusplus */
import Vue from 'vue'; import Vue from 'vue';
import VueResource from 'vue-resource'; import VueResource from 'vue-resource';
Vue.use(VueResource); Vue.use(VueResource);
// Maintain a global counter for active requests
// see: spec/support/wait_for_vue_resource.rb
Vue.http.interceptors.push((request, next) => { Vue.http.interceptors.push((request, next) => {
Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1; window.activeVueResources = window.activeVueResources || 0;
window.activeVueResources += 1;
next(() => { next(() => {
Vue.activeResources--; window.activeVueResources -= 1;
}); });
}); });
// Inject CSRF token so we don't break any tests.
Vue.http.interceptors.push((request, next) => { Vue.http.interceptors.push((request, next) => {
// needed in order to not break the tests.
if ($.rails) { if ($.rails) {
// eslint-disable-next-line no-param-reassign
request.headers['X-CSRF-Token'] = $.rails.csrfToken(); request.headers['X-CSRF-Token'] = $.rails.csrfToken();
} }
next(); next();
......
/* eslint-disable */ /* eslint-disable space-before-function-paren, wrap-iife, prefer-arrow-callback, max-len, one-var, no-var, one-var-declaration-per-line, object-shorthand, comma-dangle, no-shadow, quotes, no-unused-vars, no-else-return, consistent-return, no-param-reassign, prefer-template, padded-blocks, func-names */
(function() { (function() {
this.WeightSelect = (function() { this.WeightSelect = (function() {
function WeightSelect() { function WeightSelect() {
......
/* global Vue */ import Vue from 'vue';
require('~/merge_request_widget/approvals/components/approvals_body'); require('~/merge_request_widget/approvals/components/approvals_body');
......
/* global Vue */ import Vue from 'vue';
require('~/merge_request_widget/approvals/components/approvals_footer'); require('~/merge_request_widget/approvals/components/approvals_footer');
......
/* global Vue */
/* global List */ /* global List */
/* global ListLabel */ /* global ListLabel */
/* global listObj */ /* global listObj */
/* global boardsMockInterceptor */ /* global boardsMockInterceptor */
/* global BoardService */ /* global BoardService */
import Vue from 'vue';
require('~/boards/models/list'); require('~/boards/models/list');
require('~/boards/models/label'); require('~/boards/models/label');
require('~/boards/stores/boards_store'); require('~/boards/stores/boards_store');
......
/* eslint-disable comma-dangle, one-var, no-unused-vars */ /* eslint-disable comma-dangle, one-var, no-unused-vars */
/* global Vue */
/* global BoardService */ /* global BoardService */
/* global boardsMockInterceptor */ /* global boardsMockInterceptor */
/* global Cookies */ /* global Cookies */
...@@ -7,6 +6,8 @@ ...@@ -7,6 +6,8 @@
/* global listObjDuplicate */ /* global listObjDuplicate */
/* global ListIssue */ /* global ListIssue */
import Vue from 'vue';
require('~/lib/utils/url_utility'); require('~/lib/utils/url_utility');
require('~/boards/models/issue'); require('~/boards/models/issue');
require('~/boards/models/label'); require('~/boards/models/label');
......
/* global Vue */
/* global ListUser */ /* global ListUser */
/* global ListLabel */ /* global ListLabel */
/* global listObj */ /* global listObj */
/* global ListIssue */ /* global ListIssue */
import Vue from 'vue';
require('~/boards/models/issue'); require('~/boards/models/issue');
require('~/boards/models/label'); require('~/boards/models/label');
require('~/boards/models/list'); require('~/boards/models/list');
......
/* eslint-disable comma-dangle */ /* eslint-disable comma-dangle */
/* global Vue */
/* global boardsMockInterceptor */ /* global boardsMockInterceptor */
/* global BoardService */ /* global BoardService */
/* global List */ /* global List */
...@@ -7,6 +6,8 @@ ...@@ -7,6 +6,8 @@
/* global listObj */ /* global listObj */
/* global listObjDuplicate */ /* global listObjDuplicate */
import Vue from 'vue';
require('~/lib/utils/url_utility'); require('~/lib/utils/url_utility');
require('~/boards/models/issue'); require('~/boards/models/issue');
require('~/boards/models/label'); require('~/boards/models/label');
......
/* global Vue */
/* global boardsMockInterceptor */ /* global boardsMockInterceptor */
/* global boardObj */ /* global boardObj */
/* global BoardService */ /* global BoardService */
import Vue from 'vue';
const milestoneSelect = require('~/boards/components/milestone_select'); const milestoneSelect = require('~/boards/components/milestone_select');
require('~/boards/services/board_service'); require('~/boards/services/board_service');
require('~/boards/stores/boards_store'); require('~/boards/stores/boards_store');
......
/* global Vue */
/* global ListIssue */ /* global ListIssue */
require('~/boards/models/issue'); require('~/boards/models/issue');
......
/* eslint-disable */ /* eslint-disable no-unused-vars, space-before-function-paren, func-call-spacing, no-spaced-func, semi, max-len, quotes, space-infix-ops, padded-blocks */
import Vue from 'vue';
require('jquery');
require('vue');
require('~/issuable/time_tracking/components/time_tracker'); require('~/issuable/time_tracking/components/time_tracker');
function initTimeTrackingComponent(opts) { function initTimeTrackingComponent(opts) {
......
...@@ -9,8 +9,6 @@ require('~/commons/index.js'); ...@@ -9,8 +9,6 @@ require('~/commons/index.js');
window.$ = window.jQuery = require('jquery'); window.$ = window.jQuery = require('jquery');
window._ = require('underscore'); window._ = require('underscore');
window.Cookies = require('js-cookie'); window.Cookies = require('js-cookie');
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
// stub expected globals // stub expected globals
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/* eslint-disable guard-for-in, no-restricted-syntax */ /* eslint-disable guard-for-in, no-restricted-syntax */
/* global Vue */
import Vue from 'vue';
require('~/vue_common_component/link_to_member_avatar'); require('~/vue_common_component/link_to_member_avatar');
......
module WaitForVueResource module WaitForVueResource
def wait_for_vue_resource(spinner: true) def wait_for_vue_resource(spinner: true)
Timeout.timeout(Capybara.default_max_wait_time) do Timeout.timeout(Capybara.default_max_wait_time) do
loop until page.evaluate_script('Vue.activeResources').zero? loop until page.evaluate_script('window.activeVueResources').zero?
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment