openc3-cosmos-tool-admin 6.10.1 → 6.10.2
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.
- checksums.yaml +4 -4
- data/tools/admin/{ArrayWidget-DQRQ7dPa-ec60f1a7547ad6b00d69.js → ArrayWidget-CR7Wpw3N-1d7c510ab36c99211442.js} +2 -2
- data/tools/admin/{ArrayplotWidget-BeSfz3MR-62c6314f2795ec59c2c3.js → ArrayplotWidget-DDEd-jRJ-94f6ff8222793ee0c1a3.js} +1 -1
- data/tools/admin/{BarColumn-BdIaQfOz-3f372dcbd0e38e94beb7.js → BarColumn-XWs-3Cwb-f2a771e7088b178df79a.js} +1 -1
- data/tools/admin/{BlockWidget-DSFKrUxl-40a0bfee90429f0fbd04.js → BlockWidget-CfFgdNSv-adc07bae1949471c51f3.js} +2 -2
- data/tools/admin/{ButtonWidget-CFbjdxSr-3eb417f150aad49159da.js → ButtonWidget-BaSvtElA-fa208eb7a7c42e075476.js} +2 -2
- data/tools/admin/CanvasWidget-DcwDi5Zk-40bff91af73995032615.js +1 -0
- data/tools/admin/{CanvasdotWidget-CZxUOPRd-2c149df34b30a8c42813.js → CanvasdotWidget--awMOWyz-adb443c815ab5c602676.js} +1 -1
- data/tools/admin/{CanvasimageWidget-ULQq3nqZ-68511568bd9671b1395a.js → CanvasimageWidget-YP1pCtvb-6a4a3a5868239cb15021.js} +1 -1
- data/tools/admin/{CanvasimagevalueWidget-jFCVXYhi-69a98787a537716d1eca.js → CanvasimagevalueWidget-CjVHb2uj-b4642e862029ca10ad50.js} +1 -1
- data/tools/admin/{CanvaslabelWidget-DQhBI1vZ-5c678abaccd36a449807.js → CanvaslabelWidget-DoMplTTO-f9a21ba072700a7446f0.js} +1 -1
- data/tools/admin/{CanvaslabelvalueWidget-C4REgztL-c7278cf0b63aa2576e5e.js → CanvaslabelvalueWidget-Dyo_ogHn-39a1f337bf6607955429.js} +1 -1
- data/tools/admin/CanvaslineWidget-D7W1TIxm-3ca24577e3c49591f39f.js +1 -0
- data/tools/admin/{CanvaslinevalueWidget-597khOSA-8ec57bb2832d2ccf4c7f.js → CanvaslinevalueWidget-BOZyJuLE-e7b51eb96fa8c136015e.js} +1 -1
- data/tools/admin/CheckbuttonWidget-B1E4BC6v-ebd747a0b92c9e523561.js +1 -0
- data/tools/admin/{ComboboxWidget-BMcHS4g5-991790211f0df154fa60.js → ComboboxWidget-BExUBH57-32944b62f6401569c5df.js} +1 -1
- data/tools/admin/DateWidget-_ZmPsi2l-b71014d47777c8dea9fd.js +1 -0
- data/tools/admin/{DetailsDialog-q9piPmHq-5fd592fa0232fc721f08.js → DetailsDialog-Bq7SS7bc-f67af23a6fa84c4eb303.js} +1 -1
- data/tools/admin/{DynamicWidget-DHL7pbgW-ddb50949e471ca798597.js → DynamicWidget-DHL7pbgW-cdd3bd8e0ef29e47bb48.js} +1 -1
- data/tools/admin/{FormatvalueWidget-Cm-HmAmw-cc32c9f0e3a6440dc3f7.js → FormatvalueWidget-4C0vrL2i-99a25d2c3fef7a93df1a.js} +1 -1
- data/tools/admin/{Graph-BEodMaxQ-dc069ff0863bb1b79a14.js → Graph-B7KPo9Ul-e036a5408c2bac2e7f03.js} +1 -1
- data/tools/admin/{GraphWidget-CAADBFV--5a0f42f620a95bceb78a.js → GraphWidget-BpkPpAbd-7ec23bd7978c329b128c.js} +1 -1
- data/tools/admin/HorizontalWidget-DbEQYjFC-5168bf9bab3c4cfc0f67.js +1 -0
- data/tools/admin/{HorizontalboxWidget-CW9XX4uH-5b9955591fadf92383d4.js → HorizontalboxWidget-CTomf_Iy-3aca4ce79451799087dc.js} +1 -1
- data/tools/admin/HorizontallineWidget-B7xx7ofY-bf8ae564c97cd8e6f628.js +1 -0
- data/tools/admin/{IframeWidget-BBU3MkSq-3bd357450464e91b6e8a.js → IframeWidget-DK7rbULe-d2dd1f182ea212550421.js} +1 -1
- data/tools/admin/{ImageLoader-XAGgjKkq-1e8835a62d6b86fae045.js → ImageLoader-C9rN_pSY-82b72016bfcbb2d87e84.js} +1 -1
- data/tools/admin/{ImageviewerWidget-UByjeO63-6a1aa341aad3f5e3a1fa.js → ImageviewerWidget-6d6Kl3W_-4a87503ed4d791d82509.js} +1 -1
- data/tools/admin/{InterfacesTab-6hli9fcg-fa1490edce5e929d406b.js → InterfacesTab-BCqTanhV-d29e6aa19dfac64837fe.js} +1 -1
- data/tools/admin/{LabelWidget-BsOpolUL-480fcf63f4a393ec665b.js → LabelWidget-D71FfOSw-73207a5a06c8749cf60f.js} +1 -1
- data/tools/admin/LabelledWidget-D2ir5kVU-561f6d60d360aec60161.js +1 -0
- data/tools/admin/LabelprogressbarWidget-C4_YbROz-2666dc23311ea8cd886e.js +1 -0
- data/tools/admin/LabelsparklineWidget-CdZ_pM2B-9c53c3d5bc097192806c.js +1 -0
- data/tools/admin/LabelvalueWidget-BS0EPY5h-4c324758e52b5318465f.js +1 -0
- data/tools/admin/{LabelvaluedescWidget-Cfu2vuja-9ff7549a39dfd631a158.js → LabelvaluedescWidget-Cpr8_Voq-7555c19abea137e5b098.js} +1 -1
- data/tools/admin/{LabelvaluelimitsbarWidget-DYV68AJ_-14ed76ef50306d433241.js → LabelvaluelimitsbarWidget-DTcYbEQS-ffda2dc590ea3da36722.js} +1 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-D0ltQ9Ta-792ec8e1c8e0c13461f8.js +1 -0
- data/tools/admin/{LabelvaluerangebarWidget-3EaUB6E6-9d23a3bdfcc0902cfeae.js → LabelvaluerangebarWidget-O8IHjvHs-d72d3c091b5537fd90d0.js} +1 -1
- data/tools/admin/Layout-DW5yNlp7-ace4cb6861ae152dfb76.js +1 -0
- data/tools/admin/{LedWidget-Gi6GXtrW-dae81febb3ae6042fe79.js → LedWidget-DUvJ2v8k-bb4674260918e8083ecf.js} +1 -1
- data/tools/admin/{LimitsbarWidget-BTZQY9XQ-8c4fb603d49357ccf95a.js → LimitsbarWidget-BehZv0-k-467ecbb1e4a48d16bc9f.js} +1 -1
- data/tools/admin/{LimitscolorWidget-CFnmvlrA-37fbe4cc91eef4c5ecbe.js → LimitscolorWidget-FXT0ZPPH-fc201f3ea1724188afb0.js} +1 -1
- data/tools/admin/{LimitscolumnWidget-DSsz36tT-6fcdc5688973d90c5fec.js → LimitscolumnWidget-CjBy-CCI-62dd3598137a8239247d.js} +1 -1
- data/tools/admin/LinegraphWidget-lmu_tFKd-9de31f7f2ca2a94a0f26.js +1 -0
- data/tools/admin/MatrixbycolumnsWidget-CCF7rCkV-4f2dde155659775bab61.js +1 -0
- data/tools/admin/{MicroservicesTab-BSSCh5Ss-e353932e75faf48047d5.js → MicroservicesTab-rxOATXLO-c2187481d9cc38140ac0.js} +1 -1
- data/tools/admin/{OutputDialog-BMzp6wy3-6270642e99f9befcc694.js → OutputDialog-CNH74LpJ-358057a9c313d5b4d4b7.js} +1 -1
- data/tools/admin/{PackagesTab-BascLTCK-cca24f27d8349907a8fa.js → PackagesTab-BE6W7Aru-bd93372c4726404cdddb.js} +1 -1
- data/tools/admin/{PluginsTab-Yz9HZqpp-910a6e5d7b19d45b11b7.js → PluginsTab-B_Pf2A9c-eade5bfbaa7a9845c6b6.js} +2 -2
- data/tools/admin/{ProgressbarWidget-DJepvOip-8ff70f5f860011c00bc0.js → ProgressbarWidget-B5WN658S-76a59dc3dc00087d7790.js} +1 -1
- data/tools/admin/RadiobuttonWidget-B_3nys46-606cccf081f6dd6ce153.js +1 -0
- data/tools/admin/{RadiogroupWidget-CUucj6aT-4e1289cf1681d9dd871b.js → RadiogroupWidget-BiMIL9li-afcf4809f9a06843f266.js} +1 -1
- data/tools/admin/{RangebarWidget-Bu4rqlrx-b13f4d05894e17b35f93.js → RangebarWidget-Dn0GASdi-146ca1db217c87209a24.js} +1 -1
- data/tools/admin/{RedisTab-C00rFmdl-7e2ccc5bd3fadaa12005.js → RedisTab-BsKrL4fD-b2fcdb0fc809b92a952e.js} +1 -1
- data/tools/admin/{RollupWidget-ByLvEEau-cb3a4775a6f72a2dcd9e.js → RollupWidget-b62qcG5K-698558e5d0afe4381cdc.js} +1 -1
- data/tools/admin/{RoutersTab-CEe4oS0x-b49f6b75042daef01df4.js → RoutersTab-EHz4wDCn-7f5979df68b7523e677c.js} +1 -1
- data/tools/admin/ScrollwindowWidget-Dn29gs-U-82045d48cf1f1de60dbc.js +1 -0
- data/tools/admin/{SecretsTab-DFrxV8Q8-ca4a28befc3615d0adec.js → SecretsTab-Cbt_r-1I-97f19965ddfb7d986c08.js} +1 -1
- data/tools/admin/{SettingsTab-CpLxrjTc-c8622ca1e0fa0aa3c324.js → SettingsTab-L5xbCAW_-fac7019234b5b0103823.js} +2 -2
- data/tools/admin/{SignalWidget-qvL2YZJA-d4926d5b69e8d205ea30.js → SignalWidget-CLi6qask-b628e80bcaaebe320a17.js} +1 -1
- data/tools/admin/{SimpleTextDialog--iSWgPgq-dabd517064950fe3d362.js → SimpleTextDialog-8vDPDt6X-ede3bff1ed6b721bd4f9.js} +1 -1
- data/tools/admin/SpacerWidget-BCA3gdap-2eca01433a01bf0762e2.js +1 -0
- data/tools/admin/{SparklineWidget-BkNSRypJ-578f0450fc9c2ec01ee6.js → SparklineWidget-D8mb4zLt-75e25e357207b1a40394.js} +1 -1
- data/tools/admin/TabbookWidget-Bkt4g02d-d767964b1bc0871baf24.js +1 -0
- data/tools/admin/{TargetsTab-B6tf2hKl-20fdeb73e7732330db81.js → TargetsTab-c-qMsGHh-68f62cdfffd0f44e3a73.js} +1 -1
- data/tools/admin/{TextboxWidget-DbwpPVGB-965cd84f13108a2dfe6b.js → TextboxWidget-CR05wO-t-bbfb67086d157846a942.js} +1 -1
- data/tools/admin/TextfieldWidget-Be_Pz2bF-991ecfd210306f7ec088.js +1 -0
- data/tools/admin/{TimeWidget-BHybAfg8-2ef3652afaab371b26f8.js → TimeWidget-Dy8zpkC6-d42df16e7c70beceafbb.js} +1 -1
- data/tools/admin/TitleWidget-BcmxUDzM-254d77f781517e4a335d.js +1 -0
- data/tools/admin/{ToolsTab-CXoxIck8-cd6095dc9c1b215c3dde.js → ToolsTab-Buklih4C-7b99b1d57542ca90944a.js} +2 -2
- data/tools/admin/{VWidget-D06LY-Yc-1386bbd0ed7afc886d9d.js → VWidget-CBmUpKSV-4a3d957e137b11e79aaa.js} +1 -1
- data/tools/admin/{ValueWidget-CGT0LV_n-f28fb61ddd02224a739a.js → ValueWidget-BxWrHkYY-9db8906f394d9594c19d.js} +1 -1
- data/tools/admin/ValuelimitsbarWidget-BdY02gqc-3491b603ef72af7ae7c6.js +1 -0
- data/tools/admin/{ValuelimitscolumnWidget-jzxrQd-f-1f0d66b078567bf94726.js → ValuelimitscolumnWidget-CuJ6rqtC-bd1f5ec15ee21c84ffbb.js} +1 -1
- data/tools/admin/{ValuerangebarWidget-C8ckuAeh-a0f589394f5fdcd0125c.js → ValuerangebarWidget-C5rolGDi-530e6c6a8f91a5e9f275.js} +1 -1
- data/tools/admin/{VerticalWidget-qN82km_m-8cc1d779b219f6f880d8.js → VerticalWidget-DsnEzKZ2-2007547788bdd392b5ef.js} +1 -1
- data/tools/admin/VerticalboxWidget-CzDgveBl-7285d0df7dea41448c77.js +1 -0
- data/tools/admin/{Widget-DXvVFSH5-911ef7faeb56d94116a8.js → Widget-VCl8Ts8s-1e815890eca5d53bf68d.js} +1 -1
- data/tools/admin/{main-4560cb476d7e9d971b97.js → main-db859e7477e802bb1689.js} +80 -80
- data/tools/admin/main.js +1 -1
- data/tools/admin/{settings-DRNFiuf0-6eada366887f768e812b.js → settings-DlX9yvJJ-45982315ea11dbdebbb1.js} +1 -1
- metadata +80 -80
- data/tools/admin/CanvasWidget-BloYxuKE-bd7432f755c4dd08aadc.js +0 -1
- data/tools/admin/CanvaslineWidget-S4PCEvZM-58f0c96eae5b75e0d714.js +0 -1
- data/tools/admin/CheckbuttonWidget-BcblKat3-c29e0b0e519f68962e5e.js +0 -1
- data/tools/admin/DateWidget-BpnMzSBn-568b8523461c5b29d3b6.js +0 -1
- data/tools/admin/HorizontalWidget-NcXIXxh7-ac4430c2bd179fac7e53.js +0 -1
- data/tools/admin/HorizontallineWidget-Cu2dDt7k-ca5bfd2bc99611a7daf6.js +0 -1
- data/tools/admin/LabelledWidget-DVOGpgZ--be6e8ae8ae73a9e8ac0e.js +0 -1
- data/tools/admin/LabelprogressbarWidget-BeE9fDs6-4c6a74a14a60af91654c.js +0 -1
- data/tools/admin/LabelsparklineWidget-Bj7trKML-366bdc6967968c3df270.js +0 -1
- data/tools/admin/LabelvalueWidget-Dwqsh5o2-eb6928f5259e5721a1cc.js +0 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-CtaoTixt-8a607f68160af332179e.js +0 -1
- data/tools/admin/Layout-DNR3xnku-a01a9b3a62428bfb1b78.js +0 -1
- data/tools/admin/LinegraphWidget-CeBijgDo-2d1fe80cbc5b9b60e16e.js +0 -1
- data/tools/admin/MatrixbycolumnsWidget-DX9uhjAv-4b1ae2738aef8ffa3842.js +0 -1
- data/tools/admin/RadiobuttonWidget-4e8ROIfg-8f6efea6ff9b37a4afc4.js +0 -1
- data/tools/admin/ScrollwindowWidget-CXJ9QGN1-376ce5b224c4ca4390cf.js +0 -1
- data/tools/admin/SpacerWidget-CaWx41K7-ee222bd1763dfcd9499b.js +0 -1
- data/tools/admin/TabbookWidget-MsrRG1vn-f49576da2086555d3772.js +0 -1
- data/tools/admin/TextfieldWidget-DzMlTMYW-44d5799795c0663b983e.js +0 -1
- data/tools/admin/TitleWidget-DL_sE5YE-2e10d96d64ba14f84323.js +0 -1
- data/tools/admin/ValuelimitsbarWidget-CmpyPO-1-417db70aadb1a08ea6f3.js +0 -1
- data/tools/admin/VerticalboxWidget-CiJZDlHJ-445ff2aa6dd1d842fee3.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./GraphWidget-BpkPpAbd-7ec23bd7978c329b128c.js","./main-db859e7477e802bb1689.js","vue","./Graph-B7KPo9Ul-e036a5408c2bac2e7f03.js","single-spa","./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue-router","vuex","vuetify"],function(p,u){"use strict";var i,n,r,a,o,l,d;return{setters:[t=>{i=t.M},t=>{n=t.d},t=>{r=t.resolveComponent,a=t.createBlock,o=t.openBlock,l=t.normalizeStyle},t=>{d=t.M},null,null,null,null,null],execute:function(){const t={components:{Graph:d},mixins:[i]};function h(e,s,g,v,f,y){const c=r("graph");return o(),a(c,{id:e.id,ref:"graph"+e.id,state:e.state,"selected-graph-id":e.id,"start-time":e.startTime,"seconds-graphed":e.secondsGraphed,"points-saved":e.pointsSaved,"points-graphed":e.pointsGraphed,"initial-items":e.items,height:e.size.height,width:e.size.width,style:l(e.computedStyle),"time-zone":e.screenTimeZone,"hide-toolbar":"","hide-overview":"",onPause:s[0]||(s[0]=()=>e.state="pause"),onStart:s[1]||(s[1]=()=>e.state="start")},null,8,["id","state","selected-graph-id","start-time","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style","time-zone"])}const m=p("default",n(t,[["render",h]]))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Layout-DW5yNlp7-ace4cb6861ae152dfb76.js","./main-db859e7477e802bb1689.js","vue","./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue-router","single-spa","vuex","vuetify"],function(h,B){"use strict";var u,o,m,r,n,g,l,a,p,d,y;return{setters:[e=>{u=e.r},e=>{o=e.d,m=e.O},e=>{r=e.createElementBlock,n=e.openBlock,g=e.normalizeStyle,l=e.Fragment,a=e.renderList,p=e.createBlock,d=e.resolveDynamicComponent,y=e.mergeProps},null,null,null,null,null],execute:function(){const e={mixins:[u],computed:{columns(){return parseInt(this.parameters[0])},widgetChunks(){return m.chunk(this.widgets,this.columns)}},created:function(){if(this.parameters[1]){let s=this.parameters[1];this.widgets.forEach(c=>{c.settings.find(i=>i[0]==="MARGIN"||i[0].startsWith("RAW")&&i[1].toUpperCase().includes("MARGIN"))===void 0&&c.settings.push(["MARGIN",s])})}}};function k(s,c,i,A,N,f){return n(),r("table",{style:g(s.computedStyle),role:"presentation"},[(n(!0),r(l,null,a(f.widgetChunks,(v,w)=>(n(),r("tr",{key:"r"+w},[(n(!0),r(l,null,a(v,(t,C)=>(n(),r("td",{key:"c"+C},[(n(),p(d(t.type),y({ref_for:!0},s.listeners,{target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":s.screenValues,"screen-time-zone":s.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))]))),128))]))),128))],4)}const b=h("default",o(e,[["render",k]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue","single-spa","./OutputDialog-CNH74LpJ-358057a9c313d5b4d4b7.js","vue-router","vuex","vuetify"],function(F,q){"use strict";var T,m,E,A,s,f,u,l,o,x,d,w,y,C,N,$,j,B,U;return{setters:[i=>{T=i.d,m=i.F,E=i.p,A=i.l},i=>{s=i.resolveComponent,f=i.createBlock,u=i.openBlock,l=i.withCtx,o=i.createVNode,x=i.createElementVNode,d=i.toDisplayString,w=i.createTextVNode,y=i.createElementBlock,C=i.createCommentVNode,N=i.Fragment,$=i.renderList,j=i.withDirectives,B=i.vShow},null,i=>{U=i.E},null,null,null],execute:function(){const i={props:{modelValue:Boolean,text:String,title:String},computed:{dialogText:function(){return this.text},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{download:function(){const t=new Blob([this.dialogText],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",`${this.title}__error.txt`),e.click()}}},L={class:"mx-2"},I={class:"pa-2"};function J(t,e,c,h,a,n){const g=s("v-spacer"),k=s("v-btn"),S=s("v-toolbar"),p=s("v-textarea"),_=s("v-card-text"),V=s("v-card-actions"),b=s("v-card"),D=s("v-dialog");return u(),f(D,{modelValue:n.show,"onUpdate:modelValue":e[2]||(e[2]=v=>n.show=v),width:"600"},{default:l(()=>[o(b,null,{default:l(()=>[o(S,{height:"24"},{default:l(()=>[o(g),x("span",null,d(c.title),1),o(g),x("div",L,[o(k,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:n.download},null,8,["onClick"])])]),_:1}),x("div",I,[o(_,null,{default:l(()=>[o(p,{modelValue:n.dialogText,"onUpdate:modelValue":e[0]||(e[0]=v=>n.dialogText=v),readonly:"",rows:"15","data-test":"dialogText"},null,8,["modelValue"])]),_:1})]),o(V,{class:"px-2"},{default:l(()=>[o(g),o(k,{variant:"flat",onClick:e[1]||(e[1]=v=>n.show=!n.show)},{default:l(()=>[...e[3]||(e[3]=[w(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const H={components:{OutputDialog:U,TextBoxDialog:T(i,[["render",J]])},data(){return{microservices:[],microservice_status:{},microservice_id:null,jsonContent:"",dialogTitle:"",showDialog:!1,showError:!1,alert:"",alertType:"success",showAlert:!1,updater:null}},mounted(){this.update(),this.updater=setInterval(()=>{this.update()},2e3)},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{update:function(){m.get("/openc3-api/microservice_status/all").then(t=>{this.microservice_status=t.data}),m.get("/openc3-api/microservices/all").then(t=>{let e=[];for(const[c,h]of Object.entries(t.data))e.push(h);e.sort((c,h)=>c.name.localeCompare(h.name)),this.microservices=e})},startMicroservice:function(t){this.$dialog.confirm(`Are you sure you want to restart microservice: ${t}?`,{okText:"Start",cancelText:"Cancel"}).then(e=>{m.post(`/openc3-api/microservices/${t}/start`).then(c=>{this.alert=`Started ${t}`,this.alertType="success",this.showAlert=!0,setTimeout(()=>{this.showAlert=!1},5e3)}).then(()=>{this.update()})})},stopMicroservice:function(t){this.$dialog.confirm(`Are you sure you want to stop microservice: ${t}?`,{okText:"Stop",cancelText:"Cancel"}).then(e=>{m.post(`/openc3-api/microservices/${t}/stop`).then(c=>{this.alert=`Stopped ${t}`,this.alertType="success",this.showAlert=!0,setTimeout(()=>{this.showAlert=!1},5e3)}).then(()=>{this.update()})})},showMicroservice:function(t){m.get(`/openc3-api/microservices/${t}`).then(e=>{this.microservice_id=t,this.dialogTitle=t,this.jsonContent=JSON.stringify(e.data,null," "),this.showDialog=!0})},showMicroserviceError:function(t){this.dialogTitle=t;const e=this.microservice_status[t].error;this.jsonContent=JSON.stringify(e,null," "),this.showError=!0},formatDate(t){return E(A(parseInt(t)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},dialogCallback:function(t){if(this.showDialog=!1,t!==null){let e=JSON.parse(t),c="put",h=`/openc3-api/microservices/${this.microservice_id}`;e.name!==this.microservice_id&&(c="post",h="/openc3-api/microservices"),m[c](h,{data:{json:t}}).then(a=>{this.alert="Modified Microservice",this.alertType="success",this.showAlert=!0,setTimeout(()=>{this.showAlert=!1},5e3),this.update()})}}}};function R(t,e,c,h,a,n){const g=s("v-alert"),k=s("v-list-item-title"),S=s("v-list-item-subtitle"),p=s("v-btn"),_=s("v-list-item-icon"),V=s("v-list-item"),b=s("v-divider"),D=s("v-list"),v=s("output-dialog"),Q=s("text-box-dialog");return u(),y("div",null,[o(g,{modelValue:a.showAlert,"onUpdate:modelValue":e[0]||(e[0]=r=>a.showAlert=r),dismissible:"",transition:"scale-transition",type:a.alertType},{default:l(()=>[w(d(a.alert),1)]),_:1},8,["modelValue","type"]),o(D,{class:"list","data-test":"microserviceList"},{default:l(()=>[(u(!0),y(N,null,$(a.microservices,r=>(u(),y("div",{key:r},[o(V,null,{append:l(()=>{var O;return[j(o(p,{icon:"mdi-alert",variant:"text",onClick:M=>n.showMicroserviceError(r.name)},null,8,["onClick"]),[[B,(O=a.microservice_status[r.name])==null?void 0:O.error]]),o(_,null,{default:l(()=>[o(p,{"aria-label":"Start Microservice",icon:"mdi-play",variant:"text",onClick:M=>n.startMicroservice(r.name)},null,8,["onClick"])]),_:2},1024),o(_,null,{default:l(()=>[o(p,{"aria-label":"Stop Microservice",icon:"mdi-stop",variant:"text",onClick:M=>n.stopMicroservice(r.name)},null,8,["onClick"])]),_:2},1024),o(_,null,{default:l(()=>[o(p,{"aria-label":"Show Microservice Details",icon:"mdi-eye",variant:"text",onClick:M=>n.showMicroservice(r.name)},null,8,["onClick"])]),_:2},1024)]}),default:l(()=>[o(k,null,{default:l(()=>[w(d(r.name),1)]),_:2},1024),a.microservice_status[r.name]?(u(),f(S,{key:0},{default:l(()=>[w(" Updated: "+d(n.formatDate(a.microservice_status[r.name].updated_at))+", State: "+d(a.microservice_status[r.name].state)+", Enabled: "+d(r.enabled===!1?"False":"True")+", Count: "+d(a.microservice_status[r.name].count),1)]),_:2},1024)):C("",!0)]),_:2},1024),o(b)]))),128))]),_:1}),a.showDialog?(u(),f(v,{key:0,modelValue:a.showDialog,"onUpdate:modelValue":e[1]||(e[1]=r=>a.showDialog=r),content:a.jsonContent,type:"Microservice",name:a.dialogTitle,onSubmit:n.dialogCallback},null,8,["modelValue","content","name","onSubmit"])):C("",!0),a.showError?(u(),f(Q,{key:1,modelValue:a.showError,"onUpdate:modelValue":e[2]||(e[2]=r=>a.showError=r),text:a.jsonContent,title:a.dialogTitle},null,8,["modelValue","text","title"])):C("",!0)])}const G=F("default",T(H,[["render",R],["__scopeId","data-v-61eec86a"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue"],function(M,S){"use strict";var m,i,w,a,f,_,d,r,u,b,y;return{setters:[n=>{m=n.d,i=n.b,w=n.B},n=>{a=n.resolveComponent,f=n.createBlock,_=n.openBlock,d=n.withCtx,r=n.createVNode,u=n.createElementVNode,b=n.toDisplayString,y=n.createTextVNode}],execute:function(){const n={methods:{buildLanguageMode(t,e){let o=i.require("ace/lib/oop"),h=Object.getOwnPropertyNames(w.prototype).filter(l=>l!=="constructor").filter(l=>l!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),p=new RegExp(`(\\b${h.join("\\b|\\b")}\\b)`),s=function(){t.call(this);for(let l in this.$rules)this.$rules[l].unshift({regex:p,token:"support.function"})};o.inherits(s,t);let c=i.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=i.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[o,function(){this.HighlightRules=s,this.$outdent=new c,this.$behaviour=new g,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[t,e]=this.buildLanguageMode(i.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,i.require("ace/mode/folding/ruby").FoldMode);let o=i.require("ace/mode/ruby").Mode;return t.inherits(e,o),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[t,e]=this.buildLanguageMode(i.require("ace/mode/python_highlight_rules").PythonHighlightRules,i.require("ace/mode/folding/pythonic").FoldMode);let o=i.require("ace/mode/python").Mode;return t.inherits(e,o),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[t,e]=this.buildLanguageMode(i.require("ace/mode/json_highlight_rules").JsonHighlightRules,i.require("ace/mode/folding/ruby").FoldMode);let o=i.require("ace/mode/json").Mode;return t.inherits(e,o),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[t,e]=this.buildLanguageMode(i.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,i.require("ace/mode/folding/markdown").FoldMode);let o=i.require("ace/mode/markdown").Mode;return t.inherits(e,o),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},x={mixins:[n],props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let t=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();t=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const o=this.buildPythonMode();t=new o;break;case"md":const h=this.buildMarkdownMode();t=new h;break;default:const p=this.buildRubyMode();t=new p;break}this.editor.session.setMode(t),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.content),this.editor.clearSelection(),this.editor.focus(),this.editor.setReadOnly(!0)},beforeUnmount(){this.editor&&this.editor.destroy()},methods:{close:function(){this.show=!this.show},download:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const o=document.createElement("a");o.href=URL.createObjectURL(t),o.setAttribute("download",e),o.click()}}},v=["textContent"],q={class:"mx-2"},$={ref:"editor",class:"editor"};function R(t,e,o,h,p,s){const c=a("v-spacer"),g=a("v-btn"),l=a("v-toolbar"),V=a("v-card-text"),C=a("v-card-actions"),B=a("v-card"),L=a("v-dialog");return _(),f(L,{modelValue:s.show,"onUpdate:modelValue":e[1]||(e[1]=k=>s.show=k),width:"85vw"},{default:d(()=>[r(B,null,{default:d(()=>[r(l,{height:"24"},{default:d(()=>[r(c),u("span",{textContent:b(s.title)},null,8,v),r(c),u("div",q,[r(g,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:s.download},null,8,["onClick"])])]),_:1}),r(V,null,{default:d(()=>[u("pre",$,null,512)]),_:1}),r(C,{class:"pr-6 pb-4 pt-0"},{default:d(()=>[r(c),r(g,{variant:"flat",onClick:e[0]||(e[0]=k=>s.show=!s.show)},{default:d(()=>[...e[2]||(e[2]=[y(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const j=M("E",m(x,[["render",R],["__scopeId","data-v-69e71dd8"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue","single-spa","./SimpleTextDialog-8vDPDt6X-ede3bff1ed6b721bd4f9.js","vue-router","vuex","vuetify"],function(U,X){"use strict";var w,D,f,b,O,i,u,c,e,V,$,t,h,d,y,v,S,m,T,F,N;return{setters:[a=>{w=a.d,D=a.q,f=a.F,b=a.p,O=a.l},a=>{i=a.resolveComponent,u=a.createElementBlock,c=a.openBlock,e=a.createVNode,V=a.createBlock,$=a.createCommentVNode,t=a.withCtx,h=a.createElementVNode,d=a.createTextVNode,y=a.Fragment,v=a.renderList,S=a.createSlots,m=a.toDisplayString,T=a.normalizeClass,F=a.mergeProps},null,a=>{N=a.E},null,null,null],execute:function(){const a={components:{DownloadDialog:D,SimpleTextDialog:N},data(){return{showDownloadDialog:!1,showProcessOutput:!1,processOutput:"",files:[],loadingPackage:!1,progress:0,gems:[],python:[],processes:{}}},mounted(){this.update(),this.updateProcesses()},methods:{showOutput:function(o){this.processOutput=o.output,this.showProcessOutput=!0},update(){f.get("/openc3-api/packages").then(o=>{this.gems=o.data.ruby,this.python=o.data.python})},updateProcesses:function(){f.get("/openc3-api/process_status/package_?substr=true").then(o=>{this.processes=o.data,Object.keys(this.processes).length>0&&setTimeout(()=>{this.updateProcesses(),this.update()},2500)})},formatDate(o){return b(O(parseInt(o)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},selectFile(){this.progress=0,this.$refs.fileInput.click()},fileChange(o){const s=o.target.files;if(s.length>0){this.loadingPackage=!0;let E=this;const B=[...s].map(n=>{const r=new FormData;return r.append("package",n,n.name),f.post("/openc3-api/packages",{data:r,headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(g){let p=Math.round(g.loaded*100/g.total);E.progress=p}})});Promise.all(B).then(n=>{this.$notify.normal({body:`Uploaded ${n.length} package${n.length>1?"s":""}`}),this.loadingPackage=!1,this.files=[],setTimeout(()=>{this.updateProcesses()},2500)}).catch(n=>{this.loadingPackage=!1})}},deletePackage(o){this.$dialog.confirm(`Are you sure you want to remove: ${o}`,{okText:"Delete",cancelText:"Cancel"}).then(s=>f.delete(`/openc3-api/packages/${o}`)).then(s=>{this.$notify.normal({body:`Removed package ${o}`}),setTimeout(()=>{this.updateProcesses()},2500)}).catch(s=>{this.$notify.serious({body:`Failed to remove package ${o}`})})}}},j=["textContent"],R=["textContent"];function z(o,s,E,B,n,r){const g=i("v-btn"),p=i("v-col"),A=i("rux-progress"),C=i("v-row"),P=i("v-list-item-title"),G=i("v-list-item-subtitle"),H=i("v-tooltip"),_=i("v-list-item"),x=i("v-divider"),I=i("v-list"),M=i("download-dialog"),q=i("simple-text-dialog");return c(),u("div",null,[e(C,{"no-gutters":"",align:"center",class:"px-2"},{default:t(()=>[e(p,{class:"pa-2 mt-2"},{default:t(()=>[e(g,{onClick:r.selectFile},{default:t(()=>[...s[3]||(s[3]=[d("Install Package",-1)])]),_:1},8,["onClick"]),h("input",{ref:"fileInput",style:{display:"none"},type:"file",onChange:s[0]||(s[0]=(...l)=>r.fileChange&&r.fileChange(...l))},null,544)]),_:1}),e(p,{class:"ml-4 mr-2",cols:"4"},{default:t(()=>[e(A,{value:n.progress},null,8,["value"])]),_:1})]),_:1}),Object.keys(n.processes).length>0?(c(),V(I,{key:0,class:"list","data-test":"process-list"},{default:t(()=>[e(C,{"no-gutters":"",class:"px-4"},{default:t(()=>[e(p,{class:"text-h6"},{default:t(()=>[...s[4]||(s[4]=[d("Process List",-1)])]),_:1}),e(p,{align:"right"},{default:t(()=>[...s[5]||(s[5]=[h("div",null,"Showing last 10 min of activity",-1)])]),_:1})]),_:1}),(c(!0),u(y,null,v(n.processes,l=>(c(),u("div",{key:l.name},[e(_,null,S({default:t(()=>[e(P,null,{default:t(()=>[h("span",{class:T(l.state.toLowerCase()),textContent:m(`Processing ${l.process_type}: ${l.detail} - ${l.state}`)},null,10,j)]),_:2},1024),e(G,null,{default:t(()=>[h("span",{textContent:m(" Updated At: "+r.formatDate(l.updated_at))},null,8,R)]),_:2},1024)]),_:2},[l.state!=="Running"?{name:"append",fn:t(()=>[e(H,{"open-delay":600,location:"top"},{activator:t(({props:k})=>[e(g,F({ref_for:!0},k,{icon:"mdi-eye",variant:"text","aria-label":"Show Output",onClick:L=>r.showOutput(l)}),null,16,["onClick"])]),default:t(()=>[s[6]||(s[6]=h("span",null,"Show Output",-1))]),_:2},1024)]),key:"0"}:void 0]),1024),e(x)]))),128))]),_:1})):$("",!0),e(I,{class:"list","data-test":"packageList"},{default:t(()=>[e(C,{class:"px-4"},{default:t(()=>[e(p,{class:"text-h6"},{default:t(()=>[...s[7]||(s[7]=[d("Ruby Gems",-1)])]),_:1})]),_:1}),(c(!0),u(y,null,v(n.gems,(l,k)=>(c(),u("div",{key:k},[e(_,null,{append:t(()=>[e(g,{icon:"mdi-delete",variant:"text","aria-label":"Delete Ruby Gem",onClick:L=>r.deletePackage(l)},null,8,["onClick"])]),default:t(()=>[e(P,null,{default:t(()=>[d(m(l),1)]),_:2},1024)]),_:2},1024),e(x)]))),128)),e(C,{class:"px-4"},{default:t(()=>[e(p,{class:"text-h6"},{default:t(()=>[...s[8]||(s[8]=[d("Python Packages",-1)])]),_:1})]),_:1}),(c(!0),u(y,null,v(n.python,(l,k)=>(c(),u("div",{key:k},[e(_,null,{append:t(()=>[e(g,{icon:"mdi-delete",variant:"text","aria-label":"Delete Python Package",onClick:L=>r.deletePackage(l)},null,8,["onClick"])]),default:t(()=>[e(P,null,{default:t(()=>[d(m(l),1)]),_:2},1024)]),_:2},1024),e(x)]))),128))]),_:1}),e(M,{modelValue:n.showDownloadDialog,"onUpdate:modelValue":s[1]||(s[1]=l=>n.showDownloadDialog=l)},null,8,["modelValue"]),e(q,{modelValue:n.showProcessOutput,"onUpdate:modelValue":s[2]||(s[2]=l=>n.showProcessOutput=l),title:"Process Output",text:n.processOutput},null,8,["modelValue","text"])])}const Z=U("default",w(a,[["render",z],["__scopeId","data-v-e97741ba"]]))}}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
System.register(["./main-4560cb476d7e9d971b97.js","vue","single-spa","./SimpleTextDialog--iSWgPgq-dabd517064950fe3d362.js","./settings-DRNFiuf0-6eada366887f768e812b.js","vue-router","vuex","vuetify"],function(Z,Ft){"use strict";var I,F,q,T,H,W,A,i,x,u,l,f,C,o,d,w,$,L,y,j,O,E,N,z,G,J,K;return{setters:[c=>{I=c.d,F=c.U,q=c.Y,T=c.F,H=c.p,W=c.l,A=c.B},c=>{i=c.resolveComponent,x=c.createElementBlock,u=c.openBlock,l=c.createVNode,f=c.createBlock,C=c.createCommentVNode,o=c.withCtx,d=c.createElementVNode,w=c.createTextVNode,$=c.Fragment,L=c.renderList,y=c.toDisplayString,j=c.normalizeClass,O=c.mergeProps,E=c.normalizeProps,N=c.guardReactiveProps,z=c.withModifiers,G=c.renderSlot},null,c=>{J=c.E},c=>{K=c.n},null,null,null],execute:function(){const c="store_url",R={props:{id:Number,name:String,title:String,author:String,description:String,keywords:Array,img_path:String,image_url:String,licenses:Array,verified:Boolean,homepage:String,repository:String,gem_url:String,checksum:String},data:function(){return{_api:new A,_storeUrl:"",imageContents:null}},computed:{plugin:function(){return{id:this.id,name:this.name,title:this.title,author:this.author,description:this.description,keywords:this.keywords,img_path:this.img_path,image_url:this.image_url,licenses:this.licenses,verified:this.verified,homepage:this.homepage,repository:this.repository,gem_url:this.gem_url,checksum:this.checksum}},imageContentsWithMimeType:function(){if(this.imageContents){const t={"image/bmp":[66,77],"image/jpeg":[255,216,255],"image/png":[137,80,78,71],"image/gif":[71,73,70,56],"image/webp":[82,73,70,70]},e=new TextEncoder().encode(globalThis.atob(this.imageContents.slice(0,6))).slice(1),a=Object.entries(t).find(([g,n])=>n.every((s,r)=>s===e[r]));if(a){const[g]=a;return`data:${g};base64,${this.imageContents}`}}},storeLink:function(){return this.hasStoreListing?new URL(`/cosmos_plugins/${this.id}`,this._storeUrl):null},hasStoreListing:function(){return!!this.id},hasDetails:function(){return this.hasStoreListing?!0:!!this.title&&!!this.description},isPluginInstalled:function(){return!!this.name}},created:async function(){const t="https://store.openc3.com";try{this._storeUrl=await this._api.get_setting(c)||t}catch{this._storeUrl=t}if(this.img_path)try{const e=new URLSearchParams({volume:"OPENC3_GEMS_VOLUME",scope:globalThis.openc3Scope}),{data:a}=await T.get(`/openc3-api/storage/download_file/${encodeURIComponent(this.img_path)}?${e}`);this.imageContents=a.contents}catch{}}},tt={mixins:[R],props:{modelValue:Boolean},emits:["triggerInstall","triggerUninstall","update:modelValue"],data(){return{showDialog:!1,showCopiedTooltip:!1}},computed:{isDialogOpen:{get:function(){return this.modelValue||this.showDialog},set:function(t){this.showDialog=t,this.$emit("update:modelValue",t)}}},methods:{openDialog:function(){this.isDialogOpen=!0},closeDialog:function(){this.isDialogOpen=!1},install:function(){this.$emit("triggerInstall",this.gemUrl)},uninstall:function(){this.$emit("triggerUninstall",this.gemUrl)},copyChecksum:function(){navigator.clipboard.writeText(this.checksum),this.showCopiedTooltip=!0,setTimeout(()=>{this.showCopiedTooltip=!1},1e3)}}},et=["textContent"],lt={key:0},it=["textContent"],nt={class:"mt-3 text-caption"},st={key:1,class:"font-italic"},ot={class:"mt-3 text-caption font-italic"};function at(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-btn"),p=i("v-tooltip"),k=i("v-toolbar"),b=i("v-badge"),S=i("v-card-subtitle"),V=i("v-img"),v=i("v-chip"),U=i("v-text-field"),_=i("v-card-text"),M=i("v-card-actions"),D=i("v-card"),B=i("v-dialog");return u(),x($,null,[G(t.$slots,"activator",{props:{onClick:s.openDialog}}),l(B,{modelValue:s.isDialogOpen,"onUpdate:modelValue":e[2]||(e[2]=P=>s.isDialogOpen=P),"max-width":"500"},{default:o(()=>[l(D,null,{default:o(()=>[l(k,{height:"24"},{default:o(()=>[l(r),d("span",{textContent:y(t.title)},null,8,et),l(r),l(p,{location:"top"},{activator:o(({props:P})=>[d("div",E(N(P)),[l(h,{href:t.storeLink,target:"_blank",icon:"mdi-open-in-new",size:"small",variant:"plain"},null,8,["href"])],16)]),default:o(()=>[e[3]||(e[3]=d("span",null," View at store.openc3.com ",-1))]),_:1}),l(h,{icon:"mdi-close-box",variant:"text",density:"compact",onClick:s.closeDialog},null,8,["onClick"])]),_:1}),l(S,{class:"d-flex align-center justify-content-space-between"},{default:o(()=>[d("div",null,y(t.author),1),l(r),t.verified?(u(),x("div",lt,[e[4]||(e[4]=w(" Verified ",-1)),l(b,{inline:"",icon:"mdi-shield-check",color:"success"})])):C("",!0)]),_:1}),l(_,null,{default:o(()=>[t.image_url?(u(),f(V,{key:0,src:t.image_url},null,8,["src"])):C("",!0),t.imageContentsWithMimeType?(u(),f(V,{key:1,src:t.imageContentsWithMimeType},null,8,["src"])):C("",!0),d("div",{class:"mt-3",textContent:y(t.description)},null,8,it),d("div",nt,[e[5]||(e[5]=w(" Keywords: ",-1)),t.keywords?(u(!0),x($,{key:0},L(t.keywords,P=>(u(),f(v,{key:P,variant:"flat",color:"primary",size:"x-small",class:"ml-1"},{default:o(()=>[w(y(P),1)]),_:2},1024))),128)):(u(),x("span",st," none "))]),d("div",ot,[e[6]||(e[6]=w(" Licenses: ",-1)),(u(!0),x($,null,L(t.licenses,P=>(u(),f(v,{key:P,size:"x-small",class:"ml-1"},{default:o(()=>[w(y(P),1)]),_:2},1024))),128))]),l(U,{modelValue:t.checksum,"onUpdate:modelValue":e[1]||(e[1]=P=>t.checksum=P),class:"mt-3",label:"SHA256",variant:"solo",density:"compact","hide-details":"",readonly:""},{append:o(()=>[l(p,{modelValue:n.showCopiedTooltip,"onUpdate:modelValue":e[0]||(e[0]=P=>n.showCopiedTooltip=P),location:"top","open-on-hover":!1},{activator:o(({props:P})=>[l(h,O(P,{icon:"mdi-content-copy",variant:"text",density:"compact",onClick:s.copyChecksum}),null,16,["onClick"])]),default:o(()=>[e[7]||(e[7]=d("span",null,"Copied!",-1))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),l(M,{class:"justify-start px-6"},{default:o(()=>[t.isPluginInstalled?(u(),f(h,{key:0,text:"Uninstall","append-icon":"mdi-puzzle-remove",variant:"outlined",color:"red",onClick:s.uninstall},null,8,["onClick"])):(u(),f(h,{key:1,text:"Install","append-icon":"mdi-puzzle-plus",variant:"elevated",onClick:s.install},null,8,["onClick"])),t.repository?(u(),f(h,{key:2,text:"Repository","append-icon":"mdi-open-in-new",variant:"outlined",href:t.repository,target:"_blank"},null,8,["href"])):C("",!0),t.homepage?(u(),f(h,{key:3,text:"Homepage","append-icon":"mdi-open-in-new",variant:"outlined",href:t.homepage,target:"_blank"},null,8,["href"])):C("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}const Y=I(tt,[["render",at]]),rt={components:{PluginDetailsDialog:Y},mixins:[R],emits:["triggerInstall"],methods:{install:function(){this.$emit("triggerInstall",this.plugin)}}},ut=["textContent"];function dt(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-badge"),p=i("v-card-title"),k=i("v-card-subtitle"),b=i("v-img"),S=i("v-card-text"),V=i("v-btn"),v=i("v-card-actions"),U=i("v-card"),_=i("plugin-details-dialog");return u(),f(_,O(t.plugin,{onTriggerInstall:s.install}),{activator:o(({props:M})=>[l(U,O(M,{height:"350",class:"d-flex flex-column"}),{default:o(()=>[l(p,{class:"d-flex align-center justify-content-space-between"},{default:o(()=>[w(y(t.title)+" ",1),l(r),t.verified?(u(),f(h,{key:0,inline:"",icon:"mdi-shield-check",color:"success"})):C("",!0)]),_:1}),l(k,{class:"d-flex align-center justify-content-space-between"},{default:o(()=>[d("div",null,y(t.author),1)]),_:1}),l(S,null,{default:o(()=>[t.image_url?(u(),f(b,{key:0,src:t.image_url,"max-height":"160"},null,8,["src"])):C("",!0),d("div",{class:j({"truncate-description":!0,"truncate-2":!!t.image_url,"truncate-10":!t.image_url}),textContent:y(t.description)},null,10,ut)]),_:1}),l(r),l(v,{class:"flex-wrap"},{default:o(()=>[l(V,{text:"Install","append-icon":"mdi-puzzle-plus",variant:"elevated",onClick:z(s.install,["stop"])},null,8,["onClick"])]),_:1})]),_:1},16)]),_:1},16,["onTriggerInstall"])}const ct=I(rt,[["render",dt],["__scopeId","data-v-83d9d7a7"]]),Q="store_url",X="DEFAULT",pt={mixins:[K],props:{modelValue:Boolean},emits:["update:modelValue","update:storeUrl"],data(){return{showDialog:!1,storeUrl:"",rules:{required:t=>!!t||"Required",url:t=>{try{new URL(t)}catch{return"Not a valid URL"}return!0}}}},watch:{modelValue:function(t){t&&(this.showDialog=t)},showDialog:function(t){t||this.$emit("update:modelValue",t)}},created:function(){this.loadSetting(Q,{scope:X})},methods:{save(){this.saveSetting(Q,this.storeUrl,{scope:X}),this.$emit("update:storeUrl",this.storeUrl),this.showDialog=!1},parseSetting:function(t){t?this.storeUrl=t:this.storeUrl="https://store.openc3.com"}}};function gt(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-toolbar"),p=i("v-alert"),k=i("v-text-field"),b=i("v-card-text"),S=i("v-btn"),V=i("v-card-actions"),v=i("v-card"),U=i("v-dialog");return u(),f(U,{modelValue:n.showDialog,"onUpdate:modelValue":e[4]||(e[4]=_=>n.showDialog=_),width:"600"},{default:o(()=>[l(h,{height:"24"},{default:o(()=>[l(r),e[5]||(e[5]=d("span",null,"Plugin Store Settings",-1)),l(r)]),_:1}),l(v,{class:"pa-3"},{default:o(()=>[l(p,{modelValue:t.errorLoading,"onUpdate:modelValue":e[0]||(e[0]=_=>t.errorLoading=_),type:"error",closable:"",density:"compact"},{default:o(()=>[w(" Error loading previous configuration due to "+y(t.errorText),1)]),_:1},8,["modelValue"]),l(p,{modelValue:t.errorSaving,"onUpdate:modelValue":e[1]||(e[1]=_=>t.errorSaving=_),type:"error",closable:"",density:"compact"},{default:o(()=>[w(" Error saving due to "+y(t.errorText),1)]),_:1},8,["modelValue"]),l(p,{modelValue:t.successSaving,"onUpdate:modelValue":e[2]||(e[2]=_=>t.successSaving=_),type:"success",closable:"",density:"compact"},{default:o(()=>[...e[6]||(e[6]=[w(" Saved! ",-1)])]),_:1},8,["modelValue"]),l(b,null,{default:o(()=>[l(k,{modelValue:n.storeUrl,"onUpdate:modelValue":e[3]||(e[3]=_=>n.storeUrl=_),label:"Store URL",rules:[n.rules.required,n.rules.url]},null,8,["modelValue","rules"])]),_:1}),l(V,null,{default:o(()=>[l(S,{color:"success",variant:"text",text:"Save","data-test":"save-store-settings-btn",onClick:s.save},null,8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ht=I(pt,[["render",gt]]),mt={components:{PluginCard:ct,PluginStoreSettingsDialog:ht},emits:["close","triggerInstall"],data(){return{api:new A,search:"",verifiedOnly:!1,showSettingsDialog:!1,plugins:[]}},computed:{filteredPlugins:function(){let t=this.plugins;return this.verifiedOnly&&(t=t.filter(e=>e.verified)),this.search.length&&(t=t.filter(e=>e.title.toLowerCase().includes(this.search.toLowerCase()))),t}},mounted:function(){this.fetchPluginStoreData()},methods:{fetchPluginStoreData:function(){T.get("/openc3-api/pluginstore").then(t=>{this.plugins=t.data})},close:function(){this.$emit("close")},install:function(t){this.$emit("triggerInstall",t),this.close()},openSettings:function(){this.showSettingsDialog=!0},updatePluginStore:function(){this.api.update_plugin_store().then(t=>{this.fetchPluginStoreData()})}}},ft={class:"d-flex justify-content-space-between"},vt={class:"d-inline-flex align-center w-100"};function wt(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-btn"),p=i("v-tooltip"),k=i("v-text-field"),b=i("v-switch"),S=i("plugin-card"),V=i("v-col"),v=i("v-row"),U=i("v-container"),_=i("v-sheet"),M=i("plugin-store-settings-dialog");return u(),x($,null,[l(_,{class:"pb-11 pt-8 px-8",height:"100%"},{default:o(()=>[d("div",ft,[e[4]||(e[4]=d("div",null,[d("div",{class:"text-h3 mb-3"},"OpenC3 Plugin Store"),d("div",{class:"text-subtitle-1"}," Browse plugins made by OpenC3 and the COSMOS community ")],-1)),l(r),l(h,{icon:"mdi-cog",variant:"text",onClick:s.openSettings},null,8,["onClick"]),l(p,{location:"top"},{activator:o(({props:D})=>[d("div",E(N(D)),[l(h,{href:"https://store.openc3.com",target:"_blank",icon:"mdi-open-in-new",variant:"text",class:"mx-2"})],16)]),default:o(()=>[e[3]||(e[3]=d("span",null," Open store.openc3.com ",-1))]),_:1}),l(h,{icon:"mdi-close",variant:"text",onClick:s.close},null,8,["onClick"])]),d("div",vt,[l(k,{modelValue:n.search,"onUpdate:modelValue":e[0]||(e[0]=D=>n.search=D),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"search-plugin-store"},null,8,["modelValue"]),l(b,{modelValue:n.verifiedOnly,"onUpdate:modelValue":e[1]||(e[1]=D=>n.verifiedOnly=D),label:"Verified only",density:"compact","hide-details":"",class:"ml-4"},null,8,["modelValue"])]),l(r),e[5]||(e[5]=d("span",{class:""}," Click on a plugin to see more information about it ",-1)),l(U,null,{default:o(()=>[l(v,null,{default:o(()=>[(u(!0),x($,null,L(s.filteredPlugins,D=>(u(),f(V,{key:D.id,cols:"4"},{default:o(()=>[l(S,O({ref_for:!0},D,{onTriggerInstall:s.install}),null,16,["onTriggerInstall"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),l(M,{modelValue:n.showSettingsDialog,"onUpdate:modelValue":e[2]||(e[2]=D=>n.showSettingsDialog=D),"onUpdate:storeUrl":s.updatePluginStore},null,8,["modelValue","onUpdate:storeUrl"])],64)}const xt=I(mt,[["render",wt]]),_t={components:{PluginDetailsDialog:Y},mixins:[R],props:{targets:{type:Array,default:()=>[]},isModified:Boolean},emits:["edit","delete","upgrade"],data(){return{showCard:!1}},computed:{displayTitle:function(){return this.title?this.title:this.name.replace(/^openc3-cosmos-/,"").replace(/-?\d+\.\d+\.\d+(?:\.pre\.beta\d+\.\d+)?\.gem(?:__\d+)?$/,"")}},methods:{openDetails:function(){this.hasDetails&&(this.showCard=!0)},downloadPlugin:function(){T.post(`/openc3-api/packages/${this.name}/download`).then(t=>{const e=window.atob(t.data.contents),a=new Uint8Array(e.length);for(let s=0;s<e.length;++s)a[s]=e.charCodeAt(s);const g=new Blob([a],{type:"application/zip"}),n=document.createElement("a");n.href=URL.createObjectURL(g),n.setAttribute("download",t.data.filename),n.click()})},downloadTarget:function(t){T.post(`/openc3-api/targets/${t}/download`).then(e=>{const a=window.atob(e.data.contents),g=new Uint8Array(a.length);for(let r=0;r<a.length;++r)g[r]=a.charCodeAt(r);const n=new Blob([g],{type:"application/zip"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.setAttribute("download",e.data.filename),s.click()})},edit:function(){this.$emit("edit")},upgrade:function(){this.$emit("upgrade")},deletePrompt:function(){this.showCard=!1,this.$emit("delete")}}},yt=["textContent"],Pt={class:"text-subtitle-2 v-list-item-subtitle pl-0"},Ct={key:0},kt=["onClick","textContent"],bt=["textContent"];function Dt(t,e,a,g,n,s){var r;const h=i("v-img"),p=i("v-icon"),k=i("v-list-item"),b=i("v-list"),S=i("v-menu"),V=i("plugin-details-dialog");return u(),x($,null,[d("tr",{class:j({"cursor-pointer":t.hasDetails}),"data-test":"plugin-list-item"},[d("td",null,[t.imageContentsWithMimeType?(u(),f(h,{key:0,src:t.imageContentsWithMimeType,"max-height":"56","min-width":"56"},null,8,["src"])):C("",!0)]),d("td",null,[d("div",{class:"text-h6",textContent:y(s.displayTitle),onClick:e[0]||(e[0]=(...v)=>s.openDetails&&s.openDetails(...v))},null,8,yt),d("div",Pt,[a.isModified?(u(),x($,{key:0},[w(" * ")],64)):C("",!0),w(" "+y(t.name),1)]),(r=a.targets)!=null&&r.length?(u(),x("div",Ct,[(u(!0),x($,null,L(a.targets,(v,U)=>(u(),x("span",{key:U,class:"mr-2"},[v.modified?(u(),x("a",{key:0,style:{cursor:"pointer"},onClick:z(_=>s.downloadTarget(v.name),["prevent"]),textContent:y(v.name)},null,8,kt)):(u(),x("span",{key:1,textContent:y(v.name)},null,8,bt))]))),128))])):C("",!0)]),d("td",null,[l(S,null,{activator:o(({props:v})=>[l(p,O(v,{icon:"mdi-dots-horizontal","data-test":"plugin-actions"}),null,16)]),default:o(()=>[l(b,null,{default:o(()=>[l(k,{title:"Download","prepend-icon":"mdi-download","data-test":"download-plugin",onClick:s.downloadPlugin},null,8,["onClick"]),l(k,{title:"Edit Details","prepend-icon":"mdi-pencil","data-test":"edit-plugin",onClick:s.edit},null,8,["onClick"]),l(k,{title:"Upgrade","prepend-icon":"mdi-update","data-test":"upgrade-plugin",onClick:s.upgrade},null,8,["onClick"]),l(k,{title:"Delete","prepend-icon":"mdi-delete","data-test":"delete-plugin",onClick:s.deletePrompt},null,8,["onClick"])]),_:1})]),_:1})])],2),l(V,O({modelValue:n.showCard,"onUpdate:modelValue":e[1]||(e[1]=v=>n.showCard=v)},t.plugin,{onTriggerUninstall:s.deletePrompt}),null,16,["modelValue","onTriggerUninstall"])],64)}const Tt=I(_t,[["render",Dt]]),St={components:{PluginListItem:Tt},props:{plugins:{type:Array,required:!0},targets:{type:Object,required:!0},showDefaultTools:{type:Boolean,default:!1},defaultPlugins:{type:Array,required:!0}},emits:["edit","delete","upgrade"],data(){return{showPluginDetails:!1,detailPlugin:null}},computed:{shownPlugins(){const t=[],e=[];return this.plugins.forEach(a=>{const g=a.name.split("__")[0].split("-").slice(0,-1).join("-");this.defaultPlugins.includes(g)?e.push(a):t.push(a)}),t.sort((a,g)=>a.name<g.name?-1:a.name>g.name?1:0),this.showDefaultTools?(e.sort((a,g)=>a.name<g.name?-1:a.name>g.name?1:0),t.concat(e)):t}},methods:{showDetails:function(t){this.detailPlugin=t,this.showPluginDetails=!0},pluginTargets:function(t){let e=[];for(const a in this.targets)this.targets[a].plugin===t&&e.push(this.targets[a]);return e},isModified:function(t){return Object.entries(this.targets).some(([e,a])=>a.plugin===t&&a.modified===!0)},editPlugin:function(t){this.$emit("edit",t)},upgradePlugin(t){this.$emit("upgrade",t)},deletePrompt:function(t){this.$emit("delete",t)}}};function Vt(t,e,a,g,n,s){const r=i("plugin-list-item"),h=i("v-data-table");return u(),f(h,{headers:[],items:s.shownPlugins,density:"compact",class:"list","data-test":"plugin-list"},{item:o(({item:p})=>[l(r,O(p,{targets:s.pluginTargets(p.name),"is-modified":s.isModified(p.name),onEdit:()=>s.editPlugin(p.name),onUpgrade:()=>s.upgradePlugin(p.name),onDelete:()=>s.deletePrompt(p.name)}),null,16,["targets","is-modified","onEdit","onUpgrade","onDelete"])]),_:1},8,["items"])}const Ut=I(St,[["render",Vt],["__scopeId","data-v-94f3dd91"]]),$t={components:{PluginDialog:q,PluginList:Ut,PluginStore:xt,ModifiedPluginDialog:F,SimpleTextDialog:J},data(){return{pluginName:null,variables:{},storeId:null,pluginTxt:"",file:null,currentPlugin:null,pluginHashTmp:null,existingPluginTxt:null,progress:0,pluginDelete:!1,api:new A,plugins:[],targets:{},processes:{},alert:"",alertType:"success",showAlert:!1,showDownloadDialog:!1,showProcessOutput:!1,processOutput:"",showPluginStore:!1,showPluginDialog:!1,showModifiedPluginDialog:!1,showDefaultTools:!1,defaultPlugins:["openc3-cosmos-tool-admin","openc3-cosmos-tool-bucketexplorer","openc3-cosmos-tool-cmdsender","openc3-cosmos-tool-cmdqueue","openc3-cosmos-tool-cmdhistory","openc3-cosmos-tool-cmdtlmserver","openc3-cosmos-tool-dataextractor","openc3-cosmos-tool-dataviewer","openc3-cosmos-tool-docs","openc3-cosmos-tool-handbooks","openc3-cosmos-tool-iframe","openc3-cosmos-tool-limitsmonitor","openc3-cosmos-tool-packetviewer","openc3-cosmos-tool-scriptrunner","openc3-cosmos-tool-tablemanager","openc3-cosmos-tool-tlmgrapher","openc3-cosmos-tool-tlmviewer","openc3-cosmos-enterprise-tool-admin","openc3-cosmos-tool-autonomic","openc3-cosmos-tool-calendar","openc3-cosmos-tool-grafana","openc3-cosmos-tool-systemhealth","openc3-cosmos-tool-logexplorer","openc3-enterprise-tool-base","openc3-tool-base"]}},watch:{showPluginDialog:function(t,e){t===!1&&(this.file=null,this.$refs.fileInput.value=null)}},created(){this.api.update_plugin_store()},mounted(){this.update(),this.updateProcesses();const t=this;window.onpopstate=function(){t.showPluginStore&&(t.showPluginStore=!1,history.go(1))}},methods:{resetControlState:function(){this.pluginName=null,this.variables={},this.storeId=null,this.pluginTxt="",this.file=null,this.currentPlugin=null,this.pluginHashTmp=null,this.existingPluginTxt=null,this.progress=0,this.pluginDelete=!1},pluginTargets:function(t){let e=[];for(const a in this.targets)this.targets[a].plugin===t&&e.push(this.targets[a]);return e},isModified:function(t){return Object.entries(this.targets).some(([e,a])=>a.plugin===t&&a.modified===!0)},showOutput:function(t){this.processOutput=t.output,this.showProcessOutput=!0},update:function(){T.get("/openc3-api/plugins/all").then(t=>{this.plugins=Object.entries(t.data).map(([e,a])=>a)}),T.get("/openc3-api/targets_modified").then(t=>{this.targets=t.data})},updateProcesses:function(){T.get("openc3-api/process_status/plugin_?substr=true").then(t=>{this.processes=t.data,Object.keys(this.processes).length>0&&setTimeout(()=>{this.updateProcesses(),this.update()},5e3)})},formatDate(t){return H(W(parseInt(t)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},upload:function(t=null,e=null){const a=t?"put":"post",g=t?`/openc3-api/plugins/${t}`:"/openc3-api/plugins",n=new FormData;e===null?n.append("plugin",this.file,this.file.name):n.append("store_id",e.id);let s=this;T[a](g,{data:n,headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(r){let h=Math.round(r.loaded*100/r.total);s.progress=h}}).then(r=>{this.progress=100,this.alert="Uploaded file",this.alertType="success",this.showAlert=!0,setTimeout(()=>{this.showAlert=!1},5e3),this.update();let h=null;r.data.existing_plugin_txt_lines!==void 0&&(h=r.data.existing_plugin_txt_lines.join(`
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue","single-spa","./SimpleTextDialog-8vDPDt6X-ede3bff1ed6b721bd4f9.js","./settings-DlX9yvJJ-45982315ea11dbdebbb1.js","vue-router","vuex","vuetify"],function(Z,Ft){"use strict";var I,F,q,T,H,W,A,i,x,u,l,f,C,o,d,w,$,L,y,j,O,E,N,z,J,X,G;return{setters:[c=>{I=c.d,F=c.U,q=c.Y,T=c.F,H=c.p,W=c.l,A=c.B},c=>{i=c.resolveComponent,x=c.createElementBlock,u=c.openBlock,l=c.createVNode,f=c.createBlock,C=c.createCommentVNode,o=c.withCtx,d=c.createElementVNode,w=c.createTextVNode,$=c.Fragment,L=c.renderList,y=c.toDisplayString,j=c.normalizeClass,O=c.mergeProps,E=c.normalizeProps,N=c.guardReactiveProps,z=c.withModifiers,J=c.renderSlot},null,c=>{X=c.E},c=>{G=c.n},null,null,null],execute:function(){const c="store_url",B={props:{id:Number,name:String,title:String,author:String,description:String,keywords:Array,img_path:String,image_url:String,licenses:Array,verified:Boolean,homepage:String,repository:String,gem_url:String,checksum:String},data:function(){return{_api:new A,_storeUrl:"",imageContents:null}},computed:{plugin:function(){return{id:this.id,name:this.name,title:this.title,author:this.author,description:this.description,keywords:this.keywords,img_path:this.img_path,image_url:this.image_url,licenses:this.licenses,verified:this.verified,homepage:this.homepage,repository:this.repository,gem_url:this.gem_url,checksum:this.checksum}},imageContentsWithMimeType:function(){if(this.imageContents){const t={"image/bmp":[66,77],"image/jpeg":[255,216,255],"image/png":[137,80,78,71],"image/gif":[71,73,70,56],"image/webp":[82,73,70,70]},e=new TextEncoder().encode(globalThis.atob(this.imageContents.slice(0,6))).slice(1),a=Object.entries(t).find(([g,n])=>n.every((s,r)=>s===e[r]));if(a){const[g]=a;return`data:${g};base64,${this.imageContents}`}}},storeLink:function(){return this.hasStoreListing?new URL(`/cosmos_plugins/${this.id}`,this._storeUrl):null},hasStoreListing:function(){return!!this.id},hasDetails:function(){return this.hasStoreListing?!0:!!this.title&&!!this.description},isPluginInstalled:function(){return!!this.name}},created:async function(){const t="https://store.openc3.com";try{this._storeUrl=await this._api.get_setting(c)||t}catch{this._storeUrl=t}if(this.img_path)try{const e=new URLSearchParams({volume:"OPENC3_GEMS_VOLUME",scope:globalThis.openc3Scope}),{data:a}=await T.get(`/openc3-api/storage/download_file/${encodeURIComponent(this.img_path)}?${e}`);this.imageContents=a.contents}catch{}}},tt={mixins:[B],props:{modelValue:Boolean},emits:["triggerInstall","triggerUninstall","update:modelValue"],data(){return{showDialog:!1,showCopiedTooltip:!1}},computed:{isDialogOpen:{get:function(){return this.modelValue||this.showDialog},set:function(t){this.showDialog=t,this.$emit("update:modelValue",t)}}},methods:{openDialog:function(){this.isDialogOpen=!0},closeDialog:function(){this.isDialogOpen=!1},install:function(){this.$emit("triggerInstall",this.gemUrl)},uninstall:function(){this.$emit("triggerUninstall",this.gemUrl)},copyChecksum:function(){navigator.clipboard.writeText(this.checksum),this.showCopiedTooltip=!0,setTimeout(()=>{this.showCopiedTooltip=!1},1e3)}}},et=["textContent"],lt={key:0},it=["textContent"],nt={class:"mt-3 text-caption"},st={key:1,class:"font-italic"},ot={class:"mt-3 text-caption font-italic"};function at(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-btn"),p=i("v-tooltip"),k=i("v-toolbar"),b=i("v-badge"),S=i("v-card-subtitle"),V=i("v-img"),v=i("v-chip"),U=i("v-text-field"),_=i("v-card-text"),M=i("v-card-actions"),D=i("v-card"),R=i("v-dialog");return u(),x($,null,[J(t.$slots,"activator",{props:{onClick:s.openDialog}}),l(R,{modelValue:s.isDialogOpen,"onUpdate:modelValue":e[2]||(e[2]=P=>s.isDialogOpen=P),"max-width":"500"},{default:o(()=>[l(D,null,{default:o(()=>[l(k,{height:"24"},{default:o(()=>[l(r),d("span",{textContent:y(t.title)},null,8,et),l(r),l(p,{location:"top"},{activator:o(({props:P})=>[d("div",E(N(P)),[l(h,{href:t.storeLink,target:"_blank",icon:"mdi-open-in-new",size:"small",variant:"plain"},null,8,["href"])],16)]),default:o(()=>[e[3]||(e[3]=d("span",null," View at store.openc3.com ",-1))]),_:1}),l(h,{icon:"mdi-close-box",variant:"text",density:"compact",onClick:s.closeDialog},null,8,["onClick"])]),_:1}),l(S,{class:"d-flex align-center justify-content-space-between"},{default:o(()=>[d("div",null,y(t.author),1),l(r),t.verified?(u(),x("div",lt,[e[4]||(e[4]=w(" Verified ",-1)),l(b,{inline:"",icon:"mdi-shield-check",color:"success"})])):C("",!0)]),_:1}),l(_,null,{default:o(()=>[t.image_url?(u(),f(V,{key:0,src:t.image_url},null,8,["src"])):C("",!0),t.imageContentsWithMimeType?(u(),f(V,{key:1,src:t.imageContentsWithMimeType},null,8,["src"])):C("",!0),d("div",{class:"mt-3",textContent:y(t.description)},null,8,it),d("div",nt,[e[5]||(e[5]=w(" Keywords: ",-1)),t.keywords?(u(!0),x($,{key:0},L(t.keywords,P=>(u(),f(v,{key:P,variant:"flat",color:"primary",size:"x-small",class:"ml-1"},{default:o(()=>[w(y(P),1)]),_:2},1024))),128)):(u(),x("span",st," none "))]),d("div",ot,[e[6]||(e[6]=w(" Licenses: ",-1)),(u(!0),x($,null,L(t.licenses,P=>(u(),f(v,{key:P,size:"x-small",class:"ml-1"},{default:o(()=>[w(y(P),1)]),_:2},1024))),128))]),l(U,{modelValue:t.checksum,"onUpdate:modelValue":e[1]||(e[1]=P=>t.checksum=P),class:"mt-3",label:"SHA256",variant:"solo",density:"compact","hide-details":"",readonly:""},{append:o(()=>[l(p,{modelValue:n.showCopiedTooltip,"onUpdate:modelValue":e[0]||(e[0]=P=>n.showCopiedTooltip=P),location:"top","open-on-hover":!1},{activator:o(({props:P})=>[l(h,O(P,{icon:"mdi-content-copy",variant:"text",density:"compact",onClick:s.copyChecksum}),null,16,["onClick"])]),default:o(()=>[e[7]||(e[7]=d("span",null,"Copied!",-1))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),l(M,{class:"justify-start px-6"},{default:o(()=>[t.isPluginInstalled?(u(),f(h,{key:0,text:"Uninstall","append-icon":"mdi-puzzle-remove",variant:"outlined",color:"red",onClick:s.uninstall},null,8,["onClick"])):(u(),f(h,{key:1,text:"Install","append-icon":"mdi-puzzle-plus",variant:"elevated",onClick:s.install},null,8,["onClick"])),t.repository?(u(),f(h,{key:2,text:"Repository","append-icon":"mdi-open-in-new",variant:"outlined",href:t.repository,target:"_blank"},null,8,["href"])):C("",!0),t.homepage?(u(),f(h,{key:3,text:"Homepage","append-icon":"mdi-open-in-new",variant:"outlined",href:t.homepage,target:"_blank"},null,8,["href"])):C("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}const K=I(tt,[["render",at]]),rt={components:{PluginDetailsDialog:K},mixins:[B],emits:["triggerInstall"],methods:{install:function(){this.$emit("triggerInstall",this.plugin)}}},ut=["textContent"];function dt(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-badge"),p=i("v-card-title"),k=i("v-card-subtitle"),b=i("v-img"),S=i("v-card-text"),V=i("v-btn"),v=i("v-card-actions"),U=i("v-card"),_=i("plugin-details-dialog");return u(),f(_,O(t.plugin,{onTriggerInstall:s.install}),{activator:o(({props:M})=>[l(U,O(M,{height:"350",class:"d-flex flex-column"}),{default:o(()=>[l(p,{class:"d-flex align-center justify-content-space-between"},{default:o(()=>[w(y(t.title)+" ",1),l(r),t.verified?(u(),f(h,{key:0,inline:"",icon:"mdi-shield-check",color:"success"})):C("",!0)]),_:1}),l(k,{class:"d-flex align-center justify-content-space-between"},{default:o(()=>[d("div",null,y(t.author),1)]),_:1}),l(S,null,{default:o(()=>[t.image_url?(u(),f(b,{key:0,src:t.image_url,"max-height":"160"},null,8,["src"])):C("",!0),d("div",{class:j({"truncate-description":!0,"truncate-2":!!t.image_url,"truncate-10":!t.image_url}),textContent:y(t.description)},null,10,ut)]),_:1}),l(r),l(v,{class:"flex-wrap"},{default:o(()=>[l(V,{text:"Install","append-icon":"mdi-puzzle-plus",variant:"elevated",onClick:z(s.install,["stop"])},null,8,["onClick"])]),_:1})]),_:1},16)]),_:1},16,["onTriggerInstall"])}const ct=I(rt,[["render",dt],["__scopeId","data-v-83d9d7a7"]]),Y="store_url",Q="DEFAULT",pt={mixins:[G],props:{modelValue:Boolean},emits:["update:modelValue","update:storeUrl"],data(){return{showDialog:!1,storeUrl:"",rules:{required:t=>!!t||"Required",url:t=>{try{new URL(t)}catch{return"Not a valid URL"}return!0}}}},watch:{modelValue:function(t){t&&(this.showDialog=t)},showDialog:function(t){t||this.$emit("update:modelValue",t)}},created:function(){this.loadSetting(Y,{scope:Q})},methods:{save(){this.saveSetting(Y,this.storeUrl,{scope:Q}),this.$emit("update:storeUrl",this.storeUrl),this.showDialog=!1},parseSetting:function(t){t?this.storeUrl=t:this.storeUrl="https://store.openc3.com"}}};function gt(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-toolbar"),p=i("v-alert"),k=i("v-text-field"),b=i("v-card-text"),S=i("v-btn"),V=i("v-card-actions"),v=i("v-card"),U=i("v-dialog");return u(),f(U,{modelValue:n.showDialog,"onUpdate:modelValue":e[4]||(e[4]=_=>n.showDialog=_),width:"600"},{default:o(()=>[l(h,{height:"24"},{default:o(()=>[l(r),e[5]||(e[5]=d("span",null,"Plugin Store Settings",-1)),l(r)]),_:1}),l(v,{class:"pa-3"},{default:o(()=>[l(p,{modelValue:t.errorLoading,"onUpdate:modelValue":e[0]||(e[0]=_=>t.errorLoading=_),type:"error",closable:"",density:"compact"},{default:o(()=>[w(" Error loading previous configuration due to "+y(t.errorText),1)]),_:1},8,["modelValue"]),l(p,{modelValue:t.errorSaving,"onUpdate:modelValue":e[1]||(e[1]=_=>t.errorSaving=_),type:"error",closable:"",density:"compact"},{default:o(()=>[w(" Error saving due to "+y(t.errorText),1)]),_:1},8,["modelValue"]),l(p,{modelValue:t.successSaving,"onUpdate:modelValue":e[2]||(e[2]=_=>t.successSaving=_),type:"success",closable:"",density:"compact"},{default:o(()=>[...e[6]||(e[6]=[w(" Saved! ",-1)])]),_:1},8,["modelValue"]),l(b,null,{default:o(()=>[l(k,{modelValue:n.storeUrl,"onUpdate:modelValue":e[3]||(e[3]=_=>n.storeUrl=_),label:"Store URL",rules:[n.rules.required,n.rules.url]},null,8,["modelValue","rules"])]),_:1}),l(V,null,{default:o(()=>[l(S,{color:"success",variant:"text",text:"Save","data-test":"save-store-settings-btn",onClick:s.save},null,8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ht=I(pt,[["render",gt]]),mt={components:{PluginCard:ct,PluginStoreSettingsDialog:ht},emits:["close","triggerInstall"],data(){return{api:new A,search:"",verifiedOnly:!1,showSettingsDialog:!1,plugins:[]}},computed:{filteredPlugins:function(){let t=this.plugins;return this.verifiedOnly&&(t=t.filter(e=>e.verified)),this.search.length&&(t=t.filter(e=>e.title.toLowerCase().includes(this.search.toLowerCase()))),t}},mounted:function(){this.fetchPluginStoreData()},methods:{fetchPluginStoreData:function(){T.get("/openc3-api/pluginstore").then(t=>{this.plugins=t.data})},close:function(){this.$emit("close")},install:function(t){this.$emit("triggerInstall",t),this.close()},openSettings:function(){this.showSettingsDialog=!0},updatePluginStore:function(){this.api.update_plugin_store().then(t=>{this.fetchPluginStoreData()})}}},ft={class:"d-flex justify-content-space-between"},vt={class:"d-inline-flex align-center w-100"};function wt(t,e,a,g,n,s){const r=i("v-spacer"),h=i("v-btn"),p=i("v-tooltip"),k=i("v-text-field"),b=i("v-switch"),S=i("plugin-card"),V=i("v-col"),v=i("v-row"),U=i("v-container"),_=i("v-sheet"),M=i("plugin-store-settings-dialog");return u(),x($,null,[l(_,{class:"pb-11 pt-8 px-8",height:"100%"},{default:o(()=>[d("div",ft,[e[4]||(e[4]=d("div",null,[d("div",{class:"text-h3 mb-3"},"OpenC3 Plugin Store"),d("div",{class:"text-subtitle-1"}," Browse plugins made by OpenC3 and the COSMOS community ")],-1)),l(r),l(h,{icon:"mdi-cog",variant:"text",onClick:s.openSettings},null,8,["onClick"]),l(p,{location:"top"},{activator:o(({props:D})=>[d("div",E(N(D)),[l(h,{href:"https://store.openc3.com",target:"_blank",icon:"mdi-open-in-new",variant:"text",class:"mx-2"})],16)]),default:o(()=>[e[3]||(e[3]=d("span",null," Open store.openc3.com ",-1))]),_:1}),l(h,{icon:"mdi-close",variant:"text",onClick:s.close},null,8,["onClick"])]),d("div",vt,[l(k,{modelValue:n.search,"onUpdate:modelValue":e[0]||(e[0]=D=>n.search=D),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"search-plugin-store"},null,8,["modelValue"]),l(b,{modelValue:n.verifiedOnly,"onUpdate:modelValue":e[1]||(e[1]=D=>n.verifiedOnly=D),label:"Verified only",density:"compact","hide-details":"",class:"ml-4"},null,8,["modelValue"])]),l(r),e[5]||(e[5]=d("span",{class:""}," Click on a plugin to see more information about it ",-1)),l(U,null,{default:o(()=>[l(v,null,{default:o(()=>[(u(!0),x($,null,L(s.filteredPlugins,D=>(u(),f(V,{key:D.id,cols:"4"},{default:o(()=>[l(S,O({ref_for:!0},D,{onTriggerInstall:s.install}),null,16,["onTriggerInstall"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),l(M,{modelValue:n.showSettingsDialog,"onUpdate:modelValue":e[2]||(e[2]=D=>n.showSettingsDialog=D),"onUpdate:storeUrl":s.updatePluginStore},null,8,["modelValue","onUpdate:storeUrl"])],64)}const xt=I(mt,[["render",wt]]),_t={components:{PluginDetailsDialog:K},mixins:[B],props:{targets:{type:Array,default:()=>[]},isModified:Boolean},emits:["edit","delete","upgrade"],data(){return{showCard:!1}},computed:{displayTitle:function(){return this.title?this.title:this.name.replace(/^openc3-cosmos-/,"").replace(/-?\d+\.\d+\.\d+(?:\.pre\.beta\d+\.\d+)?\.gem(?:__\d+)?$/,"")}},methods:{openDetails:function(){this.hasDetails&&(this.showCard=!0)},downloadPlugin:function(){T.post(`/openc3-api/packages/${this.name}/download`).then(t=>{const e=window.atob(t.data.contents),a=new Uint8Array(e.length);for(let s=0;s<e.length;++s)a[s]=e.charCodeAt(s);const g=new Blob([a],{type:"application/zip"}),n=document.createElement("a");n.href=URL.createObjectURL(g),n.setAttribute("download",t.data.filename),n.click()})},downloadTarget:function(t){T.post(`/openc3-api/targets/${t}/download`).then(e=>{const a=window.atob(e.data.contents),g=new Uint8Array(a.length);for(let r=0;r<a.length;++r)g[r]=a.charCodeAt(r);const n=new Blob([g],{type:"application/zip"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.setAttribute("download",e.data.filename),s.click()})},edit:function(){this.$emit("edit")},upgrade:function(){this.$emit("upgrade")},deletePrompt:function(){this.showCard=!1,this.$emit("delete")}}},yt=["textContent"],Pt={class:"text-subtitle-2 v-list-item-subtitle pl-0"},Ct={key:0},kt=["onClick","textContent"],bt=["textContent"];function Dt(t,e,a,g,n,s){var r;const h=i("v-img"),p=i("v-icon"),k=i("v-list-item"),b=i("v-list"),S=i("v-menu"),V=i("plugin-details-dialog");return u(),x($,null,[d("tr",{class:j({"cursor-pointer":t.hasDetails}),"data-test":"plugin-list-item"},[d("td",null,[t.imageContentsWithMimeType?(u(),f(h,{key:0,src:t.imageContentsWithMimeType,"max-height":"56","min-width":"56"},null,8,["src"])):C("",!0)]),d("td",null,[d("div",{class:"text-h6",textContent:y(s.displayTitle),onClick:e[0]||(e[0]=(...v)=>s.openDetails&&s.openDetails(...v))},null,8,yt),d("div",Pt,[a.isModified?(u(),x($,{key:0},[w(" * ")],64)):C("",!0),w(" "+y(t.name),1)]),(r=a.targets)!=null&&r.length?(u(),x("div",Ct,[(u(!0),x($,null,L(a.targets,(v,U)=>(u(),x("span",{key:U,class:"mr-2"},[v.modified?(u(),x("a",{key:0,style:{cursor:"pointer"},onClick:z(_=>s.downloadTarget(v.name),["prevent"]),textContent:y(v.name)},null,8,kt)):(u(),x("span",{key:1,textContent:y(v.name)},null,8,bt))]))),128))])):C("",!0)]),d("td",null,[l(S,null,{activator:o(({props:v})=>[l(p,O(v,{icon:"mdi-dots-horizontal","data-test":"plugin-actions"}),null,16)]),default:o(()=>[l(b,null,{default:o(()=>[l(k,{title:"Download","prepend-icon":"mdi-download","data-test":"download-plugin",onClick:s.downloadPlugin},null,8,["onClick"]),l(k,{title:"Edit Details","prepend-icon":"mdi-pencil","data-test":"edit-plugin",onClick:s.edit},null,8,["onClick"]),l(k,{title:"Upgrade","prepend-icon":"mdi-update","data-test":"upgrade-plugin",onClick:s.upgrade},null,8,["onClick"]),l(k,{title:"Delete","prepend-icon":"mdi-delete","data-test":"delete-plugin",onClick:s.deletePrompt},null,8,["onClick"])]),_:1})]),_:1})])],2),l(V,O({modelValue:n.showCard,"onUpdate:modelValue":e[1]||(e[1]=v=>n.showCard=v)},t.plugin,{onTriggerUninstall:s.deletePrompt}),null,16,["modelValue","onTriggerUninstall"])],64)}const Tt=I(_t,[["render",Dt]]),St={components:{PluginListItem:Tt},props:{plugins:{type:Array,required:!0},targets:{type:Object,required:!0},showDefaultTools:{type:Boolean,default:!1},defaultPlugins:{type:Array,required:!0}},emits:["edit","delete","upgrade"],data(){return{showPluginDetails:!1,detailPlugin:null}},computed:{shownPlugins(){const t=[],e=[];return this.plugins.forEach(a=>{const g=a.name.split("__")[0].split("-").slice(0,-1).join("-");this.defaultPlugins.includes(g)?e.push(a):t.push(a)}),t.sort((a,g)=>a.name<g.name?-1:a.name>g.name?1:0),this.showDefaultTools?(e.sort((a,g)=>a.name<g.name?-1:a.name>g.name?1:0),t.concat(e)):t}},methods:{showDetails:function(t){this.detailPlugin=t,this.showPluginDetails=!0},pluginTargets:function(t){let e=[];for(const a in this.targets)this.targets[a].plugin===t&&e.push(this.targets[a]);return e},isModified:function(t){return Object.entries(this.targets).some(([e,a])=>a.plugin===t&&a.modified===!0)},editPlugin:function(t){this.$emit("edit",t)},upgradePlugin(t){this.$emit("upgrade",t)},deletePrompt:function(t){this.$emit("delete",t)}}};function Vt(t,e,a,g,n,s){const r=i("plugin-list-item"),h=i("v-data-table");return u(),f(h,{headers:[],items:s.shownPlugins,density:"compact",class:"list","data-test":"plugin-list"},{item:o(({item:p})=>[l(r,O(p,{targets:s.pluginTargets(p.name),"is-modified":s.isModified(p.name),onEdit:()=>s.editPlugin(p.name),onUpgrade:()=>s.upgradePlugin(p.name),onDelete:()=>s.deletePrompt(p.name)}),null,16,["targets","is-modified","onEdit","onUpgrade","onDelete"])]),_:1},8,["items"])}const Ut=I(St,[["render",Vt],["__scopeId","data-v-94f3dd91"]]),$t={components:{PluginDialog:q,PluginList:Ut,PluginStore:xt,ModifiedPluginDialog:F,SimpleTextDialog:X},data(){return{pluginName:null,variables:{},storeId:null,pluginTxt:"",file:null,currentPlugin:null,pluginHashTmp:null,existingPluginTxt:null,progress:0,pluginDelete:!1,api:new A,plugins:[],targets:{},processes:{},alert:"",alertType:"success",showAlert:!1,showDownloadDialog:!1,showProcessOutput:!1,processOutput:"",showPluginStore:!1,showPluginDialog:!1,showModifiedPluginDialog:!1,showDefaultTools:!1,defaultPlugins:["openc3-cosmos-tool-admin","openc3-cosmos-tool-bucketexplorer","openc3-cosmos-tool-cmdsender","openc3-cosmos-tool-cmdqueue","openc3-cosmos-tool-cmdhistory","openc3-cosmos-tool-cmdtlmserver","openc3-cosmos-tool-dataextractor","openc3-cosmos-tool-dataviewer","openc3-cosmos-tool-docs","openc3-cosmos-tool-handbooks","openc3-cosmos-tool-iframe","openc3-cosmos-tool-limitsmonitor","openc3-cosmos-tool-packetviewer","openc3-cosmos-tool-scriptrunner","openc3-cosmos-tool-tablemanager","openc3-cosmos-tool-tlmgrapher","openc3-cosmos-tool-tlmviewer","openc3-cosmos-enterprise-tool-admin","openc3-cosmos-tool-autonomic","openc3-cosmos-tool-calendar","openc3-cosmos-tool-grafana","openc3-cosmos-tool-systemhealth","openc3-cosmos-tool-logexplorer","openc3-enterprise-tool-base","openc3-tool-base"]}},watch:{showPluginDialog:function(t,e){t===!1&&(this.file=null,this.$refs.fileInput.value=null)}},created(){this.api.update_plugin_store()},mounted(){this.update(),this.updateProcesses();const t=this;window.onpopstate=function(){t.showPluginStore&&(t.showPluginStore=!1,history.go(1))}},methods:{resetControlState:function(){this.pluginName=null,this.variables={},this.storeId=null,this.pluginTxt="",this.file=null,this.currentPlugin=null,this.pluginHashTmp=null,this.existingPluginTxt=null,this.progress=0,this.pluginDelete=!1},pluginTargets:function(t){let e=[];for(const a in this.targets)this.targets[a].plugin===t&&e.push(this.targets[a]);return e},isModified:function(t){return Object.entries(this.targets).some(([e,a])=>a.plugin===t&&a.modified===!0)},showOutput:function(t){this.processOutput=t.output,this.showProcessOutput=!0},update:function(){T.get("/openc3-api/plugins/all").then(t=>{this.plugins=Object.entries(t.data).map(([e,a])=>a)}),T.get("/openc3-api/targets_modified").then(t=>{this.targets=t.data})},updateProcesses:function(){T.get("openc3-api/process_status/plugin_?substr=true").then(t=>{this.processes=t.data,Object.keys(this.processes).length>0&&setTimeout(()=>{this.updateProcesses(),this.update()},5e3)})},formatDate(t){return H(W(parseInt(t)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},upload:function(t=null,e=null){const a=t?"put":"post",g=t?`/openc3-api/plugins/${t}`:"/openc3-api/plugins",n=new FormData;e===null?n.append("plugin",this.file,this.file.name):n.append("store_id",e.id);let s=this;T[a](g,{data:n,headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(r){let h=Math.round(r.loaded*100/r.total);s.progress=h}}).then(r=>{this.progress=100,this.alert="Uploaded file",this.alertType="success",this.showAlert=!0,setTimeout(()=>{this.showAlert=!1},5e3),this.update();let h=null;r.data.existing_plugin_txt_lines!==void 0&&(h=r.data.existing_plugin_txt_lines.join(`
|
|
2
2
|
`));let p=r.data.plugin_txt_lines.join(`
|
|
3
3
|
`);this.pluginName=r.data.name,this.variables=r.data.variables,this.storeId=r.data.store_id,this.pluginTxt=p,this.existingPluginTxt=h,this.showPluginDialog=!0,this.file=void 0}).catch(r=>{this.currentPlugin=null,this.file=void 0})},pluginCallback:function(t){this.showPluginDialog=!1,this.currentPlugin!==null&&(t.name=this.currentPlugin),this.pluginHashTmp=t,this.isModified(this.currentPlugin)?(this.pluginDelete=!1,this.showModifiedPluginDialog=!0):this.pluginInstall()},modifiedSubmit:async function(t){if(t===!0)for(let e of this.pluginTargets(this.currentPlugin))e.modified==!0&&await T.post(`/openc3-api/targets/${e.name}/delete_modified`);this.pluginDelete?this.deletePlugin(this.currentPlugin):this.pluginInstall()},pluginInstall:function(){T.post(`/openc3-api/plugins/install/${this.pluginName}`,{data:{plugin_hash:JSON.stringify(this.pluginHashTmp)}}).then(t=>{this.alert=`Started installing plugin ${this.pluginName} ...`,this.alertType="success",this.showAlert=!0,this.currentPlugin=null,this.file=void 0,this.variables={},this.pluginTxt="",this.existingPluginTxt=null,this.storeId=null,setTimeout(()=>{this.showAlert=!1,this.updateProcesses()},5e3),this.update()})},editPlugin:function(t){this.resetControlState(),T.get(`/openc3-api/plugins/${t}`).then(e=>{let a=null;e.data.existing_plugin_txt_lines!==void 0&&(a=e.data.existing_plugin_txt_lines.join(`
|
|
4
4
|
`)),this.pluginName=e.data.name,this.variables=e.data.variables,this.pluginTxt=e.data.plugin_txt_lines.join(`
|
|
5
|
-
`),this.existingPluginTxt=a,this.showPluginDialog=!0})},deletePrompt:function(t){this.resetControlState(),this.$dialog.confirm(`Are you sure you want to remove: ${t}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>{this.isModified(t)?(this.currentPlugin=t,this.pluginDelete=!0,this.showModifiedPluginDialog=!0):this.deletePlugin(t)})},deletePlugin:function(t){this.alert=`Removing plugin ${t} ...`,this.alertType="success",this.showAlert=!0,T.delete(`/openc3-api/plugins/${t}`).then(e=>{setTimeout(()=>{this.showAlert=!1,this.updateProcesses()},5e3)}),this.update()},upgradePlugin(t){this.resetControlState(),this.currentPlugin=t,this.$refs.fileInput.click()},selectFile(){this.resetControlState(),this.$refs.fileInput.click()},fileChange(t){const e=t.target.files;if(e.length>0)if(this.file=e[0],this.currentPlugin!==null)if(this.file.name.split(".gem")[0]==this.currentPlugin.split(".gem")[0])this.$dialog.confirm(`The new gem ${this.file.name} appears to be identical to the existing ${this.currentPlugin}. Install?`,{okText:"Ok",cancelText:"Cancel"}).then(()=>{this.upload(this.currentPlugin)}).catch(a=>{});else{let a=this.file.name.split("-"),g=a.findIndex(r=>r.includes(".")),n=a.slice(0,g).join("-");a=this.currentPlugin.split("-"),g=a.findIndex(r=>r.includes("."));let s=a.slice(0,g).join("-");n!==s?this.$dialog.confirm(`The new gem base name ${n} doesn't match the existing ${s}. Install?`,{okText:"Ok",cancelText:"Cancel"}).then(()=>{this.upload(this.currentPlugin)}):this.upload(this.currentPlugin)}else this.upload();else this.$refs.fileInput.value=null},openStore(){this.resetControlState(),this.showPluginStore=!0}}},Ot={class:"mt-2"},It=["textContent"],Mt=["textContent"];function Lt(t,e,a,g,n,s){const r=i("v-btn"),h=i("v-icon"),p=i("v-col"),k=i("rux-progress"),b=i("v-row"),S=i("v-divider"),V=i("v-alert"),v=i("v-list-item-title"),U=i("v-list-item-subtitle"),_=i("v-progress-circular"),M=i("v-tooltip"),D=i("v-list-item"),
|
|
5
|
+
`),this.existingPluginTxt=a,this.showPluginDialog=!0})},deletePrompt:function(t){this.resetControlState(),this.$dialog.confirm(`Are you sure you want to remove: ${t}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>{this.isModified(t)?(this.currentPlugin=t,this.pluginDelete=!0,this.showModifiedPluginDialog=!0):this.deletePlugin(t)})},deletePlugin:function(t){this.alert=`Removing plugin ${t} ...`,this.alertType="success",this.showAlert=!0,T.delete(`/openc3-api/plugins/${t}`).then(e=>{setTimeout(()=>{this.showAlert=!1,this.updateProcesses()},5e3)}),this.update()},upgradePlugin(t){this.resetControlState(),this.currentPlugin=t,this.$refs.fileInput.click()},selectFile(){this.resetControlState(),this.$refs.fileInput.click()},fileChange(t){const e=t.target.files;if(e.length>0)if(this.file=e[0],this.currentPlugin!==null)if(this.file.name.split(".gem")[0]==this.currentPlugin.split(".gem")[0])this.$dialog.confirm(`The new gem ${this.file.name} appears to be identical to the existing ${this.currentPlugin}. Install?`,{okText:"Ok",cancelText:"Cancel"}).then(()=>{this.upload(this.currentPlugin)}).catch(a=>{});else{let a=this.file.name.split("-"),g=a.findIndex(r=>r.includes(".")),n=a.slice(0,g).join("-");a=this.currentPlugin.split("-"),g=a.findIndex(r=>r.includes("."));let s=a.slice(0,g).join("-");n!==s?this.$dialog.confirm(`The new gem base name ${n} doesn't match the existing ${s}. Install?`,{okText:"Ok",cancelText:"Cancel"}).then(()=>{this.upload(this.currentPlugin)}):this.upload(this.currentPlugin)}else this.upload();else this.$refs.fileInput.value=null},openStore(){this.resetControlState(),this.showPluginStore=!0}}},Ot={class:"mt-2"},It=["textContent"],Mt=["textContent"];function Lt(t,e,a,g,n,s){const r=i("v-btn"),h=i("v-icon"),p=i("v-col"),k=i("rux-progress"),b=i("v-row"),S=i("v-divider"),V=i("v-alert"),v=i("v-list-item-title"),U=i("v-list-item-subtitle"),_=i("v-progress-circular"),M=i("v-tooltip"),D=i("v-list-item"),R=i("v-list"),P=i("v-switch"),At=i("plugin-list"),jt=i("plugin-dialog"),Et=i("modified-plugin-dialog"),Nt=i("simple-text-dialog"),zt=i("plugin-store"),Bt=i("v-bottom-sheet");return u(),x("div",null,[l(b,{"no-gutters":"",align:"center",class:"px-2"},{default:o(()=>[l(p,{class:"pa-2 mt-2"},{default:o(()=>[l(r,{"append-icon":"mdi-store",onClick:s.openStore},{default:o(()=>[...e[9]||(e[9]=[w(" Browse Plugins ",-1)])]),_:1},8,["onClick"]),l(r,{"append-icon":"mdi-paperclip",class:"mx-2",onClick:s.selectFile},{default:o(()=>[...e[10]||(e[10]=[w(" Install From File ",-1)])]),_:1},8,["onClick"]),d("input",{ref:"fileInput",accept:".gem",style:{display:"none"},type:"file",onChange:e[0]||(e[0]=(...m)=>s.fileChange&&s.fileChange(...m))},null,544),e[14]||(e[14]=d("br",null,null,-1)),d("p",Ot,[e[12]||(e[12]=w(" Note: Use ",-1)),l(h,null,{default:o(()=>[...e[11]||(e[11]=[w(" mdi-dots-horizontal ",-1)])]),_:1}),e[13]||(e[13]=w(" in the Installed Plugins list to upgrade existing plugins ",-1))])]),_:1}),l(p,{class:"ml-4 mr-2",cols:"4"},{default:o(()=>[l(k,{value:n.progress},null,8,["value"])]),_:1})]),_:1}),l(b,{"no-gutters":"",class:"px-2"},{default:o(()=>[l(p,{align:"right",class:"mr-2"},{default:o(()=>[...e[15]||(e[15]=[d("div",null,"* indicates a modified plugin",-1),d("div",null,"Click target link to download modifications",-1)])]),_:1})]),_:1}),l(S),l(V,{modelValue:n.showAlert,"onUpdate:modelValue":e[1]||(e[1]=m=>n.showAlert=m),closable:"",type:n.alertType,text:n.alert,"data-test":"plugin-alert"},null,8,["modelValue","type","text"]),Object.keys(n.processes).length>0?(u(),f(R,{key:0,class:"list","data-test":"process-list"},{default:o(()=>[l(b,{"no-gutters":"",class:"px-4"},{default:o(()=>[l(p,{class:"text-h5"},{default:o(()=>[...e[16]||(e[16]=[w(" Process List ",-1)])]),_:1}),l(p,{align:"right"},{default:o(()=>[...e[17]||(e[17]=[d("div",null,"Showing last 10 min of activity",-1)])]),_:1})]),_:1}),(u(!0),x($,null,L(n.processes,m=>(u(),x("div",{key:m.name},[l(D,null,{append:o(()=>[m.state==="Running"?(u(),f(_,{key:0,indeterminate:"",color:"primary"})):(u(),f(M,{key:1,"open-delay":600,location:"top"},{activator:o(({props:Rt})=>[l(r,O({ref_for:!0},Rt,{icon:"mdi-eye",variant:"text","aria-label":"Show Output","data-test":"show-output",onClick:Ht=>s.showOutput(m)}),null,16,["onClick"])]),default:o(()=>[e[18]||(e[18]=d("span",null," Show Output ",-1))]),_:2},1024))]),default:o(()=>[l(v,null,{default:o(()=>[d("span",{class:j(m.state.toLowerCase()),textContent:y(`Processing ${m.process_type}: ${m.detail} - ${m.state}`)},null,10,It)]),_:2},1024),l(U,null,{default:o(()=>[d("span",{textContent:y(" Updated At: "+s.formatDate(m.updated_at))},null,8,Mt)]),_:2},1024)]),_:2},1024),l(S)]))),128))]),_:1})):C("",!0),l(b,{"no-gutters":"",class:"px-4"},{default:o(()=>[l(p,{class:"text-h5"},{default:o(()=>[...e[19]||(e[19]=[w(" Installed Plugins ",-1)])]),_:1}),l(p,{class:"v-col-auto"},{default:o(()=>[l(P,{modelValue:n.showDefaultTools,"onUpdate:modelValue":e[2]||(e[2]=m=>n.showDefaultTools=m),label:"Show Default Tools",density:"compact","hide-details":"","data-test":"show-default-tools"},null,8,["modelValue"])]),_:1})]),_:1}),l(At,{plugins:n.plugins,targets:n.targets,"show-default-tools":n.showDefaultTools,"default-plugins":n.defaultPlugins,onEdit:s.editPlugin,onUpgrade:s.upgradePlugin,onDelete:s.deletePrompt},null,8,["plugins","targets","show-default-tools","default-plugins","onEdit","onUpgrade","onDelete"]),n.showPluginDialog?(u(),f(jt,{key:1,modelValue:n.showPluginDialog,"onUpdate:modelValue":e[3]||(e[3]=m=>n.showPluginDialog=m),"plugin-name":n.pluginName,variables:n.variables,"plugin-txt":n.pluginTxt,"existing-plugin-txt":n.existingPluginTxt,"store-id":n.storeId,onCallback:s.pluginCallback},null,8,["modelValue","plugin-name","variables","plugin-txt","existing-plugin-txt","store-id","onCallback"])):C("",!0),n.showModifiedPluginDialog?(u(),f(Et,{key:2,modelValue:n.showModifiedPluginDialog,"onUpdate:modelValue":e[4]||(e[4]=m=>n.showModifiedPluginDialog=m),"plugin-name":n.currentPlugin,targets:s.pluginTargets(n.currentPlugin),"plugin-delete":n.pluginDelete,onSubmit:s.modifiedSubmit},null,8,["modelValue","plugin-name","targets","plugin-delete","onSubmit"])):C("",!0),l(Nt,{modelValue:n.showProcessOutput,"onUpdate:modelValue":e[5]||(e[5]=m=>n.showProcessOutput=m),title:"Process Output",text:n.processOutput},null,8,["modelValue","text"]),l(Bt,{modelValue:n.showPluginStore,"onUpdate:modelValue":e[8]||(e[8]=m=>n.showPluginStore=m),fullscreen:""},{default:o(()=>[l(zt,{onClose:e[6]||(e[6]=()=>n.showPluginStore=!1),onTriggerInstall:e[7]||(e[7]=m=>s.upload(null,m))})]),_:1},8,["modelValue"])])}const qt=Z("default",I($t,[["render",Lt],["__scopeId","data-v-eb302876"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue","./main-db859e7477e802bb1689.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,l,r,n,i;return{setters:[e=>{s=e.o},e=>{a=e.resolveComponent,l=e.createBlock,r=e.openBlock,n=e.normalizeStyle},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[s],props:{value:{default:null}},data:function(){return{valueId:null,scaleFactor:1,width:150}},computed:{_value:function(){let t=this.value;return t===null&&(t=this.screenValues[this.valueId][0]),parseInt(parseFloat(t)*this.scaleFactor)}},created:function(){if(this.parameters[3]&&(this.scaleFactor=parseFloat(this.parameters[3])),this.width=this.setWidth(this.parameters[4],"px",this.width),this.value===null){let t="CONVERTED";this.parameters[5]&&(t=this.parameters[5]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)}},unmounted:function(){this.$emit("deleteItem",this.valueId)}};function o(t,m,v,f,I,c){const h=a("rux-progress");return r(),l(h,{value:c._value,class:"progress",style:n(t.computedStyle)},null,8,["value","style"])}const d=u("default",i(e,[["render",o],["__scopeId","data-v-85bc2857"]]))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue","./main-db859e7477e802bb1689.js","vue-router","single-spa","vuex","vuetify"],function(o,p){"use strict";var l,t,n,a,r,s;return{setters:[e=>{l=e.o},e=>{t=e.resolveComponent,n=e.createBlock,a=e.openBlock,r=e.normalizeStyle},e=>{s=e.d},null,null,null,null],execute:function(){const e={props:{value:{type:Number}},mixins:[l],data(){return{label:"Radio"}},created(){this.label=this.parameters[0]}};function u(i,y,c,b,d,f){const v=t("v-radio");return a(),n(v,{"hide-details":"",dense:"",label:d.label,style:r(i.computedStyle),value:c.value},null,8,["label","style","value"])}const m=o("default",s(e,[["render",u]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-DW5yNlp7-ace4cb6861ae152dfb76.js","vue","./main-db859e7477e802bb1689.js","./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue-router","single-spa","vuex","vuetify"],function(h,C){"use strict";var l,a,s,r,c,o,i,u,m,d,p,g;return{setters:[e=>{l=e.r},e=>{a=e.resolveComponent,s=e.createBlock,r=e.openBlock,c=e.normalizeStyle,o=e.withCtx,i=e.createElementBlock,u=e.Fragment,m=e.renderList,d=e.resolveDynamicComponent,p=e.mergeProps},e=>{g=e.d},null,null,null,null,null],execute:function(){const e={mixins:[l],data(){return{selectedIndex:0}},created(){this.parameters[0]&&(this.selectedIndex=parseInt(this.parameters[0]))},methods:{selected(){return this.selectedIndex}}};function f(n,v,B,V,y,z){const k=a("v-radio-group");return r(),s(k,{"hide-details":"",density:"compact",modelValue:y.selectedIndex,"onUpdate:modelValue":v[0]||(v[0]=t=>y.selectedIndex=t),style:c(n.computedStyle)},{default:o(()=>[(r(!0),i(u,null,m(n.widgets,(t,x)=>(r(),s(d(t.type),p({ref_for:!0},n.listeners,{value:x,key:x,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,name:t.name}),null,16,["value","target","parameters","settings","screen-values","screen-time-zone","name"]))),128))]),_:1},8,["modelValue","style"])}const I=h("default",g(e,[["render",f]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue","./main-db859e7477e802bb1689.js","vue-router","single-spa","vuex","vuetify"],function(c,u){"use strict";var r,a,n,h,i,l;return{setters:[t=>{r=t.o},t=>{a=t.createElementBlock,n=t.openBlock,h=t.normalizeStyle,i=t.createElementVNode},t=>{l=t.d},null,null,null,null],execute:function(){const t={mixins:[r],data(){return{width:160,height:22}},computed:{cssProps(){return{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition()+"%"}},min(){return parseInt(this.parameters[3])},max(){return parseInt(this.parameters[4])},range(){return this.max-this.min}},created(){const e=this.parameters[5]?this.parameters[5]:"CONVERTED";this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId),this.width=this.setWidth(this.parameters[6],"px",this.width),this.height=this.setHeight(this.parameters[7],"px",this.height)},unmounted(){this.$emit("deleteItem",this.valueId)},methods:{calcPosition(){let e=this.screenValues[this.valueId][0];if(!e)return 0;if(e.raw)return e.raw==="-Infinity"?0:100;const s=(e-this.min)/this.range*100;return s>100?100:s<0?0:s}}};function o(e,s,p,g,v,d){return n(),a("div",{class:"rangebar",style:h([d.cssProps,e.computedStyle])},[...s[0]||(s[0]=[i("div",{class:"rangebar__container"},[i("div",{class:"rangebar__line"}),i("div",{class:"rangebar__arrow"})],-1)])],4)}const m=c("default",l(t,[["render",o],["__scopeId","data-v-34d37e7c"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue","vue-router","single-spa","vuex","vuetify"],function(R,K){"use strict";var h,y,a,l,r,n,o,d,c,f,x,m;return{setters:[s=>{h=s.d,y=s.F},s=>{a=s.resolveComponent,l=s.createElementBlock,r=s.openBlock,n=s.createVNode,o=s.withCtx,d=s.createTextVNode,c=s.createElementVNode,f=s.createCommentVNode,x=s.Fragment,m=s.toDisplayString},null,null,null,null],execute:function(){const s={data(){return{redisCommandText:"",redisResponse:null,redisEndpoint:"/openc3-api/redis/exec",prettyPrint:!1,headers:[{text:"Redis",value:"redis",width:150},{text:"Command",value:"command"},{text:"Response",value:"response"}],commands:[]}},computed:{formattedResponse:function(){let t=this.redisResponse;if(this.redisResponse&&this.prettyPrint){if(typeof t=="string")try{t=JSON.parse(t)}catch{}if(Array.isArray(t)){for(let e=0;e<t.length;e++)if(typeof t[e]=="string")try{t[e]=JSON.parse(t[e])}catch{}}}return t=JSON.stringify(t,null,2),`Response: ${t}`}},methods:{commandKeydown:function(t){t.key==="Enter"&&this.executeRaw()},executeRaw:function(){this.redisResponse=null,y.post(this.redisEndpoint,{data:this.redisCommandText,headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(t=>{this.redisResponse=t.data.result;let e="Ephemeral";this.redisEndpoint==="/openc3-api/redis/exec"&&(e="Persistent"),this.commands.unshift({redis:e,command:this.redisCommandText,response:this.redisResponse})})}}},g=["textContent"],C={key:1,class:"monospace"};function V(t,e,F,J,i,u){const b=a("v-card-title"),w=a("v-card-subtitle"),E=a("v-text-field"),k=a("v-checkbox"),N=a("v-card-text"),_=a("v-btn"),v=a("v-radio"),S=a("v-radio-group"),T=a("v-card-actions"),P=a("v-data-table"),A=a("v-card");return r(),l("div",null,[n(A,null,{default:o(()=>[n(b,null,{default:o(()=>[...e[3]||(e[3]=[d(" Send Raw Redis Commands ",-1)])]),_:1}),n(w,null,{default:o(()=>[...e[4]||(e[4]=[d(" THIS IS DANGEROUS. This allows you to interact directly with the underlying Redis database, making it easy to modify or delete data. ",-1),c("br",null,null,-1),c("br",null,null,-1),d(" Enter commands like you would at the Redis cli prompt: ",-1),c("code",null,"ping",-1),d(" or ",-1),c("code",null,"hget openc3__settings version",-1)])]),_:1}),n(N,{class:"pb-0 ml-2"},{default:o(()=>[n(E,{modelValue:i.redisCommandText,"onUpdate:modelValue":e[0]||(e[0]=p=>i.redisCommandText=p),"hide-details":"",label:"Redis command",class:"monospace",onKeydown:u.commandKeydown},null,8,["modelValue","onKeydown"]),n(k,{modelValue:i.prettyPrint,"onUpdate:modelValue":e[1]||(e[1]=p=>i.prettyPrint=p),label:"Pretty print",density:"compact","hide-details":"",class:"mb-2"},null,8,["modelValue"]),i.redisResponse?(r(),l(x,{key:0},[i.prettyPrint?(r(),l("pre",{key:0,textContent:m(u.formattedResponse)},null,8,g)):(r(),l("span",C," Response: "+m(i.redisResponse),1))],64)):f("",!0)]),_:1}),n(T,{class:"px-2"},{default:o(()=>[n(_,{disabled:!i.redisCommandText.length,color:"success",variant:"text",onClick:u.executeRaw},{default:o(()=>[...e[5]||(e[5]=[d(" Execute ",-1)])]),_:1},8,["disabled","onClick"]),n(S,{modelValue:i.redisEndpoint,"onUpdate:modelValue":e[2]||(e[2]=p=>i.redisEndpoint=p),inline:"","hide-details":"",class:"mt-0"},{default:o(()=>[n(v,{label:"Persistent",value:"/openc3-api/redis/exec","data-test":"persistent-radio"}),n(v,{label:"Ephemeral",value:"/openc3-api/redis/exec?ephemeral=1","data-test":"ephemeral-radio"})]),_:1},8,["modelValue"])]),_:1}),n(P,{headers:i.headers,items:i.commands,class:"monospace","items-per-page":-1,"hide-default-footer":"",density:"compact",height:"45vh"},null,8,["headers","items"])]),_:1})])}const B=R("default",h(s,[["render",V],["__scopeId","data-v-42ef013f"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue","./main-db859e7477e802bb1689.js","vue-router","single-spa","vuex","vuetify"],function(m,p){"use strict";var i,r,c,a,o,u;return{setters:[t=>{i=t.o},t=>{r=t.resolveComponent,c=t.createBlock,a=t.openBlock,o=t.normalizeStyle},t=>{u=t.d},null,null,null,null],execute:function(){const t={mixins:[i],props:{value:{default:null}},data:function(){return{valueId:null,icon:"",label:"",subLabel:"",items:[],screenTarget:null,screenName:null}},computed:{status:function(){let e="off";for(const n of this.items){let s=this.screenValues[n][1];s&&((s.includes("BLUE")||s.includes("GREEN"))&&e!="caution"&&e!="critical"&&(e="normal"),s.includes("YELLOW")&&e!="critical"&&(e="caution"),s.includes("RED")&&(e="critical"))}return e},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.icon=this.parameters[0],this.label=this.parameters[1],this.subLabel=this.parameters[2],this.appliedSettings.forEach(e=>{switch(e[0].toUpperCase()){case"SCREEN":this.screenTarget=e[1],this.screenName=e[2];break;case"TLM":let n="CONVERTED";e[4]&&(n=e[4]);let s=`${e[1]}__${e[2]}__${e[3]}__${n}`;this.items.push(s),this.$emit("addItem",s);break}})},unmounted:function(){this.items.forEach(e=>{this.$emit("deleteItem",e)})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}};function h(e,n,s,b,E,l){const d=r("rux-monitoring-icon");return a(),c(d,{class:"rux-icon",style:o([l.pointerStyle,e.computedStyle]),icon:e.icon,status:l.status,label:e.label,sublabel:e.subLabel,onClick:l.clickHandler},null,8,["style","icon","status","label","sublabel","onClick"])}const f=m("default",u(t,[["render",h]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue","single-spa","./OutputDialog-CNH74LpJ-358057a9c313d5b4d4b7.js","vue-router","vuex","vuetify"],function(w,T){"use strict";var d,c,e,r,l,o,g,p,i,h,v,m,C,k;return{setters:[t=>{d=t.d,c=t.F},t=>{e=t.resolveComponent,r=t.createElementBlock,l=t.openBlock,o=t.createVNode,g=t.createBlock,p=t.createCommentVNode,i=t.withCtx,h=t.Fragment,v=t.renderList,m=t.createTextVNode,C=t.toDisplayString},null,t=>{k=t.E},null,null,null],execute:function(){const t={components:{OutputDialog:k},data(){return{routers:[],jsonContent:"",dialogTitle:"",showDialog:!1}},mounted(){this.update()},methods:{update(){c.get("/openc3-api/routers").then(n=>{this.routers=n.data})},add(){},showRouter(n){c.get(`/openc3-api/routers/${n}`).then(s=>{this.jsonContent=JSON.stringify(s.data,null," "),this.dialogTitle=n,this.showDialog=!0})},dialogCallback(n){this.showDialog=!1}}};function D(n,s,j,F,a,f){const V=e("v-list-item-title"),y=e("v-btn"),N=e("v-list-item"),S=e("v-divider"),b=e("v-list"),x=e("output-dialog");return l(),r("div",null,[o(b,{class:"list","data-test":"routerList"},{default:i(()=>[(l(!0),r(h,null,v(a.routers,(u,B)=>(l(),r("div",{key:B},[o(N,null,{append:i(()=>[o(y,{"aria-label":"Show Router Details",icon:"mdi-eye",variant:"text",onClick:R=>f.showRouter(u)},null,8,["onClick"])]),default:i(()=>[o(V,null,{default:i(()=>[m(C(u),1)]),_:2},1024)]),_:2},1024),o(S)]))),128))]),_:1}),a.showDialog?(l(),g(x,{key:0,modelValue:a.showDialog,"onUpdate:modelValue":s[0]||(s[0]=u=>a.showDialog=u),content:a.jsonContent,type:"Router",name:a.dialogTitle,onSubmit:f.dialogCallback},null,8,["modelValue","content","name","onSubmit"])):p("",!0)])}const _=w("default",d(t,[["render",D],["__scopeId","data-v-400627ab"]]))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Layout-DW5yNlp7-ace4cb6861ae152dfb76.js","./VerticalWidget-DsnEzKZ2-2007547788bdd392b5ef.js","vue","./main-db859e7477e802bb1689.js","./Widget-VCl8Ts8s-1e815890eca5d53bf68d.js","vue-router","single-spa","vuex","vuetify"],function(y,k){"use strict";var l,c,i,s,o,u,m,g,p,d,f;return{setters:[e=>{l=e.r},e=>{c=e.default},e=>{i=e.createElementBlock,s=e.openBlock,o=e.normalizeStyle,u=e.Fragment,m=e.renderList,g=e.createBlock,p=e.resolveDynamicComponent,d=e.mergeProps},e=>{f=e.d},null,null,null,null,null],execute:function(){const e={components:{VerticalWidget:c},mixins:[l],created:function(){if(this.setHeight(this.parameters[0],"px",200),this.parameters[1]){let n=this.parameters[1];this.widgets.forEach(a=>{a.settings.find(r=>r[0]==="MARGIN"||r[0].startsWith("RAW")&&r[1].toUpperCase().includes("MARGIN"))===void 0&&a.settings.push(["MARGIN",n])})}}};function v(n,a,r,B,W,z){return s(),i("div",{ref:"container",style:o(n.computedStyle),class:"overflow-y-auto"},[(s(!0),i(u,null,m(n.widgets,(t,h)=>(s(),g(p(t.type),d({ref_for:!0},n.listeners,{key:h,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":n.screenValues,"screen-time-zone":n.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],4)}const w=y("default",f(e,[["render",v]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-db859e7477e802bb1689.js","vue","vue-router","single-spa","vuex","vuetify"],function(C,D){"use strict";var v,i,r,d,o,t,s,f,u,m,V,g,x,y;return{setters:[l=>{v=l.d,i=l.F},l=>{r=l.resolveComponent,d=l.createElementBlock,o=l.openBlock,t=l.createVNode,s=l.withCtx,f=l.createElementVNode,u=l.createTextVNode,m=l.toDisplayString,V=l.Fragment,g=l.renderList,x=l.createBlock,y=l.createCommentVNode},null,null,null,null],execute:function(){const l={data(){return{file:null,loadingSecret:!1,secrets:[],secretName:"",secretValue:"",alert:"",alertType:"success",showAlert:!1}},mounted(){this.update()},methods:{update(){i.get("/openc3-api/secrets").then(c=>{this.secrets=c.data})},upload:function(){this.loadingSecret=!0;let c=null;if(this.file){const e=new FormData;e.append("file",this.file,this.file.name),c=i.post(`/openc3-api/secrets/${this.secretName}`,{data:e,headers:{"Content-Type":"multipart/form-data"}})}else c=i.post(`/openc3-api/secrets/${this.secretName}`,{data:{value:this.secretValue}});c.then(e=>{this.loadingSecret=!1,this.file=null,this.secretName="",this.secretValue="",this.update()}).catch(e=>{this.loadingSecret=!1})},deleteSecret:function(c){this.$dialog.confirm(`Are you sure you want to remove: ${c}`,{okText:"Delete",cancelText:"Cancel"}).then(function(e){return i.delete(`/openc3-api/secrets/${c}`)}).then(e=>{this.alert=`Removed secret ${c}`,this.alertType="success",this.showAlert=!0,setTimeout(()=>{this.showAlert=!1},5e3),this.update()})}}};function b(c,e,L,j,a,N){const w=r("v-file-input"),p=r("v-col"),k=r("v-row"),S=r("v-text-field"),T=r("v-icon"),_=r("v-btn"),A=r("v-alert"),B=r("v-list-item-title"),F=r("v-list-item"),U=r("v-divider"),$=r("v-list");return o(),d("div",null,[t(k,{"no-gutters":""},{default:s(()=>[t(p,null,{default:s(()=>[t(w,{ref:"fileInput",modelValue:a.file,"onUpdate:modelValue":e[0]||(e[0]=n=>a.file=n),"show-size":"",accept:"*",class:"mx-2",label:"Click to select a file to create a secret from or enter a secret value"},null,8,["modelValue"])]),_:1})]),_:1}),t(k,{"no-gutters":"",align:"center",style:{"padding-left":"10px"}},{default:s(()=>[t(p,{cols:"3"},{default:s(()=>[t(S,{modelValue:a.secretName,"onUpdate:modelValue":e[1]||(e[1]=n=>a.secretName=n),label:"Secret Name",class:"px-2"},null,8,["modelValue"])]),_:1}),t(p,{cols:"3",class:"px-2"},{default:s(()=>[t(S,{modelValue:a.secretValue,"onUpdate:modelValue":e[2]||(e[2]=n=>a.secretValue=n),disabled:a.file,label:"Secret Value"},null,8,["modelValue","disabled"])]),_:1}),t(p,{cols:"3",class:"px-2"},{default:s(()=>[t(_,{class:"mx-2",color:"primary","data-test":"secretUpload",disabled:a.secretName===""||a.file==null&&a.secretValue==="",loading:a.loadingSecret,onClick:e[3]||(e[3]=n=>N.upload())},{loader:s(()=>[...e[6]||(e[6]=[f("span",null,"Loading...",-1)])]),default:s(()=>[t(T,{start:"",theme:"dark"},{default:s(()=>[...e[5]||(e[5]=[u("mdi-cloud-upload",-1)])]),_:1}),e[7]||(e[7]=f("span",null," Set ",-1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(A,{modelValue:a.showAlert,"onUpdate:modelValue":e[4]||(e[4]=n=>a.showAlert=n),closable:"",type:a.alertType},{default:s(()=>[u(m(a.alert),1)]),_:1},8,["modelValue","type"]),t($,{"data-test":"secretList"},{default:s(()=>[(o(!0),d(V,null,g(a.secrets,(n,h)=>(o(),d("div",{key:h},[t(F,null,{append:s(()=>[t(_,{icon:"mdi-delete",variant:"text","aria-label":"Delete Secret",onClick:z=>N.deleteSecret(n)},null,8,["onClick"])]),default:s(()=>[t(B,null,{default:s(()=>[u(m(n),1)]),_:2},1024)]),_:2},1024),h<a.secrets.length-1?(o(),x(U,{key:h})):y("",!0)]))),128))]),_:1})])}const E=C("default",v(l,[["render",b]]))}}});
|