Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function formatValues([key, value]) {
// time
switch (key) {
case 'finished_time':
case 'create_time':
case 'log_time':
case 'timestamp':
case 'earliest_record_timestamp':
case 'latest_record_timestamp':
case 'last_data_time':
case 'latest_empty_bucket_timestamp':
case 'latest_sparse_bucket_timestamp':
case 'latest_bucket_timestamp':
value = formatDate(value, TIME_FORMAT);
break;
// data
case 'established_model_memory':
case 'input_bytes':
case 'model_bytes':
value = formatData(value);
break;
// numbers
case 'processed_record_count':
case 'processed_field_count':
case 'input_field_count':
case 'invalid_date_count':
case 'missing_field_count':
case 'out_of_order_timestamp_count':
function renderDate(date) { return formatDate(date, TIME_FORMAT); }
render: item => formatDate(item.timestamp, TIME_FORMAT)
}, {
render: item => formatDate(item.timestamp, TIME_FORMAT)
}, {
render: (date) => formatDate(date, TIME_FORMAT),
textOnly: true,
render: (date) => formatDate(date, TIME_FORMAT),
textOnly: true,
render: (date) => formatDate(date, TIME_FORMAT),
sortable: true
render: (timestamp: number) => formatDate(timestamp, TIME_FORMAT),
width: '120px',
render: (message: any) => formatDate(message.timestamp, TIME_FORMAT),
},
render: (date) => formatDate(date, TIME_FORMAT),
textOnly: true,