xref: /openbmc/webui-vue/src/components/Mixins/BVPaginationMixin.js (revision de23ea23d88451a2fa2774ec72053772603c23ae)
1*de23ea23SSurya Vimport i18n from '@/i18n';
2ba91c499SSurenNewareexport const currentPage = 1;
3ba91c499SSurenNewareexport const perPage = 20;
4ba91c499SSurenNewareexport const itemsPerPageOptions = [
5f9832b0eSYoshie Muranaka  {
6f9832b0eSYoshie Muranaka    value: 10,
7602e98aaSDerick Montague    text: '10',
8f9832b0eSYoshie Muranaka  },
9f9832b0eSYoshie Muranaka  {
10f9832b0eSYoshie Muranaka    value: 20,
11602e98aaSDerick Montague    text: '20',
12f9832b0eSYoshie Muranaka  },
13f9832b0eSYoshie Muranaka  {
14f9832b0eSYoshie Muranaka    value: 30,
15602e98aaSDerick Montague    text: '30',
16f9832b0eSYoshie Muranaka  },
17f9832b0eSYoshie Muranaka  {
18f9832b0eSYoshie Muranaka    value: 40,
19602e98aaSDerick Montague    text: '40',
20f9832b0eSYoshie Muranaka  },
21f9832b0eSYoshie Muranaka  {
22f9832b0eSYoshie Muranaka    value: 0,
23*de23ea23SSurya V    text: i18n.global.t('global.table.viewAll'),
24602e98aaSDerick Montague  },
25ba91c499SSurenNeware];
26ba91c499SSurenNewareconst BVPaginationMixin = {
27f9832b0eSYoshie Muranaka  methods: {
28f9832b0eSYoshie Muranaka    getTotalRowCount(count) {
29f9832b0eSYoshie Muranaka      return this.perPage === 0 ? 0 : count;
30602e98aaSDerick Montague    },
31602e98aaSDerick Montague  },
32f9832b0eSYoshie Muranaka};
33f9832b0eSYoshie Muranaka
34f9832b0eSYoshie Muranakaexport default BVPaginationMixin;
35