From 1ef4e5b5a0bbb5b5ff6c4d292c880fc55fcf183c Mon Sep 17 00:00:00 2001 From: Brandon Farmer Date: Fri, 13 Jul 2018 16:12:13 -0700 Subject: [PATCH] Properly order rows in log viewer --- ui/src/logs/actions/index.ts | 2 +- ui/src/logs/components/LogsTable.tsx | 5 ++++- ui/src/logs/reducers/index.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/src/logs/actions/index.ts b/ui/src/logs/actions/index.ts index b1f8a73ed5..67d8509fa9 100644 --- a/ui/src/logs/actions/index.ts +++ b/ui/src/logs/actions/index.ts @@ -39,11 +39,11 @@ const defaultTableData: TableData = { 'time', 'severity', 'timestamp', + 'message', 'facility', 'procid', 'appname', 'host', - 'message', ], values: [], } diff --git a/ui/src/logs/components/LogsTable.tsx b/ui/src/logs/components/LogsTable.tsx index 41bd72d449..23f3b9fbac 100644 --- a/ui/src/logs/components/LogsTable.tsx +++ b/ui/src/logs/components/LogsTable.tsx @@ -346,12 +346,15 @@ class LogsTable extends Component { } const data = getValuesFromData(this.props.tableInfiniteData.forward) - const backwardData = getValuesFromData(this.props.tableInfiniteData.forward) + const backwardData = getValuesFromData( + this.props.tableInfiniteData.backward + ) const firstTime = getDeep( data, '0.0', getDeep(backwardData, '0.0', new Date().getTime()) ) + const {firstQueryTime} = this.state if (firstQueryTime && firstQueryTime > firstTime) { return diff --git a/ui/src/logs/reducers/index.ts b/ui/src/logs/reducers/index.ts index 202c25eea0..084fe3bf9a 100644 --- a/ui/src/logs/reducers/index.ts +++ b/ui/src/logs/reducers/index.ts @@ -21,11 +21,11 @@ const defaultTableData: TableData = { 'time', 'severity', 'timestamp', + 'message', 'facility', 'procid', 'appname', 'host', - 'message', ], values: [], }