@ximatai/muyun-web-app 0.26.11 → 0.26.13
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/BusinessActivityLogView-UC4rH4Fn.js +16 -0
- package/dist/BusinessLogListDrawer-BtaXVJKz.js +564 -0
- package/dist/LoginAuditLogView-Cjrp8MKX.js +16 -0
- package/dist/ModuleActionManagementView-Dkb35QXc.js +673 -0
- package/dist/ModuleGovernanceView-Dx43QvGf.js +28651 -0
- package/dist/RequestErrorLogView-WnGvMWiF.js +16 -0
- package/dist/RoleDetailWorkspaceView-DPDb_QOn.js +1397 -0
- package/dist/RuntimeLogView-BRl4ZDkU.js +330 -0
- package/dist/http-B0TC0pJB.js +157 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1938 -325
- package/dist/moduleGovernanceWorkspaceView-4V_UW-Bt.js +40 -0
- package/dist/platform-components-1cvOeHmo.js +17854 -0
- package/dist/platform-workbench-Cu14Xd9d.js +10299 -0
- package/dist/rolldown-runtime-DPVXH0ON.js +17 -0
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +0 -2
- package/dist/types/app/LoginView.vue.d.ts +1 -1
- package/dist/types/app/workbenchRouteSync.d.ts +10 -1
- package/dist/types/app/workbenchSessionTabs.d.ts +22 -0
- package/dist/types/app/workbenchStartup.d.ts +7 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -1
- package/dist/types/consumer/index.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +2208 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessState.vue.d.ts +11 -0
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/ModulePageHost.vue.d.ts +32 -5
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +4431 -0
- package/dist/types/dynamic-page-runtime/ModulePageHostSession.vue.d.ts +43 -0
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +20 -0
- package/dist/types/dynamic-page-runtime/ModuleReferenceRecordDetailBrowser.vue.d.ts +42 -0
- package/dist/types/dynamic-page-runtime/NavigatorPanelActions.vue.d.ts +22 -0
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +11 -11
- package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/TenantScopeExplorer.vue.d.ts +21 -0
- package/dist/types/dynamic-page-runtime/childAggregateContext.d.ts +11 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageActions.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/composables/useModulePageDetailActionRuntime.d.ts +5 -0
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +81 -26
- package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/formActionResult.d.ts +7 -0
- package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +7 -4
- package/dist/types/dynamic-page-runtime/formValidationCoordinator.d.ts +17 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/inputValidationActionStatus.d.ts +20 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +13 -3
- package/dist/types/dynamic-page-runtime/modulePageUnsavedState.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/pageActionInvocation.d.ts +7 -0
- package/dist/types/dynamic-page-runtime/pageActionPlacement.d.ts +14 -0
- package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/recordMutationPayload.d.ts +4 -0
- package/dist/types/dynamic-page-runtime/referenceRecordProjection.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/sessionViewBindings.d.ts +3 -0
- package/dist/types/dynamic-page-runtime/sourceReferencePickerConfig.d.ts +26 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +1728 -0
- package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +18 -0
- package/dist/types/formula/FormulaRuntime.d.ts +6 -0
- package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +5 -0
- package/dist/types/platform-admin-runtime/module-menu/ModuleMenuDrawer.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/module-menu/ModuleMenuEntriesSection.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuClient.d.ts +16 -0
- package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +2 -0
- package/dist/types/platform-admin-runtime/role/roleScopeSelectionClient.d.ts +52 -0
- package/dist/types/platform-components/AdaptiveHeaderActionBar.vue.d.ts +24 -0
- package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +15 -1
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +11 -3
- package/dist/types/platform-components/DetailRelationListPanel.vue.d.ts +1 -1
- package/dist/types/platform-components/DictionaryOptionDialog.vue.d.ts +37 -0
- package/dist/types/platform-components/DictionaryOptionDialogChoiceList.vue.d.ts +21 -0
- package/dist/types/platform-components/DictionaryPicker.vue.d.ts +47 -0
- package/dist/types/platform-components/DictionaryRadioGroup.vue.d.ts +20 -0
- package/dist/types/platform-components/EmployeePicker.vue.d.ts +40 -0
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +1 -1
- package/dist/types/platform-components/FormulaExpressionEditor.vue.d.ts +54 -0
- package/dist/types/platform-components/ManagementExplorerColumn.vue.d.ts +15 -3
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +5 -3
- package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +11 -0
- package/dist/types/platform-components/ModuleActionButton.vue.d.ts +3 -3
- package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +34 -0
- package/dist/types/platform-components/QueryCriteriaComposer.vue.d.ts +29 -0
- package/dist/types/platform-components/QueryCriteriaGroupEditor.vue.d.ts +36 -0
- package/dist/types/platform-components/QueryGroupedSummary.vue.d.ts +21 -0
- package/dist/types/platform-components/QueryValueEditor.vue.d.ts +33 -0
- package/dist/types/platform-components/ReadonlyReferenceValue.vue.d.ts +11 -0
- package/dist/types/platform-components/RecordContentSectionHeading.vue.d.ts +4 -2
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +8 -3
- package/dist/types/platform-components/RecordDetailExtensionSection.vue.d.ts +9 -3
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +41 -4
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +4 -1
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordExplorerCreateButton.vue.d.ts +16 -0
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +16 -5
- package/dist/types/platform-components/RecordFieldLabel.vue.d.ts +16 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +24 -5
- package/dist/types/platform-components/RecordFormGrid.vue.d.ts +24 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +23 -1
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +11 -3
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +3 -3
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +9 -3
- package/dist/types/platform-components/RecordPermissionDialog.vue.d.ts +15 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +3 -3
- package/dist/types/platform-components/RecordQueryEnumFilter.vue.d.ts +17 -0
- package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +12 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +120 -63
- package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +144 -0
- package/dist/types/platform-components/RecordRelationTable.vue.d.ts +62 -0
- package/dist/types/platform-components/RecordRelationValue.vue.d.ts +9 -0
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +3 -3
- package/dist/types/platform-components/ReferencePicker.vue.d.ts +47 -0
- package/dist/types/platform-components/ReferenceRecordDetailBrowser.vue.d.ts +55 -0
- package/dist/types/platform-components/ScopedTreePicker.vue.d.ts +31 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +2 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +14 -3
- package/dist/types/platform-components/UserPicker.vue.d.ts +47 -0
- package/dist/types/platform-components/adaptiveHeaderActionLayout.d.ts +22 -0
- package/dist/types/platform-components/dictionaryOptionDialogModel.d.ts +23 -0
- package/dist/types/platform-components/employeePickerModel.d.ts +19 -0
- package/dist/types/platform-components/formulaExpressionTokens.d.ts +18 -0
- package/dist/types/platform-components/identityPickerModel.d.ts +18 -0
- package/dist/types/platform-components/index.d.ts +48 -2
- package/dist/types/platform-components/managementExplorerContext.d.ts +11 -0
- package/dist/types/platform-components/managementWorkspaceContext.d.ts +20 -0
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
- package/dist/types/platform-components/optionFieldOptionCache.d.ts +1 -1
- package/dist/types/platform-components/queryCriteriaDraft.d.ts +24 -0
- package/dist/types/platform-components/queryReferencePickerProvider.d.ts +19 -0
- package/dist/types/platform-components/readonlyReferenceDisplay.d.ts +19 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +3 -0
- package/dist/types/platform-components/recordEditorSessionState.d.ts +11 -4
- package/dist/types/platform-components/recordFormFieldModel.d.ts +28 -2
- package/dist/types/platform-components/recordQueryListColumnModel.d.ts +44 -0
- package/dist/types/platform-components/referencePickerModel.d.ts +103 -0
- package/dist/types/platform-components/referencePickerReadError.d.ts +24 -0
- package/dist/types/platform-components/referenceRecordDetailBrowser.d.ts +48 -0
- package/dist/types/platform-components/scopedTreePickerModel.d.ts +46 -0
- package/dist/types/platform-components/selectionRefresh.d.ts +9 -0
- package/dist/types/platform-components/sortPartitionKey.d.ts +5 -0
- package/dist/types/platform-components/sourceReferencePickerProvider.d.ts +26 -0
- package/dist/types/platform-components/staticCrudManagementState.d.ts +7 -6
- package/dist/types/platform-components/userPickerModel.d.ts +45 -0
- package/dist/types/platform-components/userReferencePicker.d.ts +17 -0
- package/dist/types/platform-workbench/index.d.ts +2 -0
- package/dist/types/platform-workbench/useWorkspaceViewUnsavedState.d.ts +5 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +5 -1
- package/dist/types/platform-workbench/workspaceViewContract.d.ts +5 -0
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +5 -0
- package/dist/types/platform-workbench/workspaceViewNavigation.d.ts +9 -0
- package/dist/types/platform-workbench/workspaceViewUnsavedState.d.ts +5 -0
- package/dist/types/views/BusinessActivityLogView.vue.d.ts +3 -0
- package/dist/types/views/BusinessLogListDrawer.vue.d.ts +9 -0
- package/dist/types/views/BusinessRuleGovernanceSurface.vue.d.ts +10 -0
- package/dist/types/views/LoginAuditLogView.vue.d.ts +3 -0
- package/dist/types/views/MetadataGovernanceSurface.vue.d.ts +8 -0
- package/dist/types/views/MetadataSourceTree.vue.d.ts +44 -0
- package/dist/types/views/ModuleBusinessPreview.vue.d.ts +7 -0
- package/dist/types/views/ModuleExperienceProfileOverview.vue.d.ts +7 -0
- package/dist/types/views/ModuleGovernanceView.vue.d.ts +9 -0
- package/dist/types/views/PageCompositionDescriptorPreview.vue.d.ts +54 -0
- package/dist/types/views/PageCompositionTree.vue.d.ts +103 -0
- package/dist/types/views/PageCompositionWorkspace.vue.d.ts +7 -0
- package/dist/types/views/PageQuerySummaryEditor.vue.d.ts +48 -0
- package/dist/types/views/RequestErrorLogView.vue.d.ts +3 -0
- package/dist/types/views/RuntimeLogView.vue.d.ts +3 -0
- package/dist/types/views/businessLogClient.d.ts +85 -0
- package/dist/types/views/businessRuleGovernance.d.ts +201 -0
- package/dist/types/views/dictionaryRadioEligibility.d.ts +18 -0
- package/dist/types/views/dictionaryRadioFactRequestEpoch.d.ts +10 -0
- package/dist/types/views/metadataModelEditSession.d.ts +84 -0
- package/dist/types/views/metadataModelTree.d.ts +40 -0
- package/dist/types/views/metadataNaming.d.ts +7 -0
- package/dist/types/views/metadataOrchestrationState.d.ts +161 -6
- package/dist/types/views/metadataSourceTree.d.ts +10 -0
- package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +9 -0
- package/dist/types/views/pageCompositionDraftState.d.ts +404 -0
- package/dist/types/views/pageCompositionDragPayload.d.ts +26 -0
- package/dist/types/views/pageCompositionMode.d.ts +86 -0
- package/dist/types/views/pageCompositionPlacement.d.ts +48 -0
- package/dist/types/views/pageCompositionTransport.d.ts +9 -0
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +1 -0
- package/dist/types/views/roleGrantClient.d.ts +0 -1
- package/dist/types/views/runtimeLogClient.d.ts +12 -0
- package/dist/types/views/runtimeLogSse.d.ts +13 -0
- package/dist/types/views/usePageCompositionActionPreviewDrag.d.ts +41 -0
- package/dist/types/views/usePageCompositionPreviewDrag.d.ts +48 -0
- package/dist/types/vue-ui-antdv/components/UiActionButton.vue.d.ts +2 -2
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +6 -3
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +20 -2
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiSearchInput.vue.d.ts +16 -2
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +28 -2
- package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +9 -2
- package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +38 -1
- package/dist/types/vue-ui-antdv/components/UiTokenInput.vue.d.ts +62 -0
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +63 -9
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +24 -2
- package/dist/types/vue-ui-antdv/drawerDismissal.d.ts +18 -0
- package/dist/types/vue-ui-antdv/drawerWidth.d.ts +22 -0
- package/dist/types/vue-ui-antdv/index.d.ts +10 -1
- package/dist/types/vue-ui-antdv/treeStructure.d.ts +18 -0
- package/dist/types/vue-ui-antdv/types.d.ts +64 -0
- package/dist/types/vue-ui-antdv/useTreeLoader.d.ts +21 -0
- package/dist/types/vue-ui-antdv/useTreeMotion.d.ts +9 -0
- package/dist/types/vue-ui-antdv/useUiTreeDrag.d.ts +32 -0
- package/dist/types/web-contracts/index.d.ts +132 -12
- package/dist/types/web-core/http.d.ts +2 -0
- package/dist/types/web-core/module/index.d.ts +1 -0
- package/dist/types/web-core/module/moduleContext.d.ts +29 -1
- package/dist/types/web-core/module/pageActionEntries.d.ts +21 -0
- package/dist/types/web-core/module/runtimeContext.d.ts +10 -5
- package/dist/types/web-core/module/staticModuleClient.d.ts +30 -3
- package/dist/workspaceViews-CCg6V0pr.js +3623 -0
- package/package.json +1 -1
- package/dist/MetadataOrchestrationView-F_Bmfn9K.js +0 -661
- package/dist/ModuleActionManagementView-Db_3Twom.js +0 -597
- package/dist/RoleDetailWorkspaceView-UOm1ejGH.js +0 -1369
- package/dist/platform-components-59b4qzUL.js +0 -12489
- package/dist/types/views/metadataOrchestrationWorkspaceView.d.ts +0 -6
- package/dist/workspaceViews-BvV8mpML.js +0 -11149
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { A as e, Pt as t, Rt as n, Ut as r, bn as i, dn as a, kt as o, pn as ee, rt as te, un as s, wt as ne } from "./platform-components-1cvOeHmo.js";
|
|
2
|
+
import { n as c } from "./http-B0TC0pJB.js";
|
|
3
|
+
import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, nextTick as _, onBeforeUnmount as re, openBlock as v, ref as y, toDisplayString as b, unref as x, watch as ie, withCtx as S } from "vue";
|
|
4
|
+
//#region src/views/runtimeLogClient.ts
|
|
5
|
+
var C = "/platform.runtime_log";
|
|
6
|
+
function w(e) {
|
|
7
|
+
if (!c(e)) throw Error("当前 HTTP 客户端不支持运行日志流。");
|
|
8
|
+
return {
|
|
9
|
+
download(t) {
|
|
10
|
+
return e.stream({
|
|
11
|
+
path: `${C}/files/${encodeURIComponent(t)}/download`,
|
|
12
|
+
headers: { Accept: "application/octet-stream" }
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
activeStream(t, n) {
|
|
16
|
+
return e.stream({
|
|
17
|
+
method: "POST",
|
|
18
|
+
path: `${C}/active/stream`,
|
|
19
|
+
body: { tailLines: t },
|
|
20
|
+
headers: { Accept: "text/event-stream, application/json" },
|
|
21
|
+
...n ? { signal: n } : {}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/views/runtimeLogSse.ts
|
|
28
|
+
function T(e) {
|
|
29
|
+
let t = "", n = "message", r = [];
|
|
30
|
+
function i() {
|
|
31
|
+
r.length > 0 && e({
|
|
32
|
+
event: n,
|
|
33
|
+
data: r.join("\n")
|
|
34
|
+
}), n = "message", r = [];
|
|
35
|
+
}
|
|
36
|
+
function a(e) {
|
|
37
|
+
if (e === "") {
|
|
38
|
+
i();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (e.startsWith(":")) return;
|
|
42
|
+
let t = e.indexOf(":"), a = t >= 0 ? e.slice(0, t) : e, o = t >= 0 ? e.slice(t + 1).replace(/^ /, "") : "";
|
|
43
|
+
a === "event" ? n = o || "message" : a === "data" && r.push(o);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
push(e) {
|
|
47
|
+
t += e;
|
|
48
|
+
let n = t.indexOf("\n");
|
|
49
|
+
for (; n >= 0;) {
|
|
50
|
+
let e = t.slice(0, n).replace(/\r$/, "");
|
|
51
|
+
t = t.slice(n + 1), a(e), n = t.indexOf("\n");
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
finish() {
|
|
55
|
+
t &&= (a(t.replace(/\r$/, "")), ""), i();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/views/RuntimeLogView.vue?vue&type=script&setup=true&lang.ts
|
|
61
|
+
var E = { class: "runtime-log-view" }, D = { class: "runtime-log-view__header-actions" }, O = { key: 2 }, k = { key: 3 }, A = { class: "runtime-log-view__row-actions" }, ae = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "runtime-log-view__content"
|
|
64
|
+
}, oe = 500, j = /*#__PURE__*/ ee(/* @__PURE__ */ g({
|
|
65
|
+
name: "RuntimeLogView",
|
|
66
|
+
__name: "RuntimeLogView",
|
|
67
|
+
setup(ee) {
|
|
68
|
+
let c = i({ moduleAlias: "platform.runtime_log" }), g = w(c.http), C = y(), j = y(), M = y(!1), N = y(), P = y(""), F = y("closed"), I = y(), L = y(), R = y(!0), z = 0, B, V, H = 0, U = l(() => I.value ? I.value : {
|
|
69
|
+
connecting: "正在连接实时日志…",
|
|
70
|
+
live: "正在实时更新",
|
|
71
|
+
rotated: "日志文件已轮转,请重新连接。",
|
|
72
|
+
error: "实时日志连接已中断。",
|
|
73
|
+
closed: "实时日志已关闭。"
|
|
74
|
+
}[F.value]), W = l(() => [
|
|
75
|
+
"closed",
|
|
76
|
+
"error",
|
|
77
|
+
"rotated"
|
|
78
|
+
].includes(F.value)), G = [
|
|
79
|
+
{
|
|
80
|
+
key: "name",
|
|
81
|
+
title: "文件名称",
|
|
82
|
+
width: "360px"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: "sizeBytes",
|
|
86
|
+
title: "文件大小",
|
|
87
|
+
width: "140px",
|
|
88
|
+
align: "right"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: "lastModifiedAt",
|
|
92
|
+
title: "最后修改时间",
|
|
93
|
+
width: "208px"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: "active",
|
|
97
|
+
title: "状态",
|
|
98
|
+
width: "132px"
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
re(J), ie(P, () => {
|
|
102
|
+
R.value && Y();
|
|
103
|
+
});
|
|
104
|
+
function K() {
|
|
105
|
+
M.value = !0, N.value = void 0, P.value = "", R.value = !0, H = 0, q();
|
|
106
|
+
}
|
|
107
|
+
function se() {
|
|
108
|
+
M.value && (P.value = "", R.value = !0, H = 0, q());
|
|
109
|
+
}
|
|
110
|
+
function ce() {
|
|
111
|
+
M.value = !1, N.value = void 0, J();
|
|
112
|
+
}
|
|
113
|
+
function q() {
|
|
114
|
+
J();
|
|
115
|
+
let e = ++z, t = new AbortController();
|
|
116
|
+
V = t, F.value = "connecting", I.value = void 0, le(e, t);
|
|
117
|
+
}
|
|
118
|
+
async function le(e, t) {
|
|
119
|
+
try {
|
|
120
|
+
let n = await g.activeStream(oe, t.signal);
|
|
121
|
+
if (t.signal.aborted || e !== z) {
|
|
122
|
+
await n.cancel();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
let r = n.getReader();
|
|
126
|
+
B = r;
|
|
127
|
+
let i = new TextDecoder(), a = T((n) => ue(n, e, t));
|
|
128
|
+
for (; !t.signal.aborted && e === z;) {
|
|
129
|
+
let { done: e, value: t } = await r.read();
|
|
130
|
+
if (e) break;
|
|
131
|
+
t && a.push(i.decode(t, { stream: !0 }));
|
|
132
|
+
}
|
|
133
|
+
a.push(i.decode()), a.finish(), !t.signal.aborted && e === z && F.value !== "rotated" && (F.value = "closed", I.value = "实时日志连接已结束。");
|
|
134
|
+
} catch (n) {
|
|
135
|
+
!t.signal.aborted && e === z && (F.value = "error", I.value = $(n, "实时日志连接失败,请重新连接。"), o(n, {
|
|
136
|
+
source: "runtime-log-stream",
|
|
137
|
+
phase: "load"
|
|
138
|
+
}));
|
|
139
|
+
} finally {
|
|
140
|
+
e === z && (B = void 0);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function ue(e, t, n) {
|
|
144
|
+
if (!(n.signal.aborted || t !== z)) switch (e.event) {
|
|
145
|
+
case "snapshot":
|
|
146
|
+
case "reset": {
|
|
147
|
+
let t = X(e.data);
|
|
148
|
+
P.value = Z(t.text), N.value = Q(t.fileName) ?? N.value, F.value = "live", I.value = e.event === "reset" ? "日志内容已重置,正在继续实时更新。" : void 0;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
case "append": {
|
|
152
|
+
let t = X(e.data);
|
|
153
|
+
P.value += Z(t.text), F.value = "live", I.value = void 0;
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
case "rotated": {
|
|
157
|
+
let t = X(e.data);
|
|
158
|
+
N.value = Q(t.fileName) ?? N.value, H < 1 ? (H += 1, F.value = "connecting", I.value = "日志文件已轮转,正在重新连接最新文件…", _(() => q())) : (F.value = "rotated", I.value = "日志文件再次轮转,请手动重新连接。", J());
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
case "error": {
|
|
162
|
+
let t = X(e.data);
|
|
163
|
+
F.value = "error", I.value = Q(t.message) ?? "实时日志连接出现错误,请重新连接。", J();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function J() {
|
|
168
|
+
z += 1, V?.abort(), V = void 0;
|
|
169
|
+
let e = B;
|
|
170
|
+
B = void 0, e && e.cancel().catch(() => void 0);
|
|
171
|
+
}
|
|
172
|
+
async function de(e) {
|
|
173
|
+
if (!j.value) {
|
|
174
|
+
j.value = e.name;
|
|
175
|
+
try {
|
|
176
|
+
let t = await fe(await g.download(e.name)), n = t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength), r = URL.createObjectURL(new Blob([n], { type: "text/plain;charset=utf-8" })), i = document.createElement("a");
|
|
177
|
+
i.href = r, i.download = e.name, i.click(), window.setTimeout(() => URL.revokeObjectURL(r), 6e4);
|
|
178
|
+
} catch (t) {
|
|
179
|
+
C.value = $(t, `下载 ${e.name} 失败,请稍后重试。`), o(t, {
|
|
180
|
+
source: "runtime-log-download",
|
|
181
|
+
phase: "load"
|
|
182
|
+
});
|
|
183
|
+
} finally {
|
|
184
|
+
j.value = void 0;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
async function fe(e) {
|
|
189
|
+
let t = e.getReader(), n = [], r = 0;
|
|
190
|
+
try {
|
|
191
|
+
for (;;) {
|
|
192
|
+
let { done: e, value: i } = await t.read();
|
|
193
|
+
if (e) break;
|
|
194
|
+
i && (n.push(i), r += i.length);
|
|
195
|
+
}
|
|
196
|
+
} finally {
|
|
197
|
+
t.releaseLock();
|
|
198
|
+
}
|
|
199
|
+
let i = new Uint8Array(r), a = 0;
|
|
200
|
+
for (let e of n) i.set(e, a), a += e.length;
|
|
201
|
+
return i;
|
|
202
|
+
}
|
|
203
|
+
function pe() {
|
|
204
|
+
let e = L.value;
|
|
205
|
+
e && (R.value = e.scrollTop + e.clientHeight >= e.scrollHeight - 24);
|
|
206
|
+
}
|
|
207
|
+
async function Y() {
|
|
208
|
+
await _();
|
|
209
|
+
let e = L.value;
|
|
210
|
+
e && (e.scrollTop = e.scrollHeight);
|
|
211
|
+
}
|
|
212
|
+
function X(e) {
|
|
213
|
+
try {
|
|
214
|
+
let t = JSON.parse(e);
|
|
215
|
+
return t && typeof t == "object" && !Array.isArray(t) ? t : {};
|
|
216
|
+
} catch {
|
|
217
|
+
return {};
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function Z(e) {
|
|
221
|
+
return typeof e == "string" ? e : "";
|
|
222
|
+
}
|
|
223
|
+
function Q(e) {
|
|
224
|
+
return typeof e == "string" && e ? e : void 0;
|
|
225
|
+
}
|
|
226
|
+
function $(e, t) {
|
|
227
|
+
return e instanceof Error && e.message ? e.message : t;
|
|
228
|
+
}
|
|
229
|
+
return (i, o) => (v(), f("section", E, [
|
|
230
|
+
C.value ? (v(), u(x(n), {
|
|
231
|
+
key: 0,
|
|
232
|
+
class: "runtime-log-view__error",
|
|
233
|
+
message: C.value
|
|
234
|
+
}, null, 8, ["message"])) : d("v-if", !0),
|
|
235
|
+
h(x(e), {
|
|
236
|
+
class: "runtime-log-view__list",
|
|
237
|
+
context: x(c),
|
|
238
|
+
title: "程序日志",
|
|
239
|
+
columns: G,
|
|
240
|
+
"row-key": "name",
|
|
241
|
+
"show-recycle-bin": !1,
|
|
242
|
+
"standard-crud-actions": !1,
|
|
243
|
+
"page-size": 20,
|
|
244
|
+
"page-size-options": [
|
|
245
|
+
10,
|
|
246
|
+
20,
|
|
247
|
+
50
|
|
248
|
+
],
|
|
249
|
+
"empty-description": "当前日志目录中没有可用的日志文件",
|
|
250
|
+
"row-actions-of": () => [],
|
|
251
|
+
"row-actions-title": "操作",
|
|
252
|
+
"action-column-width": "176"
|
|
253
|
+
}, {
|
|
254
|
+
toolbarActions: S(() => [p("div", D, [h(x(a), {
|
|
255
|
+
type: "primary",
|
|
256
|
+
"icon-name": "eye",
|
|
257
|
+
onClick: K
|
|
258
|
+
}, {
|
|
259
|
+
default: S(() => [...o[0] ||= [m(" 实时查看 ", -1)]]),
|
|
260
|
+
_: 1
|
|
261
|
+
})])]),
|
|
262
|
+
cell: S(({ column: e, record: n }) => [e.key === "sizeBytes" ? (v(), u(x(ne), {
|
|
263
|
+
key: 0,
|
|
264
|
+
value: n.sizeBytes
|
|
265
|
+
}, null, 8, ["value"])) : e.key === "lastModifiedAt" ? (v(), u(x(t), {
|
|
266
|
+
key: 1,
|
|
267
|
+
value: n.lastModifiedAt
|
|
268
|
+
}, null, 8, ["value"])) : e.key === "active" ? (v(), f("span", O, b(n.active ? "正在写入" : "已归档"), 1)) : (v(), f("span", k, b(n[e.key]), 1))]),
|
|
269
|
+
rowActions: S(({ record: e }) => [p("div", A, [e.active === !0 ? (v(), u(x(a), {
|
|
270
|
+
key: 0,
|
|
271
|
+
type: "link",
|
|
272
|
+
size: "small",
|
|
273
|
+
"icon-name": "eye",
|
|
274
|
+
onClick: K
|
|
275
|
+
}, {
|
|
276
|
+
default: S(() => [...o[1] ||= [m(" 实时查看 ", -1)]]),
|
|
277
|
+
_: 1
|
|
278
|
+
})) : d("v-if", !0), h(x(a), {
|
|
279
|
+
type: "link",
|
|
280
|
+
size: "small",
|
|
281
|
+
"icon-name": "download",
|
|
282
|
+
loading: j.value === e.name,
|
|
283
|
+
disabled: !!j.value && j.value !== e.name,
|
|
284
|
+
onClick: (t) => de(e)
|
|
285
|
+
}, {
|
|
286
|
+
default: S(() => [...o[2] ||= [m(" 下载 ", -1)]]),
|
|
287
|
+
_: 1
|
|
288
|
+
}, 8, [
|
|
289
|
+
"loading",
|
|
290
|
+
"disabled",
|
|
291
|
+
"onClick"
|
|
292
|
+
])])]),
|
|
293
|
+
_: 1
|
|
294
|
+
}, 8, ["context"]),
|
|
295
|
+
h(x(te), {
|
|
296
|
+
open: M.value,
|
|
297
|
+
title: N.value ? `实时日志 · ${N.value}` : "实时日志",
|
|
298
|
+
subtitle: U.value,
|
|
299
|
+
width: "standard",
|
|
300
|
+
"render-mode": "inline",
|
|
301
|
+
dismissal: "dismissible",
|
|
302
|
+
onClose: ce
|
|
303
|
+
}, {
|
|
304
|
+
"header-actions": S(() => [W.value ? (v(), u(x(s), {
|
|
305
|
+
key: 0,
|
|
306
|
+
emphasis: "quiet",
|
|
307
|
+
"icon-name": "reload",
|
|
308
|
+
title: "重新连接",
|
|
309
|
+
onClick: se
|
|
310
|
+
})) : d("v-if", !0)]),
|
|
311
|
+
default: S(() => [p("div", {
|
|
312
|
+
ref_key: "logViewport",
|
|
313
|
+
ref: L,
|
|
314
|
+
class: "runtime-log-view__viewport",
|
|
315
|
+
onScroll: pe
|
|
316
|
+
}, [P.value ? (v(), f("pre", ae, b(P.value), 1)) : (v(), u(x(r), {
|
|
317
|
+
key: 1,
|
|
318
|
+
description: F.value === "connecting" ? "正在读取日志末尾内容…" : "暂无日志内容"
|
|
319
|
+
}, null, 8, ["description"]))], 544)]),
|
|
320
|
+
_: 1
|
|
321
|
+
}, 8, [
|
|
322
|
+
"open",
|
|
323
|
+
"title",
|
|
324
|
+
"subtitle"
|
|
325
|
+
])
|
|
326
|
+
]));
|
|
327
|
+
}
|
|
328
|
+
}), [["__scopeId", "data-v-77c0bbc8"]]);
|
|
329
|
+
//#endregion
|
|
330
|
+
export { j as default };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { hr as e, vr as t } from "./platform-components-1cvOeHmo.js";
|
|
2
|
+
//#region src/web-core/http.ts
|
|
3
|
+
function n(e, t, n) {
|
|
4
|
+
let i = () => {
|
|
5
|
+
let e = typeof t == "function" ? t() : t, n = {};
|
|
6
|
+
for (let [t, r] of Object.entries(e)) typeof r == "string" && r.trim().length > 0 && (n[t] = r);
|
|
7
|
+
return n;
|
|
8
|
+
}, a = (e) => {
|
|
9
|
+
if (n && !n(e)) return e;
|
|
10
|
+
let t = i();
|
|
11
|
+
if (Object.keys(t).length === 0) return e;
|
|
12
|
+
let r = new Set(Object.keys(t).map((e) => e.toLowerCase())), a = Object.fromEntries(Object.entries(e.headers ?? {}).filter(([e]) => !r.has(e.toLowerCase())));
|
|
13
|
+
return {
|
|
14
|
+
...e,
|
|
15
|
+
headers: {
|
|
16
|
+
...a,
|
|
17
|
+
...t
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}, o = { request(t) {
|
|
21
|
+
return e.request(a(t));
|
|
22
|
+
} };
|
|
23
|
+
return r(e) ? {
|
|
24
|
+
...o,
|
|
25
|
+
stream(t) {
|
|
26
|
+
return e.stream(a(t));
|
|
27
|
+
}
|
|
28
|
+
} : o;
|
|
29
|
+
}
|
|
30
|
+
function r(e) {
|
|
31
|
+
return typeof e.stream == "function";
|
|
32
|
+
}
|
|
33
|
+
function i(n = {}) {
|
|
34
|
+
return {
|
|
35
|
+
async request(e) {
|
|
36
|
+
let t = await a(n, e);
|
|
37
|
+
return t.ok ? await p(t) : o(n, t);
|
|
38
|
+
},
|
|
39
|
+
async stream(r) {
|
|
40
|
+
let i = await a(n, r, { Accept: u(r.headers, "accept") ?? "text/event-stream" });
|
|
41
|
+
if (!i.ok) return o(n, i);
|
|
42
|
+
if (!i.body) throw new e("Response stream is unavailable", { code: t.networkError });
|
|
43
|
+
return i.body;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async function a(n, r, i) {
|
|
48
|
+
try {
|
|
49
|
+
return await fetch(c(n.baseUrl, r), {
|
|
50
|
+
method: r.method ?? "GET",
|
|
51
|
+
credentials: n.credentials,
|
|
52
|
+
headers: {
|
|
53
|
+
...l(n, r),
|
|
54
|
+
...i
|
|
55
|
+
},
|
|
56
|
+
body: d(r.body),
|
|
57
|
+
signal: r.signal
|
|
58
|
+
});
|
|
59
|
+
} catch (n) {
|
|
60
|
+
throw new e("Network request failed", {
|
|
61
|
+
code: t.networkError,
|
|
62
|
+
details: { cause: n instanceof Error ? n.message : String(n) }
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async function o(n, r) {
|
|
67
|
+
let i;
|
|
68
|
+
try {
|
|
69
|
+
i = await f(r);
|
|
70
|
+
} catch (n) {
|
|
71
|
+
i = new e(`Request failed with status ${r.status}`, {
|
|
72
|
+
code: t.httpError,
|
|
73
|
+
status: r.status,
|
|
74
|
+
traceId: r.headers.get("X-MuYun-Trace-Id") ?? void 0,
|
|
75
|
+
details: { cause: n instanceof Error ? n.message : String(n) }
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
throw s(n, i), i;
|
|
79
|
+
}
|
|
80
|
+
function s(e, n) {
|
|
81
|
+
n.status === 401 && n.code !== t.loginBadCredentials && (n.globallyHandled = e.onAuthenticationRequired?.(n, e.token) === !0);
|
|
82
|
+
}
|
|
83
|
+
function c(e, t) {
|
|
84
|
+
let n = e?.replace(/\/$/, "") ?? "", r = t.path.startsWith("/") ? t.path : `/${t.path}`, i = typeof window > "u" ? "http://localhost" : window.location.origin, a = new URL(`${n}${r}`, i);
|
|
85
|
+
return Object.entries(t.query ?? {}).forEach(([e, t]) => {
|
|
86
|
+
let n = Array.isArray(t) ? t : [t];
|
|
87
|
+
for (let t of n) t != null && a.searchParams.append(e, String(t));
|
|
88
|
+
}), a;
|
|
89
|
+
}
|
|
90
|
+
function l(e, t) {
|
|
91
|
+
let n = {
|
|
92
|
+
Accept: "application/json",
|
|
93
|
+
...e.headers
|
|
94
|
+
};
|
|
95
|
+
return t.body !== void 0 && !(t.body instanceof FormData) && (n["Content-Type"] = "application/json"), e.token && (n.Authorization = `Bearer ${e.token}`), e.traceId && (n["X-MuYun-Trace-Id"] = e.traceId), Object.assign(n, t.headers), n;
|
|
96
|
+
}
|
|
97
|
+
function u(e, t) {
|
|
98
|
+
return Object.entries(e ?? {}).find(([e]) => e.toLowerCase() === t)?.[1];
|
|
99
|
+
}
|
|
100
|
+
function d(e) {
|
|
101
|
+
if (e !== void 0) return e instanceof FormData ? e : JSON.stringify(e);
|
|
102
|
+
}
|
|
103
|
+
async function f(n) {
|
|
104
|
+
let r = await p(n), i = _(r), a = i?.text ?? m(r) ?? `Request failed with status ${n.status}`, o = i?.code ?? h(r) ?? t.httpError;
|
|
105
|
+
return new e(a, {
|
|
106
|
+
code: o,
|
|
107
|
+
status: n.status,
|
|
108
|
+
traceId: g(r) ?? n.headers.get("X-MuYun-Trace-Id") ?? void 0,
|
|
109
|
+
scope: y(r, "scope"),
|
|
110
|
+
targets: v(r),
|
|
111
|
+
details: y(r, "details") ?? (x(r) ? r : void 0),
|
|
112
|
+
messageArgs: y(r, "messageArgs") ?? i?.messageArgs,
|
|
113
|
+
actionMessage: i
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
async function p(e) {
|
|
117
|
+
if (e.status === 204) return;
|
|
118
|
+
let t = await e.text();
|
|
119
|
+
if (t) return (e.headers.get("content-type") ?? "").includes("application/json") ? JSON.parse(t) : t;
|
|
120
|
+
}
|
|
121
|
+
function m(e) {
|
|
122
|
+
return b(e, "message");
|
|
123
|
+
}
|
|
124
|
+
function h(e) {
|
|
125
|
+
return b(e, "code");
|
|
126
|
+
}
|
|
127
|
+
function g(e) {
|
|
128
|
+
return b(e, "traceId");
|
|
129
|
+
}
|
|
130
|
+
function _(e) {
|
|
131
|
+
if (!x(e) || !x(e.actionMessage)) return;
|
|
132
|
+
let t = b(e.actionMessage, "text");
|
|
133
|
+
if (!t) return;
|
|
134
|
+
let n = b(e.actionMessage, "code"), r = b(e.actionMessage, "type"), i = y(e.actionMessage, "messageArgs");
|
|
135
|
+
return {
|
|
136
|
+
text: t,
|
|
137
|
+
code: n,
|
|
138
|
+
type: r,
|
|
139
|
+
...i ? { messageArgs: i } : {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function v(e) {
|
|
143
|
+
return !x(e) || !Array.isArray(e.targets) ? [] : e.targets.filter(x);
|
|
144
|
+
}
|
|
145
|
+
function y(e, t) {
|
|
146
|
+
if (x(e) && x(e[t])) return e[t];
|
|
147
|
+
}
|
|
148
|
+
function b(e, t) {
|
|
149
|
+
if (!x(e) || !(t in e)) return;
|
|
150
|
+
let n = e[t];
|
|
151
|
+
return typeof n == "string" ? n : void 0;
|
|
152
|
+
}
|
|
153
|
+
function x(e) {
|
|
154
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
export { r as n, n as r, i as t };
|