fixed download and rollback UI
This commit is contained in:
@@ -26,7 +26,7 @@ exports.setupEnvironment = function () {
|
|||||||
REDIS_HOST = "localhost";
|
REDIS_HOST = "localhost";
|
||||||
REDIS_PORT = "6379";
|
REDIS_PORT = "6379";
|
||||||
REDIS_PASSWORD = "";
|
REDIS_PASSWORD = "";
|
||||||
EXTERNAL_SERVER_ADDRESS = "irext.net"
|
EXTERNAL_SERVER_ADDRESS = "irext.net";
|
||||||
EXTERNAL_SERVER_PORT = "80"
|
EXTERNAL_SERVER_PORT = "80"
|
||||||
} else if (enums.APP_DEVELOPMENT_MODE == env) {
|
} else if (enums.APP_DEVELOPMENT_MODE == env) {
|
||||||
MYSQL_DB_SERVER_ADDRESS = "localhost";
|
MYSQL_DB_SERVER_ADDRESS = "localhost";
|
||||||
@@ -40,7 +40,7 @@ exports.setupEnvironment = function () {
|
|||||||
REDIS_HOST = "localhost";
|
REDIS_HOST = "localhost";
|
||||||
REDIS_PORT = "6379";
|
REDIS_PORT = "6379";
|
||||||
REDIS_PASSWORD = "";
|
REDIS_PASSWORD = "";
|
||||||
EXTERNAL_SERVER_ADDRESS = "irext.net"
|
EXTERNAL_SERVER_ADDRESS = "irext.net";
|
||||||
EXTERNAL_SERVER_PORT = "80"
|
EXTERNAL_SERVER_PORT = "80"
|
||||||
} else if (enums.APP_USERDEBUG_MODE == env) {
|
} else if (enums.APP_USERDEBUG_MODE == env) {
|
||||||
MYSQL_DB_SERVER_ADDRESS = "localhost";
|
MYSQL_DB_SERVER_ADDRESS = "localhost";
|
||||||
@@ -54,7 +54,7 @@ exports.setupEnvironment = function () {
|
|||||||
REDIS_HOST = "localhost";
|
REDIS_HOST = "localhost";
|
||||||
REDIS_PORT = "6379";
|
REDIS_PORT = "6379";
|
||||||
REDIS_PASSWORD = "";
|
REDIS_PASSWORD = "";
|
||||||
EXTERNAL_SERVER_ADDRESS = "irext.net"
|
EXTERNAL_SERVER_ADDRESS = "irext.net";
|
||||||
EXTERNAL_SERVER_PORT = "80"
|
EXTERNAL_SERVER_PORT = "80"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -531,6 +531,6 @@
|
|||||||
<script src="../public_js/utils/url_parser.js"></script>
|
<script src="../public_js/utils/url_parser.js"></script>
|
||||||
<script src="../public_js/chinese/await.js"></script>
|
<script src="../public_js/chinese/await.js"></script>
|
||||||
<script src="../public_js/chinese/chinese.js"></script>
|
<script src="../public_js/chinese/chinese.js"></script>
|
||||||
<script type="text/javascript" src="./js/remote.js"></script>
|
<script type="text/javascript" src="js/code_index.js"></script>
|
||||||
<script type="text/javascript" src="../js/ui.js"></script>
|
<script type="text/javascript" src="../js/ui.js"></script>
|
||||||
</html>
|
</html>
|
||||||
@@ -141,7 +141,6 @@ function loadRemoteList(isSearch, remoteMap) {
|
|||||||
url: url,
|
url: url,
|
||||||
cache: false,
|
cache: false,
|
||||||
height: 600,
|
height: 600,
|
||||||
striped: true,
|
|
||||||
pagination: true,
|
pagination: true,
|
||||||
pageSize: 50,
|
pageSize: 50,
|
||||||
pageList: [10, 25, 50, 100, 200],
|
pageList: [10, 25, 50, 100, 200],
|
||||||
@@ -209,7 +208,7 @@ function loadRemoteList(isSearch, remoteMap) {
|
|||||||
clickToSelect: true
|
clickToSelect: true
|
||||||
}, {
|
}, {
|
||||||
field: 'contributor',
|
field: 'contributor',
|
||||||
title: '来源',
|
title: '贡献者',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
valign: 'middle',
|
valign: 'middle',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
@@ -268,7 +267,7 @@ function rowStyle(row, index) {
|
|||||||
};
|
};
|
||||||
} else if (row.status == '重复') {
|
} else if (row.status == '重复') {
|
||||||
style = {
|
style = {
|
||||||
classes: 'danger'
|
classes: 'warning'
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
style = {
|
style = {
|
||||||
@@ -415,16 +414,16 @@ function fallbackRemote() {
|
|||||||
timeout: 20000,
|
timeout: 20000,
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if(response.status.code == 0) {
|
if(response.status.code == 0) {
|
||||||
$("#verify_confirm_dialog").modal("hide");
|
$("#fallback_confirm_dialog").modal("hide");
|
||||||
popUpHintDialog("已成功回退索引");
|
popUpHintDialog("已成功回退索引");
|
||||||
loadRemoteList();
|
loadRemoteList();
|
||||||
} else {
|
} else {
|
||||||
$("#verify_confirm_dialog").modal("hide");
|
$("#fallback_confirm_dialog").modal("hide");
|
||||||
popUpHintDialog("回退索引操作失败");
|
popUpHintDialog("回退索引操作失败");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
$("#verify_confirm_dialog").modal("hide");
|
$("#fallback_confirm_dialog").modal("hide");
|
||||||
popUpHintDialog("回退索引操作失败");
|
popUpHintDialog("回退索引操作失败");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -151,8 +151,7 @@ exports.downloadRemoteBinCachedWorkUnit = function(remoteIndexID, callback) {
|
|||||||
RemoteIndex.getRemoteIndexByID(remoteIndexID, function(getRemoteIndexErr, remoteIndex) {
|
RemoteIndex.getRemoteIndexByID(remoteIndexID, function(getRemoteIndexErr, remoteIndex) {
|
||||||
if (errorCode.SUCCESS.code == getRemoteIndexErr.code && null != remoteIndex) {
|
if (errorCode.SUCCESS.code == getRemoteIndexErr.code && null != remoteIndex) {
|
||||||
var fileName = "irda_" + remoteIndex.protocol + "_" + remoteIndex.remote + ".bin";
|
var fileName = "irda_" + remoteIndex.protocol + "_" + remoteIndex.remote + ".bin";
|
||||||
var remoteBinaryPath = FILE_TEMP_PATH;
|
var localBinFileName = FILE_TEMP_PATH + "/" + fileName;
|
||||||
var localBinFileName = remoteBinaryPath + "/cache/" + fileName;
|
|
||||||
|
|
||||||
var error = errorCode.SUCCESS;
|
var error = errorCode.SUCCESS;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user