Commit d7d77469 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'egekzt-master-patch-77423' into 'master'

Update fetchSortedData in alerts_list.vue

See merge request gitlab-org/gitlab!82212
parents e71e7bc2 54ca6190
...@@ -15,7 +15,7 @@ import { ...@@ -15,7 +15,7 @@ import {
import produce from 'immer'; import produce from 'immer';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
import getAlertsQuery from '~/graphql_shared/queries/get_alerts.query.graphql'; import getAlertsQuery from '~/graphql_shared/queries/get_alerts.query.graphql';
import { convertToSnakeCase } from '~/lib/utils/text_utility'; import { sortObjectToString } from '~/lib/utils/table_utility';
import { joinPaths } from '~/lib/utils/url_utility'; import { joinPaths } from '~/lib/utils/url_utility';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { PAGE_SIZE } from 'ee/threat_monitoring/constants'; import { PAGE_SIZE } from 'ee/threat_monitoring/constants';
...@@ -138,10 +138,7 @@ export default { ...@@ -138,10 +138,7 @@ export default {
} }
}, },
fetchSortedData({ sortBy, sortDesc }) { fetchSortedData({ sortBy, sortDesc }) {
const sortingDirection = sortDesc ? 'DESC' : 'ASC'; this.sort = sortObjectToString({ sortBy, sortDesc });
const sortingColumn = convertToSnakeCase(sortBy).toUpperCase();
this.sort = `${sortingColumn}_${sortingDirection}`;
}, },
getIssueState({ issue: { state } }) { getIssueState({ issue: { state } }) {
return state === 'closed' ? `(${this.$options.i18n.CLOSED})` : ''; return state === 'closed' ? `(${this.$options.i18n.CLOSED})` : '';
......
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