debian-mirror-gitlab/app/assets/javascripts/jobs/store/state.js

33 lines
620 B
JavaScript
Raw Normal View History

2018-11-20 20:47:30 +05:30
export default () => ({
jobEndpoint: null,
traceEndpoint: null,
2018-12-13 13:39:08 +05:30
// sidebar
isSidebarOpen: true,
2018-11-20 20:47:30 +05:30
isLoading: false,
hasError: false,
job: {},
2018-12-13 13:39:08 +05:30
// scroll buttons state
isScrollBottomDisabled: true,
isScrollTopDisabled: true,
2018-11-20 20:47:30 +05:30
2018-12-13 13:39:08 +05:30
// Used to check if we should keep the automatic scroll
isScrolledToBottomBeforeReceivingTrace: true,
2018-11-20 20:47:30 +05:30
2018-12-13 13:39:08 +05:30
trace: '',
2018-11-20 20:47:30 +05:30
isTraceComplete: false,
2018-12-13 13:39:08 +05:30
traceSize: 0,
2018-11-20 20:47:30 +05:30
isTraceSizeVisible: false,
2018-12-13 13:39:08 +05:30
// used as a query parameter to fetch the trace
2018-11-20 20:47:30 +05:30
traceState: null,
2018-12-13 13:39:08 +05:30
// sidebar dropdown & list of jobs
2018-11-20 20:47:30 +05:30
isLoadingJobs: false,
2018-12-05 23:21:45 +05:30
selectedStage: '',
2018-11-20 20:47:30 +05:30
stages: [],
jobs: [],
});