diff --git a/x-pack/legacy/plugins/logstash/public/components/pipeline_list/__snapshots__/pipelines_table.test.js.snap b/x-pack/legacy/plugins/logstash/public/components/pipeline_list/__snapshots__/pipelines_table.test.js.snap index eb1a7e54afe8b..a7432416537a6 100644 --- a/x-pack/legacy/plugins/logstash/public/components/pipeline_list/__snapshots__/pipelines_table.test.js.snap +++ b/x-pack/legacy/plugins/logstash/public/components/pipeline_list/__snapshots__/pipelines_table.test.js.snap @@ -6,42 +6,26 @@ exports[`PipelinesTable component renders component as expected 1`] = ` Array [ Object { "field": "id", - "name": , + "name": "Id", "render": [Function], "sortable": true, }, Object { "field": "description", - "name": , + "name": "Description", "render": [Function], "sortable": true, "truncateText": true, }, Object { "field": "lastModifiedHumanized", - "name": , + "name": "Last modified", "render": [Function], - "sortable": true, + "sortable": [Function], }, Object { "field": "username", - "name": , + "name": "Modified by", "render": [Function], "sortable": true, }, diff --git a/x-pack/legacy/plugins/logstash/public/components/pipeline_list/pipelines_table.js b/x-pack/legacy/plugins/logstash/public/components/pipeline_list/pipelines_table.js index ca10ae27535c6..d77fc25f12986 100644 --- a/x-pack/legacy/plugins/logstash/public/components/pipeline_list/pipelines_table.js +++ b/x-pack/legacy/plugins/logstash/public/components/pipeline_list/pipelines_table.js @@ -6,6 +6,7 @@ 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'; @@ -13,11 +14,9 @@ function getColumns(openPipeline, clonePipeline) { return [ { field: 'id', - name: ( - + name: i18n.translate( + 'xpack.logstash.pipelinesTable.idColumnLabel', + { defaultMessage: 'Id' } ), sortable: true, render: (id, { isCentrallyManaged }) => { @@ -39,11 +38,9 @@ function getColumns(openPipeline, clonePipeline) { }, { field: 'description', - name: ( - + name: i18n.translate( + 'xpack.logstash.pipelinesTable.descriptionColumnLabel', + { defaultMessage: 'Description' } ), render: description => {description}, sortable: true, @@ -51,22 +48,18 @@ function getColumns(openPipeline, clonePipeline) { }, { field: 'lastModifiedHumanized', - name: ( - + name: i18n.translate( + 'xpack.logstash.pipelinesTable.lastModifiedColumnLabel', + { defaultMessage: 'Last modified' } ), render: lastModified => {lastModified}, - sortable: true, + sortable: ({ lastModified }) => lastModified.valueOf(), }, { field: 'username', - name: ( - + name: i18n.translate( + 'xpack.logstash.pipelinesTable.modifiedByColumnLabel', + { defaultMessage: 'Modified by' } ), render: username => {username}, sortable: true,