diff options
Diffstat (limited to 'app/assets/javascripts/analytics/instance_statistics')
4 files changed, 11 insertions, 11 deletions
diff --git a/app/assets/javascripts/analytics/instance_statistics/components/instance_statistics_count_chart.vue b/app/assets/javascripts/analytics/instance_statistics/components/instance_statistics_count_chart.vue index a9bd1bb2f41..620f38bd50f 100644 --- a/app/assets/javascripts/analytics/instance_statistics/components/instance_statistics_count_chart.vue +++ b/app/assets/javascripts/analytics/instance_statistics/components/instance_statistics_count_chart.vue @@ -60,13 +60,13 @@ export default { return Object.values(this.errors); }, isLoading() { - return some(this.$apollo.queries, query => query?.loading); + return some(this.$apollo.queries, (query) => query?.loading); }, allQueriesFailed() { - return every(this.errorMessages, message => message.length); + return every(this.errorMessages, (message) => message.length); }, hasLoadingErrors() { - return some(this.errorMessages, message => message.length); + return some(this.errorMessages, (message) => message.length); }, errorMessage() { // show the generic loading message if all requests fail @@ -179,7 +179,7 @@ export default { }; }, }) - .catch(error => this.handleError({ identifier, error, message: errorMessage })); + .catch((error) => this.handleError({ identifier, error, message: errorMessage })); }, }, }; diff --git a/app/assets/javascripts/analytics/instance_statistics/components/projects_and_groups_chart.vue b/app/assets/javascripts/analytics/instance_statistics/components/projects_and_groups_chart.vue index e8e35c22fe1..46cc05fc124 100644 --- a/app/assets/javascripts/analytics/instance_statistics/components/projects_and_groups_chart.vue +++ b/app/assets/javascripts/analytics/instance_statistics/components/projects_and_groups_chart.vue @@ -11,7 +11,7 @@ import latestGroupsQuery from '../graphql/queries/groups.query.graphql'; import latestProjectsQuery from '../graphql/queries/projects.query.graphql'; import { getAverageByMonth } from '../utils'; -const sortByDate = data => sortBy(data, item => new Date(item[0]).getTime()); +const sortByDate = (data) => sortBy(data, (item) => new Date(item[0]).getTime()); const averageAndSortData = (data = [], maxDataPoints) => { const averaged = getAverageByMonth( @@ -148,7 +148,7 @@ export default { name: this.$options.i18n.xAxisTitle, type: 'category', axisLabel: { - formatter: value => { + formatter: (value) => { return formatDateAsMonth(value); }, }, @@ -189,7 +189,7 @@ export default { .fetchMore({ variables: { first: this.totalDataPoints, after: pageInfo.endCursor }, updateQuery: (previousResult, { fetchMoreResult }) => { - const results = produce(fetchMoreResult, newData => { + const results = produce(fetchMoreResult, (newData) => { // eslint-disable-next-line no-param-reassign newData[dataKey].nodes = [ ...previousResult[dataKey].nodes, @@ -199,7 +199,7 @@ export default { return results; }, }) - .catch(error => { + .catch((error) => { this.handleError({ error, message: errorMessage, dataKey }); }); } diff --git a/app/assets/javascripts/analytics/instance_statistics/components/users_chart.vue b/app/assets/javascripts/analytics/instance_statistics/components/users_chart.vue index a4a1d40b70b..03462113630 100644 --- a/app/assets/javascripts/analytics/instance_statistics/components/users_chart.vue +++ b/app/assets/javascripts/analytics/instance_statistics/components/users_chart.vue @@ -10,7 +10,7 @@ import { formatDateAsMonth } from '~/lib/utils/datetime_utility'; import usersQuery from '../graphql/queries/users.query.graphql'; import { getAverageByMonth } from '../utils'; -const sortByDate = data => sortBy(data, item => new Date(item[0]).getTime()); +const sortByDate = (data) => sortBy(data, (item) => new Date(item[0]).getTime()); export default { name: 'UsersChart', @@ -106,7 +106,7 @@ export default { .fetchMore({ variables: { first: this.totalDataPoints, after: this.pageInfo.endCursor }, updateQuery: (previousResult, { fetchMoreResult }) => { - return produce(fetchMoreResult, newUsers => { + return produce(fetchMoreResult, (newUsers) => { // eslint-disable-next-line no-param-reassign newUsers.users.nodes = [...previousResult.users.nodes, ...newUsers.users.nodes]; }); diff --git a/app/assets/javascripts/analytics/instance_statistics/utils.js b/app/assets/javascripts/analytics/instance_statistics/utils.js index e1fa5d155a2..396962ffad6 100644 --- a/app/assets/javascripts/analytics/instance_statistics/utils.js +++ b/app/assets/javascripts/analytics/instance_statistics/utils.js @@ -29,7 +29,7 @@ export function getAverageByMonth(items = [], options = {}) { return { ...memo, [month]: { sum: count, recordCount: 1 } }; }, {}); - return Object.keys(itemsMap).map(month => { + return Object.keys(itemsMap).map((month) => { const { sum, recordCount } = itemsMap[month]; const avg = sum / recordCount; if (shouldRound) { |