Remove unused indices
parent
e7f96db664
commit
1ca5d61f57
|
@ -16,9 +16,7 @@ const LogsTable = ({logs}) =>
|
|||
>
|
||||
{logs
|
||||
.slice(0, numLogsToRender)
|
||||
.map((log, i) =>
|
||||
<LogsTableRow key={log.key} logItem={log} index={i} />
|
||||
)}
|
||||
.map(log => <LogsTableRow key={log.key} logItem={log} />)}
|
||||
</FancyScrollbar>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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 <LogItemSession logItem={logItem} logIndex={index} />
|
||||
return <LogItemSession logItem={logItem} />
|
||||
}
|
||||
if (logItem.service === 'http' && logItem.msg === 'http request') {
|
||||
return <LogItemHTTP logItem={logItem} logIndex={index} />
|
||||
return <LogItemHTTP logItem={logItem} />
|
||||
}
|
||||
if (logItem.service === 'kapacitor' && logItem.msg === 'point') {
|
||||
return <LogItemKapacitorPoint logItem={logItem} logIndex={index} />
|
||||
return <LogItemKapacitorPoint logItem={logItem} />
|
||||
}
|
||||
if (logItem.service === 'httpd_server_errors' && logItem.lvl === 'error') {
|
||||
return <LogItemHTTPError logItem={logItem} logIndex={index} />
|
||||
return <LogItemHTTPError logItem={logItem} />
|
||||
}
|
||||
if (logItem.service === 'kapacitor' && logItem.lvl === 'error') {
|
||||
return <LogItemKapacitorError logItem={logItem} logIndex={index} />
|
||||
return <LogItemKapacitorError logItem={logItem} />
|
||||
}
|
||||
if (logItem.service === 'kapacitor' && logItem.lvl === 'debug') {
|
||||
return <LogItemKapacitorDebug logItem={logItem} logIndex={index} />
|
||||
return <LogItemKapacitorDebug logItem={logItem} />
|
||||
}
|
||||
if (logItem.service === 'influxdb' && logItem.lvl === 'debug') {
|
||||
return <LogItemInfluxDBDebug logItem={logItem} logIndex={index} />
|
||||
return <LogItemInfluxDBDebug logItem={logItem} />
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="logs-table--row" logIndex={index}>
|
||||
<div className="logs-table--row">
|
||||
<div className="logs-table--divider">
|
||||
<div className={`logs-table--level ${logItem.lvl}`} />
|
||||
<div className="logs-table--timestamp">
|
||||
|
@ -62,7 +62,6 @@ LogsTableRow.propTypes = {
|
|||
lvl: string.isRequired,
|
||||
msg: string.isRequired,
|
||||
}).isRequired,
|
||||
index: number.isRequired,
|
||||
}
|
||||
|
||||
export default LogsTableRow
|
||||
|
|
Loading…
Reference in New Issue