xref: /openbmc/webui-vue/src/components/Mixins/BVPaginationMixin.js (revision 7d6b44cb263da09e575c7cb28cab88c1eb339c7b)
1//import i18n from '@/i18n';
2export const currentPage = 1;
3export const perPage = 20;
4export const itemsPerPageOptions = [
5  {
6    value: 10,
7    text: '10',
8  },
9  {
10    value: 20,
11    text: '20',
12  },
13  {
14    value: 30,
15    text: '30',
16  },
17  {
18    value: 40,
19    text: '40',
20  },
21  {
22    value: 0,
23    //text: i18n.$t('global.table.viewAll'),
24    text: 'global.table.viewAll',
25  },
26];
27const BVPaginationMixin = {
28  methods: {
29    getTotalRowCount(count) {
30      return this.perPage === 0 ? 0 : count;
31    },
32  },
33};
34
35export default BVPaginationMixin;
36