2019-09-12 09:34:12 +00:00
|
|
|
import { isNewJobLogActive } from '../store/utils';
|
|
|
|
|
2018-09-03 07:49:52 +00:00
|
|
|
export default () => ({
|
|
|
|
jobEndpoint: null,
|
|
|
|
traceEndpoint: null,
|
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
// sidebar
|
|
|
|
isSidebarOpen: true,
|
2018-09-03 07:49:52 +00:00
|
|
|
|
|
|
|
isLoading: false,
|
|
|
|
hasError: false,
|
|
|
|
job: {},
|
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
// scroll buttons state
|
|
|
|
isScrollBottomDisabled: true,
|
|
|
|
isScrollTopDisabled: true,
|
2018-09-03 07:49:52 +00:00
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
// Used to check if we should keep the automatic scroll
|
|
|
|
isScrolledToBottomBeforeReceivingTrace: true,
|
2018-09-03 07:49:52 +00:00
|
|
|
|
2019-09-12 09:34:12 +00:00
|
|
|
trace: isNewJobLogActive() ? [] : '',
|
2018-09-03 07:49:52 +00:00
|
|
|
isTraceComplete: false,
|
2018-10-17 10:34:19 +00:00
|
|
|
traceSize: 0,
|
2018-09-03 07:49:52 +00:00
|
|
|
isTraceSizeVisible: false,
|
2020-02-04 12:09:00 +00:00
|
|
|
traceTimeout: 0,
|
2018-09-03 07:49:52 +00:00
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
// used as a query parameter to fetch the trace
|
2018-09-03 07:49:52 +00:00
|
|
|
traceState: null,
|
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
// sidebar dropdown & list of jobs
|
2018-09-03 07:49:52 +00:00
|
|
|
isLoadingJobs: false,
|
2018-10-26 07:49:01 +00:00
|
|
|
selectedStage: '',
|
2018-09-03 07:49:52 +00:00
|
|
|
stages: [],
|
|
|
|
jobs: [],
|
|
|
|
});
|