pull/32/head
Apex Liu 2017-04-29 21:34:19 +08:00
parent 1b9cf00c4d
commit 79451a95ff
1 changed files with 7 additions and 22 deletions

View File

@ -209,12 +209,12 @@ ywl.on_init = function (cb_stack, cb_args) {
var _fn_sure = function (cb_stack, cb_args) { var _fn_sure = function (cb_stack, cb_args) {
ywl.ajax_post_json('/host/delete-host', {host_list: host_list}, ywl.ajax_post_json('/host/delete-host', {host_list: host_list},
function (ret) { function (ret) {
if (ret.code === TPE_OK) { if (ret.code === TPE_OK) {
g_host_table.reload(); g_host_table.reload();
ywl.notify_success('删除主机操作成功!'); ywl.notify_success('删除主机操作成功!');
} else { } else {
ywl.notify_error('删除主机操作失败:' + ret.message); ywl.notify_error('删除主机操作失败:' + ret.message);
} }
}, },
function () { function () {
ywl.notify_error('网络故障,删除主机操作失败!'); ywl.notify_error('网络故障,删除主机操作失败!');
@ -245,23 +245,8 @@ ywl.on_init = function (cb_stack, cb_args) {
update_file.trigger('click'); update_file.trigger('click');
}); });
$('#btn-batch-export-host').click(function (e) { $('#btn-batch-export-host').click(function () {
window.location.href = '/host/export-host'; window.location.href = '/host/export-host';
// ywl.ajax_post_json('/host/export-host', {},
// function (ret) {
// console.log('ret', ret);
// if (ret.code == 0) {
// var url = ret.data.url;
// window.location.href = url;
// ywl.notify_success('操作成功');
// } else {
// ywl.notify_error('操作失败');
// }
// },
// function () {
// ywl.notify_error('操作失败');
// }
// );
}); });
$("#btn-apply-group").click(function () { $("#btn-apply-group").click(function () {