Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-08-20 09:09:55 +00:00
parent fb10c412ec
commit d06c308380
289 changed files with 425 additions and 483 deletions

View File

@ -68,7 +68,7 @@
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
- name: redis:4.0-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@ -77,7 +77,7 @@
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
- name: redis:4.0-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@ -86,7 +86,7 @@
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
- name: redis:4.0-alpine
- name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@ -96,7 +96,7 @@
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
- name: redis:4.0-alpine
- name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust

View File

@ -4,7 +4,7 @@ import { GlModal, GlTabs, GlTab, GlSearchBoxByType, GlSprintf } from '@gitlab/ui
import ReviewTabContainer from '~/add_context_commits_modal/components/review_tab_container.vue';
import { s__ } from '~/locale';
import eventHub from '../event_hub';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import {
findCommitIndex,
setCommitStatus,

View File

@ -1,6 +1,6 @@
import _ from 'lodash';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import Api from '~/api';
import * as types from './mutation_types';

View File

@ -1,6 +1,6 @@
import Api from '~/api';
import { s__ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import * as types from './mutation_types';

View File

@ -12,7 +12,7 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import ToggleButton from '~/vue_shared/components/toggle_button.vue';
import axios from '~/lib/utils/axios_utils';
import { s__, __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
export default {
i18n: {

View File

@ -1,6 +1,6 @@
import axios from './lib/utils/axios_utils';
import { joinPaths } from './lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
const DEFAULT_PER_PAGE = 20;

View File

@ -7,7 +7,7 @@ import Cookies from 'js-cookie';
import { __ } from './locale';
import { updateTooltipTitle } from './lib/utils/common_utils';
import { isInVueNoteablePage } from './lib/utils/dom_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import axios from './lib/utils/axios_utils';
import * as Emoji from '~/emoji';

View File

@ -2,7 +2,7 @@
import { escape, debounce } from 'lodash';
import { mapActions, mapState } from 'vuex';
import { GlLoadingIcon, GlFormInput, GlFormGroup } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import createEmptyBadge from '../empty_badge';

View File

@ -1,7 +1,7 @@
<script>
import { mapState, mapActions } from 'vuex';
import { GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import Badge from './badge.vue';

View File

@ -1,4 +1,4 @@
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { scrollToElement } from '~/lib/utils/common_utils';
import service from '../../../services/drafts_service';

View File

@ -1,4 +1,4 @@
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { s__, sprintf } from '~/locale';
// Renders math using KaTeX in any element with the

View File

@ -1,6 +1,6 @@
import $ from 'jquery';
import { once } from 'lodash';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf } from '~/locale';
// Renders diagrams and flowcharts from text using Mermaid in any element with the

View File

@ -2,7 +2,7 @@
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
// MarkdownPreview

View File

@ -1,4 +1,4 @@
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import BalsamiqViewer from './balsamiq/balsamiq_viewer';
import { __ } from '~/locale';

View File

@ -1,7 +1,7 @@
import $ from 'jquery';
import Api from '~/api';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import FileTemplateTypeSelector from './template_selectors/type_selector';
import BlobCiYamlSelector from './template_selectors/ci_yaml_selector';
import DockerfileSelector from './template_selectors/dockerfile_selector';

View File

@ -1,5 +1,5 @@
import { SwaggerUIBundle } from 'swagger-ui-dist';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
export default () => {

View File

@ -1,6 +1,6 @@
import $ from 'jquery';
import '~/behaviors/markdown/render_gfm';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import { handleLocationHash } from '../../lib/utils/common_utils';
import axios from '../../lib/utils/axios_utils';
import eventHub from '../../notes/event_hub';

View File

@ -2,7 +2,7 @@
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { BLOB_EDITOR_ERROR, BLOB_PREVIEW_ERROR } from './constants';
import TemplateSelectorMediator from '../blob/file_template_mediator';
import getModeByFileExtension from '~/lib/utils/ace_utils';

View File

@ -1,6 +1,6 @@
<script>
import { __ } from '~/locale';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import { visitUrl } from '~/lib/utils/url_utility';
import boardsStore from '~/boards/stores/boards_store';

View File

@ -6,7 +6,7 @@ import boardCard from './board_card.vue';
import eventHub from '../eventhub';
import boardsStore from '../stores/boards_store';
import { sprintf, __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import {
getBoardSortableDefaultOptions,
sortableStart,

View File

@ -3,7 +3,7 @@
import $ from 'jquery';
import Vue from 'vue';
import { GlLabel } from '@gitlab/ui';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { sprintf, __ } from '~/locale';
import Sidebar from '~/right_sidebar';
import eventHub from '~/sidebar/event_hub';

View File

@ -1,6 +1,6 @@
<script>
import footerEEMixin from 'ee_else_ce/boards/mixins/modal_footer';
import Flash from '../../../flash';
import { deprecatedCreateFlash as Flash } from '../../../flash';
import { __, n__ } from '../../../locale';
import ListsDropdown from './lists_dropdown.vue';
import ModalStore from '../../stores/modal_store';

View File

@ -3,7 +3,7 @@
import $ from 'jquery';
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import CreateLabelDropdown from '../../create_label';
import boardsStore from '../stores/boards_store';

View File

@ -1,7 +1,7 @@
<script>
import { GlButton } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils';
import Flash from '../../../flash';
import { deprecatedCreateFlash as Flash } from '../../../flash';
import { __ } from '../../../locale';
import boardsStore from '../../stores/boards_store';

View File

@ -20,7 +20,7 @@ import {
import VueApollo from 'vue-apollo';
import BoardContent from '~/boards/components/board_content.vue';
import createDefaultClient from '~/lib/graphql';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { __ } from '~/locale';
import './models/label';
import './models/assignee';

View File

@ -2,7 +2,7 @@
import { __ } from '~/locale';
import ListLabel from './label';
import ListAssignee from './assignee';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import boardsStore from '../stores/boards_store';
import ListMilestone from './milestone';
import 'ee_else_ce/boards/models/issue';

View File

@ -1,6 +1,6 @@
import Vue from 'vue';
import { __ } from '../locale';
import createFlash from '../flash';
import { deprecatedCreateFlash as createFlash } from '../flash';
import axios from '../lib/utils/axios_utils';
import DivergenceGraph from './components/divergence_graph.vue';

View File

@ -1,7 +1,7 @@
import { escape } from 'lodash';
import axios from '../lib/utils/axios_utils';
import { s__ } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import { parseBoolean } from '../lib/utils/common_utils';
import statusCodes from '../lib/utils/http_status';
import VariableList from './ci_variable_list';

View File

@ -1,7 +1,7 @@
import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils';
import Api from '~/api';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
import { prepareDataForApi, prepareDataForDisplay, prepareEnvironments } from './utils';

View File

@ -4,7 +4,7 @@ import { GlToast } from '@gitlab/ui';
import AccessorUtilities from '~/lib/utils/accessor';
import PersistentUserCallout from '../persistent_user_callout';
import { s__, sprintf } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Poll from '../lib/utils/poll';
import initSettingsPanels from '../settings_panels';
import eventHub from './event_hub';

View File

@ -1,7 +1,7 @@
import * as Sentry from '@sentry/browser';
import Poll from '~/lib/utils/poll';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { MAX_REQUESTS } from '../constants';
import { parseIntPagination, normalizeHeaders } from '~/lib/utils/common_utils';

View File

@ -3,7 +3,7 @@
import $ from 'jquery';
import { __ } from './locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import { capitalizeFirstCharacter } from './lib/utils/text_utility';
export default function initCompareAutocomplete(limitTo = null, clickHandler = () => {}) {

View File

@ -1,7 +1,7 @@
<script>
import { GlLink, GlSprintf } from '@gitlab/ui';
import { __ } from '../../locale';
import createFlash from '../../flash';
import { deprecatedCreateFlash as createFlash } from '../../flash';
import Api from '../../api';
import state from '../state';
import Dropdown from './dropdown.vue';

View File

@ -1,4 +1,4 @@
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import service from '../services/contributors_service';
import * as types from './mutation_types';

View File

@ -1,7 +1,7 @@
import * as types from './mutation_types';
import { setAWSConfig } from '../services/aws_services_facade';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
const getErrorMessage = data => {

View File

@ -1,6 +1,6 @@
/* global gapi */
import Vue from 'vue';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import GkeProjectIdDropdown from './components/gke_project_id_dropdown.vue';
import GkeZoneDropdown from './components/gke_zone_dropdown.vue';
import GkeMachineTypeDropdown from './components/gke_machine_type_dropdown.vue';

View File

@ -1,7 +1,7 @@
/* eslint-disable no-new */
import { debounce } from 'lodash';
import axios from './lib/utils/axios_utils';
import Flash from './flash';
import { deprecatedCreateFlash as Flash } from './flash';
import DropLab from './droplab/drop_lab';
import ISetter from './droplab/plugins/input_setter';
import { __, sprintf } from './locale';

View File

@ -2,7 +2,7 @@ import $ from 'jquery';
import Vue from 'vue';
import Cookies from 'js-cookie';
import { GlEmptyState, GlLoadingIcon } from '@gitlab/ui';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import { __ } from '~/locale';
import Translate from '../vue_shared/translate';
import banner from './components/banner.vue';

View File

@ -1,6 +1,6 @@
import * as types from './mutation_types';
import Api from '~/api';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
export const requestAddFreezePeriod = ({ commit }) => {

View File

@ -1,7 +1,7 @@
<script>
import { GlLoadingIcon } from '@gitlab/ui';
import { s__ } from '~/locale';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue';
import eventHub from '../eventhub';
import DeployKeysService from '../service';

View File

@ -1,6 +1,6 @@
<script>
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import uploadDesignMutation from '../../graphql/mutations/upload_design.mutation.graphql';
import { UPLOAD_DESIGN_INVALID_FILETYPE_ERROR } from '../../utils/error_messages';
import { isValidDesignFile } from '../../utils/design_management_utils';

View File

@ -1,5 +1,5 @@
import { propertyOf } from 'lodash';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import getDesignListQuery from '../graphql/queries/get_design_list.query.graphql';
import allVersionsMixin from './all_versions';

View File

@ -2,7 +2,7 @@
import Mousetrap from 'mousetrap';
import { GlLoadingIcon, GlAlert } from '@gitlab/ui';
import { ApolloMutation } from 'vue-apollo';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { fetchPolicies } from '~/lib/graphql';
import allVersionsMixin from '../../mixins/all_versions';
import Toolbar from '../../components/toolbar/index.vue';

View File

@ -1,7 +1,7 @@
<script>
import { GlLoadingIcon, GlButton, GlAlert } from '@gitlab/ui';
import VueDraggable from 'vuedraggable';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import UploadButton from '../components/upload/button.vue';
import DeleteButton from '../components/delete_button.vue';

View File

@ -1,7 +1,7 @@
/* eslint-disable @gitlab/require-i18n-strings */
import { groupBy } from 'lodash';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { extractCurrentDiscussion, extractDesign } from './design_management_utils';
import {
ADD_IMAGE_DIFF_NOTE_ERROR,

View File

@ -1,6 +1,6 @@
<script>
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import uploadDesignMutation from '../../graphql/mutations/upload_design.mutation.graphql';
import { UPLOAD_DESIGN_INVALID_FILETYPE_ERROR } from '../../utils/error_messages';
import { isValidDesignFile } from '../../utils/design_management_utils';

View File

@ -1,5 +1,5 @@
import { propertyOf } from 'lodash';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import getDesignListQuery from '../graphql/queries/get_design_list.query.graphql';
import { extractNodes } from '../utils/design_management_utils';

View File

@ -2,7 +2,7 @@
import Mousetrap from 'mousetrap';
import { GlLoadingIcon, GlAlert } from '@gitlab/ui';
import { ApolloMutation } from 'vue-apollo';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { fetchPolicies } from '~/lib/graphql';
import allVersionsMixin from '../../mixins/all_versions';
import Toolbar from '../../components/toolbar/index.vue';

View File

@ -1,6 +1,6 @@
<script>
import { GlLoadingIcon, GlDeprecatedButton, GlAlert } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import UploadButton from '../components/upload/button.vue';
import DeleteButton from '../components/delete_button.vue';

View File

@ -1,6 +1,6 @@
/* eslint-disable @gitlab/require-i18n-strings */
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { extractCurrentDiscussion, extractDesign } from './design_management_utils';
import {
ADD_IMAGE_DIFF_NOTE_ERROR,

View File

@ -1,6 +1,6 @@
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { getLocationHash } from './lib/utils/url_utility';
import FilesCommentButton from './files_comment_button';

View File

@ -3,7 +3,7 @@
import $ from 'jquery';
import Vue from 'vue';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import { sprintf, __ } from '~/locale';
const ResolveBtn = Vue.extend({

View File

@ -1,7 +1,7 @@
/* global CommentsStore */
import Vue from 'vue';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import { __ } from '~/locale';
window.gl = window.gl || {};

View File

@ -3,8 +3,8 @@ import { mapState, mapGetters, mapActions } from 'vuex';
import { GlLoadingIcon, GlButtonGroup, GlButton, GlAlert } from '@gitlab/ui';
import Mousetrap from 'mousetrap';
import { __ } from '~/locale';
import createFlash from '~/flash';
import { getParameterByName, parseBoolean } from '~/lib/utils/common_utils';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { isSingleViewStyle } from '~/helpers/diffs_helper';

View File

@ -1,6 +1,6 @@
<script>
import { mapState, mapActions } from 'vuex';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { UNFOLD_COUNT, INLINE_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE } from '../constants';

View File

@ -4,7 +4,7 @@ import { escape } from 'lodash';
import { GlLoadingIcon } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { __, sprintf } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { hasDiff } from '~/helpers/diffs_helper';
import eventHub from '../../notes/event_hub';
import DiffFileHeader from './diff_file_header.vue';

View File

@ -3,7 +3,7 @@ import Cookies from 'js-cookie';
import Poll from '~/lib/utils/poll';
import axios from '~/lib/utils/axios_utils';
import httpStatusCodes from '~/lib/utils/http_status';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, s__ } from '~/locale';
import { handleLocationHash, historyPushState, scrollToElement } from '~/lib/utils/common_utils';
import { mergeUrlParams, getLocationHash } from '~/lib/utils/url_utility';

View File

@ -1,6 +1,6 @@
<script>
import { GlDeprecatedButton } from '@gitlab/ui';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { s__ } from '~/locale';
import emptyState from './empty_state.vue';
import eventHub from '../event_hub';

View File

@ -7,7 +7,7 @@ import EnvironmentsStore from 'ee_else_ce/environments/stores/environments_store
import Poll from '../../lib/utils/poll';
import { getParameterByName } from '../../lib/utils/common_utils';
import { s__ } from '../../locale';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import eventHub from '../event_hub';
import EnvironmentsService from '../services/environments_service';

View File

@ -12,7 +12,7 @@ import {
GlDeprecatedDropdownItem,
GlDeprecatedDropdownDivider,
} from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, sprintf, n__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';

View File

@ -1,6 +1,6 @@
import service from '../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { visitUrl } from '~/lib/utils/url_utility';
import { __ } from '~/locale';

View File

@ -1,6 +1,6 @@
import service from '../../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Poll from '~/lib/utils/poll';
import { __ } from '~/locale';

View File

@ -1,6 +1,6 @@
import Service from '../../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Poll from '~/lib/utils/poll';
import { __ } from '~/locale';

View File

@ -1,7 +1,7 @@
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { transformFrontendSettings } from '../utils';
import * as types from './mutation_types';

View File

@ -1,7 +1,7 @@
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
import { __ } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import LazyLoader from '../lazy_loader';
import { togglePopover } from '../shared/popover';

View File

@ -1,4 +1,4 @@
import createFlash from '../flash';
import { deprecatedCreateFlash as createFlash } from '../flash';
import AjaxFilter from '../droplab/plugins/ajax_filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
import DropdownUtils from './dropdown_utils';

View File

@ -1,4 +1,4 @@
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Ajax from '../droplab/plugins/ajax';
import Filter from '../droplab/plugins/filter';
import FilteredSearchDropdown from './filtered_search_dropdown';

View File

@ -1,4 +1,4 @@
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Ajax from '../droplab/plugins/ajax';
import Filter from '../droplab/plugins/filter';
import FilteredSearchDropdown from './filtered_search_dropdown';

View File

@ -3,7 +3,7 @@ import recentSearchesStorageKeys from 'ee_else_ce/filtered_search/recent_searche
import { getParameterByName, getUrlParamsArray } from '~/lib/utils/common_utils';
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
import { visitUrl } from '../lib/utils/url_utility';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import FilteredSearchContainer from './container';
import RecentSearchesRoot from './recent_searches_root';
import RecentSearchesStore from './stores/recent_searches_store';

View File

@ -4,7 +4,7 @@ import FilteredSearchContainer from '~/filtered_search/container';
import FilteredSearchVisualTokens from '~/filtered_search/filtered_search_visual_tokens';
import AjaxCache from '~/lib/utils/ajax_cache';
import DropdownUtils from '~/filtered_search/dropdown_utils';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import UsersCache from '~/lib/utils/users_cache';
import { __ } from '~/locale';
import * as Emoji from '~/emoji';

View File

@ -75,7 +75,7 @@ const removeFlashClickListener = (flashEl, fadeTransition) => {
* @param {Function} clickHandler Method to call when action is clicked on
* @param {Boolean} fadeTransition Boolean to determine whether to fade the alert out
*/
const createFlash = function createFlash(
const deprecatedCreateFlash = function deprecatedCreateFlash(
message,
type = FLASH_TYPES.ALERT,
parent = document,
@ -127,7 +127,7 @@ const createFlash = function createFlash(
* @param {Boolean} options.captureError Boolean to determine whether to send error to sentry
* @param {Object} options.error Error to be captured in sentry
*/
const newCreateFlash = function newCreateFlash({
const createFlash = function createFlash({
message,
type = FLASH_TYPES.ALERT,
parent = document,
@ -168,11 +168,11 @@ const newCreateFlash = function newCreateFlash({
export {
createFlash as default,
newCreateFlash,
deprecatedCreateFlash,
createFlashEl,
createAction,
hideFlash,
removeFlashClickListener,
FLASH_TYPES,
};
window.Flash = createFlash;
window.Flash = deprecatedCreateFlash;

View File

@ -1,7 +1,7 @@
import $ from 'jquery';
import { parseQueryStringIntoObject } from '~/lib/utils/common_utils';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
export default class GpgBadges {

View File

@ -1,6 +1,6 @@
import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import * as mutationTypes from './mutation_types';

View File

@ -1,6 +1,6 @@
import { slugify } from './lib/utils/text_utility';
import fetchGroupPathAvailability from '~/pages/groups/new/fetch_group_path_availability';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
export default class Group {

View File

@ -1,7 +1,7 @@
import $ from 'jquery';
import { __ } from '~/locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
const tooltipTitles = {
group: __('Unsubscribe at group level'),

View File

@ -1,7 +1,7 @@
<script>
import { mapActions, mapState, mapGetters } from 'vuex';
import { GlModal } from '@gitlab/ui';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf, s__ } from '~/locale';
import { modalTypes } from '../../constants';
import { trimPathComponents, getPathParent } from '../../utils';

View File

@ -1,7 +1,7 @@
<script>
import { mapState, mapGetters, mapActions } from 'vuex';
import { viewerInformationForPath } from '~/vue_shared/components/content_viewer/lib/viewer_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import ContentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
import DiffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
import {

View File

@ -1,7 +1,7 @@
import Vue from 'vue';
import IdeRouter from '~/ide/ide_router_extension';
import { joinPaths } from '~/lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { syncRouterAndStore } from './sync_router_and_store';

View File

@ -2,7 +2,7 @@ import Vue from 'vue';
import { escape } from 'lodash';
import { __, sprintf } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from './mutation_types';
import { decorateFiles } from '../lib/files';
import { stageKeys } from '../constants';

View File

@ -1,4 +1,4 @@
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import service from '../../services';
import * as types from '../mutation_types';

View File

@ -1,5 +1,5 @@
import { escape } from 'lodash';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf } from '~/locale';
import service from '../../services';
import api from '../../../api';

View File

@ -1,5 +1,5 @@
import { sprintf, __ } from '~/locale';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import httpStatusCodes from '~/lib/utils/http_status';
import * as rootTypes from '../../mutation_types';
import { createCommitPayload, createNewMergeRequestUrl } from '../../utils';

View File

@ -1,6 +1,6 @@
import axios from '~/lib/utils/axios_utils';
import httpStatus from '~/lib/utils/http_status';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from '../mutation_types';
import * as messages from '../messages';
import * as terminalService from '../../../../services/terminals';

View File

@ -1,5 +1,5 @@
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from '../mutation_types';
import * as messages from '../messages';
import { isEndingStatus } from '../utils';

View File

@ -8,7 +8,7 @@ import {
} from '~/lib/utils/common_utils';
import Poll from '~/lib/utils/poll';
import { visitUrl, objectToQuery } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import axios from '~/lib/utils/axios_utils';

View File

@ -2,7 +2,7 @@ import $ from 'jquery';
import { escape } from 'lodash';
import { __, sprintf } from './locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import { parseBoolean } from './lib/utils/common_utils';
class ImporterStatus {

View File

@ -1,6 +1,6 @@
import axios from '~/lib/utils/axios_utils';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { ERROR_MSG } from './constants';
export default class IncidentsSettingsService {

View File

@ -1,6 +1,6 @@
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
import flash from '../flash';
import { deprecatedCreateFlash as flash } from '../flash';
import { __ } from '~/locale';
import initForm from './edit';
import eventHub from './edit/event_hub';

View File

@ -1,7 +1,7 @@
import $ from 'jquery';
import { difference, intersection, union } from 'lodash';
import axios from './lib/utils/axios_utils';
import Flash from './flash';
import { deprecatedCreateFlash as Flash } from './flash';
import { __ } from './locale';
export default {

View File

@ -1,6 +1,6 @@
import $ from 'jquery';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import { s__, __ } from './locale';
import issuableInitBulkUpdateSidebar from './issuable_init_bulk_update_sidebar';

View File

@ -6,7 +6,7 @@ import {
GlSkeletonLoading,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import {
scrollToElement,

View File

@ -3,7 +3,7 @@
import $ from 'jquery';
import axios from './lib/utils/axios_utils';
import { addDelimiter } from './lib/utils/text_utility';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import CreateMergeRequestDropdown from './create_merge_request_dropdown';
import IssuablesHelper from './helpers/issuables_helper';
import { joinPaths } from '~/lib/utils/url_utility';

View File

@ -2,7 +2,7 @@
import { GlIcon, GlIntersectionObserver } from '@gitlab/ui';
import Visibility from 'visibilityjs';
import { __, s__, sprintf } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { visitUrl } from '~/lib/utils/url_utility';
import Poll from '~/lib/utils/poll';
import eventHub from '../event_hub';

View File

@ -1,7 +1,7 @@
<script>
import $ from 'jquery';
import { s__, sprintf } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import animateMixin from '../mixins/animate';
import TaskList from '../../task_list';
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';

View File

@ -3,7 +3,7 @@ import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils';
import Poll from '~/lib/utils/poll';
import { setFaviconOverlay, resetFavicon } from '~/lib/utils/common_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import {
canScroll,

View File

@ -3,7 +3,7 @@
import $ from 'jquery';
import Sortable from 'sortablejs';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import axios from './lib/utils/axios_utils';
import { __ } from './locale';

View File

@ -8,7 +8,7 @@ import { sprintf, s__, __ } from './locale';
import axios from './lib/utils/axios_utils';
import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
import CreateLabelDropdown from './create_label';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import ModalStore from './boards/stores/modal_store';
import boardsStore from './boards/stores/boards_store';
import { isScopedLabel } from '~/lib/utils/common_utils';

View File

@ -46,6 +46,19 @@ import { normalizeHeaders } from './common_utils';
* 4. If HTTP response is 200, we poll.
* 5. If HTTP response is different from 200, we stop polling.
*
* @example
* // With initial delay (for, for example, reducing unnecessary requests)
*
* const poll = new Poll({
* resource: this.service,
* method: 'fetchNotes',
* successCallback: () => {},
* errorCallback: () => {},
* });
*
* // Performs the first request in 2.5s and then uses the `Poll-Interval` header.
* poll.makeDelayedRequest(2500);
*
*/
export default class Poll {
constructor(options = {}) {
@ -74,6 +87,10 @@ export default class Poll {
this.options.successCallback(response);
}
makeDelayedRequest(delay = 0) {
this.timeoutID = setTimeout(() => this.makeRequest(), delay);
}
makeRequest() {
const { resource, method, data, errorCallback, notificationCallback } = this.options;

View File

@ -21,7 +21,7 @@ import { getLocationHash, visitUrl } from './lib/utils/url_utility';
// everything else
import loadAwardsHandler from './awards_handler';
import Flash, { removeFlashClickListener } from './flash';
import { deprecatedCreateFlash as Flash, removeFlashClickListener } from './flash';
import './gl_dropdown';
import initTodoToggle from './header';
import initImporterStatus from './importer_status';

View File

@ -1,6 +1,6 @@
import Sortable from 'sortablejs';
import { s__ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import {
getBoardSortableDefaultOptions,
sortableStart,

Some files were not shown because too many files have changed in this diff Show More