mirror of https://github.com/tp4a/teleport
在侧边栏显示助手版本,以及助手设置链接。
parent
60d3f63d7d
commit
d88af1ed77
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
$tp.assist_checked = function () {
|
||||
if ($tp.assist.running) {
|
||||
$('#sidebar-tp-assist-ver').html('v'+$tp.assist.version);
|
||||
} else {
|
||||
$('#sidebar-tp-assist-ver').html('未能检测到');
|
||||
}
|
||||
};
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
$app.on_init = function (cb_stack) {
|
||||
$app.dom = {
|
||||
assist_ver: $('#tp-assist-ver'),
|
||||
// assist_ver: $('#tp-assist-ver'),
|
||||
btn_refresh_host: $('#btn-refresh-host'),
|
||||
btn_add_host: $('#btn-add-host'),
|
||||
chkbox_host_select_all: $('#table-host-select-all'),
|
||||
|
@ -19,14 +19,14 @@ $app.on_init = function (cb_stack) {
|
|||
upload_file_message: $('#upload-file-message')
|
||||
};
|
||||
|
||||
$tp.assist_checked = function () {
|
||||
console.log("---------");
|
||||
if ($tp.assist.running) {
|
||||
$app.dom.assist_ver.html($tp.assist.version);
|
||||
} else {
|
||||
$app.dom.assist_ver.html('<a href="http://teleport.eomsoft.net/download" target="_blank" class="error">未能检测到</a>');
|
||||
}
|
||||
};
|
||||
// $tp.assist_checked = function () {
|
||||
// console.log("---------");
|
||||
// if ($tp.assist.running) {
|
||||
// $app.dom.assist_ver.html($tp.assist.version);
|
||||
// } else {
|
||||
// $app.dom.assist_ver.html('<a href="http://teleport.eomsoft.net/download" target="_blank" class="error">未能检测到</a>');
|
||||
// }
|
||||
// };
|
||||
|
||||
cb_stack
|
||||
.add($app.create_controls)
|
||||
|
|
|
@ -29,7 +29,7 @@ $app.create_info_table = function () {
|
|||
core_info: $('#core-info-kv')
|
||||
};
|
||||
|
||||
_info.init = function () {
|
||||
_info.init = function (cb_stack) {
|
||||
var h = [];
|
||||
|
||||
h.push(_info._make_info('WEB服务版本', $app.options.web_cfg.version));
|
||||
|
@ -65,6 +65,7 @@ $app.create_info_table = function () {
|
|||
|
||||
_info.dom.core_info.append(h.join(''));
|
||||
|
||||
cb_stack.exec();
|
||||
};
|
||||
|
||||
_info._make_info = function (k, v) {
|
||||
|
|
|
@ -32,7 +32,7 @@ $app.on_init = function (cb_stack) {
|
|||
cb_stack.exec();
|
||||
};
|
||||
|
||||
$app.create_controls = function () {
|
||||
$app.create_controls = function (cb_stack) {
|
||||
console.log($app.role_list);
|
||||
var nodes = [];
|
||||
var selected_role_id = 0;
|
||||
|
@ -149,6 +149,8 @@ $app.create_controls = function () {
|
|||
$app.dom.btn_remove_role.click(function () {
|
||||
$app.remove_role();
|
||||
});
|
||||
|
||||
cb_stack.exec();
|
||||
};
|
||||
|
||||
$app.show_role = function (role_id, edit_mode) {
|
||||
|
|
|
@ -130,6 +130,14 @@
|
|||
'name': '系统设置',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'privilege': const.TP_PRIVILEGE_LOGIN_WEB,
|
||||
'id': 'assist',
|
||||
'link': 'http://127.0.0.1:50022/config',
|
||||
'target': '_blank',
|
||||
'name': '助手设置',
|
||||
'icon': 'fa-flash'
|
||||
}
|
||||
]
|
||||
%>
|
||||
|
@ -205,7 +213,12 @@
|
|||
|
||||
<hr style="border:none;border-bottom:1px dotted #4a4a4a;margin-bottom:0;"/>
|
||||
<div style="color:#717171;font-size:90%;margin-top:5px;text-align:center;">
|
||||
<div style="margin-top:5px;text-align:center;">服务端:<span class="mono">v${app_ver.TP_SERVER_VER}</span></div>
|
||||
## <div style="margin-top:5px;text-align:center;">服务端:<span class="mono">v${app_ver.TP_SERVER_VER}</span></div>
|
||||
## <div style="margin-top:5px;text-align:center;">助手:<span class="mono"><span id="sidebar-tp-assist-ver"></span></span></div>
|
||||
|
||||
<div style="color:#717171;font-size:90%;margin-top:5px;"><span style="display:inline-block;width:50px;text-align: right">服务端:</span><span class="mono">v${app_ver.TP_SERVER_VER}</span></div>
|
||||
<div style="color:#717171;font-size:90%;margin-top:5px;"><span style="display:inline-block;width:50px;text-align: right">助手:</span><span class="mono"><span id="sidebar-tp-assist-ver"><i class="fa fa-cog fa-spin"></i></span></span></div>
|
||||
|
||||
<div style="font-size:80%;margin-top:5px;text-align:center;"><span class="error">技术预览版</span></div>
|
||||
</div>
|
||||
<hr style="border:none;border-bottom:1px dotted #4a4a4a;margin-bottom:20px;margin-top:5px;"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%inherit file="../page_base.mako"/>
|
||||
|
||||
<%block name="extend_js_file">
|
||||
<script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
## <script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
<script type="text/javascript" src="${ static_url('js/asset/host-list.js') }"></script>
|
||||
<script type="text/javascript" src="${ static_url('plugins/jquery/ajaxfileupload.js') }"></script>
|
||||
</%block>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<%block name="breadcrumb_extra">
|
||||
<ol class="breadcrumb breadcrumb-list">
|
||||
## <li><i class="fa fa-clock-o"></i> 服务器时间:<span id="tp-timer">-</span></li>
|
||||
<li><i class="fa fa-flash"></i> 助手版本:<span id="tp-assist-ver"></span></li>
|
||||
## <li><i class="fa fa-flash"></i> 助手版本:<span id="tp-assist-ver"></span></li>
|
||||
</ol>
|
||||
</%block>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%inherit file="../page_base.mako"/>
|
||||
|
||||
<%block name="extend_js_file">
|
||||
<script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
## <script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
<script type="text/javascript" src="${ static_url('js/audit/record-list.js') }"></script>
|
||||
</%block>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%inherit file="../page_base.mako"/>
|
||||
|
||||
<%block name="extend_js_file">
|
||||
<script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
## <script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
<script type="text/javascript" src="${ static_url('js/ops/remote-list.js') }"></script>
|
||||
</%block>
|
||||
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<script type="text/javascript" src="${ static_url('js/teleport/common.js') }"></script>
|
||||
<script type="text/javascript" src="${ static_url('js/teleport/controls.js') }"></script>
|
||||
|
||||
<script type="text/javascript" src="${ static_url('js/tp-assist.js') }"></script>
|
||||
<script type="text/javascript" src="${ static_url('js/_sidebar_nav_menu.js') }"></script>
|
||||
|
||||
<%block name="extend_js_file"/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue