debian-mirror-gitlab/app/assets/javascripts/logs/stores/state.js

67 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-04-08 14:13:33 +05:30
import { timeRanges, defaultTimeRange } from '~/vue_shared/constants';
import { convertToFixedRange } from '~/lib/utils/datetime_range';
export default () => ({
/**
* Full text search
*/
search: '',
/**
* Time range (Show last)
*/
timeRange: {
options: timeRanges,
// Selected time range, can be fixed or relative
selected: defaultTimeRange,
// Current time range, must be fixed
current: convertToFixedRange(defaultTimeRange),
2020-04-22 19:07:51 +05:30
invalidWarning: false,
2020-04-08 14:13:33 +05:30
},
/**
* Environments list information
*/
environments: {
options: [],
isLoading: false,
current: null,
2020-04-22 19:07:51 +05:30
fetchError: false,
2020-04-08 14:13:33 +05:30
},
2020-07-28 23:09:34 +05:30
/**
* Managed apps list information
*/
managedApps: {
options: [],
isLoading: false,
current: null,
fetchError: false,
},
2020-04-08 14:13:33 +05:30
/**
* Logs including trace
*/
logs: {
lines: [],
isLoading: false,
/**
* Logs `cursor` represents the current pagination position,
* Should be sent in next batch (page) of logs to be fetched
*/
cursor: null,
isComplete: false,
2020-04-22 19:07:51 +05:30
fetchError: false,
2020-04-08 14:13:33 +05:30
},
/**
* Pods list information
*/
pods: {
options: [],
current: null,
},
});