openc3-cosmos-tool-dataviewer 5.20.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/plugin.txt +1 -1
- data/tools/dataviewer/ArrayWidget-By62tXtU-8bbe7298739e850bfe18.js +2 -0
- data/tools/dataviewer/BarColumn-Dm3D1Lhp-526e23f414fccd8d35d5.js +1 -0
- data/tools/dataviewer/BlockWidget-CrT45ode-eb1537386ed01b4ca7a8.js +2 -0
- data/tools/dataviewer/ButtonWidget-CKyBBv6m-6a1f5c30d09f366d825b.js +2 -0
- data/tools/dataviewer/CanvasWidget-PqkppHC7-7f4710a46315eb789c30.js +1 -0
- data/tools/dataviewer/CanvasdotWidget-BUbJgM2d-619fc40c8997d5d7fea5.js +1 -0
- data/tools/dataviewer/CanvasimageWidget-DPVBY7mi-8c255da15addff7cd7ed.js +1 -0
- data/tools/dataviewer/CanvasimagevalueWidget-GX37zzNc-a4c90ba174579915fa60.js +1 -0
- data/tools/dataviewer/CanvaslabelWidget-P2_Y6Edw-1889fff3520ccb2d591b.js +1 -0
- data/tools/dataviewer/CanvaslabelvalueWidget-Cuas1i9P-821d500ef5052bfa1f55.js +1 -0
- data/tools/dataviewer/CanvaslineWidget-BYOYgPya-fc952e856c2e641ff2c7.js +1 -0
- data/tools/dataviewer/CanvaslinevalueWidget-3cVJMFo7-36de6935166b89acf071.js +1 -0
- data/tools/dataviewer/CheckbuttonWidget-B3wgSMuB-921dfb41856b10f4e3d2.js +1 -0
- data/tools/dataviewer/ComboboxWidget-Dzr4Scvf-1c49930a72a457565f4f.js +1 -0
- data/tools/dataviewer/DataViewer-e7201855078bff6f415f.js +39 -0
- data/tools/dataviewer/DateWidget-BWh76Ibb-f4492b09e29ad6fcd3e4.js +1 -0
- data/tools/dataviewer/DetailsDialog-EWjtBjle-c05025117b8375d47378.js +1 -0
- data/tools/dataviewer/DynamicWidget-m9EliUR2-e07442aa62eb6c370e74.js +1 -0
- data/tools/dataviewer/FormatvalueWidget-Rk0_eeIm-f77ac321fe0ae2a1ae05.js +1 -0
- data/tools/dataviewer/GraphWidget-LqekkNDr-7c4bc2811e40f1a0eda4.js +1 -0
- data/tools/dataviewer/HorizontalWidget-BcfJ24Zn-d10969e9eb6b31981e5d.js +1 -0
- data/tools/dataviewer/HorizontalboxWidget-CQy1Hv9E-79bc168a39cf33b8fa77.js +1 -0
- data/tools/dataviewer/HorizontallineWidget-BdlNB951-97d1618f13f926c9fead.js +1 -0
- data/tools/dataviewer/IframeWidget-BBaDrRLo-f7c37244b988644f60e0.js +1 -0
- data/tools/dataviewer/ImageLoader-CDLQopxJ-a623539e4fbe007660a4.js +1 -0
- data/tools/dataviewer/ImageviewerWidget-BgO3Pq6I-39d91c1f56e433c223ff.js +1 -0
- data/tools/dataviewer/LabelWidget-B_C6lKOE-2262f31f6af2709eadef.js +1 -0
- data/tools/dataviewer/LabelledWidget-B_UGivhr-a856807b089199c04c48.js +1 -0
- data/tools/dataviewer/LabelprogressbarWidget-BJWCmsYC-ed2174ab83eec25a4932.js +1 -0
- data/tools/dataviewer/LabelsparklineWidget-DILCIh3q-d10dd6a1cee9e3f8ff09.js +1 -0
- data/tools/dataviewer/LabelvalueWidget-CCZd1NXE-7640f00f75429e54ac71.js +1 -0
- data/tools/dataviewer/LabelvaluedescWidget-Bsllq8W6-c70757e2c771b63eeaf3.js +1 -0
- data/tools/dataviewer/LabelvaluelimitsbarWidget-BV-cfaD--e70ddc36890234455fc8.js +1 -0
- data/tools/dataviewer/LabelvaluelimitscolumnWidget-DwA0eRBw-c29416bf4524ae556578.js +1 -0
- data/tools/dataviewer/LabelvaluerangebarWidget-3GDJz3dj-8a7718383ec6189eb810.js +1 -0
- data/tools/dataviewer/Layout-klOVw-YN-4b432d0aff9e2d4d3031.js +1 -0
- data/tools/dataviewer/LedWidget-BAt02s0J-34e9cd8f31aa1d44ed32.js +1 -0
- data/tools/dataviewer/LimitsbarWidget-JJiyzZjb-1a3a9e7900b14a237016.js +1 -0
- data/tools/dataviewer/LimitscolorWidget-CYzXKbYd-b51bf7bd9f9140a5886d.js +1 -0
- data/tools/dataviewer/LimitscolumnWidget-Cd76tBo7-7cfdb6c29f7b363d998d.js +1 -0
- data/tools/dataviewer/LinegraphWidget-DWRtO6Ej-3c29ceb540e6c40ee56b.js +1 -0
- data/tools/dataviewer/MatrixbycolumnsWidget-cwsyjNV2-d96691fcc4322e9cc164.js +1 -0
- data/tools/dataviewer/ProgressbarWidget-CYDziFej-78bbd793fd448510d701.js +1 -0
- data/tools/dataviewer/RadiobuttonWidget-U6jcQZoD-b0547b7c8fb7a415c0b2.js +1 -0
- data/tools/dataviewer/RadiogroupWidget-HTPJnsB0-d3466645fc020b8f8c64.js +1 -0
- data/tools/dataviewer/RangebarWidget-DW0FJK6y-2513730abbade6224242.js +1 -0
- data/tools/dataviewer/RollupWidget-B2qrx55f-e10afdf560c4680b2f8d.js +1 -0
- data/tools/dataviewer/ScrollwindowWidget-CwIDxgO6-9a55ff533e3806746dbd.js +1 -0
- data/tools/dataviewer/SignalWidget-Bosa3AbW-2e3a2e8849456660ab78.js +1 -0
- data/tools/dataviewer/SpacerWidget-DYAlt5mt-9ad3440a97d08df18115.js +1 -0
- data/tools/dataviewer/SparklineWidget-CDrVXOFV-127f0c1510b33bbacc3a.js +1 -0
- data/tools/dataviewer/TabbookWidget-DDdlzCkv-a40f453adab909b9cff2.js +1 -0
- data/tools/dataviewer/TextboxWidget-5euFelEq-d779b87126b2e89c920c.js +1 -0
- data/tools/dataviewer/TextfieldWidget-BFripYeh-faeed76a09829f8d7aca.js +1 -0
- data/tools/dataviewer/TimeWidget-BBSbsUYJ-6a0511ab7401093febd0.js +1 -0
- data/tools/dataviewer/TitleWidget-p8cjo-Bs-7739c4b110fbadb842fa.js +1 -0
- data/tools/dataviewer/VWidget-Dmqf_jKM-65879a06e527ae1e3583.js +1 -0
- data/tools/dataviewer/ValueWidget-CZh7JWwT-ca2b22c2a83b95a0a04a.js +1 -0
- data/tools/dataviewer/ValuelimitsbarWidget-DU7ybswC-d9cde71b24bef099532d.js +1 -0
- data/tools/dataviewer/ValuelimitscolumnWidget-DMw-h5jM-4fa6393b410f2c7703e8.js +1 -0
- data/tools/dataviewer/ValuerangebarWidget-DPpofDpA-73a5076a222f23f531f6.js +1 -0
- data/tools/dataviewer/VerticalWidget-Ch7VAEmz-93fef677e4f97f1afc2b.js +1 -0
- data/tools/dataviewer/VerticalboxWidget-DYx-TFT4-34d6019e2ca16d8addc9.js +1 -0
- data/tools/dataviewer/Widget-orNSvnOh-c2a94ca25551f743ceef.js +1 -0
- data/tools/dataviewer/main-e67fa93ee8ee2348fa86.js +1425 -0
- data/tools/dataviewer/main.js +1 -0
- metadata +68 -11
- data/tools/dataviewer/index.html +0 -4
- data/tools/dataviewer/js/218.js +0 -10
- data/tools/dataviewer/js/218.js.map +0 -1
- data/tools/dataviewer/js/272.js +0 -2
- data/tools/dataviewer/js/272.js.map +0 -1
- data/tools/dataviewer/js/549.js +0 -2
- data/tools/dataviewer/js/549.js.map +0 -1
- data/tools/dataviewer/js/app.js +0 -2
- data/tools/dataviewer/js/app.js.map +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04a941111d8b1407f8a19f308eb95aab4046f0d4f82b2d76cf2436a2a81ce293
|
4
|
+
data.tar.gz: 4750928ab0265d677565368137e1b33291b8313001418e60b9e1af7ad3e076d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 259c2affc1c43c315901cb503128b332d8bd6fac58a263c59312dc75b69f3681f0bddd9fd74177ded7c228fc6dd5d33206604bbd84adafe67dcac09d5ce9e9bd
|
7
|
+
data.tar.gz: 887dbb2028a971f73fb44f319d3212a6b272c46ac1563ef9a00ae1f664cd41e8ec90675ef893e70a9f72b7e6c62a3c8b1eb72510754d88d66e5f2e4708b05f6d
|
data/plugin.txt
CHANGED
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-e67fa93ee8ee2348fa86.js","vue","./DetailsDialog-EWjtBjle-c05025117b8375d47378.js","./VWidget-Dmqf_jKM-65879a06e527ae1e3583.js","vue-router","vuex","vuetify","./Widget-orNSvnOh-c2a94ca25551f743ceef.js"],function(S,P){"use strict";var h,a,m,c,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.s},t=>{a=t.resolveComponent,m=t.openBlock,c=t.createElementBlock,i=t.createVNode,d=t.normalizeClass,p=t.normalizeStyle,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},t=>{V=t.L},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let s="",k=" ",D=`
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const u of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,u):s+=u,o+=1,o%this.itemsPerRow===0?(o=0,s+=D):s+=k;return s.trim()}else return e}}},B={class:"array-widget-container"};function _(e,r,s,k,D,o){const u=a("v-textarea"),j=a("v-list-item-title"),M=a("v-list-item"),z=a("v-list"),L=a("v-menu"),N=a("details-dialog");return m(),c("div",B,[i(u,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:p([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(L,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(z,null,{default:l(()=>[(m(!0),c(g,null,f(e.contextMenuOptions,(n,E)=>(m(),v(M,{key:E,onClick:w(n.action,["stop"])},{default:l(()=>[i(j,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(N,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const R=S("default",h(t,[["render",_],["__scopeId","data-v-62b9e9e1"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","./main-e67fa93ee8ee2348fa86.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.W}],execute:function(){const s=a("u",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-e67fa93ee8ee2348fa86.js","vue","./DetailsDialog-EWjtBjle-c05025117b8375d47378.js","./VWidget-Dmqf_jKM-65879a06e527ae1e3583.js","vue-router","vuex","vuetify","./Widget-orNSvnOh-c2a94ca25551f743ceef.js"],function(P,z){"use strict";var u,a,h,m,s,p,g,o,w,f,v,y,x,k,C,V;return{setters:[e=>{u=e.s},e=>{a=e.resolveComponent,h=e.openBlock,m=e.createElementBlock,s=e.createVNode,p=e.normalizeClass,g=e.normalizeStyle,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,k=e.toDisplayString},e=>{C=e.P},e=>{V=e.L},null,null,null,null],execute:function(){const e={components:{DetailsDialog:C},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let S=" ",D=`
|
2
|
+
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=D):i%this.bytesPerWord===0&&(r+=S)}else r=t;return r}}},W={class:"block-widget-container"};function M(t,r,S,D,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),_=a("v-list-item"),j=a("v-list"),B=a("v-menu"),F=a("details-dialog");return h(),m("div",W,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:p(t.valueClass),style:g([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(B,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(j,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,b)=>(h(),v(_,{key:b,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(k(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(F,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const L=P("default",u(e,[["render",M],["__scopeId","data-v-4d4589c2"]]))}}});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-e67fa93ee8ee2348fa86.js","vue","./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var s,Ok,S$1,Wk,resolveComponent,openBlock,createBlock,withCtx,createVNode,createElementVNode,createTextVNode,toDisplayString,createCommentVNode,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{s=e.s,Ok=e.O,S$1=e.S,Wk=e.W},e=>{resolveComponent=e.resolveComponent,openBlock=e.openBlock,createBlock=e.createBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,createCommentVNode=e.createCommentVNode,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},e=>{o=e.o},null,null,null],execute:function(){const S={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},watch:{modelValue:function(e,t){e?(Ok.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(r=>{r.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?Ok.get("/openc3-api/criticalcmd/status/"+this.uuid).then(r=>{r.data.status!=="WAITING"&&(this.$emit("status",r.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},methods:{async approve(){if(this.canApprove)await Ok.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();S$1.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await Ok.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await S$1.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await S$1.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,r,p,a,n){const c=resolveComponent("v-spacer"),v=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),V=resolveComponent("v-container"),w=resolveComponent("v-card-text"),u=resolveComponent("v-card"),f=resolveComponent("v-dialog");return openBlock(),createBlock(f,{persistent:r.persistent,modelValue:n.show,"onUpdate:modelValue":t[3]||(t[3]=d=>n.show=d),width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(v,{height:"24"},{default:withCtx(()=>[createVNode(c),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(c)]),_:1}),createVNode(w,null,{default:withCtx(()=>[createVNode(V,{fluid:""},{default:withCtx(()=>[createVNode(m,{type:"error",modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=d=>a.error=d),dismissible:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(r.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(r.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(r.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=d=>a.username=d),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=d=>a.password=d),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(c),createVNode(C,{type:"submit",onClick:withModifiers(n.reject,["prevent"]),class:"mx-2",color:"secondary",outlined:"",disabled:n.disableButtons,"data-test":"reject"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Reject ")])),_:1},8,["onClick","disabled"]),createVNode(C,{type:"submit",onClick:withModifiers(n.approve,["prevent"]),class:"mx-2",color:"primary",disabled:n.disableButtons,"data-test":"approve"},{default:withCtx(()=>t[6]||(t[6]=[createTextVNode(" Approve ")])),_:1},8,["onClick","disabled"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["persistent","modelValue"])}const N=s(S,[["render",E],["__scopeId","data-v-edfbf188"]]),_sfc_main={mixins:[o],components:{CriticalCmdDialog:N},data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new Wk},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
|
2
|
+
`).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,r={}){let p=[];for(const a in r)p.push({key:a,value:r[a],readonly:!1});Ok.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,r,p,a,n){const c=resolveComponent("v-btn"),v=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),V=resolveComponent("v-dialog"),w=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(c,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:n.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(n.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(V,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(v,null,{default:withCtx(()=>t[2]||(t[2]=[createTextVNode("Hazardous")])),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(l),createVNode(c,{onClick:n.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>t[4]||(t[4]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(c,{onClick:n.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>t[5]||(t[5]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(w,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",s(_sfc_main,[["render",_sfc_render]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Layout-klOVw-YN-4b432d0aff9e2d4d3031.js","vue","./main-e67fa93ee8ee2348fa86.js","./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue-router","vuex","vuetify"],function(h,f){"use strict";var i,n,s,a,c,l,o,u,m;return{setters:[e=>{i=e.r},e=>{n=e.openBlock,s=e.createElementBlock,a=e.Fragment,c=e.renderList,l=e.createBlock,o=e.resolveDynamicComponent,u=e.mergeProps},e=>{m=e.s},null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},p=["width","height"];function d(r,k,y,B,b,g){return n(),s("svg",{id:"canvas",width:g.width,height:g.height},[(n(!0),s(a,null,c(r.widgets,(t,v)=>(n(),l(o(t.type),u({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.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))],8,p)}const w=h("default",m(e,[["render",d],["__scopeId","data-v-47bdfc3c"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(s,i){"use strict";var t,n,l,c;return{setters:[e=>{t=e.o},e=>{n=e.openBlock,l=e.createElementBlock},e=>{c=e.s},null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function o(r,m,f,p,v,x){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const a=s("default",c(e,[["render",o]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","./ImageLoader-CDLQopxJ-a623539e4fbe007660a4.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(m,d){"use strict";var s,i,n,a,c,l,h;return{setters:[e=>{s=e.o},e=>{i=e.s},e=>{n=e.openBlock,a=e.createElementBlock,c=e.normalizeStyle,l=e.createCommentVNode},e=>{h=e.s},null,null,null],execute:function(){const e={mixins:[s,i],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,o,y,k,N,r){return t.imageUrl?(n(),a("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):l("",!0)}const f=m("default",h(e,[["render",p]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","./ImageLoader-CDLQopxJ-a623539e4fbe007660a4.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,o,g,h,u,c,p,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.openBlock,n=t.createElementBlock,o=t.Fragment,g=t.renderList,h=t.withDirectives,u=t.normalizeStyle,c=t.vShow,p=t.createCommentVNode},t=>{f=t.s},null,null,null],execute:function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return l(),n("g",null,[(l(!0),n(o,null,g(r.images,s=>h((l(),n("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((l(),n("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):p("",!0)])}const $=v("default",f(t,[["render",k]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(i,m){"use strict";var r,l,n,s,o;return{setters:[e=>{r=e.o},e=>{l=e.openBlock,n=e.createElementBlock,s=e.toDisplayString},e=>{o=e.s},null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,v,y,c){return l(),n("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const p=i("default",o(e,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.openBlock,i=e.createElementBlock,l=e.toDisplayString},e=>{n=e.s},null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,h,d,f,v,r){return a(),i("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(o,p){"use strict";var s,l,n,a,c;return{setters:[e=>{s=e.o},e=>{l=e.openBlock,n=e.createElementBlock,a=e.normalizeStyle},e=>{c=e.s},null,null,null],execute:function(){const e={mixins:[s],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},i=["x1","y1","x2","y2"];function u(t,r,k,x,f,m){return l(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,i)}const y=o("default",c(e,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.openBlock,l=t.createElementBlock,i=t.normalizeStyle},t=>{n=t.s},null,null,null],execute:function(){const t={mixins:[s],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},c=["x1","y1","x2","y2"];function h(e,a,d,v,y,m){return r(),l("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(m.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",h]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(c,h){"use strict";var l,n,o,a,r,s;return{setters:[e=>{l=e.o},e=>{n=e.resolveComponent,o=e.openBlock,a=e.createBlock,r=e.normalizeStyle},e=>{s=e.s},null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,k,y,t,b){const m=n("v-checkbox");return o(),a(m,{"hide-details":"",density:"compact",label:t.label,modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=v=>t.value=v),style:r(d.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",s(e,[["render",i]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-orNSvnOh-c2a94ca25551f743ceef.js","vue","./main-e67fa93ee8ee2348fa86.js","vue-router","vuex","vuetify"],function(i,p){"use strict";var l,s,n,o,r,u;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=e.openBlock,o=e.createBlock,r=e.normalizeStyle},e=>{u=e.s},null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,S){const v=s("v-select");return n(),o(v,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=d=>t.value=d),style:r(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",u(e,[["render",c]]))}}});
|