@hkyhy/marsun-components-core 0.1.118 → 0.1.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Audit/AuditLogList.d.ts +4 -0
- package/dist/components/Audit/AuditLogList.js +168 -166
- package/dist/components/Audit/AuditLogList.js.map +1 -1
- package/dist/components/Audit/AuditStepPerfChart.d.ts +10 -0
- package/dist/components/Audit/AuditStepPerfChart.js +51 -0
- package/dist/components/Audit/AuditStepPerfChart.js.map +1 -0
- package/dist/components/Audit/AuditWaterfall.d.ts +5 -1
- package/dist/components/Audit/AuditWaterfall.js +50 -34
- package/dist/components/Audit/AuditWaterfall.js.map +1 -1
- package/dist/components/Audit/Chart/createLazyPlot.d.ts +4 -0
- package/dist/components/Audit/Chart/createLazyPlot.js +12 -11
- package/dist/components/Audit/Chart/createLazyPlot.js.map +1 -1
- package/dist/components/Audit/detailKpi.d.ts +8 -3
- package/dist/components/Audit/detailKpi.js +28 -20
- package/dist/components/Audit/detailKpi.js.map +1 -1
- package/dist/components/Audit/index.d.ts +4 -2
- package/dist/components/Audit/style.module.scss.js +48 -28
- package/dist/components/Audit/style.module.scss.js.map +1 -1
- package/dist/components/Filter/createKneFilterField.js +55 -53
- package/dist/components/Filter/createKneFilterField.js.map +1 -1
- package/dist/components/Form/SuperSelect.d.ts +1 -0
- package/dist/components/Form/SuperSelect.js +67 -58
- package/dist/components/Form/SuperSelect.js.map +1 -1
- package/dist/components/Form/createPagedSuperSelectApi.d.ts +60 -0
- package/dist/components/Form/createPagedSuperSelectApi.js +46 -0
- package/dist/components/Form/createPagedSuperSelectApi.js.map +1 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Form/superSelectEmpty.d.ts +5 -0
- package/dist/components/Form/superSelectEmpty.js +11 -0
- package/dist/components/Form/superSelectEmpty.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +2 -0
- package/dist/components/FormInfo/fields.js.map +1 -1
- package/dist/components/FormInfo/index.d.ts +2 -2
- package/dist/components/ReactFilter/fields/index.js +35 -27
- package/dist/components/ReactFilter/fields/index.js.map +1 -1
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.d.ts +20 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.js +82 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.module.scss.js +7 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Cancel/index.d.ts +3 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.d.ts +25 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.js +257 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.module.scss.js +10 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.d.ts +47 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.js +148 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.module.scss.js +7 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.d.ts +18 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.js +73 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.module.scss.js +5 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.d.ts +19 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.js +62 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.module.scss.js +8 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/SetFormFields.d.ts +4 -0
- package/dist/components/Tools/ActionTracking/CreateAction/SetFormFields.js +14 -0
- package/dist/components/Tools/ActionTracking/CreateAction/SetFormFields.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/index.d.ts +12 -0
- package/dist/components/Tools/ActionTracking/CreateAction/personCascadePath.d.ts +5 -0
- package/dist/components/Tools/ActionTracking/CreateAction/personCascadePath.js +30 -0
- package/dist/components/Tools/ActionTracking/CreateAction/personCascadePath.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/submitHelpers.d.ts +8 -0
- package/dist/components/Tools/ActionTracking/CreateAction/submitHelpers.js +35 -0
- package/dist/components/Tools/ActionTracking/CreateAction/submitHelpers.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/types.d.ts +108 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.d.ts +27 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.js +107 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.module.scss.js +11 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Follow/index.d.ts +3 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.d.ts +23 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.js +31 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.module.scss.js +8 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.d.ts +29 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.js +76 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.module.scss.js +8 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/filterDefaults.d.ts +15 -0
- package/dist/components/Tools/ActionTracking/List/filterDefaults.js +27 -0
- package/dist/components/Tools/ActionTracking/List/filterDefaults.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/index.d.ts +6 -0
- package/dist/components/Tools/ActionTracking/List/listTypes.d.ts +49 -0
- package/dist/components/Tools/ActionTracking/{ActionTrackingShell.d.ts → Shell/ActionTrackingShell.d.ts} +1 -1
- package/dist/components/Tools/ActionTracking/{ActionTrackingShell.js → Shell/ActionTrackingShell.js} +1 -1
- package/dist/components/Tools/ActionTracking/Shell/ActionTrackingShell.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Shell/index.d.ts +3 -0
- package/dist/components/Tools/ActionTracking/index.d.ts +11 -2
- package/dist/components/Tools/ActionTracking/utils/index.d.ts +1 -0
- package/dist/components/Tools/ActionTracking/utils/sanitizeActionHtml.d.ts +2 -0
- package/dist/components/Tools/index.d.ts +2 -0
- package/dist/form-info.d.ts +3 -0
- package/dist/form-info.js +80 -72
- package/dist/form-info.js.map +1 -1
- package/dist/index.js +867 -820
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +2 -2
- package/dist/styles/global.css +2 -2
- package/package.json +1 -1
- package/dist/components/Tools/ActionTracking/ActionTrackingShell.js.map +0 -1
- /package/dist/components/Tools/ActionTracking/{style.module.scss.js → Shell/style.module.scss.js} +0 -0
- /package/dist/components/Tools/ActionTracking/{style.module.scss.js.map → Shell/style.module.scss.js.map} +0 -0
|
@@ -19,6 +19,10 @@ export type AuditLogListProps = {
|
|
|
19
19
|
/** platform 系统列:SSO SystemApp.code → name;缺则回落 systemAppId */
|
|
20
20
|
systemAppNames?: Record<string, string>;
|
|
21
21
|
};
|
|
22
|
+
/** Collapse header:类型 / HTTP / 耗时 / 表 / 失败 — 折叠态也可见 */
|
|
23
|
+
export declare const AuditStepHeader: React.FC<{
|
|
24
|
+
step: AuditStep;
|
|
25
|
+
}>;
|
|
22
26
|
export declare const AuditStepContent: React.FC<{
|
|
23
27
|
step: AuditStep;
|
|
24
28
|
}>;
|
|
@@ -1,154 +1,161 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { copyText as
|
|
3
|
-
import { Typography as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useMemo as
|
|
7
|
-
import { AuditDayStatsBar as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { copyText as P } from "../../utils/copyText.js";
|
|
3
|
+
import { Typography as h, Empty as k, Button as F, message as E, Space as Y, Collapse as G } from "antd";
|
|
4
|
+
import D from "classnames";
|
|
5
|
+
import Q from "dayjs";
|
|
6
|
+
import { useMemo as I } from "react";
|
|
7
|
+
import { AuditDayStatsBar as q } from "./AuditDayStatsBar.js";
|
|
8
|
+
import { AuditStepPerfChart as z } from "./AuditStepPerfChart.js";
|
|
8
9
|
import { AuditWaterfall as K } from "./AuditWaterfall.js";
|
|
9
|
-
import { computeDetailKpi as
|
|
10
|
-
import { formatAuditJson as V, isTruncatedAuditText as
|
|
11
|
-
import { buildAuditReplayCurl as
|
|
12
|
-
import { displayActionLabel as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
function
|
|
21
|
-
const r =
|
|
10
|
+
import { computeDetailKpi as W, isErrorStep as j } from "./detailKpi.js";
|
|
11
|
+
import { formatAuditJson as V, isTruncatedAuditText as _ } from "./formatAuditJson.js";
|
|
12
|
+
import { buildAuditReplayCurl as $, readBrowserReplaySession as J } from "./formatAuditCurl.js";
|
|
13
|
+
import { displayActionLabel as v, labelOfAction as X, displaySummary as Z } from "./labels.js";
|
|
14
|
+
import l from "./style.module.scss.js";
|
|
15
|
+
import p, { SEMANTIC_COLORS as a } from "../Tag/SemanticTag.js";
|
|
16
|
+
import b from "../InfoPage/InfoPage/index.js";
|
|
17
|
+
import tt from "../Stat/StatCardList.js";
|
|
18
|
+
import et from "../Descriptions/CommonDescriptions.js";
|
|
19
|
+
import rt from "../Table/Table.js";
|
|
20
|
+
import B from "../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
21
|
+
function M(t) {
|
|
22
|
+
const r = Q(t);
|
|
22
23
|
return r.isValid() ? r.format("YYYY-MM-DD HH:mm:ss") : t;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function U(t) {
|
|
25
26
|
return t === "success" ? "成功" : t === "fail" || t === "error" ? "失败" : t;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
return t === "success" ?
|
|
28
|
+
function H(t) {
|
|
29
|
+
return t === "success" ? a.SUCCESS : t === "fail" || t === "error" ? a.DANGER : a.DEFAULT;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function O(t) {
|
|
31
32
|
return t === "TRACE" ? "请求线路" : t === "SYSTEM" ? "系统" : t === "OPERATION" || !t ? "业务操作" : t;
|
|
32
33
|
}
|
|
33
|
-
function rt(t) {
|
|
34
|
-
return t >= 500 ? m.DANGER : t >= 400 ? m.WARNING : t >= 200 && t < 300 ? m.SUCCESS : m.DEFAULT;
|
|
35
|
-
}
|
|
36
34
|
function nt(t) {
|
|
35
|
+
return t >= 500 ? a.DANGER : t >= 400 ? a.WARNING : t >= 200 && t < 300 ? a.SUCCESS : a.DEFAULT;
|
|
36
|
+
}
|
|
37
|
+
function lt(t) {
|
|
37
38
|
if (!t || typeof t != "object" || Array.isArray(t)) return null;
|
|
38
39
|
const r = t.httpStatus;
|
|
39
40
|
if (typeof r == "number" && Number.isFinite(r)) return r;
|
|
40
41
|
if (r != null && String(r).trim() !== "") {
|
|
41
|
-
const
|
|
42
|
-
return Number.isFinite(
|
|
42
|
+
const c = Number(r);
|
|
43
|
+
return Number.isFinite(c) ? c : null;
|
|
43
44
|
}
|
|
44
45
|
return null;
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function ot(t) {
|
|
47
48
|
var r;
|
|
48
|
-
return !!((r = t.actionLabel) != null && r.trim()) || !!
|
|
49
|
+
return !!((r = t.actionLabel) != null && r.trim()) || !!X(t.action);
|
|
49
50
|
}
|
|
50
51
|
const L = ({
|
|
51
52
|
value: t,
|
|
52
53
|
maxHeight: r = 360
|
|
53
54
|
}) => {
|
|
54
|
-
const
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
s ? /* @__PURE__ */ e("div", { className:
|
|
57
|
-
/* @__PURE__ */ e(
|
|
55
|
+
const c = V(t), s = _(t) || c.includes("…[truncated]");
|
|
56
|
+
return /* @__PURE__ */ i("div", { className: l.jsonWrap, children: [
|
|
57
|
+
s ? /* @__PURE__ */ e("div", { className: l.truncateHint, children: "内容已截断(采集侧 body 上限),以下为可读展开" }) : null,
|
|
58
|
+
/* @__PURE__ */ e(B, { className: l.jsonScroll, style: { maxHeight: r }, children: /* @__PURE__ */ e("pre", { className: l.jsonBlock, children: c }) })
|
|
58
59
|
] });
|
|
59
60
|
};
|
|
60
|
-
function
|
|
61
|
+
function w(t, r) {
|
|
61
62
|
if (r == null) return null;
|
|
62
63
|
if (t === "output" && typeof r == "object" && !Array.isArray(r) && r !== null && ("httpStatus" in r || "body" in r)) {
|
|
63
|
-
const
|
|
64
|
+
const c = r, s = { ...c };
|
|
64
65
|
delete s.httpStatus, delete s.body;
|
|
65
|
-
const
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
/* @__PURE__ */ e("div", { className:
|
|
69
|
-
/* @__PURE__ */ e(L, { value:
|
|
66
|
+
const y = Object.keys(s).length > 0;
|
|
67
|
+
return /* @__PURE__ */ i(T, { children: [
|
|
68
|
+
c.body !== void 0 ? /* @__PURE__ */ i(T, { children: [
|
|
69
|
+
/* @__PURE__ */ e("div", { className: l.blockLabel, children: "响应体" }),
|
|
70
|
+
/* @__PURE__ */ e(L, { value: c.body, maxHeight: 420 })
|
|
70
71
|
] }) : null,
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */ e("div", { className:
|
|
72
|
+
y ? /* @__PURE__ */ i(T, { children: [
|
|
73
|
+
/* @__PURE__ */ e("div", { className: l.blockLabel, children: "其它" }),
|
|
73
74
|
/* @__PURE__ */ e(L, { value: s })
|
|
74
75
|
] }) : null
|
|
75
76
|
] });
|
|
76
77
|
}
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */ e("div", { className:
|
|
78
|
+
return /* @__PURE__ */ i(T, { children: [
|
|
79
|
+
/* @__PURE__ */ e("div", { className: l.blockLabel, children: t }),
|
|
79
80
|
/* @__PURE__ */ e(L, { value: r })
|
|
80
81
|
] });
|
|
81
82
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
" ms"
|
|
96
|
-
] }) : null
|
|
97
|
-
] }),
|
|
98
|
-
t.sqlText ? /* @__PURE__ */ o(b, { children: [
|
|
99
|
-
/* @__PURE__ */ e("div", { className: i.blockLabel, children: "SQL" }),
|
|
100
|
-
/* @__PURE__ */ e(H, { className: i.jsonScroll, style: { maxHeight: 200 }, children: /* @__PURE__ */ e("pre", { className: i.jsonBlock, children: t.sqlText }) })
|
|
83
|
+
function it(t) {
|
|
84
|
+
const r = t.toUpperCase();
|
|
85
|
+
return r === "SQL" ? a.CYAN : r === "ERROR" ? a.DANGER : r === "RESPONSE" ? a.SUCCESS : r === "REQUEST" ? a.DEFAULT : r === "AUTH" || r === "UPSTREAM" ? a.WARNING : a.INFO;
|
|
86
|
+
}
|
|
87
|
+
const at = ({ step: t }) => {
|
|
88
|
+
var s;
|
|
89
|
+
const r = lt(t.output), c = ((s = t.tables) == null ? void 0 : s.filter(Boolean)) ?? [];
|
|
90
|
+
return /* @__PURE__ */ i("div", { className: l.stepHeader, children: [
|
|
91
|
+
/* @__PURE__ */ e("span", { className: l.stepHeaderTitle, children: t.title || t.stepType }),
|
|
92
|
+
t.stepType ? /* @__PURE__ */ e(p, { color: it(String(t.stepType)), children: t.stepType }) : null,
|
|
93
|
+
r != null ? /* @__PURE__ */ i(p, { color: nt(r), children: [
|
|
94
|
+
"HTTP ",
|
|
95
|
+
r
|
|
101
96
|
] }) : null,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
typeof t.durationMs == "number" ? /* @__PURE__ */ i(p, { color: a.DEFAULT, children: [
|
|
98
|
+
t.durationMs,
|
|
99
|
+
" ms"
|
|
105
100
|
] }) : null,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
t.errorCode
|
|
101
|
+
c.length > 0 ? /* @__PURE__ */ i(p, { color: a.INFO, children: [
|
|
102
|
+
"表:",
|
|
103
|
+
c.join(", ")
|
|
110
104
|
] }) : null,
|
|
111
|
-
t.
|
|
112
|
-
t
|
|
105
|
+
t.sqlText && String(t.stepType).toUpperCase() !== "SQL" ? /* @__PURE__ */ e(p, { color: a.CYAN, children: "SQL" }) : null,
|
|
106
|
+
j(t) ? /* @__PURE__ */ e(p, { color: a.DANGER, children: "失败" }) : null
|
|
113
107
|
] });
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
}, ct = ({ step: t }) => /* @__PURE__ */ i("div", { className: l.stepBody, children: [
|
|
109
|
+
t.occurredAt ? /* @__PURE__ */ e(h.Text, { type: "secondary", children: M(t.occurredAt) }) : null,
|
|
110
|
+
t.sqlText ? /* @__PURE__ */ i(T, { children: [
|
|
111
|
+
/* @__PURE__ */ e("div", { className: l.blockLabel, children: "SQL" }),
|
|
112
|
+
/* @__PURE__ */ e(B, { className: l.jsonScroll, style: { maxHeight: 200 }, children: /* @__PURE__ */ e("pre", { className: l.jsonBlock, children: t.sqlText }) })
|
|
113
|
+
] }) : null,
|
|
114
|
+
t.errorMessage ? /* @__PURE__ */ e(h.Text, { type: "danger", children: t.errorMessage }) : null,
|
|
115
|
+
t.errorCode ? /* @__PURE__ */ i(h.Text, { type: "secondary", children: [
|
|
116
|
+
"错误码:",
|
|
117
|
+
t.errorCode
|
|
118
|
+
] }) : null,
|
|
119
|
+
t.input != null ? w("请求体", t.input) : null,
|
|
120
|
+
t.output != null ? w("output", t.output) : null
|
|
121
|
+
] }), Rt = ({ detail: t, loading: r, emptyDescription: c = "暂无明细", className: s, getAuthToken: y }) => {
|
|
122
|
+
var A, f, g;
|
|
123
|
+
const d = I(() => W(t), [t]), x = I(() => {
|
|
124
|
+
const o = d.slowestStep != null ? `${d.slowestStep.title} (${d.slowestStep.durationMs}ms)` : "—";
|
|
118
125
|
return [
|
|
119
126
|
{
|
|
120
127
|
title: "总耗时",
|
|
121
|
-
value:
|
|
122
|
-
suffix:
|
|
128
|
+
value: d.durationMs ?? "—",
|
|
129
|
+
suffix: d.durationMs != null ? "ms" : void 0,
|
|
123
130
|
tone: "blue",
|
|
124
131
|
color: "#1677ff"
|
|
125
132
|
},
|
|
126
|
-
{ title: "步数", value:
|
|
127
|
-
{ title: "SQL 步", value:
|
|
128
|
-
{ title: "最慢步", value:
|
|
133
|
+
{ title: "步数", value: d.stepCount, tone: "lilac", color: "#722ed1" },
|
|
134
|
+
{ title: "SQL 步", value: d.sqlCount, tone: "mint", color: "#0d9f8a" },
|
|
135
|
+
{ title: "最慢步", value: o, tone: "peach", color: "#d46b08" }
|
|
129
136
|
];
|
|
130
|
-
}, [
|
|
137
|
+
}, [d]);
|
|
131
138
|
if (r)
|
|
132
|
-
return /* @__PURE__ */ e(
|
|
139
|
+
return /* @__PURE__ */ e(h.Text, { type: "secondary", children: "加载中…" });
|
|
133
140
|
if (!t)
|
|
134
|
-
return /* @__PURE__ */ e(
|
|
135
|
-
const
|
|
141
|
+
return /* @__PURE__ */ e(k, { description: c });
|
|
142
|
+
const m = t.steps || [], S = v(t.action, t.actionLabel), C = m.map((o, n) => j(o) ? String(n) : null).filter((o) => o != null), N = [
|
|
136
143
|
{
|
|
137
144
|
label: "操作人",
|
|
138
|
-
value: (
|
|
145
|
+
value: (A = t.actorName) != null && A.trim() ? t.actorName : "—"
|
|
139
146
|
},
|
|
140
|
-
{ label: "时间", value:
|
|
147
|
+
{ label: "时间", value: M(t.createdAt) },
|
|
141
148
|
{
|
|
142
149
|
label: "方法",
|
|
143
|
-
value: (
|
|
150
|
+
value: (f = t.httpMethod) != null && f.trim() ? t.httpMethod : "—"
|
|
144
151
|
},
|
|
145
152
|
{
|
|
146
153
|
label: "状态",
|
|
147
|
-
value: /* @__PURE__ */ e(
|
|
154
|
+
value: /* @__PURE__ */ e(p, { color: H(t.status), children: U(t.status) })
|
|
148
155
|
},
|
|
149
156
|
{
|
|
150
157
|
label: "类别",
|
|
151
|
-
value: t.category ?
|
|
158
|
+
value: t.category ? O(t.category) : "—"
|
|
152
159
|
},
|
|
153
160
|
{
|
|
154
161
|
label: "耗时",
|
|
@@ -156,103 +163,97 @@ const ot = ({ step: t }) => {
|
|
|
156
163
|
},
|
|
157
164
|
{
|
|
158
165
|
label: "路径",
|
|
159
|
-
value: (g = t.path) != null && g.trim() ? /* @__PURE__ */ e(
|
|
166
|
+
value: (g = t.path) != null && g.trim() ? /* @__PURE__ */ e(h.Text, { code: !0, copyable: { text: t.path }, children: t.path }) : "—",
|
|
160
167
|
span: 2
|
|
161
168
|
},
|
|
162
169
|
{
|
|
163
170
|
label: "traceId",
|
|
164
|
-
value: t.traceId ? /* @__PURE__ */ e(
|
|
171
|
+
value: t.traceId ? /* @__PURE__ */ e(h.Text, { copyable: { text: t.traceId }, children: t.traceId }) : "—",
|
|
165
172
|
span: 1
|
|
166
173
|
},
|
|
167
|
-
...
|
|
174
|
+
...ot(t) ? [{ label: "动作码", value: /* @__PURE__ */ e(h.Text, { code: !0, children: t.action }) }] : []
|
|
168
175
|
];
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
|
|
176
|
+
return /* @__PURE__ */ i(b, { className: D(l.detail, s), children: [
|
|
177
|
+
/* @__PURE__ */ i(
|
|
178
|
+
b.Part,
|
|
172
179
|
{
|
|
173
|
-
title: /* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */ e("span", { children:
|
|
175
|
-
|
|
180
|
+
title: /* @__PURE__ */ i(Y, { size: 8, wrap: !0, children: [
|
|
181
|
+
/* @__PURE__ */ e("span", { children: S }),
|
|
182
|
+
S !== t.action ? /* @__PURE__ */ e(h.Text, { type: "secondary", className: l.actionCode, children: t.action }) : null
|
|
176
183
|
] }),
|
|
177
184
|
subtitle: "事件摘要",
|
|
178
185
|
extra: t.path || t.requestCurl ? /* @__PURE__ */ e(
|
|
179
|
-
|
|
186
|
+
F,
|
|
180
187
|
{
|
|
181
188
|
size: "small",
|
|
182
189
|
type: "primary",
|
|
183
190
|
onClick: async () => {
|
|
184
191
|
try {
|
|
185
|
-
const
|
|
186
|
-
await
|
|
187
|
-
} catch (
|
|
188
|
-
|
|
192
|
+
const o = $(t, J(y));
|
|
193
|
+
await P(o) ? E.success("已复制 curl") : E.error("复制失败");
|
|
194
|
+
} catch (o) {
|
|
195
|
+
E.error(o instanceof Error ? o.message : "无法生成 curl");
|
|
189
196
|
}
|
|
190
197
|
},
|
|
191
198
|
children: "复制 curl"
|
|
192
199
|
}
|
|
193
200
|
) : void 0,
|
|
194
201
|
children: [
|
|
195
|
-
/* @__PURE__ */ e("div", { className:
|
|
196
|
-
/* @__PURE__ */ e(
|
|
202
|
+
/* @__PURE__ */ e("div", { className: l.kpiBlock, children: /* @__PURE__ */ e(tt, { items: x, inline: !0, fontSize: 20, gutter: [12, 8] }) }),
|
|
203
|
+
/* @__PURE__ */ e(et, { content: N, column: 3, bordered: !0, size: "small" })
|
|
197
204
|
]
|
|
198
205
|
}
|
|
199
206
|
),
|
|
200
|
-
/* @__PURE__ */ e(
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
207
|
+
/* @__PURE__ */ e(b.Part, { title: "耗时瀑布", children: /* @__PURE__ */ e(K, { steps: m }) }),
|
|
208
|
+
/* @__PURE__ */ e(b.Part, { title: "性能分析", children: /* @__PURE__ */ e(z, { steps: m }) }),
|
|
209
|
+
/* @__PURE__ */ i(b.Part, { title: "执行流程", children: [
|
|
210
|
+
t.stepsTruncated ? /* @__PURE__ */ i("div", { className: l.truncateNote, children: [
|
|
203
211
|
"步骤已截断:展示 ",
|
|
204
|
-
|
|
212
|
+
m.length,
|
|
205
213
|
" / ",
|
|
206
|
-
t.stepsTotal ??
|
|
214
|
+
t.stepsTotal ?? m.length
|
|
207
215
|
] }) : null,
|
|
208
|
-
|
|
209
|
-
|
|
216
|
+
m.length === 0 ? /* @__PURE__ */ e(k, { description: "无流程步骤" }) : /* @__PURE__ */ e(
|
|
217
|
+
G,
|
|
210
218
|
{
|
|
211
219
|
defaultActiveKey: C,
|
|
212
|
-
items:
|
|
220
|
+
items: m.map((o, n) => ({
|
|
213
221
|
key: String(n),
|
|
214
|
-
label: /* @__PURE__ */
|
|
215
|
-
|
|
216
|
-
typeof l.durationMs == "number" ? /* @__PURE__ */ o(d.Text, { type: "secondary", children: [
|
|
217
|
-
l.durationMs,
|
|
218
|
-
" ms"
|
|
219
|
-
] }) : null,
|
|
220
|
-
D(l) ? /* @__PURE__ */ e(S, { color: m.DANGER, children: "失败" }) : null
|
|
221
|
-
] }),
|
|
222
|
-
children: /* @__PURE__ */ e(ot, { step: l })
|
|
222
|
+
label: /* @__PURE__ */ e(at, { step: o }),
|
|
223
|
+
children: /* @__PURE__ */ e(ct, { step: o })
|
|
223
224
|
}))
|
|
224
225
|
}
|
|
225
226
|
)
|
|
226
227
|
] })
|
|
227
228
|
] });
|
|
228
|
-
},
|
|
229
|
+
}, kt = ({
|
|
229
230
|
mode: t = "app",
|
|
230
231
|
dataSource: r,
|
|
231
|
-
loading:
|
|
232
|
+
loading: c,
|
|
232
233
|
onRowClick: s,
|
|
233
|
-
filterSlot:
|
|
234
|
-
dayStats:
|
|
235
|
-
dayStatsLoading:
|
|
236
|
-
dayStatsError:
|
|
237
|
-
onExport:
|
|
234
|
+
filterSlot: y,
|
|
235
|
+
dayStats: d,
|
|
236
|
+
dayStatsLoading: x,
|
|
237
|
+
dayStatsError: m,
|
|
238
|
+
onExport: S,
|
|
238
239
|
exportLoading: C,
|
|
239
|
-
pagination:
|
|
240
|
-
className:
|
|
241
|
-
systemAppNames:
|
|
240
|
+
pagination: N,
|
|
241
|
+
className: A,
|
|
242
|
+
systemAppNames: f
|
|
242
243
|
}) => {
|
|
243
|
-
const g =
|
|
244
|
-
const
|
|
244
|
+
const g = I(() => {
|
|
245
|
+
const o = [
|
|
245
246
|
{
|
|
246
247
|
title: "时间",
|
|
247
248
|
dataIndex: "createdAt",
|
|
248
249
|
width: 180,
|
|
249
|
-
render: (n) =>
|
|
250
|
+
render: (n) => M(n)
|
|
250
251
|
},
|
|
251
252
|
{
|
|
252
253
|
title: "类别",
|
|
253
254
|
dataIndex: "category",
|
|
254
255
|
width: 96,
|
|
255
|
-
render: (n) =>
|
|
256
|
+
render: (n) => O(n)
|
|
256
257
|
},
|
|
257
258
|
{
|
|
258
259
|
title: "方法",
|
|
@@ -272,60 +273,60 @@ const ot = ({ step: t }) => {
|
|
|
272
273
|
dataIndex: "action",
|
|
273
274
|
width: 160,
|
|
274
275
|
ellipsis: !0,
|
|
275
|
-
render: (n,
|
|
276
|
+
render: (n, u) => v(u.action, u.actionLabel)
|
|
276
277
|
},
|
|
277
278
|
{
|
|
278
279
|
title: "摘要",
|
|
279
280
|
dataIndex: "summary",
|
|
280
281
|
ellipsis: !0,
|
|
281
|
-
render: (n,
|
|
282
|
-
httpMethod:
|
|
283
|
-
path:
|
|
282
|
+
render: (n, u) => Z(u.summary, v(u.action, u.actionLabel), {
|
|
283
|
+
httpMethod: u.httpMethod,
|
|
284
|
+
path: u.path
|
|
284
285
|
})
|
|
285
286
|
},
|
|
286
287
|
{
|
|
287
288
|
title: "状态",
|
|
288
289
|
dataIndex: "status",
|
|
289
290
|
width: 90,
|
|
290
|
-
render: (n) => /* @__PURE__ */ e(
|
|
291
|
+
render: (n) => /* @__PURE__ */ e(p, { color: H(n), children: U(n) })
|
|
291
292
|
},
|
|
292
293
|
{ title: "耗时ms", dataIndex: "durationMs", width: 80 },
|
|
293
294
|
{ title: "路径", dataIndex: "path", ellipsis: !0 }
|
|
294
295
|
];
|
|
295
|
-
return t === "platform" &&
|
|
296
|
+
return t === "platform" && o.splice(2, 0, {
|
|
296
297
|
title: "系统",
|
|
297
298
|
dataIndex: "systemAppId",
|
|
298
299
|
width: 140,
|
|
299
300
|
ellipsis: !0,
|
|
300
301
|
render: (n) => {
|
|
301
|
-
var
|
|
302
|
-
const
|
|
303
|
-
return
|
|
302
|
+
var R;
|
|
303
|
+
const u = n && String(n).trim() ? String(n) : "";
|
|
304
|
+
return u ? ((R = f == null ? void 0 : f[u]) == null ? void 0 : R.trim()) || u : "—";
|
|
304
305
|
}
|
|
305
|
-
}),
|
|
306
|
-
}, [t,
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
306
|
+
}), o;
|
|
307
|
+
}, [t, f]);
|
|
308
|
+
return /* @__PURE__ */ i("div", { className: D(l.wrap, A), children: [
|
|
309
|
+
y ? /* @__PURE__ */ e("div", { className: l.filter, children: y }) : null,
|
|
310
|
+
d !== void 0 || S ? /* @__PURE__ */ e(
|
|
311
|
+
q,
|
|
311
312
|
{
|
|
312
|
-
stats:
|
|
313
|
-
loading:
|
|
314
|
-
error:
|
|
315
|
-
onExport:
|
|
313
|
+
stats: d ?? null,
|
|
314
|
+
loading: x,
|
|
315
|
+
error: m,
|
|
316
|
+
onExport: S,
|
|
316
317
|
exportLoading: C
|
|
317
318
|
}
|
|
318
319
|
) : null,
|
|
319
320
|
/* @__PURE__ */ e(
|
|
320
|
-
|
|
321
|
+
rt,
|
|
321
322
|
{
|
|
322
323
|
rowKey: "id",
|
|
323
|
-
loading:
|
|
324
|
+
loading: c,
|
|
324
325
|
columns: g,
|
|
325
326
|
dataSource: r,
|
|
326
|
-
pagination:
|
|
327
|
-
onRow: s ? (
|
|
328
|
-
onClick: () => s(
|
|
327
|
+
pagination: N === void 0 ? !1 : N,
|
|
328
|
+
onRow: s ? (o) => ({
|
|
329
|
+
onClick: () => s(o),
|
|
329
330
|
style: { cursor: "pointer" }
|
|
330
331
|
}) : void 0
|
|
331
332
|
}
|
|
@@ -333,8 +334,9 @@ const ot = ({ step: t }) => {
|
|
|
333
334
|
] });
|
|
334
335
|
};
|
|
335
336
|
export {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
Rt as AuditEventDetailView,
|
|
338
|
+
kt as AuditLogList,
|
|
339
|
+
ct as AuditStepContent,
|
|
340
|
+
at as AuditStepHeader
|
|
339
341
|
};
|
|
340
342
|
//# sourceMappingURL=AuditLogList.js.map
|