diff --git a/ui/src/kapacitor/components/LogItemKapacitorPoint.js b/ui/src/kapacitor/components/LogItemKapacitorPoint.js
index 6a7639330c..898f656bb4 100644
--- a/ui/src/kapacitor/components/LogItemKapacitorPoint.js
+++ b/ui/src/kapacitor/components/LogItemKapacitorPoint.js
@@ -1,18 +1,26 @@
import React, {PropTypes} from 'react'
-const renderKeysAndValues = object => {
+const renderKeysAndValues = (object, name) => {
if (!object) {
return
}
- const objKeys = Object.keys(object)
- const objValues = Object.values(object)
- const objElements = objKeys.map((objKey, i) =>
-
- {objKey}:
{objValues[i]}
+ const sortedObjKeys = Object.keys(object).sort()
+
+ return (
+
+
+ {`${sortedObjKeys.length} ${name}`}
+
+
+ {sortedObjKeys.map(objKey =>
+
+ {objKey}: {object[objKey]}
+
+ )}
+
)
- return objElements
}
const LogItemKapacitorPoint = ({logItem}) =>
@@ -24,15 +32,9 @@ const LogItemKapacitorPoint = ({logItem}) =>
Kapacitor Point
-
-
- TAGS
- {renderKeysAndValues(logItem.tag)}
-
-
- FIELDS
- {renderKeysAndValues(logItem.field)}
-
+
+ {renderKeysAndValues(logItem.tag, 'Tags')}
+ {renderKeysAndValues(logItem.field, 'Fields')}
diff --git a/ui/src/kapacitor/components/LogsTable.js b/ui/src/kapacitor/components/LogsTable.js
index ad7945c1b0..41fee0de53 100644
--- a/ui/src/kapacitor/components/LogsTable.js
+++ b/ui/src/kapacitor/components/LogsTable.js
@@ -1,24 +1,23 @@
import React, {PropTypes} from 'react'
-import InfiniteScroll from 'shared/components/InfiniteScroll'
import LogsTableRow from 'src/kapacitor/components/LogsTableRow'
+import FancyScrollbar from 'src/shared/components/FancyScrollbar'
+
+const numLogsToRender = 200
const LogsTable = ({logs}) =>
-
+
-
Logs
-
-
- {logs.length
- ?
-
- )}
- />
- : }
+ {`${numLogsToRender} Most Recent Logs`}
+
+ {logs
+ .slice(0, numLogsToRender)
+ .map(log => )}
+
const {arrayOf, shape, string} = PropTypes
diff --git a/ui/src/kapacitor/components/LogsTableRow.js b/ui/src/kapacitor/components/LogsTableRow.js
index 32b658c67f..83c12bcec0 100644
--- a/ui/src/kapacitor/components/LogsTableRow.js
+++ b/ui/src/kapacitor/components/LogsTableRow.js
@@ -8,31 +8,31 @@ import LogItemKapacitorError from 'src/kapacitor/components/LogItemKapacitorErro
import LogItemKapacitorDebug from 'src/kapacitor/components/LogItemKapacitorDebug'
import LogItemInfluxDBDebug from 'src/kapacitor/components/LogItemInfluxDBDebug'
-const LogsTableRow = ({logItem, index}) => {
+const LogsTableRow = ({logItem}) => {
if (logItem.service === 'sessions') {
- return
+ return
}
if (logItem.service === 'http' && logItem.msg === 'http request') {
- return
+ return
}
if (logItem.service === 'kapacitor' && logItem.msg === 'point') {
- return
+ return
}
if (logItem.service === 'httpd_server_errors' && logItem.lvl === 'error') {
- return
+ return
}
if (logItem.service === 'kapacitor' && logItem.lvl === 'error') {
- return
+ return
}
if (logItem.service === 'kapacitor' && logItem.lvl === 'debug') {
- return
+ return
}
if (logItem.service === 'influxdb' && logItem.lvl === 'debug') {
- return
+ return
}
return (
-
+
@@ -43,7 +43,7 @@ const LogsTableRow = ({logItem, index}) => {
{logItem.service || '--'}
-
+
{logItem.msg || '--'}
@@ -53,7 +53,7 @@ const LogsTableRow = ({logItem, index}) => {
)
}
-const {number, shape, string} = PropTypes
+const {shape, string} = PropTypes
LogsTableRow.propTypes = {
logItem: shape({
@@ -62,7 +62,6 @@ LogsTableRow.propTypes = {
lvl: string.isRequired,
msg: string.isRequired,
}).isRequired,
- index: number,
}
export default LogsTableRow
diff --git a/ui/src/kapacitor/components/Tickscript.js b/ui/src/kapacitor/components/Tickscript.js
index 8cec268298..65320d0561 100644
--- a/ui/src/kapacitor/components/Tickscript.js
+++ b/ui/src/kapacitor/components/Tickscript.js
@@ -34,7 +34,10 @@ const Tickscript = ({
isNewTickscript={isNewTickscript}
/>