From 79451a95ffbfa96fcdd715302fcf9bf40fa18024 Mon Sep 17 00:00:00 2001 From: Apex Liu Date: Sat, 29 Apr 2017 21:34:19 +0800 Subject: [PATCH] temp. --- .../www/teleport/static/js/ui/admin_host.js | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/server/www/teleport/static/js/ui/admin_host.js b/server/www/teleport/static/js/ui/admin_host.js index 57a8386..daa7a78 100644 --- a/server/www/teleport/static/js/ui/admin_host.js +++ b/server/www/teleport/static/js/ui/admin_host.js @@ -209,12 +209,12 @@ ywl.on_init = function (cb_stack, cb_args) { var _fn_sure = function (cb_stack, cb_args) { ywl.ajax_post_json('/host/delete-host', {host_list: host_list}, function (ret) { - if (ret.code === TPE_OK) { - g_host_table.reload(); - ywl.notify_success('删除主机操作成功!'); - } else { - ywl.notify_error('删除主机操作失败:' + ret.message); - } + if (ret.code === TPE_OK) { + g_host_table.reload(); + ywl.notify_success('删除主机操作成功!'); + } else { + ywl.notify_error('删除主机操作失败:' + ret.message); + } }, function () { ywl.notify_error('网络故障,删除主机操作失败!'); @@ -245,23 +245,8 @@ ywl.on_init = function (cb_stack, cb_args) { update_file.trigger('click'); }); - $('#btn-batch-export-host').click(function (e) { + $('#btn-batch-export-host').click(function () { 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 () {