From d86543aeedb9440e8eea005013b335aff7287d3b Mon Sep 17 00:00:00 2001 From: Fine0830 Date: Wed, 1 Nov 2023 22:45:45 +0800 Subject: [PATCH] refactor: update Logs view (#333) New columns of the Log View 1. Timestamp + Raw log(content) as column one, 70% of the initial table width. No separate timestamp column. The first column should be timestamp - content 2. Level tag(key=level)'s value. This could be missed from tags, if so, keep the column empty. 3. Trace link. If trace ID exists, generate a link to trace. Don't need to put the relative trace ID in the text. 4. Still keep details pop-up style. --- src/locales/lang/en.ts | 3 +- src/locales/lang/es.ts | 1 + src/locales/lang/zh.ts | 3 +- .../dashboard/related/log/LogTable/Index.vue | 19 +++++----- .../related/log/LogTable/LogDetail.vue | 5 ++- .../related/log/LogTable/LogService.vue | 36 ++++++++----------- .../dashboard/related/log/LogTable/data.ts | 32 +++++------------ 7 files changed, 40 insertions(+), 59 deletions(-) diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 415a4735..9c854703 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -297,7 +297,8 @@ const msg = { return: "Return", isError: "Error", contentType: "Content Type", - content: "Content", + content: "Timestamp - Content", + level: "Level", viewLogs: "View Logs", logsTagsTip: `Only tags defined in the core/default/searchableLogsTags are searchable. Check more details on the Configuration Vocabulary page`, diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts index 27860e0d..278af1be 100644 --- a/src/locales/lang/es.ts +++ b/src/locales/lang/es.ts @@ -297,6 +297,7 @@ const msg = { isError: "Error", contentType: "Tipo de Contenido", content: "Contenido", + level: "Level", 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`, diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index b9a6c48d..e9c340ec 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -294,7 +294,8 @@ const msg = { return: "返回", isError: "错误", contentType: "内容类型", - content: "内容", + content: "时间戳 - 内容", + level: "Level", viewLogs: "查看日志", logsTagsTip: "只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。", keywordsOfContentLogTips: "SkyWalking OAP服务器的当前存储不支持此操作", diff --git a/src/views/dashboard/related/log/LogTable/Index.vue b/src/views/dashboard/related/log/LogTable/Index.vue index 266b119e..a0b9be81 100644 --- a/src/views/dashboard/related/log/LogTable/Index.vue +++ b/src/views/dashboard/related/log/LogTable/Index.vue @@ -15,10 +15,10 @@ limitations under the License. --> @@ -80,6 +80,7 @@ limitations under the License. --> } .log-header { + width: 100%; white-space: nowrap; user-select: none; border-left: 0; @@ -87,23 +88,23 @@ limitations under the License. --> border-bottom: 1px solid rgb(0 0 0 / 10%); .traceId { - width: 390px; + width: 140px; + } + + .content { + width: 1300px; } - .content, .tags { - width: 300px; + width: 100px; } - .serviceInstanceName, - .endpointName, .serviceName { width: 200px; } } .log-header div { - display: inline-block; padding: 0 5px; border: 1px solid transparent; border-right: 1px dotted silver; diff --git a/src/views/dashboard/related/log/LogTable/LogDetail.vue b/src/views/dashboard/related/log/LogTable/LogDetail.vue index b8c8a758..6a17b2cc 100644 --- a/src/views/dashboard/related/log/LogTable/LogDetail.vue +++ b/src/views/dashboard/related/log/LogTable/LogDetail.vue @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. -->