Commit ceee3d16 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch...

Merge branch '196660-replace-underscore-with-lodash-for-app-assets-javascripts-mirrors' into 'master'

Resolve "Replace underscore with lodash for ./app/assets/javascripts/mirrors"

Closes #196660

See merge request gitlab-org/gitlab!24967
parents c65a1247 538ece0f
import $ from 'jquery'; import $ from 'jquery';
import _ from 'underscore'; import { debounce } from 'lodash';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Flash from '~/flash'; import Flash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
...@@ -62,7 +62,7 @@ export default class MirrorRepos { ...@@ -62,7 +62,7 @@ export default class MirrorRepos {
} }
registerUpdateListeners() { registerUpdateListeners() {
this.debouncedUpdateUrl = _.debounce(() => this.updateUrl(), 200); this.debouncedUpdateUrl = debounce(() => this.updateUrl(), 200);
this.$urlInput.on('input', () => this.debouncedUpdateUrl()); this.$urlInput.on('input', () => this.debouncedUpdateUrl());
this.$protectedBranchesInput.on('change', () => this.updateProtectedBranches()); this.$protectedBranchesInput.on('change', () => this.updateProtectedBranches());
this.$table.on('click', '.js-delete-mirror', event => this.deleteMirror(event)); this.$table.on('click', '.js-delete-mirror', event => this.deleteMirror(event));
......
import $ from 'jquery'; import $ from 'jquery';
import _ from 'underscore'; import { escape as esc } from 'lodash';
import { __ } from '~/locale'; import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import Flash from '~/flash'; import Flash from '~/flash';
...@@ -162,7 +162,7 @@ export default class SSHMirror { ...@@ -162,7 +162,7 @@ export default class SSHMirror {
const $fingerprintsList = this.$hostKeysInformation.find('.js-fingerprints-list'); const $fingerprintsList = this.$hostKeysInformation.find('.js-fingerprints-list');
let fingerprints = ''; let fingerprints = '';
sshHostKeys.fingerprints.forEach(fingerprint => { sshHostKeys.fingerprints.forEach(fingerprint => {
const escFingerprints = _.escape(fingerprint.fingerprint); const escFingerprints = esc(fingerprint.fingerprint);
fingerprints += `<code>${escFingerprints}</code>`; fingerprints += `<code>${escFingerprints}</code>`;
}); });
......
---
title: Replace underscore with lodash for ./app/assets/javascripts/mirrors
merge_request: 24967
author: Jacopo Beschi @jacopo-beschi
type: changed
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