added minTraceDuration and maxTraceDuration to app.ts

This commit is contained in:
Peter Olu 2022-05-19 00:38:26 +01:00
parent db9d6ddfe5
commit f5b98fea30

View File

@ -25,6 +25,8 @@ import { TimeType } from "@/constants/data";
/*global Nullable*/ /*global Nullable*/
interface AppState { interface AppState {
durationRow: any; durationRow: any;
minTraceDuration: string;
maxTraceDuration: string;
utc: string; utc: string;
utcHour: number; utcHour: number;
utcMin: number; utcMin: number;
@ -44,6 +46,8 @@ export const appStore = defineStore({
step: TimeType.MINUTE_TIME, step: TimeType.MINUTE_TIME,
}, },
utc: "", utc: "",
minTraceDuration: "",
maxTraceDuration: "",
utcHour: 0, utcHour: 0,
utcMin: 0, utcMin: 0,
eventStack: [], eventStack: [],
@ -108,6 +112,12 @@ export const appStore = defineStore({
}, },
}, },
actions: { actions: {
setMinTraceDuration(data:string){
this.minTraceDuration = data
},
setMaxTraceDuration(data:string){
this.maxTraceDuration = data
},
setDuration(data: Duration): void { setDuration(data: Duration): void {
this.durationRow = data; this.durationRow = data;
if ((window as any).axiosCancel.length !== 0) { if ((window as any).axiosCancel.length !== 0) {