diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/contributors | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/contributors')
4 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/contributors/components/contributors.vue b/app/assets/javascripts/contributors/components/contributors.vue index 3de1b2f0707..86580aa170b 100644 --- a/app/assets/javascripts/contributors/components/contributors.vue +++ b/app/assets/javascripts/contributors/components/contributors.vue @@ -39,7 +39,7 @@ export default { ...mapGetters(['showChart', 'parsedData']), masterChartData() { const data = {}; - this.xAxisRange.forEach(date => { + this.xAxisRange.forEach((date) => { data[date] = this.parsedData.total[date] || 0; }); return [ @@ -67,7 +67,7 @@ export default { const maxNumberOfIndividualContributorsCharts = 100; return Object.keys(this.parsedData.byAuthorEmail) - .map(email => { + .map((email) => { const author = this.parsedData.byAuthorEmail[email]; return { name: author.name, @@ -76,7 +76,7 @@ export default { dates: [ { name: __('Commits'), - data: this.xAxisRange.map(date => [date, author.dates[date] || 0]), + data: this.xAxisRange.map((date) => [date, author.dates[date] || 0]), }, ], }; @@ -101,7 +101,7 @@ export default { }, individualChartYAxisMax() { return this.individualChartsData.reduce((acc, item) => { - const values = item.dates[0].data.map(value => value[1]); + const values = item.dates[0].data.map((value) => value[1]); return Math.max(acc, ...values); }, 0); }, @@ -150,7 +150,7 @@ export default { }, setSvg(name) { return getSvgIconPathContent(name) - .then(path => { + .then((path) => { if (path) { this.$set(this.svgs, name, `path://${path}`); } @@ -177,7 +177,7 @@ export default { this.individualCharts.push(chart); }, setIndividualChartsZoom(options) { - this.charts.forEach(chart => + this.charts.forEach((chart) => chart.setOption( { dataZoom: { diff --git a/app/assets/javascripts/contributors/stores/actions.js b/app/assets/javascripts/contributors/stores/actions.js index f941c5aa944..72aae3af692 100644 --- a/app/assets/javascripts/contributors/stores/actions.js +++ b/app/assets/javascripts/contributors/stores/actions.js @@ -8,8 +8,8 @@ export const fetchChartData = ({ commit }, endpoint) => { return service .fetchChartData(endpoint) - .then(res => res.data) - .then(data => { + .then((res) => res.data) + .then((data) => { commit(types.SET_CHART_DATA, data); commit(types.SET_LOADING_STATE, false); }) diff --git a/app/assets/javascripts/contributors/stores/getters.js b/app/assets/javascripts/contributors/stores/getters.js index 9022179d6c7..45b569066f8 100644 --- a/app/assets/javascripts/contributors/stores/getters.js +++ b/app/assets/javascripts/contributors/stores/getters.js @@ -1,6 +1,6 @@ -export const showChart = state => Boolean(!state.loading && state.chartData); +export const showChart = (state) => Boolean(!state.loading && state.chartData); -export const parsedData = state => { +export const parsedData = (state) => { const byAuthorEmail = {}; const total = {}; diff --git a/app/assets/javascripts/contributors/utils.js b/app/assets/javascripts/contributors/utils.js index 7d8932ce495..fa3f8154dfe 100644 --- a/app/assets/javascripts/contributors/utils.js +++ b/app/assets/javascripts/contributors/utils.js @@ -9,7 +9,7 @@ import { getMonthNames } from '~/lib/utils/datetime_utility'; * xAxisLabelFormatter('02-12-2019') will return 'Feb' * xAxisLabelFormatter('07-12-2019') will return 'Jul' */ -export const xAxisLabelFormatter = val => { +export const xAxisLabelFormatter = (val) => { const date = new Date(val); const month = date.getUTCMonth(); const year = date.getUTCFullYear(); @@ -21,7 +21,7 @@ export const xAxisLabelFormatter = val => { * @param {Date} * @returns {String} - formatted value */ -export const dateFormatter = date => { +export const dateFormatter = (date) => { const year = date.getUTCFullYear(); const month = date.getUTCMonth(); const day = date.getUTCDate(); |