configured binary download URL

This commit is contained in:
strawmanbobi
2020-05-05 18:10:39 +08:00
parent 340c62eb83
commit f6bdee2928
5 changed files with 11 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ exports.setupEnvironment = function () {
REDIS_HOST = "localhost";
REDIS_PORT = "6379";
REDIS_PASSWORD = null;
FILE_TEMP_PATH = require('os').homedir() + "/rc_extension";
FILE_TEMP_PATH = "/data/irext/database/binaries/irext-binaries";
PYTHON_PATH = "/usr/bin/python";
LISTEN_PORT = "8301";
SERVER_ADDRESS = "localhost";

View File

@@ -651,6 +651,7 @@
<script src="../public_js/bower_components/select2/dist/js/select2.min.js"></script>
<script src="../public_js/utils/date_utils.js"></script>
<script src="../public_js/utils/url_parser.js"></script>
<script src="../public_js/utils/view_utils.js"></script>
<script src="../public_js/chinese/await.js"></script>
<script src="../public_js/chinese/chinese.js"></script>
<script type="text/javascript" src="js/constants.js"></script>

View File

@@ -3,6 +3,8 @@
* 2017-03-27
*/
var CODE_TABLE_PADDING = 320;
var id = "";
var token = "";
var client = null;
@@ -124,7 +126,7 @@ function loadRemoteList(isSearch, remoteMap) {
method: 'get',
url: url,
cache: false,
height: 600,
height: getViewPortHeight() - CODE_TABLE_PADDING,
pagination: true,
pageSize: 50,
pageList: [10, 25, 50, 100, 200],

View File

@@ -49,7 +49,7 @@ function downloadBin() {
}
downloadURL = '/irext/int/download_remote_index?remote_index_id='+selectedRemote.id+'&admin_id='+id+'&token='+token;
if (null != client && client == 'console') {
if (null != client && client === 'console') {
// directly download binary to remote via serial port
} else {
window.open(

View File

@@ -0,0 +1,5 @@
function getViewPortHeight() {
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
return h;
}