mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 04:09:14 +00:00
fix: highlight keywords in logs (#405)
This commit is contained in:
@@ -61,7 +61,7 @@ limitations under the License. -->
|
||||
return (props.data.tags.find((d: { key: string; value: string }) => d.key === "level") || {}).value || "";
|
||||
});
|
||||
const highlightKeywords = (data: string) => {
|
||||
const keywords = Object.values(logStore.getLogKeywords());
|
||||
const keywords = Object.values(logStore.conditions.keywordsOfContent || {});
|
||||
const regex = new RegExp(keywords.join("|"), "gi");
|
||||
return data.replace(regex, (match) => `<span style="color: red">${match}</span>`);
|
||||
};
|
||||
|
Reference in New Issue
Block a user