mirror of https://github.com/statping/statping
removed the empty string params from filter
parent
48b2de6dc0
commit
4b97ba3b21
|
@ -57,6 +57,7 @@ import DowntimesList from './DowntimesList.vue';
|
||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import DowntimesFilterForm from '../../forms/DowntimeFilters.vue';
|
import DowntimesFilterForm from '../../forms/DowntimeFilters.vue';
|
||||||
import Pagination from '../Elements/Pagination.vue';
|
import Pagination from '../Elements/Pagination.vue';
|
||||||
|
import { removeEmptyParams } from '../../forms/Downtime.vue';
|
||||||
|
|
||||||
export const initialParams = {
|
export const initialParams = {
|
||||||
serviceId: '',
|
serviceId: '',
|
||||||
|
@ -142,8 +143,10 @@ export default {
|
||||||
endSec = convertToSec(end) + (60 * 60 * 23 + 59 * 60 + 59); // adding end of time for that particular date.
|
endSec = convertToSec(end) + (60 * 60 * 23 + 59 * 60 + 59); // adding end of time for that particular date.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const payload = removeEmptyParams({ ...params, start: startSec, end: endSec });
|
||||||
|
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
await this.$store.dispatch({ type: 'getDowntimes', payload: { ...params, start: startSec, end: endSec } });
|
await this.$store.dispatch({ type: 'getDowntimes', payload });
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
},
|
},
|
||||||
getNextDowntimes: function () {
|
getNextDowntimes: function () {
|
||||||
|
|
|
@ -23,6 +23,7 @@ export default new Vuex.Store({
|
||||||
oauth: {},
|
oauth: {},
|
||||||
token: null,
|
token: null,
|
||||||
services: [],
|
services: [],
|
||||||
|
downtimes: [],
|
||||||
service: null,
|
service: null,
|
||||||
groups: [],
|
groups: [],
|
||||||
messages: [],
|
messages: [],
|
||||||
|
|
Loading…
Reference in New Issue