cosmosc2-tool-tablemanager 5.0.2 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +6 -1
- data/tools/tablemanager/js/309.js +2 -0
- data/tools/tablemanager/js/309.js.map +1 -0
- data/tools/tablemanager/js/767.js +4 -0
- data/tools/tablemanager/js/767.js.map +1 -0
- data/tools/tablemanager/js/app.js +1 -1
- data/tools/tablemanager/js/app.js.map +1 -1
- metadata +7 -7
- data/tools/tablemanager/js/157.js +0 -2
- data/tools/tablemanager/js/157.js.map +0 -1
- data/tools/tablemanager/js/550.js +0 -2
- data/tools/tablemanager/js/550.js.map +0 -1
@@ -1,2 +0,0 @@
|
|
1
|
-
(self["webpackChunk_cosmosc2_tool_tablemanager"]=self["webpackChunk_cosmosc2_tool_tablemanager"]||[]).push([[550],{9550:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ce}});var l=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("top-bar",{attrs:{menus:e.menus,title:e.title}}),t("v-snackbar",{attrs:{top:"",timeout:-1,color:"orange"},scopedSlots:e._u([{key:"action",fn:function(n){var l=n.attrs;return[t("v-btn",e._b({attrs:{text:"",color:"danger","data-test":"unlock-button"},on:{click:e.confirmLocalUnlock}},"v-btn",l,!1),[e._v(" Unlock ")]),t("v-btn",e._b({attrs:{text:""},on:{click:function(){e.showReadOnlyToast=!1}}},"v-btn",l,!1),[e._v(" dismiss ")])]}}]),model:{value:e.showReadOnlyToast,callback:function(n){e.showReadOnlyToast=n},expression:"showReadOnlyToast"}},[t("v-icon",[e._v(" mdi-pencil-off ")]),e._v(" "+e._s(e.lockedBy)+" is editing this script. Editor is in read-only mode ")],1),t("v-file-input",{ref:"fileInput",staticStyle:{position:"fixed",top:"-100%"},attrs:{"show-size":"",accept:".bin","data-test":"file-input"},model:{value:e.fileInput,callback:function(n){e.fileInput=n},expression:"fileInput"}}),t("v-text-field",{attrs:{outlined:"",dense:"",readonly:"","hide-details":"",label:"Definition",id:"definition-filename","data-test":"definition-filename"},model:{value:e.definitionFilename,callback:function(n){e.definitionFilename=n},expression:"definitionFilename"}}),t("v-text-field",{attrs:{outlined:"",dense:"",readonly:"","hide-details":"",label:"Filename",id:"filename","data-test":"filename"},model:{value:e.fullFilename,callback:function(n){e.fullFilename=n},expression:"fullFilename"}}),t("v-card",[t("v-card-title",[e._v(" Items "),t("v-spacer"),t("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),t("v-tabs",{model:{value:e.curTab,callback:function(n){e.curTab=n},expression:"curTab"}},e._l(e.tables,(function(n,l){return t("v-tab",{key:l},[e._v(" "+e._s(n.name)+" ")])})),1),t("v-tabs-items",{model:{value:e.curTab,callback:function(n){e.curTab=n},expression:"curTab"}},e._l(e.tables,(function(n,l){return t("v-tab-item",{key:""+e.filename+l},[t("v-data-table",{attrs:{headers:n.headers,items:n.rows,search:e.search,"calculate-widths":"","disable-pagination":"","hide-default-footer":"","multi-sort":"",dense:""},scopedSlots:e._u([{key:"item",fn:function(n){var l=n.item;return[t("table-row",{key:JSON.stringify(l[0]),attrs:{items:l},on:{change:function(n){return e.onChange(l,n)}}})]}}],null,!0)})],1)})),1)],1),e.fileOpen?t("file-open-save-dialog",{attrs:{type:"open","api-url":"/cosmos-api/tables"},on:{file:function(n){return e.setFile(n)},error:function(n){return e.setError(n)}},model:{value:e.fileOpen,callback:function(n){e.fileOpen=n},expression:"fileOpen"}}):e._e(),e.showSaveAs?t("file-open-save-dialog",{attrs:{type:"save","require-target-parent-dir":"","api-url":"/cosmos-api/tables","input-filename":e.filename},on:{filename:function(n){return e.saveAsFilename(n)},error:function(n){return e.setError(n)}},model:{value:e.showSaveAs,callback:function(n){e.showSaveAs=n},expression:"showSaveAs"}}):e._e(),t("simple-text-dialog",{attrs:{title:e.errorTitle,text:e.errorText},model:{value:e.showError,callback:function(n){e.showError=n},expression:"showError"}})],1)},i=[],o=t(8373),a=t(9490),s=(t(5047),t(5794),t(8178),t(9529),t(1235),t(7950),t(8319),t(6710),t(4707),t(1497),t(5640),t(1871),t(8188),t(3675),t(4898),t(5825),t(7170),t(8857),t(8329),t(6279),t(427),t(1159),t(2516),t(4349),t(5273),t(6729),t(1801),t(574),t(5787),t(9271),t(3160),t(5688),t(3157),t(3333),t(315),t(556),t(9224),t(8673),t(6886),t(4121),t(523),t(4660),t(5940),t(3450),t(9644)),c=t.n(s),r=t(4091),u=new r["default"],m=c().create({baseURL:location.origin,timeout:1e4,params:{}});m.interceptors.response.use((function(e){return e}),(function(e){if(401===e.response.status)delete localStorage.cosmosToken,CosmosAuth.login(location.href);else{var n,t,l,i,o,a,s,c="HTTP ".concat(e.response.status," - ");if(null!==(n=e.response)&&void 0!==n&&null!==(t=n.data)&&void 0!==t&&t.message)c+="".concat(e.response.data.message);else if(null!==(l=e.response)&&void 0!==l&&null!==(i=l.data)&&void 0!==i&&i.exception)c+="".concat(e.response.data.exception);else if(null!==(o=e.response)&&void 0!==o&&null!==(a=o.data)&&void 0!==a&&null!==(s=a.error)&&void 0!==s&&s.message)e.response.data.error.class&&(c+="".concat(e.response.data.error.class," ")),c+="".concat(e.response.data.error.message);else{var r;c+="".concat(null===(r=e.response)||void 0===r?void 0:r.data)}u.$notify.serious({title:"Network error",body:c})}throw e}));var A=m,d=function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n,t){var l,i,o,a,s,c,r,u,m,d=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(l=d.length>2&&void 0!==d[2]?d[2]:{},i=l.data,o=l.params,a=void 0===o?{}:o,s=l.headers,c=l.noAuth,r=void 0!==c&&c,u=l.noScope,m=void 0!==u&&u,r){e.next=11;break}return e.prev=2,e.next=5,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](2),CosmosAuth.login();case 10:s["Authorization"]=localStorage.cosmosToken;case 11:return m||a["scope"]||(a["scope"]=localStorage.scope),e.abrupt("return",A({method:n,url:t,data:i,params:a,headers:s}));case 13:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(n,t){return e.apply(this,arguments)}}(),f={Accept:"application/json"},h=(0,o.Z)((0,o.Z)({},f),{},{"Content-Type":"application/json"}),p={get:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.params,l=n.headers,i=void 0===l?f:l,o=n.noScope,a=n.noAuth;return d("get",e,{params:t,headers:i,noScope:o,noAuth:a})},put:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.data,l=n.params,i=n.headers,o=void 0===i?h:i,a=n.noScope,s=n.noAuth;return d("put",e,{data:t,params:l,headers:o,noScope:a,noAuth:s})},post:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.data,l=n.params,i=n.headers,o=void 0===i?h:i,a=n.noScope,s=n.noAuth;return d("post",e,{data:t,params:l,headers:o,noScope:a,noAuth:s})},delete:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.params,l=n.headers,i=void 0===l?f:l,o=n.noScope,a=n.noAuth;return d("delete",e,{params:t,headers:i,noScope:o,noAuth:a})}},v=t(570),C=t(7475),b=t(6330),_=t(2209),g=t(3696),y=(t(1372),t(1245),function(){function e(){(0,b.Z)(this,e),(0,g.Z)(this,"id",1)}return(0,_.Z)(e,[{key:"exec",value:function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n,t){var l,i,o,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return l=a.length>2&&void 0!==a[2]?a[2]:{},e.prev=1,e.next=4,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](1),CosmosAuth.login();case 9:return this.id=this.id+1,e.prev=10,l["scope"]=localStorage.scope,e.next=14,A.post("/cosmos-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:l},{headers:{Authorization:localStorage.cosmosToken,"Content-Type":"application/json-rpc"}});case 14:return i=e.sent,e.abrupt("return",i.data.result);case 18:throw e.prev=18,e.t1=e["catch"](10),o=new Error,e.t1.response?(o.name=e.t1.response.data.error.data.class,o.message=e.t1.response.data.error.data.message):e.t1.request?(o.name="Request error",o.message="Request error, no response received"):o.name="Unknown error",o;case 23:case"end":return e.stop()}}),e,this,[[1,6],[10,18]])})));function n(n,t){return e.apply(this,arguments)}return n}()},{key:"decode_cosmos_type",value:function(e){if(null!==e&&"object"===(0,C.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_cosmos_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"connect_interface",value:function(e){return this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_all_cmd_info",value:function(){return this.exec("get_all_cmd_info",[])}},{key:"get_all_tlm_info",value:function(){return this.exec("get_all_tlm_info",[])}},{key:"get_item",value:function(e,n,t){return this.exec("get_item",[e,n,t])}},{key:"get_parameter",value:function(e,n,t){return this.exec("get_parameter",[e,n,t])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_oldest_logfile",value:function(){return this.exec("get_oldest_logfile",[])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_telemetry",value:function(e,n){return this.exec("get_telemetry",[e,n])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n,t,l){var i,o,a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("get_tlm_packet",[n,t],{type:l});case 2:if(i=e.sent,null!=i)for(o=i.length,a=null,s=0;s<o;s++)a=this.decode_cosmos_type(i[s][1]),null!==a&&(i[s][1]=a);return e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));function n(n,t,l){return e.apply(this,arguments)}return n}()},{key:"get_packet_derived_items",value:function(e,n){return this.exec("get_packet_derived_items",[e,n])}},{key:"get_tlm_buffer",value:function(e,n){return this.exec("get_tlm_buffer",[e,n])}},{key:"get_tlm_values",value:function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n){var t,l,i,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("get_tlm_values",[n]);case 2:for(t=e.sent,l=t[0].length,i=null,o=0;o<l;o++)i=this.decode_cosmos_type(t[0][o]),null!==i&&(t[0][o]=i);return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}()},{key:"get_limits",value:function(e,n,t){return this.exec("get_limits",[e,n,t])}},{key:"tlm",value:function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n,t,l){var i,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.exec("tlm",[n,t,l]);case 2:return i=e.sent,o=this.decode_cosmos_type(i),null!==o&&(0,v.Z)("data"),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));function n(n,t,l){return e.apply(this,arguments)}return n}()},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_command",value:function(e,n){return this.exec("get_command",[e,n])}},{key:"get_cmd_value",value:function(e,n,t){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,n,t,l])}},{key:"get_cmd_buffer",value:function(e,n){return this.exec("get_cmd_buffer",[e,n])}},{key:"_cmd",value:function(e,n,t,l){var i=null;for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(i=this.encode_cosmos_type(l[o]),null!==i&&(l[o]=i));return this.exec(e,[n,t,l])}},{key:"get_cmd_hazardous",value:function(e,n,t){return void 0===n?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,n,t)}},{key:"cmd",value:function(e,n,t){return void 0===n?this.exec("cmd",e):this._cmd("cmd",e,n,t)}},{key:"cmd_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,n,t)}},{key:"cmd_raw",value:function(e,n,t){return void 0===n?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,n,t)}},{key:"cmd_raw_no_range_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,n,t)}},{key:"cmd_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,n,t)}},{key:"cmd_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,n,t)}},{key:"cmd_raw_no_hazardous_check",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,n,t)}},{key:"cmd_raw_no_checks",value:function(e,n,t){return void 0===n?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,n,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,n){return this.exec("send_raw",[e,n])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,n){return this.exec("load_config",[e,n])}},{key:"save_config",value:function(e,n,t){return this.exec("save_config",[e,n,t])}},{key:"delete_config",value:function(e,n){return this.exec("delete_config",[e,n])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,n){return this.exec("save_setting",[e,n])}}]),e}()),k=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("mounting-portal",{attrs:{"mount-to":"#cosmos-menu",append:""}},[t("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(n,l){return t("v-menu",{key:l,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(l){var i=l.on,o=l.attrs;return[t("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT(e.title+" "+n.label)}},"v-btn",o,!1),i),[t("span",{domProps:{textContent:e._s(n.label)}}),t("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[t("v-list",[t("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:n.radioGroup,"hide-details":"",dense:""}},[e._l(n.items,(function(l,i){return[l.divider?t("v-divider",{key:i}):t("v-list-item",{key:i,attrs:{disabled:l.disabled,"data-test":e.formatDT(e.title+" "+n.label+" "+l.label)},on:{click:l.command}},[l.radio?t("v-list-item-action",[t("v-radio",{attrs:{color:"secondary",label:l.label,value:l.label}})],1):e._e(),l.checkbox?t("v-list-item-action",[t("v-checkbox",{attrs:{color:"secondary",label:l.label,value:l.label},model:{value:e.checked,callback:function(n){e.checked=n},expression:"checked"}})],1):e._e(),l.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:l.disabled},domProps:{textContent:e._s(l.icon)}})],1):e._e(),l.radio||l.checkbox?e._e():t("v-list-item-title",{style:"cursor: pointer;"+(l.disabled?"opacity: 0.2":""),domProps:{textContent:e._s(l.label)}})],1)]}))],2)],1)],1)})),t("v-spacer"),t("v-toolbar-title",{domProps:{textContent:e._s(e.title)}}),t("v-spacer")],2)])},x=[],w=(t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}}}),T=w,F=(t(7162),t(3287)),I=(0,F.Z)(T,k,x,!1,null,"e3bb7458",null),S=I.exports,E=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("tr",[t("td",{staticClass:"text-start"},[e._v(e._s(e.dataItems[0].index))]),e.oneDimensional?t("td",{staticClass:"text-start"},[e._v(e._s(e.dataItems[0].name))]):e._e(),e._l(e.dataItems,(function(n,l){return t("table-item",{key:n.name,attrs:{item:n},on:{change:function(t){return e.onChange(n,l,t)}}})}))],2)},D=[],O=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("td",[e.isCheckbox?t("v-checkbox",{attrs:{dense:"","hide-details":"",disabled:!e.dataItem.editable},on:{change:e.checkboxChange},model:{value:e.checkValue,callback:function(n){e.checkValue=n},expression:"checkValue"}}):e.dataItem.states?t("v-select",{attrs:{dense:"","hide-details":"",items:e.itemStates,disabled:!e.dataItem.editable},on:{change:e.stateChange},model:{value:e.stateValue,callback:function(n){e.stateValue=n},expression:"stateValue"}}):t("v-text-field",{attrs:{solo:"",dense:"","single-line":"","hide-no-data":"","hide-details":"",disabled:!e.dataItem.editable},on:{change:e.textChange},model:{value:e.dataItem.value,callback:function(n){e.$set(e.dataItem,"value",n)},expression:"dataItem.value"}})],1)},N=[],R=t(6451);t(4769),t(5883),t(9228);function $(){var e="/cosmos/plugins/packages/cosmosc2-tool-tablemanager/src/tools/TableManager/TableItem.vue",n="a81b214d030e0899a4655b2a5a5c4e258e1826e6",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-tablemanager/src/tools/TableManager/TableItem.vue",statementMap:{0:{start:{line:62,column:4},end:{line:66,column:5}},1:{start:{line:69,column:4},end:{line:71,column:5}},2:{start:{line:70,column:6},end:{line:70,column:65}},3:{start:{line:72,column:4},end:{line:74,column:5}},4:{start:{line:73,column:6},end:{line:73,column:45}},5:{start:{line:78,column:19},end:{line:78,column:23}},6:{start:{line:79,column:6},end:{line:87,column:7}},7:{start:{line:80,column:8},end:{line:84,column:9}},8:{start:{line:81,column:10},end:{line:83,column:11}},9:{start:{line:82,column:12},end:{line:82,column:26}},10:{start:{line:86,column:8},end:{line:86,column:22}},11:{start:{line:88,column:6},end:{line:88,column:19}},12:{start:{line:91,column:19},end:{line:91,column:21}},13:{start:{line:92,column:6},end:{line:94,column:7}},14:{start:{line:93,column:8},end:{line:93,column:49}},15:{start:{line:95,column:6},end:{line:95,column:19}},16:{start:{line:100,column:6},end:{line:104,column:7}},17:{start:{line:101,column:8},end:{line:101,column:39}},18:{start:{line:103,column:8},end:{line:103,column:41}},19:{start:{line:108,column:18},end:{line:110,column:7}},20:{start:{line:109,column:17},end:{line:109,column:62}},21:{start:{line:111,column:6},end:{line:111,column:33}},22:{start:{line:114,column:6},end:{line:114,column:47}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:61,column:2},end:{line:61,column:3}},loc:{start:{line:61,column:9},end:{line:67,column:3}},line:61},1:{name:"(anonymous_1)",decl:{start:{line:68,column:2},end:{line:68,column:3}},loc:{start:{line:68,column:12},end:{line:75,column:3}},line:68},2:{name:"(anonymous_2)",decl:{start:{line:77,column:16},end:{line:77,column:17}},loc:{start:{line:77,column:28},end:{line:89,column:5}},line:77},3:{name:"(anonymous_3)",decl:{start:{line:90,column:16},end:{line:90,column:17}},loc:{start:{line:90,column:28},end:{line:96,column:5}},line:90},4:{name:"(anonymous_4)",decl:{start:{line:99,column:20},end:{line:99,column:21}},loc:{start:{line:99,column:32},end:{line:105,column:5}},line:99},5:{name:"(anonymous_5)",decl:{start:{line:106,column:17},end:{line:106,column:18}},loc:{start:{line:106,column:29},end:{line:112,column:5}},line:106},6:{name:"(anonymous_6)",decl:{start:{line:109,column:8},end:{line:109,column:9}},loc:{start:{line:109,column:17},end:{line:109,column:62}},line:109},7:{name:"(anonymous_7)",decl:{start:{line:113,column:16},end:{line:113,column:17}},loc:{start:{line:113,column:28},end:{line:115,column:5}},line:113}},branchMap:{0:{loc:{start:{line:69,column:4},end:{line:71,column:5}},type:"if",locations:[{start:{line:69,column:4},end:{line:71,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:69},1:{loc:{start:{line:72,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:72,column:4},end:{line:74,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:72},2:{loc:{start:{line:79,column:6},end:{line:87,column:7}},type:"if",locations:[{start:{line:79,column:6},end:{line:87,column:7}},{start:{line:85,column:13},end:{line:87,column:7}}],line:79},3:{loc:{start:{line:81,column:10},end:{line:83,column:11}},type:"if",locations:[{start:{line:81,column:10},end:{line:83,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:81},4:{loc:{start:{line:81,column:14},end:{line:81,column:58}},type:"binary-expr",locations:[{start:{line:81,column:14},end:{line:81,column:33}},{start:{line:81,column:37},end:{line:81,column:58}}],line:81},5:{loc:{start:{line:100,column:6},end:{line:104,column:7}},type:"if",locations:[{start:{line:100,column:6},end:{line:104,column:7}},{start:{line:102,column:13},end:{line:104,column:7}}],line:100}},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},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,sources:["TableItem.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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:"TableItem.vue",sourceRoot:"src/tools/TableManager",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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <td>\n <v-checkbox\n v-if="isCheckbox"\n dense\n hide-details\n v-model="checkValue"\n @change="checkboxChange"\n :disabled="!dataItem.editable"\n />\n <v-select\n v-else-if="dataItem.states"\n dense\n hide-details\n v-model="stateValue"\n :items="itemStates"\n @change="stateChange"\n :disabled="!dataItem.editable"\n />\n <v-text-field\n v-else\n solo\n dense\n single-line\n hide-no-data\n hide-details\n v-model="dataItem.value"\n @change="textChange"\n :disabled="!dataItem.editable"\n />\n </td>\n</template>\n\n<script>\nexport default {\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n dataItem: this.item,\n stateValue: null,\n checkValue: false,\n }\n },\n created() {\n if (this.dataItem.states) {\n this.stateValue = this.dataItem.states[this.dataItem.value]\n }\n if (this.isCheckbox) {\n this.checkValue = this.stateValue === 1\n }\n },\n computed: {\n isCheckbox: function () {\n let result = true\n if (this.dataItem.states) {\n for (const state of Object.keys(this.dataItem.states)) {\n if (state !== \'CHECKED\' && state !== \'UNCHECKED\') {\n result = false\n }\n }\n } else {\n result = false\n }\n return result\n },\n itemStates: function () {\n let result = []\n for (const [text, value] of Object.entries(this.dataItem.states)) {\n result.push({ text: text, value: value })\n }\n return result\n },\n },\n methods: {\n checkboxChange: function () {\n if (this.checkValue) {\n this.$emit(\'change\', \'CHECKED\')\n } else {\n this.$emit(\'change\', \'UNCHECKED\')\n }\n },\n stateChange: function () {\n // Lookup the state key that corresponds to the value\n let state = Object.keys(this.dataItem.states).find(\n (key) => this.dataItem.states[key] === this.stateValue\n )\n this.$emit(\'change\', state)\n },\n textChange: function () {\n this.$emit(\'change\', this.dataItem.value)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a81b214d030e0899a4655b2a5a5c4e258e1826e6"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return $=function(){return a},a}$();var M={props:{item:{type:Object,required:!0}},data:function(){return $().f[0]++,$().s[0]++,{dataItem:this.item,stateValue:null,checkValue:!1}},created:function(){$().f[1]++,$().s[1]++,this.dataItem.states?($().b[0][0]++,$().s[2]++,this.stateValue=this.dataItem.states[this.dataItem.value]):$().b[0][1]++,$().s[3]++,this.isCheckbox?($().b[1][0]++,$().s[4]++,this.checkValue=1===this.stateValue):$().b[1][1]++},computed:{isCheckbox:function(){$().f[2]++;var e=($().s[5]++,!0);if($().s[6]++,this.dataItem.states){$().b[2][0]++,$().s[7]++;for(var n=0,t=Object.keys(this.dataItem.states);n<t.length;n++){var l=t[n];$().s[8]++,$().b[4][0]++,"CHECKED"!==l&&($().b[4][1]++,"UNCHECKED"!==l)?($().b[3][0]++,$().s[9]++,e=!1):$().b[3][1]++}}else $().b[2][1]++,$().s[10]++,e=!1;return $().s[11]++,e},itemStates:function(){$().f[3]++;var e=($().s[12]++,[]);$().s[13]++;for(var n=0,t=Object.entries(this.dataItem.states);n<t.length;n++){var l=(0,R.Z)(t[n],2),i=l[0],o=l[1];$().s[14]++,e.push({text:i,value:o})}return $().s[15]++,e}},methods:{checkboxChange:function(){$().f[4]++,$().s[16]++,this.checkValue?($().b[5][0]++,$().s[17]++,this.$emit("change","CHECKED")):($().b[5][1]++,$().s[18]++,this.$emit("change","UNCHECKED"))},stateChange:function(){var e=this;$().f[5]++;var n=($().s[19]++,Object.keys(this.dataItem.states).find((function(n){return $().f[6]++,$().s[20]++,e.dataItem.states[n]===e.stateValue})));$().s[21]++,this.$emit("change",n)},textChange:function(){$().f[7]++,$().s[22]++,this.$emit("change",this.dataItem.value)}}},U=M,B=(0,F.Z)(U,O,N,!1,null,null,null),P=B.exports;function L(){var e="/cosmos/plugins/packages/cosmosc2-tool-tablemanager/src/tools/TableManager/TableRow.vue",n="dbd0a1855bd5813e025d4acfff9ff0693e3b1a95",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-tablemanager/src/tools/TableManager/TableRow.vue",statementMap:{0:{start:{line:47,column:4},end:{line:49,column:5}},1:{start:{line:53,column:6},end:{line:57,column:7}},2:{start:{line:54,column:8},end:{line:54,column:19}},3:{start:{line:56,column:8},end:{line:56,column:20}},4:{start:{line:62,column:6},end:{line:62,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:9},end:{line:50,column:3}},line:46},1:{name:"(anonymous_1)",decl:{start:{line:52,column:4},end:{line:52,column:5}},loc:{start:{line:52,column:21},end:{line:58,column:5}},line:52},2:{name:"(anonymous_2)",decl:{start:{line:61,column:14},end:{line:61,column:15}},loc:{start:{line:61,column:44},end:{line:63,column:5}},line:61}},branchMap:{0:{loc:{start:{line:53,column:6},end:{line:57,column:7}},type:"if",locations:[{start:{line:53,column:6},end:{line:57,column:7}},{start:{line:55,column:13},end:{line:57,column:7}}],line:53}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["TableRow.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA;;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",file:"TableRow.vue",sourceRoot:"src/tools/TableManager",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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <tr>\n <td class="text-start">{{ dataItems[0].index }}</td>\n <td class="text-start" v-if="oneDimensional">{{ dataItems[0].name }}</td>\n <table-item\n v-for="(item, index) in dataItems"\n :key="item.name"\n :item="item"\n @change="onChange(item, index, $event)"\n />\n </tr>\n</template>\n\n<script>\nimport TableItem from \'@/tools/TableManager/TableItem\'\n\nexport default {\n components: {\n TableItem,\n },\n props: {\n items: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n dataItems: this.items,\n }\n },\n computed: {\n oneDimensional() {\n if (this.dataItems.length === 1) {\n return true\n } else {\n return false\n }\n },\n },\n methods: {\n onChange: function (item, index, event) {\n this.$emit(\'change\', { index: index, event: event })\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"dbd0a1855bd5813e025d4acfff9ff0693e3b1a95"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return L=function(){return a},a}L();var Z={components:{TableItem:P},props:{items:{type:Object,required:!0}},data:function(){return L().f[0]++,L().s[0]++,{dataItems:this.items}},computed:{oneDimensional:function(){return L().f[1]++,L().s[1]++,1===this.dataItems.length?(L().b[0][0]++,L().s[2]++,!0):(L().b[0][1]++,L().s[3]++,!1)}},methods:{onChange:function(e,n,t){L().f[2]++,L().s[4]++,this.$emit("change",{index:n,event:t})}}},j=Z,V=(0,F.Z)(j,E,D,!1,null,null,null),q=V.exports,z=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",{attrs:{width:"600"},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[e._v(" "+e._s(e.title)+" ")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{attrs:{flat:"",autofocus:"","solo-inverted":"","hide-details":"",clearable:"",label:"Search","data-test":"file-open-save-search"},on:{input:e.handleSearch},model:{value:e.search,callback:function(n){e.search=n},expression:"search"}})],1),t("v-row",{staticClass:"mt-2",attrs:{dense:""}},[t("v-treeview",{ref:"tree",staticStyle:{width:"100%"},attrs:{dense:"",activatable:"","return-object":"",items:e.items,search:e.search,"open-on-click":"open"===e.type},on:{"update:active":e.activeFile},scopedSlots:e._u([{key:"prepend",fn:function(n){var l=n.item,i=n.open;return[l.file?t("v-icon",[e._v(" "+e._s("mdi-language-ruby")+" ")]):t("v-icon",[e._v(" "+e._s(i?"mdi-folder-open":"mdi-folder")+" ")])]}}]),model:{value:e.tree,callback:function(n){e.tree=n},expression:"tree"}})],1),t("v-row",{staticClass:"my-2"},[t("v-text-field",{attrs:{"hide-details":"",label:"Filename","data-test":"file-open-save-filename",disabled:"open"===e.type},model:{value:e.selectedFile,callback:function(n){e.selectedFile=n},expression:"selectedFile"}})],1),t("v-row",{attrs:{dense:""}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"my-2 red--text",domProps:{textContent:e._s(e.error)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"file-open-save-cancel-btn",disabled:e.disableButtons},on:{click:function(n){e.show=!1}}},[e._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"file-open-save-submit-btn",disabled:e.disableButtons||!!e.error},on:{click:function(n){return n.preventDefault(),e.success.apply(null,arguments)}}},[e._v(" "+e._s(e.submit)+" ")])],1)],1)])],1)])],1)},H=[],G=t(6711),Y=(t(4083),t(4069),t(7368),t(4471),t(1172),t(8233),t(9949),t(2501),{props:{type:{type:String,required:!0,validator:function(e){return-1!==["open","save"].indexOf(e)}},apiUrl:String,requireTargetParentDir:Boolean,inputFilename:String,value:Boolean},data:function(){return{tree:[],items:[],id:1,search:null,selectedFile:null,disableButtons:!1,targets:[]}},computed:{show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}},title:function(){return"open"===this.type?"File Open":"File Save As..."},submit:function(){return"open"===this.type?"OPEN":"SAVE"},error:function(){if(""===this.selectedFile||null===this.selectedFile)return"No file selected must select a file";if(!this.selectedFile.match(this.validFilenameRegex)||this.selectedFile.match(/\.\.|\/\/|\.\/|\/\./)){var e="".concat(this.selectedFile," is not a valid filename. Must ");return this.requireTargetParentDir&&(e+="be in a target directory and "),e+="only contain alphanumeric characters and / ! - _ . * ' ( )",e}return null},validFilenameRegex:function(){var e="0-9a-zA-Z",n="".concat(e,"\\/\\!\\-\\_\\.\\*\\'\\(\\)"),t="[".concat(n,"]+\\.[").concat(e,"]+");if(this.requireTargetParentDir){var l="(".concat(this.targets.join("|"),")");t="\\/?".concat(l,"\\/").concat(t)}return new RegExp(t)}},created:function(){var e=this;p.get(this.apiUrl).then((function(n){e.items=[],e.id=1;var t,l=(0,G.Z)(n.data);try{for(l.s();!(t=l.n()).done;){var i=t.value;e.filepath=i,e.insertFile(e.items,1,i),e.id++}}catch(o){l.e(o)}finally{l.f()}e.inputFilename&&(e.selectedFile=e.inputFilename)})).catch((function(n){e.$emit("error","Failed to connect to Cosmos. ".concat(n))})),this.requireTargetParentDir&&p.get("/cosmos-api/targets").then((function(n){e.targets=n.data}))},methods:{clear:function(){this.show=!1,this.overwrite=!1,this.disableButtons=!1},handleSearch:function(e){e?this.$refs.tree.updateAll(!0):this.$refs.tree.updateAll(!1)},activeFile:function(e){0===e.length?this.selectedFile=null:this.selectedFile=e[0].path},exists:function(e,n){var t,l=!1,i=(0,G.Z)(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(o.path===n)return!0;o.children&&(l=l||this.exists(o.children,n))}}catch(a){i.e(a)}finally{i.f()}return l},success:function(){"open"===this.type?this.openSuccess():this.saveSuccess()},openSuccess:function(){var e=this;this.disableButtons=!0,p.get("".concat(this.apiUrl,"/").concat(this.selectedFile)).then((function(n){var t={name:e.selectedFile,contents:n.data.contents};n.data.suites&&(t["suites"]=JSON.parse(n.data.suites)),n.data.error&&(t["error"]=n.data.error),n.data.success&&(t["success"]=n.data.success);var l=n.data.locked,i=n.data.breakpoints;e.$emit("file",{file:t,locked:l,breakpoints:i}),e.clear()})).catch((function(n){e.$emit("error","Failed to open ".concat(e.selectedFile,". ").concat(n)),e.clear()}))},saveSuccess:function(){var e=this,n=this.exists(this.items,this.selectedFile);n?this.$dialog.confirm("Are you sure you want to overwrite: ".concat(this.selectedFile),{okText:"Overwrite",cancelText:"Cancel"}).then((function(n){e.$emit("filename",e.selectedFile),e.clear()})):(this.$emit("filename",this.selectedFile),this.clear())},insertFile:function(e,n,t){var l=t.split("/");if(1===l.length)return e.push({id:this.id,name:l[0],file:"ruby",path:this.filepath}),void this.id++;var i=e.findIndex((function(e){return e.name===l[0]}));-1===i?(e.push({id:this.id,name:l[0],children:[],path:this.filepath.split("/").slice(0,n).join("/")}),this.id++,this.insertFile(e[e.length-1].children,n+1,l.slice(1).join("/"))):this.insertFile(e[i].children,n+1,l.slice(1).join("/"))}}}),W=Y,K=(0,F.Z)(W,z,H,!1,null,null,null),J=K.exports,X=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",{attrs:{width:e.width},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[e._v(" "+e._s(e.title)+" ")]),t("v-spacer"),t("div",{staticClass:"mx-2"},[t("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(n){var l=n.on,i=n.attrs;return[t("div",e._g(e._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"downloadIcon"},on:{click:e.download}},[e._v(" mdi-download ")])],1)]}}])},[t("span",[e._v(" Download ")])])],1)],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("span",{staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(e.text))])])]),t("v-card-actions",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary"},on:{click:function(n){e.show=!e.show}}},[e._v(" Ok ")])],1)],1)],1)},Q=[],ee={props:{value:Boolean,text:String,title:String,width:800},computed:{show:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},methods:{download:function(){var e=new Blob([this.text],{type:"text/plain"}),n=document.createElement("a");n.href=URL.createObjectURL(e),n.setAttribute("download","".concat(this.title,".txt")),n.click()}}},ne=ee,te=(0,F.Z)(ne,X,Q,!1,null,null,null),le=te.exports;function ie(){var e="/cosmos/plugins/packages/cosmosc2-tool-tablemanager/src/tools/TableManager/TableManager.vue",n="1e3b314010b0a1f11b4e3ba37696a43cb2aacfa1",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-tablemanager/src/tools/TableManager/TableManager.vue",statementMap:{0:{start:{line:162,column:4},end:{line:181,column:5}},1:{start:{line:185,column:6},end:{line:185,column:28}},2:{start:{line:188,column:6},end:{line:188,column:59}},3:{start:{line:191,column:6},end:{line:255,column:7}},4:{start:{line:199,column:16},end:{line:199,column:30}},5:{start:{line:206,column:16},end:{line:206,column:31}},6:{start:{line:216,column:16},end:{line:216,column:31}},7:{start:{line:223,column:16},end:{line:223,column:29}},8:{start:{line:233,column:16},end:{line:233,column:29}},9:{start:{line:240,column:16},end:{line:240,column:31}},10:{start:{line:250,column:16},end:{line:250,column:29}},11:{start:{line:259,column:4},end:{line:259,column:30}},12:{start:{line:264,column:6},end:{line:264,column:28}},13:{start:{line:265,column:6},end:{line:265,column:25}},14:{start:{line:266,column:6},end:{line:266,column:26}},15:{start:{line:269,column:6},end:{line:269,column:26}},16:{start:{line:274,column:6},end:{line:289,column:7}},17:{start:{line:275,column:8},end:{line:280,column:9}},18:{start:{line:276,column:10},end:{line:276,column:35}},19:{start:{line:277,column:10},end:{line:277,column:30}},20:{start:{line:279,column:10},end:{line:279,column:39}},21:{start:{line:282,column:8},end:{line:282,column:25}},22:{start:{line:284,column:8},end:{line:284,column:47}},23:{start:{line:285,column:8},end:{line:285,column:30}},24:{start:{line:286,column:8},end:{line:286,column:30}},25:{start:{line:288,column:8},end:{line:288,column:28}},26:{start:{line:293,column:6},end:{line:293,column:31}},27:{start:{line:294,column:6},end:{line:294,column:40}},28:{start:{line:295,column:6},end:{line:295,column:44}},29:{start:{line:296,column:6},end:{line:296,column:27}},30:{start:{line:300,column:6},end:{line:300,column:26}},31:{start:{line:302,column:23},end:{line:302,column:37}},32:{start:{line:303,column:6},end:{line:303,column:46}},33:{start:{line:304,column:6},end:{line:304,column:60}},34:{start:{line:305,column:6},end:{line:305,column:60}},35:{start:{line:306,column:6},end:{line:320,column:10}},36:{start:{line:310,column:10},end:{line:310,column:32}},37:{start:{line:311,column:10},end:{line:313,column:18}},38:{start:{line:312,column:12},end:{line:312,column:33}},39:{start:{line:316,column:10},end:{line:316,column:31}},40:{start:{line:317,column:10},end:{line:317,column:40}},41:{start:{line:318,column:10},end:{line:318,column:48}},42:{start:{line:319,column:10},end:{line:319,column:31}},43:{start:{line:321,column:6},end:{line:321,column:21}},44:{start:{line:324,column:6},end:{line:324,column:28}},45:{start:{line:327,column:6},end:{line:327,column:30}},46:{start:{line:328,column:6},end:{line:328,column:21}},47:{start:{line:331,column:6},end:{line:353,column:7}},48:{start:{line:332,column:8},end:{line:352,column:12}},49:{start:{line:338,column:12},end:{line:340,column:14}},50:{start:{line:343,column:12},end:{line:343,column:26}},51:{start:{line:346,column:12},end:{line:351,column:13}},52:{start:{line:347,column:14},end:{line:350,column:16}},53:{start:{line:356,column:6},end:{line:379,column:7}},54:{start:{line:357,column:8},end:{line:378,column:10}},55:{start:{line:359,column:30},end:{line:359,column:65}},56:{start:{line:361,column:29},end:{line:361,column:63}},57:{start:{line:363,column:10},end:{line:365,column:11}},58:{start:{line:363,column:23},end:{line:363,column:24}},59:{start:{line:364,column:12},end:{line:364,column:53}},60:{start:{line:367,column:23},end:{line:369,column:12}},61:{start:{line:371,column:23},end:{line:371,column:50}},62:{start:{line:372,column:10},end:{line:372,column:47}},63:{start:{line:373,column:10},end:{line:376,column:11}},64:{start:{line:377,column:10},end:{line:377,column:22}},65:{start:{line:382,column:6},end:{line:382,column:25}},66:{start:{line:383,column:6},end:{line:383,column:46}},67:{start:{line:385,column:6},end:{line:387,column:7}},68:{start:{line:386,column:8},end:{line:386,column:64}},69:{start:{line:386,column:39},end:{line:386,column:63}},70:{start:{line:388,column:6},end:{line:388,column:41}},71:{start:{line:389,column:6},end:{line:389,column:19}},72:{start:{line:392,column:6},end:{line:403,column:10}},73:{start:{line:401,column:10},end:{line:401,column:30}},74:{start:{line:402,column:10},end:{line:402,column:32}},75:{start:{line:406,column:6},end:{line:406,column:65}},76:{start:{line:409,column:6},end:{line:411,column:7}},77:{start:{line:410,column:8},end:{line:410,column:62}},78:{start:{line:414,column:6},end:{line:418,column:7}},79:{start:{line:415,column:8},end:{line:417,column:38}},80:{start:{line:419,column:23},end:{line:419,column:37}},81:{start:{line:420,column:6},end:{line:420,column:46}},82:{start:{line:421,column:6},end:{line:421,column:55}},83:{start:{line:422,column:6},end:{line:475,column:10}},84:{start:{line:426,column:10},end:{line:426,column:54}},85:{start:{line:427,column:10},end:{line:453,column:12}},86:{start:{line:428,column:12},end:{line:452,column:13}},87:{start:{line:432,column:31},end:{line:435,column:17}},88:{start:{line:436,column:16},end:{line:450,column:17}},89:{start:{line:439,column:18},end:{line:442,column:19}},90:{start:{line:446,column:18},end:{line:449,column:19}},91:{start:{line:455,column:10},end:{line:460,column:11}},92:{start:{line:456,column:12},end:{line:459,column:14}},93:{start:{line:463,column:10},end:{line:474,column:11}},94:{start:{line:464,column:12},end:{line:467,column:14}},95:{start:{line:468,column:12},end:{line:468,column:32}},96:{start:{line:470,column:12},end:{line:473,column:14}},97:{start:{line:478,column:23},end:{line:478,column:37}},98:{start:{line:479,column:6},end:{line:479,column:48}},99:{start:{line:480,column:6},end:{line:485,column:8}},100:{start:{line:483,column:8},end:{line:483,column:46}},101:{start:{line:484,column:8},end:{line:484,column:37}},102:{start:{line:488,column:6},end:{line:488,column:29}},103:{start:{line:489,column:6},end:{line:489,column:31}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:161,column:2},end:{line:161,column:3}},loc:{start:{line:161,column:9},end:{line:182,column:3}},line:161},1:{name:"(anonymous_1)",decl:{start:{line:184,column:14},end:{line:184,column:15}},loc:{start:{line:184,column:26},end:{line:186,column:5}},line:184},2:{name:"(anonymous_2)",decl:{start:{line:187,column:4},end:{line:187,column:5}},loc:{start:{line:187,column:19},end:{line:189,column:5}},line:187},3:{name:"(anonymous_3)",decl:{start:{line:190,column:11},end:{line:190,column:12}},loc:{start:{line:190,column:23},end:{line:256,column:5}},line:190},4:{name:"(anonymous_4)",decl:{start:{line:198,column:23},end:{line:198,column:24}},loc:{start:{line:198,column:29},end:{line:200,column:15}},line:198},5:{name:"(anonymous_5)",decl:{start:{line:205,column:23},end:{line:205,column:24}},loc:{start:{line:205,column:29},end:{line:207,column:15}},line:205},6:{name:"(anonymous_6)",decl:{start:{line:215,column:23},end:{line:215,column:24}},loc:{start:{line:215,column:29},end:{line:217,column:15}},line:215},7:{name:"(anonymous_7)",decl:{start:{line:222,column:23},end:{line:222,column:24}},loc:{start:{line:222,column:29},end:{line:224,column:15}},line:222},8:{name:"(anonymous_8)",decl:{start:{line:232,column:23},end:{line:232,column:24}},loc:{start:{line:232,column:29},end:{line:234,column:15}},line:232},9:{name:"(anonymous_9)",decl:{start:{line:239,column:23},end:{line:239,column:24}},loc:{start:{line:239,column:29},end:{line:241,column:15}},line:239},10:{name:"(anonymous_10)",decl:{start:{line:249,column:23},end:{line:249,column:24}},loc:{start:{line:249,column:29},end:{line:251,column:15}},line:249},11:{name:"(anonymous_11)",decl:{start:{line:258,column:2},end:{line:258,column:3}},loc:{start:{line:258,column:12},end:{line:260,column:3}},line:258},12:{name:"(anonymous_12)",decl:{start:{line:263,column:13},end:{line:263,column:14}},loc:{start:{line:263,column:25},end:{line:267,column:5}},line:263},13:{name:"(anonymous_13)",decl:{start:{line:268,column:14},end:{line:268,column:15}},loc:{start:{line:268,column:26},end:{line:270,column:5}},line:268},14:{name:"(anonymous_14)",decl:{start:{line:272,column:13},end:{line:272,column:14}},loc:{start:{line:272,column:41},end:{line:290,column:5}},line:272},15:{name:"(anonymous_15)",decl:{start:{line:292,column:4},end:{line:292,column:5}},loc:{start:{line:292,column:20},end:{line:297,column:5}},line:292},16:{name:"(anonymous_16)",decl:{start:{line:298,column:14},end:{line:298,column:15}},loc:{start:{line:298,column:26},end:{line:322,column:5}},line:298},17:{name:"(anonymous_17)",decl:{start:{line:309,column:14},end:{line:309,column:15}},loc:{start:{line:309,column:28},end:{line:314,column:9}},line:309},18:{name:"(anonymous_18)",decl:{start:{line:311,column:21},end:{line:311,column:22}},loc:{start:{line:311,column:27},end:{line:313,column:11}},line:311},19:{name:"(anonymous_19)",decl:{start:{line:315,column:15},end:{line:315,column:16}},loc:{start:{line:315,column:33},end:{line:320,column:9}},line:315},20:{name:"(anonymous_20)",decl:{start:{line:323,column:12},end:{line:323,column:13}},loc:{start:{line:323,column:24},end:{line:325,column:5}},line:323},21:{name:"(anonymous_21)",decl:{start:{line:326,column:20},end:{line:326,column:21}},loc:{start:{line:326,column:40},end:{line:329,column:5}},line:326},22:{name:"(anonymous_22)",decl:{start:{line:330,column:12},end:{line:330,column:13}},loc:{start:{line:330,column:24},end:{line:354,column:5}},line:330},23:{name:"(anonymous_23)",decl:{start:{line:337,column:16},end:{line:337,column:17}},loc:{start:{line:337,column:28},end:{line:341,column:11}},line:337},24:{name:"(anonymous_24)",decl:{start:{line:342,column:16},end:{line:342,column:17}},loc:{start:{line:342,column:30},end:{line:344,column:11}},line:342},25:{name:"(anonymous_25)",decl:{start:{line:345,column:17},end:{line:345,column:18}},loc:{start:{line:345,column:28},end:{line:352,column:11}},line:345},26:{name:"(anonymous_26)",decl:{start:{line:355,column:14},end:{line:355,column:15}},loc:{start:{line:355,column:26},end:{line:380,column:5}},line:355},27:{name:"(anonymous_27)",decl:{start:{line:357,column:60},end:{line:357,column:61}},loc:{start:{line:357,column:74},end:{line:378,column:9}},line:357},28:{name:"(anonymous_28)",decl:{start:{line:381,column:4},end:{line:381,column:5}},loc:{start:{line:381,column:19},end:{line:390,column:5}},line:381},29:{name:"(anonymous_29)",decl:{start:{line:386,column:26},end:{line:386,column:27}},loc:{start:{line:386,column:39},end:{line:386,column:63}},line:386},30:{name:"(anonymous_30)",decl:{start:{line:391,column:24},end:{line:391,column:25}},loc:{start:{line:391,column:36},end:{line:404,column:5}},line:391},31:{name:"(anonymous_31)",decl:{start:{line:400,column:14},end:{line:400,column:15}},loc:{start:{line:400,column:20},end:{line:403,column:9}},line:400},32:{name:"(anonymous_32)",decl:{start:{line:405,column:14},end:{line:405,column:15}},loc:{start:{line:405,column:26},end:{line:407,column:5}},line:405},33:{name:"(anonymous_33)",decl:{start:{line:408,column:16},end:{line:408,column:17}},loc:{start:{line:408,column:28},end:{line:412,column:5}},line:408},34:{name:"(anonymous_34)",decl:{start:{line:413,column:19},end:{line:413,column:20}},loc:{start:{line:413,column:56},end:{line:476,column:5}},line:413},35:{name:"(anonymous_35)",decl:{start:{line:425,column:14},end:{line:425,column:15}},loc:{start:{line:425,column:28},end:{line:461,column:9}},line:425},36:{name:"(anonymous_36)",decl:{start:{line:427,column:49},end:{line:427,column:50}},loc:{start:{line:427,column:60},end:{line:453,column:11}},line:427},37:{name:"(anonymous_37)",decl:{start:{line:431,column:41},end:{line:431,column:42}},loc:{start:{line:431,column:54},end:{line:451,column:15}},line:431},38:{name:"(anonymous_38)",decl:{start:{line:462,column:15},end:{line:462,column:16}},loc:{start:{line:462,column:26},end:{line:475,column:9}},line:462},39:{name:"(anonymous_39)",decl:{start:{line:477,column:20},end:{line:477,column:21}},loc:{start:{line:477,column:36},end:{line:486,column:5}},line:477},40:{name:"(anonymous_40)",decl:{start:{line:482,column:14},end:{line:482,column:15}},loc:{start:{line:482,column:28},end:{line:485,column:7}},line:482},41:{name:"(anonymous_41)",decl:{start:{line:487,column:14},end:{line:487,column:15}},loc:{start:{line:487,column:48},end:{line:490,column:5}},line:487}},branchMap:{0:{loc:{start:{line:274,column:6},end:{line:289,column:7}},type:"if",locations:[{start:{line:274,column:6},end:{line:289,column:7}},{start:{line:281,column:13},end:{line:289,column:7}}],line:274},1:{loc:{start:{line:275,column:8},end:{line:280,column:9}},type:"if",locations:[{start:{line:275,column:8},end:{line:280,column:9}},{start:{line:278,column:15},end:{line:280,column:9}}],line:275},2:{loc:{start:{line:331,column:6},end:{line:353,column:7}},type:"if",locations:[{start:{line:331,column:6},end:{line:353,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:331},3:{loc:{start:{line:346,column:12},end:{line:351,column:13}},type:"if",locations:[{start:{line:346,column:12},end:{line:351,column:13}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:346},4:{loc:{start:{line:356,column:6},end:{line:379,column:7}},type:"if",locations:[{start:{line:356,column:6},end:{line:379,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:356},5:{loc:{start:{line:409,column:6},end:{line:411,column:7}},type:"if",locations:[{start:{line:409,column:6},end:{line:411,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:409},6:{loc:{start:{line:409,column:10},end:{line:409,column:48}},type:"binary-expr",locations:[{start:{line:409,column:10},end:{line:409,column:30}},{start:{line:409,column:34},end:{line:409,column:48}}],line:409},7:{loc:{start:{line:413,column:29},end:{line:413,column:54}},type:"default-arg",locations:[{start:{line:413,column:50},end:{line:413,column:54}}],line:413},8:{loc:{start:{line:414,column:6},end:{line:418,column:7}},type:"if",locations:[{start:{line:414,column:6},end:{line:418,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:414},9:{loc:{start:{line:436,column:16},end:{line:450,column:17}},type:"if",locations:[{start:{line:436,column:16},end:{line:450,column:17}},{start:{line:443,column:23},end:{line:450,column:17}}],line:436},10:{loc:{start:{line:455,column:10},end:{line:460,column:11}},type:"if",locations:[{start:{line:455,column:10},end:{line:460,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:455},11:{loc:{start:{line:463,column:10},end:{line:474,column:11}},type:"if",locations:[{start:{line:463,column:10},end:{line:474,column:11}},{start:{line:469,column:17},end:{line:474,column:11}}],line:463}},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,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103: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,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},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0],8:[0,0],9:[0,0],10:[0,0],11:[0,0]},inputSourceMap:{version:3,sources:["TableManager.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkJA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;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;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",file:"TableManager.vue",sourceRoot:"src/tools/TableManager",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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <top-bar :menus=\"menus\" :title=\"title\" />\n <v-snackbar v-model=\"showReadOnlyToast\" top :timeout=\"-1\" color=\"orange\">\n <v-icon> mdi-pencil-off </v-icon>\n {{ lockedBy }} is editing this script. Editor is in read-only mode\n <template v-slot:action=\"{ attrs }\">\n <v-btn\n text\n v-bind=\"attrs\"\n color=\"danger\"\n @click=\"confirmLocalUnlock\"\n data-test=\"unlock-button\"\n >\n Unlock\n </v-btn>\n <v-btn\n text\n v-bind=\"attrs\"\n @click=\"\n () => {\n showReadOnlyToast = false\n }\n \"\n >\n dismiss\n </v-btn>\n </template>\n </v-snackbar>\n <v-file-input\n show-size\n v-model=\"fileInput\"\n ref=\"fileInput\"\n accept=\".bin\"\n data-test=\"file-input\"\n style=\"position: fixed; top: -100%\"\n />\n <v-text-field\n outlined\n dense\n readonly\n hide-details\n label=\"Definition\"\n v-model=\"definitionFilename\"\n id=\"definition-filename\"\n data-test=\"definition-filename\"\n />\n <v-text-field\n outlined\n dense\n readonly\n hide-details\n label=\"Filename\"\n v-model=\"fullFilename\"\n id=\"filename\"\n data-test=\"filename\"\n />\n <v-card>\n <v-card-title>\n Items\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n append-icon=\"mdi-magnify\"\n label=\"Search\"\n single-line\n hide-details\n />\n </v-card-title>\n <v-tabs v-model=\"curTab\">\n <v-tab v-for=\"(table, index) in tables\" :key=\"index\">\n {{ table.name }}\n </v-tab>\n </v-tabs>\n <v-tabs-items v-model=\"curTab\">\n <v-tab-item\n v-for=\"(table, index) in tables\"\n :key=\"`${filename}${index}`\"\n >\n <v-data-table\n :headers=\"table.headers\"\n :items=\"table.rows\"\n :search=\"search\"\n calculate-widths\n disable-pagination\n hide-default-footer\n multi-sort\n dense\n >\n <template v-slot:item=\"{ item }\">\n <table-row\n :items=\"item\"\n :key=\"JSON.stringify(item[0])\"\n @change=\"onChange(item, $event)\"\n />\n </template>\n </v-data-table>\n </v-tab-item>\n </v-tabs-items>\n </v-card>\n <file-open-save-dialog\n v-if=\"fileOpen\"\n v-model=\"fileOpen\"\n type=\"open\"\n api-url=\"/cosmos-api/tables\"\n @file=\"setFile($event)\"\n @error=\"setError($event)\"\n />\n <file-open-save-dialog\n v-if=\"showSaveAs\"\n v-model=\"showSaveAs\"\n type=\"save\"\n require-target-parent-dir\n api-url=\"/cosmos-api/tables\"\n :input-filename=\"filename\"\n @filename=\"saveAsFilename($event)\"\n @error=\"setError($event)\"\n />\n <simple-text-dialog\n v-model=\"showError\"\n :title=\"errorTitle\"\n :text=\"errorText\"\n />\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport { CosmosApi } from '@cosmosc2/tool-common/src/services/cosmos-api'\nimport TopBar from '@cosmosc2/tool-common/src/components/TopBar'\nimport TableRow from '@/tools/TableManager/TableRow'\nimport FileOpenSaveDialog from '@cosmosc2/tool-common/src/components/FileOpenSaveDialog'\nimport SimpleTextDialog from '@cosmosc2/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n TopBar,\n TableRow,\n FileOpenSaveDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n title: 'Table Manager',\n search: '',\n curTab: null,\n tables: [],\n api: null,\n definition: null,\n fileInput: '',\n definitionFilename: '',\n fileNew: false,\n filename: '',\n fileModified: '',\n lockedBy: null,\n fileOpen: false,\n showSave: false,\n showSaveAs: false,\n showError: false,\n errorTitle: '',\n errorText: '',\n }\n },\n computed: {\n readOnly: function () {\n return !!this.lockedBy\n },\n fullFilename() {\n return `${this.filename} ${this.fileModified}`.trim()\n },\n menus: function () {\n return [\n {\n label: 'File',\n items: [\n {\n label: 'New File',\n icon: 'mdi-file-plus',\n command: () => {\n this.newFile()\n },\n },\n {\n label: 'Open File',\n icon: 'mdi-folder-open',\n command: () => {\n this.openFile()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Save File',\n icon: 'mdi-content-save',\n command: () => {\n this.saveFile()\n },\n },\n {\n label: 'Save As...',\n icon: 'mdi-content-save',\n command: () => {\n this.saveAs()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Upload',\n icon: 'mdi-cloud-upload',\n command: () => {\n this.upload()\n },\n },\n {\n label: 'Download',\n icon: 'mdi-cloud-download',\n command: () => {\n this.download()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Delete File',\n icon: 'mdi-delete',\n command: () => {\n this.delete()\n },\n },\n ],\n },\n ]\n },\n },\n created() {\n this.api = new CosmosApi()\n },\n methods: {\n // File menu actions\n newFile: function () {\n this.fileModified = ''\n this.fileNew = true\n this.fileOpen = true\n },\n openFile: function () {\n this.fileOpen = true\n },\n // Called by the FileOpenDialog to set the file contents\n setFile: function ({ file, locked }) {\n // They opened a definition file so create a new binary\n if (file.name.includes('.txt')) {\n if (this.fileNew) {\n this.buildNewBinary(file)\n this.fileNew = false\n } else {\n this.getDefinition(file.name)\n }\n } else {\n this.unlockFile() // first unlock what was just being edited\n // Split off the ' *' which indicates a file is modified on the server\n this.filename = file.name.split('*')[0]\n this.fileModified = ''\n this.lockedBy = locked\n\n this.getDefinition()\n }\n },\n // Called by the FileOpenSaveDialog on error\n setError(event) {\n this.errorTitle = 'Error'\n this.errorText = `Error: ${event}`\n this.errorText = response.data.message\n this.showError = true\n },\n saveFile: function () {\n // Save a file by posting the new contents\n this.showSave = true\n\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', this.definitionFilename)\n formData.append('tables', JSON.stringify(this.tables))\n Api.post(`/cosmos-api/tables/${this.filename}`, {\n data: formData,\n })\n .then((response) => {\n this.fileModified = ''\n setTimeout(() => {\n this.showSave = false\n }, 2000)\n })\n .catch(({ response }) => {\n this.showSave = false\n this.errorTitle = 'Save Error'\n this.errorText = response.data.message\n this.showError = true\n })\n this.lockFile() // Ensure this file is locked for editing\n },\n saveAs: function () {\n this.showSaveAs = true\n },\n saveAsFilename: function (filename) {\n this.filename = filename\n this.saveFile()\n },\n delete: function () {\n if (this.filename !== '') {\n this.$dialog\n .confirm(`Permanently delete file: ${this.filename}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(`/cosmos-api/tables/${this.filename}`, {\n data: {},\n })\n })\n .then((response) => {\n this.newFile()\n })\n .catch((error) => {\n if (error) {\n this.$notify.caution({\n title: 'Error',\n body: `Error deleting file: ${error}`,\n })\n }\n })\n }\n },\n download: function () {\n if (this.filename !== '') {\n Api.get(`/cosmos-api/tables/${this.filename}`).then((response) => {\n // Decode Base64 string\n const decodedData = window.atob(response.data.contents)\n // Create UNIT8ARRAY of size same as row data length\n const uInt8Array = new Uint8Array(decodedData.length)\n // Insert all character code into uInt8Array\n for (let i = 0; i < decodedData.length; ++i) {\n uInt8Array[i] = decodedData.charCodeAt(i)\n }\n // Return BLOB image after conversion\n const blob = new Blob([uInt8Array], {\n type: 'application/octet-stream',\n })\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.setAttribute(\n 'download',\n this.filename.substring(this.filename.lastIndexOf('/') + 1)\n )\n link.click()\n })\n }\n },\n async upload() {\n this.fileInput = ''\n this.$refs.fileInput.$refs.input.click()\n // Wait for the file to be set by the dialog so upload works\n while (this.fileInput === '') {\n await new Promise((resolve) => setTimeout(resolve, 500))\n }\n this.filename = this.fileInput.name\n this.saveAs()\n },\n confirmLocalUnlock: function () {\n this.$dialog\n .confirm(\n 'Are you sure you want to unlock this file for editing? If another user is editing this file, your changes might conflict with each other.',\n {\n okText: 'Force Unlock',\n cancelText: 'Cancel',\n }\n )\n .then(() => {\n this.lockedBy = null\n return this.lockFile() // Re-lock it as this user so it's locked for anyone else who opens it\n })\n },\n lockFile: function () {\n return Api.post(`/cosmos-api/tables/${this.filename}/lock`)\n },\n unlockFile: function () {\n if (this.filename !== '' && !this.readOnly) {\n Api.post(`/cosmos-api/tables/${this.filename}/unlock`)\n }\n },\n getDefinition: function (definitionFilename = null) {\n if (!definitionFilename) {\n definitionFilename = this.filename\n .replace('/bin/', '/config/')\n .replace('.bin', '_def.txt')\n }\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', definitionFilename)\n Api.post(`/cosmos-api/tables/load`, {\n data: formData,\n })\n .then((response) => {\n this.definitionFilename = definitionFilename\n this.tables = response.data.tables.map((table) => {\n return {\n ...table,\n // Build up the headers for proper searching\n headers: table.headers.map((text, i) => {\n const header = {\n text,\n filterable: text !== 'INDEX',\n }\n if (table.numColumns === 1) {\n // In the 1D table the searchable value is the first value in the row\n // Note the names in 1D are INDEX, NAME, VALUE\n return {\n ...header,\n value: `[0].${text.toLowerCase()}`,\n }\n } else {\n // In the 2D table the searchable value is always in the value attribute\n // of the current column item\n return {\n ...header,\n value: `[${i}].value`,\n }\n }\n }),\n }\n })\n\n if (response.data['errors']) {\n this.$notify.caution({\n title: 'Warning',\n body: response.data['errors'],\n })\n }\n })\n .catch((error) => {\n if (error.response.status == 404) {\n this.$notify.normal({\n title: 'Definition File Not Found',\n body: `Definition file ${definitionFilename} not found. Please select definition file.`,\n })\n this.fileOpen = true\n } else {\n this.$notify.serious({\n title: 'Error',\n body: `Error loading due to ${error.response.statusText}. Status: ${error.response.status}`,\n })\n }\n })\n },\n buildNewBinary: function (file) {\n const formData = new FormData()\n formData.append('contents', file.contents)\n Api.post(`/cosmos-api/tables/${file.name}/generate`, {\n data: formData,\n }).then((response) => {\n this.filename = response.data.filename\n this.getDefinition(file.name)\n })\n },\n onChange: function (item, { index, event }) {\n this.fileModified = '*'\n item[index].value = event\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1e3b314010b0a1f11b4e3ba37696a43cb2aacfa1"},o=t[l]||(t[l]={});o[e]&&o[e].hash===n||(o[e]=i);var a=o[e];return ie=function(){return a},a}ie();var oe={components:{TopBar:S,TableRow:q,FileOpenSaveDialog:J,SimpleTextDialog:le},data:function(){return ie().f[0]++,ie().s[0]++,{title:"Table Manager",search:"",curTab:null,tables:[],api:null,definition:null,fileInput:"",definitionFilename:"",fileNew:!1,filename:"",fileModified:"",lockedBy:null,fileOpen:!1,showSave:!1,showSaveAs:!1,showError:!1,errorTitle:"",errorText:""}},computed:{readOnly:function(){return ie().f[1]++,ie().s[1]++,!!this.lockedBy},fullFilename:function(){return ie().f[2]++,ie().s[2]++,"".concat(this.filename," ").concat(this.fileModified).trim()},menus:function(){var e=this;return ie().f[3]++,ie().s[3]++,[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",command:function(){ie().f[4]++,ie().s[4]++,e.newFile()}},{label:"Open File",icon:"mdi-folder-open",command:function(){ie().f[5]++,ie().s[5]++,e.openFile()}},{divider:!0},{label:"Save File",icon:"mdi-content-save",command:function(){ie().f[6]++,ie().s[6]++,e.saveFile()}},{label:"Save As...",icon:"mdi-content-save",command:function(){ie().f[7]++,ie().s[7]++,e.saveAs()}},{divider:!0},{label:"Upload",icon:"mdi-cloud-upload",command:function(){ie().f[8]++,ie().s[8]++,e.upload()}},{label:"Download",icon:"mdi-cloud-download",command:function(){ie().f[9]++,ie().s[9]++,e.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",command:function(){ie().f[10]++,ie().s[10]++,e.delete()}}]}]}},created:function(){ie().f[11]++,ie().s[11]++,this.api=new y},methods:{newFile:function(){ie().f[12]++,ie().s[12]++,this.fileModified="",ie().s[13]++,this.fileNew=!0,ie().s[14]++,this.fileOpen=!0},openFile:function(){ie().f[13]++,ie().s[15]++,this.fileOpen=!0},setFile:function(e){var n=e.file,t=e.locked;ie().f[14]++,ie().s[16]++,n.name.includes(".txt")?(ie().b[0][0]++,ie().s[17]++,this.fileNew?(ie().b[1][0]++,ie().s[18]++,this.buildNewBinary(n),ie().s[19]++,this.fileNew=!1):(ie().b[1][1]++,ie().s[20]++,this.getDefinition(n.name))):(ie().b[0][1]++,ie().s[21]++,this.unlockFile(),ie().s[22]++,this.filename=n.name.split("*")[0],ie().s[23]++,this.fileModified="",ie().s[24]++,this.lockedBy=t,ie().s[25]++,this.getDefinition())},setError:function(e){ie().f[15]++,ie().s[26]++,this.errorTitle="Error",ie().s[27]++,this.errorText="Error: ".concat(e),ie().s[28]++,this.errorText=response.data.message,ie().s[29]++,this.showError=!0},saveFile:function(){var e=this;ie().f[16]++,ie().s[30]++,this.showSave=!0;var n=(ie().s[31]++,new FormData);ie().s[32]++,n.append("binary",this.filename),ie().s[33]++,n.append("definition",this.definitionFilename),ie().s[34]++,n.append("tables",JSON.stringify(this.tables)),ie().s[35]++,p.post("/cosmos-api/tables/".concat(this.filename),{data:n}).then((function(n){ie().f[17]++,ie().s[36]++,e.fileModified="",ie().s[37]++,setTimeout((function(){ie().f[18]++,ie().s[38]++,e.showSave=!1}),2e3)})).catch((function(n){var t=n.response;ie().f[19]++,ie().s[39]++,e.showSave=!1,ie().s[40]++,e.errorTitle="Save Error",ie().s[41]++,e.errorText=t.data.message,ie().s[42]++,e.showError=!0})),ie().s[43]++,this.lockFile()},saveAs:function(){ie().f[20]++,ie().s[44]++,this.showSaveAs=!0},saveAsFilename:function(e){ie().f[21]++,ie().s[45]++,this.filename=e,ie().s[46]++,this.saveFile()},delete:function(){var e=this;ie().f[22]++,ie().s[47]++,""!==this.filename?(ie().b[2][0]++,ie().s[48]++,this.$dialog.confirm("Permanently delete file: ".concat(this.filename),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return ie().f[23]++,ie().s[49]++,p["delete"]("/cosmos-api/tables/".concat(e.filename),{data:{}})})).then((function(n){ie().f[24]++,ie().s[50]++,e.newFile()})).catch((function(n){ie().f[25]++,ie().s[51]++,n?(ie().b[3][0]++,ie().s[52]++,e.$notify.caution({title:"Error",body:"Error deleting file: ".concat(n)})):ie().b[3][1]++}))):ie().b[2][1]++},download:function(){var e=this;ie().f[26]++,ie().s[53]++,""!==this.filename?(ie().b[4][0]++,ie().s[54]++,p.get("/cosmos-api/tables/".concat(this.filename)).then((function(n){ie().f[27]++;var t=(ie().s[55]++,window.atob(n.data.contents)),l=(ie().s[56]++,new Uint8Array(t.length));ie().s[57]++;for(var i=(ie().s[58]++,0);i<t.length;++i)ie().s[59]++,l[i]=t.charCodeAt(i);var o=(ie().s[60]++,new Blob([l],{type:"application/octet-stream"})),a=(ie().s[61]++,document.createElement("a"));ie().s[62]++,a.href=URL.createObjectURL(o),ie().s[63]++,a.setAttribute("download",e.filename.substring(e.filename.lastIndexOf("/")+1)),ie().s[64]++,a.click()}))):ie().b[4][1]++},upload:function(){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:ie().f[28]++,ie().s[65]++,e.fileInput="",ie().s[66]++,e.$refs.fileInput.$refs.input.click(),ie().s[67]++;case 6:if(""!==e.fileInput){n.next=12;break}return ie().s[68]++,n.next=10,new Promise((function(e){return ie().f[29]++,ie().s[69]++,setTimeout(e,500)}));case 10:n.next=6;break;case 12:ie().s[70]++,e.filename=e.fileInput.name,ie().s[71]++,e.saveAs();case 16:case"end":return n.stop()}}),n)})))()},confirmLocalUnlock:function(){var e=this;ie().f[30]++,ie().s[72]++,this.$dialog.confirm("Are you sure you want to unlock this file for editing? If another user is editing this file, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then((function(){return ie().f[31]++,ie().s[73]++,e.lockedBy=null,ie().s[74]++,e.lockFile()}))},lockFile:function(){return ie().f[32]++,ie().s[75]++,p.post("/cosmos-api/tables/".concat(this.filename,"/lock"))},unlockFile:function(){ie().f[33]++,ie().s[76]++,ie().b[6][0]++,""===this.filename||(ie().b[6][1]++,this.readOnly)?ie().b[5][1]++:(ie().b[5][0]++,ie().s[77]++,p.post("/cosmos-api/tables/".concat(this.filename,"/unlock")))},getDefinition:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(ie().b[7][0]++,null);ie().f[34]++,ie().s[78]++,n?ie().b[8][1]++:(ie().b[8][0]++,ie().s[79]++,n=this.filename.replace("/bin/","/config/").replace(".bin","_def.txt"));var t=(ie().s[80]++,new FormData);ie().s[81]++,t.append("binary",this.filename),ie().s[82]++,t.append("definition",n),ie().s[83]++,p.post("/cosmos-api/tables/load",{data:t}).then((function(t){ie().f[35]++,ie().s[84]++,e.definitionFilename=n,ie().s[85]++,e.tables=t.data.tables.map((function(e){return ie().f[36]++,ie().s[86]++,(0,o.Z)((0,o.Z)({},e),{},{headers:e.headers.map((function(n,t){ie().f[37]++;var l=(ie().s[87]++,{text:n,filterable:"INDEX"!==n});return ie().s[88]++,1===e.numColumns?(ie().b[9][0]++,ie().s[89]++,(0,o.Z)((0,o.Z)({},l),{},{value:"[0].".concat(n.toLowerCase())})):(ie().b[9][1]++,ie().s[90]++,(0,o.Z)((0,o.Z)({},l),{},{value:"[".concat(t,"].value")}))}))})})),ie().s[91]++,t.data["errors"]?(ie().b[10][0]++,ie().s[92]++,e.$notify.caution({title:"Warning",body:t.data["errors"]})):ie().b[10][1]++})).catch((function(t){ie().f[38]++,ie().s[93]++,404==t.response.status?(ie().b[11][0]++,ie().s[94]++,e.$notify.normal({title:"Definition File Not Found",body:"Definition file ".concat(n," not found. Please select definition file.")}),ie().s[95]++,e.fileOpen=!0):(ie().b[11][1]++,ie().s[96]++,e.$notify.serious({title:"Error",body:"Error loading due to ".concat(t.response.statusText,". Status: ").concat(t.response.status)}))}))},buildNewBinary:function(e){var n=this;ie().f[39]++;var t=(ie().s[97]++,new FormData);ie().s[98]++,t.append("contents",e.contents),ie().s[99]++,p.post("/cosmos-api/tables/".concat(e.name,"/generate"),{data:t}).then((function(t){ie().f[40]++,ie().s[100]++,n.filename=t.data.filename,ie().s[101]++,n.getDefinition(e.name)}))},onChange:function(e,n){var t=n.index,l=n.event;ie().f[41]++,ie().s[102]++,this.fileModified="*",ie().s[103]++,e[t].value=l}}},ae=oe,se=(0,F.Z)(ae,l,i,!1,null,null,null),ce=se.exports},3938:function(e,n,t){"use strict";t.r(n);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([e.id,".v-list[data-v-e3bb7458] .v-label{margin-left:5px}.v-list-item__icon[data-v-e3bb7458]{margin-right:15px!important}.v-list-item__title[data-v-e3bb7458]{color:#fff}",""]),n["default"]=s},7162:function(e,n,t){var l=t(3938);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[e.id,l,""]]),l.locals&&(e.exports=l.locals);var i=t(3514).Z;i("a2f2c426",l,!0,{sourceMap:!1,shadowMode:!1})}}]);
|
2
|
-
//# sourceMappingURL=550.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"js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,CACNhJ,KAAMuM,IACdtD,MAAA,uCACQ,EAAR,yBADA,cAEQ,EAAR,0BAGIhL,SAAU,SAAdA,EAAAA,GAAA,mDACM1C,KAAKqQ,aAAe,IAD1B,cAEM/N,EAAKL,GAAOd,MAAQ4K,KCxe6W,MCOnY,IAAY,OACd,GACAjM,EACAsD,GACA,EACA,KACA,KACA,MAIF,GAAe,GAAiB,S,mFCf5BuO,EAA0B,IAA4B,KAE1DA,EAAwBnG,KAAK,CAACoG,EAAO3L,GAAI,qKAAsK,KAE/M,gB,qBCJA,IAAI4L,EAAU,EAAQ,MACnBA,EAAQC,aAAYD,EAAUA,EAAQ3H,SACnB,kBAAZ2H,IAAsBA,EAAU,CAAC,CAACD,EAAO3L,GAAI4L,EAAS,MAC7DA,EAAQE,SAAQH,EAAOI,QAAUH,EAAQE,QAE5C,IAAIE,EAAM,UACGA,EAAI,WAAYJ,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa","sources":["webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableManager.vue?6f1b","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/services/axios.js","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/services/api.js","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/services/cosmos-api.js","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/TopBar.vue?228d","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/TopBar.vue","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/TopBar.vue?adab","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/TopBar.vue?dfc0","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableRow.vue?74a6","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableItem.vue?d63b","webpack://@cosmosc2/tool-tablemanager/src/tools/TableManager/TableItem.vue","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableItem.vue?0e88","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableItem.vue","webpack://@cosmosc2/tool-tablemanager/src/tools/TableManager/TableRow.vue","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableRow.vue?a252","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableRow.vue","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/FileOpenSaveDialog.vue?6ad0","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/FileOpenSaveDialog.vue","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/FileOpenSaveDialog.vue?4db4","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/FileOpenSaveDialog.vue?819c","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/SimpleTextDialog.vue?451f","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/SimpleTextDialog.vue","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/SimpleTextDialog.vue?88d9","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/SimpleTextDialog.vue?3eda","webpack://@cosmosc2/tool-tablemanager/src/tools/TableManager/TableManager.vue","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableManager.vue?af17","webpack://@cosmosc2/tool-tablemanager/./src/tools/TableManager/TableManager.vue","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/TopBar.vue?b2db","webpack://@cosmosc2/tool-tablemanager/../cosmosc2-tool-common/src/components/TopBar.vue?5429"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('top-bar',{attrs:{\"menus\":_vm.menus,\"title\":_vm.title}}),_c('v-snackbar',{attrs:{\"top\":\"\",\"timeout\":-1,\"color\":\"orange\"},scopedSlots:_vm._u([{key:\"action\",fn:function(ref){\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._b({attrs:{\"text\":\"\",\"color\":\"danger\",\"data-test\":\"unlock-button\"},on:{\"click\":_vm.confirmLocalUnlock}},'v-btn',attrs,false),[_vm._v(\" Unlock \")]),_c('v-btn',_vm._b({attrs:{\"text\":\"\"},on:{\"click\":function () {\n _vm.showReadOnlyToast = false\n }}},'v-btn',attrs,false),[_vm._v(\" dismiss \")])]}}]),model:{value:(_vm.showReadOnlyToast),callback:function ($$v) {_vm.showReadOnlyToast=$$v},expression:\"showReadOnlyToast\"}},[_c('v-icon',[_vm._v(\" mdi-pencil-off \")]),_vm._v(\" \"+_vm._s(_vm.lockedBy)+\" is editing this script. Editor is in read-only mode \")],1),_c('v-file-input',{ref:\"fileInput\",staticStyle:{\"position\":\"fixed\",\"top\":\"-100%\"},attrs:{\"show-size\":\"\",\"accept\":\".bin\",\"data-test\":\"file-input\"},model:{value:(_vm.fileInput),callback:function ($$v) {_vm.fileInput=$$v},expression:\"fileInput\"}}),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"readonly\":\"\",\"hide-details\":\"\",\"label\":\"Definition\",\"id\":\"definition-filename\",\"data-test\":\"definition-filename\"},model:{value:(_vm.definitionFilename),callback:function ($$v) {_vm.definitionFilename=$$v},expression:\"definitionFilename\"}}),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"readonly\":\"\",\"hide-details\":\"\",\"label\":\"Filename\",\"id\":\"filename\",\"data-test\":\"filename\"},model:{value:(_vm.fullFilename),callback:function ($$v) {_vm.fullFilename=$$v},expression:\"fullFilename\"}}),_c('v-card',[_c('v-card-title',[_vm._v(\" Items \"),_c('v-spacer'),_c('v-text-field',{attrs:{\"append-icon\":\"mdi-magnify\",\"label\":\"Search\",\"single-line\":\"\",\"hide-details\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_c('v-tabs',{model:{value:(_vm.curTab),callback:function ($$v) {_vm.curTab=$$v},expression:\"curTab\"}},_vm._l((_vm.tables),function(table,index){return _c('v-tab',{key:index},[_vm._v(\" \"+_vm._s(table.name)+\" \")])}),1),_c('v-tabs-items',{model:{value:(_vm.curTab),callback:function ($$v) {_vm.curTab=$$v},expression:\"curTab\"}},_vm._l((_vm.tables),function(table,index){return _c('v-tab-item',{key:(\"\" + _vm.filename + index)},[_c('v-data-table',{attrs:{\"headers\":table.headers,\"items\":table.rows,\"search\":_vm.search,\"calculate-widths\":\"\",\"disable-pagination\":\"\",\"hide-default-footer\":\"\",\"multi-sort\":\"\",\"dense\":\"\"},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\n var item = ref.item;\nreturn [_c('table-row',{key:JSON.stringify(item[0]),attrs:{\"items\":item},on:{\"change\":function($event){return _vm.onChange(item, $event)}}})]}}],null,true)})],1)}),1)],1),(_vm.fileOpen)?_c('file-open-save-dialog',{attrs:{\"type\":\"open\",\"api-url\":\"/cosmos-api/tables\"},on:{\"file\":function($event){return _vm.setFile($event)},\"error\":function($event){return _vm.setError($event)}},model:{value:(_vm.fileOpen),callback:function ($$v) {_vm.fileOpen=$$v},expression:\"fileOpen\"}}):_vm._e(),(_vm.showSaveAs)?_c('file-open-save-dialog',{attrs:{\"type\":\"save\",\"require-target-parent-dir\":\"\",\"api-url\":\"/cosmos-api/tables\",\"input-filename\":_vm.filename},on:{\"filename\":function($event){return _vm.saveAsFilename($event)},\"error\":function($event){return _vm.setError($event)}},model:{value:(_vm.showSaveAs),callback:function ($$v) {_vm.showSaveAs=$$v},expression:\"showSaveAs\"}}):_vm._e(),_c('simple-text-dialog',{attrs:{\"title\":_vm.errorTitle,\"text\":_vm.errorText},model:{value:(_vm.showError),callback:function ($$v) {_vm.showError=$$v},expression:\"showError\"}})],1)}\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n*/\n\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 10000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response.status === 401) {\n delete localStorage.cosmosToken\n CosmosAuth.login(location.href)\n } else {\n let body = `HTTP ${error.response.status} - `\n if (error.response?.data?.message) {\n body += `${error.response.data.message}`\n } else if (error.response?.data?.exception) {\n body += `${error.response.data.exception}`\n } else if (error.response?.data?.error?.message) {\n if (error.response.data.error.class) {\n body += `${error.response.data.error.class} `\n }\n body += `${error.response.data.error.message}`\n } else {\n body += `${error.response?.data}`\n }\n vueInstance.$notify.serious({\n title: 'Network error',\n body,\n })\n }\n throw error\n }\n)\n\nexport default axiosInstance\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n*/\n\nimport axios from './axios.js'\n\nconst request = async function (\n method,\n url,\n { data, params = {}, headers, noAuth = false, noScope = false } = {}\n) {\n if (!noAuth) {\n try {\n await CosmosAuth.updateToken(CosmosAuth.defaultMinValidity)\n } catch (error) {\n CosmosAuth.login()\n }\n headers['Authorization'] = localStorage.cosmosToken\n }\n if (!noScope && !params['scope']) {\n params['scope'] = localStorage.scope\n }\n return axios({\n method,\n url,\n data,\n params,\n headers,\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 { params, headers = acceptOnlyDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('get', path, { params, headers, noScope, noAuth })\n },\n\n put: function (\n path,\n { data, params, headers = fullDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('put', path, { data, params, headers, noScope, noAuth })\n },\n\n post: function (\n path,\n { data, params, headers = fullDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('post', path, { data, params, headers, noScope, noAuth })\n },\n\n delete: function (\n path,\n { params, headers = acceptOnlyDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('delete', path, { params, headers, noScope, noAuth })\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n*/\n\nimport axios from './axios.js'\n\nexport class CosmosApi {\n id = 1\n\n constructor() {}\n\n // This is hacky Json-rpc for now. Should probably use a jsonrpc library.\n async exec(method, params, kwparams = {}) {\n try {\n await CosmosAuth.updateToken(CosmosAuth.defaultMinValidity)\n } catch (error) {\n CosmosAuth.login()\n }\n this.id = this.id + 1\n try {\n kwparams['scope'] = localStorage.scope\n const response = await axios.post(\n '/cosmos-api/api',\n {\n jsonrpc: '2.0',\n method: method,\n params: params,\n id: this.id,\n keyword_params: kwparams,\n },\n {\n headers: {\n Authorization: localStorage.cosmosToken,\n 'Content-Type': 'application/json-rpc',\n },\n }\n )\n // var data = response.data\n // if (data.error) {\n // var err = new Error()\n // err.name = data.error.data.class\n // err.message = data.error.data.message\n // console.log(data.error.data.backtrace.join('\\n'))\n // throw err\n // }\n return response.data.result\n } catch (error) {\n var err = new Error()\n if (error.response) {\n // The request was made and the server responded with a\n // status code that falls out of the range of 2xx\n err.name = error.response.data.error.data.class\n err.message = error.response.data.error.data.message\n } else if (error.request) {\n // The request was made but no response was received, `error.request`\n // is an instance of XMLHttpRequest in the browser and an instance\n // of http.ClientRequest in Node.js\n err.name = 'Request error'\n err.message = 'Request error, no response received'\n } else {\n // Something happened in setting up the request and triggered an Error\n err.name = 'Unknown error'\n }\n //console.log(error)\n throw err\n }\n }\n\n decode_cosmos_type(val) {\n if (val !== null && typeof val === 'object') {\n if (val.json_class == 'Float' && val.raw) {\n if (val.raw == 'NaN') {\n return NaN\n } else if (val.raw == 'Infinity') {\n return Infinity\n } else if (val.raw == '-Infinity') {\n return -Infinity\n }\n }\n }\n return null\n }\n\n encode_cosmos_type(val) {\n if (Number.isNaN(val)) {\n return { json_class: 'Float', raw: 'NaN' }\n } else if (val == Number.POSITIVE_INFINITY) {\n return { json_class: 'Float', raw: 'Infinity' }\n } else if (val == Number.NEGATIVE_INFINITY) {\n return { json_class: 'Float', raw: '-Infinity' }\n }\n return null\n }\n\n // ***********************************************\n // The following APIs are used by the CmdTlmServer\n // ***********************************************\n get_all_interface_info() {\n return this.exec('get_all_interface_info', [])\n }\n\n connect_interface(interface_name) {\n return this.exec('connect_interface', [interface_name])\n }\n\n disconnect_interface(interface_name) {\n return this.exec('disconnect_interface', [interface_name])\n }\n\n get_all_router_info() {\n return this.exec('get_all_router_info', [])\n }\n\n connect_router(router_name) {\n return this.exec('connect_router', [router_name])\n }\n\n disconnect_router(router_name) {\n return this.exec('disconnect_router', [router_name])\n }\n\n get_all_target_info() {\n return this.exec('get_all_target_info', [])\n }\n\n get_all_cmd_info() {\n return this.exec('get_all_cmd_info', [])\n }\n\n get_all_tlm_info() {\n return this.exec('get_all_tlm_info', [])\n }\n\n get_item(target, packet, item) {\n return this.exec('get_item', [target, packet, item])\n }\n\n get_parameter(target, packet, item) {\n return this.exec('get_parameter', [target, packet, item])\n }\n\n get_all_packet_logger_info() {\n return this.exec('get_all_packet_logger_info', [])\n }\n\n start_logging() {\n return this.exec('start_logging', [])\n }\n\n stop_logging() {\n return this.exec('stop_logging', [])\n }\n\n start_cmd_log(log_writer_name) {\n return this.exec('start_cmd_log', [log_writer_name])\n }\n\n start_tlm_log(log_writer_name) {\n return this.exec('start_tlm_log', [log_writer_name])\n }\n\n stop_cmd_log(log_writer_name) {\n return this.exec('stop_cmd_log', [log_writer_name])\n }\n\n stop_tlm_log(log_writer_name) {\n return this.exec('stop_tlm_log', [log_writer_name])\n }\n\n get_server_status() {\n return this.exec('get_server_status', [])\n }\n\n get_limits_sets() {\n return this.exec('get_limits_sets', [])\n }\n\n get_limits_set() {\n return this.exec('get_limits_set', [])\n }\n\n set_limits_set(limits_set) {\n return this.exec('set_limits_set', [limits_set])\n }\n\n get_background_tasks() {\n return this.exec('get_background_tasks', [])\n }\n\n start_background_task(name) {\n return this.exec('start_background_task', [name])\n }\n\n stop_background_task(name) {\n return this.exec('stop_background_task', [name])\n }\n\n // ***********************************************\n // End CmdTlmServer APIs\n // ***********************************************\n\n get_oldest_logfile() {\n return this.exec('get_oldest_logfile', [])\n }\n\n get_target(target_name) {\n return this.exec('get_target', [target_name])\n }\n\n get_target_list() {\n return this.exec('get_target_list', [])\n }\n\n get_telemetry(target_name, packet_name) {\n return this.exec('get_telemetry', [target_name, packet_name])\n }\n\n get_all_telemetry(target_name) {\n return this.exec('get_all_telemetry', [target_name])\n }\n\n // Called by PacketViewerComponent\n async get_tlm_packet(target_name, packet_name, value_type) {\n const data = await this.exec('get_tlm_packet', [target_name, packet_name], {\n type: value_type,\n })\n // Make sure data isn't null or undefined. Note this is the only valid use of == or !=\n if (data != null) {\n var len = data.length\n var converted = null\n for (var i = 0; i < len; i++) {\n converted = this.decode_cosmos_type(data[i][1])\n if (converted !== null) {\n data[i][1] = converted\n }\n }\n }\n return data\n }\n\n // Called by PacketViewerComponent\n get_packet_derived_items(target_name, packet_name) {\n return this.exec('get_packet_derived_items', [target_name, packet_name])\n }\n\n // Called by CmdTlmServer Tlm Packets tab\n get_tlm_buffer(target_name, packet_name) {\n return this.exec('get_tlm_buffer', [target_name, packet_name])\n }\n\n // Called by CosmosScreenComponent\n async get_tlm_values(items) {\n const data = await this.exec('get_tlm_values', [items])\n var len = data[0].length\n var converted = null\n for (var i = 0; i < len; i++) {\n converted = this.decode_cosmos_type(data[0][i])\n if (converted !== null) {\n data[0][i] = converted\n }\n }\n return data\n }\n\n // Called by LimitsbarWidget\n get_limits(target_name, packet_name, item_name) {\n return this.exec('get_limits', [target_name, packet_name, item_name])\n }\n\n // Called by LimitsMonitorComponent\n async tlm(target_name, packet_name, item_name) {\n const data = await this.exec('tlm', [target_name, packet_name, item_name])\n var converted = this.decode_cosmos_type(data)\n if (converted !== null) {\n data = converted\n }\n return data\n }\n\n get_all_commands(target_name) {\n return this.exec('get_all_commands', [target_name])\n }\n\n get_command(target_name, command_name) {\n return this.exec('get_command', [target_name, command_name])\n }\n\n get_cmd_value(\n target_name,\n packet_name,\n parameter_name,\n value_type = 'CONVERTED'\n ) {\n return this.exec('get_cmd_value', [\n target_name,\n packet_name,\n parameter_name,\n value_type,\n ])\n }\n\n // Called by CmdTlmServer Cmd Packets tab\n get_cmd_buffer(target_name, packet_name) {\n return this.exec('get_cmd_buffer', [target_name, packet_name])\n }\n\n // Implementation of functionality shared by cmd methods with param_lists.\n _cmd(method, target_name, command_name, param_list) {\n var converted = null\n for (var key in param_list) {\n if (Object.prototype.hasOwnProperty.call(param_list, key)) {\n converted = this.encode_cosmos_type(param_list[key])\n if (converted !== null) {\n param_list[key] = converted\n }\n }\n }\n return this.exec(method, [target_name, command_name, param_list])\n }\n\n // Called by CmdSenderComponent\n get_cmd_hazardous(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('get_cmd_hazardous', target_name)\n } else {\n return this._cmd(\n 'get_cmd_hazardous',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n // Called by CmdSenderComponent\n cmd(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd', target_name)\n } else {\n return this._cmd('cmd', target_name, command_name, param_list)\n }\n }\n\n // Called by CmdSenderComponent\n cmd_no_range_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_range_check', target_name)\n } else {\n return this._cmd(\n 'cmd_no_range_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n // Called by CmdSenderComponent\n cmd_raw(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw', target_name)\n } else {\n return this._cmd('cmd_raw', target_name, command_name, param_list)\n }\n }\n\n // Called by CmdSenderComponent\n cmd_raw_no_range_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_range_check', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_range_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n // Called by CmdSenderComponent\n cmd_no_hazardous_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_hazardous_check', target_name)\n } else {\n return this._cmd(\n 'cmd_no_hazardous_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n // Called by CmdSenderComponent\n cmd_no_checks(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_checks', target_name)\n } else {\n return this._cmd('cmd_no_checks', target_name, command_name, param_list)\n }\n }\n\n // Called by CmdSenderComponent\n cmd_raw_no_hazardous_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_hazardous_check', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_hazardous_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n // Called by CmdSenderComponent\n cmd_raw_no_checks(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_checks', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_checks',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n // Called by CmdSenderComponent\n get_interface_names() {\n return this.exec('get_interface_names', [])\n }\n\n // Called by CmdSenderComponent\n send_raw(interface_name, data) {\n return this.exec('send_raw', [interface_name, data])\n }\n\n list_configs(tool) {\n return this.exec('list_configs', [tool])\n }\n\n load_config(tool, name) {\n return this.exec('load_config', [tool, name])\n }\n\n save_config(tool, name, data) {\n return this.exec('save_config', [tool, name, data])\n }\n\n delete_config(tool, name) {\n return this.exec('delete_config', [tool, name])\n }\n\n get_out_of_limits() {\n return this.exec('get_out_of_limits', [])\n }\n\n get_overall_limits_state(ignored) {\n return this.exec('get_overall_limits_state', [ignored])\n }\n\n list_settings() {\n return this.exec('list_settings', [])\n }\n\n get_all_settings() {\n return this.exec('get_all_settings', [])\n }\n\n get_setting(name) {\n return this.exec('get_setting', [name])\n }\n\n get_settings(array) {\n return this.exec('get_settings', array)\n }\n\n save_setting(name, data) {\n return this.exec('save_setting', [name, data])\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('mounting-portal',{attrs:{\"mount-to\":\"#cosmos-menu\",\"append\":\"\"}},[_c('div',{staticClass:\"v-toolbar__content\"},[_vm._l((_vm.menus),function(menu,i){return _c('v-menu',{key:i,attrs:{\"offset-y\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({staticClass:\"mx-1\",attrs:{\"outlined\":\"\",\"data-test\":_vm.formatDT((_vm.title + \" \" + (menu.label)))}},'v-btn',attrs,false),on),[_c('span',{domProps:{\"textContent\":_vm._s(menu.label)}}),_c('v-icon',{attrs:{\"right\":\"\"}},[_vm._v(\" mdi-menu-down \")])],1)]}}],null,true)},[_c('v-list',[_c('v-radio-group',{staticClass:\"ma-0 pa-0\",attrs:{\"value\":menu.radioGroup,\"hide-details\":\"\",\"dense\":\"\"}},[_vm._l((menu.items),function(option,j){return [(option.divider)?_c('v-divider',{key:j}):_c('v-list-item',{key:j,attrs:{\"disabled\":option.disabled,\"data-test\":_vm.formatDT((_vm.title + \" \" + (menu.label) + \" \" + (option.label)))},on:{\"click\":option.command}},[(option.radio)?_c('v-list-item-action',[_c('v-radio',{attrs:{\"color\":\"secondary\",\"label\":option.label,\"value\":option.label}})],1):_vm._e(),(option.checkbox)?_c('v-list-item-action',[_c('v-checkbox',{attrs:{\"color\":\"secondary\",\"label\":option.label,\"value\":option.label},model:{value:(_vm.checked),callback:function ($$v) {_vm.checked=$$v},expression:\"checked\"}})],1):_vm._e(),(option.icon)?_c('v-list-item-icon',[_c('v-icon',{attrs:{\"disabled\":option.disabled},domProps:{\"textContent\":_vm._s(option.icon)}})],1):_vm._e(),(!option.radio && !option.checkbox)?_c('v-list-item-title',{style:('cursor: pointer;' + (option.disabled ? 'opacity: 0.2' : '')),domProps:{\"textContent\":_vm._s(option.label)}}):_vm._e()],1)]})],2)],1)],1)}),_c('v-spacer'),_c('v-toolbar-title',{domProps:{\"textContent\":_vm._s(_vm.title)}}),_c('v-spacer')],2)])}\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <mounting-portal mount-to=\"#cosmos-menu\" append>\n <div class=\"v-toolbar__content\">\n <v-menu offset-y v-for=\"(menu, i) in menus\" :key=\"i\">\n <template v-slot:activator=\"{ on, attrs }\">\n <v-btn\n outlined\n v-bind=\"attrs\"\n v-on=\"on\"\n class=\"mx-1\"\n :data-test=\"formatDT(`${title} ${menu.label}`)\"\n >\n <span v-text=\"menu.label\" />\n <v-icon right> mdi-menu-down </v-icon>\n </v-btn>\n </template>\n <v-list>\n <!-- The radio-group is necessary in case the application wants radio buttons -->\n <v-radio-group\n :value=\"menu.radioGroup\"\n hide-details\n dense\n class=\"ma-0 pa-0\"\n >\n <template v-for=\"(option, j) in menu.items\">\n <v-divider v-if=\"option.divider\" :key=\"j\" />\n <v-list-item\n v-else\n @click=\"option.command\"\n :key=\"j\"\n :disabled=\"option.disabled\"\n :data-test=\"formatDT(`${title} ${menu.label} ${option.label}`)\"\n >\n <v-list-item-action\n v-if=\"option.radio\"\n >\n <v-radio\n color=\"secondary\"\n :label=\"option.label\"\n :value=\"option.label\"\n />\n </v-list-item-action>\n <v-list-item-action\n v-if=\"option.checkbox\"\n >\n <v-checkbox\n v-model=\"checked\"\n color=\"secondary\"\n :label=\"option.label\"\n :value=\"option.label\"\n />\n </v-list-item-action>\n <v-list-item-icon v-if=\"option.icon\">\n <v-icon v-text=\"option.icon\" :disabled=\"option.disabled\" />\n </v-list-item-icon>\n <v-list-item-title\n v-if=\"!option.radio && !option.checkbox\"\n :style=\"\n 'cursor: pointer;' + (option.disabled ? 'opacity: 0.2' : '')\n \"\n v-text=\"option.label\"\n />\n </v-list-item>\n </template>\n </v-radio-group>\n </v-list>\n </v-menu>\n <v-spacer />\n <v-toolbar-title v-text=\"title\" />\n <v-spacer />\n </div>\n </mounting-portal>\n</template>\n\n<script>\nexport default {\n props: {\n menus: {\n type: Array,\n default: function () {\n return []\n },\n },\n title: {\n type: String,\n default: '',\n },\n },\n methods: {\n // Convert the string to a standard data-test format\n formatDT: function(string) {\n return string.replaceAll(' ', '-').toLowerCase()\n },\n }\n}\n</script>\n\n<style scoped>\n.v-list >>> .v-label {\n margin-left: 5px;\n}\n.v-list-item__icon {\n /* For some reason the default margin-right is huge */\n margin-right: 15px !important;\n}\n.v-list-item__title {\n color: white;\n}\n</style>\n","import mod from \"-!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TopBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TopBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TopBar.vue?vue&type=template&id=e3bb7458&scoped=true&\"\nimport script from \"./TopBar.vue?vue&type=script&lang=js&\"\nexport * from \"./TopBar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TopBar.vue?vue&type=style&index=0&id=e3bb7458&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e3bb7458\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('tr',[_c('td',{staticClass:\"text-start\"},[_vm._v(_vm._s(_vm.dataItems[0].index))]),(_vm.oneDimensional)?_c('td',{staticClass:\"text-start\"},[_vm._v(_vm._s(_vm.dataItems[0].name))]):_vm._e(),_vm._l((_vm.dataItems),function(item,index){return _c('table-item',{key:item.name,attrs:{\"item\":item},on:{\"change\":function($event){return _vm.onChange(item, index, $event)}}})})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('td',[(_vm.isCheckbox)?_c('v-checkbox',{attrs:{\"dense\":\"\",\"hide-details\":\"\",\"disabled\":!_vm.dataItem.editable},on:{\"change\":_vm.checkboxChange},model:{value:(_vm.checkValue),callback:function ($$v) {_vm.checkValue=$$v},expression:\"checkValue\"}}):(_vm.dataItem.states)?_c('v-select',{attrs:{\"dense\":\"\",\"hide-details\":\"\",\"items\":_vm.itemStates,\"disabled\":!_vm.dataItem.editable},on:{\"change\":_vm.stateChange},model:{value:(_vm.stateValue),callback:function ($$v) {_vm.stateValue=$$v},expression:\"stateValue\"}}):_c('v-text-field',{attrs:{\"solo\":\"\",\"dense\":\"\",\"single-line\":\"\",\"hide-no-data\":\"\",\"hide-details\":\"\",\"disabled\":!_vm.dataItem.editable},on:{\"change\":_vm.textChange},model:{value:(_vm.dataItem.value),callback:function ($$v) {_vm.$set(_vm.dataItem, \"value\", $$v)},expression:\"dataItem.value\"}})],1)}\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <td>\n <v-checkbox\n v-if=\"isCheckbox\"\n dense\n hide-details\n v-model=\"checkValue\"\n @change=\"checkboxChange\"\n :disabled=\"!dataItem.editable\"\n />\n <v-select\n v-else-if=\"dataItem.states\"\n dense\n hide-details\n v-model=\"stateValue\"\n :items=\"itemStates\"\n @change=\"stateChange\"\n :disabled=\"!dataItem.editable\"\n />\n <v-text-field\n v-else\n solo\n dense\n single-line\n hide-no-data\n hide-details\n v-model=\"dataItem.value\"\n @change=\"textChange\"\n :disabled=\"!dataItem.editable\"\n />\n </td>\n</template>\n\n<script>\nexport default {\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n dataItem: this.item,\n stateValue: null,\n checkValue: false,\n }\n },\n created() {\n if (this.dataItem.states) {\n this.stateValue = this.dataItem.states[this.dataItem.value]\n }\n if (this.isCheckbox) {\n this.checkValue = this.stateValue === 1\n }\n },\n computed: {\n isCheckbox: function () {\n let result = true\n if (this.dataItem.states) {\n for (const state of Object.keys(this.dataItem.states)) {\n if (state !== 'CHECKED' && state !== 'UNCHECKED') {\n result = false\n }\n }\n } else {\n result = false\n }\n return result\n },\n itemStates: function () {\n let result = []\n for (const [text, value] of Object.entries(this.dataItem.states)) {\n result.push({ text: text, value: value })\n }\n return result\n },\n },\n methods: {\n checkboxChange: function () {\n if (this.checkValue) {\n this.$emit('change', 'CHECKED')\n } else {\n this.$emit('change', 'UNCHECKED')\n }\n },\n stateChange: function () {\n // Lookup the state key that corresponds to the value\n let state = Object.keys(this.dataItem.states).find(\n (key) => this.dataItem.states[key] === this.stateValue\n )\n this.$emit('change', state)\n },\n textChange: function () {\n this.$emit('change', this.dataItem.value)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TableItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TableItem.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TableItem.vue?vue&type=template&id=3ff34eb6&\"\nimport script from \"./TableItem.vue?vue&type=script&lang=js&\"\nexport * from \"./TableItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/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","<!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <tr>\n <td class=\"text-start\">{{ dataItems[0].index }}</td>\n <td class=\"text-start\" v-if=\"oneDimensional\">{{ dataItems[0].name }}</td>\n <table-item\n v-for=\"(item, index) in dataItems\"\n :key=\"item.name\"\n :item=\"item\"\n @change=\"onChange(item, index, $event)\"\n />\n </tr>\n</template>\n\n<script>\nimport TableItem from '@/tools/TableManager/TableItem'\n\nexport default {\n components: {\n TableItem,\n },\n props: {\n items: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n dataItems: this.items,\n }\n },\n computed: {\n oneDimensional() {\n if (this.dataItems.length === 1) {\n return true\n } else {\n return false\n }\n },\n },\n methods: {\n onChange: function (item, index, event) {\n this.$emit('change', { index: index, event: event })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TableRow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TableRow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TableRow.vue?vue&type=template&id=23f038a6&\"\nimport script from \"./TableRow.vue?vue&type=script&lang=js&\"\nexport * from \"./TableRow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"width\":\"600\"},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-card',[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.success.apply(null, arguments)}}},[_c('v-system-bar',[_c('v-spacer'),_c('span',[_vm._v(\" \"+_vm._s(_vm.title)+\" \")]),_c('v-spacer')],1),_c('v-card-text',[_c('div',{staticClass:\"pa-3\"},[_c('v-row',{attrs:{\"dense\":\"\"}},[_c('v-text-field',{attrs:{\"flat\":\"\",\"autofocus\":\"\",\"solo-inverted\":\"\",\"hide-details\":\"\",\"clearable\":\"\",\"label\":\"Search\",\"data-test\":\"file-open-save-search\"},on:{\"input\":_vm.handleSearch},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_c('v-row',{staticClass:\"mt-2\",attrs:{\"dense\":\"\"}},[_c('v-treeview',{ref:\"tree\",staticStyle:{\"width\":\"100%\"},attrs:{\"dense\":\"\",\"activatable\":\"\",\"return-object\":\"\",\"items\":_vm.items,\"search\":_vm.search,\"open-on-click\":_vm.type === 'open'},on:{\"update:active\":_vm.activeFile},scopedSlots:_vm._u([{key:\"prepend\",fn:function(ref){\nvar item = ref.item;\nvar open = ref.open;\nreturn [(!item.file)?_c('v-icon',[_vm._v(\" \"+_vm._s(open ? 'mdi-folder-open' : 'mdi-folder')+\" \")]):_c('v-icon',[_vm._v(\" \"+_vm._s('mdi-language-ruby')+\" \")])]}}]),model:{value:(_vm.tree),callback:function ($$v) {_vm.tree=$$v},expression:\"tree\"}})],1),_c('v-row',{staticClass:\"my-2\"},[_c('v-text-field',{attrs:{\"hide-details\":\"\",\"label\":\"Filename\",\"data-test\":\"file-open-save-filename\",\"disabled\":_vm.type === 'open'},model:{value:(_vm.selectedFile),callback:function ($$v) {_vm.selectedFile=$$v},expression:\"selectedFile\"}})],1),_c('v-row',{attrs:{\"dense\":\"\"}},[_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.error),expression:\"error\"}],staticClass:\"my-2 red--text\",domProps:{\"textContent\":_vm._s(_vm.error)}})]),_c('v-row',{staticClass:\"mt-2\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"outlined\":\"\",\"data-test\":\"file-open-save-cancel-btn\",\"disabled\":_vm.disableButtons},on:{\"click\":function($event){_vm.show = false}}},[_vm._v(\" Cancel \")]),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"type\":\"submit\",\"color\":\"primary\",\"data-test\":\"file-open-save-submit-btn\",\"disabled\":_vm.disableButtons || !!_vm.error},on:{\"click\":function($event){$event.preventDefault();return _vm.success.apply(null, arguments)}}},[_vm._v(\" \"+_vm._s(_vm.submit)+\" \")])],1)],1)])],1)])],1)}\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <v-dialog v-model=\"show\" width=\"600\">\n <v-card>\n <form v-on:submit.prevent=\"success\">\n <v-system-bar>\n <v-spacer />\n <span> {{ title }} </span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class=\"pa-3\">\n <v-row dense>\n <v-text-field\n @input=\"handleSearch\"\n v-model=\"search\"\n flat\n autofocus\n solo-inverted\n hide-details\n clearable\n label=\"Search\"\n data-test=\"file-open-save-search\"\n />\n </v-row>\n <v-row dense class=\"mt-2\">\n <v-treeview\n v-model=\"tree\"\n @update:active=\"activeFile\"\n dense\n activatable\n return-object\n ref=\"tree\"\n style=\"width: 100%\"\n :items=\"items\"\n :search=\"search\"\n :open-on-click=\"type === 'open'\"\n >\n <template v-slot:prepend=\"{ item, open }\">\n <v-icon v-if=\"!item.file\">\n {{ open ? 'mdi-folder-open' : 'mdi-folder' }}\n </v-icon>\n <v-icon v-else>\n {{ 'mdi-language-ruby' }}\n </v-icon>\n </template>\n </v-treeview>\n </v-row>\n <v-row class=\"my-2\">\n <v-text-field\n v-model=\"selectedFile\"\n hide-details\n label=\"Filename\"\n data-test=\"file-open-save-filename\"\n :disabled=\"type === 'open'\"\n />\n </v-row>\n <v-row dense>\n <span class=\"my-2 red--text\" v-show=\"error\" v-text=\"error\" />\n </v-row>\n <v-row class=\"mt-2\">\n <v-spacer />\n <v-btn\n @click=\"show = false\"\n outlined\n class=\"mx-2\"\n data-test=\"file-open-save-cancel-btn\"\n :disabled=\"disableButtons\"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent=\"success\"\n type=\"submit\"\n color=\"primary\"\n class=\"mx-2\"\n data-test=\"file-open-save-submit-btn\"\n :disabled=\"disableButtons || !!error\"\n >\n {{ submit }}\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport Api from '../services/api'\n\nexport default {\n props: {\n type: {\n type: String,\n required: true,\n validator: function (value) {\n // The value must match one of these strings\n return ['open', 'save'].indexOf(value) !== -1\n },\n },\n apiUrl: String, // Base API URL for use with scripts or cmd-tlm\n requireTargetParentDir: Boolean, // Require that the save filename be nested in a directory with the name of a target\n inputFilename: String, // passed if this is a 'save' dialog\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n tree: [],\n items: [],\n id: 1,\n search: null,\n selectedFile: null,\n disableButtons: false,\n targets: [],\n }\n },\n computed: {\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n title: function () {\n if (this.type === 'open') {\n return 'File Open'\n } else {\n return 'File Save As...'\n }\n },\n submit: function () {\n if (this.type === 'open') {\n return 'OPEN'\n } else {\n return 'SAVE'\n }\n },\n error: function () {\n if (this.selectedFile === '' || this.selectedFile === null) {\n return 'No file selected must select a file'\n }\n if (\n !this.selectedFile.match(this.validFilenameRegex) ||\n this.selectedFile.match(/\\.\\.|\\/\\/|\\.\\/|\\/\\./) // Block .'s and /'s next to each other (block path traversal)\n ) {\n let message = `${this.selectedFile} is not a valid filename. Must `\n if (this.requireTargetParentDir) {\n message += 'be in a target directory and '\n }\n message += \"only contain alphanumeric characters and / ! - _ . * ' ( )\"\n return message\n }\n return null\n },\n validFilenameRegex: function () {\n const alphanumeric = '0-9a-zA-Z'\n const charset = `${alphanumeric}\\\\/\\\\!\\\\-\\\\_\\\\.\\\\*\\\\'\\\\(\\\\)` // From https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html a-z A-Z 0-9 / ! - _ . * ' ( )\n let expression = `[${charset}]+\\\\.[${alphanumeric}]+`\n if (this.requireTargetParentDir) {\n const targets = `(${this.targets.join('|')})`\n expression = `\\\\/?${targets}\\\\/${expression}`\n }\n return new RegExp(expression)\n },\n },\n created() {\n Api.get(this.apiUrl)\n .then((response) => {\n this.items = []\n this.id = 1\n for (let file of response.data) {\n this.filepath = file\n this.insertFile(this.items, 1, file)\n this.id++\n }\n if (this.inputFilename) {\n this.selectedFile = this.inputFilename\n }\n })\n .catch((error) => {\n this.$emit('error', `Failed to connect to Cosmos. ${error}`)\n })\n if (this.requireTargetParentDir) {\n Api.get('/cosmos-api/targets').then((response) => {\n this.targets = response.data\n })\n }\n },\n methods: {\n clear: function () {\n this.show = false\n this.overwrite = false\n this.disableButtons = false\n },\n handleSearch: function (input) {\n if (input) {\n this.$refs.tree.updateAll(true)\n } else {\n this.$refs.tree.updateAll(false)\n }\n },\n activeFile: function (file) {\n if (file.length === 0) {\n this.selectedFile = null\n } else {\n this.selectedFile = file[0].path\n }\n },\n exists: function (root, name) {\n let found = false\n for (let item of root) {\n if (item.path === name) {\n return true\n }\n if (item.children) {\n found = found || this.exists(item.children, name)\n }\n }\n return found\n },\n success: function () {\n if (this.type === 'open') {\n this.openSuccess()\n } else {\n this.saveSuccess()\n }\n },\n openSuccess: function () {\n // Disable the buttons because the API call can take a bit\n this.disableButtons = true\n Api.get(`${this.apiUrl}/${this.selectedFile}`)\n .then((response) => {\n const file = {\n name: this.selectedFile,\n contents: response.data.contents,\n }\n if (response.data.suites) {\n file['suites'] = JSON.parse(response.data.suites)\n }\n if (response.data.error) {\n file['error'] = response.data.error\n }\n if (response.data.success) {\n file['success'] = response.data.success\n }\n const locked = response.data.locked\n const breakpoints = response.data.breakpoints\n this.$emit('file', { file, locked, breakpoints })\n this.clear()\n })\n .catch((error) => {\n this.$emit('error', `Failed to open ${this.selectedFile}. ${error}`)\n this.clear()\n })\n },\n saveSuccess: function () {\n const found = this.exists(this.items, this.selectedFile)\n if (found) {\n this.$dialog\n .confirm(`Are you sure you want to overwrite: ${this.selectedFile}`, {\n okText: 'Overwrite',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n this.$emit('filename', this.selectedFile)\n this.clear()\n })\n } else {\n this.$emit('filename', this.selectedFile)\n this.clear()\n }\n },\n insertFile: function (root, level, path) {\n var parts = path.split('/')\n // When there is only 1 part we're at the root so push the filename\n if (parts.length === 1) {\n root.push({\n id: this.id,\n name: parts[0],\n file: 'ruby',\n path: this.filepath,\n })\n this.id++\n return\n }\n // Look for the first part of the path\n const index = root.findIndex((item) => item.name === parts[0])\n if (index === -1) {\n // Name not found so push the item and add a children array\n root.push({\n id: this.id,\n name: parts[0],\n children: [],\n path: this.filepath.split('/').slice(0, level).join('/'),\n })\n this.id++\n this.insertFile(\n root[root.length - 1].children, // Start from the node we just added\n level + 1,\n parts.slice(1).join('/') // Strip the first part of the path\n )\n } else {\n // We already have something at this level so recursively\n // call the insertPart using the node we found and adjust the path\n this.insertFile(\n root[index].children,\n level + 1,\n parts.slice(1).join('/')\n )\n }\n },\n },\n}\n</script>\n","import mod from \"-!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./FileOpenSaveDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./FileOpenSaveDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FileOpenSaveDialog.vue?vue&type=template&id=16b9fb88&\"\nimport script from \"./FileOpenSaveDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./FileOpenSaveDialog.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/cli-service/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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"width\":_vm.width},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-card',[_c('v-system-bar',[_c('v-spacer'),_c('span',[_vm._v(\" \"+_vm._s(_vm.title)+\" \")]),_c('v-spacer'),_c('div',{staticClass:\"mx-2\"},[_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('div',_vm._g(_vm._b({},'div',attrs,false),on),[_c('v-icon',{attrs:{\"data-test\":\"downloadIcon\"},on:{\"click\":_vm.download}},[_vm._v(\" mdi-download \")])],1)]}}])},[_c('span',[_vm._v(\" Download \")])])],1)],1),_c('v-card-text',[_c('div',{staticClass:\"pa-3\"},[_c('span',{staticStyle:{\"white-space\":\"pre-wrap\"}},[_vm._v(_vm._s(_vm.text))])])]),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"color\":\"primary\"},on:{\"click\":function($event){_vm.show = !_vm.show}}},[_vm._v(\" Ok \")])],1)],1)],1)}\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <v-dialog v-model=\"show\" :width=\"width\">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span> {{ title }} </span>\n <v-spacer />\n <div class=\"mx-2\">\n <v-tooltip top>\n <template v-slot:activator=\"{ on, attrs }\">\n <div v-on=\"on\" v-bind=\"attrs\">\n <v-icon data-test=\"downloadIcon\" @click=\"download\">\n mdi-download\n </v-icon>\n </div>\n </template>\n <span> Download </span>\n </v-tooltip>\n </div>\n </v-system-bar>\n <v-card-text>\n <div class=\"pa-3\">\n <span style=\"white-space: pre-wrap\">{{ text }}</span>\n </div>\n </v-card-text>\n <v-card-actions>\n <v-spacer />\n <v-btn class=\"mx-2\" color=\"primary\" @click=\"show = !show\"> Ok </v-btn>\n </v-card-actions>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nexport default {\n props: {\n value: Boolean, // value is the default prop when using v-model\n text: String,\n title: String,\n width: 800,\n },\n computed: {\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n download: function () {\n const blob = new Blob([this.text], {\n type: 'text/plain',\n })\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.setAttribute('download', `${this.title}.txt`)\n link.click()\n },\n },\n}\n</script>\n","import mod from \"-!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./SimpleTextDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./SimpleTextDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SimpleTextDialog.vue?vue&type=template&id=8003a1c6&\"\nimport script from \"./SimpleTextDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./SimpleTextDialog.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/cli-service/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","<!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <div>\n <top-bar :menus=\"menus\" :title=\"title\" />\n <v-snackbar v-model=\"showReadOnlyToast\" top :timeout=\"-1\" color=\"orange\">\n <v-icon> mdi-pencil-off </v-icon>\n {{ lockedBy }} is editing this script. Editor is in read-only mode\n <template v-slot:action=\"{ attrs }\">\n <v-btn\n text\n v-bind=\"attrs\"\n color=\"danger\"\n @click=\"confirmLocalUnlock\"\n data-test=\"unlock-button\"\n >\n Unlock\n </v-btn>\n <v-btn\n text\n v-bind=\"attrs\"\n @click=\"\n () => {\n showReadOnlyToast = false\n }\n \"\n >\n dismiss\n </v-btn>\n </template>\n </v-snackbar>\n <v-file-input\n show-size\n v-model=\"fileInput\"\n ref=\"fileInput\"\n accept=\".bin\"\n data-test=\"file-input\"\n style=\"position: fixed; top: -100%\"\n />\n <v-text-field\n outlined\n dense\n readonly\n hide-details\n label=\"Definition\"\n v-model=\"definitionFilename\"\n id=\"definition-filename\"\n data-test=\"definition-filename\"\n />\n <v-text-field\n outlined\n dense\n readonly\n hide-details\n label=\"Filename\"\n v-model=\"fullFilename\"\n id=\"filename\"\n data-test=\"filename\"\n />\n <v-card>\n <v-card-title>\n Items\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n append-icon=\"mdi-magnify\"\n label=\"Search\"\n single-line\n hide-details\n />\n </v-card-title>\n <v-tabs v-model=\"curTab\">\n <v-tab v-for=\"(table, index) in tables\" :key=\"index\">\n {{ table.name }}\n </v-tab>\n </v-tabs>\n <v-tabs-items v-model=\"curTab\">\n <v-tab-item\n v-for=\"(table, index) in tables\"\n :key=\"`${filename}${index}`\"\n >\n <v-data-table\n :headers=\"table.headers\"\n :items=\"table.rows\"\n :search=\"search\"\n calculate-widths\n disable-pagination\n hide-default-footer\n multi-sort\n dense\n >\n <template v-slot:item=\"{ item }\">\n <table-row\n :items=\"item\"\n :key=\"JSON.stringify(item[0])\"\n @change=\"onChange(item, $event)\"\n />\n </template>\n </v-data-table>\n </v-tab-item>\n </v-tabs-items>\n </v-card>\n <file-open-save-dialog\n v-if=\"fileOpen\"\n v-model=\"fileOpen\"\n type=\"open\"\n api-url=\"/cosmos-api/tables\"\n @file=\"setFile($event)\"\n @error=\"setError($event)\"\n />\n <file-open-save-dialog\n v-if=\"showSaveAs\"\n v-model=\"showSaveAs\"\n type=\"save\"\n require-target-parent-dir\n api-url=\"/cosmos-api/tables\"\n :input-filename=\"filename\"\n @filename=\"saveAsFilename($event)\"\n @error=\"setError($event)\"\n />\n <simple-text-dialog\n v-model=\"showError\"\n :title=\"errorTitle\"\n :text=\"errorText\"\n />\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport { CosmosApi } from '@cosmosc2/tool-common/src/services/cosmos-api'\nimport TopBar from '@cosmosc2/tool-common/src/components/TopBar'\nimport TableRow from '@/tools/TableManager/TableRow'\nimport FileOpenSaveDialog from '@cosmosc2/tool-common/src/components/FileOpenSaveDialog'\nimport SimpleTextDialog from '@cosmosc2/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n TopBar,\n TableRow,\n FileOpenSaveDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n title: 'Table Manager',\n search: '',\n curTab: null,\n tables: [],\n api: null,\n definition: null,\n fileInput: '',\n definitionFilename: '',\n fileNew: false,\n filename: '',\n fileModified: '',\n lockedBy: null,\n fileOpen: false,\n showSave: false,\n showSaveAs: false,\n showError: false,\n errorTitle: '',\n errorText: '',\n }\n },\n computed: {\n readOnly: function () {\n return !!this.lockedBy\n },\n fullFilename() {\n return `${this.filename} ${this.fileModified}`.trim()\n },\n menus: function () {\n return [\n {\n label: 'File',\n items: [\n {\n label: 'New File',\n icon: 'mdi-file-plus',\n command: () => {\n this.newFile()\n },\n },\n {\n label: 'Open File',\n icon: 'mdi-folder-open',\n command: () => {\n this.openFile()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Save File',\n icon: 'mdi-content-save',\n command: () => {\n this.saveFile()\n },\n },\n {\n label: 'Save As...',\n icon: 'mdi-content-save',\n command: () => {\n this.saveAs()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Upload',\n icon: 'mdi-cloud-upload',\n command: () => {\n this.upload()\n },\n },\n {\n label: 'Download',\n icon: 'mdi-cloud-download',\n command: () => {\n this.download()\n },\n },\n {\n divider: true,\n },\n {\n label: 'Delete File',\n icon: 'mdi-delete',\n command: () => {\n this.delete()\n },\n },\n ],\n },\n ]\n },\n },\n created() {\n this.api = new CosmosApi()\n },\n methods: {\n // File menu actions\n newFile: function () {\n this.fileModified = ''\n this.fileNew = true\n this.fileOpen = true\n },\n openFile: function () {\n this.fileOpen = true\n },\n // Called by the FileOpenDialog to set the file contents\n setFile: function ({ file, locked }) {\n // They opened a definition file so create a new binary\n if (file.name.includes('.txt')) {\n if (this.fileNew) {\n this.buildNewBinary(file)\n this.fileNew = false\n } else {\n this.getDefinition(file.name)\n }\n } else {\n this.unlockFile() // first unlock what was just being edited\n // Split off the ' *' which indicates a file is modified on the server\n this.filename = file.name.split('*')[0]\n this.fileModified = ''\n this.lockedBy = locked\n\n this.getDefinition()\n }\n },\n // Called by the FileOpenSaveDialog on error\n setError(event) {\n this.errorTitle = 'Error'\n this.errorText = `Error: ${event}`\n this.errorText = response.data.message\n this.showError = true\n },\n saveFile: function () {\n // Save a file by posting the new contents\n this.showSave = true\n\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', this.definitionFilename)\n formData.append('tables', JSON.stringify(this.tables))\n Api.post(`/cosmos-api/tables/${this.filename}`, {\n data: formData,\n })\n .then((response) => {\n this.fileModified = ''\n setTimeout(() => {\n this.showSave = false\n }, 2000)\n })\n .catch(({ response }) => {\n this.showSave = false\n this.errorTitle = 'Save Error'\n this.errorText = response.data.message\n this.showError = true\n })\n this.lockFile() // Ensure this file is locked for editing\n },\n saveAs: function () {\n this.showSaveAs = true\n },\n saveAsFilename: function (filename) {\n this.filename = filename\n this.saveFile()\n },\n delete: function () {\n if (this.filename !== '') {\n this.$dialog\n .confirm(`Permanently delete file: ${this.filename}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(`/cosmos-api/tables/${this.filename}`, {\n data: {},\n })\n })\n .then((response) => {\n this.newFile()\n })\n .catch((error) => {\n if (error) {\n this.$notify.caution({\n title: 'Error',\n body: `Error deleting file: ${error}`,\n })\n }\n })\n }\n },\n download: function () {\n if (this.filename !== '') {\n Api.get(`/cosmos-api/tables/${this.filename}`).then((response) => {\n // Decode Base64 string\n const decodedData = window.atob(response.data.contents)\n // Create UNIT8ARRAY of size same as row data length\n const uInt8Array = new Uint8Array(decodedData.length)\n // Insert all character code into uInt8Array\n for (let i = 0; i < decodedData.length; ++i) {\n uInt8Array[i] = decodedData.charCodeAt(i)\n }\n // Return BLOB image after conversion\n const blob = new Blob([uInt8Array], {\n type: 'application/octet-stream',\n })\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.setAttribute(\n 'download',\n this.filename.substring(this.filename.lastIndexOf('/') + 1)\n )\n link.click()\n })\n }\n },\n async upload() {\n this.fileInput = ''\n this.$refs.fileInput.$refs.input.click()\n // Wait for the file to be set by the dialog so upload works\n while (this.fileInput === '') {\n await new Promise((resolve) => setTimeout(resolve, 500))\n }\n this.filename = this.fileInput.name\n this.saveAs()\n },\n confirmLocalUnlock: function () {\n this.$dialog\n .confirm(\n 'Are you sure you want to unlock this file for editing? If another user is editing this file, your changes might conflict with each other.',\n {\n okText: 'Force Unlock',\n cancelText: 'Cancel',\n }\n )\n .then(() => {\n this.lockedBy = null\n return this.lockFile() // Re-lock it as this user so it's locked for anyone else who opens it\n })\n },\n lockFile: function () {\n return Api.post(`/cosmos-api/tables/${this.filename}/lock`)\n },\n unlockFile: function () {\n if (this.filename !== '' && !this.readOnly) {\n Api.post(`/cosmos-api/tables/${this.filename}/unlock`)\n }\n },\n getDefinition: function (definitionFilename = null) {\n if (!definitionFilename) {\n definitionFilename = this.filename\n .replace('/bin/', '/config/')\n .replace('.bin', '_def.txt')\n }\n const formData = new FormData()\n formData.append('binary', this.filename)\n formData.append('definition', definitionFilename)\n Api.post(`/cosmos-api/tables/load`, {\n data: formData,\n })\n .then((response) => {\n this.definitionFilename = definitionFilename\n this.tables = response.data.tables.map((table) => {\n return {\n ...table,\n // Build up the headers for proper searching\n headers: table.headers.map((text, i) => {\n const header = {\n text,\n filterable: text !== 'INDEX',\n }\n if (table.numColumns === 1) {\n // In the 1D table the searchable value is the first value in the row\n // Note the names in 1D are INDEX, NAME, VALUE\n return {\n ...header,\n value: `[0].${text.toLowerCase()}`,\n }\n } else {\n // In the 2D table the searchable value is always in the value attribute\n // of the current column item\n return {\n ...header,\n value: `[${i}].value`,\n }\n }\n }),\n }\n })\n\n if (response.data['errors']) {\n this.$notify.caution({\n title: 'Warning',\n body: response.data['errors'],\n })\n }\n })\n .catch((error) => {\n if (error.response.status == 404) {\n this.$notify.normal({\n title: 'Definition File Not Found',\n body: `Definition file ${definitionFilename} not found. Please select definition file.`,\n })\n this.fileOpen = true\n } else {\n this.$notify.serious({\n title: 'Error',\n body: `Error loading due to ${error.response.statusText}. Status: ${error.response.status}`,\n })\n }\n })\n },\n buildNewBinary: function (file) {\n const formData = new FormData()\n formData.append('contents', file.contents)\n Api.post(`/cosmos-api/tables/${file.name}/generate`, {\n data: formData,\n }).then((response) => {\n this.filename = response.data.filename\n this.getDefinition(file.name)\n })\n },\n onChange: function (item, { index, event }) {\n this.fileModified = '*'\n item[index].value = event\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TableManager.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TableManager.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TableManager.vue?vue&type=template&id=440d3459&\"\nimport script from \"./TableManager.vue?vue&type=script&lang=js&\"\nexport * from \"./TableManager.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/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/@vue/cli-service/node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/@vue/cli-service/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, \".v-list[data-v-e3bb7458] .v-label{margin-left:5px}.v-list-item__icon[data-v-e3bb7458]{margin-right:15px!important}.v-list-item__title[data-v-e3bb7458]{color:#fff}\", \"\"]);\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/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-12[0].rules[0].use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../../node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12[0].rules[0].use[2]!../../../../node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12[0].rules[0].use[3]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TopBar.vue?vue&type=style&index=0&id=e3bb7458&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(\"a2f2c426\", content, true, {\"sourceMap\":false,\"shadowMode\":false});"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","menus","title","scopedSlots","_u","key","fn","ref","_b","on","confirmLocalUnlock","_v","showReadOnlyToast","model","value","callback","$$v","expression","_s","lockedBy","staticStyle","fileInput","definitionFilename","fullFilename","search","curTab","_l","table","index","name","filename","headers","rows","item","JSON","stringify","$event","onChange","setFile","setError","fileOpen","_e","saveAsFilename","showSaveAs","errorTitle","errorText","showError","staticRenderFns","vueInstance","Vue","axiosInstance","axios","baseURL","location","origin","timeout","params","interceptors","response","use","error","status","localStorage","cosmosToken","CosmosAuth","login","href","body","data","message","exception","class","$notify","serious","request","method","url","noAuth","noScope","updateToken","defaultMinValidity","scope","acceptOnlyDefaultHeaders","Accept","fullDefaultHeaders","get","path","put","post","delete","CosmosApi","kwparams","id","jsonrpc","keyword_params","Authorization","result","err","Error","val","json_class","raw","NaN","Infinity","Number","isNaN","POSITIVE_INFINITY","NEGATIVE_INFINITY","exec","interface_name","router_name","target","packet","log_writer_name","limits_set","target_name","packet_name","value_type","type","len","length","converted","i","decode_cosmos_type","items","item_name","command_name","parameter_name","param_list","Object","prototype","hasOwnProperty","call","encode_cosmos_type","undefined","_cmd","tool","ignored","array","staticClass","menu","_g","formatDT","domProps","label","radioGroup","option","j","disabled","command","checked","icon","radio","checkbox","style","props","Array","default","String","methods","string","replaceAll","toLowerCase","component","dataItems","dataItem","editable","checkboxChange","checkValue","itemStates","stateChange","stateValue","textChange","$set","required","created","states","isCheckbox","computed","push","text","$emit","state","components","TableItem","oneDimensional","event","show","preventDefault","success","apply","arguments","handleSearch","activeFile","open","file","tree","selectedFile","directives","rawName","disableButtons","submit","validator","indexOf","apiUrl","requireTargetParentDir","Boolean","inputFilename","targets","set","validFilenameRegex","RegExp","Api","then","catch","clear","overwrite","input","$refs","updateAll","exists","root","found","openSuccess","saveSuccess","contents","locked","breakpoints","$dialog","confirm","okText","cancelText","insertFile","parts","split","filepath","children","slice","level","join","width","download","link","URL","createObjectURL","blob","setAttribute","click","TopBar","TableRow","FileOpenSaveDialog","SimpleTextDialog","tables","api","definition","fileNew","fileModified","showSave","readOnly","divider","newFile","openFile","includes","buildNewBinary","getDefinition","unlockFile","saveFile","formData","append","setTimeout","lockFile","saveAs","uInt8Array","decodedData","charCodeAt","replace","filterable","header","___CSS_LOADER_EXPORT___","module","content","__esModule","locals","exports","add"],"sourceRoot":""}
|