mao-service-discovery 1.6.9-windows-rc1-master-3201225cface67dd4796e39de9552fcfb0d32572.0 → 1.6.9-windows-rc1-master-dd5b2d85407bbb1b1e862b23efcba8975667520e.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mao-service-discovery",
3
- "version": "1.6.9-windows-rc1-master-3201225cface67dd4796e39de9552fcfb0d32572.0",
3
+ "version": "1.6.9-windows-rc1-master-dd5b2d85407bbb1b1e862b23efcba8975667520e.0",
4
4
  "description": "Discover your services by using gRPC stream, ICMP or etcd. Come with WebGUI, Restful API and Config Persistence ability.",
5
5
  "main": "MaoServiceDiscovery",
6
6
  "scripts": {
@@ -1 +1 @@
1
- <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>Mao-Service-Discovery</title><script defer="defer" src="/js/chunk-vendors.f3fb1091.js"></script><script defer="defer" src="/js/app.22c66168.js"></script><link href="/css/chunk-vendors.1020ffab.css" rel="stylesheet"><link href="/css/app.d2361b4b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Mao-Service-Discovery doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
1
+ <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>Mao-Service-Discovery</title><script defer="defer" src="/js/chunk-vendors.f3fb1091.js"></script><script defer="defer" src="/js/app.937f1a64.js"></script><link href="/css/chunk-vendors.1020ffab.css" rel="stylesheet"><link href="/css/app.d2361b4b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Mao-Service-Discovery doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
@@ -0,0 +1 @@
1
+ (function(){"use strict";var e={6818:function(e,t,o){var a=o(9242),n=o(3765),l=(o(4415),o(4161)),r=o(3396);const i={id:"app"};function m(e,t,o,a,n,l){const m=(0,r.up)("el-header"),u=(0,r.up)("Menu"),s=(0,r.up)("el-icon"),d=(0,r.up)("el-menu-item"),c=(0,r.up)("el-menu"),p=(0,r.up)("el-aside"),f=(0,r.up)("router-view"),h=(0,r.up)("el-main"),v=(0,r.up)("el-container");return(0,r.wg)(),(0,r.iD)("div",i,[(0,r.Wm)(v,{class:"class-container"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{style:{"font-size":"xx-large"}},{default:(0,r.w5)((()=>[(0,r.Uk)("Bigmao Radio Station")])),_:1}),(0,r.Wm)(v,null,{default:(0,r.w5)((()=>[(0,r.Wm)(p,{style:{width:"210px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(c,{"default-active":"/deviceStatus",style:{height:"100%"},router:""},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{index:"/deviceStatus"},{default:(0,r.w5)((()=>[(0,r.Wm)(s,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u)])),_:1}),(0,r.Uk)(" 设备状态 ")])),_:1}),(0,r.Wm)(d,{index:"/config"},{default:(0,r.w5)((()=>[(0,r.Wm)(s,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u)])),_:1}),(0,r.Uk)(" 服务配置 ")])),_:1}),(0,r.Wm)(d,{index:"/apiListOldApi"},{default:(0,r.w5)((()=>[(0,r.Wm)(s,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u)])),_:1}),(0,r.Uk)(" API列表、老版WebUI ")])),_:1})])),_:1})])),_:1}),(0,r.Wm)(h,null,{default:(0,r.w5)((()=>[(0,r.Wm)(f,{name:"maoMain"})])),_:1})])),_:1})])),_:1})])}var u={name:"App",components:{},methods:{}},s=o(89);const d=(0,s.Z)(u,[["render",m]]);var c=d,p=o(2748),f=o(2483);function h(e,t,o,a,n,l){const i=(0,r.up)("el-menu-item"),m=(0,r.up)("el-menu"),u=(0,r.up)("router-view");return(0,r.wg)(),(0,r.iD)("div",null,[(0,r.Wm)(m,{"default-active":"/config/email",mode:"horizontal",router:""},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{index:"/config/email"},{default:(0,r.w5)((()=>[(0,r.Uk)("邮件通知配置")])),_:1}),(0,r.Wm)(i,{index:"/config/icmp"},{default:(0,r.w5)((()=>[(0,r.Uk)("ICMP检测配置")])),_:1}),(0,r.Wm)(i,{index:"/config/topo"},{default:(0,r.w5)((()=>[(0,r.Uk)("拓扑接口配置")])),_:1}),(0,r.Wm)(i,{index:"/config/allText"},{default:(0,r.w5)((()=>[(0,r.Uk)("配置文件导出")])),_:1})])),_:1}),(0,r.Wm)(u,{name:"maoConfig"})])}var v={name:"ConfigPages",data(){return{}},mounted(){},methods:{}};const w=(0,s.Z)(v,[["render",h]]);var b=w;const g=(0,r._)("div",{style:{margin:"20px"}},null,-1);function _(e,t,o,a,n,l){const i=(0,r.up)("el-input"),m=(0,r.up)("el-form-item"),u=(0,r.up)("el-button"),s=(0,r.up)("el-form");return(0,r.wg)(),(0,r.iD)(r.HY,null,[g,(0,r.Wm)(s,{model:n.form,"label-width":"120px","label-position":"top",style:{"max-width":"600px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{label:"Username"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.username,"onUpdate:modelValue":t[0]||(t[0]=e=>n.form.username=e)},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"Password"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.password,"onUpdate:modelValue":t[1]||(t[1]=e=>n.form.password=e),placeholder:"*** ***"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"SMTP Server address and port"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.smtpServerAddrPort,"onUpdate:modelValue":t[2]||(t[2]=e=>n.form.smtpServerAddrPort=e),placeholder:"e.g. smtp.mao.com:25"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"Sender Email"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.sender,"onUpdate:modelValue":t[3]||(t[3]=e=>n.form.sender=e)},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"Receiver Emails"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.receiver,"onUpdate:modelValue":t[4]||(t[4]=e=>n.form.receiver=e),placeholder:"one line, one receiver",type:"textarea",rows:"10"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u,{type:"primary",onClick:l.onSubmit},{default:(0,r.w5)((()=>[(0,r.Uk)("Create")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"])],64)}var C=o(4870),W={name:"ConfigEmail",data(){return{form:(0,C.qj)({username:"",password:"",smtpServerAddrPort:"",sender:"",receiver:""})}},mounted(){this.onLoad()},methods:{onLoad(){var e=this;this.$http.get("/api/getEmailInfo").then((function(t){var o=t.data;e.form.username=o["username"],e.form.smtpServerAddrPort=o["smtpServerAddrPort"],e.form.sender=o["sender"],e.form.receiver=o["receiver"].join("\n"),e.form.password=""})).catch((function(e){console.log("errMao: "+e)}))},onSubmit(){var e=this;this.$http.post("/api/addEmailInfo",this.form,{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){e.onLoad()})).catch((function(e){console.log("errMao: "+e)}))}}};const D=(0,s.Z)(W,[["render",_]]);var x=D;const T=(0,r._)("div",{style:{margin:"20px"}},null,-1);function y(e,t,o,a,n,l){const i=(0,r.up)("el-input"),m=(0,r.up)("el-form-item"),u=(0,r.up)("el-button"),s=(0,r.up)("el-form"),d=(0,r.up)("el-table-column"),c=(0,r.up)("el-table");return(0,r.wg)(),(0,r.iD)(r.HY,null,[T,(0,r.Wm)(s,{model:n.form,"label-width":"120px","label-position":"top",style:{"max-width":"600px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{label:"New Services"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.ipv4v6,"onUpdate:modelValue":t[0]||(t[0]=e=>n.form.ipv4v6=e),placeholder:"one line, one receiver",type:"textarea",rows:"3"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u,{type:"primary",onClick:l.onSubmit},{default:(0,r.w5)((()=>[(0,r.Uk)("Add")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"]),(0,r.Wm)(c,{data:n.maoIcmpTableData,ref:"maoTable","cell-class-name":l.tableCellClassName,"empty-text":"暂无数据","max-height":"610px"},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{label:"Control"},{default:(0,r.w5)((e=>[(0,r.Wm)(u,{size:"small",type:"danger",onClick:t=>l.handleDelete(e.$index,e.row)},{default:(0,r.w5)((()=>[(0,r.Uk)("Delete")])),_:2},1032,["onClick"])])),_:1}),(0,r.Wm)(d,{label:"Device IP",prop:"deviceIp"}),(0,r.Wm)(d,{label:"Alive",prop:"alive"}),(0,r.Wm)(d,{label:"Detect Count",prop:"Detect_Count"}),(0,r.Wm)(d,{label:"Report Count",prop:"Report_Count"}),(0,r.Wm)(d,{label:"RTT Duration",prop:"RTT_Duration"}),(0,r.Wm)(d,{label:"Last Seen",prop:"Last_Seen"}),(0,r.Wm)(d,{label:"Timestamp",prop:"RttOutbound_or_Remote_Timestamp"})])),_:1},8,["data","cell-class-name"])],64)}o(7658);var S={name:"ConfigIcmp",data(){return{maoIcmpTableData:[],refreshTimer:"",form:{ipv4v6:""}}},mounted(){this.onLoad(),this.refreshTimer=setInterval(this.onLoad,1e3)},beforeUnmount(){clearInterval(this.refreshTimer)},methods:{tableCellClassName({row:e,column:t,rowIndex:o,columnIndex:a}){e.index=o,t.index=a},handleDelete(e,t){var o=this;this.$http.post("/api/delServiceIp",{ipv4v6:t.deviceIp},{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){o.onLoad()})).catch((function(e){console.log("errMao: "+e)}))},onLoad(){var e=this;this.$http.get("/api/showServiceIP").then((function(t){e.maoIcmpTableData=[];for(var o=t.data,a=0;a<o.length;a++)e.maoIcmpTableData.push({deviceIp:null!=o[a]["Address"]?o[a]["Address"]:o[a]["Hostname"],alive:o[a]["Alive"],Detect_Count:null!=o[a]["DetectCount"]?o[a]["DetectCount"]:"/",Report_Count:null!=o[a]["ReportCount"]?o[a]["ReportCount"]:o[a]["ReportTimes"],RTT_Duration:null!=o[a]["RttDuration"]?(o[a]["RttDuration"]/1e3/1e3).toFixed(3)+"ms":"/",Last_Seen:null!=o[a]["LastSeen"]?o[a]["LastSeen"]:o[a]["LocalLastSeen"],RttOutbound_or_Remote_Timestamp:null!=o[a]["RttOutboundTimestamp"]?o[a]["RttOutboundTimestamp"]:o[a]["ServerDateTime"]})})).catch((function(e){console.log("errMao: "+e)}))},onSubmit(){var e=this;this.$http.post("/api/addServiceIp",this.form,{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){e.onLoad()})).catch((function(e){console.log("errMao: "+e)}))}}};const R=(0,s.Z)(S,[["render",y]]);var O=R;const I=(0,r._)("div",{style:{margin:"20px"}},null,-1);function L(e,t,o,a,n,l){const i=(0,r.up)("el-input"),m=(0,r.up)("el-form-item"),u=(0,r.up)("el-button"),s=(0,r.up)("el-form"),d=(0,r.up)("el-table-column"),c=(0,r.up)("el-table");return(0,r.wg)(),(0,r.iD)(r.HY,null,[I,(0,r.Wm)(s,{model:n.form,"label-width":"120px","label-position":"top",style:{"max-width":"600px"},action:"/addServiceIp",method:"post"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{label:"ONOS Endpoint address and port"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.addrPort,"onUpdate:modelValue":t[0]||(t[0]=e=>n.form.addrPort=e),placeholder:"e.g. 127.0.0.1:8181"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u,{type:"primary",onClick:l.onSubmit},{default:(0,r.w5)((()=>[(0,r.Uk)("Create")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"]),(0,r.Wm)(c,{data:n.maoOnosTableData,ref:"maoTable","row-class-name":l.tableRowClassName,"empty-text":"暂无数据","max-height":"610px"},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{label:"API Name",prop:"API_NAME"}),(0,r.Wm)(d,{label:"API URL",prop:"API_URL"})])),_:1},8,["data","row-class-name"])],64)}var P={name:"ConfigTopo",data(){return{form:(0,C.qj)({addrPort:""}),maoOnosTableData:[]}},mounted(){this.onLoad()},methods:{tableRowClassName(e){return-1!==e.row.API_URL.indexOf("%")?"warning-row":""},onSubmit(){var e=this;this.$http.post("/api/addOnosInfo",this.form,{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){e.onLoad()})).catch((function(e){console.log("errMao: "+e)}))},onLoad(){var e=this;this.$http.get("/api/getOnosInfo").then((function(t){for(var o in e.maoOnosTableData=[],t.data)"addrPort"===o?e.form.addrPort=t.data[o]:e.maoOnosTableData.push({API_NAME:o,API_URL:t.data[o]})})).catch((function(e){console.log("errMao: "+e)}))}}};const k=(0,s.Z)(P,[["render",L]]);var A=k;const U=(0,r._)("div",{style:{margin:"20px"}},null,-1);function V(e,t,o,a,n,l){const i=(0,r.up)("el-input");return(0,r.wg)(),(0,r.iD)(r.HY,null,[U,(0,r.Wm)(i,{modelValue:n.maoConfigData,"onUpdate:modelValue":t[0]||(t[0]=e=>n.maoConfigData=e),type:"textarea",placeholder:"Loading config data ...",autosize:""},null,8,["modelValue"])],64)}var M={name:"ConfigAllText",data(){return{maoConfigData:""}},mounted(){this.onLoad()},methods:{onLoad(){var e=this;this.$http.get("/api/getAllConfigText").then((function(t){e.maoConfigData=t.data})).catch((function(e){console.log("errMao: "+e)}))}}};const $=(0,s.Z)(M,[["render",V]]);var j=$;const N={name:"DeviceInfo",data(){return{refreshSwitch:!0,refreshTimer:"",maoTableData:[]}},mounted(){this.refreshData(),this.refreshTimer=setInterval(this.refreshData,1e3)},beforeUnmount(){clearInterval(this.refreshTimer)},methods:{tableRowClassName(e){return!1===e.row.alive?"warning-row":""},tableCellClassName({row:e,column:t,rowIndex:o,columnIndex:a}){e.index=o,t.index=a},maoTableClick(e,t){1===t.index&&this.$refs.maoTable.toggleRowExpansion(e)},refreshData(){if(this.refreshSwitch){var e=this;this.$http.get("/api/showMergeServiceIP").then((function(t){e.maoTableData=[];for(var o=t.data,a=0;a<o.length;a++){var n=[];for(let e in o[a])n.push({attrName:e,attrValue:o[a][e]});n=n.sort(((e,t)=>e["attrName"]<t["attrName"]?-1:1)),e.maoTableData.push({attr:n,deviceIp:null!=o[a]["Address"]?o[a]["Address"]:o[a]["Hostname"],Report_IP:null!=o[a]["Ips"]?o[a]["Ips"].join("\n"):"/",alive:o[a]["Alive"],Detect_Count:null!=o[a]["DetectCount"]?o[a]["DetectCount"]:"/",Report_Count:null!=o[a]["ReportCount"]?o[a]["ReportCount"]:o[a]["ReportTimes"],RTT_Duration:null!=o[a]["RttDuration"]?(o[a]["RttDuration"]/1e3/1e3).toFixed(3)+"ms":"/",Last_Seen:null!=o[a]["LastSeen"]?o[a]["LastSeen"]:o[a]["LocalLastSeen"],RttOutbound_or_Remote_Timestamp:null!=o[a]["RttOutboundTimestamp"]?o[a]["RttOutboundTimestamp"]:o[a]["ServerDateTime"],Other_Data:null!=o[a]["OtherData"]?o[a]["OtherData"]:"/"})}})).catch((function(e){console.log("errMao"+e)}))}},maoDoClick(){console.log("DeviceControl clicked")},maoDeviceOnline(e){var t=this;console.log(e),this.$http.post("/api/devices/setDeviceOnline",{deviceid:e}).then((function(e){console.log(e),e["data"]?t.$notify({title:"成功",message:"这是一条成功的提示消息, maoDeviceOnline",type:"success"}):t.$notify.error({title:"错误",message:"这是一条错误的提示消息, maoDeviceOnline"})})).catch((function(e){console.log(e)}))},maoDeviceOffline(e){var t=this;this.$http.post("/api/devices/setDeviceOffline",{deviceid:e}).then((function(e){console.log(e),e["data"]?t.$notify({title:"成功",message:"这是一条成功的提示消息, maoDeviceOffline",type:"success"}):t.$notify.error({title:"错误",message:"这是一条错误的提示消息, maoDeviceOffline"})})).catch((function(e){console.log(e)}))}}};var E=Object.assign(N,{setup(e){return(e,t)=>{const o=(0,r.up)("el-switch"),a=(0,r.up)("el-row"),n=(0,r.up)("el-table-column"),l=(0,r.up)("el-table");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(a,{class:"row-bg",justify:"center"},{default:(0,r.w5)((()=>[(0,r.Wm)(o,{modelValue:e.refreshSwitch,"onUpdate:modelValue":t[0]||(t[0]=t=>e.refreshSwitch=t),size:"default","active-text":"启用刷新"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(l,{data:e.maoTableData,ref:"maoTable",onCellClick:e.maoTableClick,"cell-class-name":e.tableCellClassName,"row-class-name":e.tableRowClassName,"empty-text":"暂无数据","max-height":"845px"},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{label:"",type:"expand"},{default:(0,r.w5)((e=>[(0,r.Wm)(l,{data:e.row.attr,border:!0},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{label:"属性",prop:"attrName",width:"200px"}),(0,r.Wm)(n,{label:"值",prop:"attrValue"})])),_:2},1032,["data"])])),_:1}),(0,r.Wm)(n,{label:"Device IP",prop:"deviceIp"}),(0,r.Wm)(n,{label:"Report IP",prop:"Report_IP"}),(0,r.Wm)(n,{label:"Alive",prop:"alive"}),(0,r.Wm)(n,{label:"Detect Count",prop:"Detect_Count"}),(0,r.Wm)(n,{label:"Report Count",prop:"Report_Count"}),(0,r.Wm)(n,{label:"RTT Duration",prop:"RTT_Duration"}),(0,r.Wm)(n,{label:"Last Seen",prop:"Last_Seen"}),(0,r.Wm)(n,{label:"Timestamp",prop:"RttOutbound_or_Remote_Timestamp"})])),_:1},8,["data","onCellClick","cell-class-name","row-class-name"])],64)}}});const Z=E;var H=Z;const z={src:"https://dev.maojianwei.com:4433/onos/ui",width:"100%",height:"100%"};function Y(e,t,o,a,n,l){return(0,r.wg)(),(0,r.iD)("iframe",z)}var F={name:"DeviceControl",data(){return{}},mounted(){},methods:{}};const q=(0,s.Z)(F,[["render",Y]]);var B=q;const G={src:"/api",width:"100%",height:"100%"};function J(e,t,o,a,n,l){return(0,r.wg)(),(0,r.iD)("iframe",G)}var K={name:"ApiListOldApi",data(){return{}},mounted(){},methods:{}};const Q=(0,s.Z)(K,[["render",J]]);var X=Q,ee=(0,f.p7)({history:(0,f.r5)(),routes:[{path:"/",components:{maoMain:H}},{path:"/config",components:{maoMain:b},children:[{path:"",components:{maoConfig:x}},{path:"email",components:{maoConfig:x}},{path:"icmp",components:{maoConfig:O}},{path:"topo",components:{maoConfig:A}},{path:"allText",components:{maoConfig:j}}]},{path:"/deviceStatus",components:{maoMain:H}},{path:"/onos",components:{maoMain:B}},{path:"/apiListOldApi",components:{maoMain:X}}]});console.log("1 ===");const te=(0,a.ri)(c);console.log("2 ===");for(const[oe,ae]of Object.entries(p))te.component(oe,ae);console.log("3 ==="),te.config.globalProperties.$http=l.Z.create({baseUrl:"https://www.maojianwei.com/resources/",timeout:3e3}),console.log("4 ==="),te.use(n.Z,{size:"large"}),console.log("5 ==="),te.use(ee),console.log("6 ==="),te.mount("#app"),console.log("7 ===")}},t={};function o(a){var n=t[a];if(void 0!==n)return n.exports;var l=t[a]={exports:{}};return e[a].call(l.exports,l,l.exports,o),l.exports}o.m=e,function(){var e=[];o.O=function(t,a,n,l){if(!a){var r=1/0;for(s=0;s<e.length;s++){a=e[s][0],n=e[s][1],l=e[s][2];for(var i=!0,m=0;m<a.length;m++)(!1&l||r>=l)&&Object.keys(o.O).every((function(e){return o.O[e](a[m])}))?a.splice(m--,1):(i=!1,l<r&&(r=l));if(i){e.splice(s--,1);var u=n();void 0!==u&&(t=u)}}return t}l=l||0;for(var s=e.length;s>0&&e[s-1][2]>l;s--)e[s]=e[s-1];e[s]=[a,n,l]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){var e={143:0};o.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,l,r=a[0],i=a[1],m=a[2],u=0;if(r.some((function(t){return 0!==e[t]}))){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(m)var s=m(o)}for(t&&t(a);u<r.length;u++)l=r[u],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(s)},a=self["webpackChunkMao_Service_Discovery"]=self["webpackChunkMao_Service_Discovery"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var a=o.O(void 0,[998],(function(){return o(6818)}));a=o.O(a)})();
@@ -1 +0,0 @@
1
- (function(){"use strict";var e={2278:function(e,t,o){var a=o(9242),n=o(3765),l=(o(4415),o(4161)),r=o(3396);const i={id:"app"};function m(e,t,o,a,n,l){const m=(0,r.up)("el-header"),u=(0,r.up)("Menu"),s=(0,r.up)("el-icon"),d=(0,r.up)("el-menu-item"),c=(0,r.up)("el-menu"),p=(0,r.up)("el-aside"),f=(0,r.up)("router-view"),h=(0,r.up)("el-main"),v=(0,r.up)("el-container");return(0,r.wg)(),(0,r.iD)("div",i,[(0,r.Wm)(v,{class:"class-container"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{style:{"font-size":"xx-large"}},{default:(0,r.w5)((()=>[(0,r.Uk)("Bigmao Radio Station")])),_:1}),(0,r.Wm)(v,null,{default:(0,r.w5)((()=>[(0,r.Wm)(p,{style:{width:"210px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(c,{"default-active":"/deviceStatus",style:{height:"100%"},router:""},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{index:"/deviceStatus"},{default:(0,r.w5)((()=>[(0,r.Wm)(s,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u)])),_:1}),(0,r.Uk)(" 设备状态 ")])),_:1}),(0,r.Wm)(d,{index:"/config"},{default:(0,r.w5)((()=>[(0,r.Wm)(s,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u)])),_:1}),(0,r.Uk)(" 服务配置 ")])),_:1}),(0,r.Wm)(d,{index:"/apiListOldApi"},{default:(0,r.w5)((()=>[(0,r.Wm)(s,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u)])),_:1}),(0,r.Uk)(" API列表、老版WebUI ")])),_:1})])),_:1})])),_:1}),(0,r.Wm)(h,null,{default:(0,r.w5)((()=>[(0,r.Wm)(f,{name:"maoMain"})])),_:1})])),_:1})])),_:1})])}var u={name:"App",components:{},methods:{}},s=o(89);const d=(0,s.Z)(u,[["render",m]]);var c=d,p=o(2748),f=o(2483);function h(e,t,o,a,n,l){const i=(0,r.up)("el-menu-item"),m=(0,r.up)("el-menu"),u=(0,r.up)("router-view");return(0,r.wg)(),(0,r.iD)("div",null,[(0,r.Wm)(m,{"default-active":"/config/email",mode:"horizontal",router:""},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{index:"/config/email"},{default:(0,r.w5)((()=>[(0,r.Uk)("邮件通知配置")])),_:1}),(0,r.Wm)(i,{index:"/config/icmp"},{default:(0,r.w5)((()=>[(0,r.Uk)("ICMP检测配置")])),_:1}),(0,r.Wm)(i,{index:"/config/topo"},{default:(0,r.w5)((()=>[(0,r.Uk)("拓扑接口配置")])),_:1})])),_:1}),(0,r.Wm)(u,{name:"maoConfig"})])}var v={name:"ConfigPages",data(){return{}},mounted(){},methods:{}};const w=(0,s.Z)(v,[["render",h]]);var b=w;const g=(0,r._)("div",{style:{margin:"20px"}},null,-1);function _(e,t,o,a,n,l){const i=(0,r.up)("el-input"),m=(0,r.up)("el-form-item"),u=(0,r.up)("el-button"),s=(0,r.up)("el-form");return(0,r.wg)(),(0,r.iD)(r.HY,null,[g,(0,r.Wm)(s,{model:n.form,"label-width":"120px","label-position":"top",style:{"max-width":"600px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{label:"Username"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.username,"onUpdate:modelValue":t[0]||(t[0]=e=>n.form.username=e)},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"Password"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.password,"onUpdate:modelValue":t[1]||(t[1]=e=>n.form.password=e),placeholder:"*** ***"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"SMTP Server address and port"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.smtpServerAddrPort,"onUpdate:modelValue":t[2]||(t[2]=e=>n.form.smtpServerAddrPort=e),placeholder:"e.g. smtp.mao.com:25"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"Sender Email"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.sender,"onUpdate:modelValue":t[3]||(t[3]=e=>n.form.sender=e)},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,{label:"Receiver Emails"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.receiver,"onUpdate:modelValue":t[4]||(t[4]=e=>n.form.receiver=e),placeholder:"one line, one receiver",type:"textarea",rows:"10"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u,{type:"primary",onClick:l.onSubmit},{default:(0,r.w5)((()=>[(0,r.Uk)("Create")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"])],64)}var W=o(4870),C={name:"ConfigEmail",data(){return{form:(0,W.qj)({username:"",password:"",smtpServerAddrPort:"",sender:"",receiver:""})}},mounted(){this.onLoad()},methods:{onLoad(){var e=this;this.$http.get("/api/getEmailInfo").then((function(t){var o=t.data;e.form.username=o["username"],e.form.smtpServerAddrPort=o["smtpServerAddrPort"],e.form.sender=o["sender"],e.form.receiver=o["receiver"].join("\n"),e.form.password=""})).catch((function(e){console.log("errMao: "+e)}))},onSubmit(){var e=this;this.$http.post("/api/addEmailInfo",this.form,{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){e.onLoad()})).catch((function(e){console.log("errMao: "+e)}))}}};const D=(0,s.Z)(C,[["render",_]]);var T=D;const x=(0,r._)("div",{style:{margin:"20px"}},null,-1);function y(e,t,o,a,n,l){const i=(0,r.up)("el-input"),m=(0,r.up)("el-form-item"),u=(0,r.up)("el-button"),s=(0,r.up)("el-form"),d=(0,r.up)("el-table-column"),c=(0,r.up)("el-table");return(0,r.wg)(),(0,r.iD)(r.HY,null,[x,(0,r.Wm)(s,{model:n.form,"label-width":"120px","label-position":"top",style:{"max-width":"600px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{label:"New Services"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.ipv4v6,"onUpdate:modelValue":t[0]||(t[0]=e=>n.form.ipv4v6=e),placeholder:"one line, one receiver",type:"textarea",rows:"3"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u,{type:"primary",onClick:l.onSubmit},{default:(0,r.w5)((()=>[(0,r.Uk)("Add")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"]),(0,r.Wm)(c,{data:n.maoIcmpTableData,ref:"maoTable","cell-class-name":l.tableCellClassName,"empty-text":"暂无数据","max-height":"610px"},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{label:"Control"},{default:(0,r.w5)((e=>[(0,r.Wm)(u,{size:"small",type:"danger",onClick:t=>l.handleDelete(e.$index,e.row)},{default:(0,r.w5)((()=>[(0,r.Uk)("Delete")])),_:2},1032,["onClick"])])),_:1}),(0,r.Wm)(d,{label:"Device IP",prop:"deviceIp"}),(0,r.Wm)(d,{label:"Alive",prop:"alive"}),(0,r.Wm)(d,{label:"Detect Count",prop:"Detect_Count"}),(0,r.Wm)(d,{label:"Report Count",prop:"Report_Count"}),(0,r.Wm)(d,{label:"RTT Duration",prop:"RTT_Duration"}),(0,r.Wm)(d,{label:"Last Seen",prop:"Last_Seen"}),(0,r.Wm)(d,{label:"Timestamp",prop:"RttOutbound_or_Remote_Timestamp"})])),_:1},8,["data","cell-class-name"])],64)}o(7658);var S={name:"ConfigIcmp",data(){return{maoIcmpTableData:[],refreshTimer:"",form:{ipv4v6:""}}},mounted(){this.onLoad(),this.refreshTimer=setInterval(this.onLoad,1e3)},beforeUnmount(){clearInterval(this.refreshTimer)},methods:{tableCellClassName({row:e,column:t,rowIndex:o,columnIndex:a}){e.index=o,t.index=a},handleDelete(e,t){var o=this;this.$http.post("/api/delServiceIp",{ipv4v6:t.deviceIp},{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){o.onLoad()})).catch((function(e){console.log("errMao: "+e)}))},onLoad(){var e=this;this.$http.get("/api/showServiceIP").then((function(t){e.maoIcmpTableData=[];for(var o=t.data,a=0;a<o.length;a++)e.maoIcmpTableData.push({deviceIp:null!=o[a]["Address"]?o[a]["Address"]:o[a]["Hostname"],alive:o[a]["Alive"],Detect_Count:null!=o[a]["DetectCount"]?o[a]["DetectCount"]:"/",Report_Count:null!=o[a]["ReportCount"]?o[a]["ReportCount"]:o[a]["ReportTimes"],RTT_Duration:null!=o[a]["RttDuration"]?(o[a]["RttDuration"]/1e3/1e3).toFixed(3)+"ms":"/",Last_Seen:null!=o[a]["LastSeen"]?o[a]["LastSeen"]:o[a]["LocalLastSeen"],RttOutbound_or_Remote_Timestamp:null!=o[a]["RttOutboundTimestamp"]?o[a]["RttOutboundTimestamp"]:o[a]["ServerDateTime"]})})).catch((function(e){console.log("errMao: "+e)}))},onSubmit(){var e=this;this.$http.post("/api/addServiceIp",this.form,{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){e.onLoad()})).catch((function(e){console.log("errMao: "+e)}))}}};const R=(0,s.Z)(S,[["render",y]]);var O=R;const I=(0,r._)("div",{style:{margin:"20px"}},null,-1);function P(e,t,o,a,n,l){const i=(0,r.up)("el-input"),m=(0,r.up)("el-form-item"),u=(0,r.up)("el-button"),s=(0,r.up)("el-form"),d=(0,r.up)("el-table-column"),c=(0,r.up)("el-table");return(0,r.wg)(),(0,r.iD)(r.HY,null,[I,(0,r.Wm)(s,{model:n.form,"label-width":"120px","label-position":"top",style:{"max-width":"600px"},action:"/addServiceIp",method:"post"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,{label:"ONOS Endpoint address and port"},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{modelValue:n.form.addrPort,"onUpdate:modelValue":t[0]||(t[0]=e=>n.form.addrPort=e),placeholder:"e.g. 127.0.0.1:8181"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r.Wm)(u,{type:"primary",onClick:l.onSubmit},{default:(0,r.w5)((()=>[(0,r.Uk)("Create")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"]),(0,r.Wm)(c,{data:n.maoOnosTableData,ref:"maoTable","row-class-name":l.tableRowClassName,"empty-text":"暂无数据","max-height":"610px"},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{label:"API Name",prop:"API_NAME"}),(0,r.Wm)(d,{label:"API URL",prop:"API_URL"})])),_:1},8,["data","row-class-name"])],64)}var L={name:"ConfigTopo",data(){return{form:(0,W.qj)({addrPort:""}),maoOnosTableData:[]}},mounted(){this.onLoad()},methods:{tableRowClassName(e){return-1!==e.row.API_URL.indexOf("%")?"warning-row":""},onSubmit(){var e=this;this.$http.post("/api/addOnosInfo",this.form,{headers:{"Content-Type":"application/x-www-form-urlencoded;"}}).then((function(){e.onLoad()})).catch((function(e){console.log("errMao: "+e)}))},onLoad(){var e=this;this.$http.get("/api/getOnosInfo").then((function(t){for(var o in e.maoOnosTableData=[],t.data)"addrPort"===o?e.form.addrPort=t.data[o]:e.maoOnosTableData.push({API_NAME:o,API_URL:t.data[o]})})).catch((function(e){console.log("errMao: "+e)}))}}};const k=(0,s.Z)(L,[["render",P]]);var A=k;const U={name:"DeviceInfo",data(){return{refreshSwitch:!0,refreshTimer:"",maoTableData:[]}},mounted(){this.refreshData(),this.refreshTimer=setInterval(this.refreshData,1e3)},beforeUnmount(){clearInterval(this.refreshTimer)},methods:{tableRowClassName(e){return!1===e.row.alive?"warning-row":""},tableCellClassName({row:e,column:t,rowIndex:o,columnIndex:a}){e.index=o,t.index=a},maoTableClick(e,t){1===t.index&&this.$refs.maoTable.toggleRowExpansion(e)},refreshData(){if(this.refreshSwitch){var e=this;this.$http.get("/api/showMergeServiceIP").then((function(t){e.maoTableData=[];for(var o=t.data,a=0;a<o.length;a++){var n=[];for(let e in o[a])n.push({attrName:e,attrValue:o[a][e]});n=n.sort(((e,t)=>e["attrName"]<t["attrName"]?-1:1)),e.maoTableData.push({attr:n,deviceIp:null!=o[a]["Address"]?o[a]["Address"]:o[a]["Hostname"],Report_IP:null!=o[a]["Ips"]?o[a]["Ips"].join("\n"):"/",alive:o[a]["Alive"],Detect_Count:null!=o[a]["DetectCount"]?o[a]["DetectCount"]:"/",Report_Count:null!=o[a]["ReportCount"]?o[a]["ReportCount"]:o[a]["ReportTimes"],RTT_Duration:null!=o[a]["RttDuration"]?(o[a]["RttDuration"]/1e3/1e3).toFixed(3)+"ms":"/",Last_Seen:null!=o[a]["LastSeen"]?o[a]["LastSeen"]:o[a]["LocalLastSeen"],RttOutbound_or_Remote_Timestamp:null!=o[a]["RttOutboundTimestamp"]?o[a]["RttOutboundTimestamp"]:o[a]["ServerDateTime"],Other_Data:null!=o[a]["OtherData"]?o[a]["OtherData"]:"/"})}})).catch((function(e){console.log("errMao"+e)}))}},maoDoClick(){console.log("DeviceControl clicked")},maoDeviceOnline(e){var t=this;console.log(e),this.$http.post("/api/devices/setDeviceOnline",{deviceid:e}).then((function(e){console.log(e),e["data"]?t.$notify({title:"成功",message:"这是一条成功的提示消息, maoDeviceOnline",type:"success"}):t.$notify.error({title:"错误",message:"这是一条错误的提示消息, maoDeviceOnline"})})).catch((function(e){console.log(e)}))},maoDeviceOffline(e){var t=this;this.$http.post("/api/devices/setDeviceOffline",{deviceid:e}).then((function(e){console.log(e),e["data"]?t.$notify({title:"成功",message:"这是一条成功的提示消息, maoDeviceOffline",type:"success"}):t.$notify.error({title:"错误",message:"这是一条错误的提示消息, maoDeviceOffline"})})).catch((function(e){console.log(e)}))}}};var V=Object.assign(U,{setup(e){return(e,t)=>{const o=(0,r.up)("el-switch"),a=(0,r.up)("el-row"),n=(0,r.up)("el-table-column"),l=(0,r.up)("el-table");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(a,{class:"row-bg",justify:"center"},{default:(0,r.w5)((()=>[(0,r.Wm)(o,{modelValue:e.refreshSwitch,"onUpdate:modelValue":t[0]||(t[0]=t=>e.refreshSwitch=t),size:"default","active-text":"启用刷新"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(l,{data:e.maoTableData,ref:"maoTable",onCellClick:e.maoTableClick,"cell-class-name":e.tableCellClassName,"row-class-name":e.tableRowClassName,"empty-text":"暂无数据","max-height":"845px"},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{label:"",type:"expand"},{default:(0,r.w5)((e=>[(0,r.Wm)(l,{data:e.row.attr,border:!0},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{label:"属性",prop:"attrName",width:"200px"}),(0,r.Wm)(n,{label:"值",prop:"attrValue"})])),_:2},1032,["data"])])),_:1}),(0,r.Wm)(n,{label:"Device IP",prop:"deviceIp"}),(0,r.Wm)(n,{label:"Report IP",prop:"Report_IP"}),(0,r.Wm)(n,{label:"Alive",prop:"alive"}),(0,r.Wm)(n,{label:"Detect Count",prop:"Detect_Count"}),(0,r.Wm)(n,{label:"Report Count",prop:"Report_Count"}),(0,r.Wm)(n,{label:"RTT Duration",prop:"RTT_Duration"}),(0,r.Wm)(n,{label:"Last Seen",prop:"Last_Seen"}),(0,r.Wm)(n,{label:"Timestamp",prop:"RttOutbound_or_Remote_Timestamp"})])),_:1},8,["data","onCellClick","cell-class-name","row-class-name"])],64)}}});const M=V;var j=M;const N={src:"https://dev.maojianwei.com:4433/onos/ui",width:"100%",height:"100%"};function $(e,t,o,a,n,l){return(0,r.wg)(),(0,r.iD)("iframe",N)}var E={name:"DeviceControl",data(){return{}},mounted(){},methods:{}};const Z=(0,s.Z)(E,[["render",$]]);var H=Z;const z={src:"/api",width:"100%",height:"100%"};function Y(e,t,o,a,n,l){return(0,r.wg)(),(0,r.iD)("iframe",z)}var F={name:"ApiListOldApi",data(){return{}},mounted(){},methods:{}};const q=(0,s.Z)(F,[["render",Y]]);var B=q,G=(0,f.p7)({history:(0,f.r5)(),routes:[{path:"/",components:{maoMain:j}},{path:"/config",components:{maoMain:b},children:[{path:"",components:{maoConfig:T}},{path:"email",components:{maoConfig:T}},{path:"icmp",components:{maoConfig:O}},{path:"topo",components:{maoConfig:A}}]},{path:"/deviceStatus",components:{maoMain:j}},{path:"/onos",components:{maoMain:H}},{path:"/apiListOldApi",components:{maoMain:B}}]});console.log("1 ===");const J=(0,a.ri)(c);console.log("2 ===");for(const[K,Q]of Object.entries(p))J.component(K,Q);console.log("3 ==="),J.config.globalProperties.$http=l.Z.create({baseUrl:"https://www.maojianwei.com/resources/",timeout:3e3}),console.log("4 ==="),J.use(n.Z,{size:"large"}),console.log("5 ==="),J.use(G),console.log("6 ==="),J.mount("#app"),console.log("7 ===")}},t={};function o(a){var n=t[a];if(void 0!==n)return n.exports;var l=t[a]={exports:{}};return e[a].call(l.exports,l,l.exports,o),l.exports}o.m=e,function(){var e=[];o.O=function(t,a,n,l){if(!a){var r=1/0;for(s=0;s<e.length;s++){a=e[s][0],n=e[s][1],l=e[s][2];for(var i=!0,m=0;m<a.length;m++)(!1&l||r>=l)&&Object.keys(o.O).every((function(e){return o.O[e](a[m])}))?a.splice(m--,1):(i=!1,l<r&&(r=l));if(i){e.splice(s--,1);var u=n();void 0!==u&&(t=u)}}return t}l=l||0;for(var s=e.length;s>0&&e[s-1][2]>l;s--)e[s]=e[s-1];e[s]=[a,n,l]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){var e={143:0};o.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,l,r=a[0],i=a[1],m=a[2],u=0;if(r.some((function(t){return 0!==e[t]}))){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(m)var s=m(o)}for(t&&t(a);u<r.length;u++)l=r[u],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(s)},a=self["webpackChunkMao_Service_Discovery"]=self["webpackChunkMao_Service_Discovery"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var a=o.O(void 0,[998],(function(){return o(2278)}));a=o.O(a)})();