@openc3/vue-common 6.2.1 → 6.4.0
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/{ArrayWidget-BIQi_bWC.cjs → ArrayWidget-Ba-YDfZB.cjs} +3 -3
- package/dist/{ArrayWidget-BIQi_bWC.cjs.map → ArrayWidget-Ba-YDfZB.cjs.map} +1 -1
- package/dist/{ArrayWidget-BxEO5hEG.js → ArrayWidget-DAZApfkV.js} +5 -5
- package/dist/{ArrayWidget-BxEO5hEG.js.map → ArrayWidget-DAZApfkV.js.map} +1 -1
- package/dist/{ArrayplotWidget-B_VPoV4v.js → ArrayplotWidget-BfsxDplv.js} +4 -4
- package/dist/{ArrayplotWidget-B_VPoV4v.js.map → ArrayplotWidget-BfsxDplv.js.map} +1 -1
- package/dist/ArrayplotWidget-Ckm4lmSc.cjs +2 -0
- package/dist/{ArrayplotWidget-Donxhd8_.cjs.map → ArrayplotWidget-Ckm4lmSc.cjs.map} +1 -1
- package/dist/{BarColumn-CyRSZHMh.cjs → BarColumn-Cp7oEFJR.cjs} +2 -2
- package/dist/{BarColumn-CyRSZHMh.cjs.map → BarColumn-Cp7oEFJR.cjs.map} +1 -1
- package/dist/{BarColumn-C9dkpg2O.js → BarColumn-q0nAsvrd.js} +3 -3
- package/dist/{BarColumn-C9dkpg2O.js.map → BarColumn-q0nAsvrd.js.map} +1 -1
- package/dist/BlockWidget-DRB-TDL_.cjs +3 -0
- package/dist/{BlockWidget-DPLN1jgj.cjs.map → BlockWidget-DRB-TDL_.cjs.map} +1 -1
- package/dist/{BlockWidget-CuefOin6.js → BlockWidget-SDCUWcMQ.js} +5 -5
- package/dist/{BlockWidget-CuefOin6.js.map → BlockWidget-SDCUWcMQ.js.map} +1 -1
- package/dist/{ButtonWidget-B6HM0Doo.js → ButtonWidget-BVMjwC19.js} +7 -7
- package/dist/{ButtonWidget-B6HM0Doo.js.map → ButtonWidget-BVMjwC19.js.map} +1 -1
- package/dist/ButtonWidget-yJ70adEU.cjs +3 -0
- package/dist/{ButtonWidget-DccYzIY3.cjs.map → ButtonWidget-yJ70adEU.cjs.map} +1 -1
- package/dist/CanvasWidget-DXkxnt1x.cjs +2 -0
- package/dist/{CanvasWidget-BzTU9rc9.cjs.map → CanvasWidget-DXkxnt1x.cjs.map} +1 -1
- package/dist/{CanvasWidget-DZQGG-yQ.js → CanvasWidget-bVkufjRQ.js} +3 -3
- package/dist/{CanvasWidget-DZQGG-yQ.js.map → CanvasWidget-bVkufjRQ.js.map} +1 -1
- package/dist/CanvasdotWidget-Bi3nZh7g.cjs +2 -0
- package/dist/{CanvasdotWidget-B7VTS1QI.cjs.map → CanvasdotWidget-Bi3nZh7g.cjs.map} +1 -1
- package/dist/{CanvasdotWidget-6wuCSnw_.js → CanvasdotWidget-DpniFfca.js} +3 -3
- package/dist/{CanvasdotWidget-6wuCSnw_.js.map → CanvasdotWidget-DpniFfca.js.map} +1 -1
- package/dist/CanvasimageWidget-C-aBl-by.cjs +2 -0
- package/dist/{CanvasimageWidget-BwYpfmDE.cjs.map → CanvasimageWidget-C-aBl-by.cjs.map} +1 -1
- package/dist/{CanvasimageWidget-mhcPpAuN.js → CanvasimageWidget-DHOSz-dJ.js} +4 -4
- package/dist/{CanvasimageWidget-mhcPpAuN.js.map → CanvasimageWidget-DHOSz-dJ.js.map} +1 -1
- package/dist/CanvasimagevalueWidget-DAbbV-LB.cjs +2 -0
- package/dist/{CanvasimagevalueWidget-E_NsZ82T.cjs.map → CanvasimagevalueWidget-DAbbV-LB.cjs.map} +1 -1
- package/dist/{CanvasimagevalueWidget-Cx-dH8Gc.js → CanvasimagevalueWidget-zrURWWUL.js} +4 -4
- package/dist/{CanvasimagevalueWidget-Cx-dH8Gc.js.map → CanvasimagevalueWidget-zrURWWUL.js.map} +1 -1
- package/dist/CanvaslabelWidget-82bf_Awf.cjs +2 -0
- package/dist/{CanvaslabelWidget-BBDuXWfU.cjs.map → CanvaslabelWidget-82bf_Awf.cjs.map} +1 -1
- package/dist/{CanvaslabelWidget-CQZCeohU.js → CanvaslabelWidget-D-XAMifp.js} +3 -3
- package/dist/{CanvaslabelWidget-CQZCeohU.js.map → CanvaslabelWidget-D-XAMifp.js.map} +1 -1
- package/dist/{CanvaslabelvalueWidget-CwmYDCjr.js → CanvaslabelvalueWidget-BsIdBtEb.js} +3 -3
- package/dist/{CanvaslabelvalueWidget-CwmYDCjr.js.map → CanvaslabelvalueWidget-BsIdBtEb.js.map} +1 -1
- package/dist/CanvaslabelvalueWidget-DgDzwLdi.cjs +2 -0
- package/dist/{CanvaslabelvalueWidget-DAdu7ujn.cjs.map → CanvaslabelvalueWidget-DgDzwLdi.cjs.map} +1 -1
- package/dist/CanvaslineWidget-BRRPuuqS.cjs +2 -0
- package/dist/{CanvaslineWidget-Bv5da1Vy.cjs.map → CanvaslineWidget-BRRPuuqS.cjs.map} +1 -1
- package/dist/{CanvaslineWidget-nTP3fJB4.js → CanvaslineWidget-CA2aPGRg.js} +3 -3
- package/dist/{CanvaslineWidget-nTP3fJB4.js.map → CanvaslineWidget-CA2aPGRg.js.map} +1 -1
- package/dist/CanvaslinevalueWidget-BYjWr2gq.cjs +2 -0
- package/dist/{CanvaslinevalueWidget-BVfUB96K.cjs.map → CanvaslinevalueWidget-BYjWr2gq.cjs.map} +1 -1
- package/dist/{CanvaslinevalueWidget-C3sJnjLQ.js → CanvaslinevalueWidget-J7epKRlo.js} +3 -3
- package/dist/{CanvaslinevalueWidget-C3sJnjLQ.js.map → CanvaslinevalueWidget-J7epKRlo.js.map} +1 -1
- package/dist/{CheckbuttonWidget-5-8YDsQL.js → CheckbuttonWidget-ByH-PDRG.js} +3 -3
- package/dist/{CheckbuttonWidget-5-8YDsQL.js.map → CheckbuttonWidget-ByH-PDRG.js.map} +1 -1
- package/dist/CheckbuttonWidget-DkoFFTcM.cjs +2 -0
- package/dist/{CheckbuttonWidget-BGqD-BGc.cjs.map → CheckbuttonWidget-DkoFFTcM.cjs.map} +1 -1
- package/dist/{ComboboxWidget-DzBL8h9f.js → ComboboxWidget-Bdm_fMzW.js} +3 -3
- package/dist/{ComboboxWidget-DzBL8h9f.js.map → ComboboxWidget-Bdm_fMzW.js.map} +1 -1
- package/dist/ComboboxWidget-Dq28F4bs.cjs +2 -0
- package/dist/{ComboboxWidget-DoHMlSAr.cjs.map → ComboboxWidget-Dq28F4bs.cjs.map} +1 -1
- package/dist/{CriticalCmdDialog-DLEasFsx.js → CriticalCmdDialog-Bcq8PGag.js} +17 -17
- package/dist/CriticalCmdDialog-Bcq8PGag.js.map +1 -0
- package/dist/CriticalCmdDialog-CLF7hYKu.cjs +2 -0
- package/dist/CriticalCmdDialog-CLF7hYKu.cjs.map +1 -0
- package/dist/CustomIcon-Bop2mEnu.cjs +2 -0
- package/dist/CustomIcon-Bop2mEnu.cjs.map +1 -0
- package/dist/CustomIcon-h5X7369N.js +50 -0
- package/dist/CustomIcon-h5X7369N.js.map +1 -0
- package/dist/{DateWidget-CW7Od7lB.js → DateWidget-BaQqthC7.js} +4 -4
- package/dist/{DateWidget-CW7Od7lB.js.map → DateWidget-BaQqthC7.js.map} +1 -1
- package/dist/DateWidget-DCayVS3o.cjs +2 -0
- package/dist/{DateWidget-DKZz1J9J.cjs.map → DateWidget-DCayVS3o.cjs.map} +1 -1
- package/dist/{DetailsDialog-BvbziA7Y.js → DetailsDialog-C5jf8o0K.js} +16 -16
- package/dist/DetailsDialog-C5jf8o0K.js.map +1 -0
- package/dist/DetailsDialog-CangkVuF.cjs +2 -0
- package/dist/DetailsDialog-CangkVuF.cjs.map +1 -0
- package/dist/DynamicWidget-BWEVCUfd.cjs +2 -0
- package/dist/{DynamicWidget-3wHr6Ng-.cjs.map → DynamicWidget-BWEVCUfd.cjs.map} +1 -1
- package/dist/{DynamicWidget-gFSYxzvT.js → DynamicWidget-CfMtj7H8.js} +2 -2
- package/dist/{DynamicWidget-gFSYxzvT.js.map → DynamicWidget-CfMtj7H8.js.map} +1 -1
- package/dist/EventListDialog-Bniar26O.js +1509 -0
- package/dist/EventListDialog-Bniar26O.js.map +1 -0
- package/dist/EventListDialog-D_KXhGDO.cjs +2 -0
- package/dist/EventListDialog-D_KXhGDO.cjs.map +1 -0
- package/dist/FormatvalueWidget--H5B9i_Y.js +48 -0
- package/dist/FormatvalueWidget--H5B9i_Y.js.map +1 -0
- package/dist/FormatvalueWidget-CDh1rF5P.cjs +2 -0
- package/dist/FormatvalueWidget-CDh1rF5P.cjs.map +1 -0
- package/dist/Graph-DIR-5tJu.cjs +2 -0
- package/dist/Graph-DIR-5tJu.cjs.map +1 -0
- package/dist/{Graph-3rkhFP3G.js → Graph-M382Zo8o.js} +676 -806
- package/dist/Graph-M382Zo8o.js.map +1 -0
- package/dist/{GraphWidget-22NxFa9k.cjs → GraphWidget-CNUOLw5-.cjs} +2 -2
- package/dist/{GraphWidget-22NxFa9k.cjs.map → GraphWidget-CNUOLw5-.cjs.map} +1 -1
- package/dist/{GraphWidget-Dycey-mj.js → GraphWidget-_YOGDD1U.js} +2 -2
- package/dist/{GraphWidget-Dycey-mj.js.map → GraphWidget-_YOGDD1U.js.map} +1 -1
- package/dist/HorizontalWidget-Bix4q7It.cjs +2 -0
- package/dist/{HorizontalWidget-BBeB0eBI.cjs.map → HorizontalWidget-Bix4q7It.cjs.map} +1 -1
- package/dist/{HorizontalWidget-D31NRWy5.js → HorizontalWidget-D_gzrOWs.js} +3 -3
- package/dist/{HorizontalWidget-D31NRWy5.js.map → HorizontalWidget-D_gzrOWs.js.map} +1 -1
- package/dist/HorizontalboxWidget-B8a4-h2J.cjs +2 -0
- package/dist/HorizontalboxWidget-B8a4-h2J.cjs.map +1 -0
- package/dist/HorizontalboxWidget-GDcjO-UB.js +47 -0
- package/dist/HorizontalboxWidget-GDcjO-UB.js.map +1 -0
- package/dist/HorizontallineWidget-BD6dqVhE.cjs +2 -0
- package/dist/{HorizontallineWidget-BCKOQase.cjs.map → HorizontallineWidget-BD6dqVhE.cjs.map} +1 -1
- package/dist/HorizontallineWidget-DZvOYFxf.js +16 -0
- package/dist/{HorizontallineWidget-CbxREBYI.js.map → HorizontallineWidget-DZvOYFxf.js.map} +1 -1
- package/dist/{IframeWidget-Ctj8OIcG.js → IframeWidget-CuUav9b3.js} +3 -3
- package/dist/{IframeWidget-Ctj8OIcG.js.map → IframeWidget-CuUav9b3.js.map} +1 -1
- package/dist/IframeWidget-DL_CET3B.cjs +2 -0
- package/dist/{IframeWidget-CZwsTgvX.cjs.map → IframeWidget-DL_CET3B.cjs.map} +1 -1
- package/dist/{ImageLoader-BrNrCBvi.js → ImageLoader-3KLKJ5mV.js} +2 -2
- package/dist/{ImageLoader-BrNrCBvi.js.map → ImageLoader-3KLKJ5mV.js.map} +1 -1
- package/dist/{ImageLoader-D_Gq-KxR.cjs → ImageLoader-DaWMqoJS.cjs} +2 -2
- package/dist/{ImageLoader-D_Gq-KxR.cjs.map → ImageLoader-DaWMqoJS.cjs.map} +1 -1
- package/dist/{ImageviewerWidget-XrsqxmLo.js → ImageviewerWidget-BMZ6REN4.js} +3 -3
- package/dist/{ImageviewerWidget-XrsqxmLo.js.map → ImageviewerWidget-BMZ6REN4.js.map} +1 -1
- package/dist/ImageviewerWidget-_0YopZ1s.cjs +2 -0
- package/dist/{ImageviewerWidget-DwRPFSLR.cjs.map → ImageviewerWidget-_0YopZ1s.cjs.map} +1 -1
- package/dist/InterfacesTab-DGrLsTA0.cjs +2 -0
- package/dist/InterfacesTab-DGrLsTA0.cjs.map +1 -0
- package/dist/InterfacesTab-DTixVrGo.js +83 -0
- package/dist/InterfacesTab-DTixVrGo.js.map +1 -0
- package/dist/LabelWidget-DkZvBxYg.cjs +2 -0
- package/dist/LabelWidget-DkZvBxYg.cjs.map +1 -0
- package/dist/{LabelWidget-t7I87dp7.js → LabelWidget-oh6FIG6s.js} +5 -5
- package/dist/LabelWidget-oh6FIG6s.js.map +1 -0
- package/dist/{LabelledWidget-C7TDf92M.js → LabelledWidget-Bic36les.js} +5 -5
- package/dist/{LabelledWidget-C7TDf92M.js.map → LabelledWidget-Bic36les.js.map} +1 -1
- package/dist/LabelledWidget-D7nm73kj.cjs +2 -0
- package/dist/{LabelledWidget-DUpHxc9z.cjs.map → LabelledWidget-D7nm73kj.cjs.map} +1 -1
- package/dist/{LabelprogressbarWidget-wwLURt1u.js → LabelprogressbarWidget-CqIiGoDb.js} +5 -5
- package/dist/{LabelprogressbarWidget-wwLURt1u.js.map → LabelprogressbarWidget-CqIiGoDb.js.map} +1 -1
- package/dist/LabelprogressbarWidget-DY0Xd2c2.cjs +2 -0
- package/dist/{LabelprogressbarWidget-D6cpayCR.cjs.map → LabelprogressbarWidget-DY0Xd2c2.cjs.map} +1 -1
- package/dist/{LabelsparklineWidget-B3awLUyP.js → LabelsparklineWidget-DLhmqO02.js} +5 -5
- package/dist/{LabelsparklineWidget-B3awLUyP.js.map → LabelsparklineWidget-DLhmqO02.js.map} +1 -1
- package/dist/LabelsparklineWidget-DZ5-iEcK.cjs +2 -0
- package/dist/{LabelsparklineWidget-CJRnLETe.cjs.map → LabelsparklineWidget-DZ5-iEcK.cjs.map} +1 -1
- package/dist/{LabelvalueWidget-Zx_yHCtl.js → LabelvalueWidget-BefwSSVq.js} +5 -5
- package/dist/{LabelvalueWidget-Zx_yHCtl.js.map → LabelvalueWidget-BefwSSVq.js.map} +1 -1
- package/dist/LabelvalueWidget-D-u38nLh.cjs +2 -0
- package/dist/{LabelvalueWidget-owiMSCYl.cjs.map → LabelvalueWidget-D-u38nLh.cjs.map} +1 -1
- package/dist/LabelvaluedescWidget-DMuBCLM8.cjs +2 -0
- package/dist/{LabelvaluedescWidget-MRmZBUc0.cjs.map → LabelvaluedescWidget-DMuBCLM8.cjs.map} +1 -1
- package/dist/{LabelvaluedescWidget-BBSBh4vI.js → LabelvaluedescWidget-NxrCzznm.js} +10 -10
- package/dist/{LabelvaluedescWidget-BBSBh4vI.js.map → LabelvaluedescWidget-NxrCzznm.js.map} +1 -1
- package/dist/LabelvaluelimitsbarWidget-BY212bgc.cjs +2 -0
- package/dist/{LabelvaluelimitsbarWidget-BQ2XYPNE.cjs.map → LabelvaluelimitsbarWidget-BY212bgc.cjs.map} +1 -1
- package/dist/{LabelvaluelimitsbarWidget-CZueHYWG.js → LabelvaluelimitsbarWidget-pq7qoolL.js} +5 -5
- package/dist/{LabelvaluelimitsbarWidget-CZueHYWG.js.map → LabelvaluelimitsbarWidget-pq7qoolL.js.map} +1 -1
- package/dist/LabelvaluelimitscolumnWidget-DVLGU6ja.cjs +2 -0
- package/dist/{LabelvaluelimitscolumnWidget-DNmVpU8J.cjs.map → LabelvaluelimitscolumnWidget-DVLGU6ja.cjs.map} +1 -1
- package/dist/{LabelvaluelimitscolumnWidget-BTvzyQMq.js → LabelvaluelimitscolumnWidget-edkpogsl.js} +6 -6
- package/dist/{LabelvaluelimitscolumnWidget-BTvzyQMq.js.map → LabelvaluelimitscolumnWidget-edkpogsl.js.map} +1 -1
- package/dist/LabelvaluerangebarWidget-CA_7kTS2.cjs +2 -0
- package/dist/{LabelvaluerangebarWidget-DL0U8cbw.cjs.map → LabelvaluerangebarWidget-CA_7kTS2.cjs.map} +1 -1
- package/dist/{LabelvaluerangebarWidget-BhYTBgDq.js → LabelvaluerangebarWidget-DpJNv9dh.js} +5 -5
- package/dist/{LabelvaluerangebarWidget-BhYTBgDq.js.map → LabelvaluerangebarWidget-DpJNv9dh.js.map} +1 -1
- package/dist/{Layout-Bh7VzCZd.js → Layout-B0hvhBQO.js} +2 -2
- package/dist/{Layout-Bh7VzCZd.js.map → Layout-B0hvhBQO.js.map} +1 -1
- package/dist/Layout-BLADjt_A.cjs +2 -0
- package/dist/{Layout-DRL0EeSA.cjs.map → Layout-BLADjt_A.cjs.map} +1 -1
- package/dist/LedWidget--4eSxBnn.js +148 -0
- package/dist/LedWidget--4eSxBnn.js.map +1 -0
- package/dist/LedWidget-BoZKOBZg.cjs +2 -0
- package/dist/LedWidget-BoZKOBZg.cjs.map +1 -0
- package/dist/{LimitsbarWidget-Djui0IpK.js → LimitsbarWidget-BQaumgRt.js} +11 -8
- package/dist/LimitsbarWidget-BQaumgRt.js.map +1 -0
- package/dist/LimitsbarWidget-CyHbbNx3.cjs +2 -0
- package/dist/LimitsbarWidget-CyHbbNx3.cjs.map +1 -0
- package/dist/{LimitscolorWidget-DdmvKzmx.js → LimitscolorWidget-BBF9sRtF.js} +3 -3
- package/dist/{LimitscolorWidget-DdmvKzmx.js.map → LimitscolorWidget-BBF9sRtF.js.map} +1 -1
- package/dist/LimitscolorWidget-CsuRoqxm.cjs +2 -0
- package/dist/{LimitscolorWidget-CS0wpX9A.cjs.map → LimitscolorWidget-CsuRoqxm.cjs.map} +1 -1
- package/dist/LimitscolumnWidget-Cr1qFT8M.cjs +2 -0
- package/dist/{LimitscolumnWidget-C_UW6xKq.cjs.map → LimitscolumnWidget-Cr1qFT8M.cjs.map} +1 -1
- package/dist/{LimitscolumnWidget-Cc19IEjq.js → LimitscolumnWidget-DZZtSoXw.js} +3 -3
- package/dist/{LimitscolumnWidget-Cc19IEjq.js.map → LimitscolumnWidget-DZZtSoXw.js.map} +1 -1
- package/dist/LinegraphWidget-Cw9vua8K.cjs +2 -0
- package/dist/{LinegraphWidget-8td_PqgU.cjs.map → LinegraphWidget-Cw9vua8K.cjs.map} +1 -1
- package/dist/{LinegraphWidget-BtieJxeL.js → LinegraphWidget-DTLZmyWs.js} +5 -5
- package/dist/{LinegraphWidget-BtieJxeL.js.map → LinegraphWidget-DTLZmyWs.js.map} +1 -1
- package/dist/MatrixbycolumnsWidget-Digh2kY7.cjs +2 -0
- package/dist/{MatrixbycolumnsWidget-CGOeCNW2.cjs.map → MatrixbycolumnsWidget-Digh2kY7.cjs.map} +1 -1
- package/dist/{MatrixbycolumnsWidget-DnExVRF8.js → MatrixbycolumnsWidget-dpgZz4wR.js} +4 -4
- package/dist/{MatrixbycolumnsWidget-DnExVRF8.js.map → MatrixbycolumnsWidget-dpgZz4wR.js.map} +1 -1
- package/dist/MicroservicesTab-BQywJ_ya.cjs +2 -0
- package/dist/MicroservicesTab-BQywJ_ya.cjs.map +1 -0
- package/dist/MicroservicesTab-DbL48MBc.js +219 -0
- package/dist/MicroservicesTab-DbL48MBc.js.map +1 -0
- package/dist/Openc3Screen-COi4u-9k.cjs +5 -0
- package/dist/Openc3Screen-COi4u-9k.cjs.map +1 -0
- package/dist/Openc3Screen-CtwGKfq-.js +1690 -0
- package/dist/Openc3Screen-CtwGKfq-.js.map +1 -0
- package/dist/{OutputDialog-Ci5OT_fH.js → OutputDialog-B5qHVyck.js} +66 -81
- package/dist/OutputDialog-B5qHVyck.js.map +1 -0
- package/dist/OutputDialog-CFhG2RY9.cjs +2 -0
- package/dist/OutputDialog-CFhG2RY9.cjs.map +1 -0
- package/dist/PackagesTab-Bw34RkLc.js +313 -0
- package/dist/PackagesTab-Bw34RkLc.js.map +1 -0
- package/dist/PackagesTab-DXSowjd4.cjs +2 -0
- package/dist/PackagesTab-DXSowjd4.cjs.map +1 -0
- package/dist/{PluginsTab-Ds3jk64b.js → PluginsTab-C9t0-QVm.js} +206 -245
- package/dist/PluginsTab-C9t0-QVm.js.map +1 -0
- package/dist/PluginsTab-CPaBGJMa.cjs +6 -0
- package/dist/PluginsTab-CPaBGJMa.cjs.map +1 -0
- package/dist/{ProgressbarWidget-DIfqhHRE.js → ProgressbarWidget-7cYr8136.js} +3 -3
- package/dist/{ProgressbarWidget-DIfqhHRE.js.map → ProgressbarWidget-7cYr8136.js.map} +1 -1
- package/dist/ProgressbarWidget-CdOWGViG.cjs +2 -0
- package/dist/{ProgressbarWidget-CUIAYySg.cjs.map → ProgressbarWidget-CdOWGViG.cjs.map} +1 -1
- package/dist/RadiobuttonWidget-5t4ofYx3.cjs +2 -0
- package/dist/{RadiobuttonWidget-Cjk1JAP_.cjs.map → RadiobuttonWidget-5t4ofYx3.cjs.map} +1 -1
- package/dist/{RadiobuttonWidget-QzIkNP7m.js → RadiobuttonWidget-DTfn-7F2.js} +3 -3
- package/dist/{RadiobuttonWidget-QzIkNP7m.js.map → RadiobuttonWidget-DTfn-7F2.js.map} +1 -1
- package/dist/{RadiogroupWidget-Ci9sCX39.js → RadiogroupWidget-DWvTpw94.js} +3 -3
- package/dist/{RadiogroupWidget-Ci9sCX39.js.map → RadiogroupWidget-DWvTpw94.js.map} +1 -1
- package/dist/RadiogroupWidget-emxyymRZ.cjs +2 -0
- package/dist/{RadiogroupWidget-B4lkYWaC.cjs.map → RadiogroupWidget-emxyymRZ.cjs.map} +1 -1
- package/dist/{RangebarWidget-CN0YuHqy.js → RangebarWidget-CG2Y7eYp.js} +3 -3
- package/dist/{RangebarWidget-CN0YuHqy.js.map → RangebarWidget-CG2Y7eYp.js.map} +1 -1
- package/dist/RangebarWidget-CLMKfbiT.cjs +2 -0
- package/dist/{RangebarWidget-nl0rzj93.cjs.map → RangebarWidget-CLMKfbiT.cjs.map} +1 -1
- package/dist/{RedisTab-CVimDkIE.js → RedisTab-CvPLS0Qe.js} +3 -3
- package/dist/{RedisTab-CVimDkIE.js.map → RedisTab-CvPLS0Qe.js.map} +1 -1
- package/dist/RedisTab-PbizvHjY.cjs +2 -0
- package/dist/{RedisTab-DhS4GHDj.cjs.map → RedisTab-PbizvHjY.cjs.map} +1 -1
- package/dist/{RollupWidget-y4jBtJB2.js → RollupWidget-C6HKTfCR.js} +3 -3
- package/dist/{RollupWidget-y4jBtJB2.js.map → RollupWidget-C6HKTfCR.js.map} +1 -1
- package/dist/RollupWidget-CHKUdXMx.cjs +2 -0
- package/dist/{RollupWidget-Bgudi_bt.cjs.map → RollupWidget-CHKUdXMx.cjs.map} +1 -1
- package/dist/RoutersTab-D-ex_yMO.js +85 -0
- package/dist/RoutersTab-D-ex_yMO.js.map +1 -0
- package/dist/RoutersTab-zkaML-Xt.cjs +2 -0
- package/dist/RoutersTab-zkaML-Xt.cjs.map +1 -0
- package/dist/ScriptChooser-Dkf84RzQ.cjs +2 -0
- package/dist/ScriptChooser-Dkf84RzQ.cjs.map +1 -0
- package/dist/ScriptChooser-qiC2xQ_W.js +176 -0
- package/dist/ScriptChooser-qiC2xQ_W.js.map +1 -0
- package/dist/ScrollwindowWidget-CVc9EXW2.cjs +2 -0
- package/dist/{ScrollwindowWidget-BIiV7xwi.cjs.map → ScrollwindowWidget-CVc9EXW2.cjs.map} +1 -1
- package/dist/{ScrollwindowWidget-CBzYk4Y3.js → ScrollwindowWidget-DvhBCYd2.js} +4 -4
- package/dist/{ScrollwindowWidget-CBzYk4Y3.js.map → ScrollwindowWidget-DvhBCYd2.js.map} +1 -1
- package/dist/{SecretsTab-BjviaTxh.js → SecretsTab-CLkJfzf-.js} +39 -49
- package/dist/SecretsTab-CLkJfzf-.js.map +1 -0
- package/dist/SecretsTab-Clw9ErBz.cjs +2 -0
- package/dist/SecretsTab-Clw9ErBz.cjs.map +1 -0
- package/dist/SettingsTab-BJ9mrQ8U.cjs +3 -0
- package/dist/SettingsTab-BJ9mrQ8U.cjs.map +1 -0
- package/dist/{SettingsTab-Bo_dYXgb.js → SettingsTab-CysOMBFu.js} +198 -135
- package/dist/SettingsTab-CysOMBFu.js.map +1 -0
- package/dist/{SignalWidget-DQ5Uc2uV.js → SignalWidget-BZIoGjam.js} +16 -18
- package/dist/SignalWidget-BZIoGjam.js.map +1 -0
- package/dist/SignalWidget-DpNUpQNW.cjs +2 -0
- package/dist/SignalWidget-DpNUpQNW.cjs.map +1 -0
- package/dist/SimpleTextDialog-CGStqYvO.js +97 -0
- package/dist/SimpleTextDialog-CGStqYvO.js.map +1 -0
- package/dist/SimpleTextDialog-P2KPhVHq.cjs +2 -0
- package/dist/SimpleTextDialog-P2KPhVHq.cjs.map +1 -0
- package/dist/SpacerWidget-CHuv4qDR.cjs +2 -0
- package/dist/{SpacerWidget-BBJR6HBQ.cjs.map → SpacerWidget-CHuv4qDR.cjs.map} +1 -1
- package/dist/{SpacerWidget-6rsc_dSM.js → SpacerWidget-YBS8RZIE.js} +3 -3
- package/dist/{SpacerWidget-6rsc_dSM.js.map → SpacerWidget-YBS8RZIE.js.map} +1 -1
- package/dist/{SparklineWidget-CZtvu2ss.js → SparklineWidget-BMhY9vYe.js} +5 -5
- package/dist/{SparklineWidget-CZtvu2ss.js.map → SparklineWidget-BMhY9vYe.js.map} +1 -1
- package/dist/SparklineWidget-qWQGTMwn.cjs +2 -0
- package/dist/{SparklineWidget-BxBLnjAO.cjs.map → SparklineWidget-qWQGTMwn.cjs.map} +1 -1
- package/dist/TabbookWidget-C4jdzkQl.cjs +2 -0
- package/dist/{TabbookWidget-DyFQnA10.cjs.map → TabbookWidget-C4jdzkQl.cjs.map} +1 -1
- package/dist/{TabbookWidget-DNALU0jl.js → TabbookWidget-RfET19pq.js} +3 -3
- package/dist/{TabbookWidget-DNALU0jl.js.map → TabbookWidget-RfET19pq.js.map} +1 -1
- package/dist/TargetsTab-CVZR_Bp6.cjs +2 -0
- package/dist/TargetsTab-CVZR_Bp6.cjs.map +1 -0
- package/dist/TargetsTab-CfBt-dZW.js +117 -0
- package/dist/TargetsTab-CfBt-dZW.js.map +1 -0
- package/dist/TextBoxDialog-C60jmnyN.js +98 -0
- package/dist/TextBoxDialog-C60jmnyN.js.map +1 -0
- package/dist/TextBoxDialog-DWt30tB8.cjs +2 -0
- package/dist/TextBoxDialog-DWt30tB8.cjs.map +1 -0
- package/dist/TextboxWidget-Cm7-yWTZ.cjs +2 -0
- package/dist/{TextboxWidget-D6lW_dsU.cjs.map → TextboxWidget-Cm7-yWTZ.cjs.map} +1 -1
- package/dist/{TextboxWidget-5hqPj74D.js → TextboxWidget-M8vFBSxS.js} +5 -5
- package/dist/{TextboxWidget-5hqPj74D.js.map → TextboxWidget-M8vFBSxS.js.map} +1 -1
- package/dist/TextfieldWidget-Bfk2NPtC.cjs +2 -0
- package/dist/{TextfieldWidget-iHN7-fyF.cjs.map → TextfieldWidget-Bfk2NPtC.cjs.map} +1 -1
- package/dist/{TextfieldWidget-Df0ANSiU.js → TextfieldWidget-Dev7lCsT.js} +3 -3
- package/dist/{TextfieldWidget-Df0ANSiU.js.map → TextfieldWidget-Dev7lCsT.js.map} +1 -1
- package/dist/TimeWidget-BqkZJdg7.cjs +2 -0
- package/dist/{TimeWidget-C3NZqTEG.cjs.map → TimeWidget-BqkZJdg7.cjs.map} +1 -1
- package/dist/{TimeWidget-C6XQMUG2.js → TimeWidget-CQzn13rQ.js} +4 -4
- package/dist/{TimeWidget-C6XQMUG2.js.map → TimeWidget-CQzn13rQ.js.map} +1 -1
- package/dist/{TitleWidget-B9SPUlbW.js → TitleWidget-C4zbSian.js} +3 -3
- package/dist/{TitleWidget-B9SPUlbW.js.map → TitleWidget-C4zbSian.js.map} +1 -1
- package/dist/TitleWidget-DW0hJ0FE.cjs +2 -0
- package/dist/{TitleWidget-CWZs33c4.cjs.map → TitleWidget-DW0hJ0FE.cjs.map} +1 -1
- package/dist/ToolsTab-CKeFb94Y.cjs +7 -0
- package/dist/{ToolsTab-CUpUmkZL.cjs.map → ToolsTab-CKeFb94Y.cjs.map} +1 -1
- package/dist/ToolsTab-CnhhRS3J.js +1501 -0
- package/dist/{ToolsTab-Cgpb2nAW.js.map → ToolsTab-CnhhRS3J.js.map} +1 -1
- package/dist/TopBar-4zZ-wYMY.cjs +2 -0
- package/dist/TopBar-4zZ-wYMY.cjs.map +1 -0
- package/dist/{TopBar-F1jHuFan.js → TopBar-BQhv8Jcc.js} +102 -68
- package/dist/TopBar-BQhv8Jcc.js.map +1 -0
- package/dist/UpgradeToEnterpriseDialog-C0MA3Uc-.cjs +2 -0
- package/dist/UpgradeToEnterpriseDialog-C0MA3Uc-.cjs.map +1 -0
- package/dist/{UpgradeToEnterpriseDialog-DVcAH30Y.js → UpgradeToEnterpriseDialog-c6twungI.js} +27 -27
- package/dist/UpgradeToEnterpriseDialog-c6twungI.js.map +1 -0
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-Bowkx8lp.cjs +1497 -0
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-Bowkx8lp.cjs.map +1 -0
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-CVrrWDJ_.js +30244 -0
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-CVrrWDJ_.js.map +1 -0
- package/dist/{VWidget-C4spAawK.js → VWidget-iASFPjdx.js} +3 -3
- package/dist/{VWidget-C4spAawK.js.map → VWidget-iASFPjdx.js.map} +1 -1
- package/dist/{VWidget-C2x_zSC2.cjs → VWidget-iTwRH6Qq.cjs} +2 -2
- package/dist/{VWidget-C2x_zSC2.cjs.map → VWidget-iTwRH6Qq.cjs.map} +1 -1
- package/dist/{ValueWidget-D4RrYVEK.js → ValueWidget-BVI6uUVX.js} +17 -15
- package/dist/ValueWidget-BVI6uUVX.js.map +1 -0
- package/dist/ValueWidget-CPuSUgn9.cjs +2 -0
- package/dist/ValueWidget-CPuSUgn9.cjs.map +1 -0
- package/dist/{ValuelimitsbarWidget-Bc9_Vj_f.js → ValuelimitsbarWidget-BiIcery0.js} +5 -5
- package/dist/{ValuelimitsbarWidget-Bc9_Vj_f.js.map → ValuelimitsbarWidget-BiIcery0.js.map} +1 -1
- package/dist/ValuelimitsbarWidget-CNdyobcf.cjs +2 -0
- package/dist/{ValuelimitsbarWidget-DJuh7FOs.cjs.map → ValuelimitsbarWidget-CNdyobcf.cjs.map} +1 -1
- package/dist/{ValuelimitscolumnWidget-DHKIL7sf.js → ValuelimitscolumnWidget-BiRI8GbI.js} +5 -5
- package/dist/{ValuelimitscolumnWidget-DHKIL7sf.js.map → ValuelimitscolumnWidget-BiRI8GbI.js.map} +1 -1
- package/dist/ValuelimitscolumnWidget-Db0K4OjQ.cjs +2 -0
- package/dist/{ValuelimitscolumnWidget-BFpG-H7v.cjs.map → ValuelimitscolumnWidget-Db0K4OjQ.cjs.map} +1 -1
- package/dist/{ValuerangebarWidget-CecQRIok.js → ValuerangebarWidget-CtMFQu9-.js} +5 -5
- package/dist/{ValuerangebarWidget-CecQRIok.js.map → ValuerangebarWidget-CtMFQu9-.js.map} +1 -1
- package/dist/ValuerangebarWidget-DAEr-D_E.cjs +2 -0
- package/dist/{ValuerangebarWidget-BlZSaiXo.cjs.map → ValuerangebarWidget-DAEr-D_E.cjs.map} +1 -1
- package/dist/{VerticalWidget-D8jUFxjS.js → VerticalWidget-CRmcpQBn.js} +3 -3
- package/dist/{VerticalWidget-D8jUFxjS.js.map → VerticalWidget-CRmcpQBn.js.map} +1 -1
- package/dist/VerticalWidget-YG3auPJa.cjs +2 -0
- package/dist/{VerticalWidget--8UErB4q.cjs.map → VerticalWidget-YG3auPJa.cjs.map} +1 -1
- package/dist/VerticalboxWidget-C-qChjug.js +46 -0
- package/dist/VerticalboxWidget-C-qChjug.js.map +1 -0
- package/dist/VerticalboxWidget-DX8-gFay.cjs +2 -0
- package/dist/VerticalboxWidget-DX8-gFay.cjs.map +1 -0
- package/dist/{Widget-fRCERxGf.js → Widget-CFEnOKms.js} +19 -19
- package/dist/Widget-CFEnOKms.js.map +1 -0
- package/dist/Widget-EsyLQi_8.cjs +2 -0
- package/dist/Widget-EsyLQi_8.cjs.map +1 -0
- package/dist/components.cjs +3 -6
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +402 -2029
- package/dist/components.js.map +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +59 -52
- package/dist/icons.js.map +1 -1
- package/dist/index-DcL65Mqb.cjs +7 -0
- package/dist/index-DcL65Mqb.cjs.map +1 -0
- package/dist/{index-CFQnWdPA.js → index-qCq0L4jN.js} +404 -406
- package/dist/index-qCq0L4jN.js.map +1 -0
- package/dist/plugins.cjs +4 -4
- package/dist/plugins.cjs.map +1 -1
- package/dist/plugins.js +86 -77
- package/dist/plugins.js.map +1 -1
- package/dist/{timeFilters-CRYpYDdf.js → timeFilters-BKnCM4rv.js} +139 -136
- package/dist/{timeFilters-CRYpYDdf.js.map → timeFilters-BKnCM4rv.js.map} +1 -1
- package/dist/timeFilters-CJFxfjqN.cjs +2 -0
- package/dist/{timeFilters-8SaYvcH0.cjs.map → timeFilters-CJFxfjqN.cjs.map} +1 -1
- package/dist/tools/admin.cjs +10 -10
- package/dist/tools/admin.cjs.map +1 -1
- package/dist/tools/admin.js +790 -736
- package/dist/tools/admin.js.map +1 -1
- package/dist/tools/base.cjs +1 -1
- package/dist/tools/base.cjs.map +1 -1
- package/dist/tools/base.js +217 -226
- package/dist/tools/base.js.map +1 -1
- package/dist/tools/calendar.cjs +1 -1
- package/dist/tools/calendar.cjs.map +1 -1
- package/dist/tools/calendar.js +9 -1583
- package/dist/tools/calendar.js.map +1 -1
- package/dist/tools/scriptrunner.cjs +85 -0
- package/dist/tools/scriptrunner.cjs.map +1 -0
- package/dist/tools/scriptrunner.js +4574 -0
- package/dist/tools/scriptrunner.js.map +1 -0
- package/dist/util.cjs +1 -1
- package/dist/util.js +1 -1
- package/dist/vue-common.css +1 -1
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +64 -64
- package/package.json +20 -15
- package/dist/ArrayplotWidget-Donxhd8_.cjs +0 -2
- package/dist/BlockWidget-DPLN1jgj.cjs +0 -3
- package/dist/ButtonWidget-DccYzIY3.cjs +0 -3
- package/dist/CanvasWidget-BzTU9rc9.cjs +0 -2
- package/dist/CanvasdotWidget-B7VTS1QI.cjs +0 -2
- package/dist/CanvasimageWidget-BwYpfmDE.cjs +0 -2
- package/dist/CanvasimagevalueWidget-E_NsZ82T.cjs +0 -2
- package/dist/CanvaslabelWidget-BBDuXWfU.cjs +0 -2
- package/dist/CanvaslabelvalueWidget-DAdu7ujn.cjs +0 -2
- package/dist/CanvaslineWidget-Bv5da1Vy.cjs +0 -2
- package/dist/CanvaslinevalueWidget-BVfUB96K.cjs +0 -2
- package/dist/CheckbuttonWidget-BGqD-BGc.cjs +0 -2
- package/dist/ComboboxWidget-DoHMlSAr.cjs +0 -2
- package/dist/CosmosRuxIcon.vue_vue_type_style_index_0_scoped_9af48e85_lang-BHFhmbuH.cjs +0 -2
- package/dist/CosmosRuxIcon.vue_vue_type_style_index_0_scoped_9af48e85_lang-BHFhmbuH.cjs.map +0 -1
- package/dist/CosmosRuxIcon.vue_vue_type_style_index_0_scoped_9af48e85_lang-CHgC5LLL.js +0 -10
- package/dist/CosmosRuxIcon.vue_vue_type_style_index_0_scoped_9af48e85_lang-CHgC5LLL.js.map +0 -1
- package/dist/CriticalCmdDialog-DLEasFsx.js.map +0 -1
- package/dist/CriticalCmdDialog-DoLBrU2k.cjs +0 -2
- package/dist/CriticalCmdDialog-DoLBrU2k.cjs.map +0 -1
- package/dist/DateWidget-DKZz1J9J.cjs +0 -2
- package/dist/DetailsDialog-BvbziA7Y.js.map +0 -1
- package/dist/DetailsDialog-CiuQYvJK.cjs +0 -2
- package/dist/DetailsDialog-CiuQYvJK.cjs.map +0 -1
- package/dist/DynamicWidget-3wHr6Ng-.cjs +0 -2
- package/dist/FormatvalueWidget-CGpnTqVH.js +0 -44
- package/dist/FormatvalueWidget-CGpnTqVH.js.map +0 -1
- package/dist/FormatvalueWidget-DFrbeKb9.cjs +0 -2
- package/dist/FormatvalueWidget-DFrbeKb9.cjs.map +0 -1
- package/dist/Graph-3rkhFP3G.js.map +0 -1
- package/dist/Graph-C3vGMcos.cjs +0 -2
- package/dist/Graph-C3vGMcos.cjs.map +0 -1
- package/dist/HorizontalWidget-BBeB0eBI.cjs +0 -2
- package/dist/HorizontalboxWidget-Br8dSVHD.js +0 -38
- package/dist/HorizontalboxWidget-Br8dSVHD.js.map +0 -1
- package/dist/HorizontalboxWidget-DsdzrCJx.cjs +0 -2
- package/dist/HorizontalboxWidget-DsdzrCJx.cjs.map +0 -1
- package/dist/HorizontallineWidget-BCKOQase.cjs +0 -2
- package/dist/HorizontallineWidget-CbxREBYI.js +0 -11
- package/dist/IframeWidget-CZwsTgvX.cjs +0 -2
- package/dist/ImageviewerWidget-DwRPFSLR.cjs +0 -2
- package/dist/InterfacesTab-CLaicsHA.cjs +0 -2
- package/dist/InterfacesTab-CLaicsHA.cjs.map +0 -1
- package/dist/InterfacesTab-DAeNlGlB.js +0 -93
- package/dist/InterfacesTab-DAeNlGlB.js.map +0 -1
- package/dist/LabelWidget-C-s8OVmA.cjs +0 -2
- package/dist/LabelWidget-C-s8OVmA.cjs.map +0 -1
- package/dist/LabelWidget-t7I87dp7.js.map +0 -1
- package/dist/LabelledWidget-DUpHxc9z.cjs +0 -2
- package/dist/LabelprogressbarWidget-D6cpayCR.cjs +0 -2
- package/dist/LabelsparklineWidget-CJRnLETe.cjs +0 -2
- package/dist/LabelvalueWidget-owiMSCYl.cjs +0 -2
- package/dist/LabelvaluedescWidget-MRmZBUc0.cjs +0 -2
- package/dist/LabelvaluelimitsbarWidget-BQ2XYPNE.cjs +0 -2
- package/dist/LabelvaluelimitscolumnWidget-DNmVpU8J.cjs +0 -2
- package/dist/LabelvaluerangebarWidget-DL0U8cbw.cjs +0 -2
- package/dist/Layout-DRL0EeSA.cjs +0 -2
- package/dist/LedWidget-B8rjFe1b.cjs +0 -2
- package/dist/LedWidget-B8rjFe1b.cjs.map +0 -1
- package/dist/LedWidget-CxJjJBBS.js +0 -71
- package/dist/LedWidget-CxJjJBBS.js.map +0 -1
- package/dist/LimitsbarWidget-CYIH8fdp.cjs +0 -2
- package/dist/LimitsbarWidget-CYIH8fdp.cjs.map +0 -1
- package/dist/LimitsbarWidget-Djui0IpK.js.map +0 -1
- package/dist/LimitscolorWidget-CS0wpX9A.cjs +0 -2
- package/dist/LimitscolumnWidget-C_UW6xKq.cjs +0 -2
- package/dist/LinegraphWidget-8td_PqgU.cjs +0 -2
- package/dist/MatrixbycolumnsWidget-CGOeCNW2.cjs +0 -2
- package/dist/MicroservicesTab-IbTmbPxO.js +0 -268
- package/dist/MicroservicesTab-IbTmbPxO.js.map +0 -1
- package/dist/MicroservicesTab-uMC8NebS.cjs +0 -2
- package/dist/MicroservicesTab-uMC8NebS.cjs.map +0 -1
- package/dist/OutputDialog-B4Q0QMJ1.cjs +0 -2
- package/dist/OutputDialog-B4Q0QMJ1.cjs.map +0 -1
- package/dist/OutputDialog-Ci5OT_fH.js.map +0 -1
- package/dist/PackagesTab-BX8YP3H1.js +0 -332
- package/dist/PackagesTab-BX8YP3H1.js.map +0 -1
- package/dist/PackagesTab-eYbk2vw7.cjs +0 -2
- package/dist/PackagesTab-eYbk2vw7.cjs.map +0 -1
- package/dist/PluginsTab-Ck3DvEGm.cjs +0 -6
- package/dist/PluginsTab-Ck3DvEGm.cjs.map +0 -1
- package/dist/PluginsTab-Ds3jk64b.js.map +0 -1
- package/dist/ProgressbarWidget-CUIAYySg.cjs +0 -2
- package/dist/RadiobuttonWidget-Cjk1JAP_.cjs +0 -2
- package/dist/RadiogroupWidget-B4lkYWaC.cjs +0 -2
- package/dist/RangebarWidget-nl0rzj93.cjs +0 -2
- package/dist/RedisTab-DhS4GHDj.cjs +0 -2
- package/dist/RollupWidget-Bgudi_bt.cjs +0 -2
- package/dist/RoutersTab-CzO10cVP.cjs +0 -2
- package/dist/RoutersTab-CzO10cVP.cjs.map +0 -1
- package/dist/RoutersTab-Dki_66av.js +0 -95
- package/dist/RoutersTab-Dki_66av.js.map +0 -1
- package/dist/ScriptChooser-BNm_zXxX.cjs +0 -2
- package/dist/ScriptChooser-BNm_zXxX.cjs.map +0 -1
- package/dist/ScriptChooser-l5i8c8KP.js +0 -199
- package/dist/ScriptChooser-l5i8c8KP.js.map +0 -1
- package/dist/ScrollwindowWidget-BIiV7xwi.cjs +0 -2
- package/dist/SecretsTab-BSzFZ81X.cjs +0 -2
- package/dist/SecretsTab-BSzFZ81X.cjs.map +0 -1
- package/dist/SecretsTab-BjviaTxh.js.map +0 -1
- package/dist/SettingsTab-Bo_dYXgb.js.map +0 -1
- package/dist/SettingsTab-DH8LAAoG.cjs +0 -3
- package/dist/SettingsTab-DH8LAAoG.cjs.map +0 -1
- package/dist/SignalWidget-CvZkvejy.cjs +0 -2
- package/dist/SignalWidget-CvZkvejy.cjs.map +0 -1
- package/dist/SignalWidget-DQ5Uc2uV.js.map +0 -1
- package/dist/SimpleTextDialog-CheuP_ls.js +0 -108
- package/dist/SimpleTextDialog-CheuP_ls.js.map +0 -1
- package/dist/SimpleTextDialog-DmeNMMCR.cjs +0 -2
- package/dist/SimpleTextDialog-DmeNMMCR.cjs.map +0 -1
- package/dist/SpacerWidget-BBJR6HBQ.cjs +0 -2
- package/dist/SparklineWidget-BxBLnjAO.cjs +0 -2
- package/dist/TabbookWidget-DyFQnA10.cjs +0 -2
- package/dist/TargetsTab-Cd8U1aN_.js +0 -129
- package/dist/TargetsTab-Cd8U1aN_.js.map +0 -1
- package/dist/TargetsTab-DMiOliqg.cjs +0 -2
- package/dist/TargetsTab-DMiOliqg.cjs.map +0 -1
- package/dist/TextBoxDialog-DvUf3Cak.cjs +0 -2
- package/dist/TextBoxDialog-DvUf3Cak.cjs.map +0 -1
- package/dist/TextBoxDialog-fHkDTtzI.js +0 -110
- package/dist/TextBoxDialog-fHkDTtzI.js.map +0 -1
- package/dist/TextboxWidget-D6lW_dsU.cjs +0 -2
- package/dist/TextfieldWidget-iHN7-fyF.cjs +0 -2
- package/dist/TimeWidget-C3NZqTEG.cjs +0 -2
- package/dist/TitleWidget-CWZs33c4.cjs +0 -2
- package/dist/ToolsTab-CUpUmkZL.cjs +0 -7
- package/dist/ToolsTab-Cgpb2nAW.js +0 -1521
- package/dist/TopBar-DuXL27iD.cjs +0 -2
- package/dist/TopBar-DuXL27iD.cjs.map +0 -1
- package/dist/TopBar-F1jHuFan.js.map +0 -1
- package/dist/UpgradeToEnterpriseDialog-DVcAH30Y.js.map +0 -1
- package/dist/UpgradeToEnterpriseDialog-DfIKahNK.cjs +0 -2
- package/dist/UpgradeToEnterpriseDialog-DfIKahNK.cjs.map +0 -1
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_6fa47877_lang-DJX55UPj.cjs +0 -1417
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_6fa47877_lang-DJX55UPj.cjs.map +0 -1
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_6fa47877_lang-iq-jp8dD.js +0 -26941
- package/dist/UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_6fa47877_lang-iq-jp8dD.js.map +0 -1
- package/dist/ValueWidget-D4RrYVEK.js.map +0 -1
- package/dist/ValueWidget-Do3Yn47P.cjs +0 -2
- package/dist/ValueWidget-Do3Yn47P.cjs.map +0 -1
- package/dist/ValuelimitsbarWidget-DJuh7FOs.cjs +0 -2
- package/dist/ValuelimitscolumnWidget-BFpG-H7v.cjs +0 -2
- package/dist/ValuerangebarWidget-BlZSaiXo.cjs +0 -2
- package/dist/VerticalWidget--8UErB4q.cjs +0 -2
- package/dist/VerticalboxWidget-B4eGUSYH.js +0 -37
- package/dist/VerticalboxWidget-B4eGUSYH.js.map +0 -1
- package/dist/VerticalboxWidget-cxHq1WKQ.cjs +0 -2
- package/dist/VerticalboxWidget-cxHq1WKQ.cjs.map +0 -1
- package/dist/Widget-DNf52jRQ.cjs +0 -2
- package/dist/Widget-DNf52jRQ.cjs.map +0 -1
- package/dist/Widget-fRCERxGf.js.map +0 -1
- package/dist/index-Bz_jHTkl.cjs +0 -7
- package/dist/index-Bz_jHTkl.cjs.map +0 -1
- package/dist/index-CFQnWdPA.js.map +0 -1
- package/dist/timeFilters-8SaYvcH0.cjs +0 -2
|
@@ -0,0 +1,4574 @@
|
|
|
1
|
+
var et = Object.defineProperty;
|
|
2
|
+
var Ge = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var tt = (t, e, s) => e in t ? et(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
+
var ze = (t, e, s) => tt(t, typeof e != "symbol" ? e + "" : e, s), qe = (t, e, s) => e.has(t) || Ge("Cannot " + s);
|
|
7
|
+
var B = (t, e, s) => (qe(t, e, "read from private field"), s ? s.call(t) : e.get(t)), q = (t, e, s) => e.has(t) ? Ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), X = (t, e, s, a) => (qe(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
|
|
8
|
+
import { l as O, p as Se, d as it } from "../UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-CVrrWDJ_.js";
|
|
9
|
+
import { resolveComponent as u, createElementBlock as P, openBlock as y, createVNode as o, createBlock as I, createCommentVNode as D, withCtx as r, createTextVNode as k, createElementVNode as S, withDirectives as st, vShow as nt, toDisplayString as z, normalizeClass as Ye, inject as Q, getCurrentInstance as ot, computed as K, ref as ie, watch as be, onMounted as Ze, onBeforeUnmount as Xe, normalizeStyle as lt, unref as rt, renderSlot as at, useSlots as ut, provide as J, resolveDynamicComponent as dt, nextTick as Ae, h as ct, withModifiers as ne, Fragment as se, renderList as Le, normalizeProps as $, guardReactiveProps as ee, mergeProps as te } from "vue";
|
|
10
|
+
import { _ as G } from "../CustomIcon-h5X7369N.js";
|
|
11
|
+
import { T as pt } from "../timeFilters-BKnCM4rv.js";
|
|
12
|
+
import "single-spa";
|
|
13
|
+
import { O as mt, A as ht } from "../OutputDialog-B5qHVyck.js";
|
|
14
|
+
import { f as we } from "../format-CVeawcIv.js";
|
|
15
|
+
import { a as ft } from "../index-qCq0L4jN.js";
|
|
16
|
+
import { T as gt, A as je } from "../TopBar-BQhv8Jcc.js";
|
|
17
|
+
import { C as vt } from "../CriticalCmdDialog-Bcq8PGag.js";
|
|
18
|
+
import { a as _t, O as bt, F as wt } from "../Openc3Screen-CtwGKfq-.js";
|
|
19
|
+
import { f as yt } from "../fileIcon-DqRHb1_Z.js";
|
|
20
|
+
import { S as kt } from "../SimpleTextDialog-CGStqYvO.js";
|
|
21
|
+
import { E as St } from "../EventListDialog-Bniar26O.js";
|
|
22
|
+
import { E as xt } from "../ScriptChooser-qiC2xQ_W.js";
|
|
23
|
+
const Ct = {
|
|
24
|
+
components: { OutputDialog: mt },
|
|
25
|
+
mixins: [pt],
|
|
26
|
+
props: {
|
|
27
|
+
tabId: Number,
|
|
28
|
+
curTab: Number,
|
|
29
|
+
connectInNewTab: Boolean
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
api: null,
|
|
34
|
+
timeZone: "local",
|
|
35
|
+
activeTab: "running",
|
|
36
|
+
downloadScript: null,
|
|
37
|
+
refreshTimer: null,
|
|
38
|
+
// Running scripts pagination data
|
|
39
|
+
runningSearch: "",
|
|
40
|
+
runningScripts: [],
|
|
41
|
+
runningTotal: 0,
|
|
42
|
+
runningLoading: !1,
|
|
43
|
+
runningPage: 1,
|
|
44
|
+
runningItemsPerPage: 10,
|
|
45
|
+
runningHeaders: [
|
|
46
|
+
{
|
|
47
|
+
title: "Connect",
|
|
48
|
+
key: "connect",
|
|
49
|
+
sortable: !1,
|
|
50
|
+
filterable: !1
|
|
51
|
+
},
|
|
52
|
+
{ title: "Id", key: "name" },
|
|
53
|
+
{ title: "User", key: "user_display" },
|
|
54
|
+
{ title: "Filename", key: "filename" },
|
|
55
|
+
{ title: "Start Time", key: "start_time_formatted" },
|
|
56
|
+
{ title: "Duration", key: "duration" },
|
|
57
|
+
{ title: "State", key: "state" },
|
|
58
|
+
{
|
|
59
|
+
title: "Stop",
|
|
60
|
+
key: "stop",
|
|
61
|
+
sortable: !1,
|
|
62
|
+
filterable: !1
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
// Completed scripts pagination data
|
|
66
|
+
completedSearch: "",
|
|
67
|
+
completedScripts: [],
|
|
68
|
+
completedTotal: 0,
|
|
69
|
+
completedLoading: !1,
|
|
70
|
+
completedPage: 1,
|
|
71
|
+
completedItemsPerPage: 10,
|
|
72
|
+
completedHeaders: [
|
|
73
|
+
{ title: "Id", key: "name" },
|
|
74
|
+
{ title: "User", key: "user_display" },
|
|
75
|
+
{ title: "Filename", key: "filename" },
|
|
76
|
+
{ title: "Start Time", key: "start_time_formatted" },
|
|
77
|
+
{ title: "Duration", key: "duration" },
|
|
78
|
+
{ title: "State", key: "state" },
|
|
79
|
+
{
|
|
80
|
+
title: "Log",
|
|
81
|
+
key: "log",
|
|
82
|
+
sortable: !1,
|
|
83
|
+
filterable: !1
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: "Report",
|
|
87
|
+
key: "report",
|
|
88
|
+
sortable: !1,
|
|
89
|
+
filterable: !1
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
showDialog: !1,
|
|
93
|
+
dialogName: "",
|
|
94
|
+
dialogContent: "",
|
|
95
|
+
dialogFilename: ""
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
watch: {
|
|
99
|
+
activeTab(t) {
|
|
100
|
+
t === "running" ? this.getRunningScripts() : t === "completed" && this.getCompletedScripts();
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
created() {
|
|
104
|
+
this.api = new Se(), this.api.get_setting("time_zone").then((t) => {
|
|
105
|
+
t && (this.timeZone = t);
|
|
106
|
+
}).catch((t) => {
|
|
107
|
+
}), this.getRunningScripts(), this.getCompletedScripts(), this.refreshTimer = setInterval(() => {
|
|
108
|
+
this.activeTab === "running" && this.getRunningScripts();
|
|
109
|
+
}, 5e3);
|
|
110
|
+
},
|
|
111
|
+
beforeUnmount() {
|
|
112
|
+
this.refreshTimer && clearInterval(this.refreshTimer);
|
|
113
|
+
},
|
|
114
|
+
methods: {
|
|
115
|
+
getRunningScripts: function() {
|
|
116
|
+
this.runningLoading = !0;
|
|
117
|
+
const t = (this.runningPage - 1) * this.runningItemsPerPage;
|
|
118
|
+
O.get(
|
|
119
|
+
`/script-api/running-script?scope=DEFAULT&offset=${t}&limit=${this.runningItemsPerPage}`
|
|
120
|
+
).then((e) => {
|
|
121
|
+
const s = e.data.items || [], a = /* @__PURE__ */ new Date();
|
|
122
|
+
s.forEach((i) => {
|
|
123
|
+
if (i.user_display = `${i.user_full_name} (${i.username})`, i.start_time) {
|
|
124
|
+
const n = new Date(i.start_time), d = a - n;
|
|
125
|
+
if (i.start_time_formatted = this.formatDateTimeHMS(
|
|
126
|
+
n,
|
|
127
|
+
this.timeZone
|
|
128
|
+
), d < 0)
|
|
129
|
+
i.duration = "N/A";
|
|
130
|
+
else if (d < 1e3)
|
|
131
|
+
i.duration = "< 1s";
|
|
132
|
+
else if (d < 6e4)
|
|
133
|
+
i.duration = `${Math.round(d / 1e3)}s`;
|
|
134
|
+
else if (d < 36e5) {
|
|
135
|
+
const h = Math.floor(d / 6e4), c = Math.round(d % 6e4 / 1e3);
|
|
136
|
+
i.duration = `${h}m ${c}s`;
|
|
137
|
+
} else {
|
|
138
|
+
const h = Math.floor(d / 36e5), c = Math.floor(d % 36e5 / 6e4), v = Math.round(d % 6e4 / 1e3);
|
|
139
|
+
i.duration = `${h}h ${c}m ${v}s`;
|
|
140
|
+
}
|
|
141
|
+
} else
|
|
142
|
+
i.duration = "N/A";
|
|
143
|
+
}), this.runningScripts = s, this.runningTotal = e.data.total || s.length, this.runningLoading = !1;
|
|
144
|
+
}).catch((e) => {
|
|
145
|
+
this.runningLoading = !1, this.$notify.caution({
|
|
146
|
+
title: "Error Loading Running Scripts",
|
|
147
|
+
body: e.message
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
updateRunningPage: function(t) {
|
|
152
|
+
this.runningPage = t, this.getRunningScripts();
|
|
153
|
+
},
|
|
154
|
+
updateRunningItemsPerPage: function(t) {
|
|
155
|
+
this.runningItemsPerPage = t, this.runningPage = 1, this.getRunningScripts();
|
|
156
|
+
},
|
|
157
|
+
getCompletedScripts: function() {
|
|
158
|
+
this.completedLoading = !0;
|
|
159
|
+
const t = (this.completedPage - 1) * this.completedItemsPerPage;
|
|
160
|
+
O.get(
|
|
161
|
+
`/script-api/completed-scripts?scope=DEFAULT&offset=${t}&limit=${this.completedItemsPerPage}`
|
|
162
|
+
).then((e) => {
|
|
163
|
+
const s = e.data.items || [];
|
|
164
|
+
s.forEach((a) => {
|
|
165
|
+
if (a.user_display = `${a.user_full_name} (${a.username})`, a.start_time && a.end_time) {
|
|
166
|
+
const i = new Date(a.start_time), d = new Date(a.end_time) - i;
|
|
167
|
+
if (a.start_time_formatted = this.formatDateTimeHMS(
|
|
168
|
+
i,
|
|
169
|
+
this.timeZone
|
|
170
|
+
), d < 0)
|
|
171
|
+
a.duration = "N/A";
|
|
172
|
+
else if (d < 1e3)
|
|
173
|
+
a.duration = "< 1s";
|
|
174
|
+
else if (d < 6e4)
|
|
175
|
+
a.duration = `${Math.round(d / 1e3)}s`;
|
|
176
|
+
else if (d < 36e5) {
|
|
177
|
+
const h = Math.floor(d / 6e4), c = Math.round(d % 6e4 / 1e3);
|
|
178
|
+
a.duration = `${h}m ${c}s`;
|
|
179
|
+
} else {
|
|
180
|
+
const h = Math.floor(d / 36e5), c = Math.floor(d % 36e5 / 6e4), v = Math.round(d % 6e4 / 1e3);
|
|
181
|
+
a.duration = `${h}h ${c}m ${v}s`;
|
|
182
|
+
}
|
|
183
|
+
} else
|
|
184
|
+
a.duration = "N/A";
|
|
185
|
+
}), this.completedScripts = s, this.completedTotal = e.data.total || s.length, this.completedLoading = !1;
|
|
186
|
+
}).catch((e) => {
|
|
187
|
+
this.completedLoading = !1, this.$notify.caution({
|
|
188
|
+
title: "Error Loading Completed Scripts",
|
|
189
|
+
body: e.message
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
},
|
|
193
|
+
updateCompletedPage: function(t) {
|
|
194
|
+
this.completedPage = t, this.getCompletedScripts();
|
|
195
|
+
},
|
|
196
|
+
updateCompletedItemsPerPage: function(t) {
|
|
197
|
+
this.completedItemsPerPage = t, this.completedPage = 1, this.getCompletedScripts();
|
|
198
|
+
},
|
|
199
|
+
showScript: function(t) {
|
|
200
|
+
this.dialogContent = JSON.stringify(t, null, 2), this.dialogName = "Script: " + t.name, this.dialogFilename = "", this.showDialog = !0;
|
|
201
|
+
},
|
|
202
|
+
connectScript: function(t) {
|
|
203
|
+
this.$emit("disconnect");
|
|
204
|
+
const e = {
|
|
205
|
+
name: "ScriptRunner",
|
|
206
|
+
params: { id: t.name }
|
|
207
|
+
};
|
|
208
|
+
if (this.connectInNewTab) {
|
|
209
|
+
let { href: s } = this.$router.resolve(e);
|
|
210
|
+
window.open(s, "_blank");
|
|
211
|
+
} else
|
|
212
|
+
this.$router.push(e), this.$emit("close");
|
|
213
|
+
},
|
|
214
|
+
deleteScript: function(t) {
|
|
215
|
+
this.$dialog.confirm(
|
|
216
|
+
`Are you sure you want to stop script: ${t.name} ${t.filename}?
|
|
217
|
+
`,
|
|
218
|
+
{
|
|
219
|
+
okText: "Stop",
|
|
220
|
+
cancelText: "Cancel"
|
|
221
|
+
}
|
|
222
|
+
).then((e) => O.post(`/script-api/running-script/${t.name}/delete`)).then((e) => {
|
|
223
|
+
this.$notify.normal({
|
|
224
|
+
body: `Stopped script: ${t.name} ${t.filename}`
|
|
225
|
+
}), this.getRunningScripts();
|
|
226
|
+
}).catch((e) => {
|
|
227
|
+
e !== !0 && this.$notify.caution({
|
|
228
|
+
body: `Failed to stop script: ${t.name} ${t.filename}`
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
viewScriptLog: function(t, e) {
|
|
233
|
+
let s = null;
|
|
234
|
+
e === "report" ? (this.dialogName = "Report", s = t.report) : (this.dialogName = "Log", s = t.log), O.get(
|
|
235
|
+
`/openc3-api/storage/download_file/${encodeURIComponent(
|
|
236
|
+
s
|
|
237
|
+
)}?bucket=OPENC3_LOGS_BUCKET`
|
|
238
|
+
).then((a) => {
|
|
239
|
+
const i = s.split("/");
|
|
240
|
+
this.dialogFilename = i[i.length - 1], this.dialogContent = window.atob(a.data.contents), this.showDialog = !0;
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
downloadScriptLog: function(t, e) {
|
|
244
|
+
let s = null;
|
|
245
|
+
e === "report" ? (this.dialogName = "Report", s = t.report) : (this.dialogName = "Log", s = t.log), this.downloadScript = t, O.get(
|
|
246
|
+
`/openc3-api/storage/download/${encodeURIComponent(
|
|
247
|
+
s
|
|
248
|
+
)}?bucket=OPENC3_LOGS_BUCKET`
|
|
249
|
+
).then((a) => {
|
|
250
|
+
const i = s.split("/"), n = i[i.length - 1], d = document.createElement("a");
|
|
251
|
+
d.href = a.data.url, d.setAttribute("download", n), d.click(), this.downloadScript = null;
|
|
252
|
+
}).catch(() => {
|
|
253
|
+
this.$notify.caution({
|
|
254
|
+
title: `Unable to download log ${s}`,
|
|
255
|
+
body: `You may be able to download this log manually from the 'logs' bucket at ${s}`
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}, Vt = { key: 0 }, Rt = { key: 1 };
|
|
261
|
+
function Ot(t, e, s, a, i, n) {
|
|
262
|
+
const d = u("v-tab"), h = u("v-tabs"), c = u("v-spacer"), v = u("v-btn"), w = u("v-text-field"), x = u("v-row"), b = u("v-card-title"), R = u("v-icon"), C = u("v-data-table-server"), M = u("v-window-item"), _ = u("v-window"), U = u("v-card"), N = u("output-dialog");
|
|
263
|
+
return y(), P("div", null, [
|
|
264
|
+
o(U, {
|
|
265
|
+
flat: "",
|
|
266
|
+
class: "tab-card"
|
|
267
|
+
}, {
|
|
268
|
+
default: r(() => [
|
|
269
|
+
o(h, {
|
|
270
|
+
modelValue: i.activeTab,
|
|
271
|
+
"onUpdate:modelValue": e[0] || (e[0] = (E) => i.activeTab = E),
|
|
272
|
+
"bg-color": "var(--color-background-base-default)"
|
|
273
|
+
}, {
|
|
274
|
+
default: r(() => [
|
|
275
|
+
o(d, { value: "running" }, {
|
|
276
|
+
default: r(() => e[6] || (e[6] = [
|
|
277
|
+
k("Running Scripts")
|
|
278
|
+
])),
|
|
279
|
+
_: 1
|
|
280
|
+
}),
|
|
281
|
+
o(d, { value: "completed" }, {
|
|
282
|
+
default: r(() => e[7] || (e[7] = [
|
|
283
|
+
k("Completed Scripts")
|
|
284
|
+
])),
|
|
285
|
+
_: 1
|
|
286
|
+
})
|
|
287
|
+
]),
|
|
288
|
+
_: 1
|
|
289
|
+
}, 8, ["modelValue"]),
|
|
290
|
+
o(_, {
|
|
291
|
+
modelValue: i.activeTab,
|
|
292
|
+
"onUpdate:modelValue": e[3] || (e[3] = (E) => i.activeTab = E)
|
|
293
|
+
}, {
|
|
294
|
+
default: r(() => [
|
|
295
|
+
o(M, { value: "running" }, {
|
|
296
|
+
default: r(() => [
|
|
297
|
+
o(b, null, {
|
|
298
|
+
default: r(() => [
|
|
299
|
+
o(x, { dense: "" }, {
|
|
300
|
+
default: r(() => [
|
|
301
|
+
o(c),
|
|
302
|
+
o(v, {
|
|
303
|
+
class: "mr-3",
|
|
304
|
+
color: "primary",
|
|
305
|
+
onClick: n.getRunningScripts
|
|
306
|
+
}, {
|
|
307
|
+
default: r(() => e[8] || (e[8] = [
|
|
308
|
+
k("Refresh")
|
|
309
|
+
])),
|
|
310
|
+
_: 1
|
|
311
|
+
}, 8, ["onClick"]),
|
|
312
|
+
o(w, {
|
|
313
|
+
modelValue: i.runningSearch,
|
|
314
|
+
"onUpdate:modelValue": e[1] || (e[1] = (E) => i.runningSearch = E),
|
|
315
|
+
class: "pt-0 search",
|
|
316
|
+
label: "Search",
|
|
317
|
+
"prepend-inner-icon": "mdi-magnify",
|
|
318
|
+
clearable: "",
|
|
319
|
+
variant: "outlined",
|
|
320
|
+
density: "compact",
|
|
321
|
+
"single-line": "",
|
|
322
|
+
"hide-details": "",
|
|
323
|
+
"data-test": "running-search",
|
|
324
|
+
style: { "max-width": "300px" }
|
|
325
|
+
}, null, 8, ["modelValue"])
|
|
326
|
+
]),
|
|
327
|
+
_: 1
|
|
328
|
+
})
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
}),
|
|
332
|
+
o(C, {
|
|
333
|
+
headers: i.runningHeaders,
|
|
334
|
+
items: i.runningScripts,
|
|
335
|
+
"items-length": i.runningTotal,
|
|
336
|
+
loading: i.runningLoading,
|
|
337
|
+
search: i.runningSearch,
|
|
338
|
+
density: "compact",
|
|
339
|
+
"data-test": "running-scripts",
|
|
340
|
+
"items-per-page": i.runningItemsPerPage,
|
|
341
|
+
page: i.runningPage,
|
|
342
|
+
"items-per-page-options": [10, 25, 50],
|
|
343
|
+
class: "script-table",
|
|
344
|
+
"onUpdate:page": n.updateRunningPage,
|
|
345
|
+
"onUpdate:itemsPerPage": n.updateRunningItemsPerPage
|
|
346
|
+
}, {
|
|
347
|
+
"item.name": r(({ item: E }) => [
|
|
348
|
+
o(v, {
|
|
349
|
+
color: "primary",
|
|
350
|
+
density: "comfortable",
|
|
351
|
+
onClick: (A) => n.showScript(E)
|
|
352
|
+
}, {
|
|
353
|
+
default: r(() => [
|
|
354
|
+
k(z(E.name), 1)
|
|
355
|
+
]),
|
|
356
|
+
_: 2
|
|
357
|
+
}, 1032, ["onClick"])
|
|
358
|
+
]),
|
|
359
|
+
"item.connect": r(({ item: E }) => [
|
|
360
|
+
o(v, {
|
|
361
|
+
color: "primary",
|
|
362
|
+
onClick: (A) => n.connectScript(E)
|
|
363
|
+
}, {
|
|
364
|
+
default: r(() => [
|
|
365
|
+
e[10] || (e[10] = S("span", null, "Connect", -1)),
|
|
366
|
+
st(o(R, { end: "" }, {
|
|
367
|
+
default: r(() => e[9] || (e[9] = [
|
|
368
|
+
k(" mdi-open-in-new ")
|
|
369
|
+
])),
|
|
370
|
+
_: 1
|
|
371
|
+
}, 512), [
|
|
372
|
+
[nt, s.connectInNewTab]
|
|
373
|
+
])
|
|
374
|
+
]),
|
|
375
|
+
_: 2
|
|
376
|
+
}, 1032, ["onClick"])
|
|
377
|
+
]),
|
|
378
|
+
"item.stop": r(({ item: E }) => [
|
|
379
|
+
o(v, {
|
|
380
|
+
color: "primary",
|
|
381
|
+
onClick: (A) => n.deleteScript(E)
|
|
382
|
+
}, {
|
|
383
|
+
default: r(() => [
|
|
384
|
+
e[12] || (e[12] = S("span", null, "Stop", -1)),
|
|
385
|
+
o(R, { end: "" }, {
|
|
386
|
+
default: r(() => e[11] || (e[11] = [
|
|
387
|
+
k(" mdi-close-circle-outline ")
|
|
388
|
+
])),
|
|
389
|
+
_: 1
|
|
390
|
+
})
|
|
391
|
+
]),
|
|
392
|
+
_: 2
|
|
393
|
+
}, 1032, ["onClick"])
|
|
394
|
+
]),
|
|
395
|
+
_: 1
|
|
396
|
+
}, 8, ["headers", "items", "items-length", "loading", "search", "items-per-page", "page", "onUpdate:page", "onUpdate:itemsPerPage"])
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
}),
|
|
400
|
+
o(M, { value: "completed" }, {
|
|
401
|
+
default: r(() => [
|
|
402
|
+
o(b, null, {
|
|
403
|
+
default: r(() => [
|
|
404
|
+
o(x, { dense: "" }, {
|
|
405
|
+
default: r(() => [
|
|
406
|
+
o(c),
|
|
407
|
+
o(v, {
|
|
408
|
+
class: "mr-3",
|
|
409
|
+
color: "primary",
|
|
410
|
+
onClick: n.getCompletedScripts
|
|
411
|
+
}, {
|
|
412
|
+
default: r(() => e[13] || (e[13] = [
|
|
413
|
+
k("Refresh")
|
|
414
|
+
])),
|
|
415
|
+
_: 1
|
|
416
|
+
}, 8, ["onClick"]),
|
|
417
|
+
o(w, {
|
|
418
|
+
modelValue: i.completedSearch,
|
|
419
|
+
"onUpdate:modelValue": e[2] || (e[2] = (E) => i.completedSearch = E),
|
|
420
|
+
class: "pt-0 search",
|
|
421
|
+
label: "Search",
|
|
422
|
+
"prepend-inner-icon": "mdi-magnify",
|
|
423
|
+
clearable: "",
|
|
424
|
+
variant: "outlined",
|
|
425
|
+
density: "compact",
|
|
426
|
+
"single-line": "",
|
|
427
|
+
"hide-details": "",
|
|
428
|
+
style: { "max-width": "300px" }
|
|
429
|
+
}, null, 8, ["modelValue"])
|
|
430
|
+
]),
|
|
431
|
+
_: 1
|
|
432
|
+
})
|
|
433
|
+
]),
|
|
434
|
+
_: 1
|
|
435
|
+
}),
|
|
436
|
+
o(C, {
|
|
437
|
+
headers: i.completedHeaders,
|
|
438
|
+
items: i.completedScripts,
|
|
439
|
+
"items-length": i.completedTotal,
|
|
440
|
+
loading: i.completedLoading,
|
|
441
|
+
search: i.completedSearch,
|
|
442
|
+
density: "compact",
|
|
443
|
+
"data-test": "completed-scripts",
|
|
444
|
+
"items-per-page": i.completedItemsPerPage,
|
|
445
|
+
page: i.completedPage,
|
|
446
|
+
"items-per-page-options": [10, 25, 50],
|
|
447
|
+
class: "script-table",
|
|
448
|
+
"onUpdate:page": n.updateCompletedPage,
|
|
449
|
+
"onUpdate:itemsPerPage": n.updateCompletedItemsPerPage
|
|
450
|
+
}, {
|
|
451
|
+
"item.name": r(({ item: E }) => [
|
|
452
|
+
o(v, {
|
|
453
|
+
color: "primary",
|
|
454
|
+
density: "comfortable",
|
|
455
|
+
onClick: (A) => n.showScript(E)
|
|
456
|
+
}, {
|
|
457
|
+
default: r(() => [
|
|
458
|
+
k(z(E.name), 1)
|
|
459
|
+
]),
|
|
460
|
+
_: 2
|
|
461
|
+
}, 1032, ["onClick"])
|
|
462
|
+
]),
|
|
463
|
+
"item.log": r(({ item: E }) => [
|
|
464
|
+
o(v, {
|
|
465
|
+
color: "primary",
|
|
466
|
+
density: "comfortable",
|
|
467
|
+
icon: "mdi-eye",
|
|
468
|
+
onClick: (A) => n.viewScriptLog(E, "log")
|
|
469
|
+
}, null, 8, ["onClick"]),
|
|
470
|
+
o(v, {
|
|
471
|
+
color: "primary",
|
|
472
|
+
density: "comfortable",
|
|
473
|
+
icon: "mdi-file-download-outline",
|
|
474
|
+
disabled: i.downloadScript,
|
|
475
|
+
loading: i.downloadScript && i.downloadScript.name === E.name,
|
|
476
|
+
onClick: (A) => n.downloadScriptLog(E, "log")
|
|
477
|
+
}, null, 8, ["disabled", "loading", "onClick"])
|
|
478
|
+
]),
|
|
479
|
+
"item.report": r(({ item: E }) => [
|
|
480
|
+
E.report ? (y(), P("div", Rt, [
|
|
481
|
+
o(v, {
|
|
482
|
+
color: "primary",
|
|
483
|
+
density: "comfortable",
|
|
484
|
+
icon: "mdi-eye",
|
|
485
|
+
onClick: (A) => n.viewScriptLog(E, "report")
|
|
486
|
+
}, null, 8, ["onClick"]),
|
|
487
|
+
o(v, {
|
|
488
|
+
color: "primary",
|
|
489
|
+
density: "comfortable",
|
|
490
|
+
icon: "mdi-file-download-outline",
|
|
491
|
+
disabled: i.downloadScript,
|
|
492
|
+
loading: i.downloadScript && i.downloadScript.name === E.name,
|
|
493
|
+
onClick: (A) => n.downloadScriptLog(E, "report")
|
|
494
|
+
}, null, 8, ["disabled", "loading", "onClick"])
|
|
495
|
+
])) : (y(), P("div", Vt, e[14] || (e[14] = [
|
|
496
|
+
S("span", null, "N/A", -1)
|
|
497
|
+
])))
|
|
498
|
+
]),
|
|
499
|
+
_: 1
|
|
500
|
+
}, 8, ["headers", "items", "items-length", "loading", "search", "items-per-page", "page", "onUpdate:page", "onUpdate:itemsPerPage"])
|
|
501
|
+
]),
|
|
502
|
+
_: 1
|
|
503
|
+
})
|
|
504
|
+
]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["modelValue"])
|
|
507
|
+
]),
|
|
508
|
+
_: 1
|
|
509
|
+
}),
|
|
510
|
+
i.showDialog ? (y(), I(N, {
|
|
511
|
+
key: 0,
|
|
512
|
+
modelValue: i.showDialog,
|
|
513
|
+
"onUpdate:modelValue": e[4] || (e[4] = (E) => i.showDialog = E),
|
|
514
|
+
content: i.dialogContent,
|
|
515
|
+
type: "Script",
|
|
516
|
+
name: i.dialogName,
|
|
517
|
+
filename: i.dialogFilename,
|
|
518
|
+
onSubmit: e[5] || (e[5] = (E) => i.showDialog = !1)
|
|
519
|
+
}, null, 8, ["modelValue", "content", "name", "filename"])) : D("", !0)
|
|
520
|
+
]);
|
|
521
|
+
}
|
|
522
|
+
const Mt = /* @__PURE__ */ G(Ct, [["render", Ot]]), Et = {
|
|
523
|
+
props: {
|
|
524
|
+
modelValue: {
|
|
525
|
+
type: Array,
|
|
526
|
+
required: !0
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
data() {
|
|
530
|
+
return {
|
|
531
|
+
search: "",
|
|
532
|
+
headers: [{ title: "Message", value: "message", sortable: !1 }],
|
|
533
|
+
messageOrderOptions: ["Newest on Top", "Newest on Bottom"],
|
|
534
|
+
messageOrder: "Newest on Top"
|
|
535
|
+
};
|
|
536
|
+
},
|
|
537
|
+
computed: {
|
|
538
|
+
messages: {
|
|
539
|
+
get() {
|
|
540
|
+
return this.modelValue;
|
|
541
|
+
},
|
|
542
|
+
set(t) {
|
|
543
|
+
this.$emit("update:modelValue", t);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
watch: {
|
|
548
|
+
messageOrder: function(t, e) {
|
|
549
|
+
this.$emit("sort", t);
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
methods: {
|
|
553
|
+
messageClass(t) {
|
|
554
|
+
return t.match(/(CHECK|WAIT): .*(success|was within range.*) with value/) ? "openc3-green" : t.match(
|
|
555
|
+
/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/
|
|
556
|
+
) ? "openc3-red" : "";
|
|
557
|
+
},
|
|
558
|
+
downloadLog() {
|
|
559
|
+
const t = this.messages.map((a) => a.message).join(`
|
|
560
|
+
`), e = new Blob([t], {
|
|
561
|
+
type: "text/plain"
|
|
562
|
+
}), s = document.createElement("a");
|
|
563
|
+
s.href = URL.createObjectURL(e), s.setAttribute(
|
|
564
|
+
"download",
|
|
565
|
+
we(Date.now(), "yyyy_MM_dd_HH_mm_ss") + "_sr_message_log.txt"
|
|
566
|
+
), s.click();
|
|
567
|
+
},
|
|
568
|
+
clearLog: function() {
|
|
569
|
+
this.$dialog.confirm("Are you sure you want to clear the log?", {
|
|
570
|
+
okText: "Clear",
|
|
571
|
+
cancelText: "Cancel"
|
|
572
|
+
}).then((t) => {
|
|
573
|
+
this.messages = [];
|
|
574
|
+
}).catch(function(t) {
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
function Tt(t, e, s, a, i, n) {
|
|
580
|
+
const d = u("v-btn"), h = u("v-spacer"), c = u("v-select"), v = u("v-text-field"), w = u("v-row"), x = u("v-card-title"), b = u("v-data-table"), R = u("v-card");
|
|
581
|
+
return y(), P("div", null, [
|
|
582
|
+
o(R, null, {
|
|
583
|
+
default: r(() => [
|
|
584
|
+
o(x, null, {
|
|
585
|
+
default: r(() => [
|
|
586
|
+
o(w, { class: "pt-2" }, {
|
|
587
|
+
default: r(() => [
|
|
588
|
+
o(d, {
|
|
589
|
+
class: "mx-2",
|
|
590
|
+
icon: "mdi-download",
|
|
591
|
+
variant: "text",
|
|
592
|
+
"data-test": "download-log",
|
|
593
|
+
"aria-label": "Download Log",
|
|
594
|
+
onClick: n.downloadLog
|
|
595
|
+
}, null, 8, ["onClick"]),
|
|
596
|
+
e[2] || (e[2] = k(" Script Messages ")),
|
|
597
|
+
o(h),
|
|
598
|
+
o(c, {
|
|
599
|
+
modelValue: i.messageOrder,
|
|
600
|
+
"onUpdate:modelValue": e[0] || (e[0] = (C) => i.messageOrder = C),
|
|
601
|
+
density: "compact",
|
|
602
|
+
"hide-details": "",
|
|
603
|
+
variant: "outlined",
|
|
604
|
+
items: i.messageOrderOptions,
|
|
605
|
+
class: "mr-2",
|
|
606
|
+
style: { "max-width": "200px" },
|
|
607
|
+
"data-test": "message-order"
|
|
608
|
+
}, null, 8, ["modelValue", "items"]),
|
|
609
|
+
o(h),
|
|
610
|
+
o(v, {
|
|
611
|
+
modelValue: i.search,
|
|
612
|
+
"onUpdate:modelValue": e[1] || (e[1] = (C) => i.search = C),
|
|
613
|
+
label: "Search",
|
|
614
|
+
"prepend-inner-icon": "mdi-magnify",
|
|
615
|
+
clearable: "",
|
|
616
|
+
variant: "outlined",
|
|
617
|
+
density: "compact",
|
|
618
|
+
"single-line": "",
|
|
619
|
+
"hide-details": "",
|
|
620
|
+
class: "search",
|
|
621
|
+
"data-test": "search-messages"
|
|
622
|
+
}, null, 8, ["modelValue"]),
|
|
623
|
+
o(d, {
|
|
624
|
+
class: "mx-2",
|
|
625
|
+
icon: "mdi-delete-sweep",
|
|
626
|
+
variant: "text",
|
|
627
|
+
"data-test": "clear-log",
|
|
628
|
+
"aria-label": "Clear Log",
|
|
629
|
+
onClick: n.clearLog
|
|
630
|
+
}, null, 8, ["onClick"])
|
|
631
|
+
]),
|
|
632
|
+
_: 1
|
|
633
|
+
})
|
|
634
|
+
]),
|
|
635
|
+
_: 1
|
|
636
|
+
}),
|
|
637
|
+
o(b, {
|
|
638
|
+
id: "script-log-messages",
|
|
639
|
+
style: { overflow: "auto" },
|
|
640
|
+
headers: i.headers,
|
|
641
|
+
items: n.messages,
|
|
642
|
+
search: i.search,
|
|
643
|
+
"items-per-page": -1,
|
|
644
|
+
"hide-default-footer": "",
|
|
645
|
+
density: "compact",
|
|
646
|
+
"data-test": "output-messages"
|
|
647
|
+
}, {
|
|
648
|
+
"item.message": r(({ item: C }) => [
|
|
649
|
+
S("div", {
|
|
650
|
+
class: Ye(n.messageClass(C.message))
|
|
651
|
+
}, z(C.message), 3)
|
|
652
|
+
]),
|
|
653
|
+
_: 1
|
|
654
|
+
}, 8, ["headers", "items", "search"])
|
|
655
|
+
]),
|
|
656
|
+
_: 1
|
|
657
|
+
})
|
|
658
|
+
]);
|
|
659
|
+
}
|
|
660
|
+
const It = /* @__PURE__ */ G(Et, [["render", Tt]]), Dt = {
|
|
661
|
+
__name: "splitpanes",
|
|
662
|
+
props: {
|
|
663
|
+
horizontal: { type: Boolean, default: !1 },
|
|
664
|
+
pushOtherPanes: { type: Boolean, default: !0 },
|
|
665
|
+
maximizePanes: { type: Boolean, default: !0 },
|
|
666
|
+
// Maximize pane on splitter double click/tap.
|
|
667
|
+
rtl: { type: Boolean, default: !1 },
|
|
668
|
+
// Right to left direction.
|
|
669
|
+
firstSplitter: { type: Boolean, default: !1 }
|
|
670
|
+
},
|
|
671
|
+
emits: [
|
|
672
|
+
"ready",
|
|
673
|
+
"resize",
|
|
674
|
+
"resized",
|
|
675
|
+
"pane-click",
|
|
676
|
+
"pane-maximize",
|
|
677
|
+
"pane-add",
|
|
678
|
+
"pane-remove",
|
|
679
|
+
"splitter-click",
|
|
680
|
+
"splitter-dblclick"
|
|
681
|
+
],
|
|
682
|
+
setup(t, { emit: e }) {
|
|
683
|
+
const s = e, a = t, i = ut(), n = ie([]), d = K(() => n.value.reduce((l, p) => (l[~~p.id] = p) && l, {})), h = K(() => n.value.length), c = ie(null), v = ie(!1), w = ie({
|
|
684
|
+
mouseDown: !1,
|
|
685
|
+
dragging: !1,
|
|
686
|
+
activeSplitter: null,
|
|
687
|
+
cursorOffset: 0
|
|
688
|
+
// Cursor offset within the splitter.
|
|
689
|
+
}), x = ie({
|
|
690
|
+
// Used to detect double click on touch devices.
|
|
691
|
+
splitter: null,
|
|
692
|
+
timeoutId: null
|
|
693
|
+
}), b = K(() => ({
|
|
694
|
+
[`splitpanes splitpanes--${a.horizontal ? "horizontal" : "vertical"}`]: !0,
|
|
695
|
+
"splitpanes--dragging": w.value.dragging
|
|
696
|
+
})), R = () => {
|
|
697
|
+
document.addEventListener("mousemove", _, { passive: !1 }), document.addEventListener("mouseup", U), "ontouchstart" in window && (document.addEventListener("touchmove", _, { passive: !1 }), document.addEventListener("touchend", U));
|
|
698
|
+
}, C = () => {
|
|
699
|
+
document.removeEventListener("mousemove", _, { passive: !1 }), document.removeEventListener("mouseup", U), "ontouchstart" in window && (document.removeEventListener("touchmove", _, { passive: !1 }), document.removeEventListener("touchend", U));
|
|
700
|
+
}, M = (l, p) => {
|
|
701
|
+
const g = l.target.closest(".splitpanes__splitter");
|
|
702
|
+
if (g) {
|
|
703
|
+
const { left: m, top: f } = g.getBoundingClientRect(), { clientX: V, clientY: T } = "ontouchstart" in window && l.touches ? l.touches[0] : l;
|
|
704
|
+
w.value.cursorOffset = a.horizontal ? T - f : V - m;
|
|
705
|
+
}
|
|
706
|
+
R(), w.value.mouseDown = !0, w.value.activeSplitter = p;
|
|
707
|
+
}, _ = (l) => {
|
|
708
|
+
w.value.mouseDown && (l.preventDefault(), w.value.dragging = !0, requestAnimationFrame(() => {
|
|
709
|
+
Ve(xe(l)), L("resize", { event: l }, !0);
|
|
710
|
+
}));
|
|
711
|
+
}, U = (l) => {
|
|
712
|
+
w.value.dragging && L("resized", { event: l }, !0), w.value.mouseDown = !1, w.value.activeSplitter = null, setTimeout(() => {
|
|
713
|
+
w.value.dragging = !1, C();
|
|
714
|
+
}, 100);
|
|
715
|
+
}, N = (l, p) => {
|
|
716
|
+
"ontouchstart" in window && (l.preventDefault(), x.value.splitter === p ? (clearTimeout(x.value.timeoutId), x.value.timeoutId = null, E(l, p), x.value.splitter = null) : (x.value.splitter = p, x.value.timeoutId = setTimeout(() => x.value.splitter = null, 500))), w.value.dragging || L("splitter-click", { event: l, index: p }, !0);
|
|
717
|
+
}, E = (l, p) => {
|
|
718
|
+
if (L("splitter-dblclick", { event: l, index: p }, !0), a.maximizePanes) {
|
|
719
|
+
let g = 0;
|
|
720
|
+
n.value = n.value.map((m, f) => (m.size = f === p ? m.max : m.min, f !== p && (g += m.min), m)), n.value[p].size -= g, L("pane-maximize", { event: l, index: p, pane: n.value[p] }), L("resized", { event: l, index: p }, !0);
|
|
721
|
+
}
|
|
722
|
+
}, A = (l, p) => {
|
|
723
|
+
L("pane-click", {
|
|
724
|
+
event: l,
|
|
725
|
+
index: d.value[p].index,
|
|
726
|
+
pane: d.value[p]
|
|
727
|
+
});
|
|
728
|
+
}, xe = (l) => {
|
|
729
|
+
const p = c.value.getBoundingClientRect(), { clientX: g, clientY: m } = "ontouchstart" in window && l.touches ? l.touches[0] : l;
|
|
730
|
+
return {
|
|
731
|
+
x: g - (a.horizontal ? 0 : w.value.cursorOffset) - p.left,
|
|
732
|
+
y: m - (a.horizontal ? w.value.cursorOffset : 0) - p.top
|
|
733
|
+
};
|
|
734
|
+
}, Ce = (l) => {
|
|
735
|
+
l = l[a.horizontal ? "y" : "x"];
|
|
736
|
+
const p = c.value[a.horizontal ? "clientHeight" : "clientWidth"];
|
|
737
|
+
return a.rtl && !a.horizontal && (l = p - l), l * 100 / p;
|
|
738
|
+
}, Ve = (l) => {
|
|
739
|
+
const p = w.value.activeSplitter;
|
|
740
|
+
let g = {
|
|
741
|
+
prevPanesSize: fe(p),
|
|
742
|
+
nextPanesSize: W(p),
|
|
743
|
+
prevReachedMinPanes: 0,
|
|
744
|
+
nextReachedMinPanes: 0
|
|
745
|
+
};
|
|
746
|
+
const m = 0 + (a.pushOtherPanes ? 0 : g.prevPanesSize), f = 100 - (a.pushOtherPanes ? 0 : g.nextPanesSize), V = Math.max(Math.min(Ce(l), f), m);
|
|
747
|
+
let T = [p, p + 1], F = n.value[T[0]] || null, H = n.value[T[1]] || null;
|
|
748
|
+
const Ne = F.max < 100 && V >= F.max + g.prevPanesSize, $e = H.max < 100 && V <= 100 - (H.max + W(p + 1));
|
|
749
|
+
if (Ne || $e) {
|
|
750
|
+
Ne ? (F.size = F.max, H.size = Math.max(100 - F.max - g.prevPanesSize - g.nextPanesSize, 0)) : (F.size = Math.max(100 - H.max - g.prevPanesSize - W(p + 1), 0), H.size = H.max);
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
if (a.pushOtherPanes) {
|
|
754
|
+
const He = he(g, V);
|
|
755
|
+
if (!He) return;
|
|
756
|
+
({ sums: g, panesToResize: T } = He), F = n.value[T[0]] || null, H = n.value[T[1]] || null;
|
|
757
|
+
}
|
|
758
|
+
F !== null && (F.size = Math.min(Math.max(V - g.prevPanesSize - g.prevReachedMinPanes, F.min), F.max)), H !== null && (H.size = Math.min(Math.max(100 - V - g.nextPanesSize - g.nextReachedMinPanes, H.min), H.max));
|
|
759
|
+
}, he = (l, p) => {
|
|
760
|
+
const g = w.value.activeSplitter, m = [g, g + 1];
|
|
761
|
+
return p < l.prevPanesSize + n.value[m[0]].min && (m[0] = ge(g).index, l.prevReachedMinPanes = 0, m[0] < g && n.value.forEach((f, V) => {
|
|
762
|
+
V > m[0] && V <= g && (f.size = f.min, l.prevReachedMinPanes += f.min);
|
|
763
|
+
}), l.prevPanesSize = fe(m[0]), m[0] === void 0) ? (l.prevReachedMinPanes = 0, n.value[0].size = n.value[0].min, n.value.forEach((f, V) => {
|
|
764
|
+
V > 0 && V <= g && (f.size = f.min, l.prevReachedMinPanes += f.min);
|
|
765
|
+
}), n.value[m[1]].size = 100 - l.prevReachedMinPanes - n.value[0].min - l.prevPanesSize - l.nextPanesSize, null) : p > 100 - l.nextPanesSize - n.value[m[1]].min && (m[1] = ve(g).index, l.nextReachedMinPanes = 0, m[1] > g + 1 && n.value.forEach((f, V) => {
|
|
766
|
+
V > g && V < m[1] && (f.size = f.min, l.nextReachedMinPanes += f.min);
|
|
767
|
+
}), l.nextPanesSize = W(m[1] - 1), m[1] === void 0) ? (l.nextReachedMinPanes = 0, n.value.forEach((f, V) => {
|
|
768
|
+
V < h.value - 1 && V >= g + 1 && (f.size = f.min, l.nextReachedMinPanes += f.min);
|
|
769
|
+
}), n.value[m[0]].size = 100 - l.prevPanesSize - W(m[0] - 1), null) : { sums: l, panesToResize: m };
|
|
770
|
+
}, fe = (l) => n.value.reduce((p, g, m) => p + (m < l ? g.size : 0), 0), W = (l) => n.value.reduce((p, g, m) => p + (m > l + 1 ? g.size : 0), 0), ge = (l) => [...n.value].reverse().find((p) => p.index < l && p.size > p.min) || {}, ve = (l) => n.value.find((p) => p.index > l + 1 && p.size > p.min) || {}, Re = () => {
|
|
771
|
+
var l;
|
|
772
|
+
const p = Array.from(((l = c.value) == null ? void 0 : l.children) || []);
|
|
773
|
+
for (const g of p) {
|
|
774
|
+
const m = g.classList.contains("splitpanes__pane"), f = g.classList.contains("splitpanes__splitter");
|
|
775
|
+
!m && !f && (g.remove(), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
|
|
776
|
+
}
|
|
777
|
+
}, _e = (l, p, g = !1) => {
|
|
778
|
+
const m = l - 1, f = document.createElement("div");
|
|
779
|
+
f.classList.add("splitpanes__splitter"), g || (f.onmousedown = (V) => M(V, m), typeof window < "u" && "ontouchstart" in window && (f.ontouchstart = (V) => M(V, m)), f.onclick = (V) => N(V, m + 1)), f.ondblclick = (V) => E(V, m + 1), p.parentNode.insertBefore(f, p);
|
|
780
|
+
}, Oe = (l) => {
|
|
781
|
+
l.onmousedown = void 0, l.onclick = void 0, l.ondblclick = void 0, l.remove();
|
|
782
|
+
}, Z = () => {
|
|
783
|
+
var l;
|
|
784
|
+
const p = Array.from(((l = c.value) == null ? void 0 : l.children) || []);
|
|
785
|
+
for (const m of p)
|
|
786
|
+
m.className.includes("splitpanes__splitter") && Oe(m);
|
|
787
|
+
let g = 0;
|
|
788
|
+
for (const m of p)
|
|
789
|
+
m.className.includes("splitpanes__pane") && (!g && a.firstSplitter ? _e(g, m, !0) : g && _e(g, m), g++);
|
|
790
|
+
}, Me = ({ uid: l, ...p }) => {
|
|
791
|
+
const g = d.value[l];
|
|
792
|
+
for (const [m, f] of Object.entries(p)) g[m] = f;
|
|
793
|
+
}, Ee = (l) => {
|
|
794
|
+
var p;
|
|
795
|
+
let g = -1;
|
|
796
|
+
Array.from(((p = c.value) == null ? void 0 : p.children) || []).some((m) => (m.className.includes("splitpanes__pane") && g++, m.isSameNode(l.el))), n.value.splice(g, 0, { ...l, index: g }), n.value.forEach((m, f) => m.index = f), v.value && Ae(() => {
|
|
797
|
+
Z(), oe({ addedPane: n.value[g] }), L("pane-add", { pane: n.value[g] });
|
|
798
|
+
});
|
|
799
|
+
}, Te = (l) => {
|
|
800
|
+
const p = n.value.findIndex((m) => m.id === l);
|
|
801
|
+
n.value[p].el = null;
|
|
802
|
+
const g = n.value.splice(p, 1)[0];
|
|
803
|
+
n.value.forEach((m, f) => m.index = f), Ae(() => {
|
|
804
|
+
Z(), L("pane-remove", { pane: g }), oe({ removedPane: { ...g } });
|
|
805
|
+
});
|
|
806
|
+
}, oe = (l = {}) => {
|
|
807
|
+
!l.addedPane && !l.removedPane ? De() : n.value.some((p) => p.givenSize !== null || p.min || p.max < 100) ? Pe(l) : Ie(), v.value && L("resized");
|
|
808
|
+
}, Ie = () => {
|
|
809
|
+
const l = 100 / h.value;
|
|
810
|
+
let p = 0;
|
|
811
|
+
const g = [], m = [];
|
|
812
|
+
for (const f of n.value)
|
|
813
|
+
f.size = Math.max(Math.min(l, f.max), f.min), p -= f.size, f.size >= f.max && g.push(f.id), f.size <= f.min && m.push(f.id);
|
|
814
|
+
p > 0.1 && le(p, g, m);
|
|
815
|
+
}, De = () => {
|
|
816
|
+
let l = 100;
|
|
817
|
+
const p = [], g = [];
|
|
818
|
+
let m = 0;
|
|
819
|
+
for (const V of n.value)
|
|
820
|
+
l -= V.size, V.givenSize !== null && m++, V.size >= V.max && p.push(V.id), V.size <= V.min && g.push(V.id);
|
|
821
|
+
let f = 100;
|
|
822
|
+
if (l > 0.1) {
|
|
823
|
+
for (const V of n.value)
|
|
824
|
+
V.givenSize === null && (V.size = Math.max(Math.min(l / (h.value - m), V.max), V.min)), f -= V.size;
|
|
825
|
+
f > 0.1 && le(f, p, g);
|
|
826
|
+
}
|
|
827
|
+
}, Pe = ({ addedPane: l, removedPane: p } = {}) => {
|
|
828
|
+
let g = 100 / h.value, m = 0;
|
|
829
|
+
const f = [], V = [];
|
|
830
|
+
((l == null ? void 0 : l.givenSize) ?? null) !== null && (g = (100 - l.givenSize) / (h.value - 1));
|
|
831
|
+
for (const T of n.value)
|
|
832
|
+
m -= T.size, T.size >= T.max && f.push(T.id), T.size <= T.min && V.push(T.id);
|
|
833
|
+
if (!(Math.abs(m) < 0.1)) {
|
|
834
|
+
for (const T of n.value)
|
|
835
|
+
(l == null ? void 0 : l.givenSize) !== null && (l == null ? void 0 : l.id) === T.id || (T.size = Math.max(Math.min(g, T.max), T.min)), m -= T.size, T.size >= T.max && f.push(T.id), T.size <= T.min && V.push(T.id);
|
|
836
|
+
m > 0.1 && le(m, f, V);
|
|
837
|
+
}
|
|
838
|
+
}, le = (l, p, g) => {
|
|
839
|
+
let m;
|
|
840
|
+
l > 0 ? m = l / (h.value - p.length) : m = l / (h.value - g.length), n.value.forEach((f, V) => {
|
|
841
|
+
if (l > 0 && !p.includes(f.id)) {
|
|
842
|
+
const T = Math.max(Math.min(f.size + m, f.max), f.min), F = T - f.size;
|
|
843
|
+
l -= F, f.size = T;
|
|
844
|
+
} else if (!g.includes(f.id)) {
|
|
845
|
+
const T = Math.max(Math.min(f.size + m, f.max), f.min), F = T - f.size;
|
|
846
|
+
l -= F, f.size = T;
|
|
847
|
+
}
|
|
848
|
+
}), Math.abs(l) > 0.1 && Ae(() => {
|
|
849
|
+
v.value && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
|
|
850
|
+
});
|
|
851
|
+
}, L = (l, p = void 0, g = !1) => {
|
|
852
|
+
const m = (p == null ? void 0 : p.index) ?? w.value.activeSplitter ?? null;
|
|
853
|
+
s(l, {
|
|
854
|
+
...p,
|
|
855
|
+
...m !== null && { index: m },
|
|
856
|
+
...g && m !== null && {
|
|
857
|
+
prevPane: n.value[m - (a.firstSplitter ? 1 : 0)],
|
|
858
|
+
nextPane: n.value[m + (a.firstSplitter ? 0 : 1)]
|
|
859
|
+
},
|
|
860
|
+
panes: n.value.map((f) => ({ min: f.min, max: f.max, size: f.size }))
|
|
861
|
+
});
|
|
862
|
+
};
|
|
863
|
+
be(() => a.firstSplitter, () => Z()), Ze(() => {
|
|
864
|
+
Re(), Z(), oe(), L("ready"), v.value = !0;
|
|
865
|
+
}), Xe(() => v.value = !1);
|
|
866
|
+
const Ue = () => {
|
|
867
|
+
var l;
|
|
868
|
+
return ct(
|
|
869
|
+
"div",
|
|
870
|
+
{ ref: c, class: b.value },
|
|
871
|
+
(l = i.default) == null ? void 0 : l.call(i)
|
|
872
|
+
);
|
|
873
|
+
};
|
|
874
|
+
return J("panes", n), J("indexedPanes", d), J("horizontal", K(() => a.horizontal)), J("requestUpdate", Me), J("onPaneAdd", Ee), J("onPaneRemove", Te), J("onPaneClick", A), (l, p) => (y(), I(dt(Ue)));
|
|
875
|
+
}
|
|
876
|
+
}, Pt = {
|
|
877
|
+
__name: "pane",
|
|
878
|
+
props: {
|
|
879
|
+
size: { type: [Number, String] },
|
|
880
|
+
minSize: { type: [Number, String], default: 0 },
|
|
881
|
+
maxSize: { type: [Number, String], default: 100 }
|
|
882
|
+
},
|
|
883
|
+
setup(t) {
|
|
884
|
+
var e;
|
|
885
|
+
const s = t, a = Q("requestUpdate"), i = Q("onPaneAdd"), n = Q("horizontal"), d = Q("onPaneRemove"), h = Q("onPaneClick"), c = (e = ot()) == null ? void 0 : e.uid, v = Q("indexedPanes"), w = K(() => v.value[c]), x = ie(null), b = K(() => {
|
|
886
|
+
const _ = isNaN(s.size) || s.size === void 0 ? 0 : parseFloat(s.size);
|
|
887
|
+
return Math.max(Math.min(_, C.value), R.value);
|
|
888
|
+
}), R = K(() => {
|
|
889
|
+
const _ = parseFloat(s.minSize);
|
|
890
|
+
return isNaN(_) ? 0 : _;
|
|
891
|
+
}), C = K(() => {
|
|
892
|
+
const _ = parseFloat(s.maxSize);
|
|
893
|
+
return isNaN(_) ? 100 : _;
|
|
894
|
+
}), M = K(() => {
|
|
895
|
+
var _;
|
|
896
|
+
return `${n.value ? "height" : "width"}: ${(_ = w.value) == null ? void 0 : _.size}%`;
|
|
897
|
+
});
|
|
898
|
+
return be(() => b.value, (_) => a({ uid: c, size: _ })), be(() => R.value, (_) => a({ uid: c, min: _ })), be(() => C.value, (_) => a({ uid: c, max: _ })), Ze(() => {
|
|
899
|
+
i({
|
|
900
|
+
id: c,
|
|
901
|
+
el: x.value,
|
|
902
|
+
min: R.value,
|
|
903
|
+
max: C.value,
|
|
904
|
+
// The given size (useful to know the user intention).
|
|
905
|
+
givenSize: s.size === void 0 ? null : b.value,
|
|
906
|
+
size: b.value
|
|
907
|
+
// The computed current size at any time.
|
|
908
|
+
});
|
|
909
|
+
}), Xe(() => d(c)), (_, U) => (y(), P("div", {
|
|
910
|
+
ref_key: "paneEl",
|
|
911
|
+
ref: x,
|
|
912
|
+
class: "splitpanes__pane",
|
|
913
|
+
onClick: U[0] || (U[0] = (N) => rt(h)(N, _._.uid)),
|
|
914
|
+
style: lt(M.value)
|
|
915
|
+
}, [
|
|
916
|
+
at(_.$slots, "default")
|
|
917
|
+
], 4));
|
|
918
|
+
}
|
|
919
|
+
}, Ut = {
|
|
920
|
+
props: {
|
|
921
|
+
question: {
|
|
922
|
+
type: String,
|
|
923
|
+
required: !0
|
|
924
|
+
},
|
|
925
|
+
default: {
|
|
926
|
+
type: String,
|
|
927
|
+
default: null
|
|
928
|
+
},
|
|
929
|
+
password: {
|
|
930
|
+
type: Boolean,
|
|
931
|
+
default: !1
|
|
932
|
+
},
|
|
933
|
+
answerRequired: {
|
|
934
|
+
type: Boolean,
|
|
935
|
+
default: !0
|
|
936
|
+
},
|
|
937
|
+
modelValue: Boolean
|
|
938
|
+
},
|
|
939
|
+
data() {
|
|
940
|
+
return {
|
|
941
|
+
inputValue: "",
|
|
942
|
+
valid: !1,
|
|
943
|
+
rules: [(t) => !!t || "Required"]
|
|
944
|
+
};
|
|
945
|
+
},
|
|
946
|
+
computed: {
|
|
947
|
+
show: {
|
|
948
|
+
get() {
|
|
949
|
+
return this.modelValue;
|
|
950
|
+
},
|
|
951
|
+
set(t) {
|
|
952
|
+
this.$emit("update:modelValue", t);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
created() {
|
|
957
|
+
this.default && (this.valid = !0, this.inputValue = this.default), this.answerRequired === !1 && (this.valid = !0, this.rules = [(t) => !0]);
|
|
958
|
+
},
|
|
959
|
+
methods: {
|
|
960
|
+
submitHandler: function() {
|
|
961
|
+
this.$emit("response", this.inputValue);
|
|
962
|
+
},
|
|
963
|
+
cancelHandler: function() {
|
|
964
|
+
this.$emit("response", "Cancel");
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}, zt = { class: "pa-2" }, At = { class: "question" };
|
|
968
|
+
function Ft(t, e, s, a, i, n) {
|
|
969
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("v-text-field"), v = u("v-card-text"), w = u("v-btn"), x = u("v-card-actions"), b = u("v-form"), R = u("v-card"), C = u("v-dialog");
|
|
970
|
+
return y(), I(C, {
|
|
971
|
+
modelValue: n.show,
|
|
972
|
+
"onUpdate:modelValue": e[2] || (e[2] = (M) => n.show = M),
|
|
973
|
+
persistent: "",
|
|
974
|
+
width: "600"
|
|
975
|
+
}, {
|
|
976
|
+
default: r(() => [
|
|
977
|
+
o(R, null, {
|
|
978
|
+
default: r(() => [
|
|
979
|
+
o(b, {
|
|
980
|
+
modelValue: i.valid,
|
|
981
|
+
"onUpdate:modelValue": e[1] || (e[1] = (M) => i.valid = M),
|
|
982
|
+
onSubmit: ne(n.submitHandler, ["prevent"])
|
|
983
|
+
}, {
|
|
984
|
+
default: r(() => [
|
|
985
|
+
o(h, { height: "24" }, {
|
|
986
|
+
default: r(() => [
|
|
987
|
+
o(d),
|
|
988
|
+
e[3] || (e[3] = S("span", null, " User Input Required ", -1)),
|
|
989
|
+
o(d)
|
|
990
|
+
]),
|
|
991
|
+
_: 1
|
|
992
|
+
}),
|
|
993
|
+
S("div", zt, [
|
|
994
|
+
o(v, null, {
|
|
995
|
+
default: r(() => [
|
|
996
|
+
S("div", At, z(s.question), 1),
|
|
997
|
+
o(c, {
|
|
998
|
+
modelValue: i.inputValue,
|
|
999
|
+
"onUpdate:modelValue": e[0] || (e[0] = (M) => i.inputValue = M),
|
|
1000
|
+
autofocus: "",
|
|
1001
|
+
"data-test": "ask-value-input",
|
|
1002
|
+
type: s.password ? "password" : "text",
|
|
1003
|
+
rules: i.rules
|
|
1004
|
+
}, null, 8, ["modelValue", "type", "rules"])
|
|
1005
|
+
]),
|
|
1006
|
+
_: 1
|
|
1007
|
+
})
|
|
1008
|
+
]),
|
|
1009
|
+
o(x, { class: "px-2" }, {
|
|
1010
|
+
default: r(() => [
|
|
1011
|
+
o(d),
|
|
1012
|
+
o(w, {
|
|
1013
|
+
variant: "outlined",
|
|
1014
|
+
"data-test": "ask-cancel",
|
|
1015
|
+
onClick: n.cancelHandler
|
|
1016
|
+
}, {
|
|
1017
|
+
default: r(() => e[4] || (e[4] = [
|
|
1018
|
+
k(" Cancel ")
|
|
1019
|
+
])),
|
|
1020
|
+
_: 1
|
|
1021
|
+
}, 8, ["onClick"]),
|
|
1022
|
+
o(w, {
|
|
1023
|
+
variant: "flat",
|
|
1024
|
+
type: "submit",
|
|
1025
|
+
"data-test": "ask-ok",
|
|
1026
|
+
disabled: !i.valid,
|
|
1027
|
+
onClick: ne(n.submitHandler, ["prevent"])
|
|
1028
|
+
}, {
|
|
1029
|
+
default: r(() => e[5] || (e[5] = [
|
|
1030
|
+
k(" Ok ")
|
|
1031
|
+
])),
|
|
1032
|
+
_: 1
|
|
1033
|
+
}, 8, ["disabled", "onClick"])
|
|
1034
|
+
]),
|
|
1035
|
+
_: 1
|
|
1036
|
+
})
|
|
1037
|
+
]),
|
|
1038
|
+
_: 1
|
|
1039
|
+
}, 8, ["modelValue", "onSubmit"])
|
|
1040
|
+
]),
|
|
1041
|
+
_: 1
|
|
1042
|
+
})
|
|
1043
|
+
]),
|
|
1044
|
+
_: 1
|
|
1045
|
+
}, 8, ["modelValue"]);
|
|
1046
|
+
}
|
|
1047
|
+
const Bt = /* @__PURE__ */ G(Ut, [["render", Ft], ["__scopeId", "data-v-ae138b51"]]), Lt = {
|
|
1048
|
+
props: {
|
|
1049
|
+
title: {
|
|
1050
|
+
type: String,
|
|
1051
|
+
required: !0
|
|
1052
|
+
},
|
|
1053
|
+
message: {
|
|
1054
|
+
type: String,
|
|
1055
|
+
default: null
|
|
1056
|
+
},
|
|
1057
|
+
filter: {
|
|
1058
|
+
type: String,
|
|
1059
|
+
default: "*"
|
|
1060
|
+
},
|
|
1061
|
+
multiple: {
|
|
1062
|
+
type: Boolean,
|
|
1063
|
+
default: !1
|
|
1064
|
+
},
|
|
1065
|
+
modelValue: Boolean
|
|
1066
|
+
},
|
|
1067
|
+
data() {
|
|
1068
|
+
return {
|
|
1069
|
+
inputValue: null,
|
|
1070
|
+
valid: null,
|
|
1071
|
+
rules: [
|
|
1072
|
+
(t) => this.multiple ? t.length != 0 || "Required" : !!t || "Required"
|
|
1073
|
+
]
|
|
1074
|
+
};
|
|
1075
|
+
},
|
|
1076
|
+
computed: {
|
|
1077
|
+
show: {
|
|
1078
|
+
get() {
|
|
1079
|
+
return this.modelValue;
|
|
1080
|
+
},
|
|
1081
|
+
set(t) {
|
|
1082
|
+
this.$emit("update:modelValue", t);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
methods: {
|
|
1087
|
+
submitHandler: function() {
|
|
1088
|
+
Array.isArray(this.inputValue) || (this.inputValue = [this.inputValue]), this.$emit("response", this.inputValue);
|
|
1089
|
+
},
|
|
1090
|
+
cancelHandler: function() {
|
|
1091
|
+
this.$emit("response", "Cancel");
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}, Nt = { class: "pa-2" }, Ht = { class: "title" }, Gt = ["textContent"];
|
|
1095
|
+
function qt(t, e, s, a, i, n) {
|
|
1096
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("v-row"), v = u("v-file-input"), w = u("v-card-text"), x = u("v-btn"), b = u("v-card-actions"), R = u("v-form"), C = u("v-card"), M = u("v-dialog");
|
|
1097
|
+
return y(), I(M, {
|
|
1098
|
+
modelValue: n.show,
|
|
1099
|
+
"onUpdate:modelValue": e[2] || (e[2] = (_) => n.show = _),
|
|
1100
|
+
persistent: "",
|
|
1101
|
+
width: "600"
|
|
1102
|
+
}, {
|
|
1103
|
+
default: r(() => [
|
|
1104
|
+
o(C, null, {
|
|
1105
|
+
default: r(() => [
|
|
1106
|
+
o(R, {
|
|
1107
|
+
modelValue: i.valid,
|
|
1108
|
+
"onUpdate:modelValue": e[1] || (e[1] = (_) => i.valid = _),
|
|
1109
|
+
onSubmit: ne(n.submitHandler, ["prevent"])
|
|
1110
|
+
}, {
|
|
1111
|
+
default: r(() => [
|
|
1112
|
+
o(h, { height: "24" }, {
|
|
1113
|
+
default: r(() => [
|
|
1114
|
+
o(d),
|
|
1115
|
+
e[3] || (e[3] = S("span", null, " File Dialog ", -1)),
|
|
1116
|
+
o(d)
|
|
1117
|
+
]),
|
|
1118
|
+
_: 1
|
|
1119
|
+
}),
|
|
1120
|
+
S("div", Nt, [
|
|
1121
|
+
o(w, null, {
|
|
1122
|
+
default: r(() => [
|
|
1123
|
+
o(c, null, {
|
|
1124
|
+
default: r(() => [
|
|
1125
|
+
S("span", Ht, z(s.title), 1)
|
|
1126
|
+
]),
|
|
1127
|
+
_: 1
|
|
1128
|
+
}),
|
|
1129
|
+
s.message ? (y(), I(c, { key: 0 }, {
|
|
1130
|
+
default: r(() => [
|
|
1131
|
+
S("span", {
|
|
1132
|
+
class: "ma-3",
|
|
1133
|
+
style: { "white-space": "pre-line" },
|
|
1134
|
+
textContent: z(s.message)
|
|
1135
|
+
}, null, 8, Gt)
|
|
1136
|
+
]),
|
|
1137
|
+
_: 1
|
|
1138
|
+
})) : D("", !0),
|
|
1139
|
+
o(c, { class: "my-1" }, {
|
|
1140
|
+
default: r(() => [
|
|
1141
|
+
o(v, {
|
|
1142
|
+
modelValue: i.inputValue,
|
|
1143
|
+
"onUpdate:modelValue": e[0] || (e[0] = (_) => i.inputValue = _),
|
|
1144
|
+
label: "Choose File",
|
|
1145
|
+
rules: i.rules,
|
|
1146
|
+
autofocus: "",
|
|
1147
|
+
"data-test": "file-input",
|
|
1148
|
+
accept: s.filter,
|
|
1149
|
+
"small-chips": "",
|
|
1150
|
+
multiple: s.multiple
|
|
1151
|
+
}, null, 8, ["modelValue", "rules", "accept", "multiple"])
|
|
1152
|
+
]),
|
|
1153
|
+
_: 1
|
|
1154
|
+
})
|
|
1155
|
+
]),
|
|
1156
|
+
_: 1
|
|
1157
|
+
})
|
|
1158
|
+
]),
|
|
1159
|
+
o(b, { class: "px-2" }, {
|
|
1160
|
+
default: r(() => [
|
|
1161
|
+
o(d),
|
|
1162
|
+
o(x, {
|
|
1163
|
+
variant: "outlined",
|
|
1164
|
+
"data-test": "file-cancel",
|
|
1165
|
+
onClick: n.cancelHandler
|
|
1166
|
+
}, {
|
|
1167
|
+
default: r(() => e[4] || (e[4] = [
|
|
1168
|
+
k(" Cancel ")
|
|
1169
|
+
])),
|
|
1170
|
+
_: 1
|
|
1171
|
+
}, 8, ["onClick"]),
|
|
1172
|
+
o(x, {
|
|
1173
|
+
variant: "flat",
|
|
1174
|
+
type: "submit",
|
|
1175
|
+
"data-test": "file-ok",
|
|
1176
|
+
disabled: !i.valid,
|
|
1177
|
+
onClick: ne(n.submitHandler, ["prevent"])
|
|
1178
|
+
}, {
|
|
1179
|
+
default: r(() => e[5] || (e[5] = [
|
|
1180
|
+
k(" Ok ")
|
|
1181
|
+
])),
|
|
1182
|
+
_: 1
|
|
1183
|
+
}, 8, ["disabled", "onClick"])
|
|
1184
|
+
]),
|
|
1185
|
+
_: 1
|
|
1186
|
+
})
|
|
1187
|
+
]),
|
|
1188
|
+
_: 1
|
|
1189
|
+
}, 8, ["modelValue", "onSubmit"])
|
|
1190
|
+
]),
|
|
1191
|
+
_: 1
|
|
1192
|
+
})
|
|
1193
|
+
]),
|
|
1194
|
+
_: 1
|
|
1195
|
+
}, 8, ["modelValue"]);
|
|
1196
|
+
}
|
|
1197
|
+
const jt = /* @__PURE__ */ G(Lt, [["render", qt], ["__scopeId", "data-v-40c2cac1"]]), Kt = {
|
|
1198
|
+
props: {
|
|
1199
|
+
modelValue: {
|
|
1200
|
+
type: Boolean,
|
|
1201
|
+
required: !0
|
|
1202
|
+
},
|
|
1203
|
+
title: {
|
|
1204
|
+
type: String,
|
|
1205
|
+
required: !0
|
|
1206
|
+
},
|
|
1207
|
+
text: {
|
|
1208
|
+
type: String,
|
|
1209
|
+
required: !0
|
|
1210
|
+
},
|
|
1211
|
+
width: {
|
|
1212
|
+
type: String,
|
|
1213
|
+
required: !0
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
computed: {
|
|
1217
|
+
show: {
|
|
1218
|
+
get() {
|
|
1219
|
+
return this.modelValue;
|
|
1220
|
+
},
|
|
1221
|
+
set(t) {
|
|
1222
|
+
this.$emit("update:modelValue", t);
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
methods: {}
|
|
1227
|
+
}, Wt = ["textContent"], Jt = { class: "pa-2" }, Yt = ["textContent"];
|
|
1228
|
+
function Zt(t, e, s, a, i, n) {
|
|
1229
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("v-row"), v = u("v-card-text"), w = u("v-btn"), x = u("v-card-actions"), b = u("v-card"), R = u("v-dialog");
|
|
1230
|
+
return y(), I(R, {
|
|
1231
|
+
modelValue: n.show,
|
|
1232
|
+
"onUpdate:modelValue": e[1] || (e[1] = (C) => n.show = C),
|
|
1233
|
+
width: s.width
|
|
1234
|
+
}, {
|
|
1235
|
+
default: r(() => [
|
|
1236
|
+
o(b, null, {
|
|
1237
|
+
default: r(() => [
|
|
1238
|
+
o(h, { height: "24" }, {
|
|
1239
|
+
default: r(() => [
|
|
1240
|
+
o(d),
|
|
1241
|
+
S("span", {
|
|
1242
|
+
style: { "white-space": "pre-line" },
|
|
1243
|
+
textContent: z(s.title)
|
|
1244
|
+
}, null, 8, Wt),
|
|
1245
|
+
o(d)
|
|
1246
|
+
]),
|
|
1247
|
+
_: 1
|
|
1248
|
+
}),
|
|
1249
|
+
S("div", Jt, [
|
|
1250
|
+
o(v, null, {
|
|
1251
|
+
default: r(() => [
|
|
1252
|
+
(y(!0), P(se, null, Le(s.text, (C, M) => (y(), I(c, {
|
|
1253
|
+
"no-gutters": "",
|
|
1254
|
+
key: M
|
|
1255
|
+
}, {
|
|
1256
|
+
default: r(() => [
|
|
1257
|
+
S("span", {
|
|
1258
|
+
style: { "white-space": "pre-line" },
|
|
1259
|
+
textContent: z(C)
|
|
1260
|
+
}, null, 8, Yt)
|
|
1261
|
+
]),
|
|
1262
|
+
_: 2
|
|
1263
|
+
}, 1024))), 128))
|
|
1264
|
+
]),
|
|
1265
|
+
_: 1
|
|
1266
|
+
})
|
|
1267
|
+
]),
|
|
1268
|
+
o(x, { class: "px-2" }, {
|
|
1269
|
+
default: r(() => [
|
|
1270
|
+
o(d),
|
|
1271
|
+
o(w, {
|
|
1272
|
+
variant: "flat",
|
|
1273
|
+
onClick: e[0] || (e[0] = (C) => n.show = !n.show)
|
|
1274
|
+
}, {
|
|
1275
|
+
default: r(() => e[2] || (e[2] = [
|
|
1276
|
+
k(" Ok ")
|
|
1277
|
+
])),
|
|
1278
|
+
_: 1
|
|
1279
|
+
})
|
|
1280
|
+
]),
|
|
1281
|
+
_: 1
|
|
1282
|
+
})
|
|
1283
|
+
]),
|
|
1284
|
+
_: 1
|
|
1285
|
+
})
|
|
1286
|
+
]),
|
|
1287
|
+
_: 1
|
|
1288
|
+
}, 8, ["modelValue", "width"]);
|
|
1289
|
+
}
|
|
1290
|
+
const Xt = /* @__PURE__ */ G(Kt, [["render", Zt]]), Qt = {
|
|
1291
|
+
components: {},
|
|
1292
|
+
props: {
|
|
1293
|
+
modelValue: {
|
|
1294
|
+
type: Boolean,
|
|
1295
|
+
required: !0
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
data() {
|
|
1299
|
+
return {
|
|
1300
|
+
api: null,
|
|
1301
|
+
overrides: [],
|
|
1302
|
+
search: "",
|
|
1303
|
+
headers: [
|
|
1304
|
+
{ text: "Target", value: "target_name" },
|
|
1305
|
+
{ text: "Packet", value: "packet_name" },
|
|
1306
|
+
{ text: "Item", value: "item_name" },
|
|
1307
|
+
{ text: "Type", value: "value_type" },
|
|
1308
|
+
{ text: "Value", value: "value" },
|
|
1309
|
+
{ text: "Delete", value: "delete" }
|
|
1310
|
+
]
|
|
1311
|
+
};
|
|
1312
|
+
},
|
|
1313
|
+
computed: {
|
|
1314
|
+
show: {
|
|
1315
|
+
get() {
|
|
1316
|
+
return this.modelValue;
|
|
1317
|
+
},
|
|
1318
|
+
set(t) {
|
|
1319
|
+
this.$emit("update:modelValue", t);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
created: function() {
|
|
1324
|
+
this.api = new Se(), this.getOverrides();
|
|
1325
|
+
},
|
|
1326
|
+
methods: {
|
|
1327
|
+
getOverrides: function() {
|
|
1328
|
+
this.api.get_overrides().then((t) => {
|
|
1329
|
+
this.overrides = t;
|
|
1330
|
+
});
|
|
1331
|
+
},
|
|
1332
|
+
clearOverrides: function() {
|
|
1333
|
+
const t = [
|
|
1334
|
+
...new Map(
|
|
1335
|
+
this.overrides.map((e) => [
|
|
1336
|
+
// Create a key based on target, packet, item so we remove duplicates
|
|
1337
|
+
`${e.target_name}__${e.packet_name}__${e.item_name}`,
|
|
1338
|
+
e
|
|
1339
|
+
])
|
|
1340
|
+
).values()
|
|
1341
|
+
];
|
|
1342
|
+
for (let e of t)
|
|
1343
|
+
this.api.normalize_tlm(
|
|
1344
|
+
e.target_name,
|
|
1345
|
+
e.packet_name,
|
|
1346
|
+
e.item_name,
|
|
1347
|
+
"ALL"
|
|
1348
|
+
).then((s) => {
|
|
1349
|
+
this.overrides = [];
|
|
1350
|
+
});
|
|
1351
|
+
},
|
|
1352
|
+
deleteOverride: function(t) {
|
|
1353
|
+
this.api.normalize_tlm(
|
|
1354
|
+
t.target_name,
|
|
1355
|
+
t.packet_name,
|
|
1356
|
+
t.item_name,
|
|
1357
|
+
t.value_type
|
|
1358
|
+
).then((e) => {
|
|
1359
|
+
let s = this.overrides.indexOf(t);
|
|
1360
|
+
this.overrides.splice(s, 1);
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}, $t = { class: "pa-2" };
|
|
1365
|
+
function ei(t, e, s, a, i, n) {
|
|
1366
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("v-btn"), v = u("v-text-field"), w = u("v-row"), x = u("v-data-table"), b = u("v-card-text"), R = u("v-card-actions"), C = u("v-card"), M = u("v-dialog");
|
|
1367
|
+
return y(), I(M, {
|
|
1368
|
+
modelValue: n.show,
|
|
1369
|
+
"onUpdate:modelValue": e[2] || (e[2] = (_) => n.show = _),
|
|
1370
|
+
width: "1000"
|
|
1371
|
+
}, {
|
|
1372
|
+
default: r(() => [
|
|
1373
|
+
o(C, null, {
|
|
1374
|
+
default: r(() => [
|
|
1375
|
+
o(h, { height: "24" }, {
|
|
1376
|
+
default: r(() => [
|
|
1377
|
+
o(d),
|
|
1378
|
+
e[3] || (e[3] = S("span", null, "Overrides", -1)),
|
|
1379
|
+
o(d)
|
|
1380
|
+
]),
|
|
1381
|
+
_: 1
|
|
1382
|
+
}),
|
|
1383
|
+
S("div", $t, [
|
|
1384
|
+
o(b, null, {
|
|
1385
|
+
default: r(() => [
|
|
1386
|
+
o(w, { class: "ma-1" }, {
|
|
1387
|
+
default: r(() => [
|
|
1388
|
+
o(c, {
|
|
1389
|
+
color: "primary",
|
|
1390
|
+
"data-test": "overrides-dialog-clear-all",
|
|
1391
|
+
onClick: n.clearOverrides
|
|
1392
|
+
}, {
|
|
1393
|
+
default: r(() => e[4] || (e[4] = [
|
|
1394
|
+
k(" Clear All Overrides ")
|
|
1395
|
+
])),
|
|
1396
|
+
_: 1
|
|
1397
|
+
}, 8, ["onClick"]),
|
|
1398
|
+
o(d),
|
|
1399
|
+
o(v, {
|
|
1400
|
+
modelValue: i.search,
|
|
1401
|
+
"onUpdate:modelValue": e[0] || (e[0] = (_) => i.search = _),
|
|
1402
|
+
label: "Search",
|
|
1403
|
+
"prepend-inner-icon": "mdi-magnify",
|
|
1404
|
+
clearable: "",
|
|
1405
|
+
variant: "outlined",
|
|
1406
|
+
density: "compact",
|
|
1407
|
+
"single-line": "",
|
|
1408
|
+
"hide-details": ""
|
|
1409
|
+
}, null, 8, ["modelValue"])
|
|
1410
|
+
]),
|
|
1411
|
+
_: 1
|
|
1412
|
+
}),
|
|
1413
|
+
o(x, {
|
|
1414
|
+
headers: i.headers,
|
|
1415
|
+
items: i.overrides,
|
|
1416
|
+
search: i.search,
|
|
1417
|
+
"items-per-page-options": [100],
|
|
1418
|
+
"multi-sort": "",
|
|
1419
|
+
density: "compact"
|
|
1420
|
+
}, {
|
|
1421
|
+
"item.delete": r(({ item: _ }) => [
|
|
1422
|
+
o(c, {
|
|
1423
|
+
icon: "mdi-delete",
|
|
1424
|
+
variant: "text",
|
|
1425
|
+
"aria-label": "Delete Override",
|
|
1426
|
+
onClick: (U) => n.deleteOverride(_)
|
|
1427
|
+
}, null, 8, ["onClick"])
|
|
1428
|
+
]),
|
|
1429
|
+
_: 1
|
|
1430
|
+
}, 8, ["headers", "items", "search"])
|
|
1431
|
+
]),
|
|
1432
|
+
_: 1
|
|
1433
|
+
})
|
|
1434
|
+
]),
|
|
1435
|
+
o(R, { class: "px-2" }, {
|
|
1436
|
+
default: r(() => [
|
|
1437
|
+
o(d),
|
|
1438
|
+
o(c, {
|
|
1439
|
+
variant: "flat",
|
|
1440
|
+
"data-test": "overrides-dialog-ok",
|
|
1441
|
+
onClick: e[1] || (e[1] = (_) => n.show = !n.show)
|
|
1442
|
+
}, {
|
|
1443
|
+
default: r(() => e[5] || (e[5] = [
|
|
1444
|
+
k(" Ok ")
|
|
1445
|
+
])),
|
|
1446
|
+
_: 1
|
|
1447
|
+
})
|
|
1448
|
+
]),
|
|
1449
|
+
_: 1
|
|
1450
|
+
})
|
|
1451
|
+
]),
|
|
1452
|
+
_: 1
|
|
1453
|
+
})
|
|
1454
|
+
]),
|
|
1455
|
+
_: 1
|
|
1456
|
+
}, 8, ["modelValue"]);
|
|
1457
|
+
}
|
|
1458
|
+
const ti = /* @__PURE__ */ G(Qt, [["render", ei]]), ii = {
|
|
1459
|
+
props: {
|
|
1460
|
+
title: {
|
|
1461
|
+
type: String,
|
|
1462
|
+
default: "Prompt Dialog"
|
|
1463
|
+
},
|
|
1464
|
+
subtitle: {
|
|
1465
|
+
type: String,
|
|
1466
|
+
default: ""
|
|
1467
|
+
},
|
|
1468
|
+
message: {
|
|
1469
|
+
type: String,
|
|
1470
|
+
required: !0
|
|
1471
|
+
},
|
|
1472
|
+
details: {
|
|
1473
|
+
type: String,
|
|
1474
|
+
default: ""
|
|
1475
|
+
},
|
|
1476
|
+
buttons: {
|
|
1477
|
+
type: Array,
|
|
1478
|
+
default: () => []
|
|
1479
|
+
},
|
|
1480
|
+
layout: {
|
|
1481
|
+
type: String,
|
|
1482
|
+
default: "horizontal"
|
|
1483
|
+
// Also 'vertical' or 'combo' when means ComboBox
|
|
1484
|
+
},
|
|
1485
|
+
multiple: {
|
|
1486
|
+
type: Boolean,
|
|
1487
|
+
default: !1,
|
|
1488
|
+
required: !1
|
|
1489
|
+
},
|
|
1490
|
+
modelValue: Boolean
|
|
1491
|
+
},
|
|
1492
|
+
data() {
|
|
1493
|
+
return {
|
|
1494
|
+
selectOkDisabled: !0,
|
|
1495
|
+
selectedItem: null
|
|
1496
|
+
};
|
|
1497
|
+
},
|
|
1498
|
+
computed: {
|
|
1499
|
+
show: {
|
|
1500
|
+
get() {
|
|
1501
|
+
return this.modelValue;
|
|
1502
|
+
},
|
|
1503
|
+
set(t) {
|
|
1504
|
+
this.$emit("update:modelValue", t);
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
layoutClass() {
|
|
1508
|
+
let t = "px-2 d-flex align-start";
|
|
1509
|
+
return this.layout === "vertical" ? `${t} flex-column` : `${t} flex-row`;
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
methods: {
|
|
1513
|
+
submitWrapper: function(t) {
|
|
1514
|
+
this.selectedItem = t, this.submitHandler();
|
|
1515
|
+
},
|
|
1516
|
+
submitHandler: function() {
|
|
1517
|
+
this.$emit("response", this.selectedItem);
|
|
1518
|
+
},
|
|
1519
|
+
cancelHandler: function() {
|
|
1520
|
+
this.$emit("response", "Cancel");
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
}, si = ["textContent"], ni = { class: "pa-2" }, oi = ["textContent"], li = ["textContent"], ri = { key: 0 }, ai = { key: 1 };
|
|
1524
|
+
function ui(t, e, s, a, i, n) {
|
|
1525
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("v-card-subtitle"), v = u("v-row"), w = u("v-card-text"), x = u("v-select"), b = u("v-btn"), R = u("v-card-actions"), C = u("v-card"), M = u("v-dialog");
|
|
1526
|
+
return y(), I(M, {
|
|
1527
|
+
modelValue: n.show,
|
|
1528
|
+
"onUpdate:modelValue": e[2] || (e[2] = (_) => n.show = _),
|
|
1529
|
+
persistent: "",
|
|
1530
|
+
width: "600"
|
|
1531
|
+
}, {
|
|
1532
|
+
default: r(() => [
|
|
1533
|
+
o(C, null, {
|
|
1534
|
+
default: r(() => [
|
|
1535
|
+
o(h, { height: "24" }, {
|
|
1536
|
+
default: r(() => [
|
|
1537
|
+
o(d),
|
|
1538
|
+
S("span", {
|
|
1539
|
+
class: "text",
|
|
1540
|
+
textContent: z(s.title)
|
|
1541
|
+
}, null, 8, si),
|
|
1542
|
+
o(d)
|
|
1543
|
+
]),
|
|
1544
|
+
_: 1
|
|
1545
|
+
}),
|
|
1546
|
+
S("div", ni, [
|
|
1547
|
+
o(w, { class: "text" }, {
|
|
1548
|
+
default: r(() => [
|
|
1549
|
+
s.subtitle ? (y(), I(v, { key: 0 }, {
|
|
1550
|
+
default: r(() => [
|
|
1551
|
+
o(c, null, {
|
|
1552
|
+
default: r(() => [
|
|
1553
|
+
k(z(s.subtitle), 1)
|
|
1554
|
+
]),
|
|
1555
|
+
_: 1
|
|
1556
|
+
})
|
|
1557
|
+
]),
|
|
1558
|
+
_: 1
|
|
1559
|
+
})) : D("", !0),
|
|
1560
|
+
o(v, { class: "mt-1" }, {
|
|
1561
|
+
default: r(() => [
|
|
1562
|
+
S("span", {
|
|
1563
|
+
textContent: z(s.message)
|
|
1564
|
+
}, null, 8, oi)
|
|
1565
|
+
]),
|
|
1566
|
+
_: 1
|
|
1567
|
+
}),
|
|
1568
|
+
s.details ? (y(), I(v, {
|
|
1569
|
+
key: 1,
|
|
1570
|
+
class: "mt-1"
|
|
1571
|
+
}, {
|
|
1572
|
+
default: r(() => [
|
|
1573
|
+
S("span", {
|
|
1574
|
+
textContent: z(s.details)
|
|
1575
|
+
}, null, 8, li)
|
|
1576
|
+
]),
|
|
1577
|
+
_: 1
|
|
1578
|
+
})) : D("", !0)
|
|
1579
|
+
]),
|
|
1580
|
+
_: 1
|
|
1581
|
+
})
|
|
1582
|
+
]),
|
|
1583
|
+
s.layout === "combo" ? (y(), P("div", ri, [
|
|
1584
|
+
o(v, { class: "ma-2" }, {
|
|
1585
|
+
default: r(() => [
|
|
1586
|
+
o(x, {
|
|
1587
|
+
modelValue: i.selectedItem,
|
|
1588
|
+
"onUpdate:modelValue": [
|
|
1589
|
+
e[0] || (e[0] = (_) => i.selectedItem = _),
|
|
1590
|
+
e[1] || (e[1] = (_) => i.selectOkDisabled = !1)
|
|
1591
|
+
],
|
|
1592
|
+
label: "Select",
|
|
1593
|
+
color: "secondary",
|
|
1594
|
+
class: "ma-1",
|
|
1595
|
+
"data-test": "prompt-select",
|
|
1596
|
+
items: s.buttons,
|
|
1597
|
+
multiple: s.multiple === !0
|
|
1598
|
+
}, null, 8, ["modelValue", "items", "multiple"])
|
|
1599
|
+
]),
|
|
1600
|
+
_: 1
|
|
1601
|
+
}),
|
|
1602
|
+
o(R, { class: "px-2" }, {
|
|
1603
|
+
default: r(() => [
|
|
1604
|
+
o(d),
|
|
1605
|
+
o(b, {
|
|
1606
|
+
variant: "outlined",
|
|
1607
|
+
"data-test": "prompt-cancel",
|
|
1608
|
+
onClick: n.cancelHandler
|
|
1609
|
+
}, {
|
|
1610
|
+
default: r(() => e[3] || (e[3] = [
|
|
1611
|
+
k(" Cancel ")
|
|
1612
|
+
])),
|
|
1613
|
+
_: 1
|
|
1614
|
+
}, 8, ["onClick"]),
|
|
1615
|
+
o(b, {
|
|
1616
|
+
variant: "flat",
|
|
1617
|
+
"data-test": "prompt-ok",
|
|
1618
|
+
disabled: i.selectOkDisabled,
|
|
1619
|
+
onClick: n.submitHandler
|
|
1620
|
+
}, {
|
|
1621
|
+
default: r(() => e[4] || (e[4] = [
|
|
1622
|
+
k(" Ok ")
|
|
1623
|
+
])),
|
|
1624
|
+
_: 1
|
|
1625
|
+
}, 8, ["disabled", "onClick"])
|
|
1626
|
+
]),
|
|
1627
|
+
_: 1
|
|
1628
|
+
})
|
|
1629
|
+
])) : (y(), P("div", ai, [
|
|
1630
|
+
o(R, {
|
|
1631
|
+
class: Ye(n.layoutClass)
|
|
1632
|
+
}, {
|
|
1633
|
+
default: r(() => [
|
|
1634
|
+
o(d),
|
|
1635
|
+
o(b, {
|
|
1636
|
+
variant: "outlined",
|
|
1637
|
+
"data-test": "prompt-cancel",
|
|
1638
|
+
onClick: n.cancelHandler
|
|
1639
|
+
}, {
|
|
1640
|
+
default: r(() => e[5] || (e[5] = [
|
|
1641
|
+
k(" Cancel ")
|
|
1642
|
+
])),
|
|
1643
|
+
_: 1
|
|
1644
|
+
}, 8, ["onClick"]),
|
|
1645
|
+
(y(!0), P(se, null, Le(s.buttons, (_, U) => (y(), P("div", { key: U }, [
|
|
1646
|
+
o(b, {
|
|
1647
|
+
variant: "flat",
|
|
1648
|
+
"data-test": `prompt-${_.text}`,
|
|
1649
|
+
onClick: (N) => n.submitWrapper(_.value)
|
|
1650
|
+
}, {
|
|
1651
|
+
default: r(() => [
|
|
1652
|
+
k(z(_.text), 1)
|
|
1653
|
+
]),
|
|
1654
|
+
_: 2
|
|
1655
|
+
}, 1032, ["data-test", "onClick"])
|
|
1656
|
+
]))), 128))
|
|
1657
|
+
]),
|
|
1658
|
+
_: 1
|
|
1659
|
+
}, 8, ["class"])
|
|
1660
|
+
]))
|
|
1661
|
+
]),
|
|
1662
|
+
_: 1
|
|
1663
|
+
})
|
|
1664
|
+
]),
|
|
1665
|
+
_: 1
|
|
1666
|
+
}, 8, ["modelValue"]);
|
|
1667
|
+
}
|
|
1668
|
+
const di = /* @__PURE__ */ G(ii, [["render", ui], ["__scopeId", "data-v-3c1d359a"]]), ci = {
|
|
1669
|
+
components: {},
|
|
1670
|
+
props: {
|
|
1671
|
+
modelValue: {
|
|
1672
|
+
type: Boolean,
|
|
1673
|
+
required: !0
|
|
1674
|
+
},
|
|
1675
|
+
text: {
|
|
1676
|
+
type: String,
|
|
1677
|
+
required: !0
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
computed: {
|
|
1681
|
+
show: {
|
|
1682
|
+
get() {
|
|
1683
|
+
return this.modelValue;
|
|
1684
|
+
},
|
|
1685
|
+
set(t) {
|
|
1686
|
+
this.$emit("update:modelValue", t);
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
mounted() {
|
|
1691
|
+
setTimeout(() => {
|
|
1692
|
+
this.$refs.okButton.$el.focus();
|
|
1693
|
+
});
|
|
1694
|
+
},
|
|
1695
|
+
methods: {
|
|
1696
|
+
downloadResults() {
|
|
1697
|
+
const t = new Blob([this.text], {
|
|
1698
|
+
type: "text/plain"
|
|
1699
|
+
}), e = document.createElement("a");
|
|
1700
|
+
e.href = URL.createObjectURL(t), e.setAttribute(
|
|
1701
|
+
"download",
|
|
1702
|
+
we(Date.now(), "yyyy_MM_dd_HH_mm_ss") + "_suite_results.txt"
|
|
1703
|
+
), e.click();
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}, pi = { class: "pa-2" };
|
|
1707
|
+
function mi(t, e, s, a, i, n) {
|
|
1708
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("v-textarea"), v = u("v-card-text"), w = u("v-btn"), x = u("v-card-actions"), b = u("v-card"), R = u("v-dialog");
|
|
1709
|
+
return y(), I(R, {
|
|
1710
|
+
modelValue: n.show,
|
|
1711
|
+
"onUpdate:modelValue": e[1] || (e[1] = (C) => n.show = C),
|
|
1712
|
+
scrollable: "",
|
|
1713
|
+
width: "800"
|
|
1714
|
+
}, {
|
|
1715
|
+
default: r(() => [
|
|
1716
|
+
o(b, null, {
|
|
1717
|
+
default: r(() => [
|
|
1718
|
+
o(h, { height: "24" }, {
|
|
1719
|
+
default: r(() => [
|
|
1720
|
+
o(d),
|
|
1721
|
+
e[2] || (e[2] = S("span", null, " Script Results ", -1)),
|
|
1722
|
+
o(d)
|
|
1723
|
+
]),
|
|
1724
|
+
_: 1
|
|
1725
|
+
}),
|
|
1726
|
+
S("div", pi, [
|
|
1727
|
+
o(v, { style: { width: "100%", "max-height": "80vh", overflow: "auto" } }, {
|
|
1728
|
+
default: r(() => [
|
|
1729
|
+
o(c, {
|
|
1730
|
+
readonly: "",
|
|
1731
|
+
"hide-details": "",
|
|
1732
|
+
density: "compact",
|
|
1733
|
+
"auto-grow": "",
|
|
1734
|
+
"model-value": s.text
|
|
1735
|
+
}, null, 8, ["model-value"])
|
|
1736
|
+
]),
|
|
1737
|
+
_: 1
|
|
1738
|
+
})
|
|
1739
|
+
]),
|
|
1740
|
+
o(x, { class: "px-2" }, {
|
|
1741
|
+
default: r(() => [
|
|
1742
|
+
o(d),
|
|
1743
|
+
o(w, {
|
|
1744
|
+
variant: "outlined",
|
|
1745
|
+
onClick: n.downloadResults
|
|
1746
|
+
}, {
|
|
1747
|
+
default: r(() => e[3] || (e[3] = [
|
|
1748
|
+
k(" Download ")
|
|
1749
|
+
])),
|
|
1750
|
+
_: 1
|
|
1751
|
+
}, 8, ["onClick"]),
|
|
1752
|
+
o(w, {
|
|
1753
|
+
ref: "okButton",
|
|
1754
|
+
variant: "flat",
|
|
1755
|
+
onClick: e[0] || (e[0] = (C) => n.show = !n.show)
|
|
1756
|
+
}, {
|
|
1757
|
+
default: r(() => e[4] || (e[4] = [
|
|
1758
|
+
k(" Ok ")
|
|
1759
|
+
])),
|
|
1760
|
+
_: 1
|
|
1761
|
+
}, 512)
|
|
1762
|
+
]),
|
|
1763
|
+
_: 1
|
|
1764
|
+
})
|
|
1765
|
+
]),
|
|
1766
|
+
_: 1
|
|
1767
|
+
})
|
|
1768
|
+
]),
|
|
1769
|
+
_: 1
|
|
1770
|
+
}, 8, ["modelValue"]);
|
|
1771
|
+
}
|
|
1772
|
+
const hi = /* @__PURE__ */ G(ci, [["render", mi]]), fi = {
|
|
1773
|
+
components: {
|
|
1774
|
+
EnvironmentChooser: xt
|
|
1775
|
+
},
|
|
1776
|
+
props: {
|
|
1777
|
+
modelValue: {
|
|
1778
|
+
type: Boolean,
|
|
1779
|
+
required: !0
|
|
1780
|
+
},
|
|
1781
|
+
inputEnvironment: {
|
|
1782
|
+
type: Array,
|
|
1783
|
+
required: !0
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
data() {
|
|
1787
|
+
return {
|
|
1788
|
+
selected: []
|
|
1789
|
+
};
|
|
1790
|
+
},
|
|
1791
|
+
computed: {
|
|
1792
|
+
show: {
|
|
1793
|
+
get() {
|
|
1794
|
+
return this.modelValue;
|
|
1795
|
+
},
|
|
1796
|
+
set(t) {
|
|
1797
|
+
this.$emit("update:modelValue", t);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
mounted: function() {
|
|
1802
|
+
this.loadEnvironment();
|
|
1803
|
+
},
|
|
1804
|
+
methods: {
|
|
1805
|
+
loadEnvironment: function() {
|
|
1806
|
+
this.selected = [...this.inputEnvironment];
|
|
1807
|
+
},
|
|
1808
|
+
updateEnvironment: function() {
|
|
1809
|
+
this.$emit("environment", this.selected), this.show = !this.show;
|
|
1810
|
+
},
|
|
1811
|
+
cancel: function() {
|
|
1812
|
+
this.show = !this.show;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}, gi = { class: "pa-2" };
|
|
1816
|
+
function vi(t, e, s, a, i, n) {
|
|
1817
|
+
const d = u("v-spacer"), h = u("v-toolbar"), c = u("environment-chooser"), v = u("v-card-text"), w = u("v-btn"), x = u("v-card-actions"), b = u("v-card"), R = u("v-dialog");
|
|
1818
|
+
return y(), I(R, {
|
|
1819
|
+
modelValue: n.show,
|
|
1820
|
+
"onUpdate:modelValue": e[1] || (e[1] = (C) => n.show = C),
|
|
1821
|
+
width: "600"
|
|
1822
|
+
}, {
|
|
1823
|
+
default: r(() => [
|
|
1824
|
+
o(b, null, {
|
|
1825
|
+
default: r(() => [
|
|
1826
|
+
o(h, { height: "24" }, {
|
|
1827
|
+
default: r(() => [
|
|
1828
|
+
o(d),
|
|
1829
|
+
e[2] || (e[2] = S("span", null, "Script Environment Variables", -1)),
|
|
1830
|
+
o(d)
|
|
1831
|
+
]),
|
|
1832
|
+
_: 1
|
|
1833
|
+
}),
|
|
1834
|
+
S("div", gi, [
|
|
1835
|
+
o(v, null, {
|
|
1836
|
+
default: r(() => [
|
|
1837
|
+
o(c, {
|
|
1838
|
+
modelValue: i.selected,
|
|
1839
|
+
"onUpdate:modelValue": e[0] || (e[0] = (C) => i.selected = C)
|
|
1840
|
+
}, null, 8, ["modelValue"])
|
|
1841
|
+
]),
|
|
1842
|
+
_: 1
|
|
1843
|
+
})
|
|
1844
|
+
]),
|
|
1845
|
+
o(x, { class: "px-2" }, {
|
|
1846
|
+
default: r(() => [
|
|
1847
|
+
o(d),
|
|
1848
|
+
o(w, {
|
|
1849
|
+
variant: "outlined",
|
|
1850
|
+
"data-test": "environment-dialog-cancel",
|
|
1851
|
+
onClick: n.cancel
|
|
1852
|
+
}, {
|
|
1853
|
+
default: r(() => e[3] || (e[3] = [
|
|
1854
|
+
k(" Cancel ")
|
|
1855
|
+
])),
|
|
1856
|
+
_: 1
|
|
1857
|
+
}, 8, ["onClick"]),
|
|
1858
|
+
o(w, {
|
|
1859
|
+
variant: "flat",
|
|
1860
|
+
"data-test": "environment-dialog-save",
|
|
1861
|
+
disabled: !!t.inputError,
|
|
1862
|
+
onClick: n.updateEnvironment
|
|
1863
|
+
}, {
|
|
1864
|
+
default: r(() => e[4] || (e[4] = [
|
|
1865
|
+
k(" Save ")
|
|
1866
|
+
])),
|
|
1867
|
+
_: 1
|
|
1868
|
+
}, 8, ["disabled", "onClick"])
|
|
1869
|
+
]),
|
|
1870
|
+
_: 1
|
|
1871
|
+
})
|
|
1872
|
+
]),
|
|
1873
|
+
_: 1
|
|
1874
|
+
})
|
|
1875
|
+
]),
|
|
1876
|
+
_: 1
|
|
1877
|
+
}, 8, ["modelValue"]);
|
|
1878
|
+
}
|
|
1879
|
+
const _i = /* @__PURE__ */ G(fi, [["render", vi]]), bi = {
|
|
1880
|
+
props: {
|
|
1881
|
+
suiteMap: {
|
|
1882
|
+
type: Object,
|
|
1883
|
+
required: !0
|
|
1884
|
+
},
|
|
1885
|
+
disableButtons: {
|
|
1886
|
+
type: Boolean,
|
|
1887
|
+
required: !0
|
|
1888
|
+
},
|
|
1889
|
+
filename: {
|
|
1890
|
+
type: String,
|
|
1891
|
+
required: !0
|
|
1892
|
+
}
|
|
1893
|
+
},
|
|
1894
|
+
data() {
|
|
1895
|
+
return {
|
|
1896
|
+
suites: [],
|
|
1897
|
+
groups: [],
|
|
1898
|
+
scripts: [],
|
|
1899
|
+
suite: "",
|
|
1900
|
+
group: "",
|
|
1901
|
+
script: "",
|
|
1902
|
+
options: ["pauseOnError", "manual", "continueAfterError"],
|
|
1903
|
+
userInfo: {}
|
|
1904
|
+
};
|
|
1905
|
+
},
|
|
1906
|
+
computed: {
|
|
1907
|
+
checkedManualTooltip() {
|
|
1908
|
+
return this.filename.endsWith(".py") ? "Checked sets the RunningScript.manual variable to True" : "Checked sets the $manual variable to true";
|
|
1909
|
+
},
|
|
1910
|
+
uncheckedManualTooltip() {
|
|
1911
|
+
return this.filename.endsWith(".py") ? "Unchecked sets the RunningScript.manual variable to False" : "Unchecked sets the $manual variable to false";
|
|
1912
|
+
},
|
|
1913
|
+
setupSuiteEnabled() {
|
|
1914
|
+
return !!(this.suite && this.suiteMap[this.suite].setup);
|
|
1915
|
+
},
|
|
1916
|
+
teardownSuiteEnabled() {
|
|
1917
|
+
return !!(this.suite && this.suiteMap[this.suite].teardown);
|
|
1918
|
+
},
|
|
1919
|
+
setupGroupEnabled() {
|
|
1920
|
+
return !!(this.suite && this.group && this.suiteMap[this.suite].groups[this.group].setup);
|
|
1921
|
+
},
|
|
1922
|
+
teardownGroupEnabled() {
|
|
1923
|
+
return !!(this.suite && this.group && this.suiteMap[this.suite].groups[this.group].teardown);
|
|
1924
|
+
},
|
|
1925
|
+
scriptNames() {
|
|
1926
|
+
return this.scripts.map((t) => ({
|
|
1927
|
+
// strip script_ or test_ from the name
|
|
1928
|
+
title: t.replace(/^(script_|test_)/, ""),
|
|
1929
|
+
value: t
|
|
1930
|
+
}));
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
// Watch the suiteMap so we can recreate the suites and set the initial value
|
|
1934
|
+
watch: {
|
|
1935
|
+
suiteMap: {
|
|
1936
|
+
handler: function(t, e) {
|
|
1937
|
+
this.updateSuiteMap();
|
|
1938
|
+
},
|
|
1939
|
+
deep: !0
|
|
1940
|
+
// Deep watcher because suiteMap is a nested Object
|
|
1941
|
+
}
|
|
1942
|
+
},
|
|
1943
|
+
created() {
|
|
1944
|
+
this.userInfo = JSON.parse(localStorage.script_runner__userinfo), this.initSuites(), this.$emit("loaded");
|
|
1945
|
+
},
|
|
1946
|
+
methods: {
|
|
1947
|
+
updateSuiteMap() {
|
|
1948
|
+
this.suites = Object.keys(this.suiteMap), this.suiteMap[this.suite] == null || this.suiteMap[this.suite].groups[this.group] == null ? this.initSuites() : (this.groups = Object.keys(this.suiteMap[this.suite].groups), this.scripts = this.suiteMap[this.suite].groups[this.group].scripts);
|
|
1949
|
+
},
|
|
1950
|
+
initSuites() {
|
|
1951
|
+
this.suites = Object.keys(this.suiteMap), this.suiteChanged(this.suites[0]);
|
|
1952
|
+
},
|
|
1953
|
+
suiteChanged(t) {
|
|
1954
|
+
this.suite = t, this.group = "", this.script = "", this.groups = Object.keys(this.suiteMap[t].groups), this.groupChanged(this.groups[0]);
|
|
1955
|
+
},
|
|
1956
|
+
groupChanged(t) {
|
|
1957
|
+
this.group = t, this.script = "", this.scripts = this.suiteMap[this.suite].groups[t].scripts, this.scriptChanged(this.scripts[0]);
|
|
1958
|
+
},
|
|
1959
|
+
scriptChanged(t) {
|
|
1960
|
+
this.script = t;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
}, wi = { id: "tr-container" };
|
|
1964
|
+
function yi(t, e, s, a, i, n) {
|
|
1965
|
+
const d = u("v-checkbox"), h = u("v-tooltip"), c = u("v-col"), v = u("v-row"), w = u("v-select"), x = u("v-btn");
|
|
1966
|
+
return y(), P("div", null, [
|
|
1967
|
+
S("div", wi, [
|
|
1968
|
+
o(v, {
|
|
1969
|
+
"no-gutters": "",
|
|
1970
|
+
align: "center"
|
|
1971
|
+
}, {
|
|
1972
|
+
default: r(() => [
|
|
1973
|
+
o(c, { cols: "4" }, {
|
|
1974
|
+
default: r(() => [
|
|
1975
|
+
o(v, { "no-gutters": "" }, {
|
|
1976
|
+
default: r(() => [
|
|
1977
|
+
o(c, { cols: "6" }, {
|
|
1978
|
+
default: r(() => [
|
|
1979
|
+
o(h, {
|
|
1980
|
+
"open-delay": 600,
|
|
1981
|
+
location: "top"
|
|
1982
|
+
}, {
|
|
1983
|
+
activator: r(({ props: b }) => [
|
|
1984
|
+
S("div", $(ee(b)), [
|
|
1985
|
+
o(d, {
|
|
1986
|
+
modelValue: i.options,
|
|
1987
|
+
"onUpdate:modelValue": e[0] || (e[0] = (R) => i.options = R),
|
|
1988
|
+
label: "Pause on Error",
|
|
1989
|
+
value: "pauseOnError",
|
|
1990
|
+
"hide-details": "",
|
|
1991
|
+
"data-test": "pause-on-error"
|
|
1992
|
+
}, null, 8, ["modelValue"])
|
|
1993
|
+
], 16)
|
|
1994
|
+
]),
|
|
1995
|
+
default: r(() => [
|
|
1996
|
+
e[16] || (e[16] = S("span", null, [
|
|
1997
|
+
k(" Checked pauses the script when an error is encountered"),
|
|
1998
|
+
S("br"),
|
|
1999
|
+
k(" Unchecked continues without user interaction ")
|
|
2000
|
+
], -1))
|
|
2001
|
+
]),
|
|
2002
|
+
_: 1
|
|
2003
|
+
})
|
|
2004
|
+
]),
|
|
2005
|
+
_: 1
|
|
2006
|
+
}),
|
|
2007
|
+
o(c, { cols: "6" }, {
|
|
2008
|
+
default: r(() => [
|
|
2009
|
+
o(h, {
|
|
2010
|
+
"open-delay": 600,
|
|
2011
|
+
location: "top"
|
|
2012
|
+
}, {
|
|
2013
|
+
activator: r(({ props: b }) => [
|
|
2014
|
+
S("div", $(ee(b)), [
|
|
2015
|
+
o(d, {
|
|
2016
|
+
modelValue: i.options,
|
|
2017
|
+
"onUpdate:modelValue": e[1] || (e[1] = (R) => i.options = R),
|
|
2018
|
+
label: "Manual",
|
|
2019
|
+
value: "manual",
|
|
2020
|
+
"hide-details": "",
|
|
2021
|
+
"data-test": "manual"
|
|
2022
|
+
}, null, 8, ["modelValue"])
|
|
2023
|
+
], 16)
|
|
2024
|
+
]),
|
|
2025
|
+
default: r(() => [
|
|
2026
|
+
S("span", null, [
|
|
2027
|
+
k(z(n.checkedManualTooltip), 1),
|
|
2028
|
+
e[17] || (e[17] = S("br", null, null, -1)),
|
|
2029
|
+
k(" " + z(n.uncheckedManualTooltip), 1)
|
|
2030
|
+
])
|
|
2031
|
+
]),
|
|
2032
|
+
_: 1
|
|
2033
|
+
})
|
|
2034
|
+
]),
|
|
2035
|
+
_: 1
|
|
2036
|
+
})
|
|
2037
|
+
]),
|
|
2038
|
+
_: 1
|
|
2039
|
+
})
|
|
2040
|
+
]),
|
|
2041
|
+
_: 1
|
|
2042
|
+
}),
|
|
2043
|
+
o(c, { cols: "8" }, {
|
|
2044
|
+
default: r(() => [
|
|
2045
|
+
o(v, {
|
|
2046
|
+
"no-gutters": "",
|
|
2047
|
+
justify: "end"
|
|
2048
|
+
}, {
|
|
2049
|
+
default: r(() => [
|
|
2050
|
+
o(c, { cols: "5" }, {
|
|
2051
|
+
default: r(() => [
|
|
2052
|
+
o(w, {
|
|
2053
|
+
modelValue: i.suite,
|
|
2054
|
+
"onUpdate:modelValue": [
|
|
2055
|
+
e[2] || (e[2] = (b) => i.suite = b),
|
|
2056
|
+
n.suiteChanged
|
|
2057
|
+
],
|
|
2058
|
+
label: "Suite:",
|
|
2059
|
+
class: "mb-2 mr-2",
|
|
2060
|
+
"hide-details": "",
|
|
2061
|
+
density: "compact",
|
|
2062
|
+
variant: "outlined",
|
|
2063
|
+
items: i.suites,
|
|
2064
|
+
"data-test": "select-suite"
|
|
2065
|
+
}, null, 8, ["modelValue", "items", "onUpdate:modelValue"])
|
|
2066
|
+
]),
|
|
2067
|
+
_: 1
|
|
2068
|
+
}),
|
|
2069
|
+
o(c, { cols: "auto" }, {
|
|
2070
|
+
default: r(() => [
|
|
2071
|
+
o(x, {
|
|
2072
|
+
color: "primary",
|
|
2073
|
+
class: "mr-2",
|
|
2074
|
+
disabled: s.disableButtons || !i.userInfo.execute,
|
|
2075
|
+
"data-test": "start-suite",
|
|
2076
|
+
onClick: e[3] || (e[3] = (b) => t.$emit("button", { method: "start", suite: i.suite, options: i.options }))
|
|
2077
|
+
}, {
|
|
2078
|
+
default: r(() => e[18] || (e[18] = [
|
|
2079
|
+
k(" Start ")
|
|
2080
|
+
])),
|
|
2081
|
+
_: 1
|
|
2082
|
+
}, 8, ["disabled"]),
|
|
2083
|
+
o(x, {
|
|
2084
|
+
color: "primary",
|
|
2085
|
+
class: "mr-2",
|
|
2086
|
+
"data-test": "setup-suite",
|
|
2087
|
+
disabled: s.disableButtons || !n.setupSuiteEnabled || !i.userInfo.execute,
|
|
2088
|
+
onClick: e[4] || (e[4] = (b) => t.$emit("button", { method: "setup", suite: i.suite, options: i.options }))
|
|
2089
|
+
}, {
|
|
2090
|
+
default: r(() => e[19] || (e[19] = [
|
|
2091
|
+
k(" Setup ")
|
|
2092
|
+
])),
|
|
2093
|
+
_: 1
|
|
2094
|
+
}, 8, ["disabled"]),
|
|
2095
|
+
o(x, {
|
|
2096
|
+
color: "primary",
|
|
2097
|
+
"data-test": "teardown-suite",
|
|
2098
|
+
disabled: s.disableButtons || !n.teardownSuiteEnabled || !i.userInfo.execute,
|
|
2099
|
+
onClick: e[5] || (e[5] = (b) => t.$emit("button", { method: "teardown", suite: i.suite, options: i.options }))
|
|
2100
|
+
}, {
|
|
2101
|
+
default: r(() => e[20] || (e[20] = [
|
|
2102
|
+
k(" Teardown ")
|
|
2103
|
+
])),
|
|
2104
|
+
_: 1
|
|
2105
|
+
}, 8, ["disabled"])
|
|
2106
|
+
]),
|
|
2107
|
+
_: 1
|
|
2108
|
+
})
|
|
2109
|
+
]),
|
|
2110
|
+
_: 1
|
|
2111
|
+
})
|
|
2112
|
+
]),
|
|
2113
|
+
_: 1
|
|
2114
|
+
})
|
|
2115
|
+
]),
|
|
2116
|
+
_: 1
|
|
2117
|
+
}),
|
|
2118
|
+
o(v, { "no-gutters": "" }, {
|
|
2119
|
+
default: r(() => [
|
|
2120
|
+
o(c, { cols: "4" }, {
|
|
2121
|
+
default: r(() => [
|
|
2122
|
+
o(v, { "no-gutters": "" }, {
|
|
2123
|
+
default: r(() => [
|
|
2124
|
+
o(c, { cols: "6" }, {
|
|
2125
|
+
default: r(() => [
|
|
2126
|
+
o(h, {
|
|
2127
|
+
"open-delay": 600,
|
|
2128
|
+
location: "top"
|
|
2129
|
+
}, {
|
|
2130
|
+
activator: r(({ props: b }) => [
|
|
2131
|
+
S("div", $(ee(b)), [
|
|
2132
|
+
o(d, {
|
|
2133
|
+
modelValue: i.options,
|
|
2134
|
+
"onUpdate:modelValue": e[6] || (e[6] = (R) => i.options = R),
|
|
2135
|
+
label: "Continue after Error",
|
|
2136
|
+
value: "continueAfterError",
|
|
2137
|
+
"hide-details": "",
|
|
2138
|
+
"data-test": "continue-after-error"
|
|
2139
|
+
}, null, 8, ["modelValue"])
|
|
2140
|
+
], 16)
|
|
2141
|
+
]),
|
|
2142
|
+
default: r(() => [
|
|
2143
|
+
e[21] || (e[21] = S("span", null, [
|
|
2144
|
+
k(" Checked allows the script to continue when an error is encountered"),
|
|
2145
|
+
S("br"),
|
|
2146
|
+
k(" Unchecked forces the current script to end ")
|
|
2147
|
+
], -1))
|
|
2148
|
+
]),
|
|
2149
|
+
_: 1
|
|
2150
|
+
})
|
|
2151
|
+
]),
|
|
2152
|
+
_: 1
|
|
2153
|
+
}),
|
|
2154
|
+
o(c, { cols: "6" }, {
|
|
2155
|
+
default: r(() => [
|
|
2156
|
+
o(h, {
|
|
2157
|
+
"open-delay": 600,
|
|
2158
|
+
location: "top"
|
|
2159
|
+
}, {
|
|
2160
|
+
activator: r(({ props: b }) => [
|
|
2161
|
+
S("div", $(ee(b)), [
|
|
2162
|
+
o(d, {
|
|
2163
|
+
modelValue: i.options,
|
|
2164
|
+
"onUpdate:modelValue": e[7] || (e[7] = (R) => i.options = R),
|
|
2165
|
+
label: "Loop",
|
|
2166
|
+
value: "loop",
|
|
2167
|
+
"hide-details": "",
|
|
2168
|
+
"data-test": "loop"
|
|
2169
|
+
}, null, 8, ["modelValue"])
|
|
2170
|
+
], 16)
|
|
2171
|
+
]),
|
|
2172
|
+
default: r(() => [
|
|
2173
|
+
e[22] || (e[22] = S("span", null, [
|
|
2174
|
+
k(" Checked continuously executes until explicitly stopped"),
|
|
2175
|
+
S("br"),
|
|
2176
|
+
k(" Unchecked executes only the started script(s) ")
|
|
2177
|
+
], -1))
|
|
2178
|
+
]),
|
|
2179
|
+
_: 1
|
|
2180
|
+
})
|
|
2181
|
+
]),
|
|
2182
|
+
_: 1
|
|
2183
|
+
})
|
|
2184
|
+
]),
|
|
2185
|
+
_: 1
|
|
2186
|
+
})
|
|
2187
|
+
]),
|
|
2188
|
+
_: 1
|
|
2189
|
+
}),
|
|
2190
|
+
o(c, { cols: "8" }, {
|
|
2191
|
+
default: r(() => [
|
|
2192
|
+
o(v, {
|
|
2193
|
+
"no-gutters": "",
|
|
2194
|
+
justify: "end"
|
|
2195
|
+
}, {
|
|
2196
|
+
default: r(() => [
|
|
2197
|
+
o(c, { cols: "5" }, {
|
|
2198
|
+
default: r(() => [
|
|
2199
|
+
o(w, {
|
|
2200
|
+
modelValue: i.group,
|
|
2201
|
+
"onUpdate:modelValue": [
|
|
2202
|
+
e[8] || (e[8] = (b) => i.group = b),
|
|
2203
|
+
n.groupChanged
|
|
2204
|
+
],
|
|
2205
|
+
label: "Group:",
|
|
2206
|
+
class: "mb-2 mr-2",
|
|
2207
|
+
"hide-details": "",
|
|
2208
|
+
density: "compact",
|
|
2209
|
+
variant: "outlined",
|
|
2210
|
+
items: i.groups,
|
|
2211
|
+
"data-test": "select-group"
|
|
2212
|
+
}, null, 8, ["modelValue", "items", "onUpdate:modelValue"])
|
|
2213
|
+
]),
|
|
2214
|
+
_: 1
|
|
2215
|
+
}),
|
|
2216
|
+
o(c, { cols: "auto" }, {
|
|
2217
|
+
default: r(() => [
|
|
2218
|
+
o(x, {
|
|
2219
|
+
color: "primary",
|
|
2220
|
+
class: "mr-2",
|
|
2221
|
+
disabled: s.disableButtons || !i.userInfo.execute,
|
|
2222
|
+
"data-test": "start-group",
|
|
2223
|
+
onClick: e[9] || (e[9] = (b) => t.$emit("button", { method: "start", suite: i.suite, group: i.group, options: i.options }))
|
|
2224
|
+
}, {
|
|
2225
|
+
default: r(() => e[23] || (e[23] = [
|
|
2226
|
+
k(" Start ")
|
|
2227
|
+
])),
|
|
2228
|
+
_: 1
|
|
2229
|
+
}, 8, ["disabled"]),
|
|
2230
|
+
o(x, {
|
|
2231
|
+
color: "primary",
|
|
2232
|
+
class: "mr-2",
|
|
2233
|
+
"data-test": "setup-group",
|
|
2234
|
+
disabled: s.disableButtons || !n.setupGroupEnabled || !i.userInfo.execute,
|
|
2235
|
+
onClick: e[10] || (e[10] = (b) => t.$emit("button", { method: "setup", suite: i.suite, group: i.group, options: i.options }))
|
|
2236
|
+
}, {
|
|
2237
|
+
default: r(() => e[24] || (e[24] = [
|
|
2238
|
+
k(" Setup ")
|
|
2239
|
+
])),
|
|
2240
|
+
_: 1
|
|
2241
|
+
}, 8, ["disabled"]),
|
|
2242
|
+
o(x, {
|
|
2243
|
+
color: "primary",
|
|
2244
|
+
"data-test": "teardown-group",
|
|
2245
|
+
disabled: s.disableButtons || !n.teardownGroupEnabled || !i.userInfo.execute,
|
|
2246
|
+
onClick: e[11] || (e[11] = (b) => t.$emit("button", { method: "teardown", suite: i.suite, group: i.group, options: i.options }))
|
|
2247
|
+
}, {
|
|
2248
|
+
default: r(() => e[25] || (e[25] = [
|
|
2249
|
+
k(" Teardown ")
|
|
2250
|
+
])),
|
|
2251
|
+
_: 1
|
|
2252
|
+
}, 8, ["disabled"])
|
|
2253
|
+
]),
|
|
2254
|
+
_: 1
|
|
2255
|
+
})
|
|
2256
|
+
]),
|
|
2257
|
+
_: 1
|
|
2258
|
+
})
|
|
2259
|
+
]),
|
|
2260
|
+
_: 1
|
|
2261
|
+
})
|
|
2262
|
+
]),
|
|
2263
|
+
_: 1
|
|
2264
|
+
}),
|
|
2265
|
+
o(v, { "no-gutters": "" }, {
|
|
2266
|
+
default: r(() => [
|
|
2267
|
+
o(c, { cols: "4" }, {
|
|
2268
|
+
default: r(() => [
|
|
2269
|
+
o(v, { "no-gutters": "" }, {
|
|
2270
|
+
default: r(() => [
|
|
2271
|
+
o(c, { cols: "6" }, {
|
|
2272
|
+
default: r(() => [
|
|
2273
|
+
o(h, {
|
|
2274
|
+
"open-delay": 600,
|
|
2275
|
+
location: "top"
|
|
2276
|
+
}, {
|
|
2277
|
+
activator: r(({ props: b }) => [
|
|
2278
|
+
S("div", $(ee(b)), [
|
|
2279
|
+
o(d, {
|
|
2280
|
+
modelValue: i.options,
|
|
2281
|
+
"onUpdate:modelValue": e[12] || (e[12] = (R) => i.options = R),
|
|
2282
|
+
label: "Abort after Error",
|
|
2283
|
+
value: "abortAfterError",
|
|
2284
|
+
"hide-details": "",
|
|
2285
|
+
"data-test": "abort-after-error"
|
|
2286
|
+
}, null, 8, ["modelValue"])
|
|
2287
|
+
], 16)
|
|
2288
|
+
]),
|
|
2289
|
+
default: r(() => [
|
|
2290
|
+
e[26] || (e[26] = S("span", null, [
|
|
2291
|
+
k(" Checked stops additional script execution when an error is encountered"),
|
|
2292
|
+
S("br"),
|
|
2293
|
+
k(" Unchecked allows additional scripts to execute ")
|
|
2294
|
+
], -1))
|
|
2295
|
+
]),
|
|
2296
|
+
_: 1
|
|
2297
|
+
})
|
|
2298
|
+
]),
|
|
2299
|
+
_: 1
|
|
2300
|
+
}),
|
|
2301
|
+
o(c, { cols: "6" }, {
|
|
2302
|
+
default: r(() => [
|
|
2303
|
+
o(h, {
|
|
2304
|
+
"open-delay": 600,
|
|
2305
|
+
location: "top"
|
|
2306
|
+
}, {
|
|
2307
|
+
activator: r(({ props: b }) => [
|
|
2308
|
+
S("div", $(ee(b)), [
|
|
2309
|
+
o(d, {
|
|
2310
|
+
modelValue: i.options,
|
|
2311
|
+
"onUpdate:modelValue": e[13] || (e[13] = (R) => i.options = R),
|
|
2312
|
+
disabled: !i.options.includes("loop"),
|
|
2313
|
+
label: "Break Loop on Error",
|
|
2314
|
+
value: "breakLoopOnError",
|
|
2315
|
+
"hide-details": "",
|
|
2316
|
+
"data-test": "break-loop-on-error"
|
|
2317
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
2318
|
+
], 16)
|
|
2319
|
+
]),
|
|
2320
|
+
default: r(() => [
|
|
2321
|
+
e[27] || (e[27] = S("span", null, [
|
|
2322
|
+
k(" Checked breaks the loop option when an error is encountered"),
|
|
2323
|
+
S("br"),
|
|
2324
|
+
k(" Unchecked allows the loop to run continuously"),
|
|
2325
|
+
S("br"),
|
|
2326
|
+
k(" Note: Abort after Error still breaks the loop ")
|
|
2327
|
+
], -1))
|
|
2328
|
+
]),
|
|
2329
|
+
_: 1
|
|
2330
|
+
})
|
|
2331
|
+
]),
|
|
2332
|
+
_: 1
|
|
2333
|
+
})
|
|
2334
|
+
]),
|
|
2335
|
+
_: 1
|
|
2336
|
+
})
|
|
2337
|
+
]),
|
|
2338
|
+
_: 1
|
|
2339
|
+
}),
|
|
2340
|
+
o(c, { cols: "8" }, {
|
|
2341
|
+
default: r(() => [
|
|
2342
|
+
o(v, {
|
|
2343
|
+
"no-gutters": "",
|
|
2344
|
+
justify: "end"
|
|
2345
|
+
}, {
|
|
2346
|
+
default: r(() => [
|
|
2347
|
+
o(c, { cols: "5" }, {
|
|
2348
|
+
default: r(() => [
|
|
2349
|
+
o(w, {
|
|
2350
|
+
modelValue: i.script,
|
|
2351
|
+
"onUpdate:modelValue": [
|
|
2352
|
+
e[14] || (e[14] = (b) => i.script = b),
|
|
2353
|
+
n.scriptChanged
|
|
2354
|
+
],
|
|
2355
|
+
label: "Script:",
|
|
2356
|
+
class: "mb-2 mr-2",
|
|
2357
|
+
"hide-details": "",
|
|
2358
|
+
density: "compact",
|
|
2359
|
+
variant: "outlined",
|
|
2360
|
+
items: n.scriptNames,
|
|
2361
|
+
"item-title": "title",
|
|
2362
|
+
"item-value": "value",
|
|
2363
|
+
"data-test": "select-script"
|
|
2364
|
+
}, null, 8, ["modelValue", "items", "onUpdate:modelValue"])
|
|
2365
|
+
]),
|
|
2366
|
+
_: 1
|
|
2367
|
+
}),
|
|
2368
|
+
o(c, { cols: "auto" }, {
|
|
2369
|
+
default: r(() => [
|
|
2370
|
+
o(x, {
|
|
2371
|
+
color: "primary",
|
|
2372
|
+
class: "mr-2",
|
|
2373
|
+
disabled: s.disableButtons || !i.userInfo.execute,
|
|
2374
|
+
"data-test": "start-script",
|
|
2375
|
+
onClick: e[15] || (e[15] = (b) => t.$emit("button", {
|
|
2376
|
+
method: "start",
|
|
2377
|
+
suite: i.suite,
|
|
2378
|
+
group: i.group,
|
|
2379
|
+
script: i.script,
|
|
2380
|
+
options: i.options
|
|
2381
|
+
}))
|
|
2382
|
+
}, {
|
|
2383
|
+
default: r(() => e[28] || (e[28] = [
|
|
2384
|
+
k(" Start ")
|
|
2385
|
+
])),
|
|
2386
|
+
_: 1
|
|
2387
|
+
}, 8, ["disabled"]),
|
|
2388
|
+
o(x, {
|
|
2389
|
+
color: "primary",
|
|
2390
|
+
class: "mr-2 invisible"
|
|
2391
|
+
}, {
|
|
2392
|
+
default: r(() => e[29] || (e[29] = [
|
|
2393
|
+
k(" Setup ")
|
|
2394
|
+
])),
|
|
2395
|
+
_: 1
|
|
2396
|
+
}),
|
|
2397
|
+
o(x, {
|
|
2398
|
+
color: "primary",
|
|
2399
|
+
class: "invisible"
|
|
2400
|
+
}, {
|
|
2401
|
+
default: r(() => e[30] || (e[30] = [
|
|
2402
|
+
k(" Teardown ")
|
|
2403
|
+
])),
|
|
2404
|
+
_: 1
|
|
2405
|
+
})
|
|
2406
|
+
]),
|
|
2407
|
+
_: 1
|
|
2408
|
+
})
|
|
2409
|
+
]),
|
|
2410
|
+
_: 1
|
|
2411
|
+
})
|
|
2412
|
+
]),
|
|
2413
|
+
_: 1
|
|
2414
|
+
})
|
|
2415
|
+
]),
|
|
2416
|
+
_: 1
|
|
2417
|
+
})
|
|
2418
|
+
])
|
|
2419
|
+
]);
|
|
2420
|
+
}
|
|
2421
|
+
const ki = /* @__PURE__ */ G(bi, [["render", yi], ["__scopeId", "data-v-5cecdf51"]]), Be = (t) => O.get(`/openc3-api/autocomplete/keywords/${t}`), Si = (t) => O.get(`/openc3-api/autocomplete/data/${t}`), Ke = (t, e) => t.reduce((s, a) => {
|
|
2422
|
+
const i = e(a);
|
|
2423
|
+
return s[i] ? s[i].push(a) : s[i] = [a], s;
|
|
2424
|
+
}, {}), xi = (t) => {
|
|
2425
|
+
const e = "(^|[{\\(\\s])", s = `[\\s\\(]f?['"]`, a = "(\\S+\\s?){0,3}";
|
|
2426
|
+
return new RegExp(`${e}${t}${s}${a}$`);
|
|
2427
|
+
};
|
|
2428
|
+
class Qe {
|
|
2429
|
+
constructor(e, s = () => {
|
|
2430
|
+
}, a = () => {
|
|
2431
|
+
}) {
|
|
2432
|
+
this.keywordExpressions = [], this.autocompleteData = [], Be(e).then((i) => {
|
|
2433
|
+
this.keywordExpressions = i.data.map(xi), a();
|
|
2434
|
+
}), Si(e).then((i) => {
|
|
2435
|
+
this.autocompleteData = i.data, s();
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
getCompletions(e, s, a, i, n) {
|
|
2439
|
+
let d = [];
|
|
2440
|
+
const h = s.doc.$lines[a.row].slice(
|
|
2441
|
+
0,
|
|
2442
|
+
a.column
|
|
2443
|
+
);
|
|
2444
|
+
this.keywordExpressions.some((c) => h.match(c)) && (d = this.autocompleteData), n(null, [
|
|
2445
|
+
...d
|
|
2446
|
+
// Uncomment to also return the built-in autocomplete words (but I found they're not very good and just get in the way when using live autocomplete)
|
|
2447
|
+
// ...session.$mode.$highlightRules.$keywordList.map((word) => ({
|
|
2448
|
+
// caption: word,
|
|
2449
|
+
// value: word,
|
|
2450
|
+
// meta: 'keyword',
|
|
2451
|
+
// })),
|
|
2452
|
+
]);
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
class Ci extends Qe {
|
|
2456
|
+
constructor() {
|
|
2457
|
+
super("cmd");
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
class Vi extends Qe {
|
|
2461
|
+
constructor() {
|
|
2462
|
+
super("tlm", () => {
|
|
2463
|
+
this.groupedPacketData = this.autocompleteData.reduce((e, s) => {
|
|
2464
|
+
const a = s.caption.match(/\S+\s\S+/)[0], i = s.snippet.replace(`${a} `, ""), n = {
|
|
2465
|
+
caption: i,
|
|
2466
|
+
snippet: i,
|
|
2467
|
+
meta: "item"
|
|
2468
|
+
};
|
|
2469
|
+
return e[a] ? e[a].push(n) : e[a] = [n], e;
|
|
2470
|
+
}, {}), this.packets = Object.keys(this.groupedPacketData).map((e) => ({
|
|
2471
|
+
caption: e,
|
|
2472
|
+
snippet: e,
|
|
2473
|
+
meta: "packet"
|
|
2474
|
+
}));
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
// Override the parent's getCompletions to take advantage of the grouping by packet done in the constructor
|
|
2478
|
+
getCompletions(e, s, a, i, n) {
|
|
2479
|
+
let d = [];
|
|
2480
|
+
const h = s.doc.$lines[a.row].slice(
|
|
2481
|
+
0,
|
|
2482
|
+
a.column
|
|
2483
|
+
);
|
|
2484
|
+
if (this.keywordExpressions.some((c) => h.match(c))) {
|
|
2485
|
+
const c = Object.keys(this.groupedPacketData).find(
|
|
2486
|
+
(v) => h.includes(v)
|
|
2487
|
+
);
|
|
2488
|
+
c ? d = this.groupedPacketData[c] : d = this.packets;
|
|
2489
|
+
}
|
|
2490
|
+
n(null, d);
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
const We = (t) => {
|
|
2494
|
+
const e = "(^|[{\\(\\s])", s = "((\\s.+)|(\\(.+\\)))";
|
|
2495
|
+
return new RegExp(`${e}${t}${s}`);
|
|
2496
|
+
}, Ri = /\{/, Oi = /['"],\s?['"]/;
|
|
2497
|
+
class Mi {
|
|
2498
|
+
constructor() {
|
|
2499
|
+
this.api = new Se(), this.targets = {}, this.api.get_target_names().then((e) => {
|
|
2500
|
+
e.forEach((s) => {
|
|
2501
|
+
this.targets[s] = {
|
|
2502
|
+
cmd: null,
|
|
2503
|
+
tlm: null
|
|
2504
|
+
};
|
|
2505
|
+
});
|
|
2506
|
+
}), this.cmdKeywordExpressions = [], Be("cmd").then((e) => {
|
|
2507
|
+
this.cmdKeywordExpressions = e.data.map(We);
|
|
2508
|
+
}), this.tlmKeywordExpressions = [], Be("tlm").then((e) => {
|
|
2509
|
+
this.tlmKeywordExpressions = e.data.map(We);
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
async checkText(e) {
|
|
2513
|
+
const { linesToCheck: s, linesToSkip: a } = e.split(`
|
|
2514
|
+
`).reduce(
|
|
2515
|
+
(n, d, h) => {
|
|
2516
|
+
if (d = d.trim(), d.match(/^#/))
|
|
2517
|
+
return n;
|
|
2518
|
+
const c = this.cmdKeywordExpressions.reduce((_, U) => _ || d.match(U), null), v = this.tlmKeywordExpressions.reduce((_, U) => _ || d.match(U), null);
|
|
2519
|
+
if (!c && !v)
|
|
2520
|
+
return n;
|
|
2521
|
+
let w = c || v, x = w.length;
|
|
2522
|
+
w = w[x - 1];
|
|
2523
|
+
const b = w.substring(w.match(/[\(\s)]/).index + 1).replace(/\)+.*$/, "");
|
|
2524
|
+
if (b.match(Ri))
|
|
2525
|
+
return n.linesToSkip.push(h + 1), n;
|
|
2526
|
+
const R = !!b.match(Oi), C = b.split(
|
|
2527
|
+
R ? "," : " "
|
|
2528
|
+
);
|
|
2529
|
+
if (C.length < 2)
|
|
2530
|
+
return n;
|
|
2531
|
+
const M = {
|
|
2532
|
+
target: C[0],
|
|
2533
|
+
packet: C[1]
|
|
2534
|
+
};
|
|
2535
|
+
if (v)
|
|
2536
|
+
M.item = C[2];
|
|
2537
|
+
else {
|
|
2538
|
+
const _ = C.slice(2);
|
|
2539
|
+
R ? M.params = _.map(
|
|
2540
|
+
(U) => U.split("=>")[0]
|
|
2541
|
+
) : M.params = _.filter((U, N) => N % 2);
|
|
2542
|
+
}
|
|
2543
|
+
for (const _ in M)
|
|
2544
|
+
typeof M[_] == "string" ? M[_] = M[_].replace(/['"]/g, "").trim() : M[_] = M[_].map(
|
|
2545
|
+
(U) => U.replace(/['"]/g, "").trim()
|
|
2546
|
+
);
|
|
2547
|
+
return n.linesToCheck.push({
|
|
2548
|
+
line: d,
|
|
2549
|
+
mnemonic: M,
|
|
2550
|
+
lineNumber: h + 1
|
|
2551
|
+
}), n;
|
|
2552
|
+
},
|
|
2553
|
+
{ linesToCheck: [], linesToSkip: [] }
|
|
2554
|
+
), i = await this._checkLines(s);
|
|
2555
|
+
return {
|
|
2556
|
+
skipped: a.sort(),
|
|
2557
|
+
problems: i.sort((n, d) => n.lineNumber - d.lineNumber)
|
|
2558
|
+
};
|
|
2559
|
+
}
|
|
2560
|
+
async _checkLines(e) {
|
|
2561
|
+
const s = [], a = Ke(
|
|
2562
|
+
e,
|
|
2563
|
+
(i) => i.mnemonic.target
|
|
2564
|
+
);
|
|
2565
|
+
for (const i in a) {
|
|
2566
|
+
if (!this.targets[i]) {
|
|
2567
|
+
for (const d of a[i])
|
|
2568
|
+
s.push({
|
|
2569
|
+
...d,
|
|
2570
|
+
error: `Target "${i}" does not exist.`
|
|
2571
|
+
});
|
|
2572
|
+
continue;
|
|
2573
|
+
}
|
|
2574
|
+
const n = Ke(
|
|
2575
|
+
a[i],
|
|
2576
|
+
(d) => d.mnemonic.packet
|
|
2577
|
+
);
|
|
2578
|
+
for (const d in n)
|
|
2579
|
+
for (const h of n[d]) {
|
|
2580
|
+
const c = h.mnemonic.item ? "tlm" : "cmd";
|
|
2581
|
+
if (!this.targets[i][c]) {
|
|
2582
|
+
const w = h.mnemonic.item ? "get_all_tlm" : "get_all_cmds", x = await this.api[w](i);
|
|
2583
|
+
this.targets[i][c] = x.reduce(
|
|
2584
|
+
(b, R) => (b[R.packet_name] = R.items.map(
|
|
2585
|
+
(C) => C.name
|
|
2586
|
+
), b),
|
|
2587
|
+
{}
|
|
2588
|
+
);
|
|
2589
|
+
}
|
|
2590
|
+
const v = this.targets[i][c][d];
|
|
2591
|
+
if (!v) {
|
|
2592
|
+
s.push({
|
|
2593
|
+
...h,
|
|
2594
|
+
error: `${c === "tlm" ? "Packet" : "Command"} "${i} ${d}" does not exist.`
|
|
2595
|
+
});
|
|
2596
|
+
continue;
|
|
2597
|
+
}
|
|
2598
|
+
if (h.mnemonic.item) {
|
|
2599
|
+
if (!v.some((w) => w === h.mnemonic.item)) {
|
|
2600
|
+
s.push({
|
|
2601
|
+
...h,
|
|
2602
|
+
error: `Item "${i} ${d} ${h.mnemonic.item}" does not exist.`
|
|
2603
|
+
});
|
|
2604
|
+
continue;
|
|
2605
|
+
}
|
|
2606
|
+
} else
|
|
2607
|
+
for (const w of h.mnemonic.params)
|
|
2608
|
+
if (!v.some((x) => x === w)) {
|
|
2609
|
+
s.push({
|
|
2610
|
+
...h,
|
|
2611
|
+
error: `Command "${i} ${d}" param "${w}" does not exist.`
|
|
2612
|
+
});
|
|
2613
|
+
continue;
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
return s;
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
var Y, ae, ue, de, ce, ye, pe, me, ke;
|
|
2621
|
+
class Ei {
|
|
2622
|
+
constructor(e, { pattern: s, text: a, type: i }) {
|
|
2623
|
+
// TODO: the eslint parser errors on these because of the #
|
|
2624
|
+
// Not sure if this naming is needed for the Ace editor or something?
|
|
2625
|
+
q(this, Y);
|
|
2626
|
+
q(this, ae);
|
|
2627
|
+
q(this, ue);
|
|
2628
|
+
q(this, de);
|
|
2629
|
+
q(this, ce);
|
|
2630
|
+
// Re-annotate the entire document
|
|
2631
|
+
ze(this, "refresh", () => {
|
|
2632
|
+
const e = B(this, ae).session;
|
|
2633
|
+
B(this, ke).call(this, e);
|
|
2634
|
+
const s = {
|
|
2635
|
+
lines: e.doc.$lines,
|
|
2636
|
+
action: "insert",
|
|
2637
|
+
start: { row: 0 },
|
|
2638
|
+
end: { row: e.doc.$lines.length }
|
|
2639
|
+
};
|
|
2640
|
+
this.annotate(s, e);
|
|
2641
|
+
});
|
|
2642
|
+
// Update annotations for the changed lines
|
|
2643
|
+
ze(this, "annotate", (e, s) => {
|
|
2644
|
+
var a, i;
|
|
2645
|
+
if (e.lines.length > 1)
|
|
2646
|
+
switch (e.action) {
|
|
2647
|
+
case "insert":
|
|
2648
|
+
B(this, me).call(this, s, e.start.row, e.lines.length - 1);
|
|
2649
|
+
break;
|
|
2650
|
+
case "remove":
|
|
2651
|
+
B(this, me).call(this, s, e.start.row + 1, -e.lines.length + 1);
|
|
2652
|
+
break;
|
|
2653
|
+
}
|
|
2654
|
+
for (let n = e.start.row; n <= e.end.row; n++) {
|
|
2655
|
+
let d = (i = (a = s.doc.$lines[n]) == null ? void 0 : a.match(B(this, ue))) == null ? void 0 : i.index;
|
|
2656
|
+
d !== void 0 ? (d !== 0 && (d += 1), B(this, ye).call(this, s, {
|
|
2657
|
+
row: n,
|
|
2658
|
+
column: d,
|
|
2659
|
+
// I don't think our editor theme shows the column for annotations, but others do
|
|
2660
|
+
text: B(this, de),
|
|
2661
|
+
type: B(this, ce),
|
|
2662
|
+
openc3Id: B(this, Y)
|
|
2663
|
+
})) : e.action === "remove" && B(this, pe).call(this, s, n);
|
|
2664
|
+
}
|
|
2665
|
+
});
|
|
2666
|
+
q(this, ye, (e, s) => {
|
|
2667
|
+
B(this, pe).call(this, e, s.row), e.setAnnotations([...e.getAnnotations(), s]);
|
|
2668
|
+
});
|
|
2669
|
+
q(this, pe, (e, s) => {
|
|
2670
|
+
e.setAnnotations(
|
|
2671
|
+
e.getAnnotations().filter(
|
|
2672
|
+
(a) => a.openc3Id !== B(this, Y) || a.row !== s
|
|
2673
|
+
)
|
|
2674
|
+
);
|
|
2675
|
+
});
|
|
2676
|
+
q(this, me, (e, s, a) => {
|
|
2677
|
+
e.setAnnotations(
|
|
2678
|
+
e.getAnnotations().map((i) => (i.row > s && (i.row += a), i))
|
|
2679
|
+
);
|
|
2680
|
+
});
|
|
2681
|
+
q(this, ke, (e) => {
|
|
2682
|
+
e.setAnnotations(
|
|
2683
|
+
e.getAnnotations().filter((s) => s.openc3Id !== B(this, Y))
|
|
2684
|
+
);
|
|
2685
|
+
});
|
|
2686
|
+
X(this, Y, `regexAnnotator-${Math.floor(Math.random() * 1e7)}`), X(this, ae, e), X(this, ue, s), X(this, de, a), X(this, ce, i);
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
Y = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), ce = new WeakMap(), ye = new WeakMap(), pe = new WeakMap(), me = new WeakMap(), ke = new WeakMap();
|
|
2690
|
+
class Ti extends Ei {
|
|
2691
|
+
constructor(e) {
|
|
2692
|
+
const s = "(^|[{\\s])", a = "sleep", i = "[\\(\\s]";
|
|
2693
|
+
super(e, {
|
|
2694
|
+
pattern: new RegExp(`${s}${a}${i}`),
|
|
2695
|
+
text: "Use `wait` instead of `sleep` in OpenC3 scripts",
|
|
2696
|
+
// because we override wait to make it work better, but not sleep
|
|
2697
|
+
type: "warning"
|
|
2698
|
+
});
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
const Je = "__TEMP__", j = "<Untitled>", Fe = "Start", Ii = "Go", re = "Pause", Di = "Retry", Pi = {
|
|
2702
|
+
components: {
|
|
2703
|
+
FileOpenSaveDialog: wt,
|
|
2704
|
+
Openc3Screen: bt,
|
|
2705
|
+
EnvironmentDialog: _t,
|
|
2706
|
+
Splitpanes: Dt,
|
|
2707
|
+
Pane: Pt,
|
|
2708
|
+
TopBar: gt,
|
|
2709
|
+
AskDialog: Bt,
|
|
2710
|
+
FileDialog: jt,
|
|
2711
|
+
InformationDialog: Xt,
|
|
2712
|
+
EventListDialog: St,
|
|
2713
|
+
OverridesDialog: ti,
|
|
2714
|
+
PromptDialog: di,
|
|
2715
|
+
ResultsDialog: hi,
|
|
2716
|
+
ScriptEnvironmentDialog: _i,
|
|
2717
|
+
SimpleTextDialog: kt,
|
|
2718
|
+
SuiteRunner: ki,
|
|
2719
|
+
RunningScripts: Mt,
|
|
2720
|
+
ScriptLogMessages: It,
|
|
2721
|
+
CriticalCmdDialog: vt
|
|
2722
|
+
},
|
|
2723
|
+
mixins: [ht],
|
|
2724
|
+
beforeRouteUpdate: function(t, e, s) {
|
|
2725
|
+
t.params.id ? this.tryLoadRunningScript(t.params.id).then(s) : s();
|
|
2726
|
+
},
|
|
2727
|
+
props: {
|
|
2728
|
+
inline: {
|
|
2729
|
+
type: Boolean,
|
|
2730
|
+
default: !1
|
|
2731
|
+
},
|
|
2732
|
+
body: {
|
|
2733
|
+
type: String,
|
|
2734
|
+
default: null
|
|
2735
|
+
}
|
|
2736
|
+
},
|
|
2737
|
+
emits: ["alert", "script-id"],
|
|
2738
|
+
data() {
|
|
2739
|
+
return {
|
|
2740
|
+
title: "Script Runner",
|
|
2741
|
+
suiteRunner: !1,
|
|
2742
|
+
// Whether to display the SuiteRunner GUI
|
|
2743
|
+
disableSuiteButtons: !1,
|
|
2744
|
+
suiteMap: {
|
|
2745
|
+
// Useful for testing the various options in the SuiteRunner GUI
|
|
2746
|
+
// Suite: {
|
|
2747
|
+
// teardown: true,
|
|
2748
|
+
// groups: {
|
|
2749
|
+
// Group: {
|
|
2750
|
+
// setup: true,
|
|
2751
|
+
// cases: ['case1', 'case2', 'really_long_test_case_name3'],
|
|
2752
|
+
// },
|
|
2753
|
+
// ReallyLongGroupName: {
|
|
2754
|
+
// cases: ['case1', 'case2', 'case3'],
|
|
2755
|
+
// },
|
|
2756
|
+
// },
|
|
2757
|
+
// },
|
|
2758
|
+
},
|
|
2759
|
+
filenameSelect: null,
|
|
2760
|
+
currentFilename: null,
|
|
2761
|
+
// This is the currently shown filename while running
|
|
2762
|
+
showSave: !1,
|
|
2763
|
+
showAlert: !1,
|
|
2764
|
+
alertType: null,
|
|
2765
|
+
alertText: "",
|
|
2766
|
+
state: null,
|
|
2767
|
+
scriptId: null,
|
|
2768
|
+
startOrGoButton: Fe,
|
|
2769
|
+
startOrGoDisabled: !1,
|
|
2770
|
+
envDisabled: !1,
|
|
2771
|
+
pauseOrRetryButton: re,
|
|
2772
|
+
pauseOrRetryDisabled: !1,
|
|
2773
|
+
stopDisabled: !1,
|
|
2774
|
+
showEnvironment: !1,
|
|
2775
|
+
showDebug: !1,
|
|
2776
|
+
debug: "",
|
|
2777
|
+
debugHistory: [],
|
|
2778
|
+
debugHistoryIndex: 0,
|
|
2779
|
+
showDisconnect: !1,
|
|
2780
|
+
files: {},
|
|
2781
|
+
breakpoints: {},
|
|
2782
|
+
enableStackTraces: !1,
|
|
2783
|
+
filename: j,
|
|
2784
|
+
readOnlyUser: !1,
|
|
2785
|
+
executeUser: !0,
|
|
2786
|
+
saveAllowed: !0,
|
|
2787
|
+
tempFilename: null,
|
|
2788
|
+
fileModified: "",
|
|
2789
|
+
fileOpen: !1,
|
|
2790
|
+
lockedBy: null,
|
|
2791
|
+
showEditingToast: !1,
|
|
2792
|
+
showSaveAs: !1,
|
|
2793
|
+
areYouSure: !1,
|
|
2794
|
+
subscription: null,
|
|
2795
|
+
cable: null,
|
|
2796
|
+
fatal: !1,
|
|
2797
|
+
updateInterval: null,
|
|
2798
|
+
receivedEvents: [],
|
|
2799
|
+
messages: [],
|
|
2800
|
+
messagesNewestOnTop: !0,
|
|
2801
|
+
maxArrayLength: 200,
|
|
2802
|
+
Range: ace.require("ace/range").Range,
|
|
2803
|
+
ask: {
|
|
2804
|
+
show: !1,
|
|
2805
|
+
question: "",
|
|
2806
|
+
default: null,
|
|
2807
|
+
password: !1,
|
|
2808
|
+
answerRequired: !0,
|
|
2809
|
+
callback: () => {
|
|
2810
|
+
}
|
|
2811
|
+
},
|
|
2812
|
+
file: {
|
|
2813
|
+
show: !1,
|
|
2814
|
+
message: "",
|
|
2815
|
+
directory: null,
|
|
2816
|
+
filter: "*",
|
|
2817
|
+
multiple: !1,
|
|
2818
|
+
callback: () => {
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
prompt: {
|
|
2822
|
+
show: !1,
|
|
2823
|
+
title: "",
|
|
2824
|
+
subtitle: "",
|
|
2825
|
+
message: "",
|
|
2826
|
+
details: "",
|
|
2827
|
+
buttons: null,
|
|
2828
|
+
layout: "horizontal",
|
|
2829
|
+
callback: () => {
|
|
2830
|
+
}
|
|
2831
|
+
},
|
|
2832
|
+
information: {
|
|
2833
|
+
show: !1,
|
|
2834
|
+
title: "",
|
|
2835
|
+
text: [],
|
|
2836
|
+
width: "600"
|
|
2837
|
+
},
|
|
2838
|
+
inputMetadata: {
|
|
2839
|
+
show: !1,
|
|
2840
|
+
events: [],
|
|
2841
|
+
callback: () => {
|
|
2842
|
+
}
|
|
2843
|
+
},
|
|
2844
|
+
results: {
|
|
2845
|
+
show: !1,
|
|
2846
|
+
text: ""
|
|
2847
|
+
},
|
|
2848
|
+
scriptEnvironment: {
|
|
2849
|
+
show: !1,
|
|
2850
|
+
env: []
|
|
2851
|
+
},
|
|
2852
|
+
showSuiteError: !1,
|
|
2853
|
+
suiteError: "",
|
|
2854
|
+
executeSelectionMenu: !1,
|
|
2855
|
+
menuX: 0,
|
|
2856
|
+
menuY: 0,
|
|
2857
|
+
mnemonicChecker: new Mi(),
|
|
2858
|
+
showScripts: !1,
|
|
2859
|
+
showOverrides: !1,
|
|
2860
|
+
activePromptId: "",
|
|
2861
|
+
api: null,
|
|
2862
|
+
timeZone: "local",
|
|
2863
|
+
screens: [],
|
|
2864
|
+
screenKeywords: null,
|
|
2865
|
+
idCounter: 0,
|
|
2866
|
+
updateCounter: 0,
|
|
2867
|
+
recent: [],
|
|
2868
|
+
waitingInterval: null,
|
|
2869
|
+
waitingTime: 0,
|
|
2870
|
+
waitingStart: 0,
|
|
2871
|
+
criticalCmdUuid: null,
|
|
2872
|
+
criticalCmdString: null,
|
|
2873
|
+
criticalCmdUser: null,
|
|
2874
|
+
displayCriticalCmd: !1
|
|
2875
|
+
};
|
|
2876
|
+
},
|
|
2877
|
+
computed: {
|
|
2878
|
+
stateTimer: function() {
|
|
2879
|
+
return this.state === "waiting" || this.state === "paused" ? `${this.state} ${this.waitingTime}s` : this.state;
|
|
2880
|
+
},
|
|
2881
|
+
// This is the list of files shown in the select dropdown
|
|
2882
|
+
fileList: function() {
|
|
2883
|
+
const t = Object.keys(this.files);
|
|
2884
|
+
return t.push(this.fullFilename), [...new Set(t)];
|
|
2885
|
+
},
|
|
2886
|
+
environmentModified: function() {
|
|
2887
|
+
return this.scriptEnvironment.env.length > 0;
|
|
2888
|
+
},
|
|
2889
|
+
isLocked: function() {
|
|
2890
|
+
return !!this.lockedBy;
|
|
2891
|
+
},
|
|
2892
|
+
// Returns the currently shown filename
|
|
2893
|
+
fullFilename: function() {
|
|
2894
|
+
return this.currentFilename ? this.currentFilename : this.filename === j ? j : `${this.filename} ${this.fileModified}`.trim();
|
|
2895
|
+
},
|
|
2896
|
+
// It's annoying for people (and tests) to clear the <Untitled>
|
|
2897
|
+
// when saving a new file so replace with blank
|
|
2898
|
+
// This makes sure that string doesn't show up in the dialog
|
|
2899
|
+
filenameOrBlank: function() {
|
|
2900
|
+
return this.filename === j ? "" : this.filename;
|
|
2901
|
+
},
|
|
2902
|
+
menus: function() {
|
|
2903
|
+
return [
|
|
2904
|
+
{
|
|
2905
|
+
label: "File",
|
|
2906
|
+
items: [
|
|
2907
|
+
{
|
|
2908
|
+
label: "New File",
|
|
2909
|
+
icon: "mdi-file-plus",
|
|
2910
|
+
disabled: this.scriptId || this.readOnlyUser,
|
|
2911
|
+
command: () => {
|
|
2912
|
+
this.newFile();
|
|
2913
|
+
}
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
label: "New Suite",
|
|
2917
|
+
icon: "mdi-file-document-plus",
|
|
2918
|
+
disabled: this.scriptId || this.readOnlyUser,
|
|
2919
|
+
subMenu: [
|
|
2920
|
+
{
|
|
2921
|
+
label: "Ruby",
|
|
2922
|
+
icon: "mdi-language-ruby",
|
|
2923
|
+
command: () => {
|
|
2924
|
+
this.newRubyTestSuite();
|
|
2925
|
+
}
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
label: "Python",
|
|
2929
|
+
icon: "mdi-language-python",
|
|
2930
|
+
command: () => {
|
|
2931
|
+
this.newPythonTestSuite();
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
]
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
label: "Open File",
|
|
2938
|
+
icon: "mdi-folder-open",
|
|
2939
|
+
disabled: this.scriptId,
|
|
2940
|
+
command: () => {
|
|
2941
|
+
this.openFile();
|
|
2942
|
+
}
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
label: "Open Recent",
|
|
2946
|
+
icon: "mdi-folder-open",
|
|
2947
|
+
disabled: this.scriptId,
|
|
2948
|
+
subMenu: this.recent
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
divider: !0
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
label: "Save File",
|
|
2955
|
+
icon: "mdi-content-save",
|
|
2956
|
+
disabled: this.scriptId || this.readOnlyUser,
|
|
2957
|
+
command: () => {
|
|
2958
|
+
this.saveFile();
|
|
2959
|
+
}
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
label: "Save As...",
|
|
2963
|
+
icon: "mdi-content-save",
|
|
2964
|
+
disabled: this.scriptId || this.readOnlyUser,
|
|
2965
|
+
command: () => {
|
|
2966
|
+
this.saveAs();
|
|
2967
|
+
}
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
divider: !0
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
label: "Download",
|
|
2974
|
+
icon: "mdi-cloud-download",
|
|
2975
|
+
disabled: this.scriptId,
|
|
2976
|
+
command: () => {
|
|
2977
|
+
this.download();
|
|
2978
|
+
}
|
|
2979
|
+
},
|
|
2980
|
+
{
|
|
2981
|
+
divider: !0
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
label: "Delete File",
|
|
2985
|
+
icon: "mdi-delete",
|
|
2986
|
+
disabled: this.scriptId || this.readOnlyUser,
|
|
2987
|
+
command: () => {
|
|
2988
|
+
this.delete();
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
]
|
|
2992
|
+
},
|
|
2993
|
+
{
|
|
2994
|
+
label: "Edit",
|
|
2995
|
+
items: [
|
|
2996
|
+
{
|
|
2997
|
+
label: "Find",
|
|
2998
|
+
icon: "mdi-magnify",
|
|
2999
|
+
command: () => {
|
|
3000
|
+
this.editor.execCommand("find");
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
label: "Replace",
|
|
3005
|
+
icon: "mdi-find-replace",
|
|
3006
|
+
disabled: this.scriptId,
|
|
3007
|
+
command: () => {
|
|
3008
|
+
this.editor.execCommand("replace");
|
|
3009
|
+
}
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
label: "Set Line Delay",
|
|
3013
|
+
icon: "mdi-invoice-text-clock",
|
|
3014
|
+
disabled: this.scriptId,
|
|
3015
|
+
command: () => {
|
|
3016
|
+
this.$dialog.open({
|
|
3017
|
+
title: "Info",
|
|
3018
|
+
text: "You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",
|
|
3019
|
+
okText: "OK",
|
|
3020
|
+
okClass: "primary",
|
|
3021
|
+
validateText: null,
|
|
3022
|
+
cancelText: null,
|
|
3023
|
+
html: !0
|
|
3024
|
+
});
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
]
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
label: "Script",
|
|
3031
|
+
items: [
|
|
3032
|
+
{
|
|
3033
|
+
label: "Execution Status",
|
|
3034
|
+
icon: "mdi-run",
|
|
3035
|
+
command: () => {
|
|
3036
|
+
this.showScripts = !0;
|
|
3037
|
+
}
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
divider: !0
|
|
3041
|
+
},
|
|
3042
|
+
{
|
|
3043
|
+
label: "Global Environment",
|
|
3044
|
+
icon: "mdi-library",
|
|
3045
|
+
disabled: this.scriptId,
|
|
3046
|
+
command: () => {
|
|
3047
|
+
this.showEnvironment = !this.showEnvironment;
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
label: "Metadata",
|
|
3052
|
+
icon: "mdi-calendar",
|
|
3053
|
+
disabled: this.scriptId,
|
|
3054
|
+
command: () => {
|
|
3055
|
+
this.inputMetadata.callback = () => {
|
|
3056
|
+
}, this.showMetadata();
|
|
3057
|
+
}
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
label: "Overrides",
|
|
3061
|
+
icon: "mdi-swap-horizontal",
|
|
3062
|
+
command: () => {
|
|
3063
|
+
this.showOverrides = !0;
|
|
3064
|
+
}
|
|
3065
|
+
},
|
|
3066
|
+
{
|
|
3067
|
+
divider: !0
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
label: "Syntax Check",
|
|
3071
|
+
icon: "mdi-file-check",
|
|
3072
|
+
disabled: this.scriptId,
|
|
3073
|
+
command: () => {
|
|
3074
|
+
this.syntaxCheck();
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
{
|
|
3078
|
+
label: "Mnemonic Check",
|
|
3079
|
+
icon: "mdi-spellcheck",
|
|
3080
|
+
disabled: this.scriptId,
|
|
3081
|
+
command: () => {
|
|
3082
|
+
this.checkMnemonics();
|
|
3083
|
+
}
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
label: "Instrumented Script",
|
|
3087
|
+
icon: "mdi-code-braces-box",
|
|
3088
|
+
disabled: this.scriptId,
|
|
3089
|
+
command: () => {
|
|
3090
|
+
this.showInstrumented();
|
|
3091
|
+
}
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
label: "Call Stack",
|
|
3095
|
+
icon: "mdi-format-list-numbered",
|
|
3096
|
+
disabled: !this.scriptId,
|
|
3097
|
+
command: () => {
|
|
3098
|
+
this.showCallStack();
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
divider: !0
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
label: "Toggle Debug",
|
|
3106
|
+
icon: "mdi-bug",
|
|
3107
|
+
command: () => {
|
|
3108
|
+
this.toggleDebug();
|
|
3109
|
+
}
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
label: "Toggle Disconnect",
|
|
3113
|
+
icon: "mdi-connection",
|
|
3114
|
+
disabled: this.scriptId,
|
|
3115
|
+
command: () => {
|
|
3116
|
+
this.toggleDisconnect();
|
|
3117
|
+
}
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
label: "Enable Stack Traces",
|
|
3121
|
+
checkbox: !0,
|
|
3122
|
+
checked: this.enableStackTraces,
|
|
3123
|
+
disabled: this.scriptId,
|
|
3124
|
+
command: () => {
|
|
3125
|
+
this.enableStackTraces = !this.enableStackTraces;
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
divider: !0
|
|
3130
|
+
},
|
|
3131
|
+
{
|
|
3132
|
+
label: "Delete All Breakpoints",
|
|
3133
|
+
icon: "mdi-delete-circle-outline",
|
|
3134
|
+
disabled: this.scriptId,
|
|
3135
|
+
command: () => {
|
|
3136
|
+
this.deleteAllBreakpoints();
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
]
|
|
3140
|
+
}
|
|
3141
|
+
];
|
|
3142
|
+
}
|
|
3143
|
+
},
|
|
3144
|
+
watch: {
|
|
3145
|
+
isLocked: function(t) {
|
|
3146
|
+
this.showEditingToast = t, this.suiteRunner || (this.startOrGoDisabled = t), this.readOnlyUser == !1 && t == !1 ? this.editor.setReadOnly(t) : this.editor.setReadOnly(!0);
|
|
3147
|
+
},
|
|
3148
|
+
fullFilename: function(t) {
|
|
3149
|
+
this.filenameSelect = t, this.inline || (t === j ? localStorage.removeItem("script_runner__filename") : localStorage.script_runner__filename = t);
|
|
3150
|
+
}
|
|
3151
|
+
},
|
|
3152
|
+
created: async function() {
|
|
3153
|
+
this.api = new Se(), this.api.ensure_offline_access(), this.api.get_setting("time_zone").then((s) => {
|
|
3154
|
+
s && (this.timeZone = s);
|
|
3155
|
+
}).catch((s) => {
|
|
3156
|
+
}), this.NEW_FILENAME = j;
|
|
3157
|
+
let t = OpenC3Auth.user(), e = OpenC3Auth.userroles();
|
|
3158
|
+
this.readOnlyUser = !0, this.executeUser = !1;
|
|
3159
|
+
for (let s of e)
|
|
3160
|
+
s != "viewer" && (s == "admin" || s == "operator" ? (this.readOnlyUser = !1, this.executeUser = !0) : s == "runner" ? this.executeUser = !0 : await O.get(`/openc3-api/roles/${s}`).then((a) => {
|
|
3161
|
+
a.data !== null && a.data.permissions !== void 0 && (a.data.permissions.some(
|
|
3162
|
+
(i) => i.permission == "script_edit"
|
|
3163
|
+
) && (this.readOnlyUser = !1), a.data.permissions.some(
|
|
3164
|
+
(i) => i.permission == "script_run"
|
|
3165
|
+
) && (this.executeUser = !0));
|
|
3166
|
+
}));
|
|
3167
|
+
if (this.inline || (localStorage.script_runner__userinfo = JSON.stringify({
|
|
3168
|
+
name: t.preferred_username,
|
|
3169
|
+
readOnly: this.readOnlyUser,
|
|
3170
|
+
execute: this.executeUser
|
|
3171
|
+
})), this.readOnlyUser == !0) {
|
|
3172
|
+
this.alertType = "info";
|
|
3173
|
+
let s = `User ${t.preferred_username} is read only`;
|
|
3174
|
+
this.executeUser && (s += " but can execute scripts"), this.alertText = s, this.showAlert = !0;
|
|
3175
|
+
}
|
|
3176
|
+
O.get("/openc3-api/autocomplete/keywords/screen").then((s) => {
|
|
3177
|
+
this.screenKeywords = s.data;
|
|
3178
|
+
}), this.inline && (this.readOnly = !0);
|
|
3179
|
+
},
|
|
3180
|
+
mounted: async function() {
|
|
3181
|
+
var a, i;
|
|
3182
|
+
this.editor = ace.edit(this.$refs.editor), this.editor.setTheme("ace/theme/twilight");
|
|
3183
|
+
const t = this.buildRubyMode(), e = this.buildPythonMode();
|
|
3184
|
+
this.rubyMode = new t(), this.pythonMode = new e(), this.editor.session.setMode(this.rubyMode), this.editor.session.setTabSize(2), this.editor.session.setUseWrapMode(!0), this.editor.$blockScrolling = 1 / 0, this.editor.setOption("enableBasicAutocompletion", !0), this.editor.setOption("enableLiveAutocompletion", !0), this.editor.completers = [new Ci(), new Vi()], this.editor.setHighlightActiveLine(!1), je.applyVimModeIfEnabled(this.editor, { saveFn: this.saveFile }), this.editor.focus(), this.editor.on("guttermousedown", this.toggleBreakpoint), this.editor.session.on("tokenizerUpdate", this.onChange), this.readOnlyUser && (this.editor.setReadOnly(!0), this.editor.renderer.$cursorLayer.element.style.display = "none");
|
|
3185
|
+
const s = new Ti(this.editor);
|
|
3186
|
+
this.editor.session.on("change", (n, d) => {
|
|
3187
|
+
s.annotate(n, d), this.updateBreakpoints(n, d);
|
|
3188
|
+
}), this.editor.container.addEventListener("resize", this.doResize), this.editor.container.addEventListener("keydown", this.keydown), window.addEventListener("resize", this.calcHeight), this.calcHeight(), this.cable = new it("/script-api/cable"), !this.inline && localStorage.script_runner__recent && (this.recent = JSON.parse(localStorage.script_runner__recent), this.recent = this.recent.map((n) => ({
|
|
3189
|
+
...n,
|
|
3190
|
+
command: async (d) => {
|
|
3191
|
+
this.filename = d.label, await this.reloadFile();
|
|
3192
|
+
}
|
|
3193
|
+
}))), this.inline ? this.body && (this.editor.setValue(this.body), this.editor.clearSelection()) : (a = this.$route.query) != null && a.file ? (this.filename = this.$route.query.file, await this.reloadFile()) : (i = this.$route.params) != null && i.id ? await this.tryLoadRunningScript(this.$route.params.id) : (this.scriptId = sessionStorage.getItem("script_runner__script_id"), this.scriptId ? await this.tryLoadRunningScript(this.scriptId) : localStorage.script_runner__filename && (this.filename = localStorage.script_runner__filename, await this.reloadFile(!1))), this.updateInterval = setInterval(async () => {
|
|
3194
|
+
this.processReceived();
|
|
3195
|
+
}, 100);
|
|
3196
|
+
},
|
|
3197
|
+
beforeUnmount() {
|
|
3198
|
+
this.scriptId && !this.inline && sessionStorage.setItem("script_runner__script_id", this.scriptId), this.editor.destroy(), this.editor.container.remove();
|
|
3199
|
+
},
|
|
3200
|
+
unmounted() {
|
|
3201
|
+
this.unlockFile(), this.updateInterval != null && clearInterval(this.updateInterval), this.subscription && (this.subscription.unsubscribe(), this.subscription = null), this.cable.disconnect();
|
|
3202
|
+
},
|
|
3203
|
+
methods: {
|
|
3204
|
+
toggleVimMode() {
|
|
3205
|
+
je.toggleVimMode(this.editor);
|
|
3206
|
+
},
|
|
3207
|
+
doResize() {
|
|
3208
|
+
this.editor.resize(), this.$nextTick(() => {
|
|
3209
|
+
this.calcHeight();
|
|
3210
|
+
});
|
|
3211
|
+
},
|
|
3212
|
+
calcHeight() {
|
|
3213
|
+
const t = document.getElementsByClassName("editorbox")[0], e = Math.max(
|
|
3214
|
+
document.documentElement.offsetHeight,
|
|
3215
|
+
window.innerHeight || 0
|
|
3216
|
+
);
|
|
3217
|
+
let s = 0;
|
|
3218
|
+
t && (s = t.offsetHeight);
|
|
3219
|
+
let a = 0;
|
|
3220
|
+
const i = document.getElementsByClassName("suite-runner")[0];
|
|
3221
|
+
i && (a = i.offsetHeight);
|
|
3222
|
+
let n = document.getElementById("script-log-messages");
|
|
3223
|
+
n && (n.style.height = `${e - s - a}px`);
|
|
3224
|
+
},
|
|
3225
|
+
scriptDisconnect() {
|
|
3226
|
+
this.subscription && (this.subscription.unsubscribe(), this.subscription = null), this.receivedEvents.length = 0;
|
|
3227
|
+
},
|
|
3228
|
+
showMetadata() {
|
|
3229
|
+
O.get("/openc3-api/metadata").then((t) => {
|
|
3230
|
+
this.inputMetadata.events = t.data.map((e) => ({
|
|
3231
|
+
name: "Metadata",
|
|
3232
|
+
start: new Date(e.start * 1e3),
|
|
3233
|
+
end: new Date(e.start * 1e3),
|
|
3234
|
+
color: e.color,
|
|
3235
|
+
type: e.type,
|
|
3236
|
+
timed: !0,
|
|
3237
|
+
metadata: e
|
|
3238
|
+
})), this.inputMetadata.show = !0;
|
|
3239
|
+
});
|
|
3240
|
+
},
|
|
3241
|
+
messageSortOrder(t) {
|
|
3242
|
+
t === "Newest on Top" && this.messagesNewestOnTop === !1 ? (this.messagesNewestOnTop = !0, this.messages.reverse()) : t === "Newest on Bottom" && this.messagesNewestOnTop === !0 && (this.messagesNewestOnTop = !1, this.messages.reverse());
|
|
3243
|
+
},
|
|
3244
|
+
// This only gets called when the user changes the filename dropdown
|
|
3245
|
+
// Or when a user hits Go
|
|
3246
|
+
fileNameChanged(t) {
|
|
3247
|
+
t = t.split("*")[0], this.editor.setValue(this.files[t].content), this.restoreBreakpoints(t), this.editor.clearSelection(), this.removeAllMarkers(), this.editor.session.addMarker(
|
|
3248
|
+
new this.Range(
|
|
3249
|
+
this.files[t].lineNo - 1,
|
|
3250
|
+
0,
|
|
3251
|
+
this.files[t].lineNo - 1,
|
|
3252
|
+
1
|
|
3253
|
+
),
|
|
3254
|
+
`${this.state}Marker`,
|
|
3255
|
+
"fullLine"
|
|
3256
|
+
), this.editor.gotoLine(this.files[t].lineNo);
|
|
3257
|
+
},
|
|
3258
|
+
tryLoadRunningScript: function(t) {
|
|
3259
|
+
return O.get(`/script-api/running-script/${t}`).then((e) => {
|
|
3260
|
+
if (e.data) {
|
|
3261
|
+
let s = e.data.state;
|
|
3262
|
+
s !== "complete" && s !== "complete_errors" && s !== "stopped" && s !== "crash" && s !== "killed" ? (this.filename = e.data.filename, this.tryLoadSuites(e), this.initScriptStart(), this.scriptStart(t)) : (this.$notify.caution({
|
|
3263
|
+
title: `Script ${t} has already completed`,
|
|
3264
|
+
body: "Check the Completed Scripts below ..."
|
|
3265
|
+
}), this.showScripts = !0);
|
|
3266
|
+
} else
|
|
3267
|
+
this.$notify.caution({
|
|
3268
|
+
title: `Running Script ${t} not found`,
|
|
3269
|
+
body: "Check the Completed Scripts below ..."
|
|
3270
|
+
}), this.showScripts = !0;
|
|
3271
|
+
});
|
|
3272
|
+
},
|
|
3273
|
+
tryLoadSuites: function(t) {
|
|
3274
|
+
t.data.suite_runner && (this.startOrGoDisabled = !0, this.suiteRunner = !0, this.suiteMap = JSON.parse(t.data.suite_runner)), this.doResize();
|
|
3275
|
+
},
|
|
3276
|
+
showExecuteSelectionMenu: function(t) {
|
|
3277
|
+
this.menuX = t.pageX, this.menuY = t.pageY, this.executeSelectionMenu = !0;
|
|
3278
|
+
},
|
|
3279
|
+
runFromCursor: function() {
|
|
3280
|
+
const t = this.editor.getCursorPosition().row + 1;
|
|
3281
|
+
this.scriptId ? O.post(
|
|
3282
|
+
`/script-api/running-script/${this.scriptId}/executewhilepaused`,
|
|
3283
|
+
{
|
|
3284
|
+
data: {
|
|
3285
|
+
args: [this.filenameSelect, t]
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
) : this.start(null, null, t);
|
|
3289
|
+
},
|
|
3290
|
+
executeSelection: function() {
|
|
3291
|
+
const t = this.editor.getSelectionRange();
|
|
3292
|
+
let e = t.start.row + 1, s = t.end.row + 1;
|
|
3293
|
+
t.end.column === 0 && (s -= 1), this.scriptId ? O.post(
|
|
3294
|
+
`/script-api/running-script/${this.scriptId}/executewhilepaused`,
|
|
3295
|
+
{
|
|
3296
|
+
data: {
|
|
3297
|
+
args: [this.filenameSelect, e, s]
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
) : this.start(null, null, e, s);
|
|
3301
|
+
},
|
|
3302
|
+
clearBreakpoints: function() {
|
|
3303
|
+
this.editor.session.clearBreakpoints();
|
|
3304
|
+
},
|
|
3305
|
+
toggleBreakpoint: function(t) {
|
|
3306
|
+
if (!this.scriptId) {
|
|
3307
|
+
const e = t.getDocumentPosition().row;
|
|
3308
|
+
t.editor.session.getBreakpoints(e, 0)[e] ? t.editor.session.clearBreakpoint(e) : t.editor.session.setBreakpoint(e);
|
|
3309
|
+
}
|
|
3310
|
+
},
|
|
3311
|
+
updateBreakpoints: function(t, e) {
|
|
3312
|
+
if (t.lines.length <= 1)
|
|
3313
|
+
return;
|
|
3314
|
+
const s = this.getBreakpointRows(e).filter(
|
|
3315
|
+
(n) => t.start.column === 0 && n === t.start.row || n > t.start.row
|
|
3316
|
+
);
|
|
3317
|
+
let a = [], i = 0;
|
|
3318
|
+
switch (t.action) {
|
|
3319
|
+
case "insert":
|
|
3320
|
+
i = t.lines.length - 1, s.reverse();
|
|
3321
|
+
break;
|
|
3322
|
+
case "remove":
|
|
3323
|
+
i = -t.lines.length + 1, a = [...Array(t.lines.length).keys()].map(
|
|
3324
|
+
(n) => n + t.start.row
|
|
3325
|
+
);
|
|
3326
|
+
break;
|
|
3327
|
+
}
|
|
3328
|
+
s.forEach((n) => {
|
|
3329
|
+
e.clearBreakpoint(n), a.includes(n) || e.setBreakpoint(n + i);
|
|
3330
|
+
});
|
|
3331
|
+
},
|
|
3332
|
+
getBreakpointRows: function(t = this.editor.session) {
|
|
3333
|
+
return t.getBreakpoints().map((e, s) => e && s).filter(Number.isInteger);
|
|
3334
|
+
},
|
|
3335
|
+
restoreBreakpoints: function(t) {
|
|
3336
|
+
var e;
|
|
3337
|
+
this.clearBreakpoints(), (e = this.breakpoints[t]) == null || e.forEach((s) => {
|
|
3338
|
+
this.editor.session.setBreakpoint(s);
|
|
3339
|
+
});
|
|
3340
|
+
},
|
|
3341
|
+
deleteAllBreakpoints: function() {
|
|
3342
|
+
this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?", {
|
|
3343
|
+
okText: "Delete",
|
|
3344
|
+
cancelText: "Cancel"
|
|
3345
|
+
}).then((t) => O.delete("/script-api/breakpoints/delete/all")).then((t) => {
|
|
3346
|
+
this.clearBreakpoints();
|
|
3347
|
+
});
|
|
3348
|
+
},
|
|
3349
|
+
suiteRunnerButton(t) {
|
|
3350
|
+
this.startOrGoButton === Fe ? this.start(t, "suiteRunner") : this.go(t, "suiteRunner");
|
|
3351
|
+
},
|
|
3352
|
+
async keydown(t) {
|
|
3353
|
+
this.scriptId || this.editor.getReadOnly() === !0 || (t.metaKey || t.ctrlKey) && t.keyCode === 83 && (t.shiftKey ? (t.preventDefault(), this.saveAs()) : (t.preventDefault(), await this.saveFile()));
|
|
3354
|
+
},
|
|
3355
|
+
onChange(t) {
|
|
3356
|
+
this.scriptId || this.editor.getReadOnly() === !0 || (this.editor.session.getUndoManager().canUndo() ? this.fileModified = "*" : this.fileModified = "");
|
|
3357
|
+
},
|
|
3358
|
+
checkMnemonics: function() {
|
|
3359
|
+
this.mnemonicChecker.checkText(this.editor.getValue()).then(({ skipped: t, problems: e }) => {
|
|
3360
|
+
let s = "";
|
|
3361
|
+
if (e.length) {
|
|
3362
|
+
const a = e.map((i) => `${i.lineNumber}: ${i.error}`).join("<br/>");
|
|
3363
|
+
s += `<strong>The following lines have problems:</strong><br/>${a}<br/><br/>`;
|
|
3364
|
+
}
|
|
3365
|
+
t.length && (s += "<strong>Mnemonics with string interpolation were not checked.</strong>"), s === "" && (s = "<strong>Everything looks good!</strong>"), this.$dialog.alert(s.trim(), { html: !0 });
|
|
3366
|
+
});
|
|
3367
|
+
},
|
|
3368
|
+
initScriptStart() {
|
|
3369
|
+
this.disableSuiteButtons = !0, this.startOrGoDisabled = !0, this.envDisabled = !0, this.pauseOrRetryDisabled = !0, this.stopDisabled = !0, this.state = "Connecting...", this.startOrGoButton = Ii, this.editor.setReadOnly(!0);
|
|
3370
|
+
},
|
|
3371
|
+
scriptStart(t) {
|
|
3372
|
+
this.$emit("script-id", t), this.scriptId = t, this.cable.createSubscription(
|
|
3373
|
+
"RunningScriptChannel",
|
|
3374
|
+
window.openc3Scope,
|
|
3375
|
+
{
|
|
3376
|
+
received: (e) => this.received(e)
|
|
3377
|
+
},
|
|
3378
|
+
{
|
|
3379
|
+
id: this.scriptId
|
|
3380
|
+
}
|
|
3381
|
+
).then((e) => {
|
|
3382
|
+
this.subscription = e;
|
|
3383
|
+
});
|
|
3384
|
+
},
|
|
3385
|
+
async scriptComplete() {
|
|
3386
|
+
this.state = "stopped", this.fatal = !1, this.scriptId = null, this.currentFilename = null, this.files = {}, this.subscription && (await this.subscription.unsubscribe(), this.subscription = null), this.receivedEvents.length = 0, await this.reloadFile(), this.editor.session.getUndoManager().reset(), this.readOnlyUser == !1 && this.editor.setReadOnly(!1), this.disableSuiteButtons = !1, this.startOrGoButton = Fe, this.pauseOrRetryButton = re, this.startOrGoDisabled = this.suiteRunner, this.envDisabled = !1, this.pauseOrRetryDisabled = !0, this.stopDisabled = !0;
|
|
3387
|
+
},
|
|
3388
|
+
environmentHandler: function(t) {
|
|
3389
|
+
this.scriptEnvironment.env = t;
|
|
3390
|
+
},
|
|
3391
|
+
startHandler: function() {
|
|
3392
|
+
this.start();
|
|
3393
|
+
},
|
|
3394
|
+
async start(t = null, e = null, s = null, a = null) {
|
|
3395
|
+
this.initScriptStart(), await this.saveFile("start"), this.saveAllowed = !1;
|
|
3396
|
+
let i = this.filename;
|
|
3397
|
+
this.filename === j && (i = this.tempFilename);
|
|
3398
|
+
let n = `/script-api/scripts/${i}/run`;
|
|
3399
|
+
this.showDisconnect && (n += "/disconnect");
|
|
3400
|
+
let d = this.scriptEnvironment.env;
|
|
3401
|
+
this.enableStackTraces && (d = d.concat({
|
|
3402
|
+
key: "OPENC3_FULL_BACKTRACE",
|
|
3403
|
+
value: "1"
|
|
3404
|
+
}));
|
|
3405
|
+
let h = {
|
|
3406
|
+
environment: d
|
|
3407
|
+
};
|
|
3408
|
+
e && (h.suiteRunner = t), s !== null && (h.line_no = s), a !== null && (h.end_line_no = a), O.post(n, { data: h }).then((c) => {
|
|
3409
|
+
this.scriptStart(c.data);
|
|
3410
|
+
}).catch((c) => {
|
|
3411
|
+
this.scriptComplete();
|
|
3412
|
+
});
|
|
3413
|
+
},
|
|
3414
|
+
go() {
|
|
3415
|
+
this.filenameSelect = this.currentFilename, this.fileNameChanged(this.currentFilename), O.post(`/script-api/running-script/${this.scriptId}/go`);
|
|
3416
|
+
},
|
|
3417
|
+
pauseOrRetry() {
|
|
3418
|
+
this.pauseOrRetryButton === re ? O.post(`/script-api/running-script/${this.scriptId}/pause`) : (this.pauseOrRetryButton = re, O.post(`/script-api/running-script/${this.scriptId}/retry`));
|
|
3419
|
+
},
|
|
3420
|
+
stop() {
|
|
3421
|
+
this.fatal ? (this.removeAllMarkers(), this.scriptComplete()) : O.post(`/script-api/running-script/${this.scriptId}/stop`);
|
|
3422
|
+
},
|
|
3423
|
+
step() {
|
|
3424
|
+
O.post(`/script-api/running-script/${this.scriptId}/step`);
|
|
3425
|
+
},
|
|
3426
|
+
// This is called by processLine no matter the current state
|
|
3427
|
+
handleWaiting() {
|
|
3428
|
+
if (this.state !== "waiting" && this.state !== "paused")
|
|
3429
|
+
this.clearWaiting();
|
|
3430
|
+
else if (this.waitingInterval !== null)
|
|
3431
|
+
return;
|
|
3432
|
+
this.waitingStart = Date.now(), this.waitingInterval = setInterval(() => {
|
|
3433
|
+
this.waitingTime = Math.round((Date.now() - this.waitingStart) / 1e3);
|
|
3434
|
+
}, 1e3);
|
|
3435
|
+
},
|
|
3436
|
+
clearWaiting() {
|
|
3437
|
+
this.waitingTime = 0, clearInterval(this.waitingInterval), this.waitingInterval = null;
|
|
3438
|
+
},
|
|
3439
|
+
processLine(t) {
|
|
3440
|
+
t.filename && t.filename !== this.currentFilename && (this.files[t.filename] ? (this.currentFilename = t.filename, this.editor.setValue(this.files[t.filename].content), this.restoreBreakpoints(t.filename), this.editor.clearSelection()) : (this.files[t.filename] = { content: "", lineNo: 0 }, O.get(`/script-api/scripts/${t.filename}`).then((s) => {
|
|
3441
|
+
this.files[t.filename] = {
|
|
3442
|
+
content: s.data.contents,
|
|
3443
|
+
lineNo: 0
|
|
3444
|
+
}, this.breakpoints[t.filename] = s.data.breakpoints, this.restoreBreakpoints(t.filename), this.currentFilename = null;
|
|
3445
|
+
}).catch((s) => {
|
|
3446
|
+
this.files[t.filename] = null;
|
|
3447
|
+
}))), this.state = t.state;
|
|
3448
|
+
const e = this.editor.session.getMarkers();
|
|
3449
|
+
switch (this.state) {
|
|
3450
|
+
case "running":
|
|
3451
|
+
this.handleWaiting(), this.startOrGoDisabled = !1, this.pauseOrRetryDisabled = !1, this.stopDisabled = !1, this.pauseOrRetryButton = re, this.removeAllMarkers(), this.editor.session.addMarker(
|
|
3452
|
+
new this.Range(t.line_no - 1, 0, t.line_no - 1, 1),
|
|
3453
|
+
"runningMarker",
|
|
3454
|
+
"fullLine"
|
|
3455
|
+
), this.editor.gotoLine(t.line_no), this.files[t.filename].lineNo = t.line_no;
|
|
3456
|
+
break;
|
|
3457
|
+
case "crashed":
|
|
3458
|
+
this.fatal = !0;
|
|
3459
|
+
// Deliberate fall through (no break)
|
|
3460
|
+
case "error":
|
|
3461
|
+
this.pauseOrRetryButton = Di;
|
|
3462
|
+
// Deliberate fall through (no break)
|
|
3463
|
+
case "breakpoint":
|
|
3464
|
+
case "waiting":
|
|
3465
|
+
case "paused":
|
|
3466
|
+
if (this.handleWaiting(), this.state == "fatal" ? (this.startOrGoDisabled = !0, this.pauseOrRetryDisabled = !0) : (this.startOrGoDisabled = !1, this.pauseOrRetryDisabled = !1), this.stopDisabled = !1, Object.keys(e).filter(
|
|
3467
|
+
(a) => e[a].clazz === `${this.state}Marker`
|
|
3468
|
+
).length === 0) {
|
|
3469
|
+
this.removeAllMarkers();
|
|
3470
|
+
let a = t.line_no > 0 ? t.line_no : 1;
|
|
3471
|
+
this.editor.session.addMarker(
|
|
3472
|
+
new this.Range(a - 1, 0, a - 1, 1),
|
|
3473
|
+
`${this.state}Marker`,
|
|
3474
|
+
"fullLine"
|
|
3475
|
+
), this.editor.gotoLine(a), t.filename && (this.files[t.filename].lineNo = a);
|
|
3476
|
+
}
|
|
3477
|
+
break;
|
|
3478
|
+
}
|
|
3479
|
+
},
|
|
3480
|
+
processReceived() {
|
|
3481
|
+
let t = 0;
|
|
3482
|
+
for (let e of this.receivedEvents) {
|
|
3483
|
+
t += 1;
|
|
3484
|
+
let s = 0;
|
|
3485
|
+
switch (e.type) {
|
|
3486
|
+
case "file":
|
|
3487
|
+
this.files[e.filename] = { content: e.text, lineNo: 0 }, this.breakpoints[e.filename] = e.breakpoints, this.currentFilename === e.filename && this.restoreBreakpoints(e.filename);
|
|
3488
|
+
break;
|
|
3489
|
+
case "line":
|
|
3490
|
+
this.processLine(e);
|
|
3491
|
+
break;
|
|
3492
|
+
case "output":
|
|
3493
|
+
for (const d of e.line.split(`
|
|
3494
|
+
`))
|
|
3495
|
+
d && (this.messagesNewestOnTop ? this.messages.unshift({ message: d }) : this.messages.push({ message: d }));
|
|
3496
|
+
for (; this.messages.length > this.maxArrayLength; )
|
|
3497
|
+
this.messages.pop();
|
|
3498
|
+
break;
|
|
3499
|
+
case "script":
|
|
3500
|
+
this.handleScript(e);
|
|
3501
|
+
break;
|
|
3502
|
+
case "report":
|
|
3503
|
+
this.results.text = e.report, this.results.show = !0;
|
|
3504
|
+
break;
|
|
3505
|
+
case "complete":
|
|
3506
|
+
this.fatal || (this.removeAllMarkers(), this.scriptComplete());
|
|
3507
|
+
break;
|
|
3508
|
+
case "step":
|
|
3509
|
+
this.showDebug = !0;
|
|
3510
|
+
break;
|
|
3511
|
+
case "screen":
|
|
3512
|
+
let a = !1, i = {};
|
|
3513
|
+
for (screen of this.screens) {
|
|
3514
|
+
if (screen.target == e.target_name && screen.screen == e.screen_name) {
|
|
3515
|
+
i = screen, a = !0;
|
|
3516
|
+
break;
|
|
3517
|
+
}
|
|
3518
|
+
s += 1;
|
|
3519
|
+
}
|
|
3520
|
+
i.target = e.target_name, i.screen = e.screen_name, i.definition = e.definition, e.x ? i.left = e.x : i.left = 0, e.y ? i.top = e.y : i.top = 0, i.count = this.updateCounter++, a ? this.screens[s] = i : (i.id = this.idCounter++, this.screens[this.screens.length] = i);
|
|
3521
|
+
break;
|
|
3522
|
+
case "clearscreen":
|
|
3523
|
+
for (screen of this.screens) {
|
|
3524
|
+
if (screen.target == e.target_name && screen.screen == e.screen_name) {
|
|
3525
|
+
this.screens.splice(s, 1);
|
|
3526
|
+
break;
|
|
3527
|
+
}
|
|
3528
|
+
s += 1;
|
|
3529
|
+
}
|
|
3530
|
+
break;
|
|
3531
|
+
case "clearallscreens":
|
|
3532
|
+
this.screens = [];
|
|
3533
|
+
break;
|
|
3534
|
+
case "downloadfile":
|
|
3535
|
+
const n = document.createElement("a");
|
|
3536
|
+
n.href = window.location.origin + e.url, n.setAttribute("download", e.filename), n.click();
|
|
3537
|
+
break;
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
this.receivedEvents.splice(0, t);
|
|
3541
|
+
},
|
|
3542
|
+
received(t) {
|
|
3543
|
+
this.cable.recordPing(), this.receivedEvents.push(t);
|
|
3544
|
+
},
|
|
3545
|
+
promptDialogCallback(t) {
|
|
3546
|
+
this.prompt.show = !1, O.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3547
|
+
data: {
|
|
3548
|
+
method: this.prompt.method,
|
|
3549
|
+
answer: t,
|
|
3550
|
+
prompt_id: this.activePromptId,
|
|
3551
|
+
multiple: this.prompt.multiple
|
|
3552
|
+
}
|
|
3553
|
+
});
|
|
3554
|
+
},
|
|
3555
|
+
handleScript(t) {
|
|
3556
|
+
if (t.prompt_complete) {
|
|
3557
|
+
this.activePromptId = "", this.prompt.show = !1, this.ask.show = !1;
|
|
3558
|
+
return;
|
|
3559
|
+
}
|
|
3560
|
+
switch (this.activePromptId = t.prompt_id, this.prompt.method = t.method, this.prompt.layout = "horizontal", this.prompt.title = "Prompt", this.prompt.subtitle = "", this.prompt.details = "", this.prompt.buttons = [], this.prompt.multiple = null, t.method) {
|
|
3561
|
+
case "ask":
|
|
3562
|
+
case "ask_string":
|
|
3563
|
+
this.ask.default = null, this.ask.answerRequired = !0, this.ask.password = !1, this.ask.question = t.args[0], t.args[1] && t.args[1] !== !0 && t.args[1] !== !1 ? this.ask.default = t.args[1].toString() : t.args[1] === !0 && (this.ask.answerRequired = !1), t.args[2] === !0 && (this.ask.password = !0), this.ask.callback = (e) => {
|
|
3564
|
+
this.ask.show = !1, this.ask.password ? O.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3565
|
+
data: {
|
|
3566
|
+
method: t.method,
|
|
3567
|
+
password: e,
|
|
3568
|
+
// Using password as a key automatically filters it from rails logs
|
|
3569
|
+
prompt_id: this.activePromptId
|
|
3570
|
+
}
|
|
3571
|
+
}) : O.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3572
|
+
data: {
|
|
3573
|
+
method: t.method,
|
|
3574
|
+
answer: e,
|
|
3575
|
+
prompt_id: this.activePromptId
|
|
3576
|
+
}
|
|
3577
|
+
});
|
|
3578
|
+
}, this.ask.show = !0;
|
|
3579
|
+
break;
|
|
3580
|
+
case "prompt_for_hazardous":
|
|
3581
|
+
this.prompt.title = "Hazardous Command", this.prompt.message = `Warning: Command ${t.args[0]} ${t.args[1]} is Hazardous. `, t.args[2] && (this.prompt.message += t.args[2] + " "), this.prompt.message += "Send?", this.prompt.buttons = [{ text: "Send", value: "Send" }], this.prompt.callback = this.promptDialogCallback, this.prompt.show = !0;
|
|
3582
|
+
break;
|
|
3583
|
+
case "prompt_for_critical_cmd":
|
|
3584
|
+
this.criticalCmdUuid = t.args[0], this.criticalCmdString = t.args[5], this.criticalCmdUser = t.args[1], this.displayCriticalCmd = !0;
|
|
3585
|
+
break;
|
|
3586
|
+
case "prompt":
|
|
3587
|
+
t.kwargs && t.kwargs.informative && (this.prompt.subtitle = t.kwargs.informative), t.kwargs && t.kwargs.details && (this.prompt.details = t.kwargs.details), this.prompt.message = t.args[0], this.prompt.buttons = [{ text: "Ok", value: "Ok" }], this.prompt.callback = this.promptDialogCallback, this.prompt.show = !0;
|
|
3588
|
+
break;
|
|
3589
|
+
case "combo_box":
|
|
3590
|
+
t.kwargs && t.kwargs.informative && (this.prompt.subtitle = t.kwargs.informative), t.kwargs && t.kwargs.details && (this.prompt.details = t.kwargs.details), t.kwargs && t.kwargs.multiple && (this.prompt.multiple = !0), this.prompt.message = t.args[0], t.args.slice(1).forEach((e) => {
|
|
3591
|
+
this.prompt.buttons.push({ title: e, value: e });
|
|
3592
|
+
}), this.prompt.layout = "combo", this.prompt.callback = this.promptDialogCallback, this.prompt.show = !0;
|
|
3593
|
+
break;
|
|
3594
|
+
case "message_box":
|
|
3595
|
+
case "vertical_message_box":
|
|
3596
|
+
t.kwargs && t.kwargs.informative && (this.prompt.subtitle = t.kwargs.informative), t.kwargs && t.kwargs.details && (this.prompt.details = t.kwargs.details), this.prompt.message = t.args[0], t.args.slice(1).forEach((e) => {
|
|
3597
|
+
this.prompt.buttons.push({ text: e, value: e });
|
|
3598
|
+
}), t.method.includes("vertical") && (this.prompt.layout = "vertical"), this.prompt.callback = this.promptDialogCallback, this.prompt.show = !0;
|
|
3599
|
+
break;
|
|
3600
|
+
case "backtrace":
|
|
3601
|
+
this.information.title = "Call Stack", this.information.text = t.args, this.information.show = !0, this.information.width = "600";
|
|
3602
|
+
break;
|
|
3603
|
+
case "metadata_input":
|
|
3604
|
+
this.inputMetadata.callback = (e) => {
|
|
3605
|
+
this.inputMetadata.show = !1, O.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3606
|
+
data: {
|
|
3607
|
+
method: t.method,
|
|
3608
|
+
answer: e,
|
|
3609
|
+
prompt_id: this.activePromptId
|
|
3610
|
+
}
|
|
3611
|
+
});
|
|
3612
|
+
}, this.showMetadata();
|
|
3613
|
+
break;
|
|
3614
|
+
// This is called continuously by the backend
|
|
3615
|
+
case "open_file_dialog":
|
|
3616
|
+
case "open_files_dialog":
|
|
3617
|
+
this.file.title = t.args[0], this.file.message = t.args[1], t.kwargs && t.kwargs.filter && (this.file.filter = t.kwargs.filter), t.method == "open_files_dialog" && (this.file.multiple = !0), this.file.show = !0;
|
|
3618
|
+
break;
|
|
3619
|
+
}
|
|
3620
|
+
},
|
|
3621
|
+
async fileDialogCallback(t) {
|
|
3622
|
+
let e = "Cancel", s = [];
|
|
3623
|
+
t != "Cancel" && (e = [], t.forEach((a) => {
|
|
3624
|
+
e.push(a.name), s.push(
|
|
3625
|
+
O.get(
|
|
3626
|
+
`/openc3-api/storage/upload/${encodeURIComponent(
|
|
3627
|
+
`${window.openc3Scope}/tmp/${a.name}`
|
|
3628
|
+
)}?bucket=OPENC3_CONFIG_BUCKET`
|
|
3629
|
+
).then((i) => {
|
|
3630
|
+
s.push(
|
|
3631
|
+
ft({
|
|
3632
|
+
...i.data,
|
|
3633
|
+
data: a
|
|
3634
|
+
})
|
|
3635
|
+
);
|
|
3636
|
+
})
|
|
3637
|
+
);
|
|
3638
|
+
})), Promise.all(s).then((a) => {
|
|
3639
|
+
O.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3640
|
+
data: {
|
|
3641
|
+
method: this.file.multiple ? "open_files_dialog" : "open_file_dialog",
|
|
3642
|
+
answer: e,
|
|
3643
|
+
prompt_id: this.activePromptId
|
|
3644
|
+
}
|
|
3645
|
+
}).then((i) => {
|
|
3646
|
+
this.file.show = !1;
|
|
3647
|
+
});
|
|
3648
|
+
});
|
|
3649
|
+
},
|
|
3650
|
+
setError(t) {
|
|
3651
|
+
this.alertType = "error", this.alertText = `Error: ${t}`, this.showAlert = !0;
|
|
3652
|
+
},
|
|
3653
|
+
// ScriptRunner File menu actions
|
|
3654
|
+
newFile() {
|
|
3655
|
+
this.unlockFile(), this.filename = j, this.currentFilename = null, this.tempFilename = null, this.files = {}, this.editor.session.setValue(""), this.saveAllowed = !0, this.fileModified = "", this.suiteRunner = !1, this.startOrGoDisabled = !1, this.envDisabled = !1, this.inline || (this.$router.replace({
|
|
3656
|
+
name: "ScriptRunner"
|
|
3657
|
+
}).catch((t) => {
|
|
3658
|
+
}), document.title = "Script Runner"), this.doResize();
|
|
3659
|
+
},
|
|
3660
|
+
async newRubyTestSuite() {
|
|
3661
|
+
this.newFile(), this.editor.session.setValue(`require 'openc3/script/suite.rb'
|
|
3662
|
+
|
|
3663
|
+
# Group class name should indicate what the scripts are testing
|
|
3664
|
+
class Power < OpenC3::Group
|
|
3665
|
+
# Methods beginning with script_ are added to Script dropdown
|
|
3666
|
+
def script_power_on
|
|
3667
|
+
# Using OpenC3::Group.puts adds the output to the Test Report
|
|
3668
|
+
# This can be useful for requirements verification, QA notes, etc
|
|
3669
|
+
OpenC3::Group.puts "Verifying requirement SR-1"
|
|
3670
|
+
configure()
|
|
3671
|
+
end
|
|
3672
|
+
|
|
3673
|
+
# Other methods are not added to Script dropdown
|
|
3674
|
+
def configure
|
|
3675
|
+
end
|
|
3676
|
+
|
|
3677
|
+
def setup
|
|
3678
|
+
# Run when Group Setup button is pressed
|
|
3679
|
+
# Run before all scripts when Group Start is pressed
|
|
3680
|
+
end
|
|
3681
|
+
|
|
3682
|
+
def teardown
|
|
3683
|
+
# Run when Group Teardown button is pressed
|
|
3684
|
+
# Run after all scripts when Group Start is pressed
|
|
3685
|
+
end
|
|
3686
|
+
end
|
|
3687
|
+
|
|
3688
|
+
class TestSuite < OpenC3::Suite
|
|
3689
|
+
def initialize
|
|
3690
|
+
add_group('Power')
|
|
3691
|
+
end
|
|
3692
|
+
def setup
|
|
3693
|
+
# Run when Suite Setup button is pressed
|
|
3694
|
+
# Run before all groups when Suite Start is pressed
|
|
3695
|
+
end
|
|
3696
|
+
def teardown
|
|
3697
|
+
# Run when Suite Teardown button is pressed
|
|
3698
|
+
# Run after all groups when Suite Start is pressed
|
|
3699
|
+
end
|
|
3700
|
+
end
|
|
3701
|
+
`), await this.saveFile("auto");
|
|
3702
|
+
},
|
|
3703
|
+
async newPythonTestSuite() {
|
|
3704
|
+
this.newFile(), this.editor.session.setValue(`from openc3.script.suite import Suite, Group
|
|
3705
|
+
|
|
3706
|
+
# Group class name should indicate what the scripts are testing
|
|
3707
|
+
class Power(Group):
|
|
3708
|
+
# Methods beginning with script_ are added to Script dropdown
|
|
3709
|
+
def script_power_on(self):
|
|
3710
|
+
# Using Group.print adds the output to the Test Report
|
|
3711
|
+
# This can be useful for requirements verification, QA notes, etc
|
|
3712
|
+
Group.print("Verifying requirement SR-1")
|
|
3713
|
+
self.configure()
|
|
3714
|
+
|
|
3715
|
+
# Other methods are not added to Script dropdown
|
|
3716
|
+
def configure(self):
|
|
3717
|
+
pass
|
|
3718
|
+
|
|
3719
|
+
def setup(self):
|
|
3720
|
+
# Run when Group Setup button is pressed
|
|
3721
|
+
# Run before all scripts when Group Start is pressed
|
|
3722
|
+
pass
|
|
3723
|
+
|
|
3724
|
+
def teardown(self):
|
|
3725
|
+
# Run when Group Teardown button is pressed
|
|
3726
|
+
# Run after all scripts when Group Start is pressed
|
|
3727
|
+
pass
|
|
3728
|
+
|
|
3729
|
+
class TestSuite(Suite):
|
|
3730
|
+
def __init__(self):
|
|
3731
|
+
self.add_group(Power)
|
|
3732
|
+
|
|
3733
|
+
def setup(self):
|
|
3734
|
+
# Run when Suite Setup button is pressed
|
|
3735
|
+
# Run before all groups when Suite Start is pressed
|
|
3736
|
+
pass
|
|
3737
|
+
|
|
3738
|
+
def teardown(self):
|
|
3739
|
+
# Run when Suite Teardown button is pressed
|
|
3740
|
+
# Run after all groups when Suite Start is pressed
|
|
3741
|
+
pass
|
|
3742
|
+
`), await this.saveFile("auto");
|
|
3743
|
+
},
|
|
3744
|
+
addToRecent(t) {
|
|
3745
|
+
let e = this.recent.findIndex((s) => s.label === t);
|
|
3746
|
+
e !== -1 && this.recent.splice(e, 1), this.recent.unshift({
|
|
3747
|
+
label: t,
|
|
3748
|
+
icon: yt(t),
|
|
3749
|
+
command: async (s) => {
|
|
3750
|
+
this.filename = s.label, await this.reloadFile();
|
|
3751
|
+
}
|
|
3752
|
+
}), this.recent.length > 8 && this.recent.pop(), this.inline || (localStorage.script_runner__recent = JSON.stringify(this.recent));
|
|
3753
|
+
},
|
|
3754
|
+
removeFromRecent(t) {
|
|
3755
|
+
this.recent = this.recent.filter((e) => e.label !== t), this.inline || (localStorage.script_runner__recent = JSON.stringify(this.recent), localStorage.script_runner__filename === t && localStorage.removeItem("script_runner__filename"));
|
|
3756
|
+
},
|
|
3757
|
+
openFile() {
|
|
3758
|
+
this.fileOpen = !0;
|
|
3759
|
+
},
|
|
3760
|
+
async reloadFile(t = !0) {
|
|
3761
|
+
this.saveAllowed = !1, this.startOrGoDisabled = !0, await O.get(`/script-api/scripts/${this.filename}`, {
|
|
3762
|
+
headers: {
|
|
3763
|
+
Accept: "application/json",
|
|
3764
|
+
"Ignore-Errors": "404"
|
|
3765
|
+
}
|
|
3766
|
+
}).then((e) => {
|
|
3767
|
+
const s = {
|
|
3768
|
+
name: this.filename,
|
|
3769
|
+
contents: e.data.contents
|
|
3770
|
+
};
|
|
3771
|
+
e.data.suites && (s.suites = JSON.parse(e.data.suites)), e.data.error && (s.error = e.data.error), e.data.success && (s.success = e.data.success);
|
|
3772
|
+
const a = e.data.locked, i = e.data.breakpoints;
|
|
3773
|
+
this.setFile({ file: s, locked: a, breakpoints: i }, !0), this.saveAllowed = !0;
|
|
3774
|
+
}).catch((e) => {
|
|
3775
|
+
t === !0 && this.$notify.caution({
|
|
3776
|
+
title: "File Open Error",
|
|
3777
|
+
body: `Failed to open ${this.filename} due to ${e}`
|
|
3778
|
+
}), this.removeFromRecent(this.filename), this.newFile();
|
|
3779
|
+
});
|
|
3780
|
+
},
|
|
3781
|
+
// Called by the FileOpenDialog to set the file contents
|
|
3782
|
+
setFile({ file: t, locked: e, breakpoints: s }, a = !1) {
|
|
3783
|
+
this.files = {};
|
|
3784
|
+
let i = t.name.split("*")[0];
|
|
3785
|
+
if (a === !1 && this.filename !== i && (this.unlockFile(), this.lockedBy = e), this.filename = i, !this.inline) {
|
|
3786
|
+
this.$router.replace({
|
|
3787
|
+
name: "ScriptRunner",
|
|
3788
|
+
query: {
|
|
3789
|
+
file: this.filename
|
|
3790
|
+
}
|
|
3791
|
+
}).catch((d) => {
|
|
3792
|
+
});
|
|
3793
|
+
let n = this.filename.split("/");
|
|
3794
|
+
document.title = `${n.pop()} (${n.join("/")})`;
|
|
3795
|
+
}
|
|
3796
|
+
this.filename.split(".").pop() === "py" ? this.editor.session.setMode(this.pythonMode) : this.editor.session.setMode(this.rubyMode), this.currentFilename = null, this.editor.session.setValue(t.contents), this.breakpoints[this.filename] = s, this.restoreBreakpoints(this.filename), this.fileModified = "", this.envDisabled = !1, this.addToRecent(this.filename), t.suites ? (this.suiteRunner = !0, this.suiteMap = t.suites, this.startOrGoDisabled = !0) : (this.suiteRunner = !1, this.startOrGoDisabled = !1), t.error && (this.suiteError = t.error, this.showSuiteError = !0), this.disableSuiteButtons = t.success == !1, this.doResize();
|
|
3797
|
+
},
|
|
3798
|
+
clearTemp() {
|
|
3799
|
+
this.recent = this.recent.filter(
|
|
3800
|
+
(t) => !t.label.includes("__TEMP__")
|
|
3801
|
+
), this.inline || (localStorage.script_runner__recent = JSON.stringify(this.recent));
|
|
3802
|
+
},
|
|
3803
|
+
detectLanguage() {
|
|
3804
|
+
let t = new RegExp("^\\s*(require|load|puts) "), e = new RegExp("^\\s*(import|from) "), s = new RegExp("^\\s*end\\s*$"), a = new RegExp(
|
|
3805
|
+
"^\\s*(if|def|while|else|elif|class).*:\\s*$"
|
|
3806
|
+
), i = new RegExp('\\(f"'), d = this.editor.getValue().split(`
|
|
3807
|
+
`);
|
|
3808
|
+
for (let h of d) {
|
|
3809
|
+
if (h.match(t))
|
|
3810
|
+
return "ruby";
|
|
3811
|
+
if (h.match(e))
|
|
3812
|
+
return "python";
|
|
3813
|
+
if (h.match(s))
|
|
3814
|
+
return "ruby";
|
|
3815
|
+
if (h.match(a) || h.match(i))
|
|
3816
|
+
return "python";
|
|
3817
|
+
}
|
|
3818
|
+
return "unknown";
|
|
3819
|
+
},
|
|
3820
|
+
// saveFile takes a type to indicate if it was called by the Menu
|
|
3821
|
+
// or automatically by 'Start' (to ensure a consistent backend file) or autoSave
|
|
3822
|
+
async saveFile(t = "menu") {
|
|
3823
|
+
if (!this.readOnlyUser)
|
|
3824
|
+
if (this.saveAllowed) {
|
|
3825
|
+
const e = this.getBreakpointRows();
|
|
3826
|
+
if (this.filename === j) {
|
|
3827
|
+
if (t === "menu") {
|
|
3828
|
+
this.saveAs();
|
|
3829
|
+
return;
|
|
3830
|
+
} else if (this.tempFilename === null) {
|
|
3831
|
+
let s = this.detectLanguage();
|
|
3832
|
+
if (s === "ruby" || t !== "auto" && s == "unknown")
|
|
3833
|
+
this.tempFilename = Je + "/" + we(Date.now(), "yyyy_MM_dd_HH_mm_ss_SSS") + "_temp.rb";
|
|
3834
|
+
else if (s === "python")
|
|
3835
|
+
this.tempFilename = Je + "/" + we(Date.now(), "yyyy_MM_dd_HH_mm_ss_SSS") + "_temp.py";
|
|
3836
|
+
else
|
|
3837
|
+
return;
|
|
3838
|
+
this.filename = this.tempFilename, this.addToRecent(this.filename);
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
this.showSave = !0, await O.post(`/script-api/scripts/${this.filename}`, {
|
|
3842
|
+
data: {
|
|
3843
|
+
text: this.editor.getValue(),
|
|
3844
|
+
// Pass in the raw file text
|
|
3845
|
+
breakpoints: e
|
|
3846
|
+
}
|
|
3847
|
+
}).then((s) => {
|
|
3848
|
+
s.status == 200 ? (s.data.suites ? (this.startOrGoDisabled = !0, this.suiteRunner = !0, this.suiteMap = JSON.parse(s.data.suites)) : (this.startOrGoDisabled = !1, this.suiteRunner = !1, this.suiteMap = {}), s.data.error && (this.suiteError = s.data.error, this.showSuiteError = !0), this.fileModified = "", setTimeout(() => {
|
|
3849
|
+
this.showSave = !1;
|
|
3850
|
+
}, 2e3)) : (this.showSave = !1, this.alertType = "error", this.alertText = `Error saving file. Code: ${s.status} Text: ${s.statusText}`, this.showAlert = !0), this.lockFile(), this.doResize();
|
|
3851
|
+
}).catch(({ response: s }) => {
|
|
3852
|
+
this.showSave = !1, s.status == 422 ? (this.alertType = "error", this.alertText = s.data.suites) : (this.alertType = "error", this.alertText = `Error saving file. Code: ${s.status} Text: ${s.statusText}`), this.showAlert = !0;
|
|
3853
|
+
});
|
|
3854
|
+
} else
|
|
3855
|
+
this.setError("Attempt to save file when not allowed");
|
|
3856
|
+
},
|
|
3857
|
+
saveAs() {
|
|
3858
|
+
this.showSaveAs = !0;
|
|
3859
|
+
},
|
|
3860
|
+
async saveAsFilename(t) {
|
|
3861
|
+
this.filename = t.split("*")[0], this.currentFilename = null, this.tempFilename && (O.post(`/script-api/scripts/${this.tempFilename}/delete`), this.tempFilename = null), await this.saveFile("menu");
|
|
3862
|
+
},
|
|
3863
|
+
delete() {
|
|
3864
|
+
let t = this.filename;
|
|
3865
|
+
this.tempFilename && (t = this.tempFilename), this.$dialog.confirm(`Permanently delete file: ${t}`, {
|
|
3866
|
+
okText: "Delete",
|
|
3867
|
+
cancelText: "Cancel"
|
|
3868
|
+
}).then((e) => O.post(`/script-api/scripts/${t}/delete`, {
|
|
3869
|
+
data: {}
|
|
3870
|
+
})).then((e) => {
|
|
3871
|
+
this.removeFromRecent(t), this.newFile();
|
|
3872
|
+
}).catch((e) => {
|
|
3873
|
+
if (e !== !0) {
|
|
3874
|
+
const s = {
|
|
3875
|
+
text: `Failed Multi-Delete. ${e}`,
|
|
3876
|
+
type: "error"
|
|
3877
|
+
};
|
|
3878
|
+
this.$emit("alert", s);
|
|
3879
|
+
}
|
|
3880
|
+
});
|
|
3881
|
+
},
|
|
3882
|
+
download() {
|
|
3883
|
+
const t = new Blob([this.editor.getValue()], {
|
|
3884
|
+
type: "text/plain"
|
|
3885
|
+
}), e = document.createElement("a");
|
|
3886
|
+
e.href = URL.createObjectURL(t), e.setAttribute("download", this.filename), e.click();
|
|
3887
|
+
},
|
|
3888
|
+
// ScriptRunner Script menu actions
|
|
3889
|
+
syntaxCheck() {
|
|
3890
|
+
O.post(`/script-api/scripts/${this.filename}/syntax`, {
|
|
3891
|
+
data: this.editor.getValue(),
|
|
3892
|
+
headers: {
|
|
3893
|
+
Accept: "application/json",
|
|
3894
|
+
"Content-Type": "plain/text"
|
|
3895
|
+
}
|
|
3896
|
+
}).then((t) => {
|
|
3897
|
+
this.information.title = t.data.title, this.information.text = JSON.parse(t.data.description), this.information.show = !0, this.information.width = "600";
|
|
3898
|
+
});
|
|
3899
|
+
},
|
|
3900
|
+
showInstrumented() {
|
|
3901
|
+
O.post(`/script-api/scripts/${this.filename}/instrumented`, {
|
|
3902
|
+
data: this.editor.getValue(),
|
|
3903
|
+
headers: {
|
|
3904
|
+
Accept: "application/json",
|
|
3905
|
+
"Content-Type": "plain/text"
|
|
3906
|
+
}
|
|
3907
|
+
}).then((t) => {
|
|
3908
|
+
this.information.title = t.data.title, this.information.text = JSON.parse(t.data.description), this.information.show = !0, this.information.width = "90vw";
|
|
3909
|
+
});
|
|
3910
|
+
},
|
|
3911
|
+
showCallStack() {
|
|
3912
|
+
O.post(`/script-api/running-script/${this.scriptId}/backtrace`);
|
|
3913
|
+
},
|
|
3914
|
+
toggleDebug() {
|
|
3915
|
+
this.showDebug = !this.showDebug, this.showDebug && this.$nextTick(() => {
|
|
3916
|
+
this.$refs.debug.focus();
|
|
3917
|
+
});
|
|
3918
|
+
},
|
|
3919
|
+
toggleDisconnect() {
|
|
3920
|
+
this.showDisconnect = !this.showDisconnect;
|
|
3921
|
+
},
|
|
3922
|
+
debugKeydown(t) {
|
|
3923
|
+
t.key === "Escape" ? (this.debug = "", this.debugHistoryIndex = this.debugHistory.length) : t.key === "Enter" ? (this.debugHistory.push(this.debug), this.debugHistoryIndex = this.debugHistory.length, O.post(`/script-api/running-script/${this.scriptId}/debug`, {
|
|
3924
|
+
data: {
|
|
3925
|
+
args: this.debug
|
|
3926
|
+
}
|
|
3927
|
+
}), this.debug = "") : t.key === "ArrowUp" ? (this.debugHistoryIndex -= 1, this.debugHistoryIndex < 0 && (this.debugHistoryIndex = this.debugHistory.length - 1), this.debug = this.debugHistory[this.debugHistoryIndex], t.preventDefault()) : t.key === "ArrowDown" && (this.debugHistoryIndex += 1, this.debugHistoryIndex >= this.debugHistory.length && (this.debugHistoryIndex = 0), this.debug = this.debugHistory[this.debugHistoryIndex]);
|
|
3928
|
+
},
|
|
3929
|
+
removeAllMarkers: function() {
|
|
3930
|
+
const t = this.editor.session.getMarkers();
|
|
3931
|
+
Object.keys(t).filter((e) => t[e].type === "fullLine").forEach((e) => this.editor.session.removeMarker(e));
|
|
3932
|
+
},
|
|
3933
|
+
confirmLocalUnlock: function() {
|
|
3934
|
+
this.$dialog.confirm(
|
|
3935
|
+
"Are you sure you want to unlock this script for editing? If another user is editing this script, your changes might conflict with each other.",
|
|
3936
|
+
{
|
|
3937
|
+
okText: "Force Unlock",
|
|
3938
|
+
cancelText: "Cancel"
|
|
3939
|
+
}
|
|
3940
|
+
).then(() => (this.lockedBy = null, this.lockFile()));
|
|
3941
|
+
},
|
|
3942
|
+
lockFile: function() {
|
|
3943
|
+
if (!this.readOnlyUser)
|
|
3944
|
+
return O.post(`/script-api/scripts/${this.filename}/lock`);
|
|
3945
|
+
},
|
|
3946
|
+
unlockFile: function() {
|
|
3947
|
+
this.filename !== j && !this.readOnly && !this.readOnlyUser && O.post(`/script-api/scripts/${this.filename}/unlock`);
|
|
3948
|
+
},
|
|
3949
|
+
backToNewScript: async function() {
|
|
3950
|
+
this.scriptDisconnect(), this.removeAllMarkers(), await this.scriptComplete(), this.newFile();
|
|
3951
|
+
},
|
|
3952
|
+
screenId(t) {
|
|
3953
|
+
return "scriptRunnerScreen" + t;
|
|
3954
|
+
},
|
|
3955
|
+
closeScreen(t) {
|
|
3956
|
+
let e = 0;
|
|
3957
|
+
for (screen of this.screens) {
|
|
3958
|
+
if (screen.id == t) {
|
|
3959
|
+
this.screens.splice(e, 1);
|
|
3960
|
+
break;
|
|
3961
|
+
}
|
|
3962
|
+
e += 1;
|
|
3963
|
+
}
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
}, Ui = { class: "grid" }, zi = ["id"], Ai = { class: "item-content" }, Fi = { id: "sr-controls" }, Bi = { key: 0 }, Li = { key: 1 }, Ni = {
|
|
3967
|
+
key: 2,
|
|
3968
|
+
style: { width: "40px", height: "40px" },
|
|
3969
|
+
class: "ml-2 mr-2"
|
|
3970
|
+
}, Hi = { key: 3 }, Gi = { key: 4 }, qi = {
|
|
3971
|
+
key: 0,
|
|
3972
|
+
id: "debug",
|
|
3973
|
+
class: "pa-0"
|
|
3974
|
+
}, ji = { key: 1 }, Ki = { key: 0 }, Wi = { key: 1 };
|
|
3975
|
+
function Ji(t, e, s, a, i, n) {
|
|
3976
|
+
const d = u("top-bar"), h = u("v-icon"), c = u("v-btn"), v = u("v-snackbar"), w = u("openc3-screen"), x = u("suite-runner"), b = u("v-tooltip"), R = u("v-select"), C = u("v-text-field"), M = u("v-progress-circular"), _ = u("v-spacer"), U = u("v-badge"), N = u("v-row"), E = u("v-card"), A = u("v-list-item"), xe = u("v-divider"), Ce = u("v-list"), Ve = u("v-menu"), he = u("pane"), fe = u("script-log-messages"), W = u("splitpanes"), ge = u("v-col"), ve = u("file-open-save-dialog"), Re = u("environment-dialog"), _e = u("ask-dialog"), Oe = u("file-dialog"), Z = u("information-dialog"), Me = u("event-list-dialog"), Ee = u("overrides-dialog"), Te = u("prompt-dialog"), oe = u("results-dialog"), Ie = u("script-environment-dialog"), De = u("simple-text-dialog"), Pe = u("critical-cmd-dialog"), le = u("running-scripts"), L = u("v-sheet"), Ue = u("v-bottom-sheet");
|
|
3977
|
+
return y(), P(se, null, [
|
|
3978
|
+
s.inline ? D("", !0) : (y(), P(se, { key: 0 }, [
|
|
3979
|
+
o(d, {
|
|
3980
|
+
menus: n.menus,
|
|
3981
|
+
title: i.title
|
|
3982
|
+
}, null, 8, ["menus", "title"]),
|
|
3983
|
+
o(v, {
|
|
3984
|
+
modelValue: i.showAlert,
|
|
3985
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => i.showAlert = l),
|
|
3986
|
+
location: "top",
|
|
3987
|
+
color: i.alertType,
|
|
3988
|
+
timeout: 3e3
|
|
3989
|
+
}, {
|
|
3990
|
+
actions: r(({ attrs: l }) => [
|
|
3991
|
+
o(c, te({
|
|
3992
|
+
variant: "text",
|
|
3993
|
+
text: "Close"
|
|
3994
|
+
}, l, {
|
|
3995
|
+
onClick: e[0] || (e[0] = (p) => i.showAlert = !1)
|
|
3996
|
+
}), null, 16)
|
|
3997
|
+
]),
|
|
3998
|
+
default: r(() => [
|
|
3999
|
+
o(h, null, {
|
|
4000
|
+
default: r(() => [
|
|
4001
|
+
k(" mdi-" + z(i.alertType), 1)
|
|
4002
|
+
]),
|
|
4003
|
+
_: 1
|
|
4004
|
+
}),
|
|
4005
|
+
k(" " + z(i.alertText) + " ", 1)
|
|
4006
|
+
]),
|
|
4007
|
+
_: 1
|
|
4008
|
+
}, 8, ["modelValue", "color"]),
|
|
4009
|
+
o(v, {
|
|
4010
|
+
modelValue: i.showEditingToast,
|
|
4011
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => i.showEditingToast = l),
|
|
4012
|
+
location: "top",
|
|
4013
|
+
timeout: -1,
|
|
4014
|
+
color: "orange"
|
|
4015
|
+
}, {
|
|
4016
|
+
actions: r(({ attrs: l }) => [
|
|
4017
|
+
o(c, te({ variant: "text" }, l, {
|
|
4018
|
+
color: "danger",
|
|
4019
|
+
text: "Unlock",
|
|
4020
|
+
"data-test": "unlock-button",
|
|
4021
|
+
onClick: n.confirmLocalUnlock
|
|
4022
|
+
}), null, 16, ["onClick"]),
|
|
4023
|
+
o(c, te({
|
|
4024
|
+
variant: "text",
|
|
4025
|
+
text: "Dismiss"
|
|
4026
|
+
}, l, {
|
|
4027
|
+
onClick: e[2] || (e[2] = () => {
|
|
4028
|
+
i.showEditingToast = !1;
|
|
4029
|
+
})
|
|
4030
|
+
}), null, 16)
|
|
4031
|
+
]),
|
|
4032
|
+
default: r(() => [
|
|
4033
|
+
o(h, null, {
|
|
4034
|
+
default: r(() => e[36] || (e[36] = [
|
|
4035
|
+
k(" mdi-pencil-off ")
|
|
4036
|
+
])),
|
|
4037
|
+
_: 1
|
|
4038
|
+
}),
|
|
4039
|
+
k(" " + z(i.lockedBy) + " is editing this script. Editor is in read-only mode ", 1)
|
|
4040
|
+
]),
|
|
4041
|
+
_: 1
|
|
4042
|
+
}, 8, ["modelValue"]),
|
|
4043
|
+
S("div", Ui, [
|
|
4044
|
+
(y(!0), P(se, null, Le(i.screens, (l) => (y(), P("div", {
|
|
4045
|
+
id: n.screenId(l.id),
|
|
4046
|
+
key: l.id,
|
|
4047
|
+
ref_for: !0,
|
|
4048
|
+
ref: "gridItem",
|
|
4049
|
+
class: "item"
|
|
4050
|
+
}, [
|
|
4051
|
+
S("div", Ai, [
|
|
4052
|
+
o(w, {
|
|
4053
|
+
target: l.target,
|
|
4054
|
+
screen: l.screen,
|
|
4055
|
+
definition: l.definition,
|
|
4056
|
+
keywords: i.screenKeywords,
|
|
4057
|
+
"initial-floated": !0,
|
|
4058
|
+
"initial-top": l.top,
|
|
4059
|
+
"initial-left": l.left,
|
|
4060
|
+
"initial-z": 3,
|
|
4061
|
+
"min-z": 3,
|
|
4062
|
+
"fix-floated": !0,
|
|
4063
|
+
count: l.count,
|
|
4064
|
+
onCloseScreen: (p) => n.closeScreen(l.id),
|
|
4065
|
+
onDeleteScreen: (p) => n.closeScreen(l.id)
|
|
4066
|
+
}, null, 8, ["target", "screen", "definition", "keywords", "initial-top", "initial-left", "count", "onCloseScreen", "onDeleteScreen"])
|
|
4067
|
+
])
|
|
4068
|
+
], 8, zi))), 128))
|
|
4069
|
+
]),
|
|
4070
|
+
o(E, { style: { padding: "10px" } }, {
|
|
4071
|
+
default: r(() => [
|
|
4072
|
+
i.suiteRunner ? (y(), I(x, {
|
|
4073
|
+
key: 0,
|
|
4074
|
+
class: "suite-runner",
|
|
4075
|
+
"suite-map": i.suiteMap,
|
|
4076
|
+
"disable-buttons": i.disableSuiteButtons,
|
|
4077
|
+
filename: n.fullFilename,
|
|
4078
|
+
onButton: n.suiteRunnerButton,
|
|
4079
|
+
onLoaded: n.doResize
|
|
4080
|
+
}, null, 8, ["suite-map", "disable-buttons", "filename", "onButton", "onLoaded"])) : D("", !0),
|
|
4081
|
+
S("div", Fi, [
|
|
4082
|
+
o(N, {
|
|
4083
|
+
"no-gutters": "",
|
|
4084
|
+
justify: "space-between"
|
|
4085
|
+
}, {
|
|
4086
|
+
default: r(() => [
|
|
4087
|
+
i.showDisconnect ? (y(), I(h, {
|
|
4088
|
+
key: 0,
|
|
4089
|
+
class: "mt-2",
|
|
4090
|
+
color: "red"
|
|
4091
|
+
}, {
|
|
4092
|
+
default: r(() => e[37] || (e[37] = [
|
|
4093
|
+
k(" mdi-connection ")
|
|
4094
|
+
])),
|
|
4095
|
+
_: 1
|
|
4096
|
+
})) : D("", !0),
|
|
4097
|
+
o(b, {
|
|
4098
|
+
"open-delay": 600,
|
|
4099
|
+
location: "top"
|
|
4100
|
+
}, {
|
|
4101
|
+
activator: r(({ props: l }) => [
|
|
4102
|
+
i.scriptId ? (y(), I(c, te({ key: 1 }, l, {
|
|
4103
|
+
icon: "mdi-arrow-left",
|
|
4104
|
+
variant: "text",
|
|
4105
|
+
onClick: n.backToNewScript
|
|
4106
|
+
}), null, 16, ["onClick"])) : (y(), I(c, te({ key: 0 }, l, {
|
|
4107
|
+
icon: "mdi-cached",
|
|
4108
|
+
variant: "text",
|
|
4109
|
+
disabled: i.filename === t.NEW_FILENAME,
|
|
4110
|
+
"aria-label": "Reload File",
|
|
4111
|
+
onClick: n.reloadFile
|
|
4112
|
+
}), null, 16, ["disabled", "onClick"]))
|
|
4113
|
+
]),
|
|
4114
|
+
default: r(() => [
|
|
4115
|
+
i.scriptId ? (y(), P("span", Li, " Back to New Script ")) : (y(), P("span", Bi, " Reload File "))
|
|
4116
|
+
]),
|
|
4117
|
+
_: 1
|
|
4118
|
+
}),
|
|
4119
|
+
o(R, {
|
|
4120
|
+
id: "filename",
|
|
4121
|
+
modelValue: i.filenameSelect,
|
|
4122
|
+
"onUpdate:modelValue": [
|
|
4123
|
+
e[4] || (e[4] = (l) => i.filenameSelect = l),
|
|
4124
|
+
n.fileNameChanged
|
|
4125
|
+
],
|
|
4126
|
+
items: n.fileList,
|
|
4127
|
+
disabled: n.fileList.length <= 1,
|
|
4128
|
+
label: "Filename",
|
|
4129
|
+
"data-test": "filename",
|
|
4130
|
+
style: { width: "300px" },
|
|
4131
|
+
density: "compact",
|
|
4132
|
+
variant: "outlined",
|
|
4133
|
+
"hide-details": ""
|
|
4134
|
+
}, null, 8, ["modelValue", "items", "disabled", "onUpdate:modelValue"]),
|
|
4135
|
+
o(C, {
|
|
4136
|
+
modelValue: i.scriptId,
|
|
4137
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => i.scriptId = l),
|
|
4138
|
+
label: "Script ID",
|
|
4139
|
+
"data-test": "id",
|
|
4140
|
+
class: "shrink ml-2 script-state",
|
|
4141
|
+
style: { "max-width": "100px" },
|
|
4142
|
+
density: "compact",
|
|
4143
|
+
variant: "outlined",
|
|
4144
|
+
readonly: "",
|
|
4145
|
+
"hide-details": ""
|
|
4146
|
+
}, null, 8, ["modelValue"]),
|
|
4147
|
+
o(C, {
|
|
4148
|
+
modelValue: n.stateTimer,
|
|
4149
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => n.stateTimer = l),
|
|
4150
|
+
label: "Script State",
|
|
4151
|
+
"data-test": "state",
|
|
4152
|
+
class: "shrink ml-2 script-state",
|
|
4153
|
+
style: { "max-width": "120px" },
|
|
4154
|
+
density: "compact",
|
|
4155
|
+
variant: "outlined",
|
|
4156
|
+
readonly: "",
|
|
4157
|
+
"hide-details": ""
|
|
4158
|
+
}, null, 8, ["modelValue"]),
|
|
4159
|
+
i.state === "Connecting..." ? (y(), I(M, {
|
|
4160
|
+
key: 1,
|
|
4161
|
+
size: 40,
|
|
4162
|
+
class: "ml-2 mr-2",
|
|
4163
|
+
indeterminate: "",
|
|
4164
|
+
color: "primary"
|
|
4165
|
+
})) : (y(), P("div", Ni)),
|
|
4166
|
+
o(_),
|
|
4167
|
+
i.startOrGoButton === "Start" ? (y(), P("div", Hi, [
|
|
4168
|
+
o(b, {
|
|
4169
|
+
"open-delay": 600,
|
|
4170
|
+
location: "top"
|
|
4171
|
+
}, {
|
|
4172
|
+
activator: r(({ props: l }) => [
|
|
4173
|
+
o(c, te(l, {
|
|
4174
|
+
class: "mx-1",
|
|
4175
|
+
icon: "",
|
|
4176
|
+
variant: "text",
|
|
4177
|
+
disabled: i.envDisabled,
|
|
4178
|
+
"data-test": "env-button",
|
|
4179
|
+
"aria-label": "Script Environment",
|
|
4180
|
+
onClick: e[8] || (e[8] = (p) => i.scriptEnvironment.show = !i.scriptEnvironment.show)
|
|
4181
|
+
}), {
|
|
4182
|
+
default: r(() => [
|
|
4183
|
+
o(U, {
|
|
4184
|
+
modelValue: n.environmentModified,
|
|
4185
|
+
"onUpdate:modelValue": e[7] || (e[7] = (p) => n.environmentModified = p),
|
|
4186
|
+
floating: "",
|
|
4187
|
+
dot: ""
|
|
4188
|
+
}, {
|
|
4189
|
+
default: r(() => [
|
|
4190
|
+
o(h, { icon: "mdi-application-variable" })
|
|
4191
|
+
]),
|
|
4192
|
+
_: 1
|
|
4193
|
+
}, 8, ["modelValue"])
|
|
4194
|
+
]),
|
|
4195
|
+
_: 2
|
|
4196
|
+
}, 1040, ["disabled"])
|
|
4197
|
+
]),
|
|
4198
|
+
default: r(() => [
|
|
4199
|
+
S("span", null, [
|
|
4200
|
+
e[38] || (e[38] = k(" Script Environment ")),
|
|
4201
|
+
n.environmentModified ? (y(), P(se, { key: 0 }, [
|
|
4202
|
+
k(" (modified) ")
|
|
4203
|
+
], 64)) : D("", !0)
|
|
4204
|
+
])
|
|
4205
|
+
]),
|
|
4206
|
+
_: 1
|
|
4207
|
+
}),
|
|
4208
|
+
o(c, {
|
|
4209
|
+
class: "mx-1",
|
|
4210
|
+
color: "primary",
|
|
4211
|
+
text: "Start",
|
|
4212
|
+
"data-test": "start-button",
|
|
4213
|
+
disabled: i.startOrGoDisabled || !i.executeUser,
|
|
4214
|
+
hidden: i.suiteRunner,
|
|
4215
|
+
onClick: n.startHandler
|
|
4216
|
+
}, null, 8, ["disabled", "hidden", "onClick"])
|
|
4217
|
+
])) : (y(), P("div", Gi, [
|
|
4218
|
+
o(c, {
|
|
4219
|
+
color: "primary",
|
|
4220
|
+
class: "mr-2",
|
|
4221
|
+
text: "Go",
|
|
4222
|
+
disabled: i.startOrGoDisabled,
|
|
4223
|
+
"data-test": "go-button",
|
|
4224
|
+
onClick: n.go
|
|
4225
|
+
}, null, 8, ["disabled", "onClick"]),
|
|
4226
|
+
o(c, {
|
|
4227
|
+
color: "primary",
|
|
4228
|
+
class: "mr-2",
|
|
4229
|
+
text: i.pauseOrRetryButton,
|
|
4230
|
+
disabled: i.pauseOrRetryDisabled,
|
|
4231
|
+
"data-test": "pause-retry-button",
|
|
4232
|
+
onClick: n.pauseOrRetry
|
|
4233
|
+
}, null, 8, ["text", "disabled", "onClick"]),
|
|
4234
|
+
o(c, {
|
|
4235
|
+
color: "primary",
|
|
4236
|
+
text: "Stop",
|
|
4237
|
+
"data-test": "stop-button",
|
|
4238
|
+
disabled: i.stopDisabled,
|
|
4239
|
+
onClick: n.stop
|
|
4240
|
+
}, null, 8, ["disabled", "onClick"])
|
|
4241
|
+
]))
|
|
4242
|
+
]),
|
|
4243
|
+
_: 1
|
|
4244
|
+
})
|
|
4245
|
+
])
|
|
4246
|
+
]),
|
|
4247
|
+
_: 1
|
|
4248
|
+
}),
|
|
4249
|
+
o(W, {
|
|
4250
|
+
horizontal: "",
|
|
4251
|
+
style: { height: "100%" },
|
|
4252
|
+
onResize: n.calcHeight
|
|
4253
|
+
}, {
|
|
4254
|
+
default: r(() => [
|
|
4255
|
+
o(he, {
|
|
4256
|
+
class: "editorbox",
|
|
4257
|
+
size: "50"
|
|
4258
|
+
}, {
|
|
4259
|
+
default: r(() => [
|
|
4260
|
+
o(v, {
|
|
4261
|
+
modelValue: i.showSave,
|
|
4262
|
+
"onUpdate:modelValue": e[9] || (e[9] = (l) => i.showSave = l),
|
|
4263
|
+
absolute: "",
|
|
4264
|
+
location: "top right",
|
|
4265
|
+
timeout: -1,
|
|
4266
|
+
class: "saving"
|
|
4267
|
+
}, {
|
|
4268
|
+
default: r(() => e[39] || (e[39] = [
|
|
4269
|
+
k(" Saving... ")
|
|
4270
|
+
])),
|
|
4271
|
+
_: 1
|
|
4272
|
+
}, 8, ["modelValue"]),
|
|
4273
|
+
S("pre", {
|
|
4274
|
+
ref: "editor",
|
|
4275
|
+
class: "editor",
|
|
4276
|
+
onContextmenu: e[10] || (e[10] = ne((...l) => n.showExecuteSelectionMenu && n.showExecuteSelectionMenu(...l), ["prevent"]))
|
|
4277
|
+
}, null, 544),
|
|
4278
|
+
o(Ve, {
|
|
4279
|
+
modelValue: i.executeSelectionMenu,
|
|
4280
|
+
"onUpdate:modelValue": e[11] || (e[11] = (l) => i.executeSelectionMenu = l),
|
|
4281
|
+
target: [i.menuX, i.menuY]
|
|
4282
|
+
}, {
|
|
4283
|
+
default: r(() => [
|
|
4284
|
+
o(Ce, null, {
|
|
4285
|
+
default: r(() => [
|
|
4286
|
+
o(A, {
|
|
4287
|
+
title: "Execute Selection",
|
|
4288
|
+
onClick: n.executeSelection
|
|
4289
|
+
}, null, 8, ["onClick"]),
|
|
4290
|
+
i.scriptId ? (y(), I(A, {
|
|
4291
|
+
key: 0,
|
|
4292
|
+
title: "Goto Line",
|
|
4293
|
+
onClick: n.runFromCursor
|
|
4294
|
+
}, null, 8, ["onClick"])) : D("", !0),
|
|
4295
|
+
i.scriptId ? D("", !0) : (y(), I(A, {
|
|
4296
|
+
key: 1,
|
|
4297
|
+
title: "Run From Line",
|
|
4298
|
+
onClick: n.runFromCursor
|
|
4299
|
+
}, null, 8, ["onClick"])),
|
|
4300
|
+
i.scriptId ? D("", !0) : (y(), I(A, {
|
|
4301
|
+
key: 2,
|
|
4302
|
+
title: "Clear Local Breakpoints",
|
|
4303
|
+
onClick: n.clearBreakpoints
|
|
4304
|
+
}, null, 8, ["onClick"])),
|
|
4305
|
+
o(xe),
|
|
4306
|
+
o(A, {
|
|
4307
|
+
title: "Toggle Vim mode",
|
|
4308
|
+
"prepend-icon": "extras:vim",
|
|
4309
|
+
onClick: n.toggleVimMode
|
|
4310
|
+
}, null, 8, ["onClick"])
|
|
4311
|
+
]),
|
|
4312
|
+
_: 1
|
|
4313
|
+
})
|
|
4314
|
+
]),
|
|
4315
|
+
_: 1
|
|
4316
|
+
}, 8, ["modelValue", "target"])
|
|
4317
|
+
]),
|
|
4318
|
+
_: 1
|
|
4319
|
+
}),
|
|
4320
|
+
o(he, {
|
|
4321
|
+
id: "messages",
|
|
4322
|
+
ref: "messagesDiv",
|
|
4323
|
+
class: "mt-2"
|
|
4324
|
+
}, {
|
|
4325
|
+
default: r(() => [
|
|
4326
|
+
i.showDebug ? (y(), P("div", qi, [
|
|
4327
|
+
o(N, { "no-gutters": "" }, {
|
|
4328
|
+
default: r(() => [
|
|
4329
|
+
o(c, {
|
|
4330
|
+
color: "primary",
|
|
4331
|
+
style: { width: "100px" },
|
|
4332
|
+
class: "mr-4",
|
|
4333
|
+
text: "Step",
|
|
4334
|
+
"append-icon": "mdi-step-forward",
|
|
4335
|
+
disabled: !i.scriptId,
|
|
4336
|
+
"data-test": "step-button",
|
|
4337
|
+
onClick: n.step
|
|
4338
|
+
}, null, 8, ["disabled", "onClick"]),
|
|
4339
|
+
o(C, {
|
|
4340
|
+
ref: "debug",
|
|
4341
|
+
modelValue: i.debug,
|
|
4342
|
+
"onUpdate:modelValue": e[12] || (e[12] = (l) => i.debug = l),
|
|
4343
|
+
class: "mb-2",
|
|
4344
|
+
variant: "outlined",
|
|
4345
|
+
density: "compact",
|
|
4346
|
+
"hide-details": "",
|
|
4347
|
+
label: "Debug",
|
|
4348
|
+
"data-test": "debug-text",
|
|
4349
|
+
onKeydown: n.debugKeydown
|
|
4350
|
+
}, null, 8, ["modelValue", "onKeydown"])
|
|
4351
|
+
]),
|
|
4352
|
+
_: 1
|
|
4353
|
+
})
|
|
4354
|
+
])) : D("", !0),
|
|
4355
|
+
o(fe, {
|
|
4356
|
+
id: "log-messages",
|
|
4357
|
+
modelValue: i.messages,
|
|
4358
|
+
"onUpdate:modelValue": e[13] || (e[13] = (l) => i.messages = l),
|
|
4359
|
+
onSort: n.messageSortOrder
|
|
4360
|
+
}, null, 8, ["modelValue", "onSort"])
|
|
4361
|
+
]),
|
|
4362
|
+
_: 1
|
|
4363
|
+
}, 512)
|
|
4364
|
+
]),
|
|
4365
|
+
_: 1
|
|
4366
|
+
}, 8, ["onResize"])
|
|
4367
|
+
], 64)),
|
|
4368
|
+
s.inline ? (y(), P("div", ji, [
|
|
4369
|
+
o(N, null, {
|
|
4370
|
+
default: r(() => [
|
|
4371
|
+
o(ge, {
|
|
4372
|
+
class: "v-col-10",
|
|
4373
|
+
style: { margin: "0px", padding: "0px" }
|
|
4374
|
+
}, {
|
|
4375
|
+
default: r(() => [
|
|
4376
|
+
S("pre", {
|
|
4377
|
+
ref: "editor",
|
|
4378
|
+
class: "editor",
|
|
4379
|
+
style: { height: "200px" },
|
|
4380
|
+
onContextmenu: e[14] || (e[14] = ne((...l) => n.showExecuteSelectionMenu && n.showExecuteSelectionMenu(...l), ["prevent"]))
|
|
4381
|
+
}, null, 544)
|
|
4382
|
+
]),
|
|
4383
|
+
_: 1
|
|
4384
|
+
}),
|
|
4385
|
+
o(ge, {
|
|
4386
|
+
class: "v-col-2",
|
|
4387
|
+
style: { display: "flex", "justify-content": "center", "align-items": "center", "background-color": "var(--color-background-surface-default)" }
|
|
4388
|
+
}, {
|
|
4389
|
+
default: r(() => [
|
|
4390
|
+
i.startOrGoButton === "Start" ? (y(), P("div", Ki, [
|
|
4391
|
+
o(c, {
|
|
4392
|
+
class: "mx-1",
|
|
4393
|
+
color: "primary",
|
|
4394
|
+
text: "Start",
|
|
4395
|
+
"data-test": "start-button",
|
|
4396
|
+
disabled: i.startOrGoDisabled || !i.executeUser,
|
|
4397
|
+
hidden: i.suiteRunner,
|
|
4398
|
+
onClick: n.startHandler
|
|
4399
|
+
}, null, 8, ["disabled", "hidden", "onClick"])
|
|
4400
|
+
])) : (y(), P("div", Wi, [
|
|
4401
|
+
o(c, {
|
|
4402
|
+
color: "primary",
|
|
4403
|
+
class: "ma-2",
|
|
4404
|
+
text: "Go",
|
|
4405
|
+
disabled: i.startOrGoDisabled,
|
|
4406
|
+
"data-test": "go-button",
|
|
4407
|
+
onClick: n.go
|
|
4408
|
+
}, null, 8, ["disabled", "onClick"]),
|
|
4409
|
+
o(c, {
|
|
4410
|
+
color: "primary",
|
|
4411
|
+
class: "ma-2",
|
|
4412
|
+
text: i.pauseOrRetryButton,
|
|
4413
|
+
disabled: i.pauseOrRetryDisabled,
|
|
4414
|
+
"data-test": "pause-retry-button",
|
|
4415
|
+
onClick: n.pauseOrRetry
|
|
4416
|
+
}, null, 8, ["text", "disabled", "onClick"]),
|
|
4417
|
+
o(c, {
|
|
4418
|
+
color: "primary",
|
|
4419
|
+
class: "ma-2",
|
|
4420
|
+
text: "Stop",
|
|
4421
|
+
"data-test": "stop-button",
|
|
4422
|
+
disabled: i.stopDisabled,
|
|
4423
|
+
onClick: n.stop
|
|
4424
|
+
}, null, 8, ["disabled", "onClick"])
|
|
4425
|
+
]))
|
|
4426
|
+
]),
|
|
4427
|
+
_: 1
|
|
4428
|
+
})
|
|
4429
|
+
]),
|
|
4430
|
+
_: 1
|
|
4431
|
+
})
|
|
4432
|
+
])) : D("", !0),
|
|
4433
|
+
i.fileOpen ? (y(), I(ve, {
|
|
4434
|
+
key: 2,
|
|
4435
|
+
modelValue: i.fileOpen,
|
|
4436
|
+
"onUpdate:modelValue": e[15] || (e[15] = (l) => i.fileOpen = l),
|
|
4437
|
+
type: "open",
|
|
4438
|
+
"api-url": "/script-api/scripts",
|
|
4439
|
+
onFile: e[16] || (e[16] = (l) => n.setFile(l)),
|
|
4440
|
+
onError: e[17] || (e[17] = (l) => n.setError(l)),
|
|
4441
|
+
onClearTemp: e[18] || (e[18] = (l) => n.clearTemp(l))
|
|
4442
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
4443
|
+
i.showSaveAs ? (y(), I(ve, {
|
|
4444
|
+
key: 3,
|
|
4445
|
+
modelValue: i.showSaveAs,
|
|
4446
|
+
"onUpdate:modelValue": e[19] || (e[19] = (l) => i.showSaveAs = l),
|
|
4447
|
+
type: "save",
|
|
4448
|
+
"api-url": "/script-api/scripts",
|
|
4449
|
+
"require-target-parent-dir": "",
|
|
4450
|
+
"input-filename": n.filenameOrBlank,
|
|
4451
|
+
onFilename: e[20] || (e[20] = (l) => n.saveAsFilename(l)),
|
|
4452
|
+
onError: e[21] || (e[21] = (l) => n.setError(l)),
|
|
4453
|
+
onClearTemp: e[22] || (e[22] = (l) => n.clearTemp(l))
|
|
4454
|
+
}, null, 8, ["modelValue", "input-filename"])) : D("", !0),
|
|
4455
|
+
i.showEnvironment ? (y(), I(Re, {
|
|
4456
|
+
key: 4,
|
|
4457
|
+
modelValue: i.showEnvironment,
|
|
4458
|
+
"onUpdate:modelValue": e[23] || (e[23] = (l) => i.showEnvironment = l)
|
|
4459
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
4460
|
+
i.ask.show ? (y(), I(_e, {
|
|
4461
|
+
key: 5,
|
|
4462
|
+
modelValue: i.ask.show,
|
|
4463
|
+
"onUpdate:modelValue": e[24] || (e[24] = (l) => i.ask.show = l),
|
|
4464
|
+
question: i.ask.question,
|
|
4465
|
+
default: i.ask.default,
|
|
4466
|
+
password: i.ask.password,
|
|
4467
|
+
"answer-required": i.ask.answerRequired,
|
|
4468
|
+
onResponse: i.ask.callback
|
|
4469
|
+
}, null, 8, ["modelValue", "question", "default", "password", "answer-required", "onResponse"])) : D("", !0),
|
|
4470
|
+
i.file.show ? (y(), I(Oe, {
|
|
4471
|
+
key: 6,
|
|
4472
|
+
modelValue: i.file.show,
|
|
4473
|
+
"onUpdate:modelValue": e[25] || (e[25] = (l) => i.file.show = l),
|
|
4474
|
+
title: i.file.title,
|
|
4475
|
+
message: i.file.message,
|
|
4476
|
+
multiple: i.file.multiple,
|
|
4477
|
+
filter: i.file.filter,
|
|
4478
|
+
onResponse: n.fileDialogCallback
|
|
4479
|
+
}, null, 8, ["modelValue", "title", "message", "multiple", "filter", "onResponse"])) : D("", !0),
|
|
4480
|
+
i.information.show ? (y(), I(Z, {
|
|
4481
|
+
key: 7,
|
|
4482
|
+
modelValue: i.information.show,
|
|
4483
|
+
"onUpdate:modelValue": e[26] || (e[26] = (l) => i.information.show = l),
|
|
4484
|
+
title: i.information.title,
|
|
4485
|
+
text: i.information.text,
|
|
4486
|
+
width: i.information.width
|
|
4487
|
+
}, null, 8, ["modelValue", "title", "text", "width"])) : D("", !0),
|
|
4488
|
+
i.inputMetadata.show ? (y(), I(Me, {
|
|
4489
|
+
key: 8,
|
|
4490
|
+
modelValue: i.inputMetadata.show,
|
|
4491
|
+
"onUpdate:modelValue": e[27] || (e[27] = (l) => i.inputMetadata.show = l),
|
|
4492
|
+
events: i.inputMetadata.events,
|
|
4493
|
+
"time-zone": i.timeZone,
|
|
4494
|
+
"new-metadata": "",
|
|
4495
|
+
onClose: i.inputMetadata.callback
|
|
4496
|
+
}, null, 8, ["modelValue", "events", "time-zone", "onClose"])) : D("", !0),
|
|
4497
|
+
i.showOverrides ? (y(), I(Ee, {
|
|
4498
|
+
key: 9,
|
|
4499
|
+
modelValue: i.showOverrides,
|
|
4500
|
+
"onUpdate:modelValue": e[28] || (e[28] = (l) => i.showOverrides = l)
|
|
4501
|
+
}, null, 8, ["modelValue"])) : D("", !0),
|
|
4502
|
+
i.prompt.show ? (y(), I(Te, {
|
|
4503
|
+
key: 10,
|
|
4504
|
+
modelValue: i.prompt.show,
|
|
4505
|
+
"onUpdate:modelValue": e[29] || (e[29] = (l) => i.prompt.show = l),
|
|
4506
|
+
title: i.prompt.title,
|
|
4507
|
+
subtitle: i.prompt.subtitle,
|
|
4508
|
+
message: i.prompt.message,
|
|
4509
|
+
details: i.prompt.details,
|
|
4510
|
+
buttons: i.prompt.buttons,
|
|
4511
|
+
layout: i.prompt.layout,
|
|
4512
|
+
multiple: i.prompt.multiple,
|
|
4513
|
+
onResponse: i.prompt.callback
|
|
4514
|
+
}, null, 8, ["modelValue", "title", "subtitle", "message", "details", "buttons", "layout", "multiple", "onResponse"])) : D("", !0),
|
|
4515
|
+
i.results.show ? (y(), I(oe, {
|
|
4516
|
+
key: 11,
|
|
4517
|
+
modelValue: i.results.show,
|
|
4518
|
+
"onUpdate:modelValue": e[30] || (e[30] = (l) => i.results.show = l),
|
|
4519
|
+
text: i.results.text
|
|
4520
|
+
}, null, 8, ["modelValue", "text"])) : D("", !0),
|
|
4521
|
+
i.scriptEnvironment.show ? (y(), I(Ie, {
|
|
4522
|
+
key: 12,
|
|
4523
|
+
modelValue: i.scriptEnvironment.show,
|
|
4524
|
+
"onUpdate:modelValue": e[31] || (e[31] = (l) => i.scriptEnvironment.show = l),
|
|
4525
|
+
"input-environment": i.scriptEnvironment.env,
|
|
4526
|
+
onEnvironment: n.environmentHandler
|
|
4527
|
+
}, null, 8, ["modelValue", "input-environment", "onEnvironment"])) : D("", !0),
|
|
4528
|
+
o(De, {
|
|
4529
|
+
modelValue: i.showSuiteError,
|
|
4530
|
+
"onUpdate:modelValue": e[32] || (e[32] = (l) => i.showSuiteError = l),
|
|
4531
|
+
title: "Suite Analysis Error",
|
|
4532
|
+
text: i.suiteError,
|
|
4533
|
+
width: 1e3
|
|
4534
|
+
}, null, 8, ["modelValue", "text"]),
|
|
4535
|
+
o(Pe, {
|
|
4536
|
+
modelValue: i.displayCriticalCmd,
|
|
4537
|
+
"onUpdate:modelValue": e[33] || (e[33] = (l) => i.displayCriticalCmd = l),
|
|
4538
|
+
uuid: i.criticalCmdUuid,
|
|
4539
|
+
"cmd-string": i.criticalCmdString,
|
|
4540
|
+
"cmd-user": i.criticalCmdUser,
|
|
4541
|
+
persistent: !0,
|
|
4542
|
+
onStatus: n.promptDialogCallback
|
|
4543
|
+
}, null, 8, ["modelValue", "uuid", "cmd-string", "cmd-user", "onStatus"]),
|
|
4544
|
+
o(Ue, {
|
|
4545
|
+
modelValue: i.showScripts,
|
|
4546
|
+
"onUpdate:modelValue": e[35] || (e[35] = (l) => i.showScripts = l)
|
|
4547
|
+
}, {
|
|
4548
|
+
default: r(() => [
|
|
4549
|
+
o(L, { class: "pb-11 pt-5 px-5" }, {
|
|
4550
|
+
default: r(() => [
|
|
4551
|
+
i.showScripts ? (y(), I(le, {
|
|
4552
|
+
key: 0,
|
|
4553
|
+
"connect-in-new-tab": !!i.fileModified,
|
|
4554
|
+
onDisconnect: n.scriptDisconnect,
|
|
4555
|
+
onClose: e[34] || (e[34] = () => {
|
|
4556
|
+
i.showScripts = !1;
|
|
4557
|
+
})
|
|
4558
|
+
}, null, 8, ["connect-in-new-tab", "onDisconnect"])) : D("", !0)
|
|
4559
|
+
]),
|
|
4560
|
+
_: 1
|
|
4561
|
+
})
|
|
4562
|
+
]),
|
|
4563
|
+
_: 1
|
|
4564
|
+
}, 8, ["modelValue"])
|
|
4565
|
+
], 64);
|
|
4566
|
+
}
|
|
4567
|
+
const cs = /* @__PURE__ */ G(Pi, [["render", Ji], ["__scopeId", "data-v-d4cb571d"]]);
|
|
4568
|
+
export {
|
|
4569
|
+
Mt as RunningScripts,
|
|
4570
|
+
It as ScriptLogMessages,
|
|
4571
|
+
cs as ScriptRunner,
|
|
4572
|
+
ki as SuiteRunner
|
|
4573
|
+
};
|
|
4574
|
+
//# sourceMappingURL=scriptrunner.js.map
|