Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
feat: 系统日志详情新增 traceId 链路号显示
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Jan 31, 2024
1 parent 9fa765c commit 7359823
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ ContiNew Admin 的分支目前分为下个大版本的开发分支和上个大

### 特别鸣谢

- 感谢 <a href="https://www.jetbrains.com/" target="_blank">JetBrains</a> 提供的 <a href="https://www.jetbrains.com/shop/eform/opensource" target="_blank">非商业开源软件开发授权</a>
- 感谢 <a href="https://www.jetbrains.com/" target="_blank">JetBrains</a> 提供的 <a href="https://jb.gg/OpenSourceSupport" target="_blank">非商业开源软件开发授权</a>
- 感谢 <a href="http://pro.arco.design/" target="_blank">Arco Design Pro</a> 开箱即用的中后台前端解决方案
- 感谢 [Gi Admin Pro](https://gitee.com/lin0716/gi-demo),致敬各位作者为开源前端模板领域作出的贡献
- e.g. 扩展于 Gi Admin Pro 项目开源的文件管理组件
Expand Down
1 change: 1 addition & 0 deletions src/api/monitor/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface SystemLogRecord extends LogRecord {
}

export interface SystemLogDetailRecord extends SystemLogRecord {
traceId: string;
requestHeaders: string;
requestBody: string;
responseHeaders: string;
Expand Down
14 changes: 14 additions & 0 deletions src/views/monitor/log/system/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
const { copy, copied } = useClipboard();
const systemLogList = ref<SystemLogRecord[]>([]);
const systemLog = ref<SystemLogDetailRecord>({
traceId: '',
requestUrl: '',
requestMethod: '',
requestHeaders: '',
Expand All @@ -35,6 +36,7 @@
const data = reactive({
// 查询参数
queryParams: {
traceId: undefined,
createTime: undefined,
page: 1,
size: 10,
Expand Down Expand Up @@ -335,6 +337,18 @@
/>
</span>
</a-descriptions-item>
<a-descriptions-item label="Trace ID" :span="2">
<a-skeleton v-if="loading" :animation="true">
<a-skeleton-line :rows="1" />
</a-skeleton>
<span v-else>
{{ systemLog.traceId }}
<icon-copy
class="copy-btn"
@click="handleCopy(systemLog.traceId)"
/>
</span>
</a-descriptions-item>
</a-descriptions>
<a-descriptions
layout="inline-vertical"
Expand Down

0 comments on commit 7359823

Please sign in to comment.