debian-mirror-gitlab/app/assets/javascripts/logs/stores/getters.js

10 lines
347 B
JavaScript
Raw Normal View History

2020-04-08 14:13:33 +05:30
import { formatDate } from '../utils';
const mapTrace = ({ timestamp = null, message = '' }) =>
[timestamp ? formatDate(timestamp) : '', message].join(' | ');
export const trace = state => state.logs.lines.map(mapTrace).join('\n');
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};