Explore: Fixes some LogDetailsRow markup (#21671)

- Moves filter titles to icons rather than table cell
- Increases colspan of ad-hoc stats cell instead of
rendering empty cells for parsed fields
pull/21677/head
kay delaney 5 years ago committed by GitHub
parent 2283ceec09
commit a115729c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      packages/grafana-ui/src/components/Logs/LogDetailsRow.tsx

@ -92,17 +92,28 @@ class UnThemedLogDetailsRow extends PureComponent<Props, State> {
return ( return (
<tr className={cx(style.logDetailsValue, { [styles.noHoverBackground]: showFieldsStats })}> <tr className={cx(style.logDetailsValue, { [styles.noHoverBackground]: showFieldsStats })}>
{/* Action buttons - show stats/filter results */} {/* Action buttons - show stats/filter results */}
<td title="Ad-hoc statistics" onClick={this.showStats} className={style.logsDetailsIcon}> <td className={style.logsDetailsIcon} colSpan={isLabel ? undefined : 3}>
<i className={`fa fa-signal ${styles.hoverCursor}`} /> <i title="Ad-hoc statistics" className={`fa fa-signal ${styles.hoverCursor}`} onClick={this.showStats} />
</td> </td>
<td title="Filter for value" onClick={() => isLabel && this.filterLabel()} className={style.logsDetailsIcon}> {isLabel && (
{isLabel && <i className={`fa fa-search-plus ${styles.hoverCursor}`} />} <>
</td> <td className={style.logsDetailsIcon}>
<i
<td title="Filter out value" onClick={() => isLabel && this.filterOutLabel()} className={style.logsDetailsIcon}> title="Filter for value"
{isLabel && <i className={`fa fa-search-minus ${styles.hoverCursor}`} />} className={`fa fa-search-plus ${styles.hoverCursor}`}
</td> onClick={this.filterLabel}
/>
</td>
<td className={style.logsDetailsIcon}>
<i
title="Filter out value"
className={`fa fa-search-minus ${styles.hoverCursor}`}
onClick={this.filterOutLabel}
/>
</td>
</>
)}
{/* Key - value columns */} {/* Key - value columns */}
<td className={style.logDetailsLabel}>{parsedKey}</td> <td className={style.logDetailsLabel}>{parsedKey}</td>

Loading…
Cancel
Save