From 8da5f4414e7391095889d1ea71cde6f3b096a78f Mon Sep 17 00:00:00 2001 From: strawmanbobi Date: Sun, 4 Dec 2016 21:46:27 +0800 Subject: [PATCH] fixed download and rollback UI --- src/web_console/configuration/system_configs.js | 6 +++--- src/web_console/web/code/index.html | 2 +- .../web/code/js/{remote.js => code_index.js} | 11 +++++------ src/web_console/work_unit/internal_logic.js | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) rename src/web_console/web/code/js/{remote.js => code_index.js} (99%) diff --git a/src/web_console/configuration/system_configs.js b/src/web_console/configuration/system_configs.js index c024396..f0819a1 100644 --- a/src/web_console/configuration/system_configs.js +++ b/src/web_console/configuration/system_configs.js @@ -26,7 +26,7 @@ exports.setupEnvironment = function () { REDIS_HOST = "localhost"; REDIS_PORT = "6379"; REDIS_PASSWORD = ""; - EXTERNAL_SERVER_ADDRESS = "irext.net" + EXTERNAL_SERVER_ADDRESS = "irext.net"; EXTERNAL_SERVER_PORT = "80" } else if (enums.APP_DEVELOPMENT_MODE == env) { MYSQL_DB_SERVER_ADDRESS = "localhost"; @@ -40,7 +40,7 @@ exports.setupEnvironment = function () { REDIS_HOST = "localhost"; REDIS_PORT = "6379"; REDIS_PASSWORD = ""; - EXTERNAL_SERVER_ADDRESS = "irext.net" + EXTERNAL_SERVER_ADDRESS = "irext.net"; EXTERNAL_SERVER_PORT = "80" } else if (enums.APP_USERDEBUG_MODE == env) { MYSQL_DB_SERVER_ADDRESS = "localhost"; @@ -54,7 +54,7 @@ exports.setupEnvironment = function () { REDIS_HOST = "localhost"; REDIS_PORT = "6379"; REDIS_PASSWORD = ""; - EXTERNAL_SERVER_ADDRESS = "irext.net" + EXTERNAL_SERVER_ADDRESS = "irext.net"; EXTERNAL_SERVER_PORT = "80" } }; \ No newline at end of file diff --git a/src/web_console/web/code/index.html b/src/web_console/web/code/index.html index 21b59df..8c6dbde 100644 --- a/src/web_console/web/code/index.html +++ b/src/web_console/web/code/index.html @@ -531,6 +531,6 @@ - + \ No newline at end of file diff --git a/src/web_console/web/code/js/remote.js b/src/web_console/web/code/js/code_index.js similarity index 99% rename from src/web_console/web/code/js/remote.js rename to src/web_console/web/code/js/code_index.js index 62e6a55..60e007f 100644 --- a/src/web_console/web/code/js/remote.js +++ b/src/web_console/web/code/js/code_index.js @@ -141,7 +141,6 @@ function loadRemoteList(isSearch, remoteMap) { url: url, cache: false, height: 600, - striped: true, pagination: true, pageSize: 50, pageList: [10, 25, 50, 100, 200], @@ -209,7 +208,7 @@ function loadRemoteList(isSearch, remoteMap) { clickToSelect: true }, { field: 'contributor', - title: '来源', + title: '贡献者', align: 'left', valign: 'middle', sortable: true, @@ -268,7 +267,7 @@ function rowStyle(row, index) { }; } else if (row.status == '重复') { style = { - classes: 'danger' + classes: 'warning' }; } else { style = { @@ -415,16 +414,16 @@ function fallbackRemote() { timeout: 20000, success: function (response) { if(response.status.code == 0) { - $("#verify_confirm_dialog").modal("hide"); + $("#fallback_confirm_dialog").modal("hide"); popUpHintDialog("已成功回退索引"); loadRemoteList(); } else { - $("#verify_confirm_dialog").modal("hide"); + $("#fallback_confirm_dialog").modal("hide"); popUpHintDialog("回退索引操作失败"); } }, error: function () { - $("#verify_confirm_dialog").modal("hide"); + $("#fallback_confirm_dialog").modal("hide"); popUpHintDialog("回退索引操作失败"); } }); diff --git a/src/web_console/work_unit/internal_logic.js b/src/web_console/work_unit/internal_logic.js index 85405be..37ec8bc 100644 --- a/src/web_console/work_unit/internal_logic.js +++ b/src/web_console/work_unit/internal_logic.js @@ -151,8 +151,7 @@ exports.downloadRemoteBinCachedWorkUnit = function(remoteIndexID, callback) { RemoteIndex.getRemoteIndexByID(remoteIndexID, function(getRemoteIndexErr, remoteIndex) { if (errorCode.SUCCESS.code == getRemoteIndexErr.code && null != remoteIndex) { var fileName = "irda_" + remoteIndex.protocol + "_" + remoteIndex.remote + ".bin"; - var remoteBinaryPath = FILE_TEMP_PATH; - var localBinFileName = remoteBinaryPath + "/cache/" + fileName; + var localBinFileName = FILE_TEMP_PATH + "/" + fileName; var error = errorCode.SUCCESS;