2018-10-12 13:13:41 -04:00
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
2018-09-03 03:49:52 -04:00
|
|
|
export default () => ({
|
|
|
|
jobEndpoint: null,
|
|
|
|
traceEndpoint: null,
|
|
|
|
|
2018-10-17 06:34:19 -04:00
|
|
|
// sidebar
|
|
|
|
isSidebarOpen: true,
|
2018-09-03 03:49:52 -04:00
|
|
|
|
|
|
|
isLoading: false,
|
|
|
|
hasError: false,
|
|
|
|
job: {},
|
|
|
|
|
2018-10-17 06:34:19 -04:00
|
|
|
// scroll buttons state
|
|
|
|
isScrollBottomDisabled: true,
|
|
|
|
isScrollTopDisabled: true,
|
2018-09-03 03:49:52 -04:00
|
|
|
|
2018-10-17 06:34:19 -04:00
|
|
|
// Used to check if we should keep the automatic scroll
|
|
|
|
isScrolledToBottomBeforeReceivingTrace: true,
|
2018-09-03 03:49:52 -04:00
|
|
|
|
2018-10-17 06:34:19 -04:00
|
|
|
trace: '',
|
2018-09-03 03:49:52 -04:00
|
|
|
isTraceComplete: false,
|
2018-10-17 06:34:19 -04:00
|
|
|
traceSize: 0,
|
2018-09-03 03:49:52 -04:00
|
|
|
isTraceSizeVisible: false,
|
|
|
|
|
2018-10-17 06:34:19 -04:00
|
|
|
// used as a query parameter to fetch the trace
|
2018-09-03 03:49:52 -04:00
|
|
|
traceState: null,
|
|
|
|
|
2018-10-17 06:34:19 -04:00
|
|
|
// sidebar dropdown & list of jobs
|
2018-09-03 03:49:52 -04:00
|
|
|
isLoadingStages: false,
|
|
|
|
isLoadingJobs: false,
|
2018-10-12 13:13:41 -04:00
|
|
|
selectedStage: __('More'),
|
2018-09-03 03:49:52 -04:00
|
|
|
stages: [],
|
|
|
|
jobs: [],
|
|
|
|
});
|