zwave-js-ui 10.8.0 → 10.9.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.
- package/dist/assets/{AssociationGroups-BtoRtt-f.js → AssociationGroups-DMR8YDZe.js} +2 -2
- package/dist/assets/{BgRssiChart-CBfN9INt.js → BgRssiChart-BzwKB6k4.js} +1 -1
- package/dist/assets/{BlinkIcon-CovJRhvY.js → BlinkIcon-Bjfm8S2m.js} +1 -1
- package/dist/assets/{CCTreeView-u0oM1TKk.js → CCTreeView-FVQs8hng.js} +1 -1
- package/dist/assets/{ColorScheme-DqnA7HOS.js → ColorScheme-a-YZqAx8.js} +1 -1
- package/dist/assets/{ColumnFilter-C6XCJxQt.js → ColumnFilter-BbxPz5w5.js} +2 -2
- package/dist/assets/{ColumnFilterBoolean-x9q5GT8o.js → ColumnFilterBoolean-zfoX_A-F.js} +1 -1
- package/dist/assets/{ColumnFilterDate-B_-kCt8X.js → ColumnFilterDate-BWziT0mF.js} +1 -1
- package/dist/assets/{ColumnFilterNumber-kupY9JSu.js → ColumnFilterNumber-ChcSo7VV.js} +1 -1
- package/dist/assets/{ColumnFilterString-BxQmao3Y.js → ColumnFilterString-C7Rn0lN-.js} +1 -1
- package/dist/assets/{ControlPanel-BhgLoi4A.js → ControlPanel-DGHLlvBu.js} +2 -2
- package/dist/assets/{ControllerChart-CFOhL6F-.js → ControllerChart-B2J9bVXt.js} +2 -2
- package/dist/assets/{Debug-D4FXU-jN.js → Debug-CzjidZi5.js} +1 -1
- package/dist/assets/{DialogAdvanced-DGKT2FHX.js → DialogAdvanced-BY_5ziEQ.js} +1 -1
- package/dist/assets/{DialogAssociation-BJm-SZ65.js → DialogAssociation-D-xuiCz3.js} +1 -1
- package/dist/assets/{DialogGatewayValue-Dbcuwalm.js → DialogGatewayValue-CBAbjUim.js} +2 -2
- package/dist/assets/{DialogHealthCheck-D8u644sq.js → DialogHealthCheck-DlpKycg1.js} +1 -1
- package/dist/assets/{DialogLinkReliability-BAhSwHHo.js → DialogLinkReliability-DYpt6DT2.js} +1 -1
- package/dist/assets/{DialogSceneValue-B1wE-wft.js → DialogSceneValue-Cc8ZADjM.js} +2 -2
- package/dist/assets/{ErrorPage-BLo751xf.js → ErrorPage-B0PGqt4y.js} +1 -1
- package/dist/assets/ExpandedNode-DDMrYsHY.js +4 -0
- package/dist/assets/FirmwareUpdates-9aRD5YHc.js +1 -0
- package/dist/assets/{FrameDetails-BB8w16lB.js → FrameDetails-B3fAEPPu.js} +2 -2
- package/dist/assets/{HomeAssistant-CESvxoiv.js → HomeAssistant-Dsnk8dsF.js} +1 -1
- package/dist/assets/{InvertedCheckbox-BlgaHRij.js → InvertedCheckbox-BxTNUbmf.js} +1 -1
- package/dist/assets/{ListInput-Oc5EwOl_.js → ListInput-V0a5Asa0.js} +1 -1
- package/dist/assets/{Login-BhP9jgWS.js → Login-CDG4paqR.js} +2 -2
- package/dist/assets/{Mesh-BuO4ku-Z.js → Mesh-BmXo4Oel.js} +2 -2
- package/dist/assets/{MissingKeysAlert-Bd7e8CCL.js → MissingKeysAlert-CuyVgKq3.js} +1 -1
- package/dist/assets/{Multipane-CMrFuxBl.js → Multipane-DousQM7r.js} +1 -1
- package/dist/assets/{MultipaneResizer-Sbhf6a3v.js → MultipaneResizer-Cte6O_AN.js} +1 -1
- package/dist/assets/NodeDetails-CKbhgGMH.js +6 -0
- package/dist/assets/{NodePanel-CMkKHTHH.js → NodePanel-B82MWDIx.js} +2 -2
- package/dist/assets/{NodeScheduler-Ci1YCjfx.js → NodeScheduler-0IUgrNMu.js} +1 -1
- package/dist/assets/OTAUpdates-TRetSFS2.js +8 -0
- package/dist/assets/OTWUpdates-1wDAUIRX.js +8 -0
- package/dist/assets/{QrReader-B_E7g-cJ.js → QrReader-WTjncUpA.js} +1 -1
- package/dist/assets/{ReinterviewBadge-NOhBcJX_.js → ReinterviewBadge-CEJL5qze.js} +1 -1
- package/dist/assets/{RichValue-mXNUoOkX.js → RichValue-CwaJmfQS.js} +1 -1
- package/dist/assets/{Scenes-Bt6jLu0f.js → Scenes-hUqq3hjY.js} +2 -2
- package/dist/assets/{Settings-CuX6kRUC.js → Settings-09wn9ovw.js} +8 -6
- package/dist/assets/Settings-CelSEgKp.css +1 -0
- package/dist/assets/{SmartStart-CtNqksLr.js → SmartStart-DQEq7IdO.js} +2 -2
- package/dist/assets/{SmartView-uH-LLwsn.js → SmartView-DM-aGdyQ.js} +2 -2
- package/dist/assets/{StatisticsArrows-Cja5hyxr.js → StatisticsArrows-D4Sns3SB.js} +2 -2
- package/dist/assets/{StatisticsCard-BdtcDGW4.js → StatisticsCard-BiAkyljV.js} +1 -1
- package/dist/assets/{Store-DpePvBhS.js → Store-DvpEeDs7.js} +2 -2
- package/dist/assets/{UserCodeTable-B-w2kznU.js → UserCodeTable-BxlzdOf2.js} +2 -2
- package/dist/assets/{ValueId-DLrYyLFW.js → ValueId-BLteLfL0.js} +1 -1
- package/dist/assets/{Zniffer-Cug_7oG7.js → Zniffer-C10c9Yre.js} +2 -2
- package/dist/assets/{ZwaveGraph-DJWCTowH.js → ZwaveGraph-Dztxgewx.js} +1 -1
- package/dist/assets/{file-input-D-sY0Yg0.js → file-input-EYAll2pr.js} +1 -1
- package/dist/assets/{index-C0dt7pwz.js → index-CUO-mWDv.js} +24 -24
- package/dist/assets/index-D_ekac5n.js +3 -0
- package/dist/assets/{prismeditor.esm-DEvjvPOj.js → prismeditor.esm-cFCfBKjN.js} +1 -1
- package/dist/assets/{vuedraggable.umd-BfcskYMJ.js → vuedraggable.umd-DTxxsq3J.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +2 -2
- package/server/lib/ZwaveClient.js +31 -7
- package/dist/assets/ExpandedNode-BIrT__J-.js +0 -4
- package/dist/assets/NodeDetails-Ckjh8Yy3.js +0 -6
- package/dist/assets/OTAUpdates-CovDYnVx.js +0 -7
- package/dist/assets/Settings-DNnx9fql.css +0 -1
- package/dist/assets/index-CUdQRDn3.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n,a as r,u as l,c as o,n as c}from"./index-
|
|
1
|
+
import{I as n,a as r,u as l,c as o,n as c}from"./index-CUO-mWDv.js";const d={components:{},props:{value:Boolean,node:Object,socket:Object},mixins:[n],watch:{value(i){this.init(i)}},computed:{},data(){return{running:!1,activeNode:null,isRunning:!1,mode:"Lifeline",modes:[{text:"Basic Set On/Off",value:0}],infinite:!1,interval:250,iterations:100,statistics:null,progress:0}},methods:{...r(l,["showSnackbar"]),exportResults(){this.app.exportConfiguration(this.results,`linkReliability_${this.activeNode.id}-${this.statistics}`,"json")},init(i){const t=this.running;this.mode=0,this.statistics=null,this.infinite=!1,this.running=!1,this.interval=250,this.iterations=25,this.progress=0,i?(this.activeNode=o(this.node),this.bindEvent("linkReliability",this.onProgress.bind(this))):i===!1&&(this.unbindEvents(),t&&this.abortLinkReliabilityCheck())},onProgress(i){this.statistics=i.args[0],this.progress=Math.round(this.statistics.rounds/this.iterations*100)},async abortLinkReliabilityCheck(){const i=await this.app.apiRequest("abortLinkReliabilityCheck",[this.activeNode.id]);this.running=!1,i.success&&this.showSnackbar("Link statistics aborted","success")},async checkLinkReliability(){this.running=!0;const i=await this.app.apiRequest("checkLinkReliability",[this.activeNode.id,{mode:this.mode,interval:this.interval,rounds:this.infinite?void 0:this.iterations}],{infoSnack:!0,errorSnack:!1});this.running=!1,this.progress=0,i.success?this.statistics=i.result:this.showSnackbar(i.message||"Health check failed","error")}},beforeDestroy(){this.init(!1)}};var v=function(){var a;var t=this,s=t._self._c;return s("v-dialog",{attrs:{"max-width":"800px",persistent:""},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[s("v-card",[s("v-card-title",[s("span",{staticClass:"headline"},[t._v("Node "+t._s(t.activeNode?t.activeNode.id:"")+" - Link Statistics")])]),s("v-card-text",[s("v-container",[s("v-row",{staticClass:"ma-3",attrs:{justify:"start"}},[s("v-col",{attrs:{cols:"12"}},[s("v-select",{staticStyle:{"max-width":"325px"},attrs:{label:"Mode",items:t.modes,"persistent-hint":""},model:{value:t.mode,callback:function(e){t.mode=e},expression:"mode"}})],1),s("v-col",{attrs:{cols:"6"}},[s("v-radio-group",{staticClass:"justify-center",model:{value:t.infinite,callback:function(e){t.infinite=e},expression:"infinite"}},[s("v-radio",{attrs:{label:"Infinite",value:!0}}),s("v-radio",{attrs:{label:"XX",value:!1},scopedSlots:t._u([{key:"label",fn:function(){return[s("v-text-field",{attrs:{disabled:t.infinite,label:"Iterations",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.iterations,callback:function(e){t.iterations=t._n(e)},expression:"iterations"}})]},proxy:!0}])})],1)],1),s("v-col",{staticClass:"justify-center",attrs:{cols:"6"}},[s("v-text-field",{attrs:{label:"Interval",suffix:"ms",type:"number",min:1,max:1e4,"persistent-hint":""},model:{value:t.interval,callback:function(e){t.interval=t._n(e)},expression:"interval"}})],1)],1),s("v-row",{staticClass:"mb-4",attrs:{justify:"space-around"}},[s("v-btn",{attrs:{color:"success",disabled:t.running,loading:t.running},on:{click:t.checkLinkReliability}},[t._v("Run")]),s("v-btn",{attrs:{color:"error",disabled:!t.running},on:{click:t.abortLinkReliabilityCheck}},[t._v("Stop")])],1),s("v-divider"),t.statistics?s("v-row",{staticClass:"ma-3",attrs:{justify:"center"}},[t.running?s("v-progress-linear",{attrs:{indeterminate:this.infinite,value:this.infinite?null:this.progress,color:"success"}}):t._e(),s("v-list",{attrs:{dense:""}},[s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"info--text"},[t._v("Commands Sent")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandsSent))])],1)],1),s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Failed Commands")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.commandErrors)+" ("+t._s((t.statistics.commandErrors/t.statistics.rounds*100).toFixed(1))+" %)")])],1)],1),((a=t.statistics)==null?void 0:a.missingResponses)!=null?s("v-list-item",[s("v-list-item-content",[s("v-list-item-title",{staticClass:"error--text"},[t._v("Missing Responses")]),s("v-list-item-subtitle",[t._v(t._s(t.statistics.missingResponses)+" ("+t._s((t.statistics.missingResponses/t.statistics.commandsSent*100).toFixed(1))+" %)")])],1)],1):t._e()],1),s("v-simple-table",{scopedSlots:t._u([{key:"default",fn:function(){var e;return[s("thead",[s("tr",[s("th",{staticClass:"text-left"}),s("th",{staticClass:"text-left"},[t._v("Min")]),s("th",{staticClass:"text-left"},[t._v("Max")]),s("th",{staticClass:"text-left"},[t._v("Avg")])])]),t.statistics.latency?s("tbody",[s("tr",[s("td",[t._v("Latency [ms]")]),s("td",[t._v(t._s(t.statistics.latency.min))]),s("td",[t._v(t._s(t.statistics.latency.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.latency.average))+" ")])]),s("tr",[s("td",[t._v("Round-Trip Time [ms]")]),s("td",[t._v(t._s(t.statistics.rtt.min))]),s("td",[t._v(t._s(t.statistics.rtt.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.rtt.average))+" ")])]),s("tr",[s("td",[t._v("ACK RSSI [dBm]")]),s("td",[t._v(t._s(t.statistics.ackRSSI.min))]),s("td",[t._v(t._s(t.statistics.ackRSSI.max))]),s("td",[t._v(" "+t._s(Math.round(t.statistics.ackRSSI.average))+" ")])]),Number.isFinite((e=t.statistics.responseRSSI)==null?void 0:e.average)?s("tr",[s("td",[t._v("Response RSSI [dBm]")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.min)+" ")]),s("td",[t._v(" "+t._s(t.statistics.responseRSSI.max)+" ")]),s("td",[t._v(" "+t._s(Math.round(t.statistics.responseRSSI.average))+" ")])]):t._e()]):t._e()]},proxy:!0}],null,!1,3268320747)})],1):t._e()],1)],1),s("v-card-actions",[s("v-spacer"),s("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(e){return t.$emit("close")}}},[t._v("Close")])],1)],1)],1)},u=[],m=c(d,v,u,!1,null,null);const _=m.exports;export{_ as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueId-
|
|
2
|
-
import{n as i,_ as s}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueId-BLteLfL0.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css","./ValueId-DjIcc9-B.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as i,_ as s}from"./index-CUO-mWDv.js";const n={components:{ValueID:()=>s(()=>import("./ValueId-BLteLfL0.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)},props:{value:Boolean,title:String,editedValue:Object,nodes:Array},watch:{value(a){this.$refs.form&&this.$refs.form.resetValidation()}},data(){return{valid:!0,required:a=>!!a||"This field is required",positive:a=>a>=0||"Value must be positive",validValue:[a=>!!a||"This field is required",a=>a&&a.writeable||"This value is Read Only"]}}};var o=function(){var e=this,l=e._self._c;return l("v-dialog",{attrs:{"max-width":"500px",persistent:""},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},[l("v-card",[l("v-card-title",[l("span",{staticClass:"headline"},[e._v("Add association")])]),l("v-card-text",[l("v-container",{attrs:{"grid-list-md":""}},[l("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[l("v-row",[l("v-col",{attrs:{cols:"12"}},[l("v-select",{attrs:{label:"Node",required:"","return-object":"","item-text":"_name",rules:[e.required],"item-value":"id",items:e.nodes},model:{value:e.editedValue.node,callback:function(t){e.$set(e.editedValue,"node",t)},expression:"editedValue.node"}})],1),e.editedValue.node?l("v-col",{attrs:{cols:"12"}},[l("v-select",{attrs:{label:"Value",required:"","return-object":"","item-text":"label",rules:e.validValue,"item-value":"id",items:e.editedValue.node.values},scopedSlots:e._u([{key:"selection",fn:function({item:t}){return[e._v(" "+e._s((t.label||t.id)+(t.endpoint>1?" - Endpoint "+t.endpoint:""))+" ")]}},{key:"item",fn:function({item:t}){return[l("v-list-item-content",[l("v-list-item-title",[e._v(e._s((t.label||t.id)+(t.endpoint>0?" - Endpoint "+t.endpoint:"")))]),l("v-list-item-subtitle",{staticClass:"text-truncate text-no-wrap",staticStyle:{"max-width":"500px"}},[e._v(e._s(t.description))])],1)]}}],null,!1,2612602261),model:{value:e.editedValue.value,callback:function(t){e.$set(e.editedValue,"value",t)},expression:"editedValue.value"}})],1):e._e(),e.editedValue.value?l("v-col",{attrs:{cols:"12"}},[l("ValueID",{attrs:{disable_send:""},model:{value:e.editedValue.value,callback:function(t){e.$set(e.editedValue,"value",t)},expression:"editedValue.value"}})],1):e._e(),l("v-col",{attrs:{cols:"12"}},[l("v-text-field",{attrs:{label:"Timeout",hint:"Seconds to wait before send this value. Set to 0 to send immediately",suffix:"s",rules:[e.positive],required:"",type:"number"},model:{value:e.editedValue.timeout,callback:function(t){e.$set(e.editedValue,"timeout",e._n(t))},expression:"editedValue.timeout"}})],1)],1)],1)],1)],1),l("v-card-actions",[l("v-spacer"),l("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(t){return e.$emit("close")}}},[e._v("Cancel")]),l("v-btn",{attrs:{color:"blue darken-1",text:""},on:{click:function(t){e.$refs.form.validate()&&e.$emit("save")}}},[e._v("Save")])],1)],1)],1)},d=[],r=i(n,o,d,!1,null,null);const c=r.exports;export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as s}from"./index-
|
|
1
|
+
import{n as s}from"./index-CUO-mWDv.js";const o={data(){return{query:{code:404,message:"Not Found",path:"/error"}}},methods:{},beforeMount(){this.query=Object.keys(this.$route.query).length>0?this.$route.query:this.query}};var a=function(){var e=this,t=e._self._c;return t("v-container",{attrs:{fluid:"","fill-height":""}},[t("v-row",{attrs:{align:"center",justify:"center"}},[t("v-col",{attrs:{cols:"12",sm:"8",md:"4"}},[t("v-card",{staticClass:"elevation-12"},[t("v-toolbar",{attrs:{dark:"",color:"primary"}},[t("v-btn",{attrs:{icon:""},on:{click:function(r){return e.$router.go(-2)}}},[t("v-icon",[e._v("arrow_back")])],1),t("v-toolbar-title",[e._v(e._s(e.query.code+" - "+e.query.message))]),t("v-spacer"),t("v-btn",{attrs:{icon:""},on:{click:function(r){return e.$router.push("/")}}},[t("v-icon",[e._v("home")])],1)],1),t("v-card-text",[t("v-container",{attrs:{"fill-height":"","text-xs-center":""}},[t("v-row",{attrs:{justify:"center"}},[t("v-col",[t("strong",{staticClass:"headline font-weight-bold"},[e._v(" Error while requesting resource at "),t("code",[e._v(e._s(e.query.path))])])])],1)],1)],1)],1)],1)],1),t("v-footer",{staticClass:"pa-3",attrs:{absolute:""}},[t("v-col",{staticClass:"d-flex pa-0 justify-center py-3 text-caption"},[e._v(" ©"+e._s(new Date().getFullYear())+" — "),t("strong",{staticClass:"ml-1 mr-2"},[t("a",{attrs:{target:"_blank",href:"https://github.com/sponsors/robertsLando"}},[e._v("Daniel Lando")])]),e._v(" All Rights Reserved. ")])],1)],1)},n=[],c=s(o,a,n,!1,null,null);const u=c.exports;export{u as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AssociationGroups-DMR8YDZe.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css","./HomeAssistant-Dsnk8dsF.js","./NodeDetails-CKbhgGMH.js","./NodeDetails-BVv96O7e.css","./DialogAdvanced-BY_5ziEQ.js","./DialogAdvanced-D5KZ1_3L.css","./StatisticsCard-BiAkyljV.js","./OTAUpdates-TRetSFS2.js","./OTWUpdates-1wDAUIRX.js","./UserCodeTable-BxlzdOf2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{I as u,_ as i,m as p,u as c,P as d,a as m,j as v,N as h,n as f}from"./index-CUO-mWDv.js";var r;(function(s){s[s.NoDeviceSupport=0]="NoDeviceSupport",s[s.Working=1]="Working",s[s.Fail=2]="Fail",s[s.EndpointNotFound=3]="EndpointNotFound",s[s.NotImplemented=4]="NotImplemented",s[s.InvalidValue=5]="InvalidValue",s[s.SuccessUnsupervised=254]="SuccessUnsupervised",s[s.Success=255]="Success"})(r||(r={}));function _(s){return s.status===r.Success||s.status===r.Working}function y(s){return s.status===r.SuccessUnsupervised||_(s)}const g={props:{actions:Array,headers:{type:Array,default:()=>[]},isMobile:Boolean,node:Object,socket:Object},mixins:[u],components:{AssociationGroups:()=>i(()=>import("./AssociationGroups-DMR8YDZe.js"),__vite__mapDeps([0,1,2]),import.meta.url),HomeAssistant:()=>i(()=>import("./HomeAssistant-Dsnk8dsF.js"),__vite__mapDeps([3,1,2]),import.meta.url),NodeDetails:()=>i(()=>import("./NodeDetails-CKbhgGMH.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),DialogAdvanced:()=>i(()=>import("./DialogAdvanced-BY_5ziEQ.js"),__vite__mapDeps([6,1,2,7]),import.meta.url),StatisticsCard:()=>i(()=>import("./StatisticsCard-BiAkyljV.js"),__vite__mapDeps([8,1,2]),import.meta.url),OTAUpdates:()=>i(()=>import("./OTAUpdates-TRetSFS2.js"),__vite__mapDeps([9,1,2]),import.meta.url),OTWUpdates:()=>i(()=>import("./OTWUpdates-1wDAUIRX.js"),__vite__mapDeps([10,1,2]),import.meta.url),UserCodeTable:()=>i(()=>import("./UserCodeTable-BxlzdOf2.js"),__vite__mapDeps([11,1,2]),import.meta.url)},computed:{...p(c,["gateway","mqtt"]),isLongRange(){return this.node?this.node.protocol===d.ZWaveLongRange:!1},nodeMetadata(){var s;return(s=this.node.deviceConfig)==null?void 0:s.metadata},nodeComments(){var e;const s=((e=this.nodeMetadata)==null?void 0:e.comments)??[];return Array.isArray(s)?s:[s]},metaKeys(){const s=["manual","inclusion","exclusion","reset","wakeup"];return(this.nodeMetadata?Object.keys(this.nodeMetadata):[]).filter(t=>s.includes(t))},nodeJson(){return JSON.stringify(this.node,null,2)},showHass(){return!this.mqtt.disabled&&this.gateway.hassDiscovery&&this.node.hassDevices&&Object.keys(this.node.hassDevices).length>0},statisticsOpeningIndicator(){return this.showStatistics?"arrow_drop_up":"arrow_drop_down"},statsBorderColor(){return this.showStatistics?"border-primary":""},filteredNodeEvents(){return this.node.eventsQueue.filter(s=>!this.searchEvents||JSON.stringify(s).toLowerCase().includes(this.searchEvents.toLowerCase())).sort((s,e)=>(s=new Date(s.time),e=new Date(e.time),this.inverseSort?e-s:s-e))},advancedActions(){const s=this.node.isControllerNode?[]:[{text:"Firmware update",options:[{name:"Begin",action:"updateFirmware"},{name:"Abort",action:"abortFirmwareUpdate"}],icon:"update",color:"error",desc:"Start/Stop a firmware update"},{text:"Refresh Values",options:[{name:"Refresh",action:"refreshValues",args:{confirm:"Are you sure you want to refresh values of this node? This action increases network traffic"}}],icon:"cached",desc:"Update all CC values and metadata. Use only when many values seems stale"},{text:"Re-interview Node",options:[{name:"Interview",action:"refreshInfo"}],icon:"history",desc:"Clear all info about this node and make a new full interview. Use when the node has wrong or missing capabilities"},{text:"Failed Nodes",options:[{name:"Remove",action:"removeFailedNode"},{name:"Replace",action:"replaceFailedNode"}],color:"error",icon:"dangerous",desc:"Manage nodes that are dead and/or marked as failed with the controller"}];this.node.protocol!==d.ZWaveLongRange&&s.splice(1,0,{text:"Rebuild Routes",options:[{name:"Rebuild",action:"rebuildNodeRoutes",args:{confirm:"Rebuilding node routes causes a lot of traffic, can take minutes up to hours and you can expect degraded performance while it is going on"}}],icon:"healing",color:"warning",desc:"Discover and assign new routes from node to the controller and other nodes."});const e=this.node.isControllerNode?[]:[{name:"Clear",action:"removeAllAssociations",color:"error",args:{confirm:"This action will remove all associations of this node. This will also clear lifeline association with controller node, the node won't report state changes until that is set up again"}}],t=[];return this.node.supportsTime&&t.push({text:"Set Date and Time",options:[{name:"Sync",action:"syncNodeDateAndTime"}],icon:"schedule",desc:"Set date and time of this node to current time"}),[{text:"Export json",options:[{name:"UI",action:"exportNode"},{name:"Driver",action:"dumpNode"}],icon:"get_app",desc:"Export this node in a json file"},{text:"Clear Retained",options:[{name:"Clear",action:"removeNodeRetained",args:{mqtt:!0,confirm:"Are you sure you want to remove all retained messages?"}}],icon:"clear",desc:"All retained messages of this node will be removed from broker"},{text:"Update topics",options:[{name:"Update",action:"updateNodeTopics",args:{mqtt:!0,confirm:"Are you sure you want to update all topics?"}}],icon:"update",desc:"Update all node topics. Useful when name/location has changed"},...s,{text:"Associations",options:[...e,{name:"Remove",action:"removeNodeFromAllAssociations",args:{confirm:"All direct associations to this node will be removed. Battery-powered nodes need to be woken up to edit their associations."}}],icon:"link_off",color:"error",desc:"Clear all node associations / Remove node from all associations"},...t]}},watch:{"node.eventsQueue"(){this.scrollBottom()},currentTab(){this.scrollBottom()},inverseSort(){this.savePreferences()},autoScroll(){this.savePreferences()}},data(){return{currentTab:0,autoScroll:!0,inverseSort:!0,searchEvents:"",advancedShowDialog:!1,showStatistics:!1}},mounted(){const s=c().getPreference("eventsList",{inverseSort:!0,autoScroll:!0});this.inverseSort=s.inverseSort,this.autoScroll=s.autoScroll},methods:{...m(c,["showSnackbar","setValue","getDateTimeString"]),savePreferences(){c().savePreferences({eventsList:{inverseSort:this.inverseSort,autoScroll:this.autoScroll}})},async updateValue(s,e){if(s){s.toUpdate=!0,s.type==="number"&&(s.newValue=Number(s.newValue)),s.type==="boolean"&&!s.readable&&(s.newValue=!0),e!==void 0&&(s.newValue=e),this.setValue(s);const t=await this.app.apiRequest("writeValue",[{nodeId:s.nodeId,commandClass:s.commandClass,endpoint:s.endpoint,property:s.property,propertyKey:s.propertyKey},s.newValue,this.options]);if(s.toUpdate=!1,t.success){const o=t.result;if(y(o))this.showSnackbar("Value updated","success");else{let n=o.message;!n&&o.status===r.NoDeviceSupport&&(n="No device support"),this.showSnackbar("Value update failed"+(n?": "+n:""),"error")}}else this.showSnackbar(`Error updating value${t.message?": "+t.message:""}`,"error")}},prettyPrintEventArg(s,e){return`
|
|
3
|
+
Arg ${e}:
|
|
4
|
+
`+v(s,void 0,1)},linkify(s){var e=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;return s.replace(e,function(t){return'<a target="_blank" href="'+t+'">'+t+"</a>"})},copyText(){this.$refs.nodeJsonContent.$el.querySelector("textarea").select(),document.execCommand("copy")},nodeAction(s,e={}){s==="exportNode"?this.exportNode():e.mqtt?this.sendMqttAction(s,e.confirm):this.sendAction(s,{...e,nodeId:this.node.id})},exportNode(){this.app.exportConfiguration(this.node,"node_"+this.node.id,"json")},async sendMqttAction(s,e){if(this.node){let t=!0;if(e&&(t=await this.app.confirm("Info",e,"info",{confirmText:"Ok"})),t){const o=[this.node.id],a={api:s,args:o};this.socket.emit(h.mqtt,a,n=>{n.success?this.showSnackbar(`Node ${this.node.id}: ${s} successfully sent `,"success"):this.showSnackbar(`Error sending ${s} to node ${this.node.id}: ${n.message}`,"error")})}}},toggleStatistics(){this.showStatistics=!this.showStatistics},openLink(s){window.open(s,"_blank")},toggleAutoScroll(){this.autoScroll=!this.autoScroll},toggleSort(){this.inverseSort=!this.inverseSort},async scrollBottom(){if(!this.autoScroll||this.inverseSort)return;const s=this.$refs.eventsList;s&&(await this.$nextTick(),s.scrollTop=s.scrollHeight)}}};var b=function(){var e=this,t=e._self._c;return e.node?t("div",{style:`max-width: calc(100vw - ${e.$vuetify.breakpoint.lgAndUp?120:70}px)`},[t("v-row",{staticClass:"mt-2",attrs:{align:"center"}},[t("v-col",{staticClass:"ml-4",staticStyle:{"min-width":"200px"}},[t("span",{staticClass:"title grey--text"},[e._v("Device ")]),t("br"),t("span",{staticClass:"subtitle font-weight-bold font-monospace"},[e._v(" "+e._s(e.node.hexId)+" ")]),t("v-icon",{staticClass:"ml-2",on:{click:function(o){return e.openLink(e.node.dbLink)}}},[e._v(" open_in_new ")]),t("br"),e.$vuetify.breakpoint.smAndDown?t("span",{staticClass:"comment font-weight-bold primary--text"},[e._v(" "+e._s(`${e.node.manufacturer||""}${e.node.productDescription?" - "+e.node.productDescription:""}`)+" ")]):e._e()],1),t("v-col",{class:e.$vuetify.breakpoint.smAndDown?"text-center":"text-end"},[t("v-item-group",{staticClass:"v-btn-toggle"},[t("v-btn",{attrs:{color:"primary",outlined:""},on:{click:e.toggleStatistics}},[t("v-icon",{attrs:{left:""}},[e._v(" "+e._s(e.statisticsOpeningIndicator)+" ")]),e._v(" Statistics "),t("v-icon",{attrs:{color:"primary",right:""}},[e._v(" multiline_chart ")])],1),e.node.isControllerNode?e._e():t("v-btn",{attrs:{dark:"",color:"primary",depressed:""},on:{click:function(o){return o.stopPropagation(),e.pingNode(e.node)}}},[e._v(" Ping ")]),t("v-btn",{attrs:{dark:"",color:"success",depressed:""},on:{click:function(o){e.advancedShowDialog=!0}}},[e._v(" Advanced ")])],1)],1)],1),e.nodeComments.length>0?t("v-row",[t("v-col",e._l(e.nodeComments,function(o){return t("v-alert",{key:o.level,staticStyle:{"white-space":"break-spaces"},attrs:{text:"",type:o.level}},[t("span",{domProps:{innerHTML:e._s(e.linkify(o.text))}})])}),1)],1):e._e(),t("v-row",{attrs:{"no-gutters":""}},[e.showStatistics?t("v-sheet",{staticClass:"my-4",attrs:{outlined:"",rounded:""}},[t("statistics-card",{attrs:{title:"Statistics",node:e.node}})],1):e._e()],1),t("v-divider",{staticClass:"my-4"}),t("v-tabs",{staticClass:"transparent mb-4",attrs:{"show-arrows":"",vertical:e.$vuetify.breakpoint.mdAndUp},model:{value:e.currentTab,callback:function(o){e.currentTab=o},expression:"currentTab"}},[t("v-tab",{key:"node",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("widgets")]),e._v(" Node ")],1),e.nodeMetadata?t("v-tab",{key:"manual",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("help")]),e._v(" Help ")],1):e._e(),e.showHass?t("v-tab",{key:"homeassistant",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("home")]),e._v(" Home Assistant ")],1):e._e(),t("v-tab",{key:"groups",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("device_hub")]),e._v(" Groups ")],1),e.node.schedule?t("v-tab",{key:"users",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("group")]),e._v(" Users ")],1):e._e(),e.node.isControllerNode?e._e():t("v-tab",{key:"ota",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("auto_mode")]),e._v(" OTA Updates ")],1),e.node.isControllerNode?t("v-tab",{key:"otw",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("auto_mode")]),e._v(" Firmware Updates ")],1):e._e(),t("v-tab",{key:"events",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("list_alt")]),e._v(" Events ")],1),e.$vuetify.breakpoint.mdAndUp?t("v-tab",{key:"debug",staticClass:"justify-start"},[t("v-icon",{attrs:{small:"",left:""}},[e._v("bug_report")]),e._v(" Debug Info ")],1):e._e(),t("v-tabs-items",{staticStyle:{background:"transparent","padding-bottom":"10px"},attrs:{touchless:""},model:{value:e.currentTab,callback:function(o){e.currentTab=o},expression:"currentTab"}},[t("v-tab-item",{key:"node",attrs:{transition:"slide-y-transition"}},[t("node-details",{ref:"nodeDetails",attrs:{headers:e.headers,node:e.node},on:{updateValue:e.updateValue}})],1),e.nodeMetadata?t("v-tab-item",{key:"manual",attrs:{transition:"slide-y-transition"}},e._l(e.metaKeys,function(o){return t("section",{key:`tab-${o}`,staticClass:"px-8 py-4"},[t("h1",{staticClass:"text-uppercase"},[e._v(e._s(o))]),t("p",{staticClass:"caption"},[o==="manual"?t("v-btn",{attrs:{href:e.nodeMetadata[o],color:"primary"}},[e._v(" DOWNLOAD ")]):t("span",[e._v(" "+e._s(e.nodeMetadata[o])+" ")])],1)])}),0):e._e(),e.showHass?t("v-tab-item",{key:"homeassistant",attrs:{transition:"slide-y-transition"}},[t("home-assistant",{attrs:{node:e.node,socket:e.socket}})],1):e._e(),t("v-tab-item",{key:"groups",attrs:{transition:"slide-y-transition"}},[t("association-groups",{attrs:{node:e.node}})],1),e.node.schedule?t("v-tab-item",{key:"users",attrs:{transition:"slide-y-transition"}},[t("user-code-table",{attrs:{node:e.node},on:{updateValue:e.updateValue}})],1):e._e(),e.node.isControllerNode?e._e():t("v-tab-item",{key:"ota",attrs:{transition:"slide-y-transition"}},[t("OTAUpdates",{attrs:{node:e.node,socket:e.socket}})],1),e.node.isControllerNode?t("v-tab-item",{key:"otw",attrs:{transition:"slide-y-transition"}},[t("OTWUpdates",{attrs:{node:e.node,socket:e.socket}})],1):e._e(),t("v-tab-item",{key:"events",attrs:{transition:"slide-y-transition"}},[t("v-container",{attrs:{"grid-list-md":""}},[t("v-text-field",{staticClass:"pa-3",staticStyle:{"max-width":"300px"},attrs:{"prepend-icon":"search",label:"Search","single-line":"","hide-details":"",clearable:""},model:{value:e.searchEvents,callback:function(o){e.searchEvents=o},expression:"searchEvents"}},[t("template",{slot:"append-outer"},[e.inverseSort?e._e():t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:o,attrs:a}){return[t("v-btn",e._g(e._b({class:e.autoScroll?"border-primary":"",attrs:{icon:"",color:e.autoScroll?"primary":""},on:{click:function(n){return e.toggleAutoScroll()}}},"v-btn",a,!1),o),[t("v-icon",[e._v("autorenew")])],1)]}}],null,!1,4134759629)},[t("span",[e._v("Enable/Disable auto scroll")])]),t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:o,attrs:a}){return[t("v-btn",e._g(e._b({class:e.inverseSort?"border-primary":"",attrs:{icon:"",color:e.inverseSort?"primary":""},on:{click:function(n){return e.toggleSort()}}},"v-btn",a,!1),o),[t("v-icon",[e._v("swap_vert")])],1)]}}],null,!1,189129518)},[t("span",[e._v("Inverse Sort")])])],1)],2),t("v-col",{ref:"eventsList",staticClass:"pa-5 events-list"},e._l(e.filteredNodeEvents,function(o,a){return t("div",{key:"event_"+a+o.time,staticClass:"log-row font-monospace"},[t("span",[t("i",[e._v(e._s(e.getDateTimeString(o.time)))])]),e._v(" - "),t("strong",{staticClass:"text-uppercase"},[e._v(e._s(o.event))]),e._l(o.args,function(n,l){return t("span",{key:"arg_"+l,staticStyle:{"white-space":"pre","font-size":"0.75rem"}},[e._v(e._s(e.prettyPrintEventArg(n,l)))])})],2)}),0)],1)],1),e.$vuetify.breakpoint.mdAndUp?t("v-tab-item",{key:"debug",attrs:{transition:"slide-y-transition"}},[t("v-container",{attrs:{"grid-list-md":""}},[t("v-textarea",{ref:"nodeJsonContent",staticClass:"debug-content font-monospace mx-2",attrs:{"append-icon":"content_copy",readonly:"","hide-details":"","no-resize":"",rows:"37"},on:{"click:append":e.copyText},model:{value:e.nodeJson,callback:function(o){e.nodeJson=o},expression:"nodeJson"}})],1)],1):e._e()],1)],1),t("DialogAdvanced",{attrs:{actions:e.advancedActions},on:{close:function(o){e.advancedShowDialog=!1},action:e.nodeAction},model:{value:e.advancedShowDialog,callback:function(o){e.advancedShowDialog=o},expression:"advancedShowDialog"}})],1):e._e()},w=[],k=f(g,b,w,!1,null,null);const A=k.exports;export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as n,F as o,m as l,u as i,a as d,_ as c,n as u}from"./index-CUO-mWDv.js";const v={components:{},props:{node:{type:Object,required:!0},socket:{type:Object,required:!0},hideDowngrades:{type:Boolean,default:!1},hideTargets:{type:Boolean,default:!1}},mixins:[n],data(){return{RFRegion:o,rfRegion:null,fwUpdates:[],loading:!1,includePrereleases:!1,showDowngrades:!1}},computed:{...l(i,["controllerNode","zwave"]),filteredUpdates(){return this.fwUpdates.filter(a=>!a.downgrade||a.downgrade&&this.showDowngrades)},invalidRfRegion(){return this.controllerNode&&this.controllerNode.RFRegion===void 0&&!this.zwave.rf.region}},mounted(){this.checkUpdates()},methods:{...d(i,["showSnackbar"]),async checkUpdates(){this.loading=!0,this.fwUpdates=[];const a={includePrereleases:this.includePrereleases};this.controllerNode&&this.controllerNode.RFRegion===void 0&&this.zwave.rf.region&&(a.rfRegion=this.zwave.rf.region);const e=await this.app.apiRequest("getAvailableFirmwareUpdates",[this.node.id,a]);if(this.loading=!1,e.success){const{default:t}=await c(async()=>{const{default:s}=await import("./index-Blr6EMNg.js");return{default:s}},[],import.meta.url);for(const s of e.result)s.changelog=t().render(s.changelog);this.fwUpdates=e.result}else this.showSnackbar(`Failed to check for firmware updates: ${e.message}`,"error")},download(a){window.open(a,"_blank")},async handleUpdateFirmware(a){this.$emit("update-firmware",a)}}};var p=function(){var e=this,t=e._self._c;return t("v-container",{attrs:{"grid-list-md":""}},[t("v-row",{staticClass:"ml-5"},[t("v-col",{directives:[{name:"show",rawName:"v-show",value:!e.node.firmwareUpdate,expression:"!node.firmwareUpdate"}],attrs:{cols:"12"}},[t("v-row",{staticClass:"mb-2 text-center",attrs:{justify:"center",dense:""}},[t("v-btn",{staticClass:"my-auto",attrs:{disabled:e.loading,outlined:"",color:"success"},on:{click:e.checkUpdates}},[e._v("Check updates")]),t("v-checkbox",{staticClass:"ml-2 my-auto",attrs:{"hide-details":"",dense:"",label:"Include pre-releases"},model:{value:e.includePrereleases,callback:function(s){e.includePrereleases=s},expression:"includePrereleases"}}),e.hideDowngrades?e._e():t("v-checkbox",{staticClass:"ml-2 my-auto",attrs:{"hide-details":"",dense:"",label:"Show downgrades"},model:{value:e.showDowngrades,callback:function(s){e.showDowngrades=s},expression:"showDowngrades"}})],1),e.controllerNode.RFRegion===void 0?t("v-row",{staticClass:"pt-2 text-center",attrs:{justify:"center",dense:""}},[t("v-alert",{staticClass:"ml-2 mb-2",staticStyle:{"max-width":"400px"},attrs:{type:"info",dense:"",text:""}},[t("small",[e._v(" "+e._s(e.invalidRfRegion?"To get region-specific firmware updates, you need to configure your current region in the settings.":`Firmware updates include updates specific to ${e.RFRegion[e.zwave.rf.region]}. If this is not correct, you can change it in the settings.`)+" ")])])],1):e._e()],1),e.filteredUpdates.length>0&&!e.node.firmwareUpdate?e._l(e.filteredUpdates,function(s){return t("v-col",{key:s.version,attrs:{cols:"12",sm:"6",md:"4"}},[t("v-card",{attrs:{dense:"",elevation:"5"}},[t("v-card-title",[t("v-icon",[e._v("mdi-update")]),t("span",{staticClass:"headline"},[t("strong",[e._v("v"+e._s(s.version)+" ["+e._s(s.channel)+"]")])]),t("v-spacer"),t("v-btn",{attrs:{outlined:"",small:"",color:s.downgrade?"warning":"success"},on:{click:function(r){return e.handleUpdateFirmware(s)}}},[t("v-icon",{attrs:{small:""}},[e._v(e._s(s.downgrade?"download":"upload"))]),e._v(" "+e._s(s.downgrade?"Downgrade":"Update")+" ")],1)],1),t("v-divider",{staticClass:"mx-4"}),t("v-card-text",[t("v-subheader",{staticClass:"subtitle-1"},[t("strong",[e._v("Changelog")])]),t("p",{staticClass:"text-caption ml-4",domProps:{innerHTML:e._s(s.changelog)}}),e._l(s.files,function(r){return t("v-list-item",{key:r.url,staticStyle:{"border-bottom":"1px solid #e0e0e0"},attrs:{"two-line":"",dense:""}},[t("v-list-item-icon",{staticClass:"my-auto mr-3"},[t("v-icon",{attrs:{color:"primary"}},[e._v("widgets")])],1),t("v-list-item-content",[!e.hideTargets&&r.target!==void 0?t("v-list-item-title",[e._v("Target: "+e._s(r.target))]):e._e(),t("v-list-item-subtitle",[e._v(e._s(r.url))])],1),t("v-list-item-icon",{staticClass:"my-auto"},[t("v-btn",{attrs:{title:"Download",icon:""},on:{click:function(f){return e.download(r.url)}}},[t("v-icon",{attrs:{color:"success"}},[e._v("download")])],1)],1)],1)})],2)],1)],1)}):e.loading||e.node.firmwareUpdate?t("v-col",{staticClass:"text-center"},[t("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}}),t("p",{staticClass:"text-caption"},[e._v(" "+e._s(e.node.firmwareUpdate?"Update in progress...":"Remember to wake up sleeping devices...")+" ")])],1):t("v-col",{staticClass:"text-center"},[t("h1",{staticClass:"title"},[e._v("No updates available")]),t("span",[e._v("This service relies on "),t("a",{attrs:{href:"https://github.com/zwave-js/firmware-updates#readme",target:"_blank"}},[e._v("Z-Wave JS Firmware Update Service")]),e._v(", and may not represent all updates for your device.")]),t("br"),t("span",[e._v("If you know that a firmware update "),t("i",[e._v("does")]),e._v(" exist, you can help the Z-Wave JS community by encouraging your device manufacturer to provide the firmwares. Read more in the link above.")])])],2)],1)},m=[],w=u(v,p,m,!1,null,null);const g=w.exports;export{g as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CCTreeView-
|
|
2
|
-
import{n as s,_ as o,aq as r,H as l,J as d,K as v,M as _,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CCTreeView-FVQs8hng.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css","./CCTreeView-CpgHtNhq.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as s,_ as o,aq as r,H as l,J as d,K as v,M as _,k as u}from"./index-CUO-mWDv.js";const n={props:{value:Object},components:{CCTreeView:()=>o(()=>import("./CCTreeView-FVQs8hng.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)},data:()=>({}),methods:{getRegion:r,getRoute:l,getType:d,getRssi:v,getProtocolDataRate:_,getProtocol:u}};var c=function(){var e=this,t=e._self._c;return e.value?t("v-row",[t("v-col",[t("v-simple-table",{staticClass:"frame-details",attrs:{dense:""},scopedSlots:e._u([{key:"default",fn:function(){return[t("tbody",[t("tr",[t("td",[e._v("Type")]),t("td",[e._v(e._s(e.getType(e.value)))])]),t("tr",[t("td",[e._v("Protocol")]),t("td",[e._v(e._s(e.getProtocol(e.value)))])]),t("tr",[t("td",[e._v("Channel")]),t("td",[e._v(e._s(e.value.channel))])]),t("tr",[t("td",[e._v("Region")]),t("td",[e._v(e._s(e.getRegion(e.value)))])]),t("tr",[t("td",[e._v("RSSI")]),t("td",[e._v(e._s(e.getRssi(e.value)))])]),t("tr",[t("td",[e._v("Protocol Data Rate")]),t("td",[e._v(" "+e._s(e.getProtocolDataRate(e.value)+(e.value.speedModified?" (speed modified)":""))+" ")])]),t("tr",[t("td",[e._v("Sequence Number")]),t("td",[e._v(e._s(e.value.sequenceNumber))])]),e.value.payload?t("tr",[t("td",[e._v("Payload")]),t("td",[e._v(e._s(e.value.payload))])]):e._e(),t("tr",[t("td",[e._v("Home ID")]),t("td",[e._v(" "+e._s(e.value.homeId?e.value.homeId.toString(16):"")+" ")])]),t("tr",[t("td",[e._v("Route")]),t("td",{domProps:{innerHTML:e._s(e.getRoute(e.value,!0))}})]),e.value.ackRequested!==void 0?t("tr",[t("td",[e._v("Ack Requested")]),t("td",[e._v(e._s(e.value.ackRequested))])]):e._e(),e.value.routedAck?t("tr",[t("td",[e._v("Routed Ack")]),t("td",[e._v(e._s(e.value.routedAck))])]):e._e(),e.value.routedError?t("tr",[t("td",[e._v("Routed Error")]),t("td",[e._v(e._s(e.value.routedError))])]):e._e()])]},proxy:!0}],null,!1,2146638613)})],1),t("v-col",[e.value.parsedPayload?t("CCTreeView",{staticClass:"my-2",attrs:{value:e.value.parsedPayload}}):e._e(),t("span",{staticClass:"text-caption"},[e._v("Raw")]),t("v-textarea",{staticClass:"mono",attrs:{readonly:"","hide-details":"",solo:"","no-resize":"",rows:"2"},model:{value:e.value.raw,callback:function(a){e.$set(e.value,"raw",a)},expression:"value.raw"}})],1)],1):t("v-row",{staticClass:"fill",attrs:{justify:"center",align:"center"}},[t("v-col",{staticClass:"text-center caption"},[t("span",{attrs:{dense:""}},[e._v("Click on a frame in table to see details")])])],1)},i=[],p=s(n,c,i,!1,null,"3669ebb1");const R=p.exports;export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n,m as r,u as c,a,N as d,n as v}from"./index-
|
|
1
|
+
import{I as n,m as r,u as c,a,N as d,n as v}from"./index-CUO-mWDv.js";const l={props:{node:Object,socket:Object},mixins:[n],data(){return{deviceJSON:"",errorDevice:!1,headers_hass:[{text:"Id",value:"id"},{text:"Type",value:"type"},{text:"Object id",value:"object_id"},{text:"Persistent",value:"persistent"},{text:"Discovery",value:"ignoreDiscovery"}],selectedDevice:null}},computed:{...r(c,["gateway"]),hassDevices(){const s=[];if(this.node&&this.node.hassDevices)for(const e in this.node.hassDevices){const t=JSON.parse(JSON.stringify(this.node.hassDevices[e]));t.id=e,s.push(t)}return s}},watch:{selectedDevice(){this.deviceJSON=this.selectedDevice?JSON.stringify(this.selectedDevice,null,2):""}},methods:{...a(c,["showSnackbar"]),async sendAction(s={}){return new Promise(e=>{this.socket.connected?(this.showSnackbar(`API ${s.apiName} called`,"info"),this.socket.emit(d.hass,s,t=>{t.success||this.showSnackbar(`Error while calling ${s.apiName}: ${t.message}`,"error"),e(t)})):(e({success:!1,message:"Socket disconnected"}),this.showSnackbar("Socket disconnected","error"))})},selectDevice(s,e){e.select(!e.isSelected),this.selectedDevice=this.selectedDevice===s?null:s},async addDevice(){if(!this.errorDevice){const s=JSON.parse(this.deviceJSON);(await this.sendAction({apiName:"add",device:s,nodeId:this.node.id})).success&&this.showSnackbar(`Device ${s.id} added`,"success")}},async deleteDevice(){const s=this.selectedDevice;s&&await this.app.confirm("Attention","Are you sure you want to delete selected device?","alert")&&(await this.sendAction({apiName:"delete",device:s,nodeId:this.node.id})).success&&this.showSnackbar(`Device ${s.id} deleted`,"success")},async disableDiscovery(){this.node&&await this.app.confirm("Rediscover node","Are you sure you want to disable discovery of all values? In order to make this persistent remember to click on Store")&&(await this.sendAction({apiName:"disableDiscovery",nodeId:this.node.id})).success&&this.showSnackbar(`Discovery disabled for node ${this.node.id}`,"success")},async rediscoverDevice(){const s=this.selectedDevice;s&&await this.app.confirm("Rediscover Device","Are you sure you want to re-discover selected device?")&&(await this.sendAction({apiName:"discover",device:s,nodeId:this.node.id})).success&&this.showSnackbar(`Device ${s.id} re-discovered`,"success")},async rediscoverNode(){this.node&&await this.app.confirm("Rediscover node","Are you sure you want to re-discover all node values?")&&(await this.sendAction({apiName:"rediscoverNode",nodeId:this.node.id})).success&&this.showSnackbar(`Node ${this.node.id} re-discovered`,"success")},async storeDevices(s){(await this.sendAction({apiName:"store",devices:this.node.hassDevices,nodeId:this.node.id,remove:s})).success&&this.showSnackbar(`Devices stored for node ${this.node.id}`,"success")},async updateDeviceJSON(){if(!this.errorDevice){const s=JSON.parse(this.deviceJSON);this.$set(this.node.hassDevices,this.selectedDevice.id,s),await this.updateDevice(s)}},async toggleField(s,e){s[e]=!s[e],await this.updateDevice(s)},async updateDevice(s){(await this.sendAction({apiName:"update",device:s,nodeId:this.node.id})).success&&(this.node.hassDevices={...this.node.hassDevices,[s.id]:s},this.selectedDevice&&this.selectedDevice.id===s.id&&(this.deviceJSON=JSON.stringify(s,null,2)),this.showSnackbar(`Device ${s.id} updated`,"success"))},validJSONdevice(){let s=!0;try{JSON.parse(this.deviceJSON)}catch{s=!1}return this.errorDevice=!s,this.deviceJSON===""||s||"JSON test failed"}}};var u=function(){var e=this,t=e._self._c;return t("v-col",[t("v-subheader",[e._v("Home Assistant - Devices")]),e.gateway.manualDiscovery?t("v-alert",{attrs:{"max-width":"1150",text:"",type:"warning"}},[t("small",[e._v("Manual discovery is enabled, you have to select an entity in the table and then press on `REDISCOVER` button on the top of JSON input in order to publish the discovery payload to MQTT")])]):e._e(),e.hassDevices.length>0?t("v-row",[t("v-col",{attrs:{cols:"12",md:"6","pa-1":""}},[t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"primary",text:""},on:{click:function(o){return e.storeDevices(!1)}}},i),[e._v("Store")])]}}],null,!1,3611059316)},[t("span",[e._v("Store all discovered devices in nodes.json in store directory. Prevents re-discovery on startup")])]),t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"error",text:""},on:{click:function(o){return e.storeDevices(!0)}}},i),[e._v("Remove Store")])]}}],null,!1,1382714477)},[t("span",[e._v("Remove devices from nodes.json in store directory")])]),t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"success",text:""},on:{click:e.rediscoverNode}},i),[e._v("Rediscover Node")])]}}],null,!1,4261650123)},[t("span",[e._v("Rediscover all node entities. Useful when changing node name/location and need to recalculate topics")])]),t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"warning",text:""},on:{click:e.disableDiscovery}},i),[e._v("Disable Discovery")])]}}],null,!1,1812163906)},[t("span",[e._v("Set the ignoreDiscovery flag to true on all entities of this node to skip the discovery of them")])]),t("v-data-table",{staticClass:"elevation-1",attrs:{headers:e.headers_hass,items:e.hassDevices,"single-select":"","item-key":"id"},on:{"click:row":e.selectDevice},scopedSlots:e._u([{key:"item.id",fn:function({item:i}){return[e._v(" "+e._s(i.id)+" ")]}},{key:"item.type",fn:function({item:i}){return[e._v(" "+e._s(i.type)+" ")]}},{key:"item.object_id",fn:function({item:i}){return[e._v(" "+e._s(i.object_id)+" ")]}},{key:"item.persistent",fn:function({item:i}){return[t("v-checkbox",{attrs:{"hide-details":"",dense:""},on:{click:function(o){o.stopPropagation()},change:function(o){return e.updateDevice(i)}},model:{value:i.persistent,callback:function(o){e.$set(i,"persistent",o)},expression:"item.persistent"}})]}},{key:"item.ignoreDiscovery",fn:function({item:i}){return[t("v-btn",{attrs:{color:i.ignoreDiscovery?"error":"success",rounded:"","x-small":""},on:{click:function(o){return o.stopPropagation(),e.toggleField(i,"ignoreDiscovery")}}},[e._v(" "+e._s(i.ignoreDiscovery?"Disabled":"Enabled")+" ")])]}}],null,!0)})],1),t("v-col",{attrs:{cols:"12",md:"6","pa-1":""}},[e.selectedDevice?e._e():t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"primary",disabled:e.errorDevice,text:""},on:{click:function(o){return e.addDevice()}}},i),[e._v("Add")])]}}],null,!1,1865690780)},[t("span",[e._v("Add this device to discovered entities")])]),e.selectedDevice?t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"primary",disabled:e.errorDevice,text:""},on:{click:function(o){return e.updateDeviceJSON()}}},i),[e._v("Update")])]}}],null,!1,719990020)},[t("span",[e._v("Update the in-memory discover template. You have to press Rediscover in order to send this to HA")])]):e._e(),e.selectedDevice?t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"success",disabled:e.errorDevice,text:""},on:{click:e.rediscoverDevice}},i),[e._v("Rediscover")])]}}],null,!1,533098741)},[t("span",[e._v("Send this payload to HA")])]):e._e(),e.selectedDevice?t("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("v-btn",e._g({attrs:{color:"error",disabled:e.errorDevice,text:""},on:{click:e.deleteDevice}},i),[e._v("Delete")])]}}],null,!1,3556966958)},[t("span",[e._v("Delete this entity")])]):e._e(),t("v-textarea",{attrs:{label:"Hass Device JSON","auto-grow":"",rules:[e.validJSONdevice]},model:{value:e.deviceJSON,callback:function(i){e.deviceJSON=i},expression:"deviceJSON"}})],1)],1):t("div",{staticClass:"subtitle-1",staticStyle:{margin:"20px"}},[e._v(" No Hass Devices ")])],1)},h=[],p=v(l,u,h,!1,null,null);const D=p.exports;export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as o}from"./index-
|
|
1
|
+
import{n as o}from"./index-CUO-mWDv.js";const s={props:{value:{type:Boolean,default:!1}},computed:{inverted:{get(){return!this.value},set(t){this.$emit("input",!t)}}}};var a=function(){var e=this,n=e._self._c;return n("v-checkbox",e._b({model:{value:e.inverted,callback:function(r){e.inverted=r},expression:"inverted"}},"v-checkbox",e.$attrs,!1))},c=[],l=o(s,a,c,!1,null,null);const v=l.exports;export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l}from"./vuedraggable.umd-
|
|
1
|
+
import{d as l}from"./vuedraggable.umd-DTxxsq3J.js";import{n as a}from"./index-CUO-mWDv.js";const u={props:{input:Object,value:Array,toggleEdit:{type:Boolean,default:!0}},components:{draggable:l},data:()=>({item:null,inputItems:[],allItems:[]}),computed:{items:{get(){return this.value||[]},set(n){this.$emit("input",n)}}},mounted(){this.getItems()},methods:{getItems(){typeof this.input.items=="function"?this.inputItems=this.input.items():this.inputItems=this.input.items,this.allItems=[...this.inputItems]},getItem(n){return this.allItems.find(t=>t[this.input.itemValue]===n)},async addItem(){this.item&&(this.$emit("add",this.item),this.items.push(this.item),this.inputItems.splice(this.inputItems.indexOf(this.getItem(this.item)),1),await this.$nextTick(),this.item=null)},deleteItem(n){const t=this.items[n];t&&(this.$emit("delete",t),this.items.splice(n,1),this.inputItems.push(this.getItem(t)))},getItemName(n){var t;return((t=this.allItems.find(i=>(i==null?void 0:i[this.input.itemValue])===n))==null?void 0:t[this.input.itemText||"text"])??n}}};var m=function(){var t=this,i=t._self._c;return i("div",[i("v-list",{attrs:{dense:""}},[t.input.prefix?i("v-list-item",{key:"prefix",domProps:{textContent:t._s(t.input.prefix)}}):t._e(),t.input.prefix?i("v-icon",{staticClass:"ml-5"},[t._v("arrow_downward")]):t._e(),i("draggable",{attrs:{handle:".handle"},model:{value:t.items,callback:function(e){t.items=e},expression:"items"}},[t._l(t.items,function(e,s){return[i("v-list-item",{key:`${s}_${e}`},[i("v-list-item-action",{staticClass:"mr-0",staticStyle:{"min-width":"0px"}},[t._t("item-action",null,{item:e})],2),i("v-list-item-content",[i("v-row",{staticClass:"ma-0 d-block"},[t.toggleEdit?i("v-icon",{staticClass:"handle",staticStyle:{cursor:"move"},attrs:{color:"primary lighten-2"}},[t._v("drag_indicator")]):t._e(),i("span",{staticClass:"text-caption"},[t._v(" "+t._s(s+1)+".")]),i("span",{staticStyle:{"font-size":"0.9rem"}},[t._v(" "+t._s(t.getItemName(e))+" ")]),t.toggleEdit?i("v-btn",{attrs:{icon:"",small:"",color:"error"},on:{click:function(o){return t.deleteItem(s)}}},[i("v-icon",{attrs:{small:""}},[t._v("delete")])],1):t._e()],1)],1)],1)]})],2),t.input.prefix&&t.items.length>0?i("v-icon",{staticClass:"ml-5"},[t._v("arrow_downward")]):t._e(),t.input.suffix?i("v-list-item",{key:"suffix",domProps:{textContent:t._s(t.input.suffix)}}):t._e()],1),t.toggleEdit?i("div",[t.input.inputType==="text"?i("v-text-field",{attrs:{label:t.input.label,hint:t.input.hint,required:t.input.required,dense:"",maxlength:t.input.maxLength,"persistent-hint":!!t.input.hint,type:"text",suffix:t.input.suffix,prefix:t.input.prefix,"append-outer-icon":"add"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addItem.apply(null,arguments)},"click:append-outer":t.addItem},model:{value:t.item,callback:function(e){t.item=typeof e=="string"?e.trim():e},expression:"item"}}):t._e(),t.input.inputType==="select"?i("v-select",{attrs:{label:t.input.label,hint:t.input.hint,"persistent-hint":!!t.input.hint,items:t.inputItems,"item-value":t.input.itemValue,"item-text":t.input.itemText,dense:""},on:{change:t.addItem},model:{value:t.item,callback:function(e){t.item=e},expression:"item"}}):t._e(),t.input.inputType==="autocomplete"?i("v-autocomplete",{attrs:{label:t.input.label,"persistent-hint":!!t.input.hint,hint:t.input.hint,items:t.inputItems,"item-value":t.input.itemValue,"item-text":t.input.itemText,dense:""},on:{change:t.addItem,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addItem.apply(null,arguments)}},model:{value:t.item,callback:function(e){t.item=typeof e=="string"?e.trim():e},expression:"item"}}):t._e(),t.input.inputType==="combobox"?i("v-combobox",{attrs:{label:t.input.label,hint:t.input.hint,"persistent-hint":!!t.input.hint,items:t.inputItems,"item-value":t.input.itemValue,"item-text":t.input.itemText,dense:"",chips:"","deletable-chips":"","return-object":!1,"append-outer-icon":"add"},on:{change:t.addItem,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addItem.apply(null,arguments)},"click:append-outer":t.addItem},model:{value:t.item,callback:function(e){t.item=typeof e=="string"?e.trim():e},expression:"item"}}):t._e()],1):t._e()],1)},p=[],r=a(u,m,p,!1,null,null);const h=r.exports;export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColorScheme-
|
|
2
|
-
import{L as a,_ as i,a as l,u as o,C as n,R as u,n as m,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColorScheme-a-YZqAx8.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{L as a,_ as i,a as l,u as o,C as n,R as u,n as m,h as c}from"./index-CUO-mWDv.js";const p=a.get("Login"),d={components:{ColorScheme:()=>i(()=>import("./ColorScheme-a-YZqAx8.js"),__vite__mapDeps([0,1,2]),import.meta.url)},data(){return{username:"",password:"",rememberMe:!1,error_text:"",error_type:"error",showPsw:!1,error:!1,valid_login:!0,rules:{required(t){return!!t||"This field is required."}}}},watch:{error:function(t){t&&setTimeout(function(){this.error=!1},5e3)}},mounted(){if(this.isLocalStorageSupported()){const t=localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")):null,e=!!localStorage.getItem("logged");t&&t.rememberMe?(this.username=t.username||this.username,this.password=t.password||this.password,this.rememberMe=t.rememberMe,e&&this.login(!0)):localStorage.removeItem("user"),this.initColorScheme()}else this.error=!0,this.error_type="error",this.error_text="Local storage not supported"},methods:{...l(o,["initColorScheme"]),isLocalStorageSupported(){const t="test",e=window.localStorage;try{return e.setItem(t,"1"),e.removeItem(t),!0}catch{return!1}},async login(t){if(!this.isLocalStorageSupported()){this.error=!0,this.error_type="error",this.error_text="Local storage not supported";return}if(t===!0||this.$refs.form.validate())try{let e={username:this.username,password:this.password};const r=await n.login(e);r.success?(e=Object.assign(e,r.user),e.rememberMe=this.rememberMe,localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("logged","true"),o().onUserLogged(e),this.$route.params.nextUrl!=null?this.$router.push(this.$route.params.nextUrl):this.$router.push(u.main)):(r.message&&(this.error=!0),this.error_type="error",this.error_text=r.message)}catch(e){p.error(e),this.error=!0,this.error_type="error",this.error_text=e.message}}}};var h=function(){var e=this,r=e._self._c;return r("v-container",{staticClass:"pa-0 background",attrs:{fluid:"","fill-height":""}},[r("v-col",{staticClass:"pa-0 fill-height",attrs:{elevation:"12",cols:"12"}},[r("v-card",{staticClass:"mx-auto",class:e.$vuetify.breakpoint.smAndDown?"":"ml-10",attrs:{width:e.$vuetify.breakpoint.smAndDown?"100%":"500",height:"100%",tile:""}},[r("v-card-title",{},[r("v-avatar",{staticStyle:{"border-radius":"0"},attrs:{size:"40px"}},[r("img",{attrs:{src:c,alt:"Logo"}})]),r("v-toolbar-title",{staticStyle:{"margin-left":"20px"}},[e._v("Z-Wave JS UI")])],1),r("v-card-text",[r("v-form",{ref:"form",attrs:{id:"login-form","lazy-validation":""},on:{submit:function(s){return s.preventDefault(),e.login.apply(null,arguments)}},model:{value:e.valid_login,callback:function(s){e.valid_login=s},expression:"valid_login"}},[r("v-text-field",{attrs:{required:"",rules:[e.rules.required],autocomplete:"","prepend-icon":"person",name:"username",label:"Username",type:"text"},model:{value:e.username,callback:function(s){e.username=typeof s=="string"?s.trim():s},expression:"username"}}),r("v-text-field",{attrs:{required:"",rules:[e.rules.required],"prepend-icon":"lock",name:"password",label:"Password",autocomplete:"",type:e.showPsw?"text":"password","append-icon":e.showPsw?"visibility":"visibility_off"},on:{"click:append":function(s){e.showPsw=!e.showPsw}},model:{value:e.password,callback:function(s){e.password=s},expression:"password"}}),r("v-checkbox",{attrs:{"prepend-icon":"null",name:"rememberMe","hide-details":"",label:"Remember Me"},model:{value:e.rememberMe,callback:function(s){e.rememberMe=s},expression:"rememberMe"}}),r("color-scheme",{attrs:{"prepend-icon":"null","hide-details":""}})],1)],1),r("v-card-actions",{staticClass:"justify-center"},[r("v-btn",{staticClass:"mb-6",staticStyle:{"min-width":"150px",margin:"10px"},attrs:{color:"primary",rounded:"",type:"submit",form:"login-form"}},[e._v("Login")])],1),r("v-alert",{attrs:{dismissible:"",type:e.error_type},model:{value:e.error,callback:function(s){e.error=s},expression:"error"}},[e._v(e._s(e.error_text))])],1)],1)],1)},g=[],f=m(d,h,g,!1,null,"2cbca62d");const v=f.exports;export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ZwaveGraph-
|
|
2
|
-
import{I as u,_ as a,m as h,u as l,a as p,n as f}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ZwaveGraph-Dztxgewx.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css","./ZwaveGraph-CV956Kpy.css","./NodePanel-B82MWDIx.js","./vuedraggable.umd-DTxxsq3J.js","./NodePanel-CsryAE1D.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{I as u,_ as a,m as h,u as l,a as p,n as f}from"./index-CUO-mWDv.js";const m={name:"Mesh",mixins:[u],props:{socket:Object},components:{ZwaveGraph:()=>a(()=>import("./ZwaveGraph-Dztxgewx.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),NodePanel:()=>a(()=>import("./NodePanel-B82MWDIx.js"),__vite__mapDeps([4,1,2,5,6]),import.meta.url)},computed:{...h(l,["nodes"])},documentListeners:{},data(){return{selectedNode:null,showProperties:!1}},methods:{...p(l,["showSnackbar","setNeighbors"]),setInitialPosition(e){const t=window.innerHeight,o=window.innerWidth,i=e.offsetHeight,n=e.offsetWidth;let r=(t-i)/2-50,s=(o-n)/10;r<0&&(r=10),s<0&&(s=10),e.style.top=r+"px",e.style.left=s+"px"},makeDivDraggable(){const e=document.getElementById("properties");if(!e||e.hasAttribute("data-draggable"))return;e.setAttribute("data-draggable",!0),setTimeout(()=>{this.setInitialPosition(e)},100);let t=0,o=0;e.onmousedown=i;function i(s){s=s||window.event,!s.target.classList.contains("handle")&&(s.preventDefault(),!s.target.classList.contains("u-over")&&(t=s.clientX,o=s.clientY,document.onmouseup=r,document.onmousemove=n))}function n(s){s=s||window.event,s.preventDefault();const c=t-s.clientX,d=o-s.clientY;t=s.clientX,o=s.clientY,e.style.top=e.offsetTop-d+"px",e.style.left=e.offsetLeft-c+"px"}function r(){document.onmouseup=null,document.onmousemove=null}},async nodeClick(e){this.selectedNode=this.selectedNode===e?null:e,this.showProperties=!!this.selectedNode,this.$vuetify.breakpoint.mdAndUp&&this.showProperties&&(await this.$nextTick(),this.makeDivDraggable())},debounceRefresh(){this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=setTimeout(this.refresh.bind(this),500)},async refresh(){const e=await this.app.apiRequest("refreshNeighbors",[],{infoSnack:!1,errorSnack:!1});e.success&&(this.showSnackbar("Nodes Neighbors updated","success"),this.setNeighbors(e.result))}},mounted(){this.debounceRefresh()},beforeDestroy(){this.refreshTimeout&&clearTimeout(this.refreshTimeout)}};var w=function(){var t=this,o=t._self._c;return o("v-container",{staticClass:"fill",attrs:{fluid:""}},[o("zwave-graph",{ref:"mesh",attrs:{id:"mesh",nodes:t.nodes},on:{"node-click":t.nodeClick}}),t.$vuetify.breakpoint.mdAndUp?o("node-panel",{staticClass:"details",attrs:{node:t.selectedNode,socket:t.socket,id:"properties",draggable:""},model:{value:t.showProperties,callback:function(i){t.showProperties=i},expression:"showProperties"}}):o("v-bottom-sheet",{attrs:{scrollable:""},model:{value:t.showProperties,callback:function(i){t.showProperties=i},expression:"showProperties"}},[o("v-card",{staticClass:"text-center",attrs:{scrollable:""}},[o("v-card-text",[o("node-panel",{attrs:{node:t.selectedNode,socket:t.socket},model:{value:t.showProperties,callback:function(i){t.showProperties=i},expression:"showProperties"}})],1)],1)],1)],1)},v=[],_=f(m,w,v,!1,null,"f1082550");const g=_.exports;export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as t,n as i,u as r}from"./index-
|
|
1
|
+
import{m as t,n as i,u as r}from"./index-CUO-mWDv.js";const a={data:()=>({requiredKeys:["S2_Unauthenticated","S2_Authenticated","S2_AccessControl","S0_Legacy"],requiredKeysLongRange:["S2_Authenticated","S2_AccessControl"]}),computed:{...t(r,["zwave"]),missingKeys(){const n=this.zwave.securityKeys||{},e=[];for(const s of this.requiredKeys)(!n[s]||n[s].length!==32)&&e.push(s);return e},missingZwlrKeys(){const n=this.zwave.securityKeysLongRange||{},e=[];for(const s of this.requiredKeysLongRange)(!n[s]||n[s].length!==32)&&e.push(s);return e}}};var o=function(){var e=this,s=e._self._c;return e.missingKeys.length>0||e.missingZwlrKeys.length>0?s("v-alert",{attrs:{"max-width":"600px",dense:"",border:"left",type:"warning"}},[e.missingKeys.length>0?s("p",[e._v(" Some Z-Wave security keys are missing: "),s("strong",[e._v(e._s(e.missingKeys.join(", ")))])]):e._e(),e.missingZwlrKeys.length>0?s("p",[e._v(" Some Z-Wave Long Range security keys are missing: "),s("strong",[e._v(e._s(e.missingZwlrKeys.join(", ")))])]):e._e(),s("span",[e._v("Please make sure to set the keys in Settings.")])]):e._e()},g=[],_=i(a,o,g,!1,null,null);const y=_.exports;export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as y}from"./index-
|
|
1
|
+
import{n as y}from"./index-CUO-mWDv.js";const w="horizontal",r="vertical",P={name:"multipane",props:{layout:{type:String,default:r}},data(){return{isResizing:!1}},computed:{classnames(){return["multipane","layout-"+this.layout.slice(0,1),this.isResizing?"is-resizing":""]},cursor(){return this.isResizing?this.layout==r?"col-resize":"row-resize":""},userSelect(){return this.isResizing?"none":""}},methods:{getPageXY(s){var e;return((e=s.touches)==null?void 0:e[0])||s},onMouseDown(s){const e=s.target;if(e.className&&e.className.match("multipane-resizer")){let{$el:l,layout:u}=this;const{pageX:z,pageY:_}=this.getPageXY(s);let t=e.previousElementSibling,{offsetWidth:v,offsetHeight:R}=t,f=!!(t.style.width+"").match("%");const{addEventListener:c,removeEventListener:h}=window,i=(p,d=0)=>{if(u==r){let o=l.clientWidth,a=p+d;return t.style.width=f?a/o*100+"%":a+"px"}if(u==w){let o=l.clientHeight,a=p+d;return t.style.height=f?a/o*100+"%":a+"px"}};this.isResizing=!0;let n=i();this.$emit("paneResizeStart",t,e,n);const m=p=>{const{pageX:d,pageY:o}=this.getPageXY(p);n=u==r?i(v,d-z):i(R,o-_),this.$emit("paneResize",t,e,n)},g=()=>{n=u==r?i(t.clientWidth):i(t.clientHeight),this.isResizing=!1,h("mousemove",m),h("mouseup",g),h("touchmove",m),h("touchend",g),this.$emit("paneResizeStop",t,e,n)};c("mousemove",m),c("mouseup",g),c("touchmove",m),c("touchend",g)}}}};var Y=function(){var e=this,l=e._self._c;return l("div",{class:e.classnames,style:{cursor:e.cursor,userSelect:e.userSelect},on:{mousedown:e.onMouseDown,touchstart:e.onMouseDown}},[e._t("default")],2)},H=[],M=y(P,Y,H,!1,null,null);const S=M.exports;export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as r}from"./index-
|
|
1
|
+
import{n as r}from"./index-CUO-mWDv.js";const t={};var s=function(){var e=this,n=e._self._c;return n("div",{staticClass:"multipane-resizer"},[e._t("default")],2)},a=[],_=r(t,s,a,!1,null,null);const o=_.exports;export{o as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueId-BLteLfL0.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css","./ValueId-DjIcc9-B.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as D,I as F,b as B,m as T,u as E,F as m,a as V,av as q,n as $}from"./index-CUO-mWDv.js";function G(n){return Object.prototype.toString.call(n)==="[object Object]"}var p;(function(n){n[n.NoSupport=0]="NoSupport",n[n.Working=1]="Working",n[n.Fail=2]="Fail",n[n.Success=255]="Success"})(p||(p={}));function M(n){return G(n)&&"status"in n&&typeof p[n.status]=="string"}function H(n){return M(n)&&(n.status===p.Success||n.status===p.Working)}function X(n){return!n||H(n)}const c=Object.freeze({UInt8:Object.freeze({min:0,max:255}),UInt16:Object.freeze({min:0,max:65535}),UInt24:Object.freeze({min:0,max:16777215}),UInt32:Object.freeze({min:0,max:4294967295}),Int8:Object.freeze({min:-128,max:127}),Int16:Object.freeze({min:-32768,max:32767}),Int24:Object.freeze({min:-8388608,max:8388607}),Int32:Object.freeze({min:-2147483648,max:2147483647})}),d=()=>n=>n,v=d(),o=d(),O=d(),u=d(),w=d(),C=d();var f;(function(n){n[n.SignedInteger=0]="SignedInteger",n[n.UnsignedInteger=1]="UnsignedInteger",n[n.Enumerated=2]="Enumerated",n[n.BitField=3]="BitField"})(f||(f={}));const r=v({type:"any",readable:!0,writeable:!0}),i={writeable:!1},l={readable:!1},Y=v({...r}),K=v({...r,...i}),J=v({...r,...l}),x=O({...r,type:"boolean"}),Q=O({...x,...i}),Z=O({...x,...l}),R=o({...r,type:"number"}),ee=o({...R,...i}),te=o({...R,...l}),h=o({...r,type:"number",...c.UInt8}),ne=o({...h,...i}),se=o({...h,...l}),I=o({...r,type:"number",...c.UInt16}),oe=o({...I,...i}),ae=o({...I,...l}),_=o({...r,type:"number",...c.UInt24}),re=o({..._,...i}),ie=o({..._,...l}),z=o({...r,type:"number",...c.UInt32}),le=o({...z,...i}),ce=o({...z,...l}),S=o({...r,type:"number",...c.Int8}),de=o({...S,...i}),ue=o({...S,...l}),k=o({...r,type:"number",...c.Int16}),fe=o({...k,...i}),pe=o({...k,...l}),j=o({...r,type:"number",...c.Int24}),me=o({...j,...i}),ve=o({...j,...l}),L=o({...r,type:"number",...c.Int32}),he=o({...L,...i}),be=o({...L,...l}),b=u({...r,type:"string"}),ye=u({...b,...i}),ge=u({...b,...l}),P=u({...b,type:"color"}),Oe=u({...P,...i}),we=u({...P,...l}),N=o({...h,max:99}),Ce=o({...N,...i}),xe=o({...N,...l}),U=C({...r,type:"duration"}),Re=C({...U,...i}),Ie=C({...U,...l}),W=w({...r,type:"buffer"}),_e=w({...W,...i}),ze=w({...W,...l});Object.freeze(Y),Object.freeze(K),Object.freeze(J),Object.freeze(R),Object.freeze(ee),Object.freeze(te),Object.freeze(h),Object.freeze(I),Object.freeze(_),Object.freeze(z),Object.freeze(S),Object.freeze(k),Object.freeze(j),Object.freeze(L),Object.freeze(ne),Object.freeze(oe),Object.freeze(re),Object.freeze(le),Object.freeze(de),Object.freeze(fe),Object.freeze(me),Object.freeze(he),Object.freeze(se),Object.freeze(ae),Object.freeze(ie),Object.freeze(ce),Object.freeze(ue),Object.freeze(pe),Object.freeze(ve),Object.freeze(be),Object.freeze(N),Object.freeze(Ce),Object.freeze(xe),Object.freeze(x),Object.freeze(Q),Object.freeze(Z),Object.freeze(b),Object.freeze(ye),Object.freeze(ge),Object.freeze(P),Object.freeze(Oe),Object.freeze(we),Object.freeze(U),Object.freeze(Re),Object.freeze(Ie),Object.freeze(W),Object.freeze(_e),Object.freeze(ze);const Se={props:{headers:Array,node:Object},components:{ValueID:()=>D(()=>import("./ValueId-BLteLfL0.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)},mixins:[F],data(){return{locError:null,nameError:null,options:{},maxLRPowerLevels:B,newName:this.node.name,newLoc:this.node.loc,selectedRFRegion:this.node.RFRegion,configCCValueFormats:[{text:"Signed",value:f.SignedInteger},{text:"Unsigned",value:f.UnsignedInteger}],configCC:{value:0,valueSize:1,parameter:1,valueFormat:f.UnsignedInteger}}},computed:{...T(E,["mqtt","zwave"]),regionSupportsAutoPowerlevel(){var n;return[m.Europe,m["Europe (Long Range)"],m.USA,m["USA (Long Range)"]].includes((n=this.node)==null?void 0:n.RFRegion)},isAutoPowerLevelEnabled(){return this.zwave.rf.autoPowerlevels&&this.regionSupportsAutoPowerlevel},showPowerWarnings(){return!this.isAutoPowerLevelEnabled},commandGroups(){if(this.node){const n={};let e=!0;for(const t of this.node.values){const s=t.commandClassName+" v"+t.commandClassVersion;n[s]||(t.commandClassName==="Configuration"&&(e=!1),n[s]=[]),n[s].push(t)}return e&&(n.Configuration=[]),n}else return{}}},watch:{node(){this.newName=this.node.name,this.newLoc=this.node.loc},newLoc(n){this.locError=this.validateTopic(n)},newName(n){this.nameError=this.validateTopic(n)}},mounted(){this.options={transitionDuration:this.node.defaultTransitionDuration,volume:this.node.defaultVolume}},methods:{...V(E,["showSnackbar"]),async setDefaults(n){let e="";switch(n){case"transitionDuration":e="defaultTransitionDuration";break;case"volume":e="defaultVolume";break}if(!e)return;(await this.app.apiRequest("setNodeDefaultSetValueOptions",[this.node.id,{[e]:this.options[n]}])).success&&this.showSnackbar(`Default node ${n} updated successffully`,"success")},async updateControllerNodeProp(n){(await this.app.apiRequest("updateControllerNodeProps",[null,[n]])).success&&this.showSnackbar("Powerlevel updated","success")},canResetConfig(n){return n&&n.commandClass===112&&n.commandClassVersion>3},async resetAllConfig(){await this.app.confirm("Attention","Are you sure you want to reset all configurations to default?","alert")&&(await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"resetAll",[]])).success&&this.showSnackbar("All config values resetted","success")},async resetConfig(){(await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"reset",[this.configCC.parameter]])).success&&this.showSnackbar(`Parameter ${this.configCC.parameter}: resetted`,"success")},async refreshCCValues(n){(await this.app.apiRequest("refreshCCValues",[this.node.id,n])).success&&this.showSnackbar(`Values of CC ${n} refreshed`,"success")},async configurationGet(){const n=await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"get",[this.configCC.parameter]]);n.success&&this.showSnackbar(`Parameter ${this.configCC.parameter}: ${n.result}`,"success")},async configurationSet(){const n=await this.app.apiRequest("sendCommand",[{nodeId:this.node.id,commandClass:112},"set",[{parameter:this.configCC.parameter,value:this.configCC.value,valueSize:this.configCC.valueSize,valueFormat:this.configCC.valueFormat}]]);n.success&&(X(n.result)?this.showSnackbar(`Parameter ${this.configCC.parameter} set successfully`,"success"):this.showSnackbar(`Parameter ${this.configCC.parameter} set failed`,"error"))},getValue(n){return this.node&&this.node.values?this.node.values.find(e=>e.id===n.id):null},resetLocation(){setTimeout(()=>{this.newLoc=this.node.loc},10)},resetName(){setTimeout(()=>{this.newName=this.node.name},10)},async updatePowerLevel(){if(this.node){const n=[this.node.powerlevel,this.node.measured0dBm];(await this.app.apiRequest("setPowerlevel",n)).success&&this.showSnackbar("Powerlevel updated","success")}},async updateRFRegion(){if(this.node){const n=[this.selectedRFRegion];(await this.app.apiRequest("setRFRegion",n)).success&&this.showSnackbar("RF Region updated","success")}},async updateMaxLRPowerLevel(){if(this.node){const n=[this.node.maxLongRangePowerlevel];(await this.app.apiRequest("setMaxLRPowerLevel",n)).success&&this.showSnackbar("Maximum LR power level updated","success")}},async updateLoc(){this.node&&!this.locError&&(await this.app.apiRequest("setNodeLocation",[this.node.id,this.newLoc])).success&&this.showSnackbar("Node location updated","success")},async updateName(){this.node&&!this.nameError&&(await this.app.apiRequest("setNodeName",[this.node.id,this.newName])).success&&this.showSnackbar("Node name updated","success")},updateValue(n,e){this.$emit("updateValue",n,e)},validateTopic(n){const e=this.mqtt.disabled?"":q(n);return typeof e=="string"?e:""}}};var ke=function(){var e=this,t=e._self._c;return t("v-container",{attrs:{fluid:""}},[t("v-row",[t("v-col",{staticStyle:{"max-width":"300px"},attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Name","append-outer-icon":"send",error:!!e.nameError,"error-messages":e.nameError,clearable:"","clear-icon":"refresh"},on:{"click:clear":e.resetName,"click:append-outer":e.updateName},model:{value:e.newName,callback:function(s){e.newName=typeof s=="string"?s.trim():s},expression:"newName"}})],1),t("v-col",{staticStyle:{"max-width":"300px"},attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Location","append-outer-icon":"send",error:!!e.locError,"error-messages":e.locError,clearable:"","clear-icon":"refresh"},on:{"click:clear":e.resetLocation,"click:append-outer":e.updateLoc},model:{value:e.newLoc,callback:function(s){e.newLoc=typeof s=="string"?s.trim():s},expression:"newLoc"}})],1)],1),e.node.isControllerNode?[t("v-subheader",{staticClass:"title",staticStyle:{padding:"0"}},[e._v("Controller Options")]),t("v-row",[t("v-col",{staticStyle:{"max-width":"300px"},attrs:{cols:"12"}},[t("v-select",{attrs:{label:"RF Region",items:e.node.rfRegions,disabled:e.node.RFRegion===void 0,hint:e.node.RFRegion===void 0?"Not supported by your controller":"","persistent-hint":""},scopedSlots:e._u([{key:"append-outer",fn:function(){return[t("v-btn",{attrs:{color:"primary",small:"",icon:""},on:{click:function(s){return e.updateControllerNodeProp("RFRegion")}}},[t("v-icon",[e._v("refresh")])],1),t("v-btn",{attrs:{color:"primary",small:"",icon:""},on:{click:e.updateRFRegion}},[t("v-icon",[e._v("send")])],1)]},proxy:!0}],null,!1,3815849893),model:{value:e.selectedRFRegion,callback:function(s){e.selectedRFRegion=s},expression:"selectedRFRegion"}})],1)],1),t("v-row",[t("v-col",{staticStyle:{"max-width":"300px"},attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Normal Power Level",min:-10,max:20,step:.1,suffix:"dBm",type:"number",disabled:e.isAutoPowerLevelEnabled,hint:e.isAutoPowerLevelEnabled?"Automatic mode enabled in settings":"","persistent-hint":""},model:{value:e.node.powerlevel,callback:function(s){e.$set(e.node,"powerlevel",e._n(s))},expression:"node.powerlevel"}})],1),t("v-col",{staticStyle:{"max-width":"300px"},attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Measured output power at 0 dBm","append-outer-icon":"send",min:-10,max:10,step:.1,suffix:"dBm",type:"number"},scopedSlots:e._u([{key:"append-outer",fn:function(){return[t("v-btn",{attrs:{color:"primary",small:"",icon:""},on:{click:function(s){return e.updateControllerNodeProp("powerlevel")}}},[t("v-icon",[e._v("refresh")])],1),t("v-btn",{attrs:{color:"primary",small:"",icon:""},on:{click:e.updatePowerLevel}},[t("v-icon",[e._v("send")])],1)]},proxy:!0}],null,!1,8418117),model:{value:e.node.measured0dBm,callback:function(s){e.$set(e.node,"measured0dBm",e._n(s))},expression:"node.measured0dBm"}})],1)],1),e.node.supportsLongRange?t("v-row",[t("v-col",{staticStyle:{"max-width":"300px"},attrs:{cols:"12"}},[t("v-select",{attrs:{label:"Maximum LR Power Level",items:e.maxLRPowerLevels,disabled:e.isAutoPowerLevelEnabled,hint:e.isAutoPowerLevelEnabled?"Automatic mode enabled in settings":"","persistent-hint":""},scopedSlots:e._u([e.isAutoPowerLevelEnabled?null:{key:"append-outer",fn:function(){return[t("v-btn",{attrs:{color:"primary",small:"",icon:""},on:{click:function(s){return e.updateControllerNodeProp("maxLongRangePowerlevel")}}},[t("v-icon",[e._v("refresh")])],1),t("v-btn",{attrs:{color:"primary",small:"",icon:""},on:{click:e.updateMaxLRPowerLevel}},[t("v-icon",[e._v("send")])],1)]},proxy:!0}],null,!0),model:{value:e.node.maxLongRangePowerlevel,callback:function(s){e.$set(e.node,"maxLongRangePowerlevel",s)},expression:"node.maxLongRangePowerlevel"}})],1)],1):e._e(),e.showPowerWarnings?t("v-col",{staticStyle:{"max-width":"700px"},attrs:{dense:""}},[t("v-alert",{attrs:{text:"",type:"warning"}},[t("strong",[e._v("DO NOT CHANGE THESE VALUES UNLESS YOU KNOW WHAT YOU ARE DOING ")]),t("small",[e._v("Increasing the TX power (normal power level) may be "),t("b",[e._v("illegal")]),e._v(", depending on where you are located. ")]),t("small",[e._v('Increasing the TX power will only make the nodes "hear" the controller better, but not vice versa')])]),t("v-alert",{staticClass:"pb-0",staticStyle:{"white-space":"break-spaces"},attrs:{text:"",type:"info"}},[t("small",[e._v(e._s("Please consult the manufacturer for the default values, as these can vary between different sticks.")+" ")])])],1):e._e()]:e._e(),t("div",[e.node.isControllerNode?e._e():t("v-subheader",{staticClass:"title",staticStyle:{padding:"0"}},[e._v("Send Options")]),e.node.isControllerNode?e._e():t("v-row",{staticClass:"mt-0"},[t("v-col",{staticStyle:{"max-width":"300px","padding-top":"0"},attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Transition duration",hint:"Ex: '10s' (10 seconds)","persistent-hint":"","append-icon":"clear","append-outer-icon":"save"},on:{"click:append":function(s){e.options.transitionDuration=e.node.defaultTransitionDuration||""},"click:append-outer":function(s){return e.setDefaults("transitionDuration")}},model:{value:e.options.transitionDuration,callback:function(s){e.$set(e.options,"transitionDuration",typeof s=="string"?s.trim():s)},expression:"options.transitionDuration"}})],1),t("v-col",{staticStyle:{"max-width":"300px","padding-top":"0"},attrs:{cols:"12",sm:"6"}},[t("v-text-field",{attrs:{label:"Volume",hint:"The volume (for the Sound Switch CC)","persistent-hint":"","append-icon":"clear","append-outer-icon":"save"},on:{"click:append":function(s){e.options.volume=e.node.defaultVolume||""},"click:append-outer":function(s){return e.setDefaults("volume")}},model:{value:e.options.volume,callback:function(s){e.$set(e.options,"volume",typeof s=="string"?s.trim():s)},expression:"options.volume"}})],1)],1),!e.node.isControllerNode||e.node.values.length?t("v-row",[t("v-subheader",{staticClass:"title"},[e._v("Values")]),t("v-expansion-panels",{staticClass:"expansion-panels-outlined",attrs:{accordion:"",multiple:"",flat:""}},e._l(e.commandGroups,function(s,y){return t("v-expansion-panel",{key:y},[t("v-expansion-panel-header",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{attrs:{"align-self":"center"}},[e._v(" "+e._s(y)+" ")]),t("v-col",{staticClass:"text-right"},[e.canResetConfig(s[0])?t("v-btn",{staticClass:"mb-1 mr-3",attrs:{color:"error",outlined:"","x-small":""},on:{click:function(a){return a.stopPropagation(),e.resetAllConfig()}}},[e._v(" Reset "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("clear")])],1):e._e(),s[0]?t("v-btn",{staticClass:"mb-1",attrs:{color:"primary",outlined:"","x-small":""},on:{click:function(a){return a.stopPropagation(),e.refreshCCValues(s[0].commandClass)}}},[e._v(" Refresh "),t("v-icon",{attrs:{"x-small":"",right:""}},[e._v("refresh")])],1):e._e()],1)],1)],1),t("v-expansion-panel-content",[t("v-row",e._l(s,function(a,g){return t("v-col",{key:g,attrs:{cols:"12",sm:"6",md:"4"}},[t("ValueID",{attrs:{node:e.node},on:{updateValue:e.updateValue},model:{value:s[g],callback:function(A){e.$set(s,g,A)},expression:"group[index]"}})],1)}),1),t("v-row",[y.startsWith("Configuration")&&!e.node.isControllerNode?t("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[t("v-subheader",{staticClass:"valueid-label"},[e._v("Custom Configuration ")]),t("v-row",[t("v-col",{attrs:{cols:"3"}},[t("v-text-field",{attrs:{label:"Parameter","hide-details":""},model:{value:e.configCC.parameter,callback:function(a){e.$set(e.configCC,"parameter",e._n(a))},expression:`
|
|
3
|
+
configCC.parameter
|
|
4
|
+
`}})],1),t("v-col",{attrs:{cols:"3"}},[t("v-select",{attrs:{label:"Size","hide-details":"",items:[1,2,3,4]},model:{value:e.configCC.valueSize,callback:function(a){e.$set(e.configCC,"valueSize",e._n(a))},expression:`
|
|
5
|
+
configCC.valueSize
|
|
6
|
+
`}})],1),t("v-col",{attrs:{cols:"3"}},[t("v-text-field",{attrs:{label:"Value","hide-details":""},model:{value:e.configCC.value,callback:function(a){e.$set(e.configCC,"value",e._n(a))},expression:"configCC.value"}})],1),t("v-col",{attrs:{cols:e.$vuetify.breakpoint.xsOnly?4:3}},[t("v-select",{attrs:{label:"Format","hide-details":"",items:e.configCCValueFormats},model:{value:e.configCC.valueFormat,callback:function(a){e.$set(e.configCC,"valueFormat",a)},expression:"configCC.valueFormat"}})],1),t("v-col",{staticClass:"d-flex",staticStyle:{gap:"10px"}},[t("v-btn",{attrs:{width:"60px",color:"success","x-small":"",dark:""},on:{click:function(a){return a.stopPropagation(),e.configurationGet()}}},[e._v(" GET ")]),t("v-btn",{attrs:{width:"60px",color:"primary","x-small":""},on:{click:function(a){return a.stopPropagation(),e.configurationSet()}}},[e._v(" SET ")]),e.canResetConfig(s[0])?t("v-btn",{attrs:{width:"60px","x-small":"",color:"error"},on:{click:function(a){return a.stopPropagation(),e.resetConfig.apply(null,arguments)}}},[e._v("Reset")]):e._e()],1)],1)],1):e._e()],1)],1),t("v-divider")],1)}),1)],1):e._e()],1)],2)},je=[],Le=$(Se,ke,je,!1,null,null);const Ne=Le.exports;export{Ne as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./StatisticsArrows-
|
|
2
|
-
import{I as _,_ as c,P as p,ai as d,m as f,u as h,c as R,a as g,h as b,an as m,al as C,am as k,ah as y,R as S,n as w}from"./index-C0dt7pwz.js";import{d as x}from"./vuedraggable.umd-BfcskYMJ.js";const P={mixins:[_],components:{StatisticsArrows:()=>c(()=>import("./StatisticsArrows-Cja5hyxr.js"),__vite__mapDeps([0,1,2]),import.meta.url),BgRssiChart:()=>c(()=>import("./BgRssiChart-CBfN9INt.js"),__vite__mapDeps([3,1,2,4]),import.meta.url),DialogHealthCheck:()=>c(()=>import("./DialogHealthCheck-D8u644sq.js"),__vite__mapDeps([5,1,2,6]),import.meta.url),DialogLinkReliability:()=>c(()=>import("./DialogLinkReliability-BAhSwHHo.js"),__vite__mapDeps([7,1,2,6]),import.meta.url),draggable:x},props:{value:{type:Boolean,default:!1},node:{type:Object,default:()=>null},socket:{type:Object}},data:()=>({showFullscreen:!1,dialogHealth:!1,dialogLinkReliability:!1,discoverLoading:!1,routesChanged:!1,returnRoutes:[],Protocols:p,dataRateItems:[{text:"100 Kbps",value:d.ZWave_100k},{text:"40 Kbps",value:d.ZWave_40k},{text:"9.6 Kbps",value:d.ZWave_9k6}],required:o=>!!o||"This field is required"}),computed:{...f(h,["nodes"]),nodeReturnRoutes(){if(!this.node)return null;const o=[...this.node.customSUCReturnRoutes||[]];return this.node.prioritySUCReturnRoute&&o.unshift({...this.node.prioritySUCReturnRoute,isPriority:!0}),o},_value:{get(){return this.value},set(o){this.$emit("input",o)}},lwr(){if(!this.node)return null;const o=this.node.statistics;return!o||!o.lwr?null:this.parseRouteStats(o.lwr)},nlwr(){if(!this.node)return null;const o=this.node.statistics;return!o||!o.nlwr?null:this.parseRouteStats(o.nlwr)},appRoute(){var t;return(t=this.node)!=null&&t.applicationRoute?this.parseRouteStats(this.node.applicationRoute):null},isLongRange(){return this.node?this.node.protocol===p.ZWaveLongRange:!1}},watch:{nodeReturnRoutes:{handler(o){this.returnRoutes=R(o),this.routesChanged=!1},immediate:!0}},methods:{...g(h,["showSnackbar"]),getProtocol:b,zwaveDataRateToString:m,checkMove(o){const{futureIndex:t}=o.draggedContext;return!(this.returnRoutes.some(s=>s.isPriority)&&t===0)},parseRouteStats(o){var l,u;const t=o.repeaterRSSI||[],e=((l=o.repeaters)==null?void 0:l.length)>0?o.repeaters.map((i,v)=>`${i}${t[v]&&!C(t[v])?` (${k(t[v])})`:""}`).join(", "):"None, direct connection",s=((u=o.routeFailedBetween)==null?void 0:u.filter(i=>!!i[0]&&!!i[1]))||[],n=s.length>0?s.map(i=>`${i[0]} --> ${i[1]}`).join(", "):"",r=o.protocolDataRate?y(o.protocolDataRate):"",a=o.routeSpeed?m(o.routeSpeed):"";return[r?{title:"Data Rate",text:r}:null,a?{title:"Route Speed",text:a}:null,{title:"Repeaters",text:e},n?{title:"Route failed between",text:n}:null].filter(i=>!!i)},newWindow(){const o=window.open("#"+S.controllerChart+"/#no-topbar","BG-RSSI-Chart","height=800,width=1200,status=no,toolbar:no,scrollbars:no,menubar:no");window.focus&&o.focus()},async deleteRoute(o){if(!this.node)return;let t="";switch(o){case"appRoute":t="removePriorityRoute";break;case"prioritySUCReturnRoute":case"customSUCReturnRoutes":t="deleteSUCReturnRoutes";break;default:t="";break}if(t&&await this.app.confirm("Delete","Are you sure you want to delete this route?","alert")){const e=await this.app.apiRequest(t,[this.node.id]);e.success&&(e.result?this.showSnackbar("Route deleted","success"):this.showSnackbar(`Failed delete route for node "${this.node._name}"`,"error"))}},async discoverNeighbors(){this.discoverLoading=!0;const o=await this.app.apiRequest("discoverNodeNeighbors",[this.node.id]);this.discoverLoading=!1,o.success&&(o.result?this.showSnackbar("Neighbors updated","success"):this.showSnackbar(`Failed to discover neighbors of node "${this.node._name}"`,"error"))},async getRoute(o){if(!this.node)return;let t="";switch(o){case"appRoute":t="getPriorityRoute";break;case"prioritySUCReturnRoute":t="getPrioritySUCReturnRoute";break;case"customSUCReturnRoutes":t="getCustomSUCReturnRoute";break;default:t="";break}if(!t)return;(await this.app.apiRequest(t,[this.node.id])).success&&this.showSnackbar("Route updated","success")},async promptRoute(o,t,e=!1){const s=[{type:"array",inputType:"autocomplete",list:!0,multiple:!0,prefix:o,suffix:t,key:"repeaters",label:"Repeaters",hint:"Select the nodes that should be used as repeaters starting from the closest to the controller. Empty list means direct route to controller",itemValue:"id",itemText:"_name",default:[],rules:[r=>r.length<=4||"Max 4 repeaters"],items:this.nodes.filter(r=>!r.isControllerNode&&r.isListening&&r.id!==this.node.id)},{type:"list",autocomplete:!0,key:"routeSpeed",label:"Route speed",default:d.ZWave_100k,rules:[this.required],items:this.dataRateItems}];e&&s.push({type:"boolean",key:"isPriority",label:"Priority route",hint:"If enabled, this route will always be used first",default:!1});const n=await this.app.confirm("Set route","","info",{width:500,inputs:s,confirmText:"Set"});return Object.keys(n).length===0?null:n},async getRouteReturnRoutes(){await this.getRoute("prioritySUCReturnRoute"),await this.getRoute("customSUCReturnRoutes")},deleteReturnRoute(o){this.returnRoutes.splice(this.returnRoutes.indexOf(o),1),this.routesChanged=!0},async addReturnRoute(){if(!this.node)return;const o=await this.promptRoute(`Node "${this.node._name}"`,"Controller",!0);if(!o)return;this.routesChanged=!0;const{repeaters:t,routeSpeed:e,isPriority:s}=o;if(s){const n=this.returnRoutes.find(a=>a.isPriority),r={repeaters:t,routeSpeed:e,isPriority:s};if(n){if(!await this.app.confirm("Priority route","You already have a priority route set. Do you want to replace it?","info"))return;this.returnRoutes.splice(this.returnRoutes.indexOf(n),1,r)}else r.isPriority?this.returnRoutes.unshift(r):this.returnRoutes.push(r);return}this.returnRoutes.push({repeaters:t,routeSpeed:e,isPriority:s})},resetReturnRoutes(){this.returnRoutes=R(this.nodeReturnRoutes),this.routesChanged=!1},async setReturnRoutes(){if(!this.node)return;if(this.returnRoutes.length===0){await this.deleteRoute("customSUCReturnRoutes");return}const o=this.returnRoutes.filter(s=>!s.isPriority),t=this.returnRoutes.find(s=>s.isPriority),e=[this.node.id,o.map(s=>({repeaters:s.repeaters,routeSpeed:s.routeSpeed}))];t&&e.push({repeaters:t.repeaters,routeSpeed:t.routeSpeed}),await this.setRoute("customSUCReturnRoutes",e)},async setRoute(o,t){if(!this.node)return;let e="",s="",n="";switch(o){case"appRoute":s="Controller",n=`Node "${this.node._name}"`,e="setPriorityRoute";break;case"prioritySUCReturnRoute":s=`Node "${this.node._name}"`,n="Controller",e="assignPrioritySUCReturnRoute";break;case"customSUCReturnRoutes":s=`Node "${this.node._name}"`,n="Controller",e="assignCustomSUCReturnRoutes";break;default:e="";break}if(!e)return;if(!t){const a=await this.promptRoute(s,n),{repeaters:l,routeSpeed:u}=a;switch(t=[],o){case"appRoute":case"prioritySUCReturnRoute":t=[this.node.id,l,u];break;case"customSUCReturnRoutes":{const i=this.node.customSUCReturnRoutes||[];t=[this.node.id,i]}break}}const r=await this.app.apiRequest(e,t);r.success&&(r.result?this.showSnackbar(`New route set for node "${this.node._name}"`,"success"):this.showSnackbar(`Failed to set route for node "${this.node._name}"`))}}};var $=function(){var t=this,e=t._self._c;return e("v-container",{directives:[{name:"show",rawName:"v-show",value:t._value,expression:"_value"}],staticClass:"pt-0"},[t._value&&t.node?e("v-col",{staticClass:"pa-0 pb-2"},[e("v-subheader",{staticClass:"font-weight-bold",staticStyle:{position:"sticky",top:"0","z-index":"10"}},[t._v("Node properties "),e("v-icon",{staticClass:"close-btn",on:{click:function(s){t._value=!1}}},[t._v("clear")])],1),e("v-list",{staticStyle:{"min-width":"300px",background:"transparent"},attrs:{dense:""}},[e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("ID")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.id))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Status")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.status))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Protocol")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.getProtocol(t.node)))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Code")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.productLabel))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Product")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.productDescription))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Manufacturer")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.manufacturer))])],1),t.node.name?e("v-list-item",[e("v-list-item-content",[t._v("Name")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.name))])],1):t._e(),t.node.loc?e("v-list-item",[e("v-list-item-content",[t._v("Location")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.loc))])],1):t._e(),t.node.neighbors&&!t.isLongRange?e("v-list-item",[e("v-list-item-content",[t._v("Neighbors")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.neighbors.length>0?t.node.neighbors.join(", "):"None")+" ")]),t.node.isControllerNode?t._e():e("v-list-item-action",[e("v-btn",{staticClass:"ml-2",attrs:{color:"primary","x-small":"",loading:t.discoverLoading,dark:""},on:{click:function(s){return t.discoverNeighbors()}}},[t._v("Discover "),e("v-icon",{attrs:{"x-small":""}},[t._v("search")])],1)],1)],1):t._e(),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Statistics")]),e("v-list-item-content",{staticClass:"align-end"},[e("statistics-arrows",{attrs:{"inactive-color":"black",node:t.node}})],1)],1),!t.node.isControllerNode&&!t.isLongRange?e("div",[e("v-subheader",[t._v("Priority route "),t.appRoute?e("v-btn",{staticClass:"ml-2",attrs:{color:"error","x-small":""},on:{click:function(s){return t.deleteRoute("appRoute")}}},[t._v("Delete "),e("v-icon",{attrs:{"x-small":""}},[t._v("delete")])],1):t._e(),e("v-btn",{staticClass:"ml-2",attrs:{color:"success","x-small":"",dark:""},on:{click:function(s){return t.getRoute("appRoute")}}},[t._v("Get "),e("v-icon",{attrs:{"x-small":""}},[t._v("refresh")])],1),e("v-btn",{staticClass:"ml-2",attrs:{color:"purple","x-small":"",dark:""},on:{click:function(s){return t.setRoute("appRoute")}}},[t._v("Set "),e("v-icon",{attrs:{"x-small":""}},[t._v("route")])],1)],1),t.appRoute&&!t.isLongRange?e("div",{staticClass:"text-caption"},t._l(t.appRoute,function(s,n){return e("v-list-item",{key:n,attrs:{dense:""}},[e("v-list-item-content",[t._v(t._s(s.title))]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(s.text))])],1)}),1):e("p",{staticClass:"text-center"},[t._v("None")])],1):t._e(),!t.node.isControllerNode&&!t.isLongRange?e("div",[e("v-subheader",[t._v("Return routes "),t.routesChanged?t._e():e("v-btn",{staticClass:"ml-2",attrs:{color:"success","x-small":"",dark:""},on:{click:function(s){return t.getRouteReturnRoutes()}}},[t._v("Get "),e("v-icon",{attrs:{"x-small":""}},[t._v("refresh")])],1),e("v-btn",{staticClass:"ml-2",attrs:{disabled:t.returnRoutes.length===4,color:"purple","x-small":"",dark:""},on:{click:function(s){return t.addReturnRoute()}}},[t._v("Add "),e("v-icon",{attrs:{"x-small":""}},[t._v("route")])],1)],1),e("div",[t.returnRoutes.length>0?e("div",[e("table",{staticClass:"fill-width"},[e("thead",{staticClass:"text-caption text-center font-weight-bold"},[e("tr",[e("th"),e("th",[t._v("Repeaters")]),e("th",[t._v("Speed")]),e("th",[t._v("Priority")]),e("th")])]),e("draggable",{attrs:{handle:".handle",move:t.checkMove,tag:"tbody"},on:{change:function(s){t.routesChanged=!0}},model:{value:t.returnRoutes,callback:function(s){t.returnRoutes=s},expression:"returnRoutes"}},t._l(t.returnRoutes,function(s,n){return e("tr",{key:`returnRoute_${n}`,staticClass:"text-caption text-center",attrs:{dense:""}},[e("td",[s.isPriority?t._e():e("v-icon",{staticClass:"handle",staticStyle:{cursor:"move"},attrs:{color:"primary lighten-2"}},[t._v("drag_indicator")])],1),e("td",[t._v(" "+t._s(s.repeaters.length>0?s.repeaters.join(", "):"Direct connection")+" ")]),e("td",[t._v(" "+t._s(t.zwaveDataRateToString(s.routeSpeed))+" ")]),e("td",[s.isPriority?e("v-icon",{attrs:{color:"success",small:""}},[t._v("check")]):t._e()],1),e("td",[e("v-icon",{attrs:{color:"error",small:""},on:{click:function(r){return t.deleteReturnRoute(s)}}},[t._v("delete")])],1),e("td")])}),0)],1)]):e("div",[e("p",{staticClass:"text-center"},[t._v("None")])]),e("v-row",{attrs:{dense:""}},[t.routesChanged?e("v-btn",{staticClass:"ma-2",attrs:{color:"success","x-small":"",dark:""},on:{click:function(s){return t.setReturnRoutes()}}},[t._v("Save "),e("v-icon",{attrs:{"x-small":""}},[t._v("save")])],1):t._e(),t.routesChanged?e("v-btn",{staticClass:"ma-2",attrs:{color:"error","x-small":"",dark:""},on:{click:function(s){return t.resetReturnRoutes()}}},[t._v("Reset "),e("v-icon",{attrs:{"x-small":""}},[t._v("clear")])],1):t._e()],1)],1)],1):t._e()],1),t.node.isControllerNode?e("v-row",{staticClass:"mt-1",attrs:{justify:"center"}},[e("v-btn",{attrs:{color:"primary",small:"",rounded:""},on:{click:function(s){t.showFullscreen=!0}}},[t._v("Full Screen "),e("v-icon",{attrs:{small:""}},[t._v("fullscreen")])],1),e("v-btn",{staticClass:"ml-2",attrs:{small:"",color:"warning",rounded:""},on:{click:function(s){return t.newWindow()}}},[t._v("Open "),e("v-icon",{attrs:{small:""}},[t._v("open_in_new")])],1),e("bg-rssi-chart",{staticClass:"mt-2",attrs:{node:t.node}})],1):e("v-row",{staticClass:"mt-1 pa-0 text-center",attrs:{justify:"center"}},[e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"primary",small:"",rounded:""},on:{click:function(s){t.dialogHealth=!0}}},[t._v("Diagnose "),e("v-icon",[t._v("monitor_heart")])],1)],1),e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"purple",small:"",rounded:""},on:{click:function(s){t.dialogLinkReliability=!0}}},[t._v("Link Statistics "),e("v-icon",[t._v("leak_add")])],1)],1),t.isLongRange?t._e():e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"error",small:"",rounded:""},on:{click:function(s){return t.rebuildNodeRoutes(t.node)}}},[t._v("Rebuild Routes "),e("v-icon",[t._v("heart_broken")])],1)],1),e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"success",small:"",rounded:""},on:{click:function(s){return t.pingNode(t.node)}}},[t._v("Ping "),e("v-icon",[t._v("settings_ethernet")])],1)],1)],1)],1):t._e(),t.node&&!t.node.isControllerNode?e("dialog-health-check",{attrs:{socket:t.socket,node:t.node},on:{close:function(s){t.dialogHealth=!1}},model:{value:t.dialogHealth,callback:function(s){t.dialogHealth=s},expression:"dialogHealth"}}):t._e(),t.node&&!t.node.isControllerNode?e("dialog-link-reliability",{attrs:{socket:t.socket,node:t.node},on:{close:function(s){t.dialogLinkReliability=!1}},model:{value:t.dialogLinkReliability,callback:function(s){t.dialogLinkReliability=s},expression:"dialogLinkReliability"}}):t._e(),e("v-dialog",{attrs:{fullscreen:"",persistent:"","z-index":"9999"},on:{keydown:function(s){if(!s.type.indexOf("key")&&t._k(s.keyCode,"esc",27,s.key,["Esc","Escape"]))return null;t.showFullscreen=!1}},model:{value:t.showFullscreen,callback:function(s){t.showFullscreen=s},expression:"showFullscreen"}},[t.node&&t.node.isControllerNode?e("v-card",[e("v-card-text",{staticClass:"pt-4"},[e("v-btn",{staticStyle:{position:"absolute",top:"10px",right:"10px"},attrs:{icon:""},on:{click:function(s){t.showFullscreen=!1}}},[e("v-icon",[t._v("close")])],1),e("bg-rssi-chart",{attrs:{node:t.node,"fill-size":""}})],1)],1):t._e()],1)],1)},N=[],L=w(P,$,N,!1,null,"6fa5c841");const F=L.exports;export{F as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./StatisticsArrows-D4Sns3SB.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css","./BgRssiChart-BzwKB6k4.js","./BgRssiChart-D1GxaB_c.css","./DialogHealthCheck-DlpKycg1.js","./DialogHealthCheck-BQ_HIZzk.css","./DialogLinkReliability-DYpt6DT2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{I as _,_ as c,P as p,ai as d,m as f,u as h,c as R,a as g,k as b,an as m,al as C,am as k,ah as y,R as S,n as w}from"./index-CUO-mWDv.js";import{d as x}from"./vuedraggable.umd-DTxxsq3J.js";const P={mixins:[_],components:{StatisticsArrows:()=>c(()=>import("./StatisticsArrows-D4Sns3SB.js"),__vite__mapDeps([0,1,2]),import.meta.url),BgRssiChart:()=>c(()=>import("./BgRssiChart-BzwKB6k4.js"),__vite__mapDeps([3,1,2,4]),import.meta.url),DialogHealthCheck:()=>c(()=>import("./DialogHealthCheck-DlpKycg1.js"),__vite__mapDeps([5,1,2,6]),import.meta.url),DialogLinkReliability:()=>c(()=>import("./DialogLinkReliability-DYpt6DT2.js"),__vite__mapDeps([7,1,2,6]),import.meta.url),draggable:x},props:{value:{type:Boolean,default:!1},node:{type:Object,default:()=>null},socket:{type:Object}},data:()=>({showFullscreen:!1,dialogHealth:!1,dialogLinkReliability:!1,discoverLoading:!1,routesChanged:!1,returnRoutes:[],Protocols:p,dataRateItems:[{text:"100 Kbps",value:d.ZWave_100k},{text:"40 Kbps",value:d.ZWave_40k},{text:"9.6 Kbps",value:d.ZWave_9k6}],required:o=>!!o||"This field is required"}),computed:{...f(h,["nodes"]),nodeReturnRoutes(){if(!this.node)return null;const o=[...this.node.customSUCReturnRoutes||[]];return this.node.prioritySUCReturnRoute&&o.unshift({...this.node.prioritySUCReturnRoute,isPriority:!0}),o},_value:{get(){return this.value},set(o){this.$emit("input",o)}},lwr(){if(!this.node)return null;const o=this.node.statistics;return!o||!o.lwr?null:this.parseRouteStats(o.lwr)},nlwr(){if(!this.node)return null;const o=this.node.statistics;return!o||!o.nlwr?null:this.parseRouteStats(o.nlwr)},appRoute(){var t;return(t=this.node)!=null&&t.applicationRoute?this.parseRouteStats(this.node.applicationRoute):null},isLongRange(){return this.node?this.node.protocol===p.ZWaveLongRange:!1}},watch:{nodeReturnRoutes:{handler(o){this.returnRoutes=R(o),this.routesChanged=!1},immediate:!0}},methods:{...g(h,["showSnackbar"]),getProtocol:b,zwaveDataRateToString:m,checkMove(o){const{futureIndex:t}=o.draggedContext;return!(this.returnRoutes.some(s=>s.isPriority)&&t===0)},parseRouteStats(o){var l,u;const t=o.repeaterRSSI||[],e=((l=o.repeaters)==null?void 0:l.length)>0?o.repeaters.map((i,v)=>`${i}${t[v]&&!C(t[v])?` (${k(t[v])})`:""}`).join(", "):"None, direct connection",s=((u=o.routeFailedBetween)==null?void 0:u.filter(i=>!!i[0]&&!!i[1]))||[],n=s.length>0?s.map(i=>`${i[0]} --> ${i[1]}`).join(", "):"",r=o.protocolDataRate?y(o.protocolDataRate):"",a=o.routeSpeed?m(o.routeSpeed):"";return[r?{title:"Data Rate",text:r}:null,a?{title:"Route Speed",text:a}:null,{title:"Repeaters",text:e},n?{title:"Route failed between",text:n}:null].filter(i=>!!i)},newWindow(){const o=window.open("#"+S.controllerChart+"/#no-topbar","BG-RSSI-Chart","height=800,width=1200,status=no,toolbar:no,scrollbars:no,menubar:no");window.focus&&o.focus()},async deleteRoute(o){if(!this.node)return;let t="";switch(o){case"appRoute":t="removePriorityRoute";break;case"prioritySUCReturnRoute":case"customSUCReturnRoutes":t="deleteSUCReturnRoutes";break;default:t="";break}if(t&&await this.app.confirm("Delete","Are you sure you want to delete this route?","alert")){const e=await this.app.apiRequest(t,[this.node.id]);e.success&&(e.result?this.showSnackbar("Route deleted","success"):this.showSnackbar(`Failed delete route for node "${this.node._name}"`,"error"))}},async discoverNeighbors(){this.discoverLoading=!0;const o=await this.app.apiRequest("discoverNodeNeighbors",[this.node.id]);this.discoverLoading=!1,o.success&&(o.result?this.showSnackbar("Neighbors updated","success"):this.showSnackbar(`Failed to discover neighbors of node "${this.node._name}"`,"error"))},async getRoute(o){if(!this.node)return;let t="";switch(o){case"appRoute":t="getPriorityRoute";break;case"prioritySUCReturnRoute":t="getPrioritySUCReturnRoute";break;case"customSUCReturnRoutes":t="getCustomSUCReturnRoute";break;default:t="";break}if(!t)return;(await this.app.apiRequest(t,[this.node.id])).success&&this.showSnackbar("Route updated","success")},async promptRoute(o,t,e=!1){const s=[{type:"array",inputType:"autocomplete",list:!0,multiple:!0,prefix:o,suffix:t,key:"repeaters",label:"Repeaters",hint:"Select the nodes that should be used as repeaters starting from the closest to the controller. Empty list means direct route to controller",itemValue:"id",itemText:"_name",default:[],rules:[r=>r.length<=4||"Max 4 repeaters"],items:this.nodes.filter(r=>!r.isControllerNode&&r.isListening&&r.id!==this.node.id)},{type:"list",autocomplete:!0,key:"routeSpeed",label:"Route speed",default:d.ZWave_100k,rules:[this.required],items:this.dataRateItems}];e&&s.push({type:"boolean",key:"isPriority",label:"Priority route",hint:"If enabled, this route will always be used first",default:!1});const n=await this.app.confirm("Set route","","info",{width:500,inputs:s,confirmText:"Set"});return Object.keys(n).length===0?null:n},async getRouteReturnRoutes(){await this.getRoute("prioritySUCReturnRoute"),await this.getRoute("customSUCReturnRoutes")},deleteReturnRoute(o){this.returnRoutes.splice(this.returnRoutes.indexOf(o),1),this.routesChanged=!0},async addReturnRoute(){if(!this.node)return;const o=await this.promptRoute(`Node "${this.node._name}"`,"Controller",!0);if(!o)return;this.routesChanged=!0;const{repeaters:t,routeSpeed:e,isPriority:s}=o;if(s){const n=this.returnRoutes.find(a=>a.isPriority),r={repeaters:t,routeSpeed:e,isPriority:s};if(n){if(!await this.app.confirm("Priority route","You already have a priority route set. Do you want to replace it?","info"))return;this.returnRoutes.splice(this.returnRoutes.indexOf(n),1,r)}else r.isPriority?this.returnRoutes.unshift(r):this.returnRoutes.push(r);return}this.returnRoutes.push({repeaters:t,routeSpeed:e,isPriority:s})},resetReturnRoutes(){this.returnRoutes=R(this.nodeReturnRoutes),this.routesChanged=!1},async setReturnRoutes(){if(!this.node)return;if(this.returnRoutes.length===0){await this.deleteRoute("customSUCReturnRoutes");return}const o=this.returnRoutes.filter(s=>!s.isPriority),t=this.returnRoutes.find(s=>s.isPriority),e=[this.node.id,o.map(s=>({repeaters:s.repeaters,routeSpeed:s.routeSpeed}))];t&&e.push({repeaters:t.repeaters,routeSpeed:t.routeSpeed}),await this.setRoute("customSUCReturnRoutes",e)},async setRoute(o,t){if(!this.node)return;let e="",s="",n="";switch(o){case"appRoute":s="Controller",n=`Node "${this.node._name}"`,e="setPriorityRoute";break;case"prioritySUCReturnRoute":s=`Node "${this.node._name}"`,n="Controller",e="assignPrioritySUCReturnRoute";break;case"customSUCReturnRoutes":s=`Node "${this.node._name}"`,n="Controller",e="assignCustomSUCReturnRoutes";break;default:e="";break}if(!e)return;if(!t){const a=await this.promptRoute(s,n),{repeaters:l,routeSpeed:u}=a;switch(t=[],o){case"appRoute":case"prioritySUCReturnRoute":t=[this.node.id,l,u];break;case"customSUCReturnRoutes":{const i=this.node.customSUCReturnRoutes||[];t=[this.node.id,i]}break}}const r=await this.app.apiRequest(e,t);r.success&&(r.result?this.showSnackbar(`New route set for node "${this.node._name}"`,"success"):this.showSnackbar(`Failed to set route for node "${this.node._name}"`))}}};var $=function(){var t=this,e=t._self._c;return e("v-container",{directives:[{name:"show",rawName:"v-show",value:t._value,expression:"_value"}],staticClass:"pt-0"},[t._value&&t.node?e("v-col",{staticClass:"pa-0 pb-2"},[e("v-subheader",{staticClass:"font-weight-bold",staticStyle:{position:"sticky",top:"0","z-index":"10"}},[t._v("Node properties "),e("v-icon",{staticClass:"close-btn",on:{click:function(s){t._value=!1}}},[t._v("clear")])],1),e("v-list",{staticStyle:{"min-width":"300px",background:"transparent"},attrs:{dense:""}},[e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("ID")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.id))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Status")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.status))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Protocol")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.getProtocol(t.node)))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Code")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.productLabel))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Product")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.productDescription))])],1),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Manufacturer")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.manufacturer))])],1),t.node.name?e("v-list-item",[e("v-list-item-content",[t._v("Name")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.name))])],1):t._e(),t.node.loc?e("v-list-item",[e("v-list-item-content",[t._v("Location")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.loc))])],1):t._e(),t.node.neighbors&&!t.isLongRange?e("v-list-item",[e("v-list-item-content",[t._v("Neighbors")]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(t.node.neighbors.length>0?t.node.neighbors.join(", "):"None")+" ")]),t.node.isControllerNode?t._e():e("v-list-item-action",[e("v-btn",{staticClass:"ml-2",attrs:{color:"primary","x-small":"",loading:t.discoverLoading,dark:""},on:{click:function(s){return t.discoverNeighbors()}}},[t._v("Discover "),e("v-icon",{attrs:{"x-small":""}},[t._v("search")])],1)],1)],1):t._e(),e("v-list-item",{attrs:{dense:""}},[e("v-list-item-content",[t._v("Statistics")]),e("v-list-item-content",{staticClass:"align-end"},[e("statistics-arrows",{attrs:{"inactive-color":"black",node:t.node}})],1)],1),!t.node.isControllerNode&&!t.isLongRange?e("div",[e("v-subheader",[t._v("Priority route "),t.appRoute?e("v-btn",{staticClass:"ml-2",attrs:{color:"error","x-small":""},on:{click:function(s){return t.deleteRoute("appRoute")}}},[t._v("Delete "),e("v-icon",{attrs:{"x-small":""}},[t._v("delete")])],1):t._e(),e("v-btn",{staticClass:"ml-2",attrs:{color:"success","x-small":"",dark:""},on:{click:function(s){return t.getRoute("appRoute")}}},[t._v("Get "),e("v-icon",{attrs:{"x-small":""}},[t._v("refresh")])],1),e("v-btn",{staticClass:"ml-2",attrs:{color:"purple","x-small":"",dark:""},on:{click:function(s){return t.setRoute("appRoute")}}},[t._v("Set "),e("v-icon",{attrs:{"x-small":""}},[t._v("route")])],1)],1),t.appRoute&&!t.isLongRange?e("div",{staticClass:"text-caption"},t._l(t.appRoute,function(s,n){return e("v-list-item",{key:n,attrs:{dense:""}},[e("v-list-item-content",[t._v(t._s(s.title))]),e("v-list-item-content",{staticClass:"align-end"},[t._v(t._s(s.text))])],1)}),1):e("p",{staticClass:"text-center"},[t._v("None")])],1):t._e(),!t.node.isControllerNode&&!t.isLongRange?e("div",[e("v-subheader",[t._v("Return routes "),t.routesChanged?t._e():e("v-btn",{staticClass:"ml-2",attrs:{color:"success","x-small":"",dark:""},on:{click:function(s){return t.getRouteReturnRoutes()}}},[t._v("Get "),e("v-icon",{attrs:{"x-small":""}},[t._v("refresh")])],1),e("v-btn",{staticClass:"ml-2",attrs:{disabled:t.returnRoutes.length===4,color:"purple","x-small":"",dark:""},on:{click:function(s){return t.addReturnRoute()}}},[t._v("Add "),e("v-icon",{attrs:{"x-small":""}},[t._v("route")])],1)],1),e("div",[t.returnRoutes.length>0?e("div",[e("table",{staticClass:"fill-width"},[e("thead",{staticClass:"text-caption text-center font-weight-bold"},[e("tr",[e("th"),e("th",[t._v("Repeaters")]),e("th",[t._v("Speed")]),e("th",[t._v("Priority")]),e("th")])]),e("draggable",{attrs:{handle:".handle",move:t.checkMove,tag:"tbody"},on:{change:function(s){t.routesChanged=!0}},model:{value:t.returnRoutes,callback:function(s){t.returnRoutes=s},expression:"returnRoutes"}},t._l(t.returnRoutes,function(s,n){return e("tr",{key:`returnRoute_${n}`,staticClass:"text-caption text-center",attrs:{dense:""}},[e("td",[s.isPriority?t._e():e("v-icon",{staticClass:"handle",staticStyle:{cursor:"move"},attrs:{color:"primary lighten-2"}},[t._v("drag_indicator")])],1),e("td",[t._v(" "+t._s(s.repeaters.length>0?s.repeaters.join(", "):"Direct connection")+" ")]),e("td",[t._v(" "+t._s(t.zwaveDataRateToString(s.routeSpeed))+" ")]),e("td",[s.isPriority?e("v-icon",{attrs:{color:"success",small:""}},[t._v("check")]):t._e()],1),e("td",[e("v-icon",{attrs:{color:"error",small:""},on:{click:function(r){return t.deleteReturnRoute(s)}}},[t._v("delete")])],1),e("td")])}),0)],1)]):e("div",[e("p",{staticClass:"text-center"},[t._v("None")])]),e("v-row",{attrs:{dense:""}},[t.routesChanged?e("v-btn",{staticClass:"ma-2",attrs:{color:"success","x-small":"",dark:""},on:{click:function(s){return t.setReturnRoutes()}}},[t._v("Save "),e("v-icon",{attrs:{"x-small":""}},[t._v("save")])],1):t._e(),t.routesChanged?e("v-btn",{staticClass:"ma-2",attrs:{color:"error","x-small":"",dark:""},on:{click:function(s){return t.resetReturnRoutes()}}},[t._v("Reset "),e("v-icon",{attrs:{"x-small":""}},[t._v("clear")])],1):t._e()],1)],1)],1):t._e()],1),t.node.isControllerNode?e("v-row",{staticClass:"mt-1",attrs:{justify:"center"}},[e("v-btn",{attrs:{color:"primary",small:"",rounded:""},on:{click:function(s){t.showFullscreen=!0}}},[t._v("Full Screen "),e("v-icon",{attrs:{small:""}},[t._v("fullscreen")])],1),e("v-btn",{staticClass:"ml-2",attrs:{small:"",color:"warning",rounded:""},on:{click:function(s){return t.newWindow()}}},[t._v("Open "),e("v-icon",{attrs:{small:""}},[t._v("open_in_new")])],1),e("bg-rssi-chart",{staticClass:"mt-2",attrs:{node:t.node}})],1):e("v-row",{staticClass:"mt-1 pa-0 text-center",attrs:{justify:"center"}},[e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"primary",small:"",rounded:""},on:{click:function(s){t.dialogHealth=!0}}},[t._v("Diagnose "),e("v-icon",[t._v("monitor_heart")])],1)],1),e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"purple",small:"",rounded:""},on:{click:function(s){t.dialogLinkReliability=!0}}},[t._v("Link Statistics "),e("v-icon",[t._v("leak_add")])],1)],1),t.isLongRange?t._e():e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"error",small:"",rounded:""},on:{click:function(s){return t.rebuildNodeRoutes(t.node)}}},[t._v("Rebuild Routes "),e("v-icon",[t._v("heart_broken")])],1)],1),e("v-col",{staticClass:"pa-1"},[e("v-btn",{attrs:{color:"success",small:"",rounded:""},on:{click:function(s){return t.pingNode(t.node)}}},[t._v("Ping "),e("v-icon",[t._v("settings_ethernet")])],1)],1)],1)],1):t._e(),t.node&&!t.node.isControllerNode?e("dialog-health-check",{attrs:{socket:t.socket,node:t.node},on:{close:function(s){t.dialogHealth=!1}},model:{value:t.dialogHealth,callback:function(s){t.dialogHealth=s},expression:"dialogHealth"}}):t._e(),t.node&&!t.node.isControllerNode?e("dialog-link-reliability",{attrs:{socket:t.socket,node:t.node},on:{close:function(s){t.dialogLinkReliability=!1}},model:{value:t.dialogLinkReliability,callback:function(s){t.dialogLinkReliability=s},expression:"dialogLinkReliability"}}):t._e(),e("v-dialog",{attrs:{fullscreen:"",persistent:"","z-index":"9999"},on:{keydown:function(s){if(!s.type.indexOf("key")&&t._k(s.keyCode,"esc",27,s.key,["Esc","Escape"]))return null;t.showFullscreen=!1}},model:{value:t.showFullscreen,callback:function(s){t.showFullscreen=s},expression:"showFullscreen"}},[t.node&&t.node.isControllerNode?e("v-card",[e("v-card-text",{staticClass:"pt-4"},[e("v-btn",{staticStyle:{position:"absolute",top:"10px",right:"10px"},attrs:{icon:""},on:{click:function(s){t.showFullscreen=!1}}},[e("v-icon",[t._v("close")])],1),e("bg-rssi-chart",{attrs:{node:t.node,"fill-size":""}})],1)],1):t._e()],1)],1)},N=[],L=w(P,$,N,!1,null,"6fa5c841");const F=L.exports;export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n,aw as i,ar as u,ax as l,a as d,u as c,c as h,n as p}from"./index-
|
|
1
|
+
import{I as n,aw as i,ar as u,ax as l,a as d,u as c,c as h,n as p}from"./index-CUO-mWDv.js";const y=[{text:"January",value:1},{text:"February",value:2},{text:"March",value:3},{text:"April",value:4},{text:"May",value:5},{text:"June",value:6},{text:"July",value:7},{text:"August",value:8},{text:"September",value:9},{text:"October",value:10},{text:"November",value:11},{text:"December",value:12}],m={mixins:[n],props:{node:Object,user:Object,activeMode:String},data(){return{mode:"daily",weekdays:Object.keys(i).map(t=>({text:t,value:i[t]})).filter(t=>typeof t.value=="number"),loading:!1,rules:{required:t=>{let e=!1;return t instanceof Array?e=t.length>0:e=!!t||t===0,e||"This field is required."},positive:t=>t>0||"Value must be positive."}}},computed:{schedule(){return this.node.schedule[this.mode||"daily"]},supportedModes(){return this.modes.filter(t=>this.node.schedule[t.value].numSlots>0)},modes(){const t=[{text:"Daily",value:"daily"},{text:"Weekly",value:"weekly"},{text:"Yearly",value:"yearly"}];for(const e of t)this.activeMode!==e.value&&(e.text=`${e.text} (disabled)`);return t},items(){const t=[];for(const e of this.user.schedule.slots){if(e.type!==this.mode)continue;let s={slotId:e.slotId,start:"",end:"",slot:e};switch(this.mode){case"daily":s.weekdays=e.weekdays.map(a=>u(i,a)),s.start=`${l(e.startHour,2)}:${l(e.startMinute,2)}`,s.duration=`${e.durationHour}h ${e.durationMinute}m`;break;case"weekly":s.weekday=u(i,e.weekday),s.start=`${l(e.startHour,2)}:${l(e.startMinute,2)}`,s.stop=`${l(e.stopHour,2)}:${l(e.stopMinute,2)}`;break;case"yearly":s.start=new Date(2e3+e.startYear,e.startMonth-1,e.startDay,e.startHour,e.startMinute).toLocaleString(),s.stop=new Date(2e3+e.stopYear,e.stopMonth-1,e.stopDay,e.stopHour,e.stopMinute).toLocaleString();break}t.push(s)}return t},headers(){let t=[{text:"Slot Id",value:"slotId"},{text:"Start",value:"start"}];switch(this.mode){case"daily":t=[...t,{text:"Weekdays",value:"weekdays"},{text:"Duration",value:"duration"}];break;case"weekly":t=[...t,{text:"Weekday",value:"weekday"},{text:"Stop",value:"stop"}];break;case"yearly":t=[...t,{text:"Stop",value:"stop"}];break}return t.push({text:"Actions",value:"actions",sortable:!1}),t}},mounted(){this.mode=this.activeMode||"daily"},methods:{...d(c,["showSnackbar"]),validSlot(t,e){return!this.items.some(s=>s.slotId===e.slotId)||"Slot already exists"},async enableMode(){(await this.app.apiRequest("setSchedule",[this.node.id,this.mode,{...this.items[0].slot,type:void 0}])).success&&this.showSnackbar(`Mode ${this.mode} enabled`,"success")},async refresh(){const t=await this.app.confirm("Refresh schedules","Do you want to query the schedules from the device or to get them from the cache? Querying from the device may take a while but will always return the latest schedules stored on it.","info",{confirmText:"Query",cancelText:"Cache"});this.loading=!0;const e=await this.app.apiRequest("getSchedules",[this.node.id,{mode:this.mode,fromCache:!t}]);this.loading=!1,e.success&&this.showSnackbar("Schedules updated","success")},async cancel(){(await this.app.apiRequest("cancelGetSchedule",[])).success&&(this.loading=!1,this.showSnackbar("Schedule cancelled","success"))},async removeSlot(t){(await this.app.apiRequest("setSchedule",[this.node.id,this.mode,{slotId:t.slotId,userId:this.user.id}])).success&&this.showSnackbar("Slot removed","success")},getInputs(t){const e=this.schedule.numSlots,s=new Date().getFullYear(),a={slotId:{type:"list",autocomplete:!0,key:"slotId",label:"Slot Id",default:1,cols:6,rules:[this.rules.required,this.validSlot],items:[...Array(e).keys()].map(r=>r+1)},weekdays:{type:"list",autocomplete:!0,key:"weekdays",label:"Weekdays",default:this.weekdays.map(r=>r.value),rules:[this.rules.required],items:this.weekdays,multiple:!0},startHour:{type:"list",autocomplete:!0,key:"startHour",label:"Start Hour",default:0,cols:6,rules:[this.rules.required],items:[...Array(24).keys()]},startMinute:{type:"list",autocomplete:!0,key:"startMinute",label:"Start Minute",default:0,cols:6,rules:[this.rules.required],items:[...Array(60).keys()]},durationHour:{type:"list",autocomplete:!0,key:"durationHour",label:"Duration Hour",cols:6,default:0,rules:[this.rules.required],items:[...Array(24).keys()]},durationMinute:{type:"list",autocomplete:!0,key:"durationMinute",label:"Duration Minute",default:0,cols:6,rules:[this.rules.required],items:[...Array(60).keys()]},startYear:{type:"list",autocomplete:!0,key:"startYear",label:"Start Year",default:0,cols:6,rules:[this.rules.required],items:[...Array(100).keys()].map(r=>r+2e3).filter(r=>r>=s)},startMonth:{type:"list",autocomplete:!0,key:"startMonth",label:"Start Month",default:1,cols:6,rules:[this.rules.required],items:y},startDay:{type:"list",autocomplete:!0,key:"startDay",label:"Start Day",default:1,cols:6,rules:[this.rules.required],items:[...Array(31).keys()].map(r=>r+1)}};let o=[];return this.mode==="daily"?o=[a.weekdays,a.startHour,a.startMinute,a.durationHour,a.durationMinute]:this.mode==="weekly"?o=[{...a.weekdays,key:"weekday",multiple:!1,default:1},a.startHour,a.startMinute,{...a.startHour,key:"stopHour",label:"Stop Hour"},{...a.startMinute,key:"stopMinute",label:"Stop Minute"}]:this.mode==="yearly"&&(o=[a.startYear,a.startMonth,a.startDay,a.startHour,a.startMinute,{...a.startYear,key:"stopYear",label:"Stop Year"},{...a.startMonth,key:"stopMonth",label:"Stop Month"},{...a.startDay,key:"stopDay",label:"Stop Day"},{...a.startHour,key:"stopHour",label:"Stop Hour"},{...a.startMinute,key:"stopMinute",label:"Stop Minute"}]),t||o.unshift(a.slotId),o},async editSlot(t){let e={};t&&(e=h(t),e.startYear&&(e.startYear+=2e3,e.stopYear+=2e3));const s=await this.app.confirm(t?"Edit slot":"New slot","","info",{width:900,inputs:this.getInputs(t),confirmText:t?"Edit":"Add",values:e});if(Object.keys(s).length===0)return;t&&(s.slotId=t.slotId),s.startYear&&(s.startYear-=2e3,s.stopYear-=2e3),t&&Object.assign(t,s),(await this.app.apiRequest("setSchedule",[this.node.id,this.mode,{...s,userId:this.user.id}])).success&&this.showSnackbar("Slot saved","success")}}};var f=function(){var e=this,s=e._self._c;return s("v-container",{attrs:{"grid-list-md":""}},[s("v-row",{attrs:{justify:"center"}},[s("v-select",{staticClass:"ma-2",staticStyle:{"max-width":"200px"},attrs:{dense:"",items:e.supportedModes,"persistent-hint":"",hint:`Max slots: ${this.schedule.numSlots}`},model:{value:e.mode,callback:function(a){e.mode=a},expression:"mode"}})],1),s("v-row",{staticClass:"pa-1",attrs:{justify:"center"}},[s("v-data-table",{attrs:{headers:e.headers,items:e.items,"item-key":"id",loading:e.loading,dense:"","mobile-breakpoint":0},scopedSlots:e._u([{key:"top",fn:function(){return[e.loading?s("v-btn",{staticClass:"mb-2",attrs:{small:"",outlined:"",text:"",color:"error"},on:{click:function(a){return e.cancel()}}},[e._v("Stop")]):s("v-btn",{staticClass:"mb-2",attrs:{small:"",outlined:"",text:"",color:"primary"},on:{click:function(a){return e.refresh()}}},[e._v("Refresh")]),s("v-btn",{staticClass:"mb-2",attrs:{small:"",outlined:"",text:"",disabled:e.schedule.numSlots<=e.items.length,color:"success"},on:{click:function(a){return e.editSlot()}}},[e._v("Add")]),e.mode!==e.activeMode&&e.items.length>0?s("v-btn",{staticClass:"mb-2",attrs:{small:"",outlined:"",text:"",color:"warning"},on:{click:function(a){return e.enableMode()}}},[e._v("Enable")]):e._e()]},proxy:!0},{key:"item.actions",fn:function({item:a}){return[s("v-icon",{attrs:{small:"",color:"error"},on:{click:function(o){return e.removeSlot(a.slot)}}},[e._v("delete")]),s("v-icon",{attrs:{small:"",color:"success"},on:{click:function(o){return e.editSlot(a.slot)}}},[e._v("edit")])]}}],null,!0)})],1)],1)},k=[],v=p(m,f,k,!1,null,null);const S=v.exports;export{S as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./FirmwareUpdates-9aRD5YHc.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as t,_ as n,I as o}from"./index-CUO-mWDv.js";const s={components:{FirmwareUpdates:()=>n(()=>import("./FirmwareUpdates-9aRD5YHc.js"),__vite__mapDeps([0,1,2]),import.meta.url)},mixins:[o],props:{node:{type:Object,required:!0},socket:{type:Object,required:!0}},data(){return{}},methods:{async updateFirmware(e){if(await this.app.confirm(`OTA ${e.downgrade?"Downgrade":"Upgrade"}`,`<p>Are you sure you want to ${e.downgrade?"downgrade":"upgrade"} node to <b>v${e.version}</b>?</p>
|
|
3
|
+
|
|
4
|
+
<p><strong>We don't take any responsibility if devices upgraded using Z-Wave JS don't work after an update. Always double-check that the correct update is about to be installed</strong></p>
|
|
5
|
+
|
|
6
|
+
<p>This will download the desired firmware update from the <a href="https://github.com/zwave-js/firmware-updates/">Z-Wave JS firmware update service</a> and start an over-the-air (OTA) firmware update for the given node.</p>
|
|
7
|
+
|
|
8
|
+
`,e.downgrade?"error":"warning",{confirmText:`${e.downgrade?"Downgrade":"Upgrade"}`,cancelText:"Cancel",width:"500px"})){const r=await this.app.apiRequest("firmwareUpdateOTA",[this.node.id,e]);await this.app.handleFwUpdateResponse(r)}}}};var d=function(){var r=this,a=r._self._c;return a("FirmwareUpdates",{attrs:{node:r.node,socket:r.socket,"update-type":"OTA"},on:{"update-firmware":r.updateFirmware}})},i=[],p=t(s,d,i,!1,null,null);const w=p.exports;export{w as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./FirmwareUpdates-9aRD5YHc.js","./index-CUO-mWDv.js","./index-DFE8u6UB.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as a,_ as s,I as n}from"./index-CUO-mWDv.js";const o={components:{FirmwareUpdates:()=>s(()=>import("./FirmwareUpdates-9aRD5YHc.js"),__vite__mapDeps([0,1,2]),import.meta.url)},mixins:[n],props:{node:{type:Object,required:!0},socket:{type:Object,required:!0}},data(){return{showDowngrades:void 0}},methods:{async updateFirmware(t){if(await this.app.confirm("Firmware Upgrade",`<p>Are you sure you want to upgrade your controller to <b>v${t.version}</b>?</p>
|
|
3
|
+
|
|
4
|
+
<p><strong>We don't take any responsibility if devices upgraded using Z-Wave JS don't work after an update. Always double-check that the correct update is about to be installed</strong></p>
|
|
5
|
+
|
|
6
|
+
<p>This will download the desired firmware update from the <a href="https://github.com/zwave-js/firmware-updates/">Z-Wave JS firmware update service</a> and start the upgrade process.</p>
|
|
7
|
+
|
|
8
|
+
`,"warning",{confirmText:"Upgrade",cancelText:"Cancel",width:"500px"})){const e=await this.app.apiRequest("firmwareUpdateOTW",[t]);await this.app.handleFwUpdateResponse(e)}}}};var i=function(){var e=this,r=e._self._c;return r("FirmwareUpdates",{attrs:{node:e.node,socket:e.socket,"hide-targets":!0,"hide-downgrades":!0},on:{"update-firmware":e.updateFirmware}})},d=[],p=a(o,i,d,!1,null,null);const c=p.exports;export{c as default};
|