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,
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Each report will have the following format:
|
|
|
|
* {
|
|
|
|
* name: {String},
|
|
|
|
* summary: {
|
|
|
|
* total: {Number},
|
|
|
|
* resolved: {Number},
|
|
|
|
* failed: {Number},
|
|
|
|
* },
|
|
|
|
* new_failures: {Array.<Object>},
|
|
|
|
* resolved_failures: {Array.<Object>},
|
|
|
|
* existing_failures: {Array.<Object>},
|
|
|
|
* }
|
|
|
|
*/
|
|
|
|
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'),
|
|
|
|
type: fieldTypes.miliseconds,
|
|
|
|
},
|
|
|
|
failure: {
|
|
|
|
value: null,
|
|
|
|
text: s__('Reports|Failure'),
|
|
|
|
type: fieldTypes.codeBock,
|
|
|
|
},
|
|
|
|
system_output: {
|
|
|
|
value: null,
|
|
|
|
text: s__('Reports|System output'),
|
|
|
|
type: fieldTypes.codeBock,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|