Skip to content

Commit

Permalink
fix: Log detail highlight keyword is [Object Object]
Browse files Browse the repository at this point in the history
Signed-off-by: TheYoungManLi <cjl@kubesphere.io>
  • Loading branch information
weili520 committed Nov 15, 2021
1 parent b9345f9 commit d23f8a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions src/components/Modals/LogSearch/Logging/Search/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,10 @@ export default class LogSearchModal extends React.Component {
return (
<span
dangerouslySetInnerHTML={{
__html: markedResult.map((log, index) =>
isString(log) ? (
log
) : (
<span key={index} className={styles.hightLightMatch}>
{log.hightLighted}
</span>
)
__html: markedResult.map(log =>
isString(log)
? log
: `<span class="${styles.hightLightMatch}">${log.hightLighted}</span>`
),
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,10 @@ export default class GatewayLog extends React.Component {
return (
<span
dangerouslySetInnerHTML={{
__html: markedResult.map((log, index) =>
isString(log) ? (
log
) : (
<span key={index} className={styles.hightLightMatch}>
{log.hightLighted}
</span>
)
__html: markedResult.map(log =>
isString(log)
? log
: `<span class="${styles.hightLightMatch}">${log.hightLighted}</span>`
),
}}
/>
Expand Down

0 comments on commit d23f8a8

Please sign in to comment.