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

71 lines
1.4 KiB
JavaScript
Raw Normal View History

2018-11-18 11:00:15 +05:30
import { s__ } from '~/locale';
import { fieldTypes } from '../constants';
export default () => ({
endpoint: null,
isLoading: false,
hasError: false,
status: null,
summary: {
total: 0,
resolved: 0,
failed: 0,
2020-03-09 13:42:32 +05:30
errored: 0,
2018-11-18 11:00:15 +05:30
},
/**
* Each report will have the following format:
* {
* name: {String},
* summary: {
* total: {Number},
* resolved: {Number},
* failed: {Number},
2020-03-09 13:42:32 +05:30
* errored: {Number},
2018-11-18 11:00:15 +05:30
* },
* new_failures: {Array.<Object>},
* resolved_failures: {Array.<Object>},
* existing_failures: {Array.<Object>},
2020-03-09 13:42:32 +05:30
* new_errors: {Array.<Object>},
* resolved_errors: {Array.<Object>},
* existing_errors: {Array.<Object>},
2018-11-18 11:00:15 +05:30
* }
*/
reports: [],
modal: {
title: null,
data: {
class: {
value: null,
text: s__('Reports|Class'),
type: fieldTypes.link,
},
2019-09-04 21:01:54 +05:30
classname: {
value: null,
text: s__('Reports|Classname'),
type: fieldTypes.text,
},
2018-11-18 11:00:15 +05:30
execution_time: {
value: null,
text: s__('Reports|Execution time'),
2020-03-09 13:42:32 +05:30
type: fieldTypes.seconds,
2018-11-18 11:00:15 +05:30
},
failure: {
value: null,
text: s__('Reports|Failure'),
type: fieldTypes.codeBock,
},
system_output: {
value: null,
text: s__('Reports|System output'),
type: fieldTypes.codeBock,
},
},
},
});