From 5419a69700f15733bd3568853eaf3e74a9f0aa61 Mon Sep 17 00:00:00 2001 From: Starry Date: Sun, 2 Jun 2024 18:33:43 +0800 Subject: [PATCH] feat: highlight search log keywords (#398) --- src/locales/lang/en.ts | 4 +- src/locales/lang/es.ts | 2 +- src/store/modules/log.ts | 3 + src/views/dashboard/related/log/Header.vue | 84 ++++++++++--------- .../related/log/LogTable/LogBrowser.vue | 2 +- .../related/log/LogTable/LogService.vue | 9 +- 6 files changed, 59 insertions(+), 45 deletions(-) diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 3fd57937..63c2dc2d 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -300,7 +300,7 @@ const msg = { viewLogs: "View Logs", logsTagsTip: `Only tags defined in the core/default/searchableLogsTags are searchable. Check more details on the Configuration Vocabulary page`, - keywordsOfContentLogTips: "Current storage of SkyWalking OAP server does not support this.", + keywordsOfContentLogTips: "Current storage of SkyWalking OAP server does not support this", setEvent: "Set Event", viewAttributes: "View", attributes: "Attributes", @@ -355,7 +355,7 @@ const msg = { addKeywordsOfContent: "Please input a keyword of content", addExcludingKeywordsOfContent: "Please input a keyword of excluding content", noticeTag: "Please press Enter after inputting a tag(key=value).", - conditionNotice: "Notice: Please press Enter after inputting a key of content, exclude key of content(key=value).", + conditionNotice: "Notice: Please press Enter after inputting a key of content, exclude key of content(key=value)", language: "Language", save: "Save", editStrategy: "Edit Policies", diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts index f9e1ef7f..d5d738bb 100644 --- a/src/locales/lang/es.ts +++ b/src/locales/lang/es.ts @@ -299,7 +299,7 @@ const msg = { viewLogs: "Ver Registro de Datos", logsTagsTip: `Solamente etiquetas definidas en core/default/searchableLogsTags pueden ser buscadas. Más información en la página de Vocabulario de Configuración`, - keywordsOfContentLogTips: "El almacenamiento actual del servidor SkyWalking OAP no lo soporta.", + keywordsOfContentLogTips: "El almacenamiento actual del servidor SkyWalking OAP no lo soporta", setEvent: "Establecer Evento", viewAttributes: "Ver", serviceEvents: "Eventos Servico", diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts index f2e222de..ea946d3d 100644 --- a/src/store/modules/log.ts +++ b/src/store/modules/log.ts @@ -53,6 +53,9 @@ export const logStore = defineStore({ setLogCondition(data: Recordable) { this.conditions = { ...this.conditions, ...data }; }, + getLogKeywords() { + return this.conditions.keywordsOfContent; + }, resetState() { this.logs = []; this.conditions = { diff --git a/src/views/dashboard/related/log/Header.vue b/src/views/dashboard/related/log/Header.vue index ce822192..29aaeb83 100644 --- a/src/views/dashboard/related/log/Header.vue +++ b/src/views/dashboard/related/log/Header.vue @@ -67,51 +67,55 @@ limitations under the License. --> -
- {{ t("conditionNotice") }} -
-
-
- {{ t("keywordsOfContent") }}: - - - {{ item }} - × - - - -
-
- {{ t("excludingKeywordsOfContent") }}: - - - {{ item }} - × - - - +
+
+ {{ t("conditionNotice") }} - +
+
+
+
+ {{ t("keywordsOfContent") }}: + + + {{ item }} + × + + + +
+
+ {{ t("excludingKeywordsOfContent") }}: + + + {{ item }} + × + + + +
+
+