Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort using unix timestamp value #43162

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -6,18 +6,17 @@

import React from 'react';
import { EuiButton, EuiButtonEmpty, EuiIconTip, EuiInMemoryTable, EuiLink } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import { PIPELINE_LIST } from './constants';

function getColumns(openPipeline, clonePipeline) {
return [
{
field: 'id',
name: (
<FormattedMessage
id="xpack.logstash.pipelinesTable.idColumnLabel"
defaultMessage="Id"
/>
name: i18n.translate(
'xpack.logstash.pipelinesTable.idColumnLabel',
{ defaultMessage: 'Id' }
),
sortable: true,
render: (id, { isCentrallyManaged }) => {
@@ -39,34 +38,28 @@ function getColumns(openPipeline, clonePipeline) {
},
{
field: 'description',
name: (
<FormattedMessage
id="xpack.logstash.pipelinesTable.descriptionColumnLabel"
defaultMessage="Description"
/>
name: i18n.translate(
'xpack.logstash.pipelinesTable.descriptionColumnLabel',
{ defaultMessage: 'Description' }
),
render: description => <span data-test-subj="cellDescription">{description}</span>,
sortable: true,
truncateText: true,
},
{
field: 'lastModifiedHumanized',
name: (
<FormattedMessage
id="xpack.logstash.pipelinesTable.lastModifiedColumnLabel"
defaultMessage="Last Modified"
/>
name: i18n.translate(
'xpack.logstash.pipelinesTable.lastModifiedColumnLabel',
{ defaultMessage: 'Last modified' }
),
render: lastModified => <span data-test-subj="cellLastModified">{lastModified}</span>,
sortable: true,
sortable: ({ lastModified }) => lastModified.valueOf(),
},
{
field: 'username',
name: (
<FormattedMessage
id="xpack.logstash.pipelinesTable.modifiedByColumnLabel"
defaultMessage="Modified By"
/>
name: i18n.translate(
'xpack.logstash.pipelinesTable.modifiedByColumnLabel',
{ defaultMessage: 'Modified by' }
),
render: username => <span data-test-subj="cellUsername">{username}</span>,
sortable: true,