(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7704b058"],{ab131:function(e,t,i){"use strict";i.r(t);var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("tr",{style:{background:e.props.props.selected?"lightyellow":"",color:e.props.props.selected?"#000":""}},[e.config.config.fieldsSelected?i("td",[i("v-checkbox",{attrs:{primary:"","hide-details":""},model:{value:e.props.props.selected,callback:function(t){e.$set(e.props.props,"selected",t)},expression:"props.props.selected"}})],1):e._e(),i("wi-list-data-table-actions",{attrs:{config:e.config,props:e.props}}),i("td",{staticClass:"justify-center",staticStyle:{cursor:"pointer"},on:{click:function(t){e.props.props.expanded=!e.props.props.expanded}}},[e._v(" "+e._s(e.props.item.device.id)+" ")]),i("td",{staticClass:"justify-center",staticStyle:{cursor:"pointer"},on:{click:function(t){e.props.props.expanded=!e.props.props.expanded}}},[i("span",[e._v(e._s(e.props.item.device.nome_disp))])]),i("td",{staticClass:"justify-center",staticStyle:{cursor:"pointer"},on:{click:function(t){e.props.props.expanded=!e.props.props.expanded}}},[i("div",{staticStyle:{width:"100%","text-align":"center"}},[i("v-icon",{style:{color:e.props.item.device.status_disp?"green":"red"},domProps:{innerHTML:e._s(e.props.item.device.status_disp?"arrow_upward":"arrow_downward")}}),i("br"),i("strong",{domProps:{innerHTML:e._s(e.props.item.device.status_disp?"Disponível":"Indisponível")}})],1)]),i("td",{staticClass:"justify-center",staticStyle:{cursor:"pointer"},on:{click:function(t){e.props.props.expanded=!e.props.props.expanded}}},[i("span",[e._v(e._s(e.props.item.device.ip_disp||"-"))])]),i("td",{staticClass:"justify-center",staticStyle:{cursor:"pointer"},on:{click:function(t){e.props.props.expanded=!e.props.props.expanded}}},[i("span",[e._v(e._s(e.props.item.device.network_names||"-"))])]),i("td",{staticClass:"justify-center",staticStyle:{cursor:"pointer"},on:{click:function(t){e.props.props.expanded=!e.props.props.expanded}}},[e.props.item.created_at?i("span",[e._v(e._s(e._f("moment")(e.props.item.created_at,"DD/MM/YYYY HH:mm:ss")))]):i("span",[e._v("- - -")])]),i("td",{staticClass:"justify-center"},[i("v-btn",{attrs:{small:"",outline:""},on:{click:function(t){return e.addDeviceChilds()}}},[e._v(" Adicionar Interfaces ")]),i("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var s=t.on;return[i("div",e._g({},s),[i("v-btn",{attrs:{disabled:!e.pingIsAvaiable(e.props.item.device),small:"",outline:""},on:{click:function(t){return e.pingDialogAction(!0,e.props.item.device.servidor_dados_id,e.props.item.ip_disp)}}},[i("v-icon",[e._v("invert_colors")]),e._v(" Pingar ")],1)],1)]}}])},[e.pingIsAvaiable(e.props.item.device)?i("span",[e._v("Clique para pingar este dispositivo.")]):i("span",[e._v("O servidor deste dispositivo está offline ou desatualizado.")])]),e.pingDialog.active?i("ping-dialog",{attrs:{"network-server-id":e.pingDialog.server,"host-to-ping":e.pingDialog.host,active:e.pingDialog.active},on:{active:e.pingDialogAction}}):e._e()],1)],1)},o=[],p=i("b150"),n=i("60f1"),r={name:"NetworkDevices",data:function(){return{pingDialog:{active:!1,host:null,server:null}}},methods:{pingDialogAction:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pingDialog.host=i,this.pingDialog.server=t,this.pingDialog.active=e},pingIsAvaiable:function(e){return e.network_server.status&&e.network_server.last_interaction_in_minutes<5},addDeviceChilds:function(){this.$WiEditDialog({wiConfig:"ticket-device-child",data:{device_id:this.props.item.device.id,ticket_id:this.$route.params.id},redirectOnSubmit:!1})}},mounted:function(){console.log(this.props.item)},props:{config:Object,props:Object},components:{WiListDataTableActions:p["a"],PingDialog:n["a"]}},a=r,c=i("2877"),d=Object(c["a"])(a,s,o,!1,null,null,null);t["default"]=d.exports}}]); //# sourceMappingURL=chunk-7704b058.a074210a.js.map