Commit 55d0427e authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '210262-replace-underscore-with-lodash-for-ee-app-assets-javascripts-environments_dashboard' into 'master'

Replace underscore with lodash for environments_dashboard components

Closes #210262

See merge request gitlab-org/gitlab!27177
parents 91bef530 0a9ded0f
<script>
import _ from 'underscore';
import { isEmpty } from 'lodash';
import { mapState, mapActions } from 'vuex';
import {
GlModal,
......@@ -82,7 +82,7 @@ export default {
return this.searchCount > 0;
},
okDisabled() {
return _.isEmpty(this.selectedProjects);
return isEmpty(this.selectedProjects);
},
},
created() {
......
<script>
import _ from 'underscore';
import { escape as esc, isEmpty } from 'lodash';
import { GlTooltipDirective, GlLink, GlBadge } from '@gitlab/ui';
import Alerts from 'ee/vue_shared/dashboards/components/alerts.vue';
import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue';
......@@ -61,21 +61,21 @@ export default {
};
},
user() {
return this.lastDeployment && !_.isEmpty(this.lastDeployment.user)
return this.lastDeployment && !isEmpty(this.lastDeployment.user)
? this.lastDeployment.user
: null;
},
lastPipeline() {
return !_.isEmpty(this.environment.last_pipeline) ? this.environment.last_pipeline : null;
return !isEmpty(this.environment.last_pipeline) ? this.environment.last_pipeline : null;
},
lastDeployment() {
return !_.isEmpty(this.environment.last_deployment) ? this.environment.last_deployment : null;
return !isEmpty(this.environment.last_deployment) ? this.environment.last_deployment : null;
},
deployable() {
return this.lastDeployment ? this.lastDeployment.deployable : null;
},
commit() {
return !_.isEmpty(this.lastDeployment.commit) ? this.lastDeployment.commit : {};
return !isEmpty(this.lastDeployment.commit) ? this.lastDeployment.commit : {};
},
jobTooltip() {
return this.deployable
......@@ -83,7 +83,7 @@ export default {
: s__('EnvironmentDashboard|Created through the Deployment API');
},
commitRef() {
return this.lastDeployment && !_.isEmpty(this.lastDeployment.commit)
return this.lastDeployment && !isEmpty(this.lastDeployment.commit)
? {
...this.lastDeployment.commit,
...this.lastDeployment.ref,
......@@ -95,7 +95,7 @@ export default {
return (
this.commit.author || {
avatar_url: this.commit.author_gravatar_url,
path: `mailto:${_.escape(this.commit.author_email)}`,
path: `mailto:${esc(this.commit.author_email)}`,
username: this.commit.author_name,
}
);
......
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