openc3-tool-cmdtlmserver 5.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +727 -0
- data/README.md +28 -0
- data/Rakefile +40 -0
- data/plugin.txt +3 -0
- data/tools/cmdtlmserver/index.html +4 -0
- data/tools/cmdtlmserver/js/117.js +2 -0
- data/tools/cmdtlmserver/js/117.js.map +1 -0
- data/tools/cmdtlmserver/js/208.js +2 -0
- data/tools/cmdtlmserver/js/208.js.map +1 -0
- data/tools/cmdtlmserver/js/262.js +2 -0
- data/tools/cmdtlmserver/js/262.js.map +1 -0
- data/tools/cmdtlmserver/js/317.js +2 -0
- data/tools/cmdtlmserver/js/317.js.map +1 -0
- data/tools/cmdtlmserver/js/438.js +2 -0
- data/tools/cmdtlmserver/js/438.js.map +1 -0
- data/tools/cmdtlmserver/js/440.js +4 -0
- data/tools/cmdtlmserver/js/440.js.map +1 -0
- data/tools/cmdtlmserver/js/493.js +2 -0
- data/tools/cmdtlmserver/js/493.js.map +1 -0
- data/tools/cmdtlmserver/js/516.js +2 -0
- data/tools/cmdtlmserver/js/516.js.map +1 -0
- data/tools/cmdtlmserver/js/63.js +2 -0
- data/tools/cmdtlmserver/js/63.js.map +1 -0
- data/tools/cmdtlmserver/js/647.js +2 -0
- data/tools/cmdtlmserver/js/647.js.map +1 -0
- data/tools/cmdtlmserver/js/725.js +2 -0
- data/tools/cmdtlmserver/js/725.js.map +1 -0
- data/tools/cmdtlmserver/js/732.js +2 -0
- data/tools/cmdtlmserver/js/732.js.map +1 -0
- data/tools/cmdtlmserver/js/932.js +2 -0
- data/tools/cmdtlmserver/js/932.js.map +1 -0
- data/tools/cmdtlmserver/js/app.js +2 -0
- data/tools/cmdtlmserver/js/app.js.map +1 -0
- metadata +79 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"js/493.js","mappings":"6iBAsBMA,EAAc,IAAIC,EAAAA,WAElBC,EAAgBC,IAAAA,OAAa,CACjCC,QAASC,SAASC,OAClBC,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C,gBADb,uBAGUC,GAAc,IAAIC,aAAcC,OAAOL,GAHjD,SAMoCM,OAAOC,OAAOC,OAC5C,UACAL,GARN,cAMUM,EANV,OAYUC,EAAkB,IAAIC,WAAWF,GAZ3C,kBAeWG,MAAMC,KAAKH,GACfI,KAAI,SAACC,GAAD,OAAOA,EAAExF,SAAS,IAAIyF,SAAS,EAAG,IAAlC,IACJC,KAAK,KAjBZ,2CAxeF,gE","sources":["webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/services/axios.js","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/services/openc3-api.js"],"sourcesContent":["/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n*/\n\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 60000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response) {\n if (error.response.status === 401) {\n delete localStorage.openc3Token\n OpenC3Auth.login(location.href)\n } else {\n // Individual tools can set axiosIgnoreResponse to an error code\n // they potentially expect, e.g. '404', in which case we ignore it\n // Since localStorage only supports strings call toString on the status\n if (\n localStorage.axiosIgnoreResponse === error.response.status.toString()\n ) {\n return Promise.reject(error)\n }\n let body = `HTTP ${error.response.status} - `\n if (error.response?.statusText) {\n body += `${error.response.statusText} `\n }\n if (error.response?.config?.data) {\n body += `${error.response.config.data} `\n }\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 } else {\n throw error\n }\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# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n*/\n\nimport axios from './axios.js'\n\nexport class OpenC3Api {\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 OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)\n } catch (error) {\n OpenC3Auth.login()\n }\n this.id = this.id + 1\n try {\n kwparams['scope'] = localStorage.scope\n const response = await axios.post(\n '/openc3-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.openc3Token,\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_openc3_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_openc3_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_tlm_cnts(target_commands) {\n return this.exec('get_tlm_cnts', [target_commands])\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 get_all_telemetry_names(target_name) {\n return this.exec('get_all_telemetry_names', [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_openc3_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 OpenC3ScreenComponent\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_openc3_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_openc3_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_all_command_names(target_name) {\n return this.exec('get_all_command_names', [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_cnts(target_commands) {\n return this.exec('get_cmd_cnts', [target_commands])\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_openc3_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 // TODO: Currently unused but seemed like a useful function\n async hashString(string) {\n if (window.isSecureContext) {\n // Encode the string as an arrayBuffer which the subtle crypto API uses\n const arrayBuffer = new TextEncoder().encode(string)\n // Use the subtle crypto API to perform a SHA256 Sum of the array buffer\n // The resulting hash is stored in an array buffer\n const hashAsArrayBuffer = await crypto.subtle.digest(\n 'SHA-256',\n arrayBuffer\n )\n // To create a string we will get the hexadecimal value of each byte of the array buffer\n // This gets us an array where each byte of the array buffer becomes one item in the array\n const uint8ViewOfHash = new Uint8Array(hashAsArrayBuffer)\n // We then convert it to a regular array so we can convert each item to hexadecimal strings\n // Where to characters of 0-9 or a-f represent a number between 0 and 16, containing 4 bits of information, so 2 of them is 8 bits (1 byte).\n return Array.from(uint8ViewOfHash)\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n }\n // else ?\n }\n}\n"],"names":["vueInstance","Vue","axiosInstance","axios","baseURL","location","origin","timeout","params","interceptors","response","use","error","status","localStorage","openc3Token","OpenC3Auth","login","href","axiosIgnoreResponse","toString","Promise","reject","body","statusText","config","data","message","exception","class","$notify","serious","title","OpenC3Api","method","kwparams","updateToken","defaultMinValidity","this","id","scope","jsonrpc","keyword_params","headers","Authorization","result","err","Error","name","request","val","json_class","raw","NaN","Infinity","Number","isNaN","POSITIVE_INFINITY","NEGATIVE_INFINITY","exec","interface_name","router_name","target_commands","target","packet","item","log_writer_name","limits_set","target_name","packet_name","value_type","type","len","length","converted","i","decode_openc3_type","items","item_name","command_name","parameter_name","param_list","key","Object","prototype","hasOwnProperty","call","encode_openc3_type","undefined","_cmd","tool","ignored","array","string","window","isSecureContext","arrayBuffer","TextEncoder","encode","crypto","subtle","digest","hashAsArrayBuffer","uint8ViewOfHash","Uint8Array","Array","from","map","b","padStart","join"],"sourceRoot":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
(self["webpackChunk_openc3_tool_cmdtlmserver"]=self["webpackChunk_openc3_tool_cmdtlmserver"]||[]).push([[516],{516:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("top-bar",{attrs:{menus:e.menus,title:e.title}}),n("v-card",[n("v-tabs",{attrs:{"fixed-tabs":""},model:{value:e.curTab,callback:function(t){e.curTab=t},expression:"curTab"}},e._l(e.tabs,(function(t,a){return n("v-tab",{key:a,attrs:{to:t.url}},[e._v(" "+e._s(t.name)+" ")])})),1),n("router-view",{attrs:{"refresh-interval":e.refreshInterval}}),n("v-dialog",{attrs:{"max-width":"300"},model:{value:e.optionsDialog,callback:function(t){e.optionsDialog=t},expression:"optionsDialog"}},[n("v-card",[n("v-system-bar",[n("v-spacer"),n("span",[e._v("Options")]),n("v-spacer")],1),n("div",{staticClass:"pa-3"},[n("v-text-field",{attrs:{min:"0",max:"10000",step:"100",type:"number",label:"Refresh Interval (ms)",value:e.refreshInterval},on:{change:function(t){e.refreshInterval=t}}})],1)],1)],1)],1),n("div",{staticStyle:{height:"20px"}}),n("log-messages")],1)},s=[],r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-card",[n("v-card-title",[e._v(" Log Messages "),n("v-spacer"),n("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":"","data-test":"search-log-messages"},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),n("v-data-table",{attrs:{headers:e.headers,items:e.data,search:e.search,"calculate-widths":"","disable-pagination":"","hide-default-footer":"","multi-sort":"",dense:"",height:"45vh","data-test":"log-messages"},scopedSlots:e._u([{key:"item.timestamp",fn:function(t){var a=t.item;return[n("time",{attrs:{title:a.timestamp,datetime:a.timestamp}},[e._v(" "+e._s(a.timestamp)+" ")])]}},{key:"item.severity",fn:function(t){var a=t.item;return[n("astro-badge",{attrs:{status:e.getAstroStatus(a.severity),inline:""}},[n("span",{class:e.getColorClass(a.severity)},[e._v(e._s(a.severity))])])]}}])})],1)},o=[],i=(n(1245),n(9805),n(8188),n(1939),n(8178),n(4063)),l=n(5488),c=n(115),u=n(8378),d=n(7105),m=n(6455),A=n(3492);A.ConnectionMonitor.staleThreshold=60;var v=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/openc3-api/cable";(0,d.Z)(this,e),this._cable=A.createConsumer(t)}return(0,m.Z)(e,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(e,t){var n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then((function(){return n._cable.subscriptions.create((0,u.Z)({channel:e,scope:t,token:localStorage.openc3Token},s),a)}))}}]),e}(),p={components:{AstroBadge:c.Z},props:{history_count:{type:Number,default:100}},data:function(){return{data:[],search:"",headers:[{text:"Time",value:"timestamp",width:200},{text:"Severity",value:"severity"},{text:"Source",value:"microservice_name"},{text:"Message",value:"log"}],cable:new v,subscription:null}},created:function(){var e=this;this.cable.createSubscription("MessagesChannel",localStorage.scope,{received:function(t){var n=JSON.parse(t);n.length>e.history_count&&n.splice(0,n.length-e.history_count),n.forEach((function(t){t.timestamp=e.formatDate(t["@timestamp"])})),e.data=n.reverse().concat(e.data),e.data.length>e.history_count&&(e.data.length=e.history_count)}},{history_count:this.history_count}).then((function(t){e.subscription=t}))},destroyed:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{formatDate:function(e){return(0,i.Z)((0,l.Z)(e),"yyyy-MM-dd HH:mm:ss.SSS")},getColorClass:function(e){return"INFO"===e?"openc3-green":"WARN"===e?"openc3-yellow":"ERROR"===e?"openc3-red":this.$vuetify.theme.dark?"openc3-white":"openc3-black"},getAstroStatus:function(e){return"INFO"===e?"normal":"WARN"===e?"caution":"ERROR"===e?"critical":void 0}}},h=p,f=n(3287),b=(0,f.Z)(h,r,o,!1,null,null,null),g=b.exports,C=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[n("div",{staticClass:"v-toolbar__content"},[e._l(e.menus,(function(t,a){return n("v-menu",{key:a,attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(a){var s=a.on,r=a.attrs;return[n("v-btn",e._g(e._b({staticClass:"mx-1",attrs:{outlined:"","data-test":e.formatDT(e.title+" "+t.label)}},"v-btn",r,!1),s),[n("span",{domProps:{textContent:e._s(t.label)}}),n("v-icon",{attrs:{right:""}},[e._v(" mdi-menu-down ")])],1)]}}],null,!0)},[n("v-list",[n("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:t.radioGroup,"hide-details":"",dense:""}},[e._l(t.items,(function(a,s){return[a.divider?n("v-divider"):n("v-list-item",{key:s,attrs:{disabled:a.disabled,"data-test":e.formatDT(e.title+" "+t.label+" "+a.label)},on:{click:a.command}},[a.radio?n("v-list-item-action",[n("v-radio",{attrs:{color:"secondary",label:a.label,value:a.label}})],1):e._e(),a.checkbox?n("v-list-item-action",[n("v-checkbox",{attrs:{color:"secondary",label:a.label,value:a.label},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}})],1):e._e(),a.icon?n("v-list-item-icon",[n("v-icon",{attrs:{disabled:a.disabled}},[e._v(e._s(a.icon))])],1):e._e(),a.radio||a.checkbox?e._e():n("v-list-item-title",{style:"cursor: pointer;"+(a.disabled?"opacity: 0.2":"")},[e._v(e._s(a.label))])],1)]}))],2)],1)],1)})),n("v-spacer"),n("v-toolbar-title",[e._v(e._s(e.title))]),n("v-spacer")],2)])},_=[],y=(n(7950),n(5940),n(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()}}}),x=y,T=(n(5741),(0,f.Z)(x,C,_,!1,null,"3237297b",null)),k=T.exports;function S(){var e="/openc3/plugins/packages/openc3-tool-cmdtlmserver/src/tools/CmdTlmServer/CmdTlmServer.vue",t="0aa3a866389b61201c0c8b2c29b7bdec64a5c41e",n=new Function("return this")(),a="__coverage__",s={path:"/openc3/plugins/packages/openc3-tool-cmdtlmserver/src/tools/CmdTlmServer/CmdTlmServer.vue",statementMap:{0:{start:{line:65,column:4},end:{line:110,column:5}},1:{start:{line:104,column:16},end:{line:104,column:41}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:9},end:{line:111,column:3}},line:64},1:{name:"(anonymous_1)",decl:{start:{line:103,column:23},end:{line:103,column:24}},loc:{start:{line:103,column:29},end:{line:105,column:15}},line:103}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,sources:["CmdTlmServer.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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:"CmdTlmServer.vue",sourceRoot:"src/tools/CmdTlmServer",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n--\x3e\n\n<template>\n <div>\n <top-bar :menus="menus" :title="title" />\n <v-card>\n <v-tabs v-model="curTab" fixed-tabs>\n <v-tab v-for="(tab, index) in tabs" :key="index" :to="tab.url">\n {{ tab.name }}\n </v-tab>\n </v-tabs>\n <router-view :refresh-interval="refreshInterval" />\n <v-dialog v-model="optionsDialog" max-width="300">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span>Options</span>\n <v-spacer />\n </v-system-bar>\n <div class="pa-3">\n <v-text-field\n min="0"\n max="10000"\n step="100"\n type="number"\n label="Refresh Interval (ms)"\n :value="refreshInterval"\n @change="refreshInterval = $event"\n />\n </div>\n </v-card>\n </v-dialog>\n </v-card>\n <div style="height: 20px" />\n <log-messages />\n </div>\n</template>\n\n<script>\nimport LogMessages from \'@openc3/tool-common/src/components/LogMessages\'\nimport TopBar from \'@openc3/tool-common/src/components/TopBar\'\nexport default {\n components: {\n LogMessages,\n TopBar,\n },\n data() {\n return {\n title: \'CmdTlmServer\',\n curTab: null,\n tabs: [\n {\n name: \'Interfaces\',\n url: \'/interfaces\',\n },\n {\n name: \'Targets\',\n url: \'/targets\',\n },\n {\n name: \'Cmd Packets\',\n url: \'/cmd-packets\',\n },\n {\n name: \'Tlm Packets\',\n url: \'/tlm-packets\',\n },\n {\n name: \'Routers\',\n url: \'/routers\',\n },\n {\n name: \'Status\',\n url: \'/status\',\n },\n ],\n updater: null,\n refreshInterval: 1000,\n optionsDialog: false,\n menus: [\n {\n label: \'File\',\n items: [\n {\n label: \'Options\',\n command: () => {\n this.optionsDialog = true\n },\n },\n ],\n },\n ],\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']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"0aa3a866389b61201c0c8b2c29b7bdec64a5c41e"},r=n[a]||(n[a]={});r[e]&&r[e].hash===t||(r[e]=s);var o=r[e];return S=function(){return o},o}S();var w={components:{LogMessages:g,TopBar:k},data:function(){var e=this;return S().f[0]++,S().s[0]++,{title:"CmdTlmServer",curTab:null,tabs:[{name:"Interfaces",url:"/interfaces"},{name:"Targets",url:"/targets"},{name:"Cmd Packets",url:"/cmd-packets"},{name:"Tlm Packets",url:"/tlm-packets"},{name:"Routers",url:"/routers"},{name:"Status",url:"/status"}],updater:null,refreshInterval:1e3,optionsDialog:!1,menus:[{label:"File",items:[{label:"Options",command:function(){S().f[1]++,S().s[1]++,e.optionsDialog=!0}}]}]}}},R=w,M=(n(3885),(0,f.Z)(R,a,s,!1,null,"ee300d72",null)),I=M.exports},2659:function(e,t,n){"use strict";n.r(t);var a=n(3467),s=n.n(a),r=n(8715),o=n.n(r),i=o()(s());i.push([e.id,".v-list[data-v-ee300d72] .v-label{margin-left:5px}.v-list-item__icon[data-v-ee300d72]{margin-right:15px!important}.v-list-item__title[data-v-ee300d72]{color:#fff}",""]),t["default"]=i},7764:function(e,t,n){"use strict";n.r(t);var a=n(3467),s=n.n(a),r=n(8715),o=n.n(r),i=o()(s());i.push([e.id,".v-list[data-v-3237297b] .v-label{margin-left:5px}.v-list-item__icon[data-v-3237297b]{margin-right:15px!important}.v-list-item__title[data-v-3237297b]{color:#fff}",""]),t["default"]=i},3885:function(e,t,n){var a=n(2659);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var s=n(3514).Z;s("042df426",a,!0,{sourceMap:!1,shadowMode:!1})},5741:function(e,t,n){var a=n(7764);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var s=n(3514).Z;s("9f637652",a,!0,{sourceMap:!1,shadowMode:!1})}}]);
|
2
|
+
//# sourceMappingURL=516.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"js/516.js","mappings":"6LAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQN,EAAIO,MAAM,MAAQP,EAAIQ,SAASJ,EAAG,SAAS,CAACA,EAAG,SAAS,CAACE,MAAM,CAAC,aAAa,IAAIG,MAAM,CAACC,MAAOV,EAAU,OAAEW,SAAS,SAAUC,GAAMZ,EAAIa,OAAOD,CAAG,EAAEE,WAAW,WAAWd,EAAIe,GAAIf,EAAQ,MAAE,SAASgB,EAAIC,GAAO,OAAOb,EAAG,QAAQ,CAACc,IAAID,EAAMX,MAAM,CAAC,GAAKU,EAAIG,MAAM,CAACnB,EAAIoB,GAAG,IAAIpB,EAAIqB,GAAGL,EAAIM,MAAM,MAAM,IAAG,GAAGlB,EAAG,cAAc,CAACE,MAAM,CAAC,mBAAmBN,EAAIuB,mBAAmBnB,EAAG,WAAW,CAACE,MAAM,CAAC,YAAY,OAAOG,MAAM,CAACC,MAAOV,EAAiB,cAAEW,SAAS,SAAUC,GAAMZ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AAQC,aAAYD,EAAUA,EAAQzC,SACnB,kBAAZyC,IAAsBA,EAAU,CAAC,CAACF,EAAOC,GAAIC,EAAS,MAC7DA,EAAQE,SAAQJ,EAAOK,QAAUH,EAAQE,QAE5C,IAAIE,EAAM,UACGA,EAAI,WAAYJ,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa,G,uBCN5E,IAAIA,EAAU,EAAQ,MACnBA,EAAQC,aAAYD,EAAUA,EAAQzC,SACnB,kBAAZyC,IAAsBA,EAAU,CAAC,CAACF,EAAOC,GAAIC,EAAS,MAC7DA,EAAQE,SAAQJ,EAAOK,QAAUH,EAAQE,QAE5C,IAAIE,EAAM,UACGA,EAAI,WAAYJ,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa,G","sources":["webpack://@openc3/tool-cmdtlmserver/./src/tools/CmdTlmServer/CmdTlmServer.vue?b3e3","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/LogMessages.vue?a0db","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/services/cable.js","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/LogMessages.vue","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/LogMessages.vue?9d33","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/LogMessages.vue?afc7","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/TopBar.vue?79bd","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/TopBar.vue","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/TopBar.vue?231a","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/TopBar.vue?d9e2","webpack://@openc3/tool-cmdtlmserver/src/tools/CmdTlmServer/CmdTlmServer.vue","webpack://@openc3/tool-cmdtlmserver/./src/tools/CmdTlmServer/CmdTlmServer.vue?fba4","webpack://@openc3/tool-cmdtlmserver/./src/tools/CmdTlmServer/CmdTlmServer.vue","webpack://@openc3/tool-cmdtlmserver/./src/tools/CmdTlmServer/CmdTlmServer.vue?4a36","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/TopBar.vue?bfe1","webpack://@openc3/tool-cmdtlmserver/./src/tools/CmdTlmServer/CmdTlmServer.vue?4095","webpack://@openc3/tool-cmdtlmserver/../openc3-tool-common/src/components/TopBar.vue?1e7c"],"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-card',[_c('v-tabs',{attrs:{\"fixed-tabs\":\"\"},model:{value:(_vm.curTab),callback:function ($$v) {_vm.curTab=$$v},expression:\"curTab\"}},_vm._l((_vm.tabs),function(tab,index){return _c('v-tab',{key:index,attrs:{\"to\":tab.url}},[_vm._v(\" \"+_vm._s(tab.name)+\" \")])}),1),_c('router-view',{attrs:{\"refresh-interval\":_vm.refreshInterval}}),_c('v-dialog',{attrs:{\"max-width\":\"300\"},model:{value:(_vm.optionsDialog),callback:function ($$v) {_vm.optionsDialog=$$v},expression:\"optionsDialog\"}},[_c('v-card',[_c('v-system-bar',[_c('v-spacer'),_c('span',[_vm._v(\"Options\")]),_c('v-spacer')],1),_c('div',{staticClass:\"pa-3\"},[_c('v-text-field',{attrs:{\"min\":\"0\",\"max\":\"10000\",\"step\":\"100\",\"type\":\"number\",\"label\":\"Refresh Interval (ms)\",\"value\":_vm.refreshInterval},on:{\"change\":function($event){_vm.refreshInterval = $event}}})],1)],1)],1)],1),_c('div',{staticStyle:{\"height\":\"20px\"}}),_c('log-messages')],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-card',[_c('v-card-title',[_vm._v(\" Log Messages \"),_c('v-spacer'),_c('v-text-field',{attrs:{\"append-icon\":\"mdi-magnify\",\"label\":\"Search\",\"single-line\":\"\",\"hide-details\":\"\",\"data-test\":\"search-log-messages\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.data,\"search\":_vm.search,\"calculate-widths\":\"\",\"disable-pagination\":\"\",\"hide-default-footer\":\"\",\"multi-sort\":\"\",\"dense\":\"\",\"height\":\"45vh\",\"data-test\":\"log-messages\"},scopedSlots:_vm._u([{key:\"item.timestamp\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('time',{attrs:{\"title\":item.timestamp,\"datetime\":item.timestamp}},[_vm._v(\" \"+_vm._s(item.timestamp)+\" \")])]}},{key:\"item.severity\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('astro-badge',{attrs:{\"status\":_vm.getAstroStatus(item.severity),\"inline\":\"\"}},[_c('span',{class:_vm.getColorClass(item.severity)},[_vm._v(_vm._s(item.severity))])])]}}])})],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# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n*/\n\nimport * as ActionCable from '@rails/actioncable'\n//ActionCable.logger.enabled = true\nActionCable.ConnectionMonitor.staleThreshold = 60\n\nexport default class Cable {\n constructor(url = '/openc3-api/cable') {\n this._cable = ActionCable.createConsumer(url)\n }\n disconnect() {\n this._cable.disconnect()\n }\n createSubscription(channel, scope, callbacks = {}, additionalOptions = {}) {\n return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(() => {\n return this._cable.subscriptions.create(\n {\n channel,\n scope,\n token: localStorage.openc3Token,\n ...additionalOptions,\n },\n callbacks\n )\n })\n }\n}\n","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n-->\n\n<template>\n <v-card>\n <v-card-title>\n Log Messages\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 data-test=\"search-log-messages\"\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"data\"\n :search=\"search\"\n calculate-widths\n disable-pagination\n hide-default-footer\n multi-sort\n dense\n height=\"45vh\"\n data-test=\"log-messages\"\n >\n <template v-slot:item.timestamp=\"{ item }\">\n <time :title=\"item.timestamp\" :datetime=\"item.timestamp\">\n {{ item.timestamp }}\n </time>\n </template>\n <template v-slot:item.severity=\"{ item }\">\n <astro-badge :status=\"getAstroStatus(item.severity)\" inline>\n <span :class=\"getColorClass(item.severity)\">{{ item.severity }}</span>\n </astro-badge>\n </template>\n </v-data-table>\n </v-card>\n</template>\n\n<script>\nimport { parseISO, format } from 'date-fns'\nimport AstroBadge from './icons/AstroBadge'\nimport Cable from '../services/cable.js'\n\nexport default {\n components: {\n AstroBadge,\n },\n props: {\n history_count: {\n type: Number,\n default: 100,\n },\n },\n data() {\n return {\n data: [],\n search: '',\n headers: [\n { text: 'Time', value: 'timestamp', width: 200 },\n { text: 'Severity', value: 'severity' },\n { text: 'Source', value: 'microservice_name' },\n { text: 'Message', value: 'log' },\n ],\n cable: new Cable(),\n subscription: null,\n }\n },\n created() {\n this.cable\n .createSubscription(\n 'MessagesChannel',\n localStorage.scope,\n {\n received: (data) => {\n let messages = JSON.parse(data)\n if (messages.length > this.history_count) {\n messages.splice(0, messages.length - this.history_count)\n }\n messages.forEach((message) => {\n message.timestamp = this.formatDate(message['@timestamp'])\n })\n this.data = messages.reverse().concat(this.data)\n if (this.data.length > this.history_count) {\n this.data.length = this.history_count\n }\n },\n },\n {\n history_count: this.history_count,\n }\n )\n .then((subscription) => {\n this.subscription = subscription\n })\n },\n destroyed() {\n if (this.subscription) {\n this.subscription.unsubscribe()\n }\n this.cable.disconnect()\n },\n methods: {\n formatDate(timestamp) {\n // timestamp: 2021-01-20T21:08:49.784+00:00\n return format(parseISO(timestamp), 'yyyy-MM-dd HH:mm:ss.SSS')\n },\n getColorClass(severity) {\n if (severity === 'INFO') {\n return 'openc3-green'\n } else if (severity === 'WARN') {\n return 'openc3-yellow'\n } else if (severity === 'ERROR') {\n return 'openc3-red'\n }\n if (this.$vuetify.theme.dark) {\n return 'openc3-white'\n } else {\n return 'openc3-black'\n }\n },\n getAstroStatus(severity) {\n if (severity === 'INFO') {\n return 'normal'\n } else if (severity === 'WARN') {\n return 'caution'\n } else if (severity === 'ERROR') {\n return 'critical'\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.use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./LogMessages.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.use[1]!../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./LogMessages.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./LogMessages.vue?vue&type=template&id=922d9ae0&\"\nimport script from \"./LogMessages.vue?vue&type=script&lang=js&\"\nexport * from \"./LogMessages.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('mounting-portal',{attrs:{\"mount-to\":\"#openc3-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'):_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}},[_vm._v(_vm._s(option.icon))])],1):_vm._e(),(!option.radio && !option.checkbox)?_c('v-list-item-title',{style:('cursor: pointer;' + (option.disabled ? 'opacity: 0.2' : ''))},[_vm._v(_vm._s(option.label))]):_vm._e()],1)]})],2)],1)],1)}),_c('v-spacer'),_c('v-toolbar-title',[_vm._v(_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# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n-->\n\n<template>\n <mounting-portal mount-to=\"#openc3-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\" />\n <v-list-item\n v-else\n @click=\"option.command\"\n :disabled=\"option.disabled\"\n :data-test=\"formatDT(`${title} ${menu.label} ${option.label}`)\"\n :key=\"j\"\n >\n <v-list-item-action v-if=\"option.radio\">\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 v-if=\"option.checkbox\">\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 :disabled=\"option.disabled\">{{ option.icon }}</v-icon>\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 >{{ option.label }}</v-list-item-title\n >\n </v-list-item>\n </template>\n </v-radio-group>\n </v-list>\n </v-menu>\n <v-spacer />\n <v-toolbar-title>{{ title }}</v-toolbar-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.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.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=3237297b&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=3237297b&prod&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 \"3237297b\",\n null\n \n)\n\nexport default component.exports","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n-->\n\n<template>\n <div>\n <top-bar :menus=\"menus\" :title=\"title\" />\n <v-card>\n <v-tabs v-model=\"curTab\" fixed-tabs>\n <v-tab v-for=\"(tab, index) in tabs\" :key=\"index\" :to=\"tab.url\">\n {{ tab.name }}\n </v-tab>\n </v-tabs>\n <router-view :refresh-interval=\"refreshInterval\" />\n <v-dialog v-model=\"optionsDialog\" max-width=\"300\">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span>Options</span>\n <v-spacer />\n </v-system-bar>\n <div class=\"pa-3\">\n <v-text-field\n min=\"0\"\n max=\"10000\"\n step=\"100\"\n type=\"number\"\n label=\"Refresh Interval (ms)\"\n :value=\"refreshInterval\"\n @change=\"refreshInterval = $event\"\n />\n </div>\n </v-card>\n </v-dialog>\n </v-card>\n <div style=\"height: 20px\" />\n <log-messages />\n </div>\n</template>\n\n<script>\nimport LogMessages from '@openc3/tool-common/src/components/LogMessages'\nimport TopBar from '@openc3/tool-common/src/components/TopBar'\nexport default {\n components: {\n LogMessages,\n TopBar,\n },\n data() {\n return {\n title: 'CmdTlmServer',\n curTab: null,\n tabs: [\n {\n name: 'Interfaces',\n url: '/interfaces',\n },\n {\n name: 'Targets',\n url: '/targets',\n },\n {\n name: 'Cmd Packets',\n url: '/cmd-packets',\n },\n {\n name: 'Tlm Packets',\n url: '/tlm-packets',\n },\n {\n name: 'Routers',\n url: '/routers',\n },\n {\n name: 'Status',\n url: '/status',\n },\n ],\n updater: null,\n refreshInterval: 1000,\n optionsDialog: false,\n menus: [\n {\n label: 'File',\n items: [\n {\n label: 'Options',\n command: () => {\n this.optionsDialog = true\n },\n },\n ],\n },\n ],\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.use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./CmdTlmServer.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.use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./CmdTlmServer.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CmdTlmServer.vue?vue&type=template&id=ee300d72&scoped=true&\"\nimport script from \"./CmdTlmServer.vue?vue&type=script&lang=js&\"\nexport * from \"./CmdTlmServer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CmdTlmServer.vue?vue&type=style&index=0&id=ee300d72&prod&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 \"ee300d72\",\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-ee300d72] .v-label{margin-left:5px}.v-list-item__icon[data-v-ee300d72]{margin-right:15px!important}.v-list-item__title[data-v-ee300d72]{color:#fff}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// 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-3237297b] .v-label{margin-left:5px}.v-list-item__icon[data-v-3237297b]{margin-right:15px!important}.v-list-item__title[data-v-3237297b]{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.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.use[2]!../../../../../node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./CmdTlmServer.vue?vue&type=style&index=0&id=ee300d72&prod&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"042df426\", content, true, {\"sourceMap\":false,\"shadowMode\":false});","// 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.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.use[2]!../../../../node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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=3237297b&prod&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"9f637652\", content, true, {\"sourceMap\":false,\"shadowMode\":false});"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","menus","title","model","value","callback","$$v","curTab","expression","_l","tab","index","key","url","_v","_s","name","refreshInterval","optionsDialog","staticClass","on","$event","staticStyle","staticRenderFns","search","headers","data","scopedSlots","_u","fn","ref","item","timestamp","getAstroStatus","severity","class","getColorClass","ActionCable","Cable","_cable","disconnect","channel","scope","callbacks","additionalOptions","OpenC3Auth","updateToken","defaultMinValidity","then","subscriptions","create","token","localStorage","openc3Token","components","AstroBadge","props","history_count","type","default","text","width","cable","subscription","created","createSubscription","received","messages","message","destroyed","methods","formatDate","component","menu","i","_g","_b","formatDT","domProps","label","radioGroup","option","j","disabled","command","_e","checked","icon","radio","checkbox","style","LogMessages","TopBar","tabs","updater","items","___CSS_LOADER_EXPORT___","push","module","id","content","__esModule","locals","exports","add"],"sourceRoot":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";(self["webpackChunk_openc3_tool_cmdtlmserver"]=self["webpackChunk_openc3_tool_cmdtlmserver"]||[]).push([[63],{9785:function(t,e,n){function r(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}n.d(e,{Z:function(){return r}})},2765:function(t,e,n){function r(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,{Z:function(){return r}})},4063:function(t,e,n){n.d(e,{Z:function(){return qt}});var r=n(9785);function a(t){return(0,r.Z)(1,arguments),t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t)}function i(t){(0,r.Z)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function o(t){if((0,r.Z)(1,arguments),!a(t)&&"number"!==typeof t)return!1;var e=i(t);return!isNaN(Number(e))}var u={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},s=function(t,e,n){var r,a=u[t];return r="string"===typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},c=s;function d(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var h={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},f={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},m={date:d({formats:h,defaultWidth:"full"}),time:d({formats:l,defaultWidth:"full"}),dateTime:d({formats:f,defaultWidth:"full"})},g=m,w={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},v=function(t,e,n,r){return w[t]},b=v;function y(t){return function(e,n){var r,a=n||{},i=a.context?String(a.context):"standalone";if("formatting"===i&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,u=a.width?String(a.width):o;r=t.formattingValues[u]||t.formattingValues[o]}else{var s=t.defaultWidth,c=a.width?String(a.width):t.defaultWidth;r=t.values[c]||t.values[s]}var d=t.argumentCallback?t.argumentCallback(e):e;return r[d]}}var p={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},T={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},C={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},M={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},x={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},D={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P=function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},k={ordinalNumber:P,era:y({values:p,defaultWidth:"wide"}),quarter:y({values:T,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:y({values:C,defaultWidth:"wide"}),day:y({values:M,defaultWidth:"wide"}),dayPeriod:y({values:x,defaultWidth:"wide",formattingValues:D,defaultFormattingWidth:"wide"})},U=k;function S(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;var o,u=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(s)?Y(s,(function(t){return t.test(u)})):W(s,(function(t){return t.test(u)}));o=t.valueCallback?t.valueCallback(c):c,o=n.valueCallback?n.valueCallback(o):o;var d=e.slice(u.length);return{value:o,rest:d}}}function W(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function Y(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function E(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var a=r[0],i=e.match(t.parsePattern);if(!i)return null;var o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;var u=e.slice(a.length);return{value:o,rest:u}}}var O=/^(\d+)(th|st|nd|rd)?/i,N=/\d+/i,q={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Z={any:[/^b/i,/^(a|c)/i]},H={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},z={any:[/1/i,/2/i,/3/i,/4/i]},F={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},j={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},L={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},X={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Q={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},G={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},B={ordinalNumber:E({matchPattern:O,parsePattern:N,valueCallback:function(t){return parseInt(t,10)}}),era:S({matchPatterns:q,defaultMatchWidth:"wide",parsePatterns:Z,defaultParseWidth:"any"}),quarter:S({matchPatterns:H,defaultMatchWidth:"wide",parsePatterns:z,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:S({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:j,defaultParseWidth:"any"}),day:S({matchPatterns:L,defaultMatchWidth:"wide",parsePatterns:X,defaultParseWidth:"any"}),dayPeriod:S({matchPatterns:Q,defaultMatchWidth:"any",parsePatterns:G,defaultParseWidth:"any"})},A=B,R={code:"en-US",formatDistance:c,formatLong:g,formatRelative:b,localize:U,match:A,options:{weekStartsOn:0,firstWeekContainsDate:1}},_=R,J=n(2765);function I(t,e){(0,r.Z)(2,arguments);var n=i(t).getTime(),a=(0,J.Z)(e);return new Date(n+a)}function V(t,e){(0,r.Z)(2,arguments);var n=(0,J.Z)(e);return I(t,-n)}var K=864e5;function $(t){(0,r.Z)(1,arguments);var e=i(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime(),o=n-a;return Math.floor(o/K)+1}function tt(t){(0,r.Z)(1,arguments);var e=1,n=i(t),a=n.getUTCDay(),o=(a<e?7:0)+a-e;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function et(t){(0,r.Z)(1,arguments);var e=i(t),n=e.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var o=tt(a),u=new Date(0);u.setUTCFullYear(n,0,4),u.setUTCHours(0,0,0,0);var s=tt(u);return e.getTime()>=o.getTime()?n+1:e.getTime()>=s.getTime()?n:n-1}function nt(t){(0,r.Z)(1,arguments);var e=et(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var a=tt(n);return a}var rt=6048e5;function at(t){(0,r.Z)(1,arguments);var e=i(t),n=tt(e).getTime()-nt(e).getTime();return Math.round(n/rt)+1}function it(t,e){(0,r.Z)(1,arguments);var n=e||{},a=n.locale,o=a&&a.options&&a.options.weekStartsOn,u=null==o?0:(0,J.Z)(o),s=null==n.weekStartsOn?u:(0,J.Z)(n.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=i(t),d=c.getUTCDay(),h=(d<s?7:0)+d-s;return c.setUTCDate(c.getUTCDate()-h),c.setUTCHours(0,0,0,0),c}function ot(t,e){(0,r.Z)(1,arguments);var n=i(t),a=n.getUTCFullYear(),o=e||{},u=o.locale,s=u&&u.options&&u.options.firstWeekContainsDate,c=null==s?1:(0,J.Z)(s),d=null==o.firstWeekContainsDate?c:(0,J.Z)(o.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(a+1,0,d),h.setUTCHours(0,0,0,0);var l=it(h,e),f=new Date(0);f.setUTCFullYear(a,0,d),f.setUTCHours(0,0,0,0);var m=it(f,e);return n.getTime()>=l.getTime()?a+1:n.getTime()>=m.getTime()?a:a-1}function ut(t,e){(0,r.Z)(1,arguments);var n=e||{},a=n.locale,i=a&&a.options&&a.options.firstWeekContainsDate,o=null==i?1:(0,J.Z)(i),u=null==n.firstWeekContainsDate?o:(0,J.Z)(n.firstWeekContainsDate),s=ot(t,e),c=new Date(0);c.setUTCFullYear(s,0,u),c.setUTCHours(0,0,0,0);var d=it(c,e);return d}var st=6048e5;function ct(t,e){(0,r.Z)(1,arguments);var n=i(t),a=it(n,e).getTime()-ut(n,e).getTime();return Math.round(a/st)+1}function dt(t,e){var n=t<0?"-":"",r=Math.abs(t).toString();while(r.length<e)r="0"+r;return n+r}var ht={y:function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return dt("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):dt(n+1,2)},d:function(t,e){return dt(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return dt(t.getUTCHours()%12||12,e.length)},H:function(t,e){return dt(t.getUTCHours(),e.length)},m:function(t,e){return dt(t.getUTCMinutes(),e.length)},s:function(t,e){return dt(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,n-3));return dt(a,e.length)}},lt=ht,ft={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mt={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return lt.y(t,e)},Y:function(t,e,n,r){var a=ot(t,r),i=a>0?a:1-a;if("YY"===e){var o=i%100;return dt(o,2)}return"Yo"===e?n.ordinalNumber(i,{unit:"year"}):dt(i,e.length)},R:function(t,e){var n=et(t);return dt(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return dt(n,e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return lt.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=ct(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):dt(a,e.length)},I:function(t,e,n){var r=at(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):dt(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):lt.d(t,e)},D:function(t,e,n){var r=$(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return dt(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return dt(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?ft.noon:0===a?ft.midnight:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?ft.evening:a>=12?ft.afternoon:a>=4?ft.morning:ft.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return lt.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):lt.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):dt(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):dt(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):lt.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):lt.s(t,e)},S:function(t,e){return lt.S(t,e)},X:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return wt(i);case"XXXX":case"XX":return vt(i);case"XXXXX":case"XXX":default:return vt(i,":")}},x:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();switch(e){case"x":return wt(i);case"xxxx":case"xx":return vt(i);case"xxxxx":case"xxx":default:return vt(i,":")}},O:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+gt(i,":");case"OOOO":default:return"GMT"+vt(i,":")}},z:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+gt(i,":");case"zzzz":default:return"GMT"+vt(i,":")}},t:function(t,e,n,r){var a=r._originalDate||t,i=Math.floor(a.getTime()/1e3);return dt(i,e.length)},T:function(t,e,n,r){var a=r._originalDate||t,i=a.getTime();return dt(i,e.length)}};function gt(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=e||"";return n+String(a)+o+dt(i,2)}function wt(t,e){if(t%60===0){var n=t>0?"-":"+";return n+dt(Math.abs(t)/60,2)}return vt(t,e)}function vt(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t),i=dt(Math.floor(a/60),2),o=dt(a%60,2);return r+i+n+o}var bt=mt;function yt(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function pt(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}function Tt(t,e){var n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return yt(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"});break}return n.replace("{{date}}",yt(a,e)).replace("{{time}}",pt(i,e))}var Ct={p:pt,P:Tt},Mt=Ct;function xt(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var Dt=["D","DD"],Pt=["YY","YYYY"];function kt(t){return-1!==Dt.indexOf(t)}function Ut(t){return-1!==Pt.indexOf(t)}function St(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var Wt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Et=/^'([^]*?)'?$/,Ot=/''/g,Nt=/[a-zA-Z]/;function qt(t,e,n){(0,r.Z)(2,arguments);var a=String(e),u=n||{},s=u.locale||_,c=s.options&&s.options.firstWeekContainsDate,d=null==c?1:(0,J.Z)(c),h=null==u.firstWeekContainsDate?d:(0,J.Z)(u.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=s.options&&s.options.weekStartsOn,f=null==l?0:(0,J.Z)(l),m=null==u.weekStartsOn?f:(0,J.Z)(u.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!s.localize)throw new RangeError("locale must contain localize property");if(!s.formatLong)throw new RangeError("locale must contain formatLong property");var g=i(t);if(!o(g))throw new RangeError("Invalid time value");var w=xt(g),v=V(g,w),b={firstWeekContainsDate:h,weekStartsOn:m,locale:s,_originalDate:g},y=a.match(Yt).map((function(t){var e=t[0];if("p"===e||"P"===e){var n=Mt[e];return n(t,s.formatLong,b)}return t})).join("").match(Wt).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return Zt(n);var a=bt[r];if(a)return!u.useAdditionalWeekYearTokens&&Ut(n)&&St(n,e,t),!u.useAdditionalDayOfYearTokens&&kt(n)&&St(n,e,t),a(v,n,s.localize,b);if(r.match(Nt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return y}function Zt(t){return t.match(Et)[1].replace(Ot,"'")}}}]);
|
2
|
+
//# sourceMappingURL=63.js.map
|