Commit 731f4016 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch...

Merge branch '196659-replace-underscore-with-lodash-for-app-assets-javascripts-create_cluster' into 'master'

Replace underscore with lodash for ./../create_cluster

Closes #196659

See merge request gitlab-org/gitlab!27244
parents 35c1ce5f c36b7aa0
<script> <script>
import { createNamespacedHelpers, mapState, mapActions } from 'vuex'; import { createNamespacedHelpers, mapState, mapActions } from 'vuex';
import _ from 'underscore'; import { escape as esc } from 'lodash';
import { GlFormInput, GlFormCheckbox } from '@gitlab/ui'; import { GlFormInput, GlFormCheckbox } from '@gitlab/ui';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
import ClusterFormDropdown from '~/create_cluster/components/cluster_form_dropdown.vue'; import ClusterFormDropdown from '~/create_cluster/components/cluster_form_dropdown.vue';
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
: s__('ClusterIntegration|Create Kubernetes cluster'); : s__('ClusterIntegration|Create Kubernetes cluster');
}, },
kubernetesIntegrationHelpText() { kubernetesIntegrationHelpText() {
const escapedUrl = _.escape(this.kubernetesIntegrationHelpPath); const escapedUrl = esc(this.kubernetesIntegrationHelpPath);
return sprintf( return sprintf(
s__( s__(
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
); );
}, },
gitlabManagedHelpText() { gitlabManagedHelpText() {
const escapedUrl = _.escape(this.gitlabManagedClusterHelpPath); const escapedUrl = esc(this.gitlabManagedClusterHelpPath);
return sprintf( return sprintf(
s__( s__(
......
<script> <script>
import { GlFormInput } from '@gitlab/ui'; import { GlFormInput } from '@gitlab/ui';
import _ from 'underscore'; import { escape as esc } from 'lodash';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { sprintf, s__, __ } from '~/locale'; import { sprintf, s__, __ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
: s__('ClusterIntegration|Authenticate with AWS'); : s__('ClusterIntegration|Authenticate with AWS');
}, },
accountAndExternalIdsHelpText() { accountAndExternalIdsHelpText() {
const escapedUrl = _.escape(this.accountAndExternalIdsHelpPath); const escapedUrl = esc(this.accountAndExternalIdsHelpPath);
return sprintf( return sprintf(
s__( s__(
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
); );
}, },
provisionRoleArnHelpText() { provisionRoleArnHelpText() {
const escapedUrl = _.escape(this.createRoleArnHelpPath); const escapedUrl = esc(this.createRoleArnHelpPath);
return sprintf( return sprintf(
s__( s__(
......
import _ from 'underscore';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue'; import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue';
import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue'; import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue';
...@@ -49,7 +48,7 @@ export default { ...@@ -49,7 +48,7 @@ export default {
methods: { methods: {
fetchSuccessHandler() { fetchSuccessHandler() {
if (this.defaultValue) { if (this.defaultValue) {
const itemToSelect = _.find(this.items, item => item.name === this.defaultValue); const itemToSelect = this.items.find(item => item.name === this.defaultValue);
if (itemToSelect) { if (itemToSelect) {
this.setItem(itemToSelect.name); this.setItem(itemToSelect.name);
......
<script> <script>
import _ from 'underscore'; import { escape as esc } from 'lodash';
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
s__(message), s__(message),
{ {
docsLinkEnd: '&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>', docsLinkEnd: '&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>',
docsLinkStart: `<a href="${_.escape( docsLinkStart: `<a href="${esc(
this.docsUrl, this.docsUrl,
)}" target="_blank" rel="noopener noreferrer">`, )}" target="_blank" rel="noopener noreferrer">`,
}, },
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
...mapActions({ setItem: 'setProject' }), ...mapActions({ setItem: 'setProject' }),
fetchSuccessHandler() { fetchSuccessHandler() {
if (this.defaultValue) { if (this.defaultValue) {
const projectToSelect = _.find(this.items, item => item.projectId === this.defaultValue); const projectToSelect = this.items.find(item => item.projectId === this.defaultValue);
if (projectToSelect) { if (projectToSelect) {
this.setItem(projectToSelect); this.setItem(projectToSelect);
......
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