'+n+' | '+g+' |
'+lang.DeleteMonitorsText+'
'; + $.confirm.body.html(e.html) + $.confirm.click([ + { + title:'Delete Monitors', + class:'btn-danger', + callback:function(){ + $.each(arr,function(n,v){ + $.get($.ccio.init('location',$user)+v.user.auth_token+'/configureMonitor/'+v.ke+'/'+v.mid+'/delete',function(data){ + console.log(data) + }) + }) + } + }, + { + title:'Delete Monitors and Files', + class:'btn-danger', + callback:function(){ + $.each(arr,function(n,v){ + $.get($.ccio.init('location',$user)+v.user.auth_token+'/configureMonitor/'+v.ke+'/'+v.mid+'/delete?deleteFiles=true',function(data){ + console.log(data) + }) + }) + } + } + ]); +}) +//$.multimon.e.find('.edit_all').click(function(){ +// var arr=$.multimon.getSelectedMonitors(); +// var arrObject={} +// if(arr.length===0){ +// $.ccio.init('note',{title:'No Monitors Selected',text:'Select atleast one monitor to delete.',type:'error'}); +// return +// } +// $.multimonedit.selectedList = arr; +// $.multimonedit.e.modal('show') +//}) +$.multimon.e.find('.save_config').click(function(){ + var e={};e.e=$(this); + var arr=$.multimon.getSelectedMonitors(); + if(arr.length===0){ + $.ccio.init('note',{title:'No Monitors Selected',text:'Select atleast one monitor to delete.',type:'error'}); + return + } + e.dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(arr)); + $('#temp').html('') + .find('a') + .attr('href',e.dataStr) + .attr('download','Shinobi_Monitors_'+(new Date())+'.json') + [0].click() +}) +$.multimon.e.on('shown.bs.modal',function() { + var tmp='' + $.each($.ccio.mon,function(n,v){ + var streamURL = $.ccio.init('streamURL',v) + if(streamURL!=='Websocket'&&v.mode!==('idle'&&'stop')){ + streamURL=''+streamURL+'' + } + var img = $('#left_menu [mid="'+v.mid+'"][auth="'+v.user.auth_token+'"] [monitor="watch"]').attr('src') + tmp+='