openc3-cosmos-tool-cmdtlmserver 5.17.1 → 5.18.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ (self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]=self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]||[]).push([[625],{7752:(n,e,t)=>{"use strict";t.d(e,{Be:()=>C,D$:()=>c});var o={logger:"undefined"!==typeof console?console:void 0,WebSocket:"undefined"!==typeof WebSocket?WebSocket:void 0},i={log(...n){this.enabled&&(n.push(Date.now()),o.logger.log("[ActionCable]",...n))}};const l=()=>(new Date).getTime(),s=n=>(l()-n)/1e3;class c{constructor(n){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=n,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=l(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),i.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=l(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),i.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=l()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,i.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=l(),i.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:n,reconnectionBackoffRate:e}=this.constructor,t=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),o=0===this.reconnectAttempts?1:e,i=o*Math.random();return 1e3*n*t*(1+i)}reconnectIfStale(){this.connectionIsStale()&&(i.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${s(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?i.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${s(this.disconnectedAt)} s`):(i.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return s(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&s(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){"visible"===document.visibilityState&&setTimeout((()=>{!this.connectionIsStale()&&this.connection.isOpen()||(i.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}c.staleThreshold=6,c.reconnectionBackoffRate=.15;var a={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:r,protocols:u}=a,m=u.slice(0,u.length-1),d=[].indexOf;class p{constructor(n){this.open=this.open.bind(this),this.consumer=n,this.subscriptions=this.consumer.subscriptions,this.monitor=new c(this),this.disconnected=!0}send(n){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(n)),!0)}open(){if(this.isActive())return i.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const n=[...u,...this.consumer.subprotocols||[]];return i.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${n}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new o.WebSocket(this.consumer.url,n),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:n}={allowReconnect:!0}){if(n||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(i.log(`Reopening WebSocket, current state is ${this.getState()}`),!this.isActive())return this.open();try{return this.close()}catch(n){i.log("Failed to reopen WebSocket",n)}finally{i.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return d.call(m,this.getProtocol())>=0}isState(...n){return d.call(n,this.getState())>=0}getState(){if(this.webSocket)for(let n in o.WebSocket)if(o.WebSocket[n]===this.webSocket.readyState)return n.toLowerCase();return null}installEventHandlers(){for(let n in this.events){const e=this.events[n].bind(this);this.webSocket[`on${n}`]=e}}uninstallEventHandlers(){for(let n in this.events)this.webSocket[`on${n}`]=function(){}}}p.reopenDelay=500,p.prototype.events={message(n){if(!this.isProtocolSupported())return;const{identifier:e,message:t,reason:o,reconnect:l,type:s}=JSON.parse(n.data);switch(s){case r.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case r.disconnect:return i.log(`Disconnecting. Reason: ${o}`),this.close({allowReconnect:l});case r.ping:return this.monitor.recordPing();case r.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case r.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",t)}},open(){if(i.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return i.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(n){if(i.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){i.log("WebSocket onerror event")}};const A=function(n,e){if(null!=e)for(let t in e){const o=e[t];n[t]=o}return n};class h{constructor(n,e={},t){this.consumer=n,this.identifier=JSON.stringify(e),A(this,t)}perform(n,e={}){return e.action=n,this.send(e)}send(n){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(n)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class b{constructor(n){this.subscriptions=n,this.pendingSubscriptions=[]}guarantee(n){-1==this.pendingSubscriptions.indexOf(n)?(i.log(`SubscriptionGuarantor guaranteeing ${n.identifier}`),this.pendingSubscriptions.push(n)):i.log(`SubscriptionGuarantor already guaranteeing ${n.identifier}`),this.startGuaranteeing()}forget(n){i.log(`SubscriptionGuarantor forgetting ${n.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==n))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&"function"===typeof this.subscriptions.subscribe&&this.pendingSubscriptions.map((n=>{i.log(`SubscriptionGuarantor resubscribing ${n.identifier}`),this.subscriptions.subscribe(n)}))}),500)}}class v{constructor(n){this.consumer=n,this.guarantor=new b(this),this.subscriptions=[]}create(n,e){const t=n,o="object"===typeof t?t:{channel:t},i=new h(this.consumer,o,e);return this.add(i)}add(n){return this.subscriptions.push(n),this.consumer.ensureActiveConnection(),this.notify(n,"initialized"),this.subscribe(n),n}remove(n){return this.forget(n),this.findAll(n.identifier).length||this.sendCommand(n,"unsubscribe"),n}reject(n){return this.findAll(n).map((n=>(this.forget(n),this.notify(n,"rejected"),n)))}forget(n){return this.guarantor.forget(n),this.subscriptions=this.subscriptions.filter((e=>e!==n)),n}findAll(n){return this.subscriptions.filter((e=>e.identifier===n))}reload(){return this.subscriptions.map((n=>this.subscribe(n)))}notifyAll(n,...e){return this.subscriptions.map((t=>this.notify(t,n,...e)))}notify(n,e,...t){let o;return o="string"===typeof n?this.findAll(n):[n],o.map((n=>"function"===typeof n[e]?n[e](...t):void 0))}subscribe(n){this.sendCommand(n,"subscribe")&&this.guarantor.guarantee(n)}confirmSubscription(n){i.log(`Subscription confirmed ${n}`),this.findAll(n).map((n=>this.guarantor.forget(n)))}sendCommand(n,e){const{identifier:t}=n;return this.consumer.send({command:e,identifier:t})}}class f{constructor(n){this._url=n,this.subscriptions=new v(this),this.connection=new p(this),this.subprotocols=[]}get url(){return g(this._url)}send(n){return this.connection.send(n)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(n){this.subprotocols=[...this.subprotocols,n]}}function g(n){if("function"===typeof n&&(n=n()),n&&!/^wss?:/i.test(n)){const e=document.createElement("a");return e.href=n,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}return n}function C(n=y("url")||a.default_mount_path){return new f(n)}function y(n){const e=document.head.querySelector(`meta[name='action-cable-${n}']`);if(e)return e.getAttribute("content")}},8474:(n,e,t)=>{"use strict";t.d(e,{A:()=>l});var o=t(4364);function i(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",e="4a33e65af05f7d08e216a604150e8920749ac334",t=new Function("return this")(),o="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",statementMap:{0:{start:{line:32,column:4},end:{line:35,column:5}},1:{start:{line:38,column:4},end:{line:38,column:30}},2:{start:{line:41,column:4},end:{line:41,column:24}},3:{start:{line:44,column:4},end:{line:47,column:5}},4:{start:{line:45,column:6},end:{line:45,column:33}},5:{start:{line:46,column:6},end:{line:46,column:25}},6:{start:{line:52,column:6},end:{line:52,column:26}},7:{start:{line:57,column:6},end:{line:60,column:7}},8:{start:{line:58,column:8},end:{line:58,column:35}},9:{start:{line:59,column:8},end:{line:59,column:27}},10:{start:{line:61,column:6},end:{line:63,column:30}},11:{start:{line:62,column:8},end:{line:62,column:21}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:9},end:{line:36,column:3}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:37,column:2},end:{line:37,column:3}},loc:{start:{line:37,column:12},end:{line:39,column:3}},line:37},2:{name:"(anonymous_2)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:12},end:{line:42,column:3}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:18},end:{line:48,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:51,column:21},end:{line:51,column:22}},loc:{start:{line:51,column:47},end:{line:53,column:5}},line:51},5:{name:"(anonymous_5)",decl:{start:{line:56,column:4},end:{line:56,column:5}},loc:{start:{line:56,column:20},end:{line:64,column:5}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:61,column:33},end:{line:61,column:34}},loc:{start:{line:61,column:39},end:{line:63,column:7}},line:61}},branchMap:{0:{loc:{start:{line:44,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},1:{loc:{start:{line:57,column:6},end:{line:60,column:7}},type:"if",locations:[{start:{line:57,column:6},end:{line:60,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4a33e65af05f7d08e216a604150e8920749ac334"},s=t[o]||(t[o]={});s[n]&&s[n].hash===e||(s[n]=l);var c=s[n];return i=function(){return c},c}i();const l={props:{refreshInterval:{default:1e3}},data(){return i().f[0]++,i().s[0]++,{updater:null,api:null}},created(){i().f[1]++,i().s[1]++,this.api=new o.x},mounted(){i().f[2]++,i().s[2]++,this.changeUpdater()},beforeDestroy(){i().f[3]++,i().s[3]++,null!=this.updater?(i().b[0][0]++,i().s[4]++,clearInterval(this.updater),i().s[5]++,this.updater=null):i().b[0][1]++},watch:{refreshInterval:function(n,e){i().f[4]++,i().s[6]++,this.changeUpdater()}},methods:{changeUpdater(){i().f[5]++,i().s[7]++,null!=this.updater?(i().b[1][0]++,i().s[8]++,clearInterval(this.updater),i().s[9]++,this.updater=null):i().b[1][1]++,i().s[10]++,this.updater=setInterval((()=>{i().f[6]++,i().s[11]++,this.update()}),this.refreshInterval)}}}},2702:(n,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(7752);o.D$.staleThreshold=10;class i{constructor(n="/openc3-api/cable"){this._cable=null,this._url=n}disconnect(){this._cable&&this._cable.disconnect()}createSubscription(n,e,t={},i={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((e=>{if(e&&OpenC3Auth.setTokens(),null==this._cable){let n=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);this._cable=o.Be(n)}return this._cable.subscriptions.create({channel:n,...i},t)}))}recordPing(){this._cable.connection.monitor.recordPing()}}},1722:(n,e,t)=>{"use strict";function o(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/TargetsTab.vue",e="2530b7899e890cc472fb7e40268981cfc93788fc",t=new Function("return this")(),i="__coverage__",l={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/TargetsTab.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:3589}},4:{start:{line:1,column:334},end:{line:1,column:709}},5:{start:{line:1,column:395},end:{line:1,column:431}},6:{start:{line:1,column:1224},end:{line:1,column:1609}},7:{start:{line:1,column:1285},end:{line:1,column:1324}},8:{start:{line:1,column:2200},end:{line:1,column:2214}},9:{start:{line:1,column:2539},end:{line:1,column:2902}},10:{start:{line:1,column:2757},end:{line:1,column:2783}},11:{start:{line:1,column:2947},end:{line:1,column:3317}},12:{start:{line:1,column:3165},end:{line:1,column:3194}},13:{start:{line:1,column:3501},end:{line:1,column:3538}},14:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:310},end:{line:1,column:311}},loc:{start:{line:1,column:333},end:{line:1,column:710}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:378},end:{line:1,column:379}},loc:{start:{line:1,column:394},end:{line:1,column:432}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:1200},end:{line:1,column:1201}},loc:{start:{line:1,column:1223},end:{line:1,column:1610}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1268},end:{line:1,column:1269}},loc:{start:{line:1,column:1284},end:{line:1,column:1325}},line:1},5:{name:"(anonymous_5)",decl:{start:{line:1,column:2184},end:{line:1,column:2185}},loc:{start:{line:1,column:2199},end:{line:1,column:2215}},line:1},6:{name:"(anonymous_6)",decl:{start:{line:1,column:2520},end:{line:1,column:2521}},loc:{start:{line:1,column:2538},end:{line:1,column:2903}},line:1},7:{name:"(anonymous_7)",decl:{start:{line:1,column:2740},end:{line:1,column:2741}},loc:{start:{line:1,column:2756},end:{line:1,column:2784}},line:1},8:{name:"(anonymous_8)",decl:{start:{line:1,column:2928},end:{line:1,column:2929}},loc:{start:{line:1,column:2946},end:{line:1,column:3318}},line:1},9:{name:"(anonymous_9)",decl:{start:{line:1,column:3148},end:{line:1,column:3149}},loc:{start:{line:1,column:3164},end:{line:1,column:3195}},line:1},10:{name:"(anonymous_10)",decl:{start:{line:1,column:3485},end:{line:1,column:3486}},loc:{start:{line:1,column:3500},end:{line:1,column:3539}},line:1}},branchMap:{0:{loc:{start:{line:1,column:230},end:{line:1,column:268}},type:"binary-expr",locations:[{start:{line:1,column:230},end:{line:1,column:244}},{start:{line:1,column:248},end:{line:1,column:268}}],line:1},1:{loc:{start:{line:1,column:728},end:{line:1,column:1059}},type:"cond-expr",locations:[{start:{line:1,column:745},end:{line:1,column:914}},{start:{line:1,column:915},end:{line:1,column:1059}}],line:1},2:{loc:{start:{line:1,column:1120},end:{line:1,column:1158}},type:"binary-expr",locations:[{start:{line:1,column:1120},end:{line:1,column:1134}},{start:{line:1,column:1138},end:{line:1,column:1158}}],line:1},3:{loc:{start:{line:1,column:1628},end:{line:1,column:1959}},type:"cond-expr",locations:[{start:{line:1,column:1645},end:{line:1,column:1814}},{start:{line:1,column:1815},end:{line:1,column:1959}}],line:1},4:{loc:{start:{line:1,column:2547},end:{line:1,column:2608}},type:"cond-expr",locations:[{start:{line:1,column:2573},end:{line:1,column:2599}},{start:{line:1,column:2600},end:{line:1,column:2608}}],line:1},5:{loc:{start:{line:1,column:2621},end:{line:1,column:2901}},type:"cond-expr",locations:[{start:{line:1,column:2646},end:{line:1,column:2892}},{start:{line:1,column:2893},end:{line:1,column:2901}}],line:1},6:{loc:{start:{line:1,column:2955},end:{line:1,column:3016}},type:"cond-expr",locations:[{start:{line:1,column:2981},end:{line:1,column:3007}},{start:{line:1,column:3008},end:{line:1,column:3016}}],line:1},7:{loc:{start:{line:1,column:3029},end:{line:1,column:3316}},type:"cond-expr",locations:[{start:{line:1,column:3054},end:{line:1,column:3307}},{start:{line:1,column:3308},end:{line:1,column:3316}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2530b7899e890cc472fb7e40268981cfc93788fc"},s=t[i]||(t[i]={});s[n]&&s[n].hash===e||(s[n]=l);var c=s[n];return o=function(){return c},c}t.r(e),t.d(e,{default:()=>w}),o(),o().s[0]++;var i=function(){o().f[0]++;var n=(o().s[1]++,this),e=(o().s[2]++,n._self._c);return o().s[3]++,e("v-card",[e("v-card-title",[n._v("\n "+n._s(n.data.length)+" Targets\n "),e("v-spacer"),n._v(" "),e("v-tooltip",{attrs:{bottom:"",disabled:(o().b[0][0]++,n.enterprise&&(o().b[0][1]++,n.commandAuthority))},scopedSlots:n._u([{key:"activator",fn:function({on:t,attrs:i}){return o().f[1]++,o().s[4]++,[e("div",n._g(n._b({on:{click:function(e){return o().f[2]++,o().s[5]++,n.tooltipHandler("takeAll")}}},"div",i,!1),t),[e("v-btn",{staticClass:"mr-2",attrs:{color:"primary",disabled:!n.commandAuthority,"data-test":"take-all"}},[n._v("\n Take All Cmd Authority\n "),e("v-icon",{attrs:{right:""}},[n._v(" mdi-account-check ")])],1)],1)]}}])},[n._v(" "),n.enterprise?(o().b[1][0]++,e("span",[n._v("\n Command Authority is disabled."),e("br"),n._v("Click the button above to navigate\n to the Admin Console / Scopes Tab.\n ")])):(o().b[1][1]++,e("span",[n._v("\n Command Authority is Enterprise Only."),e("br"),n._v("Click the button above to\n learn more.\n ")]))]),n._v(" "),e("v-tooltip",{attrs:{bottom:"",disabled:(o().b[2][0]++,n.enterprise&&(o().b[2][1]++,n.commandAuthority))},scopedSlots:n._u([{key:"activator",fn:function({on:t,attrs:i}){return o().f[3]++,o().s[6]++,[e("div",n._g(n._b({on:{click:function(e){return o().f[4]++,o().s[7]++,n.tooltipHandler("releaseAll")}}},"div",i,!1),t),[e("v-btn",{staticClass:"mr-2",attrs:{color:"primary",disabled:!n.commandAuthority,"data-test":"release-all"}},[n._v("\n Release All Cmd Authority\n "),e("v-icon",{attrs:{right:""}},[n._v(" mdi-account-cancel ")])],1)],1)]}}])},[n._v(" "),n.enterprise?(o().b[3][0]++,e("span",[n._v("\n Command Authority is disabled."),e("br"),n._v("Click the button above to navigate\n to the Admin Console / Scopes Tab.\n ")])):(o().b[3][1]++,e("span",[n._v("\n Command Authority is Enterprise Only."),e("br"),n._v("Click the button above to\n learn more.\n ")]))]),n._v(" "),e("v-text-field",{staticClass:"search",attrs:{label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",outlined:"",dense:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){o().f[5]++,o().s[8]++,n.search=e},expression:"search"}})],1),n._v(" "),e("v-data-table",{attrs:{headers:n.headers,items:n.data,search:n.search,"items-per-page":10,"footer-props":{itemsPerPageOptions:[10,20,-1]},"calculate-widths":"","multi-sort":"","data-test":"targets-table"},scopedSlots:n._u([{key:"item.take",fn:function({item:t}){return o().f[6]++,o().s[9]++,["UNKNOWN"===t.name?(o().b[4][0]++,e("span",[n._v("N/A")])):(o().b[4][1]++,n._e()),n._v(" "),"UNKNOWN"!=t.name?(o().b[5][0]++,e("v-btn",{attrs:{block:"",color:"primary",disabled:!n.commandAuthority},on:{click:function(e){return o().f[7]++,o().s[10]++,n.take(t.name)}}},[n._v("\n Take\n "),e("v-icon",{attrs:{right:""}},[n._v(" mdi-account-check ")])],1)):(o().b[5][1]++,n._e())]}},{key:"item.release",fn:function({item:t}){return o().f[8]++,o().s[11]++,["UNKNOWN"===t.name?(o().b[6][0]++,e("span",[n._v("N/A")])):(o().b[6][1]++,n._e()),n._v(" "),"UNKNOWN"!=t.name?(o().b[7][0]++,e("v-btn",{attrs:{block:"",color:"primary",disabled:!n.commandAuthority},on:{click:function(e){return o().f[9]++,o().s[12]++,n.release(t.name)}}},[n._v("\n Release\n "),e("v-icon",{attrs:{right:""}},[n._v(" mdi-account-cancel ")])],1)):(o().b[7][1]++,n._e())]}}])}),n._v(" "),e("upgrade-to-enterprise-dialog",{attrs:{reason:"Command Authority is Enterprise Only"},model:{value:n.showUpgradeToEnterpriseDialog,callback:function(e){o().f[10]++,o().s[13]++,n.showUpgradeToEnterpriseDialog=e},expression:"showUpgradeToEnterpriseDialog"}})],1)},l=(o().s[14]++,[]),s=(t(9375),t(2673));const c=async function(n,e,{data:t,params:o={},headers:i,noAuth:l=!1,noScope:c=!1,onUploadProgress:a=!1}={}){if(!l){try{let n=await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);n&&OpenC3Auth.setTokens()}catch(r){OpenC3Auth.login()}i["Authorization"]=localStorage.openc3Token}return i["manual"]=!0,c||o["scope"]||(o["scope"]=window.openc3Scope),(0,s.A)({method:n,url:e,data:t,params:o,headers:i,onUploadProgress:a})},a={Accept:"application/json"},r={...a,"Content-Type":"application/json"},u={get:function(n,{params:e,headers:t=a,noScope:o,noAuth:i,onUploadProgress:l}={}){return c("get",n,{params:e,headers:t,noScope:o,noAuth:i,onUploadProgress:l})},put:function(n,{data:e,params:t,headers:o=r,noScope:i,noAuth:l,onUploadProgress:s}={}){return c("put",n,{data:e,params:t,headers:o,noScope:i,noAuth:l,onUploadProgress:s})},post:function(n,{data:e,params:t,headers:o=r,noScope:i,noAuth:l,onUploadProgress:s}={}){return c("post",n,{data:e,params:t,headers:o,noScope:i,noAuth:l,onUploadProgress:s})},delete:function(n,{params:e,headers:t=a,noScope:o,noAuth:i,onUploadProgress:l}={}){return c("delete",n,{params:e,headers:t,noScope:o,noAuth:i,onUploadProgress:l})}};var m=t(8474),d=function(){var n=this,e=n._self._c;return e("v-dialog",{attrs:{width:"650px"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[e("v-card",[e("v-system-bar",[e("v-spacer"),n._v(" "),e("span",[n._v(" Upgrade to COSMOS Enterprise Edition ")]),n._v(" "),e("v-spacer")],1),n._v(" "),e("v-card-text",{staticClass:"mt-2"},[e("div",{staticClass:"logo"},[e("img",{attrs:{src:n.logo,alt:"OpenC3"}}),n._v(" "),e("div",{staticClass:"cosmos"},[n._v("Enterprise Edition")])]),n._v(" "),e("div",{staticClass:"pb-4"},[n._v("\n Thank you for using the COSMOS Open Source Edition!\n ")]),n._v(" "),n.reason?e("div",[e("div",{staticClass:"pb-4 pl-4 reason"},[n._v("\n "+n._s(n.reason)+"\n ")])]):n._e(),n._v("\n COSMOS Enterprise Edition removes all restrictions and offers users with\n role based access control, scaling on kubernetes, cloud platform\n support, multiple scopes, Calendar and Autonomic, various integrations\n with common protocols and hardware, commercial licensing, and much\n more!"),e("br"),e("br"),n._v("\n Learn more at\n "),e("a",{attrs:{href:"https://openc3.com/enterprise"}},[n._v("https://openc3.com/enterprise")]),n._v("\n and help support COSMOS Open Source by supporting our business. Contact\n us at "),e("a",{attrs:{href:"mailto:support@openc3.com"}},[n._v("support@openc3.com")]),n._v(" for\n more information about Enterprise Edition, COSMOS training, COSMOS\n support, and custom COSMOS development.\n ")]),n._v(" "),e("v-card-actions",[e("v-spacer"),n._v(" "),e("v-btn",{staticClass:"mx-2",attrs:{color:"primary"},on:{click:function(e){n.show=!n.show}}},[n._v(" Ok ")])],1)],1)],1)},p=[];const A=t.p+"img/logo.png",h={props:{value:Boolean,reason:String},data(){return{logo:A}},computed:{show:{get(){return this.value},set(n){this.$emit("input",n)}}}},b=h;t(8329);var v=t(2401),f=(0,v.A)(b,d,p,!1,null,"4a51dae5",null);const g=f.exports;var C=t(2702);function y(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/TargetsTab.vue",e="399655963b0cd0738d29fbab82439c7e272bc5df",t=new Function("return this")(),o="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/TargetsTab.vue",statementMap:{0:{start:{line:17,column:4},end:{line:35,column:5}},1:{start:{line:38,column:4},end:{line:42,column:6}},2:{start:{line:39,column:6},end:{line:41,column:7}},3:{start:{line:40,column:8},end:{line:40,column:30}},4:{start:{line:46,column:4},end:{line:54,column:6}},5:{start:{line:47,column:6},end:{line:53,column:7}},6:{start:{line:48,column:8},end:{line:52,column:10}},7:{start:{line:55,column:4},end:{line:78,column:5}},8:{start:{line:57,column:6},end:{line:61,column:8}},9:{start:{line:58,column:8},end:{line:60,column:9}},10:{start:{line:59,column:10},end:{line:59,column:38}},11:{start:{line:63,column:6},end:{line:65,column:8}},12:{start:{line:64,column:8},end:{line:64,column:36}},13:{start:{line:68,column:6},end:{line:77,column:10}},14:{start:{line:71,column:12},end:{line:71,column:35}},15:{start:{line:72,column:12},end:{line:72,column:37}},16:{start:{line:76,column:10},end:{line:76,column:54}},17:{start:{line:81,column:4},end:{line:83,column:5}},18:{start:{line:82,column:6},end:{line:82,column:43}},19:{start:{line:84,column:4},end:{line:84,column:27}},20:{start:{line:89,column:6},end:{line:105,column:8}},21:{start:{line:90,column:20},end:{line:90,column:48}},22:{start:{line:91,column:8},end:{line:104,column:9}},23:{start:{line:93,column:12},end:{line:95,column:13}},24:{start:{line:94,column:14},end:{line:94,column:61}},25:{start:{line:96,column:12},end:{line:96,column:17}},26:{start:{line:98,column:12},end:{line:98,column:44}},27:{start:{line:99,column:12},end:{line:99,column:17}},28:{start:{line:101,column:12},end:{line:101,column:43}},29:{start:{line:102,column:12},end:{line:102,column:17}},30:{start:{line:108,column:6},end:{line:116,column:7}},31:{start:{line:109,column:8},end:{line:113,column:9}},32:{start:{line:110,column:10},end:{line:110,column:24}},33:{start:{line:112,column:10},end:{line:112,column:54}},34:{start:{line:115,column:8},end:{line:115,column:49}},35:{start:{line:119,column:6},end:{line:119,column:43}},36:{start:{line:119,column:37},end:{line:119,column:43}},37:{start:{line:120,column:6},end:{line:133,column:8}},38:{start:{line:121,column:8},end:{line:132,column:9}},39:{start:{line:121,column:21},end:{line:121,column:22}},40:{start:{line:122,column:10},end:{line:122,column:40}},41:{start:{line:123,column:10},end:{line:123,column:45}},42:{start:{line:124,column:10},end:{line:131,column:11}},43:{start:{line:125,column:12},end:{line:130,column:13}},44:{start:{line:126,column:14},end:{line:127,column:59}},45:{start:{line:129,column:14},end:{line:129,column:40}},46:{start:{line:136,column:6},end:{line:140,column:8}},47:{start:{line:143,column:6},end:{line:147,column:8}},48:{start:{line:150,column:6},end:{line:150,column:46}},49:{start:{line:153,column:6},end:{line:153,column:49}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:9},end:{line:36,column:3}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:37,column:11},end:{line:37,column:12}},loc:{start:{line:37,column:29},end:{line:79,column:3}},line:37},2:{name:"(anonymous_2)",decl:{start:{line:38,column:43},end:{line:38,column:44}},loc:{start:{line:38,column:57},end:{line:42,column:5}},line:38},3:{name:"(anonymous_3)",decl:{start:{line:46,column:42},end:{line:46,column:43}},loc:{start:{line:46,column:52},end:{line:54,column:5}},line:46},4:{name:"(anonymous_4)",decl:{start:{line:57,column:63},end:{line:57,column:64}},loc:{start:{line:57,column:77},end:{line:61,column:7}},line:57},5:{name:"(anonymous_5)",decl:{start:{line:63,column:42},end:{line:63,column:43}},loc:{start:{line:63,column:56},end:{line:65,column:7}},line:63},6:{name:"(anonymous_6)",decl:{start:{line:70,column:20},end:{line:70,column:21}},loc:{start:{line:70,column:30},end:{line:73,column:11}},line:70},7:{name:"(anonymous_7)",decl:{start:{line:75,column:14},end:{line:75,column:15}},loc:{start:{line:75,column:38},end:{line:77,column:9}},line:75},8:{name:"(anonymous_8)",decl:{start:{line:80,column:2},end:{line:80,column:3}},loc:{start:{line:80,column:14},end:{line:85,column:3}},line:80},9:{name:"(anonymous_9)",decl:{start:{line:88,column:4},end:{line:88,column:5}},loc:{start:{line:88,column:25},end:{line:106,column:5}},line:88},10:{name:"(anonymous_10)",decl:{start:{line:89,column:19},end:{line:89,column:20}},loc:{start:{line:89,column:32},end:{line:105,column:7}},line:89},11:{name:"(anonymous_11)",decl:{start:{line:107,column:4},end:{line:107,column:5}},loc:{start:{line:107,column:27},end:{line:117,column:5}},line:107},12:{name:"(anonymous_12)",decl:{start:{line:118,column:4},end:{line:118,column:5}},loc:{start:{line:118,column:13},end:{line:134,column:5}},line:118},13:{name:"(anonymous_13)",decl:{start:{line:120,column:44},end:{line:120,column:45}},loc:{start:{line:120,column:60},end:{line:133,column:7}},line:120},14:{name:"(anonymous_14)",decl:{start:{line:135,column:4},end:{line:135,column:5}},loc:{start:{line:135,column:22},end:{line:141,column:5}},line:135},15:{name:"(anonymous_15)",decl:{start:{line:142,column:4},end:{line:142,column:5}},loc:{start:{line:142,column:25},end:{line:148,column:5}},line:142},16:{name:"(anonymous_16)",decl:{start:{line:149,column:4},end:{line:149,column:5}},loc:{start:{line:149,column:14},end:{line:151,column:5}},line:149},17:{name:"(anonymous_17)",decl:{start:{line:152,column:4},end:{line:152,column:5}},loc:{start:{line:152,column:17},end:{line:154,column:5}},line:152}},branchMap:{0:{loc:{start:{line:39,column:6},end:{line:41,column:7}},type:"if",locations:[{start:{line:39,column:6},end:{line:41,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:39},1:{loc:{start:{line:55,column:4},end:{line:78,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:78,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},2:{loc:{start:{line:58,column:8},end:{line:60,column:9}},type:"if",locations:[{start:{line:58,column:8},end:{line:60,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:58},3:{loc:{start:{line:81,column:4},end:{line:83,column:5}},type:"if",locations:[{start:{line:81,column:4},end:{line:83,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:81},4:{loc:{start:{line:91,column:8},end:{line:104,column:9}},type:"switch",locations:[{start:{line:92,column:10},end:{line:96,column:17}},{start:{line:97,column:10},end:{line:99,column:17}},{start:{line:100,column:10},end:{line:102,column:17}}],line:91},5:{loc:{start:{line:93,column:12},end:{line:95,column:13}},type:"if",locations:[{start:{line:93,column:12},end:{line:95,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:93},6:{loc:{start:{line:108,column:6},end:{line:116,column:7}},type:"if",locations:[{start:{line:108,column:6},end:{line:116,column:7}},{start:{line:114,column:13},end:{line:116,column:7}}],line:108},7:{loc:{start:{line:109,column:8},end:{line:113,column:9}},type:"if",locations:[{start:{line:109,column:8},end:{line:113,column:9}},{start:{line:111,column:15},end:{line:113,column:9}}],line:109},8:{loc:{start:{line:119,column:6},end:{line:119,column:43}},type:"if",locations:[{start:{line:119,column:6},end:{line:119,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:119},9:{loc:{start:{line:124,column:10},end:{line:131,column:11}},type:"if",locations:[{start:{line:124,column:10},end:{line:131,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:124},10:{loc:{start:{line:125,column:12},end:{line:130,column:13}},type:"if",locations:[{start:{line:125,column:12},end:{line:130,column:13}},{start:{line:128,column:19},end:{line:130,column:13}}],line:125}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,sources:["TargetsTab.vue"],names:[],mappings:";AAqIA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"TargetsTab.vue",sourceRoot:"src/tools/CmdTlmServer",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-card>\n <v-card-title>\n {{ data.length }} Targets\n <v-spacer />\n <v-tooltip bottom :disabled="enterprise && commandAuthority">\n <template v-slot:activator="{ on, attrs }">\n \x3c!-- This is a little weird because it captures all the clicks --\x3e\n \x3c!-- including the clicks on the button so the tooltipHandler --\x3e\n \x3c!-- is also the button handler --\x3e\n <div v-on="on" v-bind="attrs" @click="tooltipHandler(\'takeAll\')">\n <v-btn\n color="primary"\n class="mr-2"\n :disabled="!commandAuthority"\n data-test="take-all"\n >\n Take All Cmd Authority\n <v-icon right> mdi-account-check </v-icon>\n </v-btn>\n </div>\n </template>\n <span v-if="enterprise">\n Command Authority is disabled.<br />Click the button above to navigate\n to the Admin Console / Scopes Tab.\n </span>\n <span v-else>\n Command Authority is Enterprise Only.<br />Click the button above to\n learn more.\n </span>\n </v-tooltip>\n <v-tooltip bottom :disabled="enterprise && commandAuthority">\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs" @click="tooltipHandler(\'releaseAll\')">\n <v-btn\n color="primary"\n class="mr-2"\n :disabled="!commandAuthority"\n data-test="release-all"\n >\n Release All Cmd Authority\n <v-icon right> mdi-account-cancel </v-icon>\n </v-btn>\n </div>\n </template>\n <span v-if="enterprise">\n Command Authority is disabled.<br />Click the button above to navigate\n to the Admin Console / Scopes Tab.\n </span>\n <span v-else>\n Command Authority is Enterprise Only.<br />Click the button above to\n learn more.\n </span>\n </v-tooltip>\n <v-text-field\n v-model="search"\n label="Search"\n prepend-inner-icon="mdi-magnify"\n clearable\n outlined\n dense\n single-line\n hide-details\n class="search"\n />\n </v-card-title>\n <v-data-table\n :headers="headers"\n :items="data"\n :search="search"\n :items-per-page="10"\n :footer-props="{ itemsPerPageOptions: [10, 20, -1] }"\n calculate-widths\n multi-sort\n data-test="targets-table"\n >\n <template v-slot:item.take="{ item }">\n <span v-if="item.name === \'UNKNOWN\'">N/A</span>\n <v-btn\n v-if="item.name != \'UNKNOWN\'"\n block\n color="primary"\n @click="take(item.name)"\n :disabled="!commandAuthority"\n >\n Take\n <v-icon right> mdi-account-check </v-icon>\n </v-btn>\n </template>\n <template v-slot:item.release="{ item }">\n <span v-if="item.name === \'UNKNOWN\'">N/A</span>\n <v-btn\n v-if="item.name != \'UNKNOWN\'"\n block\n color="primary"\n @click="release(item.name)"\n :disabled="!commandAuthority"\n >\n Release\n <v-icon right> mdi-account-cancel </v-icon>\n </v-btn>\n </template>\n </v-data-table>\n <upgrade-to-enterprise-dialog\n v-model="showUpgradeToEnterpriseDialog"\n reason="Command Authority is Enterprise Only"\n ></upgrade-to-enterprise-dialog>\n </v-card>\n</template>\n\n<script>\nimport Api from \'@openc3/tool-common/src/services/api\'\nimport Updater from \'./Updater\'\nimport UpgradeToEnterpriseDialog from \'@openc3/tool-common/src/components/UpgradeToEnterpriseDialog\'\nimport Cable from \'@openc3/tool-common/src/services/cable.js\'\n\nexport default {\n components: {\n UpgradeToEnterpriseDialog,\n },\n mixins: [Updater],\n props: {\n tabId: Number,\n curTab: Number,\n },\n data() {\n return {\n search: \'\',\n data: [],\n cable: new Cable(),\n enterprise: false,\n headers: [\n { text: \'Target Name\', value: \'name\' },\n { text: \'Interfaces\', value: \'interface\' },\n {\n text: \'Command Authority Username\',\n value: \'username\',\n },\n { text: \'Take Command Authority\', value: \'take\' },\n { text: \'Release Command Authority\', value: \'release\' },\n ],\n cmdAuth: {},\n commandAuthority: false,\n showUpgradeToEnterpriseDialog: false,\n }\n },\n created: async function () {\n await Api.get(\'/openc3-api/info\').then((response) => {\n if (response.data.enterprise) {\n this.enterprise = true\n }\n })\n // Populate the table once and then just update the data in the\n // update() method. This ensures the data doesn\'t get deleted\n // on each update which can break takeAll and releaseAll\n this.api.get_target_interfaces().then((info) => {\n for (let x of info) {\n this.data.push({\n name: x[0],\n interface: x[1],\n username: \'\',\n })\n }\n })\n if (this.enterprise) {\n // Get the initial scope setting\n Api.get(`/openc3-api/scopes/${window.openc3Scope}`).then((response) => {\n if (response.data.command_authority) {\n this.commandAuthority = true\n }\n })\n // Get the initial command authority settings\n Api.get(\'/openc3-api/cmdauth\').then((response) => {\n this.cmdAuth = response.data\n })\n // Create a cable to the SystemEventsChannel so we can maintain\n // state with the backend\n this.cable\n .createSubscription(\'SystemEventsChannel\', window.openc3Scope, {\n received: (data) => {\n this.cable.recordPing()\n this.handleMessages(data)\n },\n })\n .then((systemSubscription) => {\n this.systemSubscription = systemSubscription\n })\n }\n },\n destroyed() {\n if (this.systemSubscription) {\n this.systemSubscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n // Enterprise only\n handleMessages(data) {\n data.forEach((message) => {\n let event = JSON.parse(message[\'event\'])\n switch (event.type) {\n case \'scope\':\n if (window.openc3Scope === event.name) {\n this.commandAuthority = event.command_authority\n }\n break\n case \'cmd_auth_take\':\n this.cmdAuth[event.name] = event\n break\n case \'cmd_auth_release\':\n delete this.cmdAuth[event.name]\n break\n // There is also \'role\' but we don\'t care\n }\n })\n },\n tooltipHandler(method) {\n if (this.enterprise) {\n if (this.commandAuthority) {\n this[method]()\n } else {\n window.open(\'/tools/admin/scopes\', \'_blank\')\n }\n } else {\n this.showUpgradeToEnterpriseDialog = true\n }\n },\n update() {\n if (this.tabId != this.curTab) return\n this.api.get_target_interfaces().then(async (info) => {\n for (let i = 0; i < info.length; i++) {\n this.data[i].name = info[i][0]\n this.data[i].interface = info[i][1]\n if (this.enterprise) {\n if (this.cmdAuth[this.data[i].name]) {\n this.data[i].username =\n this.cmdAuth[this.data[i].name][\'username\']\n } else {\n this.data[i].username = \'\'\n }\n }\n }\n })\n },\n take(target_name) {\n Api.post(\'/openc3-api/cmdauth/take\', {\n data: {\n target_name: target_name,\n },\n })\n },\n release(target_name) {\n Api.post(\'/openc3-api/cmdauth/release\', {\n data: {\n target_name: target_name,\n },\n })\n },\n takeAll() {\n Api.post(\'/openc3-api/cmdauth/take-all\')\n },\n releaseAll() {\n Api.post(\'/openc3-api/cmdauth/release-all\')\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"399655963b0cd0738d29fbab82439c7e272bc5df"},l=t[o]||(t[o]={});l[n]&&l[n].hash===e||(l[n]=i);var s=l[n];return y=function(){return s},s}y();const _={components:{UpgradeToEnterpriseDialog:g},mixins:[m.A],props:{tabId:Number,curTab:Number},data(){return y().f[0]++,y().s[0]++,{search:"",data:[],cable:new C.A,enterprise:!1,headers:[{text:"Target Name",value:"name"},{text:"Interfaces",value:"interface"},{text:"Command Authority Username",value:"username"},{text:"Take Command Authority",value:"take"},{text:"Release Command Authority",value:"release"}],cmdAuth:{},commandAuthority:!1,showUpgradeToEnterpriseDialog:!1}},created:async function(){y().f[1]++,y().s[1]++,await u.get("/openc3-api/info").then((n=>{y().f[2]++,y().s[2]++,n.data.enterprise?(y().b[0][0]++,y().s[3]++,this.enterprise=!0):y().b[0][1]++})),y().s[4]++,this.api.get_target_interfaces().then((n=>{y().f[3]++,y().s[5]++;for(let e of n)y().s[6]++,this.data.push({name:e[0],interface:e[1],username:""})})),y().s[7]++,this.enterprise?(y().b[1][0]++,y().s[8]++,u.get(`/openc3-api/scopes/${window.openc3Scope}`).then((n=>{y().f[4]++,y().s[9]++,n.data.command_authority?(y().b[2][0]++,y().s[10]++,this.commandAuthority=!0):y().b[2][1]++})),y().s[11]++,u.get("/openc3-api/cmdauth").then((n=>{y().f[5]++,y().s[12]++,this.cmdAuth=n.data})),y().s[13]++,this.cable.createSubscription("SystemEventsChannel",window.openc3Scope,{received:n=>{y().f[6]++,y().s[14]++,this.cable.recordPing(),y().s[15]++,this.handleMessages(n)}}).then((n=>{y().f[7]++,y().s[16]++,this.systemSubscription=n}))):y().b[1][1]++},destroyed(){y().f[8]++,y().s[17]++,this.systemSubscription?(y().b[3][0]++,y().s[18]++,this.systemSubscription.unsubscribe()):y().b[3][1]++,y().s[19]++,this.cable.disconnect()},methods:{handleMessages(n){y().f[9]++,y().s[20]++,n.forEach((n=>{y().f[10]++;let e=(y().s[21]++,JSON.parse(n["event"]));switch(y().s[22]++,e.type){case"scope":y().b[4][0]++,y().s[23]++,window.openc3Scope===e.name?(y().b[5][0]++,y().s[24]++,this.commandAuthority=e.command_authority):y().b[5][1]++,y().s[25]++;break;case"cmd_auth_take":y().b[4][1]++,y().s[26]++,this.cmdAuth[e.name]=e,y().s[27]++;break;case"cmd_auth_release":y().b[4][2]++,y().s[28]++,delete this.cmdAuth[e.name],y().s[29]++;break}}))},tooltipHandler(n){y().f[11]++,y().s[30]++,this.enterprise?(y().b[6][0]++,y().s[31]++,this.commandAuthority?(y().b[7][0]++,y().s[32]++,this[n]()):(y().b[7][1]++,y().s[33]++,window.open("/tools/admin/scopes","_blank"))):(y().b[6][1]++,y().s[34]++,this.showUpgradeToEnterpriseDialog=!0)},update(){if(y().f[12]++,y().s[35]++,this.tabId!=this.curTab)return y().b[8][0]++,void y().s[36]++;y().b[8][1]++,y().s[37]++,this.api.get_target_interfaces().then((async n=>{y().f[13]++,y().s[38]++;for(let e=(y().s[39]++,0);e<n.length;e++)y().s[40]++,this.data[e].name=n[e][0],y().s[41]++,this.data[e].interface=n[e][1],y().s[42]++,this.enterprise?(y().b[9][0]++,y().s[43]++,this.cmdAuth[this.data[e].name]?(y().b[10][0]++,y().s[44]++,this.data[e].username=this.cmdAuth[this.data[e].name]["username"]):(y().b[10][1]++,y().s[45]++,this.data[e].username="")):y().b[9][1]++}))},take(n){y().f[14]++,y().s[46]++,u.post("/openc3-api/cmdauth/take",{data:{target_name:n}})},release(n){y().f[15]++,y().s[47]++,u.post("/openc3-api/cmdauth/release",{data:{target_name:n}})},takeAll(){y().f[16]++,y().s[48]++,u.post("/openc3-api/cmdauth/take-all")},releaseAll(){y().f[17]++,y().s[49]++,u.post("/openc3-api/cmdauth/release-all")}}},S=_;var k=(0,v.A)(S,i,l,!1,null,null,null);const w=k.exports},254:(n,e,t)=>{"use strict";t.r(e),t.d(e,{default:()=>a});var o=t(6758),i=t.n(o),l=t(935),s=t.n(l),c=s()(i());c.push([n.id,".logo[data-v-4a51dae5]{float:right;margin:15px}.cosmos[data-v-4a51dae5]{text-align:center;font-size:18pt}.reason[data-v-4a51dae5]{font-weight:700}",""]);const a=c},8329:(n,e,t)=>{var o=t(254);o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[n.id,o,""]]),o.locals&&(n.exports=o.locals);var i=t(4825).A;i("3963ec0b",o,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
+ //# sourceMappingURL=625.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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A0B,IAA4B,KAE1DA,EAAwBvS,KAAK,CAACwS,EAAOC,GAAI,qJAAsJ,KAE/L,S,iBCJA,IAAIC,EAAU,EAAQ,KACnBA,EAAQC,aAAYD,EAAUA,EAAQ1H,SACnB,kBAAZ0H,IAAsBA,EAAU,CAAC,CAACF,EAAOC,GAAIC,EAAS,MAC7DA,EAAQE,SAAQJ,EAAOK,QAAUH,EAAQE,QAE5C,IAAIxJ,EAAM,UACGA,EAAI,WAAYsJ,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa,G","sources":["webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/Updater.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/services/cable.js","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/TargetsTab.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/services/api.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/components/UpgradeToEnterpriseDialog.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/components/UpgradeToEnterpriseDialog.vue?c70d","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/components/UpgradeToEnterpriseDialog.vue?dcd4","webpack://@openc3/cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/TargetsTab.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/TargetsTab.vue?527c","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/TargetsTab.vue?3388","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/components/UpgradeToEnterpriseDialog.vue?7345","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/components/UpgradeToEnterpriseDialog.vue?f5c2"],"sourcesContent":["var adapters = {\n logger: typeof console !== \"undefined\" ? console : undefined,\n WebSocket: typeof WebSocket !== \"undefined\" ? WebSocket : undefined\n};\n\nvar logger = {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now());\n adapters.logger.log(\"[ActionCable]\", ...messages);\n }\n }\n};\n\nconst now = () => (new Date).getTime();\n\nconst secondsSince = time => (now() - time) / 1e3;\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this);\n this.connection = connection;\n this.reconnectAttempts = 0;\n }\n start() {\n if (!this.isRunning()) {\n this.startedAt = now();\n delete this.stoppedAt;\n this.startPolling();\n addEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);\n }\n }\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now();\n this.stopPolling();\n removeEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(\"ConnectionMonitor stopped\");\n }\n }\n isRunning() {\n return this.startedAt && !this.stoppedAt;\n }\n recordPing() {\n this.pingedAt = now();\n }\n recordConnect() {\n this.reconnectAttempts = 0;\n this.recordPing();\n delete this.disconnectedAt;\n logger.log(\"ConnectionMonitor recorded connect\");\n }\n recordDisconnect() {\n this.disconnectedAt = now();\n logger.log(\"ConnectionMonitor recorded disconnect\");\n }\n startPolling() {\n this.stopPolling();\n this.poll();\n }\n stopPolling() {\n clearTimeout(this.pollTimeout);\n }\n poll() {\n this.pollTimeout = setTimeout((() => {\n this.reconnectIfStale();\n this.poll();\n }), this.getPollInterval());\n }\n getPollInterval() {\n const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));\n const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;\n const jitter = jitterMax * Math.random();\n return staleThreshold * 1e3 * backoff * (1 + jitter);\n }\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);\n this.reconnectAttempts++;\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);\n } else {\n logger.log(\"ConnectionMonitor reopening\");\n this.connection.reopen();\n }\n }\n }\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt;\n }\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;\n }\n disconnectedRecently() {\n return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;\n }\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout((() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);\n this.connection.reopen();\n }\n }), 200);\n }\n }\n}\n\nConnectionMonitor.staleThreshold = 6;\n\nConnectionMonitor.reconnectionBackoffRate = .15;\n\nvar INTERNAL = {\n message_types: {\n welcome: \"welcome\",\n disconnect: \"disconnect\",\n ping: \"ping\",\n confirmation: \"confirm_subscription\",\n rejection: \"reject_subscription\"\n },\n disconnect_reasons: {\n unauthorized: \"unauthorized\",\n invalid_request: \"invalid_request\",\n server_restart: \"server_restart\",\n remote: \"remote\"\n },\n default_mount_path: \"/cable\",\n protocols: [ \"actioncable-v1-json\", \"actioncable-unsupported\" ]\n};\n\nconst {message_types: message_types, protocols: protocols} = INTERNAL;\n\nconst supportedProtocols = protocols.slice(0, protocols.length - 1);\n\nconst indexOf = [].indexOf;\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this);\n this.consumer = consumer;\n this.subscriptions = this.consumer.subscriptions;\n this.monitor = new ConnectionMonitor(this);\n this.disconnected = true;\n }\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data));\n return true;\n } else {\n return false;\n }\n }\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);\n return false;\n } else {\n const socketProtocols = [ ...protocols, ...this.consumer.subprotocols || [] ];\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${socketProtocols}`);\n if (this.webSocket) {\n this.uninstallEventHandlers();\n }\n this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols);\n this.installEventHandlers();\n this.monitor.start();\n return true;\n }\n }\n close({allowReconnect: allowReconnect} = {\n allowReconnect: true\n }) {\n if (!allowReconnect) {\n this.monitor.stop();\n }\n if (this.isOpen()) {\n return this.webSocket.close();\n }\n }\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`);\n if (this.isActive()) {\n try {\n return this.close();\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error);\n } finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);\n setTimeout(this.open, this.constructor.reopenDelay);\n }\n } else {\n return this.open();\n }\n }\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol;\n }\n }\n isOpen() {\n return this.isState(\"open\");\n }\n isActive() {\n return this.isState(\"open\", \"connecting\");\n }\n triedToReconnect() {\n return this.monitor.reconnectAttempts > 0;\n }\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;\n }\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0;\n }\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase();\n }\n }\n }\n return null;\n }\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this);\n this.webSocket[`on${eventName}`] = handler;\n }\n }\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {};\n }\n }\n}\n\nConnection.reopenDelay = 500;\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) {\n return;\n }\n const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);\n switch (type) {\n case message_types.welcome:\n if (this.triedToReconnect()) {\n this.reconnectAttempted = true;\n }\n this.monitor.recordConnect();\n return this.subscriptions.reload();\n\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`);\n return this.close({\n allowReconnect: reconnect\n });\n\n case message_types.ping:\n return this.monitor.recordPing();\n\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier);\n if (this.reconnectAttempted) {\n this.reconnectAttempted = false;\n return this.subscriptions.notify(identifier, \"connected\", {\n reconnected: true\n });\n } else {\n return this.subscriptions.notify(identifier, \"connected\", {\n reconnected: false\n });\n }\n\n case message_types.rejection:\n return this.subscriptions.reject(identifier);\n\n default:\n return this.subscriptions.notify(identifier, \"received\", message);\n }\n },\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);\n this.disconnected = false;\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\");\n return this.close({\n allowReconnect: false\n });\n }\n },\n close(event) {\n logger.log(\"WebSocket onclose event\");\n if (this.disconnected) {\n return;\n }\n this.disconnected = true;\n this.monitor.recordDisconnect();\n return this.subscriptions.notifyAll(\"disconnected\", {\n willAttemptReconnect: this.monitor.isRunning()\n });\n },\n error() {\n logger.log(\"WebSocket onerror event\");\n }\n};\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key];\n object[key] = value;\n }\n }\n return object;\n};\n\nclass Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer;\n this.identifier = JSON.stringify(params);\n extend(this, mixin);\n }\n perform(action, data = {}) {\n data.action = action;\n return this.send(data);\n }\n send(data) {\n return this.consumer.send({\n command: \"message\",\n identifier: this.identifier,\n data: JSON.stringify(data)\n });\n }\n unsubscribe() {\n return this.consumer.subscriptions.remove(this);\n }\n}\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions;\n this.pendingSubscriptions = [];\n }\n guarantee(subscription) {\n if (this.pendingSubscriptions.indexOf(subscription) == -1) {\n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);\n this.pendingSubscriptions.push(subscription);\n } else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);\n }\n this.startGuaranteeing();\n }\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);\n this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));\n }\n startGuaranteeing() {\n this.stopGuaranteeing();\n this.retrySubscribing();\n }\n stopGuaranteeing() {\n clearTimeout(this.retryTimeout);\n }\n retrySubscribing() {\n this.retryTimeout = setTimeout((() => {\n if (this.subscriptions && typeof this.subscriptions.subscribe === \"function\") {\n this.pendingSubscriptions.map((subscription => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);\n this.subscriptions.subscribe(subscription);\n }));\n }\n }), 500);\n }\n}\n\nclass Subscriptions {\n constructor(consumer) {\n this.consumer = consumer;\n this.guarantor = new SubscriptionGuarantor(this);\n this.subscriptions = [];\n }\n create(channelName, mixin) {\n const channel = channelName;\n const params = typeof channel === \"object\" ? channel : {\n channel: channel\n };\n const subscription = new Subscription(this.consumer, params, mixin);\n return this.add(subscription);\n }\n add(subscription) {\n this.subscriptions.push(subscription);\n this.consumer.ensureActiveConnection();\n this.notify(subscription, \"initialized\");\n this.subscribe(subscription);\n return subscription;\n }\n remove(subscription) {\n this.forget(subscription);\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\");\n }\n return subscription;\n }\n reject(identifier) {\n return this.findAll(identifier).map((subscription => {\n this.forget(subscription);\n this.notify(subscription, \"rejected\");\n return subscription;\n }));\n }\n forget(subscription) {\n this.guarantor.forget(subscription);\n this.subscriptions = this.subscriptions.filter((s => s !== subscription));\n return subscription;\n }\n findAll(identifier) {\n return this.subscriptions.filter((s => s.identifier === identifier));\n }\n reload() {\n return this.subscriptions.map((subscription => this.subscribe(subscription)));\n }\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));\n }\n notify(subscription, callbackName, ...args) {\n let subscriptions;\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription);\n } else {\n subscriptions = [ subscription ];\n }\n return subscriptions.map((subscription => typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined));\n }\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription);\n }\n }\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`);\n this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));\n }\n sendCommand(subscription, command) {\n const {identifier: identifier} = subscription;\n return this.consumer.send({\n command: command,\n identifier: identifier\n });\n }\n}\n\nclass Consumer {\n constructor(url) {\n this._url = url;\n this.subscriptions = new Subscriptions(this);\n this.connection = new Connection(this);\n this.subprotocols = [];\n }\n get url() {\n return createWebSocketURL(this._url);\n }\n send(data) {\n return this.connection.send(data);\n }\n connect() {\n return this.connection.open();\n }\n disconnect() {\n return this.connection.close({\n allowReconnect: false\n });\n }\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open();\n }\n }\n addSubProtocol(subprotocol) {\n this.subprotocols = [ ...this.subprotocols, subprotocol ];\n }\n}\n\nfunction createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url();\n }\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\");\n a.href = url;\n a.href = a.href;\n a.protocol = a.protocol.replace(\"http\", \"ws\");\n return a.href;\n } else {\n return url;\n }\n}\n\nfunction createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url);\n}\n\nfunction getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`);\n if (element) {\n return element.getAttribute(\"content\");\n }\n}\n\nexport { Connection, ConnectionMonitor, Consumer, INTERNAL, Subscription, SubscriptionGuarantor, Subscriptions, adapters, createConsumer, createWebSocketURL, getConfig, logger };\n","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\n\nexport default {\n props: {\n refreshInterval: {\n default: 1000,\n },\n },\n data() {\n return {\n updater: null,\n api: null,\n }\n },\n created() {\n this.api = new OpenC3Api()\n },\n mounted() {\n this.changeUpdater()\n },\n beforeDestroy() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n },\n watch: {\n // eslint-disable-next-line no-unused-vars\n refreshInterval: function (newVal, oldVal) {\n this.changeUpdater()\n },\n },\n methods: {\n changeUpdater() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n this.updater = setInterval(() => {\n this.update()\n }, this.refreshInterval)\n },\n },\n}\n","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n*/\n\nimport * as ActionCable from '@rails/actioncable'\n//ActionCable.logger.enabled = true\nActionCable.ConnectionMonitor.staleThreshold = 10\n\nexport default class Cable {\n constructor(url = '/openc3-api/cable') {\n this._cable = null\n this._url = url\n }\n disconnect() {\n if (this._cable) {\n this._cable.disconnect()\n }\n }\n createSubscription(channel, scope, callbacks = {}, additionalOptions = {}) {\n return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(\n (refreshed) => {\n if (refreshed) {\n OpenC3Auth.setTokens()\n }\n if (this._cable == null) {\n let final_url =\n this._url +\n '?scope=' +\n encodeURIComponent(window.openc3Scope) +\n '&authorization=' +\n encodeURIComponent(localStorage.openc3Token)\n this._cable = ActionCable.createConsumer(final_url)\n }\n return this._cable.subscriptions.create(\n {\n channel,\n ...additionalOptions,\n },\n callbacks,\n )\n },\n )\n }\n recordPing() {\n this._cable.connection.monitor.recordPing()\n }\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-card',[_c('v-card-title',[_vm._v(\"\\n \"+_vm._s(_vm.data.length)+\" Targets\\n \"),_c('v-spacer'),_vm._v(\" \"),_c('v-tooltip',{attrs:{\"bottom\":\"\",\"disabled\":_vm.enterprise && _vm.commandAuthority},scopedSlots:_vm._u([{key:\"activator\",fn:function({ on, attrs }){return [_c('div',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.tooltipHandler('takeAll')}}},'div',attrs,false),on),[_c('v-btn',{staticClass:\"mr-2\",attrs:{\"color\":\"primary\",\"disabled\":!_vm.commandAuthority,\"data-test\":\"take-all\"}},[_vm._v(\"\\n Take All Cmd Authority\\n \"),_c('v-icon',{attrs:{\"right\":\"\"}},[_vm._v(\" mdi-account-check \")])],1)],1)]}}])},[_vm._v(\" \"),(_vm.enterprise)?_c('span',[_vm._v(\"\\n Command Authority is disabled.\"),_c('br'),_vm._v(\"Click the button above to navigate\\n to the Admin Console / Scopes Tab.\\n \")]):_c('span',[_vm._v(\"\\n Command Authority is Enterprise Only.\"),_c('br'),_vm._v(\"Click the button above to\\n learn more.\\n \")])]),_vm._v(\" \"),_c('v-tooltip',{attrs:{\"bottom\":\"\",\"disabled\":_vm.enterprise && _vm.commandAuthority},scopedSlots:_vm._u([{key:\"activator\",fn:function({ on, attrs }){return [_c('div',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.tooltipHandler('releaseAll')}}},'div',attrs,false),on),[_c('v-btn',{staticClass:\"mr-2\",attrs:{\"color\":\"primary\",\"disabled\":!_vm.commandAuthority,\"data-test\":\"release-all\"}},[_vm._v(\"\\n Release All Cmd Authority\\n \"),_c('v-icon',{attrs:{\"right\":\"\"}},[_vm._v(\" mdi-account-cancel \")])],1)],1)]}}])},[_vm._v(\" \"),(_vm.enterprise)?_c('span',[_vm._v(\"\\n Command Authority is disabled.\"),_c('br'),_vm._v(\"Click the button above to navigate\\n to the Admin Console / Scopes Tab.\\n \")]):_c('span',[_vm._v(\"\\n Command Authority is Enterprise Only.\"),_c('br'),_vm._v(\"Click the button above to\\n learn more.\\n \")])]),_vm._v(\" \"),_c('v-text-field',{staticClass:\"search\",attrs:{\"label\":\"Search\",\"prepend-inner-icon\":\"mdi-magnify\",\"clearable\":\"\",\"outlined\":\"\",\"dense\":\"\",\"single-line\":\"\",\"hide-details\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_vm._v(\" \"),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.data,\"search\":_vm.search,\"items-per-page\":10,\"footer-props\":{ itemsPerPageOptions: [10, 20, -1] },\"calculate-widths\":\"\",\"multi-sort\":\"\",\"data-test\":\"targets-table\"},scopedSlots:_vm._u([{key:\"item.take\",fn:function({ item }){return [(item.name === 'UNKNOWN')?_c('span',[_vm._v(\"N/A\")]):_vm._e(),_vm._v(\" \"),(item.name != 'UNKNOWN')?_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"disabled\":!_vm.commandAuthority},on:{\"click\":function($event){return _vm.take(item.name)}}},[_vm._v(\"\\n Take\\n \"),_c('v-icon',{attrs:{\"right\":\"\"}},[_vm._v(\" mdi-account-check \")])],1):_vm._e()]}},{key:\"item.release\",fn:function({ item }){return [(item.name === 'UNKNOWN')?_c('span',[_vm._v(\"N/A\")]):_vm._e(),_vm._v(\" \"),(item.name != 'UNKNOWN')?_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"disabled\":!_vm.commandAuthority},on:{\"click\":function($event){return _vm.release(item.name)}}},[_vm._v(\"\\n Release\\n \"),_c('v-icon',{attrs:{\"right\":\"\"}},[_vm._v(\" mdi-account-cancel \")])],1):_vm._e()]}}])}),_vm._v(\" \"),_c('upgrade-to-enterprise-dialog',{attrs:{\"reason\":\"Command Authority is Enterprise Only\"},model:{value:(_vm.showUpgradeToEnterpriseDialog),callback:function ($$v) {_vm.showUpgradeToEnterpriseDialog=$$v},expression:\"showUpgradeToEnterpriseDialog\"}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n*/\n\nimport axios from './axios.js'\n\nconst request = async function (\n method,\n url,\n {\n data,\n params = {},\n headers,\n noAuth = false,\n noScope = false,\n onUploadProgress = false,\n } = {}\n) {\n if (!noAuth) {\n try {\n let refreshed = await OpenC3Auth.updateToken(\n OpenC3Auth.defaultMinValidity\n )\n if (refreshed) {\n OpenC3Auth.setTokens()\n }\n } catch (error) {\n OpenC3Auth.login()\n }\n headers['Authorization'] = localStorage.openc3Token\n }\n // Everything from the front-end is manual by default\n // The various api methods decide whether to pass the manual\n // flag to the authorize routine\n headers['manual'] = true\n if (!noScope && !params['scope']) {\n params['scope'] = window.openc3Scope\n }\n return axios({\n method,\n url,\n data,\n params,\n headers,\n onUploadProgress,\n })\n}\n\nconst acceptOnlyDefaultHeaders = {\n Accept: 'application/json',\n}\n\nconst fullDefaultHeaders = {\n ...acceptOnlyDefaultHeaders,\n 'Content-Type': 'application/json',\n}\n\nexport default {\n get: function (\n path,\n {\n params,\n headers = acceptOnlyDefaultHeaders,\n noScope,\n noAuth,\n onUploadProgress,\n } = {}\n ) {\n return request('get', path, {\n params,\n headers,\n noScope,\n noAuth,\n onUploadProgress,\n })\n },\n\n put: function (\n path,\n {\n data,\n params,\n headers = fullDefaultHeaders,\n noScope,\n noAuth,\n onUploadProgress,\n } = {}\n ) {\n return request('put', path, {\n data,\n params,\n headers,\n noScope,\n noAuth,\n onUploadProgress,\n })\n },\n\n post: function (\n path,\n {\n data,\n params,\n headers = fullDefaultHeaders,\n noScope,\n noAuth,\n onUploadProgress,\n } = {}\n ) {\n return request('post', path, {\n data,\n params,\n headers,\n noScope,\n noAuth,\n onUploadProgress,\n })\n },\n\n delete: function (\n path,\n {\n params,\n headers = acceptOnlyDefaultHeaders,\n noScope,\n noAuth,\n onUploadProgress,\n } = {}\n ) {\n return request('delete', path, {\n params,\n headers,\n noScope,\n noAuth,\n onUploadProgress,\n })\n },\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-dialog',{attrs:{\"width\":\"650px\"},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-card',[_c('v-system-bar',[_c('v-spacer'),_vm._v(\" \"),_c('span',[_vm._v(\" Upgrade to COSMOS Enterprise Edition \")]),_vm._v(\" \"),_c('v-spacer')],1),_vm._v(\" \"),_c('v-card-text',{staticClass:\"mt-2\"},[_c('div',{staticClass:\"logo\"},[_c('img',{attrs:{\"src\":_vm.logo,\"alt\":\"OpenC3\"}}),_vm._v(\" \"),_c('div',{staticClass:\"cosmos\"},[_vm._v(\"Enterprise Edition\")])]),_vm._v(\" \"),_c('div',{staticClass:\"pb-4\"},[_vm._v(\"\\n Thank you for using the COSMOS Open Source Edition!\\n \")]),_vm._v(\" \"),(_vm.reason)?_c('div',[_c('div',{staticClass:\"pb-4 pl-4 reason\"},[_vm._v(\"\\n \"+_vm._s(_vm.reason)+\"\\n \")])]):_vm._e(),_vm._v(\"\\n COSMOS Enterprise Edition removes all restrictions and offers users with\\n role based access control, scaling on kubernetes, cloud platform\\n support, multiple scopes, Calendar and Autonomic, various integrations\\n with common protocols and hardware, commercial licensing, and much\\n more!\"),_c('br'),_c('br'),_vm._v(\"\\n Learn more at\\n \"),_c('a',{attrs:{\"href\":\"https://openc3.com/enterprise\"}},[_vm._v(\"https://openc3.com/enterprise\")]),_vm._v(\"\\n and help support COSMOS Open Source by supporting our business. Contact\\n us at \"),_c('a',{attrs:{\"href\":\"mailto:support@openc3.com\"}},[_vm._v(\"support@openc3.com\")]),_vm._v(\" for\\n more information about Enterprise Edition, COSMOS training, COSMOS\\n support, and custom COSMOS development.\\n \")]),_vm._v(\" \"),_c('v-card-actions',[_c('v-spacer'),_vm._v(\" \"),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"color\":\"primary\"},on:{\"click\":function($event){_vm.show = !_vm.show}}},[_vm._v(\" Ok \")])],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./UpgradeToEnterpriseDialog.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./UpgradeToEnterpriseDialog.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./UpgradeToEnterpriseDialog.vue?vue&type=template&id=4a51dae5&scoped=true\"\nimport script from \"./UpgradeToEnterpriseDialog.vue?vue&type=script&lang=js\"\nexport * from \"./UpgradeToEnterpriseDialog.vue?vue&type=script&lang=js\"\nimport style0 from \"./UpgradeToEnterpriseDialog.vue?vue&type=style&index=0&id=4a51dae5&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4a51dae5\",\n null\n \n)\n\nexport default component.exports","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n-->\n\n<template>\n <v-card>\n <v-card-title>\n {{ data.length }} Targets\n <v-spacer />\n <v-tooltip bottom :disabled=\"enterprise && commandAuthority\">\n <template v-slot:activator=\"{ on, attrs }\">\n <!-- This is a little weird because it captures all the clicks -->\n <!-- including the clicks on the button so the tooltipHandler -->\n <!-- is also the button handler -->\n <div v-on=\"on\" v-bind=\"attrs\" @click=\"tooltipHandler('takeAll')\">\n <v-btn\n color=\"primary\"\n class=\"mr-2\"\n :disabled=\"!commandAuthority\"\n data-test=\"take-all\"\n >\n Take All Cmd Authority\n <v-icon right> mdi-account-check </v-icon>\n </v-btn>\n </div>\n </template>\n <span v-if=\"enterprise\">\n Command Authority is disabled.<br />Click the button above to navigate\n to the Admin Console / Scopes Tab.\n </span>\n <span v-else>\n Command Authority is Enterprise Only.<br />Click the button above to\n learn more.\n </span>\n </v-tooltip>\n <v-tooltip bottom :disabled=\"enterprise && commandAuthority\">\n <template v-slot:activator=\"{ on, attrs }\">\n <div v-on=\"on\" v-bind=\"attrs\" @click=\"tooltipHandler('releaseAll')\">\n <v-btn\n color=\"primary\"\n class=\"mr-2\"\n :disabled=\"!commandAuthority\"\n data-test=\"release-all\"\n >\n Release All Cmd Authority\n <v-icon right> mdi-account-cancel </v-icon>\n </v-btn>\n </div>\n </template>\n <span v-if=\"enterprise\">\n Command Authority is disabled.<br />Click the button above to navigate\n to the Admin Console / Scopes Tab.\n </span>\n <span v-else>\n Command Authority is Enterprise Only.<br />Click the button above to\n learn more.\n </span>\n </v-tooltip>\n <v-text-field\n v-model=\"search\"\n label=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n clearable\n outlined\n dense\n single-line\n hide-details\n class=\"search\"\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n :items-per-page=\"10\"\n :footer-props=\"{ itemsPerPageOptions: [10, 20, -1] }\"\n calculate-widths\n multi-sort\n data-test=\"targets-table\"\n >\n <template v-slot:item.take=\"{ item }\">\n <span v-if=\"item.name === 'UNKNOWN'\">N/A</span>\n <v-btn\n v-if=\"item.name != 'UNKNOWN'\"\n block\n color=\"primary\"\n @click=\"take(item.name)\"\n :disabled=\"!commandAuthority\"\n >\n Take\n <v-icon right> mdi-account-check </v-icon>\n </v-btn>\n </template>\n <template v-slot:item.release=\"{ item }\">\n <span v-if=\"item.name === 'UNKNOWN'\">N/A</span>\n <v-btn\n v-if=\"item.name != 'UNKNOWN'\"\n block\n color=\"primary\"\n @click=\"release(item.name)\"\n :disabled=\"!commandAuthority\"\n >\n Release\n <v-icon right> mdi-account-cancel </v-icon>\n </v-btn>\n </template>\n </v-data-table>\n <upgrade-to-enterprise-dialog\n v-model=\"showUpgradeToEnterpriseDialog\"\n reason=\"Command Authority is Enterprise Only\"\n ></upgrade-to-enterprise-dialog>\n </v-card>\n</template>\n\n<script>\nimport Api from '@openc3/tool-common/src/services/api'\nimport Updater from './Updater'\nimport UpgradeToEnterpriseDialog from '@openc3/tool-common/src/components/UpgradeToEnterpriseDialog'\nimport Cable from '@openc3/tool-common/src/services/cable.js'\n\nexport default {\n components: {\n UpgradeToEnterpriseDialog,\n },\n mixins: [Updater],\n props: {\n tabId: Number,\n curTab: Number,\n },\n data() {\n return {\n search: '',\n data: [],\n cable: new Cable(),\n enterprise: false,\n headers: [\n { text: 'Target Name', value: 'name' },\n { text: 'Interfaces', value: 'interface' },\n {\n text: 'Command Authority Username',\n value: 'username',\n },\n { text: 'Take Command Authority', value: 'take' },\n { text: 'Release Command Authority', value: 'release' },\n ],\n cmdAuth: {},\n commandAuthority: false,\n showUpgradeToEnterpriseDialog: false,\n }\n },\n created: async function () {\n await Api.get('/openc3-api/info').then((response) => {\n if (response.data.enterprise) {\n this.enterprise = true\n }\n })\n // Populate the table once and then just update the data in the\n // update() method. This ensures the data doesn't get deleted\n // on each update which can break takeAll and releaseAll\n this.api.get_target_interfaces().then((info) => {\n for (let x of info) {\n this.data.push({\n name: x[0],\n interface: x[1],\n username: '',\n })\n }\n })\n if (this.enterprise) {\n // Get the initial scope setting\n Api.get(`/openc3-api/scopes/${window.openc3Scope}`).then((response) => {\n if (response.data.command_authority) {\n this.commandAuthority = true\n }\n })\n // Get the initial command authority settings\n Api.get('/openc3-api/cmdauth').then((response) => {\n this.cmdAuth = response.data\n })\n // Create a cable to the SystemEventsChannel so we can maintain\n // state with the backend\n this.cable\n .createSubscription('SystemEventsChannel', window.openc3Scope, {\n received: (data) => {\n this.cable.recordPing()\n this.handleMessages(data)\n },\n })\n .then((systemSubscription) => {\n this.systemSubscription = systemSubscription\n })\n }\n },\n destroyed() {\n if (this.systemSubscription) {\n this.systemSubscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n // Enterprise only\n handleMessages(data) {\n data.forEach((message) => {\n let event = JSON.parse(message['event'])\n switch (event.type) {\n case 'scope':\n if (window.openc3Scope === event.name) {\n this.commandAuthority = event.command_authority\n }\n break\n case 'cmd_auth_take':\n this.cmdAuth[event.name] = event\n break\n case 'cmd_auth_release':\n delete this.cmdAuth[event.name]\n break\n // There is also 'role' but we don't care\n }\n })\n },\n tooltipHandler(method) {\n if (this.enterprise) {\n if (this.commandAuthority) {\n this[method]()\n } else {\n window.open('/tools/admin/scopes', '_blank')\n }\n } else {\n this.showUpgradeToEnterpriseDialog = true\n }\n },\n update() {\n if (this.tabId != this.curTab) return\n this.api.get_target_interfaces().then(async (info) => {\n for (let i = 0; i < info.length; i++) {\n this.data[i].name = info[i][0]\n this.data[i].interface = info[i][1]\n if (this.enterprise) {\n if (this.cmdAuth[this.data[i].name]) {\n this.data[i].username =\n this.cmdAuth[this.data[i].name]['username']\n } else {\n this.data[i].username = ''\n }\n }\n }\n })\n },\n take(target_name) {\n Api.post('/openc3-api/cmdauth/take', {\n data: {\n target_name: target_name,\n },\n })\n },\n release(target_name) {\n Api.post('/openc3-api/cmdauth/release', {\n data: {\n target_name: target_name,\n },\n })\n },\n takeAll() {\n Api.post('/openc3-api/cmdauth/take-all')\n },\n releaseAll() {\n Api.post('/openc3-api/cmdauth/release-all')\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TargetsTab.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TargetsTab.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./TargetsTab.vue?vue&type=template&id=1db3c819\"\nimport script from \"./TargetsTab.vue?vue&type=script&lang=js\"\nexport * from \"./TargetsTab.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.logo[data-v-4a51dae5]{float:right;margin:15px}.cosmos[data-v-4a51dae5]{text-align:center;font-size:18pt}.reason[data-v-4a51dae5]{font-weight:700}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./UpgradeToEnterpriseDialog.vue?vue&type=style&index=0&id=4a51dae5&prod&scoped=true&lang=css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"3963ec0b\", content, true, {\"sourceMap\":false,\"shadowMode\":false});"],"names":["adapters","logger","console","undefined","WebSocket","log","messages","this","enabled","push","Date","now","getTime","secondsSince","time","ConnectionMonitor","constructor","connection","visibilityDidChange","bind","reconnectAttempts","start","isRunning","startedAt","stoppedAt","startPolling","addEventListener","staleThreshold","stop","stopPolling","removeEventListener","recordPing","pingedAt","recordConnect","disconnectedAt","recordDisconnect","poll","clearTimeout","pollTimeout","setTimeout","reconnectIfStale","getPollInterval","reconnectionBackoffRate","backoff","Math","pow","min","jitterMax","jitter","random","connectionIsStale","refreshedAt","disconnectedRecently","reopen","document","visibilityState","isOpen","INTERNAL","message_types","welcome","disconnect","ping","confirmation","rejection","disconnect_reasons","unauthorized","invalid_request","server_restart","remote","default_mount_path","protocols","supportedProtocols","slice","length","indexOf","Connection","consumer","open","subscriptions","monitor","disconnected","send","data","webSocket","JSON","stringify","isActive","getState","socketProtocols","subprotocols","uninstallEventHandlers","url","installEventHandlers","close","allowReconnect","error","reopenDelay","getProtocol","protocol","isState","triedToReconnect","isProtocolSupported","call","states","state","readyState","toLowerCase","eventName","events","handler","prototype","message","event","identifier","reason","reconnect","type","parse","reconnectAttempted","reload","confirmSubscription","notify","reconnected","reject","notifyAll","willAttemptReconnect","extend","object","properties","key","value","Subscription","params","mixin","perform","action","command","unsubscribe","remove","SubscriptionGuarantor","pendingSubscriptions","guarantee","subscription","startGuaranteeing","forget","filter","s","stopGuaranteeing","retrySubscribing","retryTimeout","subscribe","map","Subscriptions","guarantor","create","channelName","channel","add","ensureActiveConnection","findAll","sendCommand","callbackName","args","Consumer","_url","createWebSocketURL","connect","addSubProtocol","subprotocol","test","a","createElement","href","replace","createConsumer","getConfig","name","element","head","querySelector","getAttribute","cov_18iatml2cn","actualCoverage","props","refreshInterval","default","f","updater","api","created","OpenC3Api","mounted","changeUpdater","beforeDestroy","b","clearInterval","watch","newVal","oldVal","methods","setInterval","update","ActionCable","Cable","_cable","createSubscription","scope","callbacks","additionalOptions","OpenC3Auth","updateToken","defaultMinValidity","then","refreshed","setTokens","final_url","encodeURIComponent","window","openc3Scope","localStorage","openc3Token","cov_28up2yifcw","render","_vm","_c","_self","_v","_s","attrs","enterprise","commandAuthority","scopedSlots","_u","fn","on","_g","_b","$event","tooltipHandler","staticClass","model","search","callback","$$v","expression","headers","itemsPerPageOptions","item","_e","take","release","showUpgradeToEnterpriseDialog","staticRenderFns","request","async","method","noAuth","noScope","onUploadProgress","login","axios","acceptOnlyDefaultHeaders","Accept","fullDefaultHeaders","get","path","put","post","delete","show","logo","Boolean","String","computed","set","$emit","component","components","UpgradeToEnterpriseDialog","mixins","Updater","tabId","Number","curTab","cable","text","cmdAuth","Api","response","get_target_interfaces","info","x","interface","username","command_authority","received","handleMessages","systemSubscription","destroyed","forEach","i","target_name","takeAll","releaseAll","___CSS_LOADER_EXPORT___","module","id","content","__esModule","locals","exports"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]=self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]||[]).push([[739],{8474:(n,e,l)=>{l.d(e,{A:()=>c});var t=l(2904);function o(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",e="4a33e65af05f7d08e216a604150e8920749ac334",l=new Function("return this")(),t="__coverage__",c={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",statementMap:{0:{start:{line:32,column:4},end:{line:35,column:5}},1:{start:{line:38,column:4},end:{line:38,column:30}},2:{start:{line:41,column:4},end:{line:41,column:24}},3:{start:{line:44,column:4},end:{line:47,column:5}},4:{start:{line:45,column:6},end:{line:45,column:33}},5:{start:{line:46,column:6},end:{line:46,column:25}},6:{start:{line:52,column:6},end:{line:52,column:26}},7:{start:{line:57,column:6},end:{line:60,column:7}},8:{start:{line:58,column:8},end:{line:58,column:35}},9:{start:{line:59,column:8},end:{line:59,column:27}},10:{start:{line:61,column:6},end:{line:63,column:30}},11:{start:{line:62,column:8},end:{line:62,column:21}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:9},end:{line:36,column:3}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:37,column:2},end:{line:37,column:3}},loc:{start:{line:37,column:12},end:{line:39,column:3}},line:37},2:{name:"(anonymous_2)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:12},end:{line:42,column:3}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:18},end:{line:48,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:51,column:21},end:{line:51,column:22}},loc:{start:{line:51,column:47},end:{line:53,column:5}},line:51},5:{name:"(anonymous_5)",decl:{start:{line:56,column:4},end:{line:56,column:5}},loc:{start:{line:56,column:20},end:{line:64,column:5}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:61,column:33},end:{line:61,column:34}},loc:{start:{line:61,column:39},end:{line:63,column:7}},line:61}},branchMap:{0:{loc:{start:{line:44,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},1:{loc:{start:{line:57,column:6},end:{line:60,column:7}},type:"if",locations:[{start:{line:57,column:6},end:{line:60,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4a33e65af05f7d08e216a604150e8920749ac334"},i=l[t]||(l[t]={});i[n]&&i[n].hash===e||(i[n]=c);var s=i[n];return o=function(){return s},s}o();const c={props:{refreshInterval:{default:1e3}},data(){return o().f[0]++,o().s[0]++,{updater:null,api:null}},created(){o().f[1]++,o().s[1]++,this.api=new t.x},mounted(){o().f[2]++,o().s[2]++,this.changeUpdater()},beforeDestroy(){o().f[3]++,o().s[3]++,null!=this.updater?(o().b[0][0]++,o().s[4]++,clearInterval(this.updater),o().s[5]++,this.updater=null):o().b[0][1]++},watch:{refreshInterval:function(n,e){o().f[4]++,o().s[6]++,this.changeUpdater()}},methods:{changeUpdater(){o().f[5]++,o().s[7]++,null!=this.updater?(o().b[1][0]++,o().s[8]++,clearInterval(this.updater),o().s[9]++,this.updater=null):o().b[1][1]++,o().s[10]++,this.updater=setInterval((()=>{o().f[6]++,o().s[11]++,this.update()}),this.refreshInterval)}}}},8739:(n,e,l)=>{function t(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",e="8915727e9b094fafdcf9c7e8d649d79fc9bc86cc",l=new Function("return this")(),o="__coverage__",c={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:1158}},4:{start:{line:1,column:413},end:{line:1,column:427}},5:{start:{line:1,column:786},end:{line:1,column:997}},6:{start:{line:1,column:903},end:{line:1,column:937}},7:{start:{line:1,column:1044},end:{line:1,column:1148}},8:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:397},end:{line:1,column:398}},loc:{start:{line:1,column:412},end:{line:1,column:428}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:767},end:{line:1,column:768}},loc:{start:{line:1,column:785},end:{line:1,column:998}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:886},end:{line:1,column:887}},loc:{start:{line:1,column:902},end:{line:1,column:938}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1025},end:{line:1,column:1026}},loc:{start:{line:1,column:1043},end:{line:1,column:1149}},line:1}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0,4:0},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8915727e9b094fafdcf9c7e8d649d79fc9bc86cc"},i=l[o]||(l[o]={});i[n]&&i[n].hash===e||(i[n]=c);var s=i[n];return t=function(){return s},s}l.r(e),l.d(e,{default:()=>A}),t(),t().s[0]++;var o=function(){t().f[0]++;var n=(t().s[1]++,this),e=(t().s[2]++,n._self._c);return t().s[3]++,e("v-card",[e("v-card-title",[n._v("\n "+n._s(n.data.length)+" Interfaces\n "),e("v-spacer"),n._v(" "),e("v-text-field",{staticClass:"search",attrs:{label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",outlined:"",dense:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){t().f[1]++,t().s[4]++,n.search=e},expression:"search"}})],1),n._v(" "),e("v-data-table",{attrs:{headers:n.headers,items:n.data,search:n.search,"custom-sort":n.sortTable,"items-per-page":10,"footer-props":{itemsPerPageOptions:[10,20,-1]},"calculate-widths":"","multi-sort":"","data-test":"interfaces-table"},scopedSlots:n._u([{key:"item.connect",fn:function({item:l}){return t().f[2]++,t().s[5]++,[e("v-btn",{attrs:{block:"",color:"primary",disabled:n.buttonsDisabled},on:{click:function(e){return t().f[3]++,t().s[6]++,n.connectDisconnect(l)}}},[n._v("\n "+n._s(l.connect)+"\n ")])]}},{key:"item.connected",fn:function({item:l}){return t().f[4]++,t().s[7]++,[e("span",{class:l.connectedClass},[n._v("\n "+n._s(l.connected)+"\n ")])]}}])})],1)},c=(t().s[8]++,[]),i=(l(9375),l(7010),l(8474));function s(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",e="e8a5f30ad10450c8afd05dd883ff17b1464f9013",l=new Function("return this")(),t="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",statementMap:{0:{start:{line:11,column:4},end:{line:32,column:5}},1:{start:{line:37,column:6},end:{line:84,column:8}},2:{start:{line:38,column:8},end:{line:83,column:9}},3:{start:{line:38,column:21},end:{line:38,column:22}},4:{start:{line:39,column:23},end:{line:39,column:31}},5:{start:{line:40,column:21},end:{line:40,column:30}},6:{start:{line:42,column:10},end:{line:82,column:11}},7:{start:{line:44,column:12},end:{line:46,column:13}},8:{start:{line:45,column:14},end:{line:45,column:22}},9:{start:{line:47,column:12},end:{line:59,column:13}},10:{start:{line:48,column:14},end:{line:52,column:15}},11:{start:{line:49,column:16},end:{line:49,column:25}},12:{start:{line:51,column:16},end:{line:51,column:24}},13:{start:{line:54,column:14},end:{line:58,column:15}},14:{start:{line:55,column:16},end:{line:55,column:24}},15:{start:{line:57,column:16},end:{line:57,column:25}},16:{start:{line:60,column:17},end:{line:82,column:11}},17:{start:{line:62,column:12},end:{line:64,column:13}},18:{start:{line:63,column:14},end:{line:63,column:22}},19:{start:{line:65,column:12},end:{line:70,column:13}},20:{start:{line:67,column:14},end:{line:67,column:55}},21:{start:{line:69,column:14},end:{line:69,column:55}},22:{start:{line:73,column:12},end:{line:75,column:13}},23:{start:{line:74,column:14},end:{line:74,column:22}},24:{start:{line:76,column:12},end:{line:81,column:13}},25:{start:{line:78,column:14},end:{line:78,column:42}},26:{start:{line:80,column:14},end:{line:80,column:42}},27:{start:{line:85,column:6},end:{line:85,column:18}},28:{start:{line:88,column:6},end:{line:88,column:33}},29:{start:{line:89,column:6},end:{line:93,column:7}},30:{start:{line:90,column:8},end:{line:90,column:45}},31:{start:{line:92,column:8},end:{line:92,column:48}},32:{start:{line:96,column:6},end:{line:96,column:43}},33:{start:{line:96,column:37},end:{line:96,column:43}},34:{start:{line:97,column:6},end:{line:127,column:8}},35:{start:{line:98,column:8},end:{line:98,column:22}},36:{start:{line:99,column:8},end:{line:125,column:9}},37:{start:{line:100,column:24},end:{line:100,column:28}},38:{start:{line:101,column:31},end:{line:101,column:35}},39:{start:{line:102,column:10},end:{line:111,column:11}},40:{start:{line:103,column:12},end:{line:103,column:31}},41:{start:{line:104,column:12},end:{line:104,column:43}},42:{start:{line:105,column:17},end:{line:111,column:11}},43:{start:{line:106,column:12},end:{line:106,column:34}},44:{start:{line:107,column:12},end:{line:107,column:43}},45:{start:{line:109,column:12},end:{line:109,column:30}},46:{start:{line:110,column:12},end:{line:110,column:41}},47:{start:{line:112,column:10},end:{line:124,column:12}},48:{start:{line:126,column:8},end:{line:126,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:9},end:{line:33,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:36,column:4},end:{line:36,column:5}},loc:{start:{line:36,column:36},end:{line:86,column:5}},line:36},2:{name:"(anonymous_2)",decl:{start:{line:37,column:17},end:{line:37,column:18}},loc:{start:{line:37,column:27},end:{line:84,column:7}},line:37},3:{name:"(anonymous_3)",decl:{start:{line:87,column:4},end:{line:87,column:5}},loc:{start:{line:87,column:28},end:{line:94,column:5}},line:87},4:{name:"(anonymous_4)",decl:{start:{line:95,column:4},end:{line:95,column:5}},loc:{start:{line:95,column:13},end:{line:128,column:5}},line:95},5:{name:"(anonymous_5)",decl:{start:{line:97,column:45},end:{line:97,column:46}},loc:{start:{line:97,column:55},end:{line:127,column:7}},line:97}},branchMap:{0:{loc:{start:{line:42,column:10},end:{line:82,column:11}},type:"if",locations:[{start:{line:42,column:10},end:{line:82,column:11}},{start:{line:60,column:17},end:{line:82,column:11}}],line:42},1:{loc:{start:{line:44,column:12},end:{line:46,column:13}},type:"if",locations:[{start:{line:44,column:12},end:{line:46,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},2:{loc:{start:{line:47,column:12},end:{line:59,column:13}},type:"if",locations:[{start:{line:47,column:12},end:{line:59,column:13}},{start:{line:53,column:19},end:{line:59,column:13}}],line:47},3:{loc:{start:{line:48,column:14},end:{line:52,column:15}},type:"if",locations:[{start:{line:48,column:14},end:{line:52,column:15}},{start:{line:50,column:21},end:{line:52,column:15}}],line:48},4:{loc:{start:{line:54,column:14},end:{line:58,column:15}},type:"if",locations:[{start:{line:54,column:14},end:{line:58,column:15}},{start:{line:56,column:21},end:{line:58,column:15}}],line:54},5:{loc:{start:{line:60,column:17},end:{line:82,column:11}},type:"if",locations:[{start:{line:60,column:17},end:{line:82,column:11}},{start:{line:71,column:17},end:{line:82,column:11}}],line:60},6:{loc:{start:{line:62,column:12},end:{line:64,column:13}},type:"if",locations:[{start:{line:62,column:12},end:{line:64,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},7:{loc:{start:{line:65,column:12},end:{line:70,column:13}},type:"if",locations:[{start:{line:65,column:12},end:{line:70,column:13}},{start:{line:68,column:19},end:{line:70,column:13}}],line:65},8:{loc:{start:{line:73,column:12},end:{line:75,column:13}},type:"if",locations:[{start:{line:73,column:12},end:{line:75,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:73},9:{loc:{start:{line:76,column:12},end:{line:81,column:13}},type:"if",locations:[{start:{line:76,column:12},end:{line:81,column:13}},{start:{line:79,column:19},end:{line:81,column:13}}],line:76},10:{loc:{start:{line:89,column:6},end:{line:93,column:7}},type:"if",locations:[{start:{line:89,column:6},end:{line:93,column:7}},{start:{line:91,column:13},end:{line:93,column:7}}],line:89},11:{loc:{start:{line:96,column:6},end:{line:96,column:43}},type:"if",locations:[{start:{line:96,column:6},end:{line:96,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:96},12:{loc:{start:{line:102,column:10},end:{line:111,column:11}},type:"if",locations:[{start:{line:102,column:10},end:{line:111,column:11}},{start:{line:105,column:17},end:{line:111,column:11}}],line:102},13:{loc:{start:{line:105,column:17},end:{line:111,column:11}},type:"if",locations:[{start:{line:105,column:17},end:{line:111,column:11}},{start:{line:108,column:17},end:{line:111,column:11}}],line:105}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0]},inputSourceMap:{version:3,sources:["InterfacesTab.vue"],names:[],mappings:";AAsEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"InterfacesTab.vue",sourceRoot:"src/tools/CmdTlmServer",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-card>\n <v-card-title>\n {{ data.length }} Interfaces\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n label=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n clearable\n outlined\n dense\n single-line\n hide-details\n class=\"search\"\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n :custom-sort=\"sortTable\"\n :items-per-page=\"10\"\n :footer-props=\"{ itemsPerPageOptions: [10, 20, -1] }\"\n calculate-widths\n multi-sort\n data-test=\"interfaces-table\"\n >\n <template v-slot:item.connect=\"{ item }\">\n <v-btn\n block\n color=\"primary\"\n :disabled=\"buttonsDisabled\"\n @click=\"connectDisconnect(item)\"\n >\n {{ item.connect }}\n </v-btn>\n </template>\n <template v-slot:item.connected=\"{ item }\">\n <span :class=\"item.connectedClass\">\n {{ item.connected }}\n </span>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport Updater from './Updater'\n\nexport default {\n mixins: [Updater],\n props: {\n tabId: Number,\n curTab: Number,\n },\n data() {\n return {\n search: '',\n data: [],\n buttonsDisabled: false,\n headers: [\n { text: 'Name', value: 'name' },\n {\n text: 'Action',\n value: 'connect',\n sortable: false,\n filterable: false,\n },\n { text: 'Connected', value: 'connected' },\n { text: 'Clients', value: 'clients' },\n { text: 'Tx Q', value: 'tx_q_size' },\n { text: 'Rx Q', value: 'rx_q_size' },\n { text: 'Tx bytes', value: 'tx_bytes' },\n { text: 'Rx bytes', value: 'rx_bytes' },\n { text: 'Cmd pkts', value: 'cmd_pkts' },\n { text: 'Tlm pkts', value: 'tlm_pkts' },\n ],\n }\n },\n methods: {\n // Custom sort algorithm to allow the connected column to be sorted by CONNECTED first\n sortTable(items, index, isDesc) {\n items.sort((a, b) => {\n for (let i = 0; i < index.length; i++) {\n let column = index[i]\n let desc = isDesc[i]\n\n if (column === 'connected') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n if (a[column] === 'CONNECTED') {\n return -1\n } else {\n return 1\n }\n } else {\n if (a[column] === 'CONNECTED') {\n return 1\n } else {\n return -1\n }\n }\n } else if (column === 'name') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // Strings so use localeCompare to sort\n return a[column].localeCompare(b[column])\n } else {\n return b[column].localeCompare(a[column])\n }\n } else {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // The rest of the columns are numbers so just subtract to sort\n return a[column] - b[column]\n } else {\n return b[column] - a[column]\n }\n }\n }\n })\n return items\n },\n connectDisconnect(item) {\n this.buttonsDisabled = true\n if (item.connected === 'DISCONNECTED') {\n this.api.connect_interface(item.name)\n } else {\n this.api.disconnect_interface(item.name)\n }\n },\n update() {\n if (this.tabId != this.curTab) return\n this.api.get_all_interface_info().then((info) => {\n this.data = [] // Clear the old data\n for (let int of info) {\n let connect = null\n let connectedClass = null\n if (int[1] == 'DISCONNECTED') {\n connect = 'Connect'\n connectedClass = 'openc3-white'\n } else if (int[1] == 'CONNECTED') {\n connect = 'Disconnect'\n connectedClass = 'openc3-green'\n } else {\n connect = 'Cancel'\n connectedClass = 'openc3-red'\n }\n this.data.push({\n name: int[0],\n connect: connect,\n connectedClass: connectedClass,\n connected: int[1],\n clients: int[2],\n tx_q_size: int[3],\n rx_q_size: int[4],\n tx_bytes: int[5],\n rx_bytes: int[6],\n cmd_pkts: int[7],\n tlm_pkts: int[8],\n })\n }\n this.buttonsDisabled = false\n })\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e8a5f30ad10450c8afd05dd883ff17b1464f9013"},c=l[t]||(l[t]={});c[n]&&c[n].hash===e||(c[n]=o);var i=c[n];return s=function(){return i},i}s();const a={mixins:[i.A],props:{tabId:Number,curTab:Number},data(){return s().f[0]++,s().s[0]++,{search:"",data:[],buttonsDisabled:!1,headers:[{text:"Name",value:"name"},{text:"Action",value:"connect",sortable:!1,filterable:!1},{text:"Connected",value:"connected"},{text:"Clients",value:"clients"},{text:"Tx Q",value:"tx_q_size"},{text:"Rx Q",value:"rx_q_size"},{text:"Tx bytes",value:"tx_bytes"},{text:"Rx bytes",value:"rx_bytes"},{text:"Cmd pkts",value:"cmd_pkts"},{text:"Tlm pkts",value:"tlm_pkts"}]}},methods:{sortTable(n,e,l){return s().f[1]++,s().s[1]++,n.sort(((n,t)=>{s().f[2]++,s().s[2]++;for(let o=(s().s[3]++,0);o<e.length;o++){let c=(s().s[4]++,e[o]),i=(s().s[5]++,l[o]);if(s().s[6]++,"connected"===c){if(s().b[0][0]++,s().s[7]++,n[c]===t[c]){s().b[1][0]++,s().s[8]++;continue}return s().b[1][1]++,s().s[9]++,i?(s().b[2][1]++,s().s[13]++,"CONNECTED"===n[c]?(s().b[4][0]++,s().s[14]++,1):(s().b[4][1]++,s().s[15]++,-1)):(s().b[2][0]++,s().s[10]++,"CONNECTED"===n[c]?(s().b[3][0]++,s().s[11]++,-1):(s().b[3][1]++,s().s[12]++,1))}if(s().b[0][1]++,s().s[16]++,"name"===c){if(s().b[5][0]++,s().s[17]++,n[c]===t[c]){s().b[6][0]++,s().s[18]++;continue}return s().b[6][1]++,s().s[19]++,i?(s().b[7][1]++,s().s[21]++,t[c].localeCompare(n[c])):(s().b[7][0]++,s().s[20]++,n[c].localeCompare(t[c]))}if(s().b[5][1]++,s().s[22]++,n[c]!==t[c])return s().b[8][1]++,s().s[24]++,i?(s().b[9][1]++,s().s[26]++,t[c]-n[c]):(s().b[9][0]++,s().s[25]++,n[c]-t[c]);s().b[8][0]++,s().s[23]++}})),s().s[27]++,n},connectDisconnect(n){s().f[3]++,s().s[28]++,this.buttonsDisabled=!0,s().s[29]++,"DISCONNECTED"===n.connected?(s().b[10][0]++,s().s[30]++,this.api.connect_interface(n.name)):(s().b[10][1]++,s().s[31]++,this.api.disconnect_interface(n.name))},update(){if(s().f[4]++,s().s[32]++,this.tabId!=this.curTab)return s().b[11][0]++,void s().s[33]++;s().b[11][1]++,s().s[34]++,this.api.get_all_interface_info().then((n=>{s().f[5]++,s().s[35]++,this.data=[],s().s[36]++;for(let e of n){let n=(s().s[37]++,null),l=(s().s[38]++,null);s().s[39]++,"DISCONNECTED"==e[1]?(s().b[12][0]++,s().s[40]++,n="Connect",s().s[41]++,l="openc3-white"):(s().b[12][1]++,s().s[42]++,"CONNECTED"==e[1]?(s().b[13][0]++,s().s[43]++,n="Disconnect",s().s[44]++,l="openc3-green"):(s().b[13][1]++,s().s[45]++,n="Cancel",s().s[46]++,l="openc3-red")),s().s[47]++,this.data.push({name:e[0],connect:n,connectedClass:l,connected:e[1],clients:e[2],tx_q_size:e[3],rx_q_size:e[4],tx_bytes:e[5],rx_bytes:e[6],cmd_pkts:e[7],tlm_pkts:e[8]})}s().s[48]++,this.buttonsDisabled=!1}))}}},u=a;var m=l(2401),r=(0,m.A)(u,o,c,!1,null,null,null);const A=r.exports}}]);
1
+ "use strict";(self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]=self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]||[]).push([[739],{8474:(n,e,l)=>{l.d(e,{A:()=>c});var t=l(4364);function o(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",e="4a33e65af05f7d08e216a604150e8920749ac334",l=new Function("return this")(),t="__coverage__",c={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",statementMap:{0:{start:{line:32,column:4},end:{line:35,column:5}},1:{start:{line:38,column:4},end:{line:38,column:30}},2:{start:{line:41,column:4},end:{line:41,column:24}},3:{start:{line:44,column:4},end:{line:47,column:5}},4:{start:{line:45,column:6},end:{line:45,column:33}},5:{start:{line:46,column:6},end:{line:46,column:25}},6:{start:{line:52,column:6},end:{line:52,column:26}},7:{start:{line:57,column:6},end:{line:60,column:7}},8:{start:{line:58,column:8},end:{line:58,column:35}},9:{start:{line:59,column:8},end:{line:59,column:27}},10:{start:{line:61,column:6},end:{line:63,column:30}},11:{start:{line:62,column:8},end:{line:62,column:21}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:9},end:{line:36,column:3}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:37,column:2},end:{line:37,column:3}},loc:{start:{line:37,column:12},end:{line:39,column:3}},line:37},2:{name:"(anonymous_2)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:12},end:{line:42,column:3}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:18},end:{line:48,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:51,column:21},end:{line:51,column:22}},loc:{start:{line:51,column:47},end:{line:53,column:5}},line:51},5:{name:"(anonymous_5)",decl:{start:{line:56,column:4},end:{line:56,column:5}},loc:{start:{line:56,column:20},end:{line:64,column:5}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:61,column:33},end:{line:61,column:34}},loc:{start:{line:61,column:39},end:{line:63,column:7}},line:61}},branchMap:{0:{loc:{start:{line:44,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},1:{loc:{start:{line:57,column:6},end:{line:60,column:7}},type:"if",locations:[{start:{line:57,column:6},end:{line:60,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4a33e65af05f7d08e216a604150e8920749ac334"},i=l[t]||(l[t]={});i[n]&&i[n].hash===e||(i[n]=c);var s=i[n];return o=function(){return s},s}o();const c={props:{refreshInterval:{default:1e3}},data(){return o().f[0]++,o().s[0]++,{updater:null,api:null}},created(){o().f[1]++,o().s[1]++,this.api=new t.x},mounted(){o().f[2]++,o().s[2]++,this.changeUpdater()},beforeDestroy(){o().f[3]++,o().s[3]++,null!=this.updater?(o().b[0][0]++,o().s[4]++,clearInterval(this.updater),o().s[5]++,this.updater=null):o().b[0][1]++},watch:{refreshInterval:function(n,e){o().f[4]++,o().s[6]++,this.changeUpdater()}},methods:{changeUpdater(){o().f[5]++,o().s[7]++,null!=this.updater?(o().b[1][0]++,o().s[8]++,clearInterval(this.updater),o().s[9]++,this.updater=null):o().b[1][1]++,o().s[10]++,this.updater=setInterval((()=>{o().f[6]++,o().s[11]++,this.update()}),this.refreshInterval)}}}},8739:(n,e,l)=>{function t(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",e="8915727e9b094fafdcf9c7e8d649d79fc9bc86cc",l=new Function("return this")(),o="__coverage__",c={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",statementMap:{0:{start:{line:1,column:13},end:{line:2,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:1,column:1158}},4:{start:{line:1,column:413},end:{line:1,column:427}},5:{start:{line:1,column:786},end:{line:1,column:997}},6:{start:{line:1,column:903},end:{line:1,column:937}},7:{start:{line:1,column:1044},end:{line:1,column:1148}},8:{start:{line:3,column:22},end:{line:3,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:2,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:397},end:{line:1,column:398}},loc:{start:{line:1,column:412},end:{line:1,column:428}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:767},end:{line:1,column:768}},loc:{start:{line:1,column:785},end:{line:1,column:998}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:886},end:{line:1,column:887}},loc:{start:{line:1,column:902},end:{line:1,column:938}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:1025},end:{line:1,column:1026}},loc:{start:{line:1,column:1043},end:{line:1,column:1149}},line:1}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0,4:0},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8915727e9b094fafdcf9c7e8d649d79fc9bc86cc"},i=l[o]||(l[o]={});i[n]&&i[n].hash===e||(i[n]=c);var s=i[n];return t=function(){return s},s}l.r(e),l.d(e,{default:()=>A}),t(),t().s[0]++;var o=function(){t().f[0]++;var n=(t().s[1]++,this),e=(t().s[2]++,n._self._c);return t().s[3]++,e("v-card",[e("v-card-title",[n._v("\n "+n._s(n.data.length)+" Interfaces\n "),e("v-spacer"),n._v(" "),e("v-text-field",{staticClass:"search",attrs:{label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",outlined:"",dense:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){t().f[1]++,t().s[4]++,n.search=e},expression:"search"}})],1),n._v(" "),e("v-data-table",{attrs:{headers:n.headers,items:n.data,search:n.search,"custom-sort":n.sortTable,"items-per-page":10,"footer-props":{itemsPerPageOptions:[10,20,-1]},"calculate-widths":"","multi-sort":"","data-test":"interfaces-table"},scopedSlots:n._u([{key:"item.connect",fn:function({item:l}){return t().f[2]++,t().s[5]++,[e("v-btn",{attrs:{block:"",color:"primary",disabled:n.buttonsDisabled},on:{click:function(e){return t().f[3]++,t().s[6]++,n.connectDisconnect(l)}}},[n._v("\n "+n._s(l.connect)+"\n ")])]}},{key:"item.connected",fn:function({item:l}){return t().f[4]++,t().s[7]++,[e("span",{class:l.connectedClass},[n._v("\n "+n._s(l.connected)+"\n ")])]}}])})],1)},c=(t().s[8]++,[]),i=(l(9375),l(8474));function s(){var n="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",e="e8a5f30ad10450c8afd05dd883ff17b1464f9013",l=new Function("return this")(),t="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue",statementMap:{0:{start:{line:11,column:4},end:{line:32,column:5}},1:{start:{line:37,column:6},end:{line:84,column:8}},2:{start:{line:38,column:8},end:{line:83,column:9}},3:{start:{line:38,column:21},end:{line:38,column:22}},4:{start:{line:39,column:23},end:{line:39,column:31}},5:{start:{line:40,column:21},end:{line:40,column:30}},6:{start:{line:42,column:10},end:{line:82,column:11}},7:{start:{line:44,column:12},end:{line:46,column:13}},8:{start:{line:45,column:14},end:{line:45,column:22}},9:{start:{line:47,column:12},end:{line:59,column:13}},10:{start:{line:48,column:14},end:{line:52,column:15}},11:{start:{line:49,column:16},end:{line:49,column:25}},12:{start:{line:51,column:16},end:{line:51,column:24}},13:{start:{line:54,column:14},end:{line:58,column:15}},14:{start:{line:55,column:16},end:{line:55,column:24}},15:{start:{line:57,column:16},end:{line:57,column:25}},16:{start:{line:60,column:17},end:{line:82,column:11}},17:{start:{line:62,column:12},end:{line:64,column:13}},18:{start:{line:63,column:14},end:{line:63,column:22}},19:{start:{line:65,column:12},end:{line:70,column:13}},20:{start:{line:67,column:14},end:{line:67,column:55}},21:{start:{line:69,column:14},end:{line:69,column:55}},22:{start:{line:73,column:12},end:{line:75,column:13}},23:{start:{line:74,column:14},end:{line:74,column:22}},24:{start:{line:76,column:12},end:{line:81,column:13}},25:{start:{line:78,column:14},end:{line:78,column:42}},26:{start:{line:80,column:14},end:{line:80,column:42}},27:{start:{line:85,column:6},end:{line:85,column:18}},28:{start:{line:88,column:6},end:{line:88,column:33}},29:{start:{line:89,column:6},end:{line:93,column:7}},30:{start:{line:90,column:8},end:{line:90,column:45}},31:{start:{line:92,column:8},end:{line:92,column:48}},32:{start:{line:96,column:6},end:{line:96,column:43}},33:{start:{line:96,column:37},end:{line:96,column:43}},34:{start:{line:97,column:6},end:{line:127,column:8}},35:{start:{line:98,column:8},end:{line:98,column:22}},36:{start:{line:99,column:8},end:{line:125,column:9}},37:{start:{line:100,column:24},end:{line:100,column:28}},38:{start:{line:101,column:31},end:{line:101,column:35}},39:{start:{line:102,column:10},end:{line:111,column:11}},40:{start:{line:103,column:12},end:{line:103,column:31}},41:{start:{line:104,column:12},end:{line:104,column:43}},42:{start:{line:105,column:17},end:{line:111,column:11}},43:{start:{line:106,column:12},end:{line:106,column:34}},44:{start:{line:107,column:12},end:{line:107,column:43}},45:{start:{line:109,column:12},end:{line:109,column:30}},46:{start:{line:110,column:12},end:{line:110,column:41}},47:{start:{line:112,column:10},end:{line:124,column:12}},48:{start:{line:126,column:8},end:{line:126,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:9},end:{line:33,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:36,column:4},end:{line:36,column:5}},loc:{start:{line:36,column:36},end:{line:86,column:5}},line:36},2:{name:"(anonymous_2)",decl:{start:{line:37,column:17},end:{line:37,column:18}},loc:{start:{line:37,column:27},end:{line:84,column:7}},line:37},3:{name:"(anonymous_3)",decl:{start:{line:87,column:4},end:{line:87,column:5}},loc:{start:{line:87,column:28},end:{line:94,column:5}},line:87},4:{name:"(anonymous_4)",decl:{start:{line:95,column:4},end:{line:95,column:5}},loc:{start:{line:95,column:13},end:{line:128,column:5}},line:95},5:{name:"(anonymous_5)",decl:{start:{line:97,column:45},end:{line:97,column:46}},loc:{start:{line:97,column:55},end:{line:127,column:7}},line:97}},branchMap:{0:{loc:{start:{line:42,column:10},end:{line:82,column:11}},type:"if",locations:[{start:{line:42,column:10},end:{line:82,column:11}},{start:{line:60,column:17},end:{line:82,column:11}}],line:42},1:{loc:{start:{line:44,column:12},end:{line:46,column:13}},type:"if",locations:[{start:{line:44,column:12},end:{line:46,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},2:{loc:{start:{line:47,column:12},end:{line:59,column:13}},type:"if",locations:[{start:{line:47,column:12},end:{line:59,column:13}},{start:{line:53,column:19},end:{line:59,column:13}}],line:47},3:{loc:{start:{line:48,column:14},end:{line:52,column:15}},type:"if",locations:[{start:{line:48,column:14},end:{line:52,column:15}},{start:{line:50,column:21},end:{line:52,column:15}}],line:48},4:{loc:{start:{line:54,column:14},end:{line:58,column:15}},type:"if",locations:[{start:{line:54,column:14},end:{line:58,column:15}},{start:{line:56,column:21},end:{line:58,column:15}}],line:54},5:{loc:{start:{line:60,column:17},end:{line:82,column:11}},type:"if",locations:[{start:{line:60,column:17},end:{line:82,column:11}},{start:{line:71,column:17},end:{line:82,column:11}}],line:60},6:{loc:{start:{line:62,column:12},end:{line:64,column:13}},type:"if",locations:[{start:{line:62,column:12},end:{line:64,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},7:{loc:{start:{line:65,column:12},end:{line:70,column:13}},type:"if",locations:[{start:{line:65,column:12},end:{line:70,column:13}},{start:{line:68,column:19},end:{line:70,column:13}}],line:65},8:{loc:{start:{line:73,column:12},end:{line:75,column:13}},type:"if",locations:[{start:{line:73,column:12},end:{line:75,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:73},9:{loc:{start:{line:76,column:12},end:{line:81,column:13}},type:"if",locations:[{start:{line:76,column:12},end:{line:81,column:13}},{start:{line:79,column:19},end:{line:81,column:13}}],line:76},10:{loc:{start:{line:89,column:6},end:{line:93,column:7}},type:"if",locations:[{start:{line:89,column:6},end:{line:93,column:7}},{start:{line:91,column:13},end:{line:93,column:7}}],line:89},11:{loc:{start:{line:96,column:6},end:{line:96,column:43}},type:"if",locations:[{start:{line:96,column:6},end:{line:96,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:96},12:{loc:{start:{line:102,column:10},end:{line:111,column:11}},type:"if",locations:[{start:{line:102,column:10},end:{line:111,column:11}},{start:{line:105,column:17},end:{line:111,column:11}}],line:102},13:{loc:{start:{line:105,column:17},end:{line:111,column:11}},type:"if",locations:[{start:{line:105,column:17},end:{line:111,column:11}},{start:{line:108,column:17},end:{line:111,column:11}}],line:105}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0]},inputSourceMap:{version:3,sources:["InterfacesTab.vue"],names:[],mappings:";AAsEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"InterfacesTab.vue",sourceRoot:"src/tools/CmdTlmServer",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <v-card>\n <v-card-title>\n {{ data.length }} Interfaces\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n label=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n clearable\n outlined\n dense\n single-line\n hide-details\n class=\"search\"\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n :custom-sort=\"sortTable\"\n :items-per-page=\"10\"\n :footer-props=\"{ itemsPerPageOptions: [10, 20, -1] }\"\n calculate-widths\n multi-sort\n data-test=\"interfaces-table\"\n >\n <template v-slot:item.connect=\"{ item }\">\n <v-btn\n block\n color=\"primary\"\n :disabled=\"buttonsDisabled\"\n @click=\"connectDisconnect(item)\"\n >\n {{ item.connect }}\n </v-btn>\n </template>\n <template v-slot:item.connected=\"{ item }\">\n <span :class=\"item.connectedClass\">\n {{ item.connected }}\n </span>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport Updater from './Updater'\n\nexport default {\n mixins: [Updater],\n props: {\n tabId: Number,\n curTab: Number,\n },\n data() {\n return {\n search: '',\n data: [],\n buttonsDisabled: false,\n headers: [\n { text: 'Name', value: 'name' },\n {\n text: 'Action',\n value: 'connect',\n sortable: false,\n filterable: false,\n },\n { text: 'Connected', value: 'connected' },\n { text: 'Clients', value: 'clients' },\n { text: 'Tx Q', value: 'tx_q_size' },\n { text: 'Rx Q', value: 'rx_q_size' },\n { text: 'Tx bytes', value: 'tx_bytes' },\n { text: 'Rx bytes', value: 'rx_bytes' },\n { text: 'Cmd pkts', value: 'cmd_pkts' },\n { text: 'Tlm pkts', value: 'tlm_pkts' },\n ],\n }\n },\n methods: {\n // Custom sort algorithm to allow the connected column to be sorted by CONNECTED first\n sortTable(items, index, isDesc) {\n items.sort((a, b) => {\n for (let i = 0; i < index.length; i++) {\n let column = index[i]\n let desc = isDesc[i]\n\n if (column === 'connected') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n if (a[column] === 'CONNECTED') {\n return -1\n } else {\n return 1\n }\n } else {\n if (a[column] === 'CONNECTED') {\n return 1\n } else {\n return -1\n }\n }\n } else if (column === 'name') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // Strings so use localeCompare to sort\n return a[column].localeCompare(b[column])\n } else {\n return b[column].localeCompare(a[column])\n }\n } else {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // The rest of the columns are numbers so just subtract to sort\n return a[column] - b[column]\n } else {\n return b[column] - a[column]\n }\n }\n }\n })\n return items\n },\n connectDisconnect(item) {\n this.buttonsDisabled = true\n if (item.connected === 'DISCONNECTED') {\n this.api.connect_interface(item.name)\n } else {\n this.api.disconnect_interface(item.name)\n }\n },\n update() {\n if (this.tabId != this.curTab) return\n this.api.get_all_interface_info().then((info) => {\n this.data = [] // Clear the old data\n for (let int of info) {\n let connect = null\n let connectedClass = null\n if (int[1] == 'DISCONNECTED') {\n connect = 'Connect'\n connectedClass = 'openc3-white'\n } else if (int[1] == 'CONNECTED') {\n connect = 'Disconnect'\n connectedClass = 'openc3-green'\n } else {\n connect = 'Cancel'\n connectedClass = 'openc3-red'\n }\n this.data.push({\n name: int[0],\n connect: connect,\n connectedClass: connectedClass,\n connected: int[1],\n clients: int[2],\n tx_q_size: int[3],\n rx_q_size: int[4],\n tx_bytes: int[5],\n rx_bytes: int[6],\n cmd_pkts: int[7],\n tlm_pkts: int[8],\n })\n }\n this.buttonsDisabled = false\n })\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e8a5f30ad10450c8afd05dd883ff17b1464f9013"},c=l[t]||(l[t]={});c[n]&&c[n].hash===e||(c[n]=o);var i=c[n];return s=function(){return i},i}s();const a={mixins:[i.A],props:{tabId:Number,curTab:Number},data(){return s().f[0]++,s().s[0]++,{search:"",data:[],buttonsDisabled:!1,headers:[{text:"Name",value:"name"},{text:"Action",value:"connect",sortable:!1,filterable:!1},{text:"Connected",value:"connected"},{text:"Clients",value:"clients"},{text:"Tx Q",value:"tx_q_size"},{text:"Rx Q",value:"rx_q_size"},{text:"Tx bytes",value:"tx_bytes"},{text:"Rx bytes",value:"rx_bytes"},{text:"Cmd pkts",value:"cmd_pkts"},{text:"Tlm pkts",value:"tlm_pkts"}]}},methods:{sortTable(n,e,l){return s().f[1]++,s().s[1]++,n.sort(((n,t)=>{s().f[2]++,s().s[2]++;for(let o=(s().s[3]++,0);o<e.length;o++){let c=(s().s[4]++,e[o]),i=(s().s[5]++,l[o]);if(s().s[6]++,"connected"===c){if(s().b[0][0]++,s().s[7]++,n[c]===t[c]){s().b[1][0]++,s().s[8]++;continue}return s().b[1][1]++,s().s[9]++,i?(s().b[2][1]++,s().s[13]++,"CONNECTED"===n[c]?(s().b[4][0]++,s().s[14]++,1):(s().b[4][1]++,s().s[15]++,-1)):(s().b[2][0]++,s().s[10]++,"CONNECTED"===n[c]?(s().b[3][0]++,s().s[11]++,-1):(s().b[3][1]++,s().s[12]++,1))}if(s().b[0][1]++,s().s[16]++,"name"===c){if(s().b[5][0]++,s().s[17]++,n[c]===t[c]){s().b[6][0]++,s().s[18]++;continue}return s().b[6][1]++,s().s[19]++,i?(s().b[7][1]++,s().s[21]++,t[c].localeCompare(n[c])):(s().b[7][0]++,s().s[20]++,n[c].localeCompare(t[c]))}if(s().b[5][1]++,s().s[22]++,n[c]!==t[c])return s().b[8][1]++,s().s[24]++,i?(s().b[9][1]++,s().s[26]++,t[c]-n[c]):(s().b[9][0]++,s().s[25]++,n[c]-t[c]);s().b[8][0]++,s().s[23]++}})),s().s[27]++,n},connectDisconnect(n){s().f[3]++,s().s[28]++,this.buttonsDisabled=!0,s().s[29]++,"DISCONNECTED"===n.connected?(s().b[10][0]++,s().s[30]++,this.api.connect_interface(n.name)):(s().b[10][1]++,s().s[31]++,this.api.disconnect_interface(n.name))},update(){if(s().f[4]++,s().s[32]++,this.tabId!=this.curTab)return s().b[11][0]++,void s().s[33]++;s().b[11][1]++,s().s[34]++,this.api.get_all_interface_info().then((n=>{s().f[5]++,s().s[35]++,this.data=[],s().s[36]++;for(let e of n){let n=(s().s[37]++,null),l=(s().s[38]++,null);s().s[39]++,"DISCONNECTED"==e[1]?(s().b[12][0]++,s().s[40]++,n="Connect",s().s[41]++,l="openc3-white"):(s().b[12][1]++,s().s[42]++,"CONNECTED"==e[1]?(s().b[13][0]++,s().s[43]++,n="Disconnect",s().s[44]++,l="openc3-green"):(s().b[13][1]++,s().s[45]++,n="Cancel",s().s[46]++,l="openc3-red")),s().s[47]++,this.data.push({name:e[0],connect:n,connectedClass:l,connected:e[1],clients:e[2],tx_q_size:e[3],rx_q_size:e[4],tx_bytes:e[5],rx_bytes:e[6],cmd_pkts:e[7],tlm_pkts:e[8]})}s().s[48]++,this.buttonsDisabled=!1}))}}},u=a;var m=l(2401),r=(0,m.A)(u,o,c,!1,null,null,null);const A=r.exports}}]);
2
2
  //# sourceMappingURL=739.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/739.js","mappings":"kyFAeY,OAAAA,EAAA,kBAAAC,CAAA,EAAAA,CAAA,CAAAD,IASZ,SACEE,MAAO,CACLC,gBAAiB,CACfC,QAAS,MAGbC,IAAAA,GACE,OADKL,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACE,CACLC,QAAS,KACTC,IAAK,KAET,EACAC,OAAAA,GAAUV,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACRI,KAAKF,IAAM,IAAIG,EAAAA,CACjB,EACAC,OAAAA,GAAUb,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACRI,KAAKG,eACP,EACAC,aAAAA,GAAgBf,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACM,MAAhBI,KAAKH,SAAiBR,IAAAgB,EAAA,QAAAhB,IAAAO,EAAA,KACxBU,cAAcN,KAAKH,SAAQR,IAAAO,EAAA,KAC3BI,KAAKH,QAAU,MAChBR,IA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AAAC,MAAAC,IAAAvD,IAAAlB,EAAA,KAAAkB,IAAAjB,EAAA,MACA,KAAAF,KAAA,GAAAmB,IAAAjB,EAAA,MACA,QAAAyE,KAAAD,EAAA,CACA,IAAA3B,GAAA5B,IAAAjB,EAAA,YACA+C,GAAA9B,IAAAjB,EAAA,YAAAiB,IAAAjB,EAAA,MACA,gBAAAyE,EAAA,IAAAxD,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,MACA6C,EAAA,UAAA5B,IAAAjB,EAAA,MACA+C,EAAA,iBACA9B,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,mBAAAyE,EAAA,IAAAxD,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,MACA6C,EAAA,aAAA5B,IAAAjB,EAAA,MACA+C,EAAA,iBACA9B,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,MACA6C,EAAA,SAAA5B,IAAAjB,EAAA,MACA+C,EAAA,eACA9B,IAAAjB,EAAA,MACA,KAAAF,KAAA4E,KAAA,CACAN,KAAAK,EAAA,GACA5B,QAAAA,EACAE,eAAAA,EACAC,UAAAyB,EAAA,GACAE,QAAAF,EAAA,GACAG,UAAAH,EAAA,GACAI,UAAAJ,EAAA,GACAK,SAAAL,EAAA,GACAM,SAAAN,EAAA,GACAO,SAAAP,EAAA,GACAQ,SAAAR,EAAA,IAEA,CAAAxD,IAAAjB,EAAA,MACA,KAAAyC,iBAAA,IAEA,ICpM0T,I,cCOtTyC,GAAY,OACd,EACAhE,EACA+B,GACA,EACA,KACA,KACA,MAIF,QAAeiC,EAAiB,O","sources":["webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/Updater.js","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/InterfacesTab.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/InterfacesTab.vue?4098","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/InterfacesTab.vue?cd05"],"sourcesContent":["/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\n\nexport default {\n props: {\n refreshInterval: {\n default: 1000,\n },\n },\n data() {\n return {\n updater: null,\n api: null,\n }\n },\n created() {\n this.api = new OpenC3Api()\n },\n mounted() {\n this.changeUpdater()\n },\n beforeDestroy() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n },\n watch: {\n // eslint-disable-next-line no-unused-vars\n refreshInterval: function (newVal, oldVal) {\n this.changeUpdater()\n },\n },\n methods: {\n changeUpdater() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n this.updater = setInterval(() => {\n this.update()\n }, this.refreshInterval)\n },\n },\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-card',[_c('v-card-title',[_vm._v(\"\\n \"+_vm._s(_vm.data.length)+\" Interfaces\\n \"),_c('v-spacer'),_vm._v(\" \"),_c('v-text-field',{staticClass:\"search\",attrs:{\"label\":\"Search\",\"prepend-inner-icon\":\"mdi-magnify\",\"clearable\":\"\",\"outlined\":\"\",\"dense\":\"\",\"single-line\":\"\",\"hide-details\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_vm._v(\" \"),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.data,\"search\":_vm.search,\"custom-sort\":_vm.sortTable,\"items-per-page\":10,\"footer-props\":{ itemsPerPageOptions: [10, 20, -1] },\"calculate-widths\":\"\",\"multi-sort\":\"\",\"data-test\":\"interfaces-table\"},scopedSlots:_vm._u([{key:\"item.connect\",fn:function({ item }){return [_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"disabled\":_vm.buttonsDisabled},on:{\"click\":function($event){return _vm.connectDisconnect(item)}}},[_vm._v(\"\\n \"+_vm._s(item.connect)+\"\\n \")])]}},{key:\"item.connected\",fn:function({ item }){return [_c('span',{class:item.connectedClass},[_vm._v(\"\\n \"+_vm._s(item.connected)+\"\\n \")])]}}])})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n-->\n\n<template>\n <v-card>\n <v-card-title>\n {{ data.length }} Interfaces\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n label=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n clearable\n outlined\n dense\n single-line\n hide-details\n class=\"search\"\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n :custom-sort=\"sortTable\"\n :items-per-page=\"10\"\n :footer-props=\"{ itemsPerPageOptions: [10, 20, -1] }\"\n calculate-widths\n multi-sort\n data-test=\"interfaces-table\"\n >\n <template v-slot:item.connect=\"{ item }\">\n <v-btn\n block\n color=\"primary\"\n :disabled=\"buttonsDisabled\"\n @click=\"connectDisconnect(item)\"\n >\n {{ item.connect }}\n </v-btn>\n </template>\n <template v-slot:item.connected=\"{ item }\">\n <span :class=\"item.connectedClass\">\n {{ item.connected }}\n </span>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport Updater from './Updater'\n\nexport default {\n mixins: [Updater],\n props: {\n tabId: Number,\n curTab: Number,\n },\n data() {\n return {\n search: '',\n data: [],\n buttonsDisabled: false,\n headers: [\n { text: 'Name', value: 'name' },\n {\n text: 'Action',\n value: 'connect',\n sortable: false,\n filterable: false,\n },\n { text: 'Connected', value: 'connected' },\n { text: 'Clients', value: 'clients' },\n { text: 'Tx Q', value: 'tx_q_size' },\n { text: 'Rx Q', value: 'rx_q_size' },\n { text: 'Tx bytes', value: 'tx_bytes' },\n { text: 'Rx bytes', value: 'rx_bytes' },\n { text: 'Cmd pkts', value: 'cmd_pkts' },\n { text: 'Tlm pkts', value: 'tlm_pkts' },\n ],\n }\n },\n methods: {\n // Custom sort algorithm to allow the connected column to be sorted by CONNECTED first\n sortTable(items, index, isDesc) {\n items.sort((a, b) => {\n for (let i = 0; i < index.length; i++) {\n let column = index[i]\n let desc = isDesc[i]\n\n if (column === 'connected') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n if (a[column] === 'CONNECTED') {\n return -1\n } else {\n return 1\n }\n } else {\n if (a[column] === 'CONNECTED') {\n return 1\n } else {\n return -1\n }\n }\n } else if (column === 'name') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // Strings so use localeCompare to sort\n return a[column].localeCompare(b[column])\n } else {\n return b[column].localeCompare(a[column])\n }\n } else {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // The rest of the columns are numbers so just subtract to sort\n return a[column] - b[column]\n } else {\n return b[column] - a[column]\n }\n }\n }\n })\n return items\n },\n connectDisconnect(item) {\n this.buttonsDisabled = true\n if (item.connected === 'DISCONNECTED') {\n this.api.connect_interface(item.name)\n } else {\n this.api.disconnect_interface(item.name)\n }\n },\n update() {\n if (this.tabId != this.curTab) return\n this.api.get_all_interface_info().then((info) => {\n this.data = [] // Clear the old data\n for (let int of info) {\n let connect = null\n let connectedClass = null\n if (int[1] == 'DISCONNECTED') {\n connect = 'Connect'\n connectedClass = 'openc3-white'\n } else if (int[1] == 'CONNECTED') {\n connect = 'Disconnect'\n connectedClass = 'openc3-green'\n } else {\n connect = 'Cancel'\n connectedClass = 'openc3-red'\n }\n this.data.push({\n name: int[0],\n connect: connect,\n connectedClass: connectedClass,\n connected: int[1],\n clients: int[2],\n tx_q_size: int[3],\n rx_q_size: int[4],\n tx_bytes: int[5],\n rx_bytes: int[6],\n cmd_pkts: int[7],\n tlm_pkts: int[8],\n })\n }\n this.buttonsDisabled = false\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./InterfacesTab.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./InterfacesTab.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./InterfacesTab.vue?vue&type=template&id=89ec135c\"\nimport script from \"./InterfacesTab.vue?vue&type=script&lang=js\"\nexport * from \"./InterfacesTab.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["cov_18iatml2cn","actualCoverage","props","refreshInterval","default","data","f","s","updater","api","created","this","OpenC3Api","mounted","changeUpdater","beforeDestroy","b","clearInterval","watch","newVal","oldVal","methods","setInterval","update","cov_z1n112vt","render","_vm","_c","_self","_v","_s","length","staticClass","attrs","model","value","search","callback","$$v","expression","headers","sortTable","itemsPerPageOptions","scopedSlots","_u","key","fn","item","buttonsDisabled","on","$event","connectDisconnect","connect","class","connectedClass","connected","staticRenderFns","mixins","Updater","tabId","Number","curTab","text","sortable","filterable","items","index","isDesc","sort","a","i","column","desc","localeCompare","connect_interface","name","disconnect_interface","get_all_interface_info","then","info","int","push","clients","tx_q_size","rx_q_size","tx_bytes","rx_bytes","cmd_pkts","tlm_pkts","component"],"sourceRoot":""}
1
+ {"version":3,"file":"js/739.js","mappings":"kyFAeY,OAAAA,EAAA,kBAAAC,CAAA,EAAAA,CAAA,CAAAD,IASZ,SACEE,MAAO,CACLC,gBAAiB,CACfC,QAAS,MAGbC,IAAAA,GACE,OADKL,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACE,CACLC,QAAS,KACTC,IAAK,KAET,EACAC,OAAAA,GAAUV,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACRI,KAAKF,IAAM,IAAIG,EAAAA,CACjB,EACAC,OAAAA,GAAUb,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACRI,KAAKG,eACP,EACAC,aAAAA,GAAgBf,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACM,MAAhBI,KAAKH,SAAiBR,IAAAgB,EAAA,QAAAhB,IAAAO,EAAA,KACxBU,cAAcN,KAAKH,SAAQR,IAAAO,EAAA,KAC3BI,KAAKH,QAAU,MAChBR,IAAAgB,EAAA,OACH,EACAE,MAAO,CAELf,gBAAiB,SAAUgB,EAAQC,GAAQpB,IA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,KAAA,GAAAmB,IAAAjB,EAAA,MACA,QAAAyE,KAAAD,EAAA,CACA,IAAA3B,GAAA5B,IAAAjB,EAAA,YACA+C,GAAA9B,IAAAjB,EAAA,YAAAiB,IAAAjB,EAAA,MACA,gBAAAyE,EAAA,IAAAxD,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,MACA6C,EAAA,UAAA5B,IAAAjB,EAAA,MACA+C,EAAA,iBACA9B,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,mBAAAyE,EAAA,IAAAxD,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,MACA6C,EAAA,aAAA5B,IAAAjB,EAAA,MACA+C,EAAA,iBACA9B,IAAAR,EAAA,SAAAQ,IAAAjB,EAAA,MACA6C,EAAA,SAAA5B,IAAAjB,EAAA,MACA+C,EAAA,eACA9B,IAAAjB,EAAA,MACA,KAAAF,KAAA4E,KAAA,CACAN,KAAAK,EAAA,GACA5B,QAAAA,EACAE,eAAAA,EACAC,UAAAyB,EAAA,GACAE,QAAAF,EAAA,GACAG,UAAAH,EAAA,GACAI,UAAAJ,EAAA,GACAK,SAAAL,EAAA,GACAM,SAAAN,EAAA,GACAO,SAAAP,EAAA,GACAQ,SAAAR,EAAA,IAEA,CAAAxD,IAAAjB,EAAA,MACA,KAAAyC,iBAAA,IAEA,ICpM0T,I,cCOtTyC,GAAY,OACd,EACAhE,EACA+B,GACA,EACA,KACA,KACA,MAIF,QAAeiC,EAAiB,O","sources":["webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/Updater.js","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/InterfacesTab.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/InterfacesTab.vue","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/InterfacesTab.vue?4098","webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/InterfacesTab.vue?cd05"],"sourcesContent":["/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\n\nexport default {\n props: {\n refreshInterval: {\n default: 1000,\n },\n },\n data() {\n return {\n updater: null,\n api: null,\n }\n },\n created() {\n this.api = new OpenC3Api()\n },\n mounted() {\n this.changeUpdater()\n },\n beforeDestroy() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n },\n watch: {\n // eslint-disable-next-line no-unused-vars\n refreshInterval: function (newVal, oldVal) {\n this.changeUpdater()\n },\n },\n methods: {\n changeUpdater() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n this.updater = setInterval(() => {\n this.update()\n }, this.refreshInterval)\n },\n },\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-card',[_c('v-card-title',[_vm._v(\"\\n \"+_vm._s(_vm.data.length)+\" Interfaces\\n \"),_c('v-spacer'),_vm._v(\" \"),_c('v-text-field',{staticClass:\"search\",attrs:{\"label\":\"Search\",\"prepend-inner-icon\":\"mdi-magnify\",\"clearable\":\"\",\"outlined\":\"\",\"dense\":\"\",\"single-line\":\"\",\"hide-details\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_vm._v(\" \"),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.data,\"search\":_vm.search,\"custom-sort\":_vm.sortTable,\"items-per-page\":10,\"footer-props\":{ itemsPerPageOptions: [10, 20, -1] },\"calculate-widths\":\"\",\"multi-sort\":\"\",\"data-test\":\"interfaces-table\"},scopedSlots:_vm._u([{key:\"item.connect\",fn:function({ item }){return [_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"disabled\":_vm.buttonsDisabled},on:{\"click\":function($event){return _vm.connectDisconnect(item)}}},[_vm._v(\"\\n \"+_vm._s(item.connect)+\"\\n \")])]}},{key:\"item.connected\",fn:function({ item }){return [_c('span',{class:item.connectedClass},[_vm._v(\"\\n \"+_vm._s(item.connected)+\"\\n \")])]}}])})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n-->\n\n<template>\n <v-card>\n <v-card-title>\n {{ data.length }} Interfaces\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n label=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n clearable\n outlined\n dense\n single-line\n hide-details\n class=\"search\"\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n :custom-sort=\"sortTable\"\n :items-per-page=\"10\"\n :footer-props=\"{ itemsPerPageOptions: [10, 20, -1] }\"\n calculate-widths\n multi-sort\n data-test=\"interfaces-table\"\n >\n <template v-slot:item.connect=\"{ item }\">\n <v-btn\n block\n color=\"primary\"\n :disabled=\"buttonsDisabled\"\n @click=\"connectDisconnect(item)\"\n >\n {{ item.connect }}\n </v-btn>\n </template>\n <template v-slot:item.connected=\"{ item }\">\n <span :class=\"item.connectedClass\">\n {{ item.connected }}\n </span>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport Updater from './Updater'\n\nexport default {\n mixins: [Updater],\n props: {\n tabId: Number,\n curTab: Number,\n },\n data() {\n return {\n search: '',\n data: [],\n buttonsDisabled: false,\n headers: [\n { text: 'Name', value: 'name' },\n {\n text: 'Action',\n value: 'connect',\n sortable: false,\n filterable: false,\n },\n { text: 'Connected', value: 'connected' },\n { text: 'Clients', value: 'clients' },\n { text: 'Tx Q', value: 'tx_q_size' },\n { text: 'Rx Q', value: 'rx_q_size' },\n { text: 'Tx bytes', value: 'tx_bytes' },\n { text: 'Rx bytes', value: 'rx_bytes' },\n { text: 'Cmd pkts', value: 'cmd_pkts' },\n { text: 'Tlm pkts', value: 'tlm_pkts' },\n ],\n }\n },\n methods: {\n // Custom sort algorithm to allow the connected column to be sorted by CONNECTED first\n sortTable(items, index, isDesc) {\n items.sort((a, b) => {\n for (let i = 0; i < index.length; i++) {\n let column = index[i]\n let desc = isDesc[i]\n\n if (column === 'connected') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n if (a[column] === 'CONNECTED') {\n return -1\n } else {\n return 1\n }\n } else {\n if (a[column] === 'CONNECTED') {\n return 1\n } else {\n return -1\n }\n }\n } else if (column === 'name') {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // Strings so use localeCompare to sort\n return a[column].localeCompare(b[column])\n } else {\n return b[column].localeCompare(a[column])\n }\n } else {\n // Items are the same so continue to let subsequent column sorts apply\n if (a[column] === b[column]) {\n continue\n }\n if (!desc) {\n // The rest of the columns are numbers so just subtract to sort\n return a[column] - b[column]\n } else {\n return b[column] - a[column]\n }\n }\n }\n })\n return items\n },\n connectDisconnect(item) {\n this.buttonsDisabled = true\n if (item.connected === 'DISCONNECTED') {\n this.api.connect_interface(item.name)\n } else {\n this.api.disconnect_interface(item.name)\n }\n },\n update() {\n if (this.tabId != this.curTab) return\n this.api.get_all_interface_info().then((info) => {\n this.data = [] // Clear the old data\n for (let int of info) {\n let connect = null\n let connectedClass = null\n if (int[1] == 'DISCONNECTED') {\n connect = 'Connect'\n connectedClass = 'openc3-white'\n } else if (int[1] == 'CONNECTED') {\n connect = 'Disconnect'\n connectedClass = 'openc3-green'\n } else {\n connect = 'Cancel'\n connectedClass = 'openc3-red'\n }\n this.data.push({\n name: int[0],\n connect: connect,\n connectedClass: connectedClass,\n connected: int[1],\n clients: int[2],\n tx_q_size: int[3],\n rx_q_size: int[4],\n tx_bytes: int[5],\n rx_bytes: int[6],\n cmd_pkts: int[7],\n tlm_pkts: int[8],\n })\n }\n this.buttonsDisabled = false\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./InterfacesTab.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./InterfacesTab.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./InterfacesTab.vue?vue&type=template&id=89ec135c\"\nimport script from \"./InterfacesTab.vue?vue&type=script&lang=js\"\nexport * from \"./InterfacesTab.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["cov_18iatml2cn","actualCoverage","props","refreshInterval","default","data","f","s","updater","api","created","this","OpenC3Api","mounted","changeUpdater","beforeDestroy","b","clearInterval","watch","newVal","oldVal","methods","setInterval","update","cov_z1n112vt","render","_vm","_c","_self","_v","_s","length","staticClass","attrs","model","value","search","callback","$$v","expression","headers","sortTable","itemsPerPageOptions","scopedSlots","_u","key","fn","item","buttonsDisabled","on","$event","connectDisconnect","connect","class","connectedClass","connected","staticRenderFns","mixins","Updater","tabId","Number","curTab","text","sortable","filterable","items","index","isDesc","sort","a","i","column","desc","localeCompare","connect_interface","name","disconnect_interface","get_all_interface_info","then","info","int","push","clients","tx_q_size","rx_q_size","tx_bytes","rx_bytes","cmd_pkts","tlm_pkts","component"],"sourceRoot":""}