function searchByOnline(state){
window.location.href = "/tssw/shellInfo/list?state="+state;
}
function searchByAccount() {
window.location.href = "/tssw/shellInfo/list?account="+$("#account").val();
}
function add() {
window.location.href = "/tssw/shellInfo/edit";
}
function view(id) {
window.location.href = "/tssw/shellInfo/view?id="+id;
}
function edit(id){
window.location.href = "/tssw/appInfo/edit?id="+id;
}
function del(id) {
if(confirm('你确定要删除吗,删除同时会取消该指令下发?')) {
window.location.href = "/tssw/shellInfo/del?id=" + id;
}
}
function restartShell(id) {
if(confirm('你确定要重新下发指令吗?')) {
$.ajax({
url: "/tssw/shellInfo/restart?id=" + id,
//data: {},
type: "GET",
//dataType: "json",
success: function(data) {
toastr.success("【成功】已重新下发指令");
$("#"+id).html('已重新下发');
}
});
}
}
function cancelShell(id) {
if(confirm('你确定要取消指令下发吗?')) {
$.ajax({
url: "/tssw/shellInfo/cancel?id=" + id,
//data: {},
type: "GET",
//dataType: "json",
success: function(data) {
toastr.success("【成功】已取消尚未下发的指令,已下发成功的指令将会继续执行");
$("#"+id).html('已取消');
}
});
}
}
function viewDate(id,searchTime){
var searchDate = $("#searchDate").val();
window.location.href = "/tssw/appInfo/view?id="+id+"&date="+searchDate+"&am="+searchTime;
}
function cancel(){
history.back();
}