agentworkshop 0.7.9 → 0.7.12
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BUPj10t4.js → 6vYobj4F.js} +1 -1
- package/.output/public/_nuxt/{BCJFMBQ6.js → B-xskWta.js} +1 -1
- package/.output/public/_nuxt/{BC8s1Guv.js → B3Psw_sL.js} +1 -1
- package/.output/public/_nuxt/B53Mp7lD.js +1 -0
- package/.output/public/_nuxt/{BDASpD_i.js → BBwMH_hG.js} +1 -1
- package/.output/public/_nuxt/BNXfwXpE.js +1 -0
- package/.output/public/_nuxt/BbZAzXjZ2.js +1 -0
- package/.output/public/_nuxt/{CFn4vHwD.js → Bc3PiGGr.js} +1 -1
- package/.output/public/_nuxt/BcrN7QEl2.js +1 -0
- package/.output/public/_nuxt/BgOhoDTI.js +1 -0
- package/.output/public/_nuxt/Bmpvki7M.js +1 -0
- package/.output/public/_nuxt/BxPPAkGA.js +3 -0
- package/.output/public/_nuxt/{u7KWCGSb.js → BxtpDtzC.js} +1 -1
- package/.output/public/_nuxt/{DxrgFxIr2.js → C4OAdbVK2.js} +1 -1
- package/.output/public/_nuxt/C6m-kenn.js +1 -0
- package/.output/public/_nuxt/CcwJ2mrD2.js +1 -0
- package/.output/public/_nuxt/Cj6139IM.js +1 -0
- package/.output/public/_nuxt/{6PZPfFcO.js → Cor9siSf.js} +1 -1
- package/.output/public/_nuxt/CvYfzHYz.js +1 -0
- package/.output/public/_nuxt/D2JyEL28.js +14 -0
- package/.output/public/_nuxt/{DDdEnkdw.js → D8xY-Yjc.js} +2 -2
- package/.output/public/_nuxt/{Ct68Z0232.js → DA4lxCWC2.js} +1 -1
- package/.output/public/_nuxt/{MyA0Oeqd.js → DNxVTfhe.js} +1 -1
- package/.output/public/_nuxt/DT-Wg8r1.js +1 -0
- package/.output/public/_nuxt/DTYBfjRY.js +1 -0
- package/.output/public/_nuxt/{DvgKXPgu2.js → DWcEk1ur2.js} +1 -1
- package/.output/public/_nuxt/DaE5saZg.js +1 -0
- package/.output/public/_nuxt/Dhqra7NB.js +1 -0
- package/.output/public/_nuxt/DlRO_q5L.js +1 -0
- package/.output/public/_nuxt/{D8EfUxO2.js → Ds8JbqGB.js} +1 -1
- package/.output/public/_nuxt/Dsdy4Ua-.js +1 -0
- package/.output/public/_nuxt/{DN5RuZ8k.js → DyisHHzD.js} +1 -1
- package/.output/public/_nuxt/{91DZTUMJ.js → E88a-JCG.js} +1 -1
- package/.output/public/_nuxt/ORt9oDIy2.js +1 -0
- package/.output/public/_nuxt/{By8BpbKH.js → QoCzfpo2.js} +1 -1
- package/.output/public/_nuxt/RzXYI9FM.js +23 -0
- package/.output/public/_nuxt/{BuktKVqK2.js → arUY5dyq2.js} +2 -2
- package/.output/public/_nuxt/bAFueD6a.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/54e22640-4fd0-4fee-9077-31d4d4bb7969.json +1 -0
- package/.output/public/_nuxt/dcw.rpqpOYQ8.css +1 -0
- package/.output/public/_nuxt/{default.BR3e5fPY.css → default.BbgdTDCk.css} +1 -1
- package/.output/public/_nuxt/{C9cU_Ujd.js → eHYnGew0.js} +1 -1
- package/.output/public/_nuxt/{DM4CNkXz.js → eUGyJdiT.js} +1 -1
- package/.output/public/_nuxt/{entry.5qf6EqfN.css → entry.Bv_GCmPP.css} +1 -1
- package/.output/public/_nuxt/hb_ceMJP.js +1 -0
- package/.output/public/_nuxt/{B1g8pJmr.js → kkEthL84.js} +1 -1
- package/.output/public/_nuxt/logs.BS1sb41K.css +1 -0
- package/.output/public/_nuxt/pages.BkE-AfIb.css +1 -0
- package/.output/public/_nuxt/permissions.DTRtZeTw.css +1 -0
- package/.output/public/_nuxt/plugins.BcSEwwGb.css +1 -0
- package/.output/public/_nuxt/settings.BqMF2nfj.css +1 -0
- package/.output/public/_nuxt/tokens.rW1xHxRW.css +1 -0
- package/.output/public/_nuxt/workshop.CbymC2LY.css +1 -0
- package/.output/public/_nuxt/zVkqCZ78.js +1 -0
- package/.output/server/chunks/_/LeftOutlined.mjs +1 -1
- package/.output/server/chunks/_/SearchOutlined.mjs +1 -1
- package/.output/server/chunks/_/character-asset.repo.mjs +1 -1
- package/.output/server/chunks/_/host-bindings.mjs +1 -1
- package/.output/server/chunks/_/nitro.mjs +1549 -1228
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/_/scene-layout.repo.mjs +1 -1
- package/.output/server/chunks/build/Col-biaNnEPf.mjs +1 -1
- package/.output/server/chunks/build/{OmpTerminalPanel-COphA1br.mjs → OmpTerminalPanel-Ban3yJZ4.mjs} +4 -5
- package/.output/server/chunks/build/OmpTerminalPanel-Ban3yJZ4.mjs.map +1 -0
- package/.output/server/chunks/build/{TownView-D8DSdO3H.mjs → TownView-CunmEMzS.mjs} +8 -9
- package/.output/server/chunks/build/{TownView-D8DSdO3H.mjs.map → TownView-CunmEMzS.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-BV4FfiYd.mjs → _id_-CVnMdSeG.mjs} +7 -7
- package/.output/server/chunks/build/{_id_-BV4FfiYd.mjs.map → _id_-CVnMdSeG.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-TP9hvnBM.mjs → _id_-D265Wh_k.mjs} +7 -7
- package/.output/server/chunks/build/{_id_-TP9hvnBM.mjs.map → _id_-D265Wh_k.mjs.map} +1 -1
- package/.output/server/chunks/build/{_wsId_-Mm9sQSz2.mjs → _wsId_-eNJmBp05.mjs} +17 -17
- package/.output/server/chunks/build/{_wsId_-Mm9sQSz2.mjs.map → _wsId_-eNJmBp05.mjs.map} +1 -1
- package/.output/server/chunks/build/{agents-To3a5xcZ.mjs → agents-B10wmFri.mjs} +9 -9
- package/.output/server/chunks/build/{agents-To3a5xcZ.mjs.map → agents-B10wmFri.mjs.map} +1 -1
- package/.output/server/chunks/build/alert-qJnjyRcP.mjs +1 -1
- package/.output/server/chunks/build/api-error-dul30BYQ.mjs +1 -1
- package/.output/server/chunks/build/button-DEcZFcqN.mjs +2 -2
- package/.output/server/chunks/build/{card-Dipvaykh.mjs → card-CCPQoKlh.mjs} +4 -4
- package/.output/server/chunks/build/{card-Dipvaykh.mjs.map → card-CCPQoKlh.mjs.map} +1 -1
- package/.output/server/chunks/build/{channel-templates-DRsP-qxl.mjs → channel-templates-CpWxVk5A.mjs} +7 -7
- package/.output/server/chunks/build/{channel-templates-DRsP-qxl.mjs.map → channel-templates-CpWxVk5A.mjs.map} +1 -1
- package/.output/server/chunks/build/{checkbox-dzcpU_Cd.mjs → checkbox-Dv1kjaUZ.mjs} +3 -3
- package/.output/server/chunks/build/{checkbox-dzcpU_Cd.mjs.map → checkbox-Dv1kjaUZ.mjs.map} +1 -1
- package/.output/server/chunks/build/client-only-D5BzSQc6.mjs +1 -1
- package/.output/server/chunks/build/{daq-_hCEaYLd.mjs → daq-DxaXk_8N.mjs} +9 -10
- package/.output/server/chunks/build/daq-DxaXk_8N.mjs.map +1 -0
- package/.output/server/chunks/build/{dcw-C7pJ4Y0p.mjs → dcw-B0dtiHFG.mjs} +47 -47
- package/.output/server/chunks/build/dcw-B0dtiHFG.mjs.map +1 -0
- package/.output/server/chunks/build/{default-Dnjs36e8.mjs → default-DdV642BY.mjs} +41 -13
- package/.output/server/chunks/build/{default-Dnjs36e8.mjs.map → default-DdV642BY.mjs.map} +1 -1
- package/.output/server/chunks/build/drawer-Cmh90erI.mjs +1 -1
- package/.output/server/chunks/build/dropdown-vhn1NPFs.mjs +2 -2
- package/.output/server/chunks/build/hasIn-vQ9LWt-J.mjs +554 -0
- package/.output/server/chunks/build/hasIn-vQ9LWt-J.mjs.map +1 -0
- package/.output/server/chunks/build/initDefaultProps-DIbWwP4R.mjs +1 -1
- package/.output/server/chunks/build/{input-sf_BT6o6.mjs → input-DxDqeyQW.mjs} +5 -553
- package/.output/server/chunks/build/input-DxDqeyQW.mjs.map +1 -0
- package/.output/server/chunks/build/{input-number-Bd55elNN.mjs → input-number-CZ3ZrCsy.mjs} +3 -3
- package/.output/server/chunks/build/{input-number-Bd55elNN.mjs.map → input-number-CZ3ZrCsy.mjs.map} +1 -1
- package/.output/server/chunks/build/{logs-C039TFW1.mjs → logs-Crf6f1IC.mjs} +39 -40
- package/.output/server/chunks/build/logs-Crf6f1IC.mjs.map +1 -0
- package/.output/server/chunks/build/menu-WCrlpYVh.mjs +2 -2
- package/.output/server/chunks/build/modal-yvUquPj5.mjs +2 -2
- package/.output/server/chunks/build/{monitor-MIOvsyLa.mjs → monitor-miqq9xHB.mjs} +11 -11
- package/.output/server/chunks/build/{monitor-MIOvsyLa.mjs.map → monitor-miqq9xHB.mjs.map} +1 -1
- package/.output/server/chunks/build/{pages-C_VSGSGo.mjs → pages-BmRUbGUi.mjs} +32 -22
- package/.output/server/chunks/build/pages-BmRUbGUi.mjs.map +1 -0
- package/.output/server/chunks/build/permissions-CxEgXic0.mjs +534 -0
- package/.output/server/chunks/build/permissions-CxEgXic0.mjs.map +1 -0
- package/.output/server/chunks/build/{plugins-4FMWkN8d.mjs → plugins-wLIKHcIE.mjs} +19 -20
- package/.output/server/chunks/build/{plugins-4FMWkN8d.mjs.map → plugins-wLIKHcIE.mjs.map} +1 -1
- package/.output/server/chunks/build/popconfirm-CRaHcz5O.mjs +2 -2
- package/.output/server/chunks/build/responsiveObserve-CS0UB6wQ.mjs +1 -1
- package/.output/server/chunks/build/{segmented-DPe9ZzLO.mjs → segmented-ChmQZwz6.mjs} +5 -4
- package/.output/server/chunks/build/{segmented-DPe9ZzLO.mjs.map → segmented-ChmQZwz6.mjs.map} +1 -1
- package/.output/server/chunks/build/select-D-CeE5vY.mjs +1 -1
- package/.output/server/chunks/build/{settings-DA8IkGLo.mjs → settings-BPBll_7K.mjs} +28 -26
- package/.output/server/chunks/build/settings-BPBll_7K.mjs.map +1 -0
- package/.output/server/chunks/build/space-CCBYAkXt.mjs +2 -2
- package/.output/server/chunks/build/spin-HVY81X_L.mjs +1 -1
- package/.output/server/chunks/build/switch-CelRXpcy.mjs +2 -2
- package/.output/server/chunks/build/{table-Cswq-l2r.mjs → table-BtksyDlQ.mjs} +5 -5
- package/.output/server/chunks/build/{table-Cswq-l2r.mjs.map → table-BtksyDlQ.mjs.map} +1 -1
- package/.output/server/chunks/build/{tabs-BM3tAh_J.mjs → tabs-DQv-_-R6.mjs} +3 -3
- package/.output/server/chunks/build/{tabs-BM3tAh_J.mjs.map → tabs-DQv-_-R6.mjs.map} +1 -1
- package/.output/server/chunks/build/{tag-NO9jEqKy.mjs → tag-A0tZ2Ouq.mjs} +4 -4
- package/.output/server/chunks/build/{tag-NO9jEqKy.mjs.map → tag-A0tZ2Ouq.mjs.map} +1 -1
- package/.output/server/chunks/build/{teams-DA1lkf1n.mjs → teams-CNflUtPh.mjs} +7 -7
- package/.output/server/chunks/build/{teams-DA1lkf1n.mjs.map → teams-CNflUtPh.mjs.map} +1 -1
- package/.output/server/chunks/build/{tokens-DKMvvk3e.mjs → tokens-BKLzcdMg.mjs} +53 -84
- package/.output/server/chunks/build/tokens-BKLzcdMg.mjs.map +1 -0
- package/.output/server/chunks/build/town-BUqRobze.mjs +1 -1
- package/.output/server/chunks/build/{town-D0thZ7PK.mjs → town-BbaR-8io.mjs} +9 -10
- package/.output/server/chunks/build/town-BbaR-8io.mjs.map +1 -0
- package/.output/server/chunks/build/{useDaqStream-BVTRw8_H.mjs → useDaqStream-BkmyQT06.mjs} +34 -23
- package/.output/server/chunks/build/useDaqStream-BkmyQT06.mjs.map +1 -0
- package/.output/server/chunks/build/{useDcwStream-DNsivqI_.mjs → useDcwStream-DWVoU96J.mjs} +60 -46
- package/.output/server/chunks/build/useDcwStream-DWVoU96J.mjs.map +1 -0
- package/.output/server/chunks/build/{useDeviceTwins-WeIom7A6.mjs → useDeviceTwins-34WGk9aN.mjs} +2 -2
- package/.output/server/chunks/build/{useDeviceTwins-WeIom7A6.mjs.map → useDeviceTwins-34WGk9aN.mjs.map} +1 -1
- package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs +1 -1
- package/.output/server/chunks/build/{useOpsLog-DcKnPO43.mjs → useOpsLog-C9zTzYof.mjs} +27 -15
- package/.output/server/chunks/build/useOpsLog-C9zTzYof.mjs.map +1 -0
- package/.output/server/chunks/build/useSiteConfig-DJe_KMVr.mjs +1 -1
- package/.output/server/chunks/build/useWorkshopApi-D2gq06N2.mjs +1 -1
- package/.output/server/chunks/build/{useWorkshopWs-B3j5wIAK.mjs → useWorkshopWs-CprkZEdq.mjs} +2 -3
- package/.output/server/chunks/build/useWorkshopWs-CprkZEdq.mjs.map +1 -0
- package/.output/server/chunks/build/{users-CmVvb1oq.mjs → users-D6RNylrW.mjs} +10 -10
- package/.output/server/chunks/build/{users-CmVvb1oq.mjs.map → users-D6RNylrW.mjs.map} +1 -1
- package/.output/server/chunks/build/{workshop-BhWnJMWs.mjs → workshop-CTcYDq2i.mjs} +29 -24
- package/.output/server/chunks/build/{workshop-BhWnJMWs.mjs.map → workshop-CTcYDq2i.mjs.map} +1 -1
- package/.output/server/chunks/build/{workspaces-IfORCDJE.mjs → workspaces-BuydxM-3.mjs} +2 -3
- package/.output/server/chunks/build/workspaces-BuydxM-3.mjs.map +1 -0
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/mcp/workshop.mjs +1 -1
- package/.output/server/chunks/routes/api/metrics.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/client/_name_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/manifest.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/config.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/system/monitor.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/settings/events.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/settings/reset.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/users/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/login.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/logout.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/me.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/register.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/setup-status.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id/token.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/_...path_.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/send.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +19 -8
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agents/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/subscribe.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/approvals/_id/decide.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/character/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/assets/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/audit.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/caller.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/from-channel.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/_memoryId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/search.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/model.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/position.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/range.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/stop.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/events.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/queue.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +7 -6
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +5 -4
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +5 -4
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +5 -4
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +5 -4
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +5 -2
- package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/alarms.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +3 -2
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +7 -6
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +5 -4
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +4 -3
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +4 -4
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +8 -4
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +4 -4
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +4 -4
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +7 -3
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +3 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +3 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +5 -3
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.put.mjs +41 -0
- package/.output/server/chunks/routes/api/workshop/index.put.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs +4 -3
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index11.get.mjs +27 -0
- package/.output/server/chunks/routes/api/workshop/index11.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs +4 -4
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.get.mjs +5 -4
- package/.output/server/chunks/routes/api/workshop/index4.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs +18 -11
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs +24 -12
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs +12 -7
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/mailbox/all.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/mailbox.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/memories/maintenance.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/plugins/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/runtime.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/scene/layouts.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/complete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/dispatch.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/report.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/retry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/members/_agentId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/users/me.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/users/register.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +3 -3
- package/.output/server/chunks/virtual/entry.mjs +275 -33
- package/.output/server/chunks/virtual/entry.mjs.map +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +15 -0
- package/README.md +20 -0
- package/app/assets/css/main.css +161 -0
- package/app/components/AppSidebar.vue +7 -1
- package/app/components/AwChart.vue +12 -2
- package/app/composables/useRouteMeta.ts +8 -1
- package/app/composables/workshop/apiClient.ts +103 -95
- package/app/composables/workshop/useDaqStream.ts +35 -21
- package/app/composables/workshop/useDcwStream.ts +22 -5
- package/app/composables/workshop/useOpsLog.ts +26 -13
- package/app/composables/workshop/useWorkshopWs.ts +11 -2
- package/app/pages/dcw/index.vue +1079 -1079
- package/app/pages/index.vue +7 -2
- package/app/pages/logs/index.vue +621 -621
- package/app/pages/permissions/index.vue +330 -0
- package/app/pages/plugins/index.vue +6 -3
- package/app/pages/settings.vue +4 -2
- package/app/pages/tokens.vue +9 -13
- package/app/pages/workshop/index.vue +3 -1
- package/app/plugins/http.ts +18 -2
- package/app/plugins/session-restore.client.ts +7 -2
- package/app/stores/workshop/user.ts +14 -1
- package/i18n/locales/en.ts +1944 -1906
- package/i18n/locales/zh-CN.ts +1943 -1905
- package/package.json +1 -1
- package/scripts/_dbg-acc-1-setup.mjs +57 -0
- package/scripts/_dbg-acc-2-diag.mjs +14 -0
- package/scripts/_dbg-acc-2-intervals.mjs +81 -0
- package/scripts/_dbg-acc-3-daq.mjs +48 -0
- package/scripts/_dbg-acc-4-team.mjs +92 -0
- package/scripts/_dbg-acc-5-visual.mjs +63 -0
- package/scripts/_dbg-acc-5b-ws-town.mjs +18 -0
- package/scripts/_dbg-acc-5c-town.mjs +12 -0
- package/scripts/_dbg-acc-6-i18n.mjs +19 -0
- package/scripts/_dbg-audit-neg-e2e.mjs +64 -0
- package/scripts/_dbg-final-features.mjs +155 -0
- package/scripts/_dbg-final-fixups.mjs +62 -0
- package/scripts/_dbg-final-visual.mjs +29 -0
- package/scripts/_dbg-kicker-check.mjs +11 -0
- package/scripts/_dbg-perms-e2e.mjs +102 -0
- package/scripts/_dbg-perms-visual.mjs +36 -0
- package/scripts/_dbg-plugins-e2e.mjs +1 -1
- package/scripts/_dbg-protocol-matrix.mjs +16 -0
- package/scripts/_dbg-swatch-check.mjs +10 -0
- package/scripts/_dbg-ui-shots.mjs +28 -0
- package/sdk/api.mjs +117 -101
- package/sdk/context.mjs +240 -219
- package/sdk/hooks.mjs +105 -103
- package/sdk/index.d.mts +142 -135
- package/sdk/lifecycle.mjs +26 -25
- package/server/api/workshop/agent-tools/bindings/index.post.ts +40 -20
- package/server/api/workshop/daq/[id]/bind.post.ts +5 -2
- package/server/api/workshop/daq/[id]/frames/content.get.ts +4 -1
- package/server/api/workshop/daq/[id]/frames.get.ts +4 -1
- package/server/api/workshop/daq/[id]/samples.get.ts +4 -1
- package/server/api/workshop/daq/[id].patch.ts +3 -0
- package/server/api/workshop/daq/alarms/[id]/ack.post.ts +20 -15
- package/server/api/workshop/daq/controller.post.ts +2 -0
- package/server/api/workshop/daq/index.get.ts +5 -3
- package/server/api/workshop/daq/index.post.ts +2 -2
- package/server/api/workshop/dcw/[id]/bind.post.ts +20 -17
- package/server/api/workshop/dcw/[id]/test.post.ts +18 -15
- package/server/api/workshop/dcw/[id]/write.post.ts +3 -0
- package/server/api/workshop/dcw/index.get.ts +22 -9
- package/server/api/workshop/dcw/line/query.get.ts +38 -31
- package/server/api/workshop/dcw/lines/[id]/start.post.ts +3 -0
- package/server/api/workshop/dcw/lines/[id]/stop.post.ts +3 -0
- package/server/api/workshop/dcw/lines/index.get.ts +8 -2
- package/server/api/workshop/dcw/lines/index.post.ts +2 -2
- package/server/api/workshop/dcw/products/index.post.ts +16 -16
- package/server/api/workshop/dcw/runs/[id]/data.get.ts +20 -15
- package/server/api/workshop/dcw/runs/index.get.ts +13 -11
- package/server/api/workshop/permissions/index.get.ts +30 -0
- package/server/api/workshop/permissions/index.put.ts +29 -0
- package/server/api/workshop/ws.ts +18 -6
- package/server/data/daqs.json +48 -48
- package/server/data/dcw-products.json +21 -0
- package/server/data/dcw-recipes.json +84 -0
- package/server/data/dcw-rollback.json +94 -6
- package/server/data/dcw-runs.json +81 -75
- package/server/data/dcw-writes.json +108 -0
- package/server/data/dcws.json +791 -528
- package/server/data/line-runs.json +8 -8
- package/server/plugins/backup.ts +119 -116
- package/server/repositories/user.repository.ts +86 -6
- package/server/services/user.service.ts +5 -3
- package/server/services/workshop/daq/bus/index.ts +5 -3
- package/server/services/workshop/daq/bus/inproc.adapter.ts +12 -3
- package/server/services/workshop/daq/bus/mqtt.adapter.ts +13 -0
- package/server/services/workshop/daq/bus/queue-port.ts +2 -0
- package/server/services/workshop/daq/daq-controller.ts +18 -1
- package/server/services/workshop/db/ops.repo.ts +6 -0
- package/server/services/workshop/dcw/dcw-controller.ts +10 -2
- package/server/services/workshop/permissions.ts +79 -0
- package/server/services/workshop/plugins/host.mjs +38 -1
- package/server/services/workshop/scene-events.ts +25 -1
- package/shared/config/single-instance.mjs +24 -0
- package/shared/daq-protocol.ts +2 -0
- package/.output/public/_nuxt/B0HpdCKS.js +0 -1
- package/.output/public/_nuxt/B1kA8LhC.js +0 -14
- package/.output/public/_nuxt/B9MUiDFl.js +0 -1
- package/.output/public/_nuxt/B9dLFSYI.js +0 -1
- package/.output/public/_nuxt/BaMkWl5i2.js +0 -1
- package/.output/public/_nuxt/BmHvC_OU.js +0 -1
- package/.output/public/_nuxt/CBciOiTQ.js +0 -1
- package/.output/public/_nuxt/CUMdhxg9.js +0 -1
- package/.output/public/_nuxt/CgvGu2IO.js +0 -1
- package/.output/public/_nuxt/CjDQPXfv.js +0 -1
- package/.output/public/_nuxt/CmHzfVc5.js +0 -3
- package/.output/public/_nuxt/Cn3J3NXR.js +0 -23
- package/.output/public/_nuxt/Cst47G4-.js +0 -1
- package/.output/public/_nuxt/D0Szyn_D.js +0 -1
- package/.output/public/_nuxt/D3VJ3lex.js +0 -1
- package/.output/public/_nuxt/D8wyHvcz2.js +0 -1
- package/.output/public/_nuxt/Dqj2h40U.js +0 -1
- package/.output/public/_nuxt/OV6PBW2z.js +0 -1
- package/.output/public/_nuxt/builds/meta/92d6bd39-dbc5-46d5-90d8-8387f36715fa.json +0 -1
- package/.output/public/_nuxt/dcw.DcDjwvqv.css +0 -1
- package/.output/public/_nuxt/logs.BO-BSyjm.css +0 -1
- package/.output/public/_nuxt/pKv_VWR4.js +0 -1
- package/.output/public/_nuxt/pages.CytEOfUs.css +0 -1
- package/.output/public/_nuxt/plugins.Clsky_kl.css +0 -1
- package/.output/public/_nuxt/settings.DeRNNUcP.css +0 -1
- package/.output/public/_nuxt/tokens.BPLe9ioQ.css +0 -1
- package/.output/public/_nuxt/wirVyscc.js +0 -1
- package/.output/public/_nuxt/workshop.BIdoGfoC.css +0 -1
- package/.output/server/chunks/build/OmpTerminalPanel-COphA1br.mjs.map +0 -1
- package/.output/server/chunks/build/daq-_hCEaYLd.mjs.map +0 -1
- package/.output/server/chunks/build/dcw-C7pJ4Y0p.mjs.map +0 -1
- package/.output/server/chunks/build/input-sf_BT6o6.mjs.map +0 -1
- package/.output/server/chunks/build/logs-C039TFW1.mjs.map +0 -1
- package/.output/server/chunks/build/pages-C_VSGSGo.mjs.map +0 -1
- package/.output/server/chunks/build/settings-DA8IkGLo.mjs.map +0 -1
- package/.output/server/chunks/build/tokens-DKMvvk3e.mjs.map +0 -1
- package/.output/server/chunks/build/town-D0thZ7PK.mjs.map +0 -1
- package/.output/server/chunks/build/useDaqStream-BVTRw8_H.mjs.map +0 -1
- package/.output/server/chunks/build/useDcwStream-DNsivqI_.mjs.map +0 -1
- package/.output/server/chunks/build/useOpsLog-DcKnPO43.mjs.map +0 -1
- package/.output/server/chunks/build/useWorkshopWs-B3j5wIAK.mjs.map +0 -1
- package/.output/server/chunks/build/user-Dk-ytEUV.mjs +0 -140
- package/.output/server/chunks/build/user-Dk-ytEUV.mjs.map +0 -1
- package/.output/server/chunks/build/workspaces-IfORCDJE.mjs.map +0 -1
- /package/.output/public/_nuxt/{CNs_Ozdc2.js → CNs_Ozdc.js} +0 -0
- /package/.output/public/_nuxt/{Cno6kYiO2.js → Cno6kYiO.js} +0 -0
package/app/pages/logs/index.vue
CHANGED
|
@@ -1,621 +1,621 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="page">
|
|
3
|
-
<!-- 页头:标题 + 手动记录入口 -->
|
|
4
|
-
<header class="head">
|
|
5
|
-
<div>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
{{ $t('logs.title') }}
|
|
9
|
-
</h1>
|
|
10
|
-
<p class="sub">
|
|
11
|
-
{{ $t('logs.sub') }}
|
|
12
|
-
</p>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="head-actions">
|
|
15
|
-
<span
|
|
16
|
-
class="live-dot"
|
|
17
|
-
:title="$t('logs.liveHint')"
|
|
18
|
-
/><span class="live-txt mono">{{ $t('logs.live') }} {{ opsLog.recent.length }}</span>
|
|
19
|
-
<button
|
|
20
|
-
class="pill-btn"
|
|
21
|
-
@click="openManual"
|
|
22
|
-
>
|
|
23
|
-
<span class="i-tabler-plus" />
|
|
24
|
-
{{ $t('logs.manual') }}
|
|
25
|
-
</button>
|
|
26
|
-
</div>
|
|
27
|
-
</header>
|
|
28
|
-
|
|
29
|
-
<!-- 维度筛选:产线 → 产品 → Recipe 级联 + 来源/分类/关键词 -->
|
|
30
|
-
<section class="filter-card">
|
|
31
|
-
<label class="flt">
|
|
32
|
-
<span>{{ $t('logs.fLine') }}</span>
|
|
33
|
-
<select
|
|
34
|
-
v-model="q.lineId"
|
|
35
|
-
class="inp-sel"
|
|
36
|
-
@change="q.productId = ''; q.recipeId = ''"
|
|
37
|
-
>
|
|
38
|
-
<option value="">
|
|
39
|
-
{{ $t('logs.all') }}
|
|
40
|
-
</option>
|
|
41
|
-
<option
|
|
42
|
-
v-for="l in dcw.lines"
|
|
43
|
-
:key="l.id"
|
|
44
|
-
:value="l.id"
|
|
45
|
-
>
|
|
46
|
-
{{ l.name }}
|
|
47
|
-
</option>
|
|
48
|
-
</select>
|
|
49
|
-
</label>
|
|
50
|
-
<label class="flt">
|
|
51
|
-
<span>{{ $t('logs.fProduct') }}</span>
|
|
52
|
-
<select
|
|
53
|
-
v-model="q.productId"
|
|
54
|
-
class="inp-sel"
|
|
55
|
-
@change="q.recipeId = ''"
|
|
56
|
-
>
|
|
57
|
-
<option value="">
|
|
58
|
-
{{ $t('logs.all') }}
|
|
59
|
-
</option>
|
|
60
|
-
<option
|
|
61
|
-
v-for="p in productsOfLine"
|
|
62
|
-
:key="p.id"
|
|
63
|
-
:value="p.id"
|
|
64
|
-
>
|
|
65
|
-
{{ p.name }}
|
|
66
|
-
</option>
|
|
67
|
-
</select>
|
|
68
|
-
</label>
|
|
69
|
-
<label class="flt">
|
|
70
|
-
<span>Recipe</span>
|
|
71
|
-
<select
|
|
72
|
-
v-model="q.recipeId"
|
|
73
|
-
class="inp-sel"
|
|
74
|
-
>
|
|
75
|
-
<option value="">
|
|
76
|
-
{{ $t('logs.all') }}
|
|
77
|
-
</option>
|
|
78
|
-
<option
|
|
79
|
-
v-for="r in recipesOfScope"
|
|
80
|
-
:key="r.id"
|
|
81
|
-
:value="r.id"
|
|
82
|
-
>
|
|
83
|
-
{{ r.name }}
|
|
84
|
-
</option>
|
|
85
|
-
</select>
|
|
86
|
-
</label>
|
|
87
|
-
<label class="flt">
|
|
88
|
-
<span>{{ $t('logs.fSource') }}</span>
|
|
89
|
-
<select
|
|
90
|
-
v-model="q.actorKind"
|
|
91
|
-
class="inp-sel"
|
|
92
|
-
>
|
|
93
|
-
<option value="">
|
|
94
|
-
{{ $t('logs.all') }}
|
|
95
|
-
</option>
|
|
96
|
-
<option value="user">
|
|
97
|
-
{{ $t('logs.src.user') }}
|
|
98
|
-
</option>
|
|
99
|
-
<option value="agent">
|
|
100
|
-
Agent
|
|
101
|
-
</option>
|
|
102
|
-
<option value="system">
|
|
103
|
-
{{ $t('logs.src.system') }}
|
|
104
|
-
</option>
|
|
105
|
-
</select>
|
|
106
|
-
</label>
|
|
107
|
-
<label class="flt">
|
|
108
|
-
<span>{{ $t('logs.fKind') }}</span>
|
|
109
|
-
<select
|
|
110
|
-
v-model="q.kind"
|
|
111
|
-
class="inp-sel"
|
|
112
|
-
>
|
|
113
|
-
<option value="">
|
|
114
|
-
{{ $t('logs.all') }}
|
|
115
|
-
</option>
|
|
116
|
-
<option
|
|
117
|
-
v-for="k in KINDS"
|
|
118
|
-
:key="k"
|
|
119
|
-
:value="k"
|
|
120
|
-
>
|
|
121
|
-
{{ $t(`logs.kind.${k}`) }}
|
|
122
|
-
</option>
|
|
123
|
-
</select>
|
|
124
|
-
</label>
|
|
125
|
-
<label class="flt flt-grow">
|
|
126
|
-
<span>{{ $t('logs.fKeyword') }}</span>
|
|
127
|
-
<input
|
|
128
|
-
v-model="q.text"
|
|
129
|
-
class="inp-sel"
|
|
130
|
-
type="search"
|
|
131
|
-
:placeholder="$t('logs.fKeywordPh')"
|
|
132
|
-
@keydown.enter="doQuery"
|
|
133
|
-
>
|
|
134
|
-
</label>
|
|
135
|
-
<button
|
|
136
|
-
class="pill-btn"
|
|
137
|
-
:disabled="opsLog.loading.list"
|
|
138
|
-
@click="doQuery"
|
|
139
|
-
>
|
|
140
|
-
<span class="i-tabler-search" />
|
|
141
|
-
{{ $t('logs.query') }}
|
|
142
|
-
</button>
|
|
143
|
-
<button
|
|
144
|
-
v-if="hasFilter"
|
|
145
|
-
class="mini-btn"
|
|
146
|
-
@click="resetFilters"
|
|
147
|
-
>
|
|
148
|
-
{{ $t('logs.reset') }}
|
|
149
|
-
</button>
|
|
150
|
-
</section>
|
|
151
|
-
|
|
152
|
-
<!-- 结果表:时间/来源/操作者/分类/摘要/归属维度/详情 -->
|
|
153
|
-
<section class="table-card">
|
|
154
|
-
<p
|
|
155
|
-
v-if="opsLog.error.list"
|
|
156
|
-
class="err"
|
|
157
|
-
>
|
|
158
|
-
{{ opsLog.error.list }}
|
|
159
|
-
</p>
|
|
160
|
-
<table class="log-table">
|
|
161
|
-
<thead>
|
|
162
|
-
<tr>
|
|
163
|
-
<th class="th-time">
|
|
164
|
-
{{ $t('logs.thTime') }}
|
|
165
|
-
</th>
|
|
166
|
-
<th class="th-src">
|
|
167
|
-
{{ $t('logs.fSource') }}
|
|
168
|
-
</th>
|
|
169
|
-
<th>{{ $t('logs.thActor') }}</th>
|
|
170
|
-
<th class="th-kind">
|
|
171
|
-
{{ $t('logs.fKind') }}
|
|
172
|
-
</th>
|
|
173
|
-
<th>{{ $t('logs.thSummary') }}</th>
|
|
174
|
-
<th class="th-scope">
|
|
175
|
-
{{ $t('logs.thScope') }}
|
|
176
|
-
</th>
|
|
177
|
-
<th class="th-detail">
|
|
178
|
-
{{ $t('logs.thDetail') }}
|
|
179
|
-
</th>
|
|
180
|
-
</tr>
|
|
181
|
-
</thead>
|
|
182
|
-
<tbody>
|
|
183
|
-
<tr
|
|
184
|
-
v-for="row in opsLog.results"
|
|
185
|
-
:key="`${row.id}-${row.at}`"
|
|
186
|
-
>
|
|
187
|
-
<td class="mono dim">
|
|
188
|
-
{{ fmtTime(row.at) }}
|
|
189
|
-
</td>
|
|
190
|
-
<td>
|
|
191
|
-
<span
|
|
192
|
-
class="src-badge"
|
|
193
|
-
:class="row.actorKind"
|
|
194
|
-
>{{ srcLabel(row.actorKind) }}</span>
|
|
195
|
-
</td>
|
|
196
|
-
<td class="actor">
|
|
197
|
-
{{ row.actorName || row.actor || '—' }}
|
|
198
|
-
</td>
|
|
199
|
-
<td>
|
|
200
|
-
<span
|
|
201
|
-
class="kind-chip"
|
|
202
|
-
:class="row.kind"
|
|
203
|
-
>{{ kindLabel(row.kind) }}</span>
|
|
204
|
-
</td>
|
|
205
|
-
<td class="summary">
|
|
206
|
-
{{ row.summary }}
|
|
207
|
-
<small class="mono dim action">{{ row.action }}</small>
|
|
208
|
-
</td>
|
|
209
|
-
<td class="scope">
|
|
210
|
-
<span
|
|
211
|
-
v-if="lineName(row.lineId)"
|
|
212
|
-
class="scope-chip"
|
|
213
|
-
:title="$t('logs.fLine')"
|
|
214
|
-
>{{ lineName(row.lineId) }}</span>
|
|
215
|
-
<span
|
|
216
|
-
v-if="productName(row.productId)"
|
|
217
|
-
class="scope-chip"
|
|
218
|
-
:title="$t('logs.fProduct')"
|
|
219
|
-
>{{ productName(row.productId) }}</span>
|
|
220
|
-
<span
|
|
221
|
-
v-if="recipeName(row.recipeId)"
|
|
222
|
-
class="scope-chip"
|
|
223
|
-
:title="'Recipe'"
|
|
224
|
-
>{{ recipeName(row.recipeId) }}</span>
|
|
225
|
-
<span
|
|
226
|
-
v-if="!row.lineId && !row.productId && !row.recipeId"
|
|
227
|
-
class="dim"
|
|
228
|
-
>—</span>
|
|
229
|
-
</td>
|
|
230
|
-
<td class="detail-cell">
|
|
231
|
-
<button
|
|
232
|
-
v-if="row.detailJson && row.detailJson !== '{}'"
|
|
233
|
-
class="mini-btn"
|
|
234
|
-
@click="toggle(row)"
|
|
235
|
-
>
|
|
236
|
-
{{ expanded === row ? $t('logs.fold') : $t('logs.expand') }}
|
|
237
|
-
</button>
|
|
238
|
-
<span
|
|
239
|
-
v-else
|
|
240
|
-
class="dim"
|
|
241
|
-
>—</span>
|
|
242
|
-
</td>
|
|
243
|
-
</tr>
|
|
244
|
-
<tr>
|
|
245
|
-
<td
|
|
246
|
-
v-if="opsLog.results.length === 0"
|
|
247
|
-
colspan="7"
|
|
248
|
-
class="empty"
|
|
249
|
-
>
|
|
250
|
-
<template v-if="opsLog.loading.list">
|
|
251
|
-
{{ $t('logs.loading') }}
|
|
252
|
-
</template>
|
|
253
|
-
<template v-else>
|
|
254
|
-
{{ $t('logs.empty') }}
|
|
255
|
-
</template>
|
|
256
|
-
</td>
|
|
257
|
-
</tr>
|
|
258
|
-
</tbody>
|
|
259
|
-
</table>
|
|
260
|
-
<pre
|
|
261
|
-
v-if="expanded"
|
|
262
|
-
class="detail-box mono"
|
|
263
|
-
>{{ pretty(expanded.detailJson) }}</pre>
|
|
264
|
-
</section>
|
|
265
|
-
|
|
266
|
-
<!-- 人工记录弹窗 -->
|
|
267
|
-
<Teleport to="body">
|
|
268
|
-
<div
|
|
269
|
-
v-if="manualOpen"
|
|
270
|
-
class="modal-mask"
|
|
271
|
-
@click.self="manualOpen = false"
|
|
272
|
-
>
|
|
273
|
-
<div class="modal">
|
|
274
|
-
<h3 class="m-title">
|
|
275
|
-
{{ $t('logs.manual') }}
|
|
276
|
-
</h3>
|
|
277
|
-
<label class="m-f">
|
|
278
|
-
<span>{{ $t('logs.mSummary') }} *</span>
|
|
279
|
-
<textarea
|
|
280
|
-
v-model="manual.summary"
|
|
281
|
-
rows="3"
|
|
282
|
-
:placeholder="$t('logs.mSummaryPh')"
|
|
283
|
-
/>
|
|
284
|
-
</label>
|
|
285
|
-
<div class="m-grid">
|
|
286
|
-
<label class="m-f">
|
|
287
|
-
<span>{{ $t('logs.fLine') }}</span>
|
|
288
|
-
<select
|
|
289
|
-
v-model="manual.lineId"
|
|
290
|
-
class="inp-sel"
|
|
291
|
-
@change="manual.productId = ''; manual.recipeId = ''"
|
|
292
|
-
>
|
|
293
|
-
<option value="">
|
|
294
|
-
{{ $t('logs.all') }}
|
|
295
|
-
</option>
|
|
296
|
-
<option
|
|
297
|
-
v-for="l in dcw.lines"
|
|
298
|
-
:key="l.id"
|
|
299
|
-
:value="l.id"
|
|
300
|
-
>
|
|
301
|
-
{{ l.name }}
|
|
302
|
-
</option>
|
|
303
|
-
</select>
|
|
304
|
-
</label>
|
|
305
|
-
<label class="m-f">
|
|
306
|
-
<span>{{ $t('logs.fProduct') }}</span>
|
|
307
|
-
<select
|
|
308
|
-
v-model="manual.productId"
|
|
309
|
-
class="inp-sel"
|
|
310
|
-
@change="manual.recipeId = ''"
|
|
311
|
-
>
|
|
312
|
-
<option value="">
|
|
313
|
-
{{ $t('logs.all') }}
|
|
314
|
-
</option>
|
|
315
|
-
<option
|
|
316
|
-
v-for="p in productsOfLine"
|
|
317
|
-
:key="p.id"
|
|
318
|
-
:value="p.id"
|
|
319
|
-
>
|
|
320
|
-
{{ p.name }}
|
|
321
|
-
</option>
|
|
322
|
-
</select>
|
|
323
|
-
</label>
|
|
324
|
-
<label class="m-f">
|
|
325
|
-
<span>Recipe</span>
|
|
326
|
-
<select
|
|
327
|
-
v-model="manual.recipeId"
|
|
328
|
-
class="inp-sel"
|
|
329
|
-
>
|
|
330
|
-
<option value="">
|
|
331
|
-
{{ $t('logs.all') }}
|
|
332
|
-
</option>
|
|
333
|
-
<option
|
|
334
|
-
v-for="r in recipesOfScope"
|
|
335
|
-
:key="r.id"
|
|
336
|
-
:value="r.id"
|
|
337
|
-
>
|
|
338
|
-
{{ r.name }}
|
|
339
|
-
</option>
|
|
340
|
-
</select>
|
|
341
|
-
</label>
|
|
342
|
-
</div>
|
|
343
|
-
<p
|
|
344
|
-
v-if="opsLog.error.post"
|
|
345
|
-
class="err"
|
|
346
|
-
>
|
|
347
|
-
{{ opsLog.error.post }}
|
|
348
|
-
</p>
|
|
349
|
-
<div class="m-actions">
|
|
350
|
-
<button
|
|
351
|
-
class="ghost-btn"
|
|
352
|
-
@click="manualOpen = false"
|
|
353
|
-
>
|
|
354
|
-
{{ $t('common.cancel') }}
|
|
355
|
-
</button>
|
|
356
|
-
<button
|
|
357
|
-
class="pill-btn"
|
|
358
|
-
:disabled="opsLog.loading.posting || !manual.summary.trim()"
|
|
359
|
-
@click="submitManual"
|
|
360
|
-
>
|
|
361
|
-
{{ $t('logs.mSubmit') }}
|
|
362
|
-
</button>
|
|
363
|
-
</div>
|
|
364
|
-
</div>
|
|
365
|
-
</div>
|
|
366
|
-
</Teleport>
|
|
367
|
-
</div>
|
|
368
|
-
</template>
|
|
369
|
-
|
|
370
|
-
<script setup lang="ts">
|
|
371
|
-
import { computed, onMounted, reactive, ref } from 'vue'
|
|
372
|
-
import { message } from 'ant-design-vue'
|
|
373
|
-
import { useDcwStream } from '@/app/composables/workshop/useDcwStream'
|
|
374
|
-
import { useWorkshopWs } from '@/app/composables/workshop/useWorkshopWs'
|
|
375
|
-
import { useOpsLog, type OpsLogRow } from '@/app/composables/workshop/useOpsLog'
|
|
376
|
-
|
|
377
|
-
const tt = (k: string) => useNuxtApp().$i18n.t(k) as string
|
|
378
|
-
|
|
379
|
-
const dcw = useDcwStream()
|
|
380
|
-
const ws = useWorkshopWs()
|
|
381
|
-
const opsLog = useOpsLog()
|
|
382
|
-
|
|
383
|
-
const KINDS = ['write', 'manual', 'alarm', 'line', 'recipe', 'rollback', 'daq', 'system'] as const
|
|
384
|
-
|
|
385
|
-
const q = reactive({ lineId: '', productId: '', recipeId: '', actorKind: '', kind: '', text: '' })
|
|
386
|
-
const expanded = ref<OpsLogRow | null>(null)
|
|
387
|
-
const manualOpen = ref(false)
|
|
388
|
-
const manual = reactive({ summary: '', lineId: '', productId: '', recipeId: '' })
|
|
389
|
-
|
|
390
|
-
const hasFilter = computed(() => !!(q.lineId || q.productId || q.recipeId || q.actorKind || q.kind || q.text.trim()))
|
|
391
|
-
const productsOfLine = computed(() => dcw.products.filter(p => !q.lineId || p.lineId === q.lineId))
|
|
392
|
-
const recipesOfScope = computed(() => dcw.recipes.filter(r =>
|
|
393
|
-
(!q.lineId || r.lineId === q.lineId) && (!q.productId || r.productId === q.productId)))
|
|
394
|
-
|
|
395
|
-
function doQuery(): void {
|
|
396
|
-
void opsLog.fetchLogs({
|
|
397
|
-
lineId: q.lineId,
|
|
398
|
-
productId: q.productId,
|
|
399
|
-
recipeId: q.recipeId,
|
|
400
|
-
actorKind: q.actorKind,
|
|
401
|
-
kind: q.kind,
|
|
402
|
-
q: q.text.trim(),
|
|
403
|
-
limit: 300,
|
|
404
|
-
})
|
|
405
|
-
expanded.value = null
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
function resetFilters(): void {
|
|
409
|
-
q.lineId = ''
|
|
410
|
-
q.productId = ''
|
|
411
|
-
q.recipeId = ''
|
|
412
|
-
q.actorKind = ''
|
|
413
|
-
q.kind = ''
|
|
414
|
-
q.text = ''
|
|
415
|
-
doQuery()
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
function openManual(): void {
|
|
419
|
-
manual.summary = ''
|
|
420
|
-
manual.lineId = q.lineId
|
|
421
|
-
manual.productId = q.productId
|
|
422
|
-
manual.recipeId = q.recipeId
|
|
423
|
-
manualOpen.value = true
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
async function submitManual(): Promise<void> {
|
|
427
|
-
try {
|
|
428
|
-
await opsLog.postManual({
|
|
429
|
-
summary: manual.summary.trim(),
|
|
430
|
-
lineId: manual.lineId,
|
|
431
|
-
productId: manual.productId,
|
|
432
|
-
recipeId: manual.recipeId,
|
|
433
|
-
})
|
|
434
|
-
message.success(tt('logs.mOk'))
|
|
435
|
-
manualOpen.value = false
|
|
436
|
-
doQuery()
|
|
437
|
-
}
|
|
438
|
-
catch (err) {
|
|
439
|
-
message.error(apiErrorMessage(err))
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
function toggle(row: OpsLogRow): void {
|
|
444
|
-
expanded.value = expanded.value === row ? null : row
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
function pretty(json: string): string {
|
|
448
|
-
try {
|
|
449
|
-
return JSON.stringify(JSON.parse(json), null, 2)
|
|
450
|
-
}
|
|
451
|
-
catch {
|
|
452
|
-
return json
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
function fmtTime(at: string): string {
|
|
457
|
-
const d = new Date(at)
|
|
458
|
-
if (!Number.isFinite(d.getTime())) return at
|
|
459
|
-
const p = (n: number) => String(n).padStart(2, '0')
|
|
460
|
-
return `${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
function srcLabel(kind: string): string {
|
|
464
|
-
return kind === 'agent' ? 'Agent' : kind === 'user' ? tt('logs.src.user') : tt('logs.src.system')
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
function kindLabel(kind: string): string {
|
|
468
|
-
return kind ? tt(`logs.kind.${kind}`) : '—'
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
function lineName(id: string): string {
|
|
472
|
-
return dcw.lines.find(l => l.id === id)?.name ?? ''
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
function productName(id: string): string {
|
|
476
|
-
return dcw.products.find(p => p.id === id)?.name ?? ''
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
function recipeName(id: string): string {
|
|
480
|
-
return dcw.recipes.find(r => r.id === id)?.name ?? ''
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
onMounted(() => {
|
|
484
|
-
ws.ensureConnected()
|
|
485
|
-
opsLog.ensureLive()
|
|
486
|
-
void dcw.load()
|
|
487
|
-
doQuery()
|
|
488
|
-
})
|
|
489
|
-
</script>
|
|
490
|
-
|
|
491
|
-
<script lang="ts">
|
|
492
|
-
export default { name: 'OpsLogsPage' }
|
|
493
|
-
</script>
|
|
494
|
-
|
|
495
|
-
<style scoped>
|
|
496
|
-
.page { display: flex; flex-direction: column; gap: 12px; }
|
|
497
|
-
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
|
|
498
|
-
.h1 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); }
|
|
499
|
-
.sub { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-faint); }
|
|
500
|
-
.head-actions { display: flex; gap: 10px; align-items: center; }
|
|
501
|
-
.live-dot {
|
|
502
|
-
width: 8px; height: 8px; border-radius: 50%;
|
|
503
|
-
background: var(--tone-success-dot);
|
|
504
|
-
box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone-success-dot) 45%, transparent);
|
|
505
|
-
animation: livePulse 2s ease-out infinite;
|
|
506
|
-
}
|
|
507
|
-
@keyframes livePulse {
|
|
508
|
-
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone-success-dot) 45%, transparent); }
|
|
509
|
-
70% { box-shadow: 0 0 0 8px transparent; }
|
|
510
|
-
100% { box-shadow: 0 0 0 0 transparent; }
|
|
511
|
-
}
|
|
512
|
-
.live-txt { font-size: 11px; color: var(--ink-faint); }
|
|
513
|
-
|
|
514
|
-
.filter-card {
|
|
515
|
-
display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
|
|
516
|
-
padding: 10px 14px;
|
|
517
|
-
background: var(--surface-glass);
|
|
518
|
-
border: 1px solid var(--glass-line);
|
|
519
|
-
border-radius: 10px;
|
|
520
|
-
backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
521
|
-
-webkit-backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
522
|
-
}
|
|
523
|
-
.flt { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-faint); }
|
|
524
|
-
.flt-grow { flex: 1 1 180px; }
|
|
525
|
-
.inp-sel {
|
|
526
|
-
min-width: 0; padding: 6px 9px; font-size: 12.5px; color: var(--ink);
|
|
527
|
-
background: var(--frost-bg);
|
|
528
|
-
border: 1px solid var(--glass-line); border-radius: 7px; outline: none;
|
|
529
|
-
}
|
|
530
|
-
.inp-sel:focus { border-color: color-mix(in srgb, var(--tone-info-dot) 55%, transparent); }
|
|
531
|
-
.mini-btn {
|
|
532
|
-
padding: 6px 11px; font-size: 12px; color: var(--ink-soft);
|
|
533
|
-
background: var(--frost-bg); border: 1px solid var(--glass-line); border-radius: 7px;
|
|
534
|
-
cursor: pointer;
|
|
535
|
-
}
|
|
536
|
-
.mini-btn:hover { border-color: color-mix(in srgb, var(--tone-info-dot) 45%, transparent); }
|
|
537
|
-
|
|
538
|
-
.table-card {
|
|
539
|
-
background: var(--surface-glass);
|
|
540
|
-
border: 1px solid var(--glass-line);
|
|
541
|
-
border-radius: 10px;
|
|
542
|
-
overflow: hidden;
|
|
543
|
-
backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
544
|
-
-webkit-backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
545
|
-
}
|
|
546
|
-
.err { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--tone-danger-dot); }
|
|
547
|
-
.log-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
|
|
548
|
-
.log-table th {
|
|
549
|
-
position: sticky; top: 0; z-index: 1;
|
|
550
|
-
padding: 8px 10px; text-align: left; font-weight: 600; color: var(--ink-soft);
|
|
551
|
-
background: var(--frost-bg);
|
|
552
|
-
border-bottom: 1px solid var(--glass-line);
|
|
553
|
-
}
|
|
554
|
-
.log-table td {
|
|
555
|
-
max-width: 380px; padding: 7px 10px; color: var(--ink-soft);
|
|
556
|
-
border-bottom: 1px solid color-mix(in srgb, var(--glass-line) 55%, transparent);
|
|
557
|
-
vertical-align: top;
|
|
558
|
-
}
|
|
559
|
-
.th-time, .th-src, .th-kind { white-space: nowrap; }
|
|
560
|
-
.th-detail { width: 72px; }
|
|
561
|
-
.actor { white-space: nowrap; }
|
|
562
|
-
.summary .action { display: block; font-size: 10px; color: var(--ink-faint); }
|
|
563
|
-
.scope { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
|
|
564
|
-
.scope-chip {
|
|
565
|
-
padding: 1px 7px; font-size: 10.5px; color: var(--ink-soft);
|
|
566
|
-
background: var(--frost-bg); border-radius: 99px; white-space: nowrap;
|
|
567
|
-
}
|
|
568
|
-
.detail-cell { white-space: nowrap; }
|
|
569
|
-
.empty { padding: 22px 0 !important; color: var(--ink-faint); text-align: center; }
|
|
570
|
-
.detail-box {
|
|
571
|
-
max-height: 260px; margin: 0; padding: 10px 14px; overflow: auto;
|
|
572
|
-
font-size: 11.5px; color: var(--ink-soft);
|
|
573
|
-
background: var(--frost-bg); border-top: 1px solid var(--glass-line);
|
|
574
|
-
}
|
|
575
|
-
.src-badge {
|
|
576
|
-
display: inline-block; padding: 1px 8px; font-size: 10.5px;
|
|
577
|
-
border: 1px solid var(--glass-line); border-radius: 99px; color: var(--ink-faint);
|
|
578
|
-
}
|
|
579
|
-
.src-badge.agent { color: var(--tone-info-dot); border-color: color-mix(in srgb, var(--tone-info-dot) 40%, transparent); }
|
|
580
|
-
.src-badge.user { color: var(--tone-success-dot); border-color: color-mix(in srgb, var(--tone-success-dot) 40%, transparent); }
|
|
581
|
-
.kind-chip {
|
|
582
|
-
display: inline-block; padding: 1px 7px; font-size: 10.5px;
|
|
583
|
-
color: var(--ink-soft); background: var(--frost-bg); border-radius: 5px; white-space: nowrap;
|
|
584
|
-
}
|
|
585
|
-
.kind-chip.alarm { color: var(--tone-danger-dot); background: var(--tone-danger-bg); }
|
|
586
|
-
.kind-chip.write { color: var(--tone-info-dot); }
|
|
587
|
-
.kind-chip.rollback { color: var(--tone-warning-dot); }
|
|
588
|
-
.kind-chip.manual { color: var(--tone-success-dot); }
|
|
589
|
-
|
|
590
|
-
.m-title { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
|
|
591
|
-
.modal-mask {
|
|
592
|
-
position: fixed; inset: 0; z-index: 60;
|
|
593
|
-
display: flex; align-items: center; justify-content: center;
|
|
594
|
-
padding: 20px;
|
|
595
|
-
background: color-mix(in srgb, var(--ink) 32%, transparent);
|
|
596
|
-
backdrop-filter: blur(3px);
|
|
597
|
-
-webkit-backdrop-filter: blur(3px);
|
|
598
|
-
}
|
|
599
|
-
.modal {
|
|
600
|
-
width: min(560px, 94vw);
|
|
601
|
-
padding: 16px 18px;
|
|
602
|
-
background: var(--surface-glass);
|
|
603
|
-
border: 1px solid var(--glass-line);
|
|
604
|
-
border-radius: 12px;
|
|
605
|
-
backdrop-filter: blur(calc(var(--aurora-blur) * 1.4)) saturate(1.2);
|
|
606
|
-
-webkit-backdrop-filter: blur(calc(var(--aurora-blur) * 1.4)) saturate(1.2);
|
|
607
|
-
}
|
|
608
|
-
.m-f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-faint); }
|
|
609
|
-
.m-f textarea, .m-f .inp-sel {
|
|
610
|
-
padding: 7px 9px; font-size: 12.5px; color: var(--ink);
|
|
611
|
-
background: var(--frost-bg); border: 1px solid var(--glass-line); border-radius: 7px; outline: none;
|
|
612
|
-
font-family: inherit; resize: vertical;
|
|
613
|
-
}
|
|
614
|
-
.m-f textarea:focus, .m-f .inp-sel:focus { border-color: color-mix(in srgb, var(--tone-info-dot) 55%, transparent); }
|
|
615
|
-
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
|
|
616
|
-
.m-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
|
|
617
|
-
.ghost-btn {
|
|
618
|
-
padding: 7px 14px; font-size: 12.5px; color: var(--ink-soft);
|
|
619
|
-
background: transparent; border: 1px solid var(--glass-line); border-radius: 8px; cursor: pointer;
|
|
620
|
-
}
|
|
621
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<!-- 页头:标题 + 手动记录入口 -->
|
|
4
|
+
<header class="head">
|
|
5
|
+
<div>
|
|
6
|
+
<p class="aw-kicker">agentworkshop / audit log</p>
|
|
7
|
+
<h1 class="h1">
|
|
8
|
+
{{ $t('logs.title') }}
|
|
9
|
+
</h1>
|
|
10
|
+
<p class="sub">
|
|
11
|
+
{{ $t('logs.sub') }}
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="head-actions">
|
|
15
|
+
<span
|
|
16
|
+
class="live-dot"
|
|
17
|
+
:title="$t('logs.liveHint')"
|
|
18
|
+
/><span class="live-txt mono">{{ $t('logs.live') }} {{ opsLog.recent.length }}</span>
|
|
19
|
+
<button
|
|
20
|
+
class="pill-btn"
|
|
21
|
+
@click="openManual"
|
|
22
|
+
>
|
|
23
|
+
<span class="i-tabler-plus" />
|
|
24
|
+
{{ $t('logs.manual') }}
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
</header>
|
|
28
|
+
|
|
29
|
+
<!-- 维度筛选:产线 → 产品 → Recipe 级联 + 来源/分类/关键词 -->
|
|
30
|
+
<section class="filter-card">
|
|
31
|
+
<label class="flt">
|
|
32
|
+
<span>{{ $t('logs.fLine') }}</span>
|
|
33
|
+
<select
|
|
34
|
+
v-model="q.lineId"
|
|
35
|
+
class="inp-sel"
|
|
36
|
+
@change="q.productId = ''; q.recipeId = ''"
|
|
37
|
+
>
|
|
38
|
+
<option value="">
|
|
39
|
+
{{ $t('logs.all') }}
|
|
40
|
+
</option>
|
|
41
|
+
<option
|
|
42
|
+
v-for="l in dcw.lines"
|
|
43
|
+
:key="l.id"
|
|
44
|
+
:value="l.id"
|
|
45
|
+
>
|
|
46
|
+
{{ l.name }}
|
|
47
|
+
</option>
|
|
48
|
+
</select>
|
|
49
|
+
</label>
|
|
50
|
+
<label class="flt">
|
|
51
|
+
<span>{{ $t('logs.fProduct') }}</span>
|
|
52
|
+
<select
|
|
53
|
+
v-model="q.productId"
|
|
54
|
+
class="inp-sel"
|
|
55
|
+
@change="q.recipeId = ''"
|
|
56
|
+
>
|
|
57
|
+
<option value="">
|
|
58
|
+
{{ $t('logs.all') }}
|
|
59
|
+
</option>
|
|
60
|
+
<option
|
|
61
|
+
v-for="p in productsOfLine"
|
|
62
|
+
:key="p.id"
|
|
63
|
+
:value="p.id"
|
|
64
|
+
>
|
|
65
|
+
{{ p.name }}
|
|
66
|
+
</option>
|
|
67
|
+
</select>
|
|
68
|
+
</label>
|
|
69
|
+
<label class="flt">
|
|
70
|
+
<span>Recipe</span>
|
|
71
|
+
<select
|
|
72
|
+
v-model="q.recipeId"
|
|
73
|
+
class="inp-sel"
|
|
74
|
+
>
|
|
75
|
+
<option value="">
|
|
76
|
+
{{ $t('logs.all') }}
|
|
77
|
+
</option>
|
|
78
|
+
<option
|
|
79
|
+
v-for="r in recipesOfScope"
|
|
80
|
+
:key="r.id"
|
|
81
|
+
:value="r.id"
|
|
82
|
+
>
|
|
83
|
+
{{ r.name }}
|
|
84
|
+
</option>
|
|
85
|
+
</select>
|
|
86
|
+
</label>
|
|
87
|
+
<label class="flt">
|
|
88
|
+
<span>{{ $t('logs.fSource') }}</span>
|
|
89
|
+
<select
|
|
90
|
+
v-model="q.actorKind"
|
|
91
|
+
class="inp-sel"
|
|
92
|
+
>
|
|
93
|
+
<option value="">
|
|
94
|
+
{{ $t('logs.all') }}
|
|
95
|
+
</option>
|
|
96
|
+
<option value="user">
|
|
97
|
+
{{ $t('logs.src.user') }}
|
|
98
|
+
</option>
|
|
99
|
+
<option value="agent">
|
|
100
|
+
Agent
|
|
101
|
+
</option>
|
|
102
|
+
<option value="system">
|
|
103
|
+
{{ $t('logs.src.system') }}
|
|
104
|
+
</option>
|
|
105
|
+
</select>
|
|
106
|
+
</label>
|
|
107
|
+
<label class="flt">
|
|
108
|
+
<span>{{ $t('logs.fKind') }}</span>
|
|
109
|
+
<select
|
|
110
|
+
v-model="q.kind"
|
|
111
|
+
class="inp-sel"
|
|
112
|
+
>
|
|
113
|
+
<option value="">
|
|
114
|
+
{{ $t('logs.all') }}
|
|
115
|
+
</option>
|
|
116
|
+
<option
|
|
117
|
+
v-for="k in KINDS"
|
|
118
|
+
:key="k"
|
|
119
|
+
:value="k"
|
|
120
|
+
>
|
|
121
|
+
{{ $t(`logs.kind.${k}`) }}
|
|
122
|
+
</option>
|
|
123
|
+
</select>
|
|
124
|
+
</label>
|
|
125
|
+
<label class="flt flt-grow">
|
|
126
|
+
<span>{{ $t('logs.fKeyword') }}</span>
|
|
127
|
+
<input
|
|
128
|
+
v-model="q.text"
|
|
129
|
+
class="inp-sel"
|
|
130
|
+
type="search"
|
|
131
|
+
:placeholder="$t('logs.fKeywordPh')"
|
|
132
|
+
@keydown.enter="doQuery"
|
|
133
|
+
>
|
|
134
|
+
</label>
|
|
135
|
+
<button
|
|
136
|
+
class="pill-btn"
|
|
137
|
+
:disabled="opsLog.loading.list"
|
|
138
|
+
@click="doQuery"
|
|
139
|
+
>
|
|
140
|
+
<span class="i-tabler-search" />
|
|
141
|
+
{{ $t('logs.query') }}
|
|
142
|
+
</button>
|
|
143
|
+
<button
|
|
144
|
+
v-if="hasFilter"
|
|
145
|
+
class="mini-btn"
|
|
146
|
+
@click="resetFilters"
|
|
147
|
+
>
|
|
148
|
+
{{ $t('logs.reset') }}
|
|
149
|
+
</button>
|
|
150
|
+
</section>
|
|
151
|
+
|
|
152
|
+
<!-- 结果表:时间/来源/操作者/分类/摘要/归属维度/详情 -->
|
|
153
|
+
<section class="table-card">
|
|
154
|
+
<p
|
|
155
|
+
v-if="opsLog.error.list"
|
|
156
|
+
class="err"
|
|
157
|
+
>
|
|
158
|
+
{{ opsLog.error.list }}
|
|
159
|
+
</p>
|
|
160
|
+
<table class="log-table">
|
|
161
|
+
<thead>
|
|
162
|
+
<tr>
|
|
163
|
+
<th class="th-time">
|
|
164
|
+
{{ $t('logs.thTime') }}
|
|
165
|
+
</th>
|
|
166
|
+
<th class="th-src">
|
|
167
|
+
{{ $t('logs.fSource') }}
|
|
168
|
+
</th>
|
|
169
|
+
<th>{{ $t('logs.thActor') }}</th>
|
|
170
|
+
<th class="th-kind">
|
|
171
|
+
{{ $t('logs.fKind') }}
|
|
172
|
+
</th>
|
|
173
|
+
<th>{{ $t('logs.thSummary') }}</th>
|
|
174
|
+
<th class="th-scope">
|
|
175
|
+
{{ $t('logs.thScope') }}
|
|
176
|
+
</th>
|
|
177
|
+
<th class="th-detail">
|
|
178
|
+
{{ $t('logs.thDetail') }}
|
|
179
|
+
</th>
|
|
180
|
+
</tr>
|
|
181
|
+
</thead>
|
|
182
|
+
<tbody>
|
|
183
|
+
<tr
|
|
184
|
+
v-for="row in opsLog.results"
|
|
185
|
+
:key="`${row.id}-${row.at}`"
|
|
186
|
+
>
|
|
187
|
+
<td class="mono dim">
|
|
188
|
+
{{ fmtTime(row.at) }}
|
|
189
|
+
</td>
|
|
190
|
+
<td>
|
|
191
|
+
<span
|
|
192
|
+
class="src-badge"
|
|
193
|
+
:class="row.actorKind"
|
|
194
|
+
>{{ srcLabel(row.actorKind) }}</span>
|
|
195
|
+
</td>
|
|
196
|
+
<td class="actor">
|
|
197
|
+
{{ row.actorName || row.actor || '—' }}
|
|
198
|
+
</td>
|
|
199
|
+
<td>
|
|
200
|
+
<span
|
|
201
|
+
class="kind-chip"
|
|
202
|
+
:class="row.kind"
|
|
203
|
+
>{{ kindLabel(row.kind) }}</span>
|
|
204
|
+
</td>
|
|
205
|
+
<td class="summary">
|
|
206
|
+
{{ row.summary }}
|
|
207
|
+
<small class="mono dim action">{{ row.action }}</small>
|
|
208
|
+
</td>
|
|
209
|
+
<td class="scope">
|
|
210
|
+
<span
|
|
211
|
+
v-if="lineName(row.lineId)"
|
|
212
|
+
class="scope-chip"
|
|
213
|
+
:title="$t('logs.fLine')"
|
|
214
|
+
>{{ lineName(row.lineId) }}</span>
|
|
215
|
+
<span
|
|
216
|
+
v-if="productName(row.productId)"
|
|
217
|
+
class="scope-chip"
|
|
218
|
+
:title="$t('logs.fProduct')"
|
|
219
|
+
>{{ productName(row.productId) }}</span>
|
|
220
|
+
<span
|
|
221
|
+
v-if="recipeName(row.recipeId)"
|
|
222
|
+
class="scope-chip"
|
|
223
|
+
:title="'Recipe'"
|
|
224
|
+
>{{ recipeName(row.recipeId) }}</span>
|
|
225
|
+
<span
|
|
226
|
+
v-if="!row.lineId && !row.productId && !row.recipeId"
|
|
227
|
+
class="dim"
|
|
228
|
+
>—</span>
|
|
229
|
+
</td>
|
|
230
|
+
<td class="detail-cell">
|
|
231
|
+
<button
|
|
232
|
+
v-if="row.detailJson && row.detailJson !== '{}'"
|
|
233
|
+
class="mini-btn"
|
|
234
|
+
@click="toggle(row)"
|
|
235
|
+
>
|
|
236
|
+
{{ expanded === row ? $t('logs.fold') : $t('logs.expand') }}
|
|
237
|
+
</button>
|
|
238
|
+
<span
|
|
239
|
+
v-else
|
|
240
|
+
class="dim"
|
|
241
|
+
>—</span>
|
|
242
|
+
</td>
|
|
243
|
+
</tr>
|
|
244
|
+
<tr>
|
|
245
|
+
<td
|
|
246
|
+
v-if="opsLog.results.length === 0"
|
|
247
|
+
colspan="7"
|
|
248
|
+
class="empty"
|
|
249
|
+
>
|
|
250
|
+
<template v-if="opsLog.loading.list">
|
|
251
|
+
{{ $t('logs.loading') }}
|
|
252
|
+
</template>
|
|
253
|
+
<template v-else>
|
|
254
|
+
{{ $t('logs.empty') }}
|
|
255
|
+
</template>
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
</tbody>
|
|
259
|
+
</table>
|
|
260
|
+
<pre
|
|
261
|
+
v-if="expanded"
|
|
262
|
+
class="detail-box mono"
|
|
263
|
+
>{{ pretty(expanded.detailJson) }}</pre>
|
|
264
|
+
</section>
|
|
265
|
+
|
|
266
|
+
<!-- 人工记录弹窗 -->
|
|
267
|
+
<Teleport to="body">
|
|
268
|
+
<div
|
|
269
|
+
v-if="manualOpen"
|
|
270
|
+
class="modal-mask"
|
|
271
|
+
@click.self="manualOpen = false"
|
|
272
|
+
>
|
|
273
|
+
<div class="modal">
|
|
274
|
+
<h3 class="m-title">
|
|
275
|
+
{{ $t('logs.manual') }}
|
|
276
|
+
</h3>
|
|
277
|
+
<label class="m-f">
|
|
278
|
+
<span>{{ $t('logs.mSummary') }} *</span>
|
|
279
|
+
<textarea
|
|
280
|
+
v-model="manual.summary"
|
|
281
|
+
rows="3"
|
|
282
|
+
:placeholder="$t('logs.mSummaryPh')"
|
|
283
|
+
/>
|
|
284
|
+
</label>
|
|
285
|
+
<div class="m-grid">
|
|
286
|
+
<label class="m-f">
|
|
287
|
+
<span>{{ $t('logs.fLine') }}</span>
|
|
288
|
+
<select
|
|
289
|
+
v-model="manual.lineId"
|
|
290
|
+
class="inp-sel"
|
|
291
|
+
@change="manual.productId = ''; manual.recipeId = ''"
|
|
292
|
+
>
|
|
293
|
+
<option value="">
|
|
294
|
+
{{ $t('logs.all') }}
|
|
295
|
+
</option>
|
|
296
|
+
<option
|
|
297
|
+
v-for="l in dcw.lines"
|
|
298
|
+
:key="l.id"
|
|
299
|
+
:value="l.id"
|
|
300
|
+
>
|
|
301
|
+
{{ l.name }}
|
|
302
|
+
</option>
|
|
303
|
+
</select>
|
|
304
|
+
</label>
|
|
305
|
+
<label class="m-f">
|
|
306
|
+
<span>{{ $t('logs.fProduct') }}</span>
|
|
307
|
+
<select
|
|
308
|
+
v-model="manual.productId"
|
|
309
|
+
class="inp-sel"
|
|
310
|
+
@change="manual.recipeId = ''"
|
|
311
|
+
>
|
|
312
|
+
<option value="">
|
|
313
|
+
{{ $t('logs.all') }}
|
|
314
|
+
</option>
|
|
315
|
+
<option
|
|
316
|
+
v-for="p in productsOfLine"
|
|
317
|
+
:key="p.id"
|
|
318
|
+
:value="p.id"
|
|
319
|
+
>
|
|
320
|
+
{{ p.name }}
|
|
321
|
+
</option>
|
|
322
|
+
</select>
|
|
323
|
+
</label>
|
|
324
|
+
<label class="m-f">
|
|
325
|
+
<span>Recipe</span>
|
|
326
|
+
<select
|
|
327
|
+
v-model="manual.recipeId"
|
|
328
|
+
class="inp-sel"
|
|
329
|
+
>
|
|
330
|
+
<option value="">
|
|
331
|
+
{{ $t('logs.all') }}
|
|
332
|
+
</option>
|
|
333
|
+
<option
|
|
334
|
+
v-for="r in recipesOfScope"
|
|
335
|
+
:key="r.id"
|
|
336
|
+
:value="r.id"
|
|
337
|
+
>
|
|
338
|
+
{{ r.name }}
|
|
339
|
+
</option>
|
|
340
|
+
</select>
|
|
341
|
+
</label>
|
|
342
|
+
</div>
|
|
343
|
+
<p
|
|
344
|
+
v-if="opsLog.error.post"
|
|
345
|
+
class="err"
|
|
346
|
+
>
|
|
347
|
+
{{ opsLog.error.post }}
|
|
348
|
+
</p>
|
|
349
|
+
<div class="m-actions">
|
|
350
|
+
<button
|
|
351
|
+
class="ghost-btn"
|
|
352
|
+
@click="manualOpen = false"
|
|
353
|
+
>
|
|
354
|
+
{{ $t('common.cancel') }}
|
|
355
|
+
</button>
|
|
356
|
+
<button
|
|
357
|
+
class="pill-btn"
|
|
358
|
+
:disabled="opsLog.loading.posting || !manual.summary.trim()"
|
|
359
|
+
@click="submitManual"
|
|
360
|
+
>
|
|
361
|
+
{{ $t('logs.mSubmit') }}
|
|
362
|
+
</button>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
</Teleport>
|
|
367
|
+
</div>
|
|
368
|
+
</template>
|
|
369
|
+
|
|
370
|
+
<script setup lang="ts">
|
|
371
|
+
import { computed, onMounted, reactive, ref } from 'vue'
|
|
372
|
+
import { message } from 'ant-design-vue'
|
|
373
|
+
import { useDcwStream } from '@/app/composables/workshop/useDcwStream'
|
|
374
|
+
import { useWorkshopWs } from '@/app/composables/workshop/useWorkshopWs'
|
|
375
|
+
import { useOpsLog, type OpsLogRow } from '@/app/composables/workshop/useOpsLog'
|
|
376
|
+
|
|
377
|
+
const tt = (k: string) => useNuxtApp().$i18n.t(k) as string
|
|
378
|
+
|
|
379
|
+
const dcw = useDcwStream()
|
|
380
|
+
const ws = useWorkshopWs()
|
|
381
|
+
const opsLog = useOpsLog()
|
|
382
|
+
|
|
383
|
+
const KINDS = ['write', 'manual', 'alarm', 'line', 'recipe', 'rollback', 'daq', 'system'] as const
|
|
384
|
+
|
|
385
|
+
const q = reactive({ lineId: '', productId: '', recipeId: '', actorKind: '', kind: '', text: '' })
|
|
386
|
+
const expanded = ref<OpsLogRow | null>(null)
|
|
387
|
+
const manualOpen = ref(false)
|
|
388
|
+
const manual = reactive({ summary: '', lineId: '', productId: '', recipeId: '' })
|
|
389
|
+
|
|
390
|
+
const hasFilter = computed(() => !!(q.lineId || q.productId || q.recipeId || q.actorKind || q.kind || q.text.trim()))
|
|
391
|
+
const productsOfLine = computed(() => dcw.products.filter(p => !q.lineId || p.lineId === q.lineId))
|
|
392
|
+
const recipesOfScope = computed(() => dcw.recipes.filter(r =>
|
|
393
|
+
(!q.lineId || r.lineId === q.lineId) && (!q.productId || r.productId === q.productId)))
|
|
394
|
+
|
|
395
|
+
function doQuery(): void {
|
|
396
|
+
void opsLog.fetchLogs({
|
|
397
|
+
lineId: q.lineId,
|
|
398
|
+
productId: q.productId,
|
|
399
|
+
recipeId: q.recipeId,
|
|
400
|
+
actorKind: q.actorKind,
|
|
401
|
+
kind: q.kind,
|
|
402
|
+
q: q.text.trim(),
|
|
403
|
+
limit: 300,
|
|
404
|
+
})
|
|
405
|
+
expanded.value = null
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function resetFilters(): void {
|
|
409
|
+
q.lineId = ''
|
|
410
|
+
q.productId = ''
|
|
411
|
+
q.recipeId = ''
|
|
412
|
+
q.actorKind = ''
|
|
413
|
+
q.kind = ''
|
|
414
|
+
q.text = ''
|
|
415
|
+
doQuery()
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function openManual(): void {
|
|
419
|
+
manual.summary = ''
|
|
420
|
+
manual.lineId = q.lineId
|
|
421
|
+
manual.productId = q.productId
|
|
422
|
+
manual.recipeId = q.recipeId
|
|
423
|
+
manualOpen.value = true
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
async function submitManual(): Promise<void> {
|
|
427
|
+
try {
|
|
428
|
+
await opsLog.postManual({
|
|
429
|
+
summary: manual.summary.trim(),
|
|
430
|
+
lineId: manual.lineId,
|
|
431
|
+
productId: manual.productId,
|
|
432
|
+
recipeId: manual.recipeId,
|
|
433
|
+
})
|
|
434
|
+
message.success(tt('logs.mOk'))
|
|
435
|
+
manualOpen.value = false
|
|
436
|
+
doQuery()
|
|
437
|
+
}
|
|
438
|
+
catch (err) {
|
|
439
|
+
message.error(apiErrorMessage(err))
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
function toggle(row: OpsLogRow): void {
|
|
444
|
+
expanded.value = expanded.value === row ? null : row
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function pretty(json: string): string {
|
|
448
|
+
try {
|
|
449
|
+
return JSON.stringify(JSON.parse(json), null, 2)
|
|
450
|
+
}
|
|
451
|
+
catch {
|
|
452
|
+
return json
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
function fmtTime(at: string): string {
|
|
457
|
+
const d = new Date(at)
|
|
458
|
+
if (!Number.isFinite(d.getTime())) return at
|
|
459
|
+
const p = (n: number) => String(n).padStart(2, '0')
|
|
460
|
+
return `${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
function srcLabel(kind: string): string {
|
|
464
|
+
return kind === 'agent' ? 'Agent' : kind === 'user' ? tt('logs.src.user') : tt('logs.src.system')
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
function kindLabel(kind: string): string {
|
|
468
|
+
return kind ? tt(`logs.kind.${kind}`) : '—'
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function lineName(id: string): string {
|
|
472
|
+
return dcw.lines.find(l => l.id === id)?.name ?? ''
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function productName(id: string): string {
|
|
476
|
+
return dcw.products.find(p => p.id === id)?.name ?? ''
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function recipeName(id: string): string {
|
|
480
|
+
return dcw.recipes.find(r => r.id === id)?.name ?? ''
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
onMounted(() => {
|
|
484
|
+
ws.ensureConnected()
|
|
485
|
+
opsLog.ensureLive()
|
|
486
|
+
void dcw.load()
|
|
487
|
+
doQuery()
|
|
488
|
+
})
|
|
489
|
+
</script>
|
|
490
|
+
|
|
491
|
+
<script lang="ts">
|
|
492
|
+
export default { name: 'OpsLogsPage' }
|
|
493
|
+
</script>
|
|
494
|
+
|
|
495
|
+
<style scoped>
|
|
496
|
+
.page { display: flex; flex-direction: column; gap: 12px; }
|
|
497
|
+
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
|
|
498
|
+
.h1 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); }
|
|
499
|
+
.sub { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-faint); }
|
|
500
|
+
.head-actions { display: flex; gap: 10px; align-items: center; }
|
|
501
|
+
.live-dot {
|
|
502
|
+
width: 8px; height: 8px; border-radius: 50%;
|
|
503
|
+
background: var(--tone-success-dot);
|
|
504
|
+
box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone-success-dot) 45%, transparent);
|
|
505
|
+
animation: livePulse 2s ease-out infinite;
|
|
506
|
+
}
|
|
507
|
+
@keyframes livePulse {
|
|
508
|
+
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone-success-dot) 45%, transparent); }
|
|
509
|
+
70% { box-shadow: 0 0 0 8px transparent; }
|
|
510
|
+
100% { box-shadow: 0 0 0 0 transparent; }
|
|
511
|
+
}
|
|
512
|
+
.live-txt { font-size: 11px; color: var(--ink-faint); }
|
|
513
|
+
|
|
514
|
+
.filter-card {
|
|
515
|
+
display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
|
|
516
|
+
padding: 10px 14px;
|
|
517
|
+
background: var(--surface-glass);
|
|
518
|
+
border: 1px solid var(--glass-line);
|
|
519
|
+
border-radius: 10px;
|
|
520
|
+
backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
521
|
+
-webkit-backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
522
|
+
}
|
|
523
|
+
.flt { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-faint); }
|
|
524
|
+
.flt-grow { flex: 1 1 180px; }
|
|
525
|
+
.inp-sel {
|
|
526
|
+
min-width: 0; padding: 6px 9px; font-size: 12.5px; color: var(--ink);
|
|
527
|
+
background: var(--frost-bg);
|
|
528
|
+
border: 1px solid var(--glass-line); border-radius: 7px; outline: none;
|
|
529
|
+
}
|
|
530
|
+
.inp-sel:focus { border-color: color-mix(in srgb, var(--tone-info-dot) 55%, transparent); }
|
|
531
|
+
.mini-btn {
|
|
532
|
+
padding: 6px 11px; font-size: 12px; color: var(--ink-soft);
|
|
533
|
+
background: var(--frost-bg); border: 1px solid var(--glass-line); border-radius: 7px;
|
|
534
|
+
cursor: pointer;
|
|
535
|
+
}
|
|
536
|
+
.mini-btn:hover { border-color: color-mix(in srgb, var(--tone-info-dot) 45%, transparent); }
|
|
537
|
+
|
|
538
|
+
.table-card {
|
|
539
|
+
background: var(--surface-glass);
|
|
540
|
+
border: 1px solid var(--glass-line);
|
|
541
|
+
border-radius: 10px;
|
|
542
|
+
overflow: hidden;
|
|
543
|
+
backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
544
|
+
-webkit-backdrop-filter: blur(var(--aurora-blur)) saturate(1.15);
|
|
545
|
+
}
|
|
546
|
+
.err { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--tone-danger-dot); }
|
|
547
|
+
.log-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
|
|
548
|
+
.log-table th {
|
|
549
|
+
position: sticky; top: 0; z-index: 1;
|
|
550
|
+
padding: 8px 10px; text-align: left; font-weight: 600; color: var(--ink-soft);
|
|
551
|
+
background: var(--frost-bg);
|
|
552
|
+
border-bottom: 1px solid var(--glass-line);
|
|
553
|
+
}
|
|
554
|
+
.log-table td {
|
|
555
|
+
max-width: 380px; padding: 7px 10px; color: var(--ink-soft);
|
|
556
|
+
border-bottom: 1px solid color-mix(in srgb, var(--glass-line) 55%, transparent);
|
|
557
|
+
vertical-align: top;
|
|
558
|
+
}
|
|
559
|
+
.th-time, .th-src, .th-kind { white-space: nowrap; }
|
|
560
|
+
.th-detail { width: 72px; }
|
|
561
|
+
.actor { white-space: nowrap; }
|
|
562
|
+
.summary .action { display: block; font-size: 10px; color: var(--ink-faint); }
|
|
563
|
+
.scope { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
|
|
564
|
+
.scope-chip {
|
|
565
|
+
padding: 1px 7px; font-size: 10.5px; color: var(--ink-soft);
|
|
566
|
+
background: var(--frost-bg); border-radius: 99px; white-space: nowrap;
|
|
567
|
+
}
|
|
568
|
+
.detail-cell { white-space: nowrap; }
|
|
569
|
+
.empty { padding: 22px 0 !important; color: var(--ink-faint); text-align: center; }
|
|
570
|
+
.detail-box {
|
|
571
|
+
max-height: 260px; margin: 0; padding: 10px 14px; overflow: auto;
|
|
572
|
+
font-size: 11.5px; color: var(--ink-soft);
|
|
573
|
+
background: var(--frost-bg); border-top: 1px solid var(--glass-line);
|
|
574
|
+
}
|
|
575
|
+
.src-badge {
|
|
576
|
+
display: inline-block; padding: 1px 8px; font-size: 10.5px;
|
|
577
|
+
border: 1px solid var(--glass-line); border-radius: 99px; color: var(--ink-faint);
|
|
578
|
+
}
|
|
579
|
+
.src-badge.agent { color: var(--tone-info-dot); border-color: color-mix(in srgb, var(--tone-info-dot) 40%, transparent); }
|
|
580
|
+
.src-badge.user { color: var(--tone-success-dot); border-color: color-mix(in srgb, var(--tone-success-dot) 40%, transparent); }
|
|
581
|
+
.kind-chip {
|
|
582
|
+
display: inline-block; padding: 1px 7px; font-size: 10.5px;
|
|
583
|
+
color: var(--ink-soft); background: var(--frost-bg); border-radius: 5px; white-space: nowrap;
|
|
584
|
+
}
|
|
585
|
+
.kind-chip.alarm { color: var(--tone-danger-dot); background: var(--tone-danger-bg); }
|
|
586
|
+
.kind-chip.write { color: var(--tone-info-dot); }
|
|
587
|
+
.kind-chip.rollback { color: var(--tone-warning-dot); }
|
|
588
|
+
.kind-chip.manual { color: var(--tone-success-dot); }
|
|
589
|
+
|
|
590
|
+
.m-title { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
|
|
591
|
+
.modal-mask {
|
|
592
|
+
position: fixed; inset: 0; z-index: 60;
|
|
593
|
+
display: flex; align-items: center; justify-content: center;
|
|
594
|
+
padding: 20px;
|
|
595
|
+
background: color-mix(in srgb, var(--ink) 32%, transparent);
|
|
596
|
+
backdrop-filter: blur(3px);
|
|
597
|
+
-webkit-backdrop-filter: blur(3px);
|
|
598
|
+
}
|
|
599
|
+
.modal {
|
|
600
|
+
width: min(560px, 94vw);
|
|
601
|
+
padding: 16px 18px;
|
|
602
|
+
background: var(--surface-glass);
|
|
603
|
+
border: 1px solid var(--glass-line);
|
|
604
|
+
border-radius: 12px;
|
|
605
|
+
backdrop-filter: blur(calc(var(--aurora-blur) * 1.4)) saturate(1.2);
|
|
606
|
+
-webkit-backdrop-filter: blur(calc(var(--aurora-blur) * 1.4)) saturate(1.2);
|
|
607
|
+
}
|
|
608
|
+
.m-f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-faint); }
|
|
609
|
+
.m-f textarea, .m-f .inp-sel {
|
|
610
|
+
padding: 7px 9px; font-size: 12.5px; color: var(--ink);
|
|
611
|
+
background: var(--frost-bg); border: 1px solid var(--glass-line); border-radius: 7px; outline: none;
|
|
612
|
+
font-family: inherit; resize: vertical;
|
|
613
|
+
}
|
|
614
|
+
.m-f textarea:focus, .m-f .inp-sel:focus { border-color: color-mix(in srgb, var(--tone-info-dot) 55%, transparent); }
|
|
615
|
+
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
|
|
616
|
+
.m-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
|
|
617
|
+
.ghost-btn {
|
|
618
|
+
padding: 7px 14px; font-size: 12.5px; color: var(--ink-soft);
|
|
619
|
+
background: transparent; border: 1px solid var(--glass-line); border-radius: 8px; cursor: pointer;
|
|
620
|
+
}
|
|
621
|
+
</style>
|