',
+ '
涓轰富鏈 ' + self.host_ip + ' 璁剧疆澶囨敞锛屼互渚胯瘑鍒細
',
'
',
- '
',
- '
',
+// '
',
+ '
纭畾',
+ '
鍙栨秷',
'
',
- '
',
@@ -277,9 +279,9 @@ ywl.create_dlg_modify_host_desc = function (tbl, row_id, host_id, host_ip, host_
});
// 缁戝畾鈥滀慨鏀逛富鏈烘弿杩扳 瀵硅瘽妗嗕腑鐨勮緭鍏ユ鐨勫洖杞︿簨浠
$('#' + self.dlg_id + " [ywl-input='desc']").keydown(function (event) {
- if (event.which == 13) {
+ if (event.which === 13) {
self._save();
- } else if (event.which == 27) {
+ } else if (event.which === 27) {
self._destroy();
}
});
diff --git a/server/www/teleport/static/js/ui/config/info.js b/server/www/teleport/static/js/ui/config/info.js
index 8ff06da..8b75d76 100644
--- a/server/www/teleport/static/js/ui/config/info.js
+++ b/server/www/teleport/static/js/ui/config/info.js
@@ -4,8 +4,10 @@ ywl.on_init = function (cb_stack, cb_args) {
console.log(ywl.page_options);
var dom = {
- info: $('#info-kv')
+ info: $('#info-kv'),
// , btn_maintance: $('#btn_maintenance')
+ btn_db_export: $('#btn-db-export'),
+ btn_db_import: $('#btn-db-import'),
};
var html = [];
@@ -66,13 +68,64 @@ ywl.on_init = function (cb_stack, cb_args) {
// });
// });
//
+
+ dom.btn_db_export.click(function () {
+ window.location.href = '/config/export-database'
+ });
+ dom.btn_db_import.click(function () {
+ var _fn_sure = function (cb_stack, cb_args) {
+ var html = '
';
+ dom.btn_db_import.after($(html));
+ var update_file = $("#upload-file");
+
+ update_file.change(function () {
+ var file_path = $(this).val();
+ if (file_path === null || file_path === undefined || file_path === '') {
+ return;
+ }
+ ywl.do_upload_sql_file();
+ });
+
+ update_file.trigger('click');
+ };
+
+ var cb_stack = CALLBACK_STACK.create();
+ ywl.dlg_confirm(cb_stack, {
+ msg: '
娉ㄦ剰锛氭搷浣滀笉鍙仮澶嶏紒锛
鎮ㄧ‘瀹氳娓呴櫎鎵鏈夌幇鏈夋暟鎹紝鐒跺悗瀵煎叆sql鏂囦欢鍚楋紵
',
+ fn_yes: _fn_sure
+ });
+ });
+
cb_stack.exec();
};
+ywl.do_upload_sql_file = function () {
+ var param = {};
+ $.ajaxFileUpload({
+ url: "/config/import-database",// 闇瑕侀摼鎺ュ埌鏈嶅姟鍣ㄥ湴鍧
+ secureuri: false,
+ fileElementId: "upload-file", // 鏂囦欢閫夋嫨妗嗙殑id灞炴
+ dataType: 'text', // 鏈嶅姟鍣ㄨ繑鍥炵殑鏍煎紡锛屽彲浠ユ槸json
+ data: param,
+ success: function (data) {
+ $('#upload-file').remove();
+ var ret = JSON.parse(data);
+ if (ret.code === TPE_OK) {
+ ywl.notify_success('瀵煎叆sql鎴愬姛锛');
+ } else {
+ ywl.notify_error('瀵煎叆sql澶辫触锛
[' + ret.code+'] '+ret.message);
+ }
+ },
+ error: function () {
+ $('#upload-file').remove();
+ ywl.notify_error('缃戠粶鏁呴殰锛屽鍏ql澶辫触锛');
+ }
+ });
+};
+
ywl._make_protocol_info = function (name, p) {
if (_.isUndefined(p))
return ywl._make_info(name, '鏈兘妫娴嬪埌');
- //
RDP 绔彛锛 | 52089 |
var val = p.port;
if (!p.enable) {
val = '
' + val + '锛堟湭鍚敤锛';
diff --git a/server/www/teleport/static/js/ui/log.js b/server/www/teleport/static/js/ui/log.js
index 078192c..b7be1a5 100644
--- a/server/www/teleport/static/js/ui/log.js
+++ b/server/www/teleport/static/js/ui/log.js
@@ -8,7 +8,7 @@ ywl.on_init = function (cb_stack, cb_args) {
//===================================
// 琛ㄦ牸鏁版嵁
var disk_rate = 0;
- if(0 == ywl.page_options.total_size) {
+ if(0 === ywl.page_options.total_size) {
$('#disk-status').text('鏈兘鑾峰彇鍒板綍鍍忔枃浠舵墍鍦ㄧ鐩樼┖闂翠俊鎭');
} else {
disk_rate = parseInt(ywl.page_options.free_size * 100 / ywl.page_options.total_size);
@@ -238,10 +238,16 @@ ywl.on_host_table_created = function (tbl) {
msg = '鍗忚涓嶆敮鎸';
break;
case 6:
- msg = '閫氳閿欒';
+ msg = '鏁版嵁鏍煎紡閿欒';
break;
case 7:
- msg = '閿欒閲嶇疆';
+ msg = '鏍稿績鏈嶅姟閲嶇疆';
+ break;
+ case 8:
+ msg = '缃戠粶閫氳鏁呴殰';
+ break;
+ case 9:
+ msg = '鏃犳晥浼氳瘽';
break;
default:
msg = fields.ret_code;
@@ -286,7 +292,9 @@ ywl.on_host_table_created = function (tbl) {
render.make_action_btn = function (row_id, fields) {
var ret = [];
if (fields.protocol === PROTOCOL_TYPE_RDP) {
- ret.push('
褰曞儚鏌ョ湅 ');
+ if(fields.ret_code === 9999) {
+ ret.push('
褰曞儚鏌ョ湅 ');
+ }
} else if (fields.protocol === PROTOCOL_TYPE_SSH) {
if (fields.ret_code === 9999 && fields.cost_time > 0) {
ret.push('
褰曞儚鏌ョ湅 ');
diff --git a/server/www/teleport/static/js/ui/user/personal.js b/server/www/teleport/static/js/ui/user/personal.js
new file mode 100644
index 0000000..a6ddfe7
--- /dev/null
+++ b/server/www/teleport/static/js/ui/user/personal.js
@@ -0,0 +1,145 @@
+"use strict";
+
+ywl.on_init = function (cb_stack, cb_args) {
+ ywl.dom = {
+ btn_reset_oath_code: $('#btn-reset-oath-code'),
+ btn_verify_oath_code: $('#btn-verify-oath-code'),
+ btn_verify_oath_code_and_save: $('#btn-verify-oath-and-save'),
+ btn_modify_password: $('#btn-modify-password'),
+ btn_toggle_oath_download: $('#toggle-oath-download'),
+
+ oath_app_download_box: $('#oath-app-download-box'),
+
+ input_current_password: $('#current-password'),
+ input_new_password: $('#new-password-1'),
+ input_new_password_confirm: $('#new-password-2'),
+ input_oath_code: $('#oath-code'),
+ input_oath_code_verify: $('#oath-code-verify'),
+
+ dlg_reset_oath_code: $('#dialog-reset-oath-code'),
+ oath_secret_image: $('#oath-secret-qrcode'),
+ tmp_oath_secret: $('#tmp-oath-secret'),
+ };
+
+// ywl.dom.tmp_oath_secret.text(ywl.page_options.tmp_oath_secret);
+
+ ywl.clear_password_input = function () {
+ ywl.dom.input_current_password.val('');
+ ywl.dom.input_new_password.val('');
+ ywl.dom.input_new_password_confirm.val('');
+ };
+
+ ywl.dom.btn_modify_password.click(function () {
+ var old_pwd = ywl.dom.input_current_password.val();
+ var new_pwd_1 = ywl.dom.input_new_password.val();
+ var new_pwd_2 = ywl.dom.input_new_password_confirm.val();
+ if (old_pwd.length === 0) {
+ ywl.notify_error('璇疯緭鍏ュ綋鍓嶅瘑鐮侊紒');
+ ywl.dom.input_current_password.focus();
+ return;
+ }
+ if (new_pwd_1.length === 0) {
+ ywl.notify_error('璇疯缃柊瀵嗙爜锛');
+ ywl.dom.input_new_password.focus();
+ return;
+ }
+ if (new_pwd_1 !== new_pwd_2) {
+ ywl.notify_error('涓ゆ瀵嗙爜杈撳叆涓嶄竴鑷达紒');
+ ywl.dom.input_new_password_confirm.focus();
+ return;
+ }
+ ywl.ajax_post_json('/auth/modify-pwd', {o_pwd: old_pwd, n_pwd: new_pwd_1, callback: 1},
+ function (ret) {
+ if (ret.code === TPE_OK) {
+ ywl.notify_success('瀵嗙爜淇敼鎴愬姛锛');
+ ywl.clear_password_input();
+ } else if (ret.code === -101) {
+ ywl.notify_error('瀵嗙爜閿欒锛');
+ } else {
+ ywl.notify_error('瀵嗙爜淇敼澶辫触锛' + ret.message);
+ }
+
+ },
+ function () {
+ ywl.notify_error('瀵嗙爜淇敼澶辫触锛');
+ }
+ );
+ });
+
+ ywl.dom.btn_toggle_oath_download.click(function () {
+ if (ywl.dom.oath_app_download_box.is(':hidden')) {
+ ywl.dom.oath_app_download_box.slideDown('fast', function () {
+ ywl.dom.btn_toggle_oath_download.html('鏀惰捣
');
+ });
+ } else {
+ ywl.dom.oath_app_download_box.slideUp('fast', function () {
+ ywl.dom.btn_toggle_oath_download.html('鏄剧ず涓嬭浇鍦板潃
');
+ });
+ }
+ });
+
+ ywl.dom.btn_verify_oath_code.click(function () {
+ var code = ywl.dom.input_oath_code.val().trim();
+ if (code.length !== 6) {
+ ywl.notify_error('鍔ㄦ侀獙璇佺爜閿欒锛氬簲璇ユ槸6浣嶆暟瀛楋紒');
+ ywl.dom.input_oath_code_verify.focus();
+ return;
+ }
+
+ ywl.ajax_post_json('/auth/oath-verify', {code: code},
+ function (ret) {
+ if (ret.code === TPE_OK) {
+ ywl.notify_success('鍔ㄦ侀獙璇佺爜楠岃瘉鎴愬姛锛');
+ } else if (ret.code === -3) {
+ ywl.notify_error('鍔ㄦ侀獙璇佺爜楠岃瘉澶辫触锛');
+ } else {
+ ywl.notify_error('鍙戠敓鍐呴儴閿欒锛' + ret.code + ret.message);
+ }
+ },
+ function () {
+ ywl.notify_error('缃戣矾鏁呴殰锛屾棤娉曡繛鎺ュ埌鏈嶅姟鍣紒');
+ }
+ );
+ });
+
+ ywl.dom.btn_reset_oath_code.click(function () {
+ ywl.ajax_post_json('/auth/oath-secret-reset', {},
+ function (ret) {
+ if (ret.code === TPE_OK) {
+ ywl.dom.oath_secret_image.attr('src', '/auth/oath-secret-qrcode?' + Math.random());
+ ywl.dom.tmp_oath_secret.text(ret.data.tmp_oath_secret);
+ ywl.dom.dlg_reset_oath_code.modal({backdrop: 'static'});
+ } else {
+ ywl.notify_error('鍙戠敓鍐呴儴閿欒锛');
+ }
+ },
+ function () {
+ ywl.notify_error('缃戣矾鏁呴殰锛屾棤娉曡繛鎺ュ埌鏈嶅姟鍣紒');
+ }
+ );
+ });
+
+ ywl.dom.btn_verify_oath_code_and_save.click(function () {
+ var code = ywl.dom.input_oath_code_verify.val().trim();
+ if (code.length !== 6) {
+ ywl.notify_error('鍔ㄦ侀獙璇佺爜閿欒锛氬簲璇ユ槸6浣嶆暟瀛楋紒');
+ ywl.dom.input_oath_code_verify.focus();
+ return;
+ }
+
+ ywl.ajax_post_json('/auth/oath-update-secret', {code: code},
+ function (ret) {
+ if (ret.code === TPE_OK) {
+ ywl.notify_success('韬唤楠岃瘉鍣ㄧ粦瀹氭垚鍔燂紒鎮ㄥ彲浠ョ敤姝よ韩浠介獙璇佸櫒鐧诲綍绯荤粺浜嗭紒');
+ ywl.dom.dlg_reset_oath_code.modal('hide');
+ } else {
+ ywl.notify_error('鍙戠敓鍐呴儴閿欒锛');
+ }
+ },
+ function () {
+ ywl.notify_error('缃戣矾鏁呴殰锛屾棤娉曡繛鎺ュ埌鏈嶅姟鍣紒');
+ }
+ );
+ });
+
+};
\ No newline at end of file
diff --git a/server/www/teleport/static/less/_base.less b/server/www/teleport/static/less/_base.less
index 8c9ea2a..408f299 100644
--- a/server/www/teleport/static/less/_base.less
+++ b/server/www/teleport/static/less/_base.less
@@ -5,515 +5,535 @@
@font-family-mono: Consolas, Lucida Console, Monaco, Courier, 'Courier New', monospace;
body {
- font-family: @font-family-normal;
- //font-family: "寰蒋闆呴粦", "Microsoft YaHei", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- background-color: @page-bg;
- color: @page-color;
+ font-family: @font-family-normal;
+ //font-family: "寰蒋闆呴粦", "Microsoft YaHei", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ background-color: @page-bg;
+ color: @page-color;
}
html, body {
- height: 100%;
+ height: 100%;
}
#page-container {
- min-width: 1260px;
+ min-width: 1260px;
}
a {
- text-decoration: none;
+ text-decoration: none;
}
a:link {
- text-decoration: none;
+ text-decoration: none;
}
a:hover {
- text-decoration: none;
+ text-decoration: none;
}
a:active {
- text-decoration: none;
+ text-decoration: none;
}
a:visited {
- text-decoration: none;
+ text-decoration: none;
}
select {
- outline: none;
+ outline: none;
}
label {
- font-weight: normal;
+ font-weight: normal;
}
.clear-float {
- clear: both;
+ clear: both;
}
.bigger {
- font-size: 120%;
+ font-size: 120%;
}
.normal-text {
- font-size: 13px;
- color: @page-color;
+ font-size: 13px;
+ color: @page-color;
}
.mono {
- font-family:@font-family-mono;
+ font-family: @font-family-mono;
}
hr.hr-sm {
- margin-top: 5px;
- margin-bottom: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
}
//==============================================
// 閲嶈浇bootstrap鐨勬牱寮
//==============================================
.btn-group-sm > .btn, .btn-sm {
- padding: 2px 5px;
- //margin-bottom: 2px;
+ padding: 2px 5px;
+ //margin-bottom: 2px;
}
.btn.btn-sm {
- padding: 3px 8px;
+ padding: 3px 8px;
}
.btn.btn-icon {
- padding: 3px 6px;
- &.btn-sm {
- //padding:1px 3px;
- padding: 0;
- font-size: 14px;
- height: 24px;
- width: 24px;
- line-height: 24px;
- border-radius: 0;
- }
+ padding: 3px 6px;
+ &.btn-sm {
+ //padding:1px 3px;
+ padding: 0;
+ font-size: 14px;
+ height: 24px;
+ width: 24px;
+ line-height: 24px;
+ border-radius: 0;
+ }
}
.form-group-sm .input-group .input-group-btn > .btn {
- height: 30px;
- padding: 0 8px;
+ height: 30px;
+ padding: 0 8px;
}
.pop-menu-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1040;
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
}
//.modal {
.form-group {
- margin-bottom: 5px;
+ margin-bottom: 5px;
}
//}
.badge {
- display: inline-block;
+ display: inline-block;
- min-width: 8px;
- padding: 5px 10px;
- border-radius: 10px;
+ min-width: 8px;
+ padding: 5px 10px;
+ border-radius: 10px;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
- font-size: 13px;
- font-weight: 400;
- line-height: 1em;
+ font-size: 13px;
+ font-weight: 400;
+ line-height: 1em;
- background-color: @color-bg-default;
- color: @color-text-on-dark-bg;
- text-shadow: 1px 1px 0 @color-text-shadow-on-dark-bg;
+ background-color: @color-bg-default;
+ color: @color-text-on-dark-bg;
+ text-shadow: 1px 1px 0 @color-text-shadow-on-dark-bg;
- &.badge-plain {
- text-shadow: none;
- }
+ &.badge-plain {
+ text-shadow: none;
+ }
- &.badge-sm {
- font-size: 11px;
- padding: 3px 6px;
- margin-top: 0;
- border-radius: 8px;
- text-shadow: none;
- }
+ &.badge-sm {
+ font-size: 11px;
+ padding: 3px 6px;
+ margin-top: 0;
+ border-radius: 8px;
+ text-shadow: none;
+ }
- &.badge-sup {
- margin-left: -6px;
- margin-top: -16px;
- }
+ &.badge-sup {
+ margin-left: -6px;
+ margin-top: -16px;
+ }
- &.badge-ignore {
- background-color: @color-bg-ignore;
- color: @color-text-ignore;
- text-shadow: none;
- }
- &.badge-info {
- background-color: @color-bg-info;
- }
- &.badge-primary {
- background-color: @color-bg-primary;
- }
+ &.badge-ignore {
+ background-color: @color-bg-ignore;
+ color: @color-text-ignore;
+ text-shadow: none;
+ }
+ &.badge-info {
+ background-color: @color-bg-info;
+ }
+ &.badge-primary {
+ background-color: @color-bg-primary;
+ }
- &.badge-success {
- background-color: @color-bg-success;
- }
- &.badge-warning {
- background-color: @color-bg-warning;
- }
- &.badge-danger {
- background-color: @color-bg-danger;
- }
+ &.badge-success {
+ background-color: @color-bg-success;
+ }
+ &.badge-warning {
+ background-color: @color-bg-warning;
+ }
+ &.badge-danger {
+ background-color: @color-bg-danger;
+ }
}
.label {
- display: inline-block;
+ display: inline-block;
- min-width: 8px;
- padding: 5px 10px;
- border-radius: 5px;
+ min-width: 8px;
+ padding: 5px 10px;
+ border-radius: 5px;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
- font-size: 13px;
- font-weight: 400;
- line-height: 1em;
+ font-size: 13px;
+ font-weight: 400;
+ line-height: 1em;
- background-color: @color-bg-default;
- color: @color-text-on-dark-bg;
- text-shadow: 1px 1px 0 @color-text-shadow-on-dark-bg;
+ background-color: @color-bg-default;
+ color: @color-text-on-dark-bg;
+ text-shadow: 1px 1px 0 @color-text-shadow-on-dark-bg;
- &.label-plain {
- text-shadow: none;
- }
+ &.label-plain {
+ text-shadow: none;
+ }
- &.label-sm {
- font-size: 11px;
- padding: 3px 8px;
- margin-top: 0;
- border-radius: 5px;
- text-shadow: none;
- }
+ &.label-sm {
+ font-size: 11px;
+ padding: 3px 8px;
+ margin-top: 0;
+ border-radius: 5px;
+ text-shadow: none;
+ }
- &.label-ignore {
- background-color: @color-bg-ignore;
- color: @color-text-ignore;
- text-shadow: none;
- }
- &.label-info {
- background-color: @color-bg-info;
- }
- &.label-primary {
- background-color: @color-bg-primary;
- }
+ &.label-ignore {
+ background-color: @color-bg-ignore;
+ color: @color-text-ignore;
+ text-shadow: none;
+ }
+ &.label-info {
+ background-color: @color-bg-info;
+ }
+ &.label-primary {
+ background-color: @color-bg-primary;
+ }
- &.label-success {
- background-color: @color-bg-success;
- }
- &.label-warning {
- background-color: @color-bg-warning;
- }
- &.label-danger {
- background-color: @color-bg-danger;
- }
+ &.label-success {
+ background-color: @color-bg-success;
+ }
+ &.label-warning {
+ background-color: @color-bg-warning;
+ }
+ &.label-danger {
+ background-color: @color-bg-danger;
+ }
}
// 琛ㄦ牸椤甸潰涓殑涓浜涘皬閮ㄤ欢
.progress.progress-sm {
- height: 18px;
- margin-bottom: 2px;
- background-color: #aaa;
- &.button {
- cursor: pointer;
- }
+ height: 18px;
+ margin-bottom: 2px;
+ background-color: #aaa;
+ &.button {
+ cursor: pointer;
+ }
- .progress-bar {
- display: block;
- font-size: 11px;
- float: none;
- }
+ .progress-bar {
+ display: block;
+ font-size: 11px;
+ float: none;
+ }
}
.alert-sm {
- padding: 5px;
- margin-bottom: 10px;
+ padding: 5px;
+ margin-bottom: 10px;
}
.modal-dialog-sm {
- .modal-header {
- padding: 10px;
- }
- .modal-body {
- padding: 10px;
- }
- .modal-footer {
- padding: 10px;
- }
+ .modal-header {
+ padding: 10px;
+ }
+ .modal-body {
+ padding: 10px;
+ }
+ .modal-footer {
+ padding: 10px;
+ }
- .form-horizontal .form-group {
- margin-right: -5px;
- margin-left: -5px;
- }
- .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11 {
- padding-right: 5px;
- padding-left: 5px;
- }
+ .form-horizontal .form-group {
+ margin-right: -5px;
+ margin-left: -5px;
+ }
+ .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11 {
+ padding-right: 5px;
+ padding-left: 5px;
+ }
}
.btn-single-line {
- white-space: nowrap;
- .btn {
- &:first-child {
- border-top-left-radius: 3px;
- border-bottom-left-radius: 3px;
- }
- &:last-child {
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
- }
- }
+ white-space: nowrap;
+ .btn {
+ &:first-child {
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ }
+ &:last-child {
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ }
+ }
}
.remote-action-group {
- margin-bottom: 3px;
- height: 28px;
- min-width: 390px;
+ margin-bottom: 3px;
+ height: 28px;
+ min-width: 390px;
- ul {
- display: block;
- height: 28px;
- margin: 0;
- padding: 0;
+ ul {
+ display: block;
+ height: 28px;
+ margin: 0;
+ padding: 0;
- li {
- float: left;
- position: relative;
- display: block;
- height: 28px;
- padding: 4px 5px;
+ li {
+ float: left;
+ position: relative;
+ display: block;
+ height: 28px;
+ padding: 4px 5px;
- background-color: #eee;
- border-top: 1px solid #ccc;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
+ background-color: #eee;
+ border-top: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
- &.remote-action-btn {
- background: none;
- padding: 0;
- border: none;
- }
+ &.remote-action-btn {
+ background: none;
+ padding: 0;
+ border: none;
+ }
- &.remote-action-input {
- background: none;
- padding: 4px 0;
+ &.remote-action-input {
+ background: none;
+ padding: 4px 0;
- select {
- border: none;
- }
- }
+ select {
+ border: none;
+ }
+ }
- &.remote-action-chk-protocol {
- width: 86px;
- }
+ &.remote-action-chk-protocol {
+ width: 86px;
+ }
- &.remote-action-username, &.remote-action-name, &.remote-action-protocol {
- width: 96px;
- text-align: center;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- &.remote-action-username {
- font-size: 90%;
- color: #999;
- }
- &.remote-action-name, &.remote-action-protocol, &.remote-action-chk-protocol {
- color: #000;
- }
- &.remote-action-name, &.remote-action-chk-protocol {
- font-weight:bold;
- }
+ &.remote-action-username, &.remote-action-name, &.remote-action-protocol {
+ width: 96px;
+ text-align: center;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ &.remote-action-username {
+ font-size: 90%;
+ color: #999;
+ }
+ &.remote-action-name, &.remote-action-protocol, &.remote-action-chk-protocol {
+ color: #000;
+ }
+ &.remote-action-name, &.remote-action-chk-protocol {
+ font-weight: bold;
+ }
- &.remote-action-password, &.remote-action-sshkey, &.remote-action-noauth {
- text-align: center;
- padding: 4px 8px;
- width:45px;
- }
- &.remote-action-password {
- background-color: #e3ffe3;
- color: #999;
- }
- &.remote-action-sshkey {
- background-color: #fbe9c8;
- color: #666;
- }
- &.remote-action-noauth {
- background-color: #e0e0e0;
- color: #666;
- }
+ &.remote-action-password, &.remote-action-sshkey, &.remote-action-noauth {
+ text-align: center;
+ padding: 4px 8px;
+ width: 45px;
+ }
+ &.remote-action-password {
+ background-color: #e3ffe3;
+ color: #999;
+ }
+ &.remote-action-sshkey {
+ background-color: #fbe9c8;
+ color: #666;
+ }
+ &.remote-action-noauth {
+ background-color: #e0e0e0;
+ color: #666;
+ }
- .btn {
- line-height: 1.5;
- margin: 0;
- padding: 4px 8px;
- font-size: 12px;
- border-radius: 0;
- }
+ .btn {
+ line-height: 1.5;
+ margin: 0;
+ padding: 4px 8px;
+ font-size: 12px;
+ border-radius: 0;
+ }
- label {
- padding: 0;
- display: block;
- float: left;
- margin-top: 1px;
- cursor: pointer;
- }
- input[type=checkbox] {
- display: block;
- float: left;
- margin: 3px 5px 0 0;
- }
- select {
- margin-top: -3px;
- }
+ label {
+ padding: 0;
+ display: block;
+ float: left;
+ margin-top: 1px;
+ cursor: pointer;
+ }
+ input[type=checkbox] {
+ display: block;
+ float: left;
+ margin: 3px 5px 0 0;
+ }
+ select {
+ margin-top: -3px;
+ }
- &:first-child {
- border-left: 1px solid #ccc;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
+ &:first-child {
+ border-left: 1px solid #ccc;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
- .btn {
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- }
- }
+ .btn {
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ }
+ }
- &:last-child {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
+ &:last-child {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
- .btn {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- }
- }
- }
- }
+ .btn {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ }
+ }
+ }
+ }
}
hr.small {
- margin: 5px 0;
+ margin: 5px 0;
}
.dlg-protocol-group {
- margin-bottom: 3px;
+ margin-bottom: 3px;
- ul {
- display: block;
- height: 28px;
- margin: 0;
- padding: 0;
+ ul {
+ display: block;
+ height: 28px;
+ margin: 0;
+ padding: 0;
- li {
- float: left;
- position: relative;
- display: block;
- height: 28px;
- padding: 4px 5px;
+ li {
+ float: left;
+ position: relative;
+ display: block;
+ height: 28px;
+ padding: 4px 5px;
- background-color: #eee;
- border-top: 1px solid #ccc;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
+ background-color: #eee;
+ border-top: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
- &.item-name {
- width: 120px;
- //font-size: 90%;
- //color: #999;
- //text-align: center;
- //white-space: nowrap;
- //overflow: hidden;
- //text-overflow: ellipsis;
- }
+ &.item-name {
+ width: 120px;
+ //font-size: 90%;
+ //color: #999;
+ //text-align: center;
+ //white-space: nowrap;
+ //overflow: hidden;
+ //text-overflow: ellipsis;
+ }
- &.item-btn {
- background: none;
- padding: 0;
- border: none;
- }
+ &.item-btn {
+ background: none;
+ padding: 0;
+ border: none;
+ }
- &.item-input {
- background: none;
- border: none;
- padding: 0;
- }
+ &.item-input {
+ background: none;
+ border: none;
+ padding: 0;
+ }
- .form-control {
- line-height: 1.5;
- margin: 0;
- padding: 4px 5px;
- font-size: 12px;
- height: 28px;
- border-radius: 0;
- border-left: none;
- width: 100px;
- }
+ .form-control {
+ line-height: 1.5;
+ margin: 0;
+ padding: 4px 5px;
+ font-size: 12px;
+ height: 28px;
+ border-radius: 0;
+ border-left: none;
+ width: 100px;
+ }
- label {
- padding: 0;
- display: block;
- float: left;
- margin-top: 1px;
- cursor: pointer;
- }
- input[type=checkbox] {
- display: block;
- float: left;
- margin: 3px 5px 0 0;
- }
- //select {
- // margin-top: -3px;
- //}
+ label {
+ padding: 0;
+ display: block;
+ float: left;
+ margin-top: 1px;
+ cursor: pointer;
+ }
+ input[type=checkbox] {
+ display: block;
+ float: left;
+ margin: 3px 5px 0 0;
+ }
+ //select {
+ // margin-top: -3px;
+ //}
- &:first-child {
- border-left: 1px solid #ccc;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
+ &:first-child {
+ border-left: 1px solid #ccc;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
- .btn, .form-control {
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- }
- }
+ .btn, .form-control {
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ }
+ }
- &:last-child {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
+ &:last-child {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
- .btn, .form-control {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- }
- }
- }
- }
+ .btn, .form-control {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ }
+ }
+ }
+ }
}
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
- padding-right: 5px;
- padding-left: 5px;
+ padding-right: 5px;
+ padding-left: 5px;
}
.form-group-sm .form-control-static {
- padding: 6px 0;
+ padding: 6px 0;
+}
+
+.input-group {
+
+ :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
+ color: @color-placeholder;
+ }
+
+ ::-moz-placeholder { /* Mozilla Firefox 19+ */
+ color: @color-placeholder;
+ }
+
+ input:-ms-input-placeholder,
+ textarea:-ms-input-placeholder {
+ color: @color-placeholder;
+ }
+
+ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+ color: @color-placeholder;
+ }
}
\ No newline at end of file
diff --git a/server/www/teleport/static/less/_color.less b/server/www/teleport/static/less/_color.less
index 725b8cf..2e7183e 100644
--- a/server/www/teleport/static/less/_color.less
+++ b/server/www/teleport/static/less/_color.less
@@ -27,6 +27,7 @@
@color-text-on-dark-bg: #fff;
@color-text-shadow-on-dark-bg: #525252;
+@color-placeholder: #d2d2d2;
//.text-warning {
// color: @color-text-warning !important;
diff --git a/server/www/teleport/static/less/auth.less b/server/www/teleport/static/less/auth.less
index 2fb559f..78b8184 100644
--- a/server/www/teleport/static/less/auth.less
+++ b/server/www/teleport/static/less/auth.less
@@ -1,246 +1,246 @@
-@charset "utf-8";
-body {
- padding-top: 70px;
- padding-bottom: 24px;
- background-color: #ececed;
-}
-
-#head nav.navbar {
- height: 70px;
- line-height: 70px;
- background-color: #333;
- color: #fff;
-}
-
-#head .logo .desc {
- display: block;
- float: right;
- color: #ccc;
- margin-top: 10px;
- font-size: 18px;
-}
-
-#foot nav.navbar {
- min-height: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #ddd;
- color: #fff;
- font-size: 12px;
- border-top: 1px solid #ccc;
-}
-
-#foot nav.navbar .container {
- height: 24px;
-}
-
-#foot nav.navbar p {
- margin: 0 auto;
- text-align: center;
- color: #333;
-}
-
-#content {
- margin: 10px 0 50px 0;
-}
-
-.auth-box {
- margin-top: 30px;
- min-height: 120px;
- border: 1px solid #ccc;
- border-radius: 8px;
- background-color: rgba(255, 255, 255, 0.6);
-}
-
-.auth-box .header {
- min-height: 50px;
- height: 50px;
- border: none;
- box-shadow: none;
- border-bottom: 1px solid #ccc;
-}
-
-.auth-box .header .title {
- display: inline-block;
- float: left;
- margin-left: 60px;
- height: 24px;
- margin-top: 25px;
- line-height: 16px;
- font-size: 20px;
- color: #999;
-}
-
-.auth-box .header .selected {
- border-bottom: 1px solid #6699cc;
- color: #555;
-}
-
-.auth-box .header .title:hover {
- border-bottom: 1px solid #999;
-}
-
-.auth-box .inputarea {
- margin: 30px;
-}
-
-.auth-box .inputarea .input-group-addon {
- padding: 0 5px 0 5px;
-}
-
-.auth-box .inputarea p.input-addon-desc {
- text-align: right;
- padding: 0 5px 0 5px;
- color: #999;
-}
-
-/*.auth-box .inputbox {
- border:1px solid #6699cc;
- border-radius:2px;
- height:38px;
- margin-bottom:20px;
-}
-
-.auth-box .inputbox .input {
- display: inline-block;
- outline:none;
- border-style:none;
- position:relative;
- width:360px;
- padding:10px 10px 0 10px;
- line-height: 18px;
- font-family: Verdana, Tahoma, Ariall;
- font-size:16px;
-}
-
-.auth-box .inputbox .clean {
- display:inline-block;
- position:relative;
- top:5px;
- right:0px;height:22px;width:22px;background:url(../img/login/input_right_clean.png) 0 0 no-repeat;
-}
-*/
-
-#leftside {
- width: 560px;
- height: 560px;
- padding-top: 60px;
- background: url(../img/login/side-001.jpg) 0 0 no-repeat;
-}
-
-@media screen and (max-width: 990px) {
- #leftside {
- display: none;
- }
-}
-
-#leftside h1 {
- font-size: 24px;
- color: #888;
-}
-
-#leftside p {
- font-size: 18px;
- color: #888;
- padding-left: 24px;
-}
-
-.auth-box .inputbox {
- margin-bottom: 10px;
-}
-
-.auth-box-lg .inputbox {
- margin-bottom: 20px;
-}
-
-/*.auth-box .inputbox .clean {
- display: block;
- height:22px;width:22px;background:url(../img/login/input_right_clean.png) 0 0 no-repeat;
-}*/
-
-/*.auth-box .inputarea label {
- font-size:12px;
- font-weight:400;
- color:#999;
- cursor:pointer;
-}*/
-
-.auth-box .op_box {
- display: block;
- padding: 5px;
- border-radius: 3px;
- text-align: center;
- //margin-top: 5px;
- margin: 5px 20px 10px 20px;
-}
-
-.auth-box .op_error {
- background: #fbb;
-}
-
-.auth-box .op_wait {
- background: #ccc;
-}
-
-.auth-box {
-
- .quick-area {
- padding: 80px 0 80px 0;
-
- .quick-disc {
- //font-size:120%;
- text-align: center;
- //margin:auto;
- margin-bottom: 20px;
-
- }
-
- .quick-no {
- padding-top: 80px;
- padding-bottom: 100px;
- }
- .quick-yes {
- text-align: center;
- //margin: auto;
-
- .quick-account {
- display: inline-block;
- margin: auto;
- margin-bottom: 20px;
-
- //border:1px solid #888;
-
- &:hover {
- .quick-image {
- //background-color: #00bcee;
- box-shadow: 0 0 8px rgb(0, 194, 246);
- }
- }
- }
-
- .quick-image {
- display: block;
- width: 82px;
- height: 82px;
- line-height: 80px;
- font-size: 64px;
- margin: auto;
-
- //border-radius: 5px;
- //color:#fff;
- //background-color: #00acda;
- //padding:3px;
- border: 1px solid #a4cdf6;
- box-shadow: 0 0 6px rgba(167, 209, 251, 1);
- }
-
- .quick-name {
- display: block;
- margin-top: 5px;
- }
- }
-
- }
-}
-
-
+@charset "utf-8";
+body {
+ padding-top: 70px;
+ padding-bottom: 24px;
+ background-color: #ececed;
+}
+
+#head nav.navbar {
+ height: 70px;
+ line-height: 70px;
+ background-color: #333;
+ color: #fff;
+}
+
+#head .logo .desc {
+ display: block;
+ float: right;
+ color: #ccc;
+ margin-top: 10px;
+ font-size: 18px;
+}
+
+#foot nav.navbar {
+ min-height: 24px;
+ height: 24px;
+ line-height: 24px;
+ background-color: #ddd;
+ color: #fff;
+ font-size: 12px;
+ border-top: 1px solid #ccc;
+}
+
+#foot nav.navbar .container {
+ height: 24px;
+}
+
+#foot nav.navbar p {
+ margin: 0 auto;
+ text-align: center;
+ color: #333;
+}
+
+#content {
+ margin: 10px 0 50px 0;
+}
+
+.auth-box {
+ margin-top: 30px;
+ min-height: 120px;
+ border: 1px solid #ccc;
+ border-radius: 8px;
+ background-color: rgba(255, 255, 255, 0.6);
+}
+
+.auth-box .header {
+ min-height: 50px;
+ height: 50px;
+ border: none;
+ box-shadow: none;
+ border-bottom: 1px solid #ccc;
+}
+
+.auth-box .header .title {
+ display: inline-block;
+ float: left;
+ margin-left: 60px;
+ height: 24px;
+ margin-top: 25px;
+ line-height: 16px;
+ font-size: 20px;
+ color: #999;
+}
+
+.auth-box .header .selected {
+ border-bottom: 2px solid #4882cc;
+ color: #555;
+}
+
+.auth-box .header .title:hover {
+ border-bottom: 2px solid #5396eb;
+}
+
+.auth-box .inputarea {
+ margin: 30px;
+}
+
+.auth-box .inputarea .input-group-addon {
+ padding: 0 5px 0 5px;
+}
+
+.auth-box .inputarea p.input-addon-desc {
+ text-align: right;
+ padding: 0 5px 0 5px;
+ color: #999;
+}
+
+/*.auth-box .inputbox {
+ border:1px solid #6699cc;
+ border-radius:2px;
+ height:38px;
+ margin-bottom:20px;
+}
+
+.auth-box .inputbox .input {
+ display: inline-block;
+ outline:none;
+ border-style:none;
+ position:relative;
+ width:360px;
+ padding:10px 10px 0 10px;
+ line-height: 18px;
+ font-family: Verdana, Tahoma, Ariall;
+ font-size:16px;
+}
+
+.auth-box .inputbox .clean {
+ display:inline-block;
+ position:relative;
+ top:5px;
+ right:0px;height:22px;width:22px;background:url(../img/login/input_right_clean.png) 0 0 no-repeat;
+}
+*/
+
+#leftside {
+ width: 560px;
+ height: 560px;
+ padding-top: 60px;
+ background: url(../img/login/side-001.jpg) 0 0 no-repeat;
+}
+
+@media screen and (max-width: 990px) {
+ #leftside {
+ display: none;
+ }
+}
+
+#leftside h1 {
+ font-size: 24px;
+ color: #888;
+}
+
+#leftside p {
+ font-size: 18px;
+ color: #888;
+ padding-left: 24px;
+}
+
+.auth-box .inputbox {
+ margin-bottom: 10px;
+}
+
+.auth-box-lg .inputbox {
+ margin-bottom: 20px;
+}
+
+/*.auth-box .inputbox .clean {
+ display: block;
+ height:22px;width:22px;background:url(../img/login/input_right_clean.png) 0 0 no-repeat;
+}*/
+
+/*.auth-box .inputarea label {
+ font-size:12px;
+ font-weight:400;
+ color:#999;
+ cursor:pointer;
+}*/
+
+.auth-box .op_box {
+ display: block;
+ padding: 5px;
+ border-radius: 3px;
+ text-align: center;
+ //margin-top: 5px;
+ margin: 5px 20px 10px 20px;
+}
+
+.auth-box .op_error {
+ background: #fbb;
+}
+
+.auth-box .op_wait {
+ background: #ccc;
+}
+
+.auth-box {
+
+ .quick-area {
+ padding: 80px 0 80px 0;
+
+ .quick-disc {
+ //font-size:120%;
+ text-align: center;
+ //margin:auto;
+ margin-bottom: 20px;
+
+ }
+
+ .quick-no {
+ padding-top: 80px;
+ padding-bottom: 100px;
+ }
+ .quick-yes {
+ text-align: center;
+ //margin: auto;
+
+ .quick-account {
+ display: inline-block;
+ margin: auto;
+ margin-bottom: 20px;
+
+ //border:1px solid #888;
+
+ &:hover {
+ .quick-image {
+ //background-color: #00bcee;
+ box-shadow: 0 0 8px rgb(0, 194, 246);
+ }
+ }
+ }
+
+ .quick-image {
+ display: block;
+ width: 82px;
+ height: 82px;
+ line-height: 80px;
+ font-size: 64px;
+ margin: auto;
+
+ //border-radius: 5px;
+ //color:#fff;
+ //background-color: #00acda;
+ //padding:3px;
+ border: 1px solid #a4cdf6;
+ box-shadow: 0 0 6px rgba(167, 209, 251, 1);
+ }
+
+ .quick-name {
+ display: block;
+ margin-top: 5px;
+ }
+ }
+
+ }
+}
+
+
diff --git a/server/www/teleport/static/less/main.less b/server/www/teleport/static/less/main.less
index 395514f..a5398f5 100644
--- a/server/www/teleport/static/less/main.less
+++ b/server/www/teleport/static/less/main.less
@@ -689,6 +689,11 @@
.popover {
padding: 0;
+ max-width: 500px;
+
+ .popover-content {
+ padding: 10px 10px 20px 10px;
+ }
&.bottom > .arrow:after {
top: 1px;
diff --git a/server/www/teleport/view/auth/login.mako b/server/www/teleport/view/auth/login.mako
index 6516676..f84d311 100644
--- a/server/www/teleport/view/auth/login.mako
+++ b/server/www/teleport/view/auth/login.mako
@@ -1,78 +1,89 @@
-<%!
- # -*- coding: utf-8 -*-
- page_title_ = '鐧诲綍'
- ## page_menu_ = ['host']
- ## page_id_ = 'host'
-%>
-<%inherit file="page_base.mako"/>
-
-<%block name="extend_js">
-
-%block>
-
-<%block name="embed_js" >
-
-%block>
-
-
-
+<%!
+ # -*- coding: utf-8 -*-
+ page_title_ = '鐧诲綍'
+ ## page_menu_ = ['host']
+ ## page_id_ = 'host'
+%>
+<%inherit file="page_base.mako"/>
+
+<%block name="extend_js">
+
+%block>
+
+<%block name="embed_js" >
+
+%block>
+
+
+
diff --git a/server/www/teleport/view/auth/page_base.mako b/server/www/teleport/view/auth/page_base.mako
index 82e7a0d..fc77c4c 100644
--- a/server/www/teleport/view/auth/page_base.mako
+++ b/server/www/teleport/view/auth/page_base.mako
@@ -1,100 +1,100 @@
-
- <%!
- import eom_ver
- page_title_ = ''
- %>
-
-
-
-
-
-
-
-
-
-
-
-
${self.attr.page_title_}::TELEPORT
-
-
-
-
-
-
-
-
- <%block name="extend_css"/>
-
-
-
-
-
-
-
-
-
-
-
-
- ${self.body()}
-
-
-
-
-
-
-
- <%block name="extend_content" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%block name="extend_js"/>
-
-
-
- <%block name="embed_js" />
-
-
+
+ <%!
+ import eom_ver
+ page_title_ = ''
+ %>
+
+
+
+
+
+
+
+
+
+
+
+
${self.attr.page_title_}::TELEPORT
+
+
+
+
+
+
+
+
+ <%block name="extend_css"/>
+
+
+
+
+
+
+
+
+
+
+
+
+ ${self.body()}
+
+
+
+
+
+
+
+ <%block name="extend_content" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%block name="extend_js"/>
+
+
+
+ <%block name="embed_js" />
+
+
\ No newline at end of file
diff --git a/server/www/teleport/view/common/_sidebar_nav_menu.mako b/server/www/teleport/view/common/_sidebar_nav_menu.mako
index 809cd2a..a2face9 100644
--- a/server/www/teleport/view/common/_sidebar_nav_menu.mako
+++ b/server/www/teleport/view/common/_sidebar_nav_menu.mako
@@ -101,18 +101,19 @@
diff --git a/server/www/teleport/view/config/index.mako b/server/www/teleport/view/config/index.mako
index 810f7c8..b74ca37 100644
--- a/server/www/teleport/view/config/index.mako
+++ b/server/www/teleport/view/config/index.mako
@@ -19,6 +19,24 @@
<%block name="extend_css">
%block>
@@ -46,14 +77,27 @@
-
鏈嶅姟鍣ㄩ厤缃俊鎭
+
鏈嶅姟鍣ㄩ厤缃俊鎭
-##
+
+
+
鏁版嵁搴撶鐞
+
+
+
瀵煎嚭
+
灏嗘暟鎹簱涓墍鏈夋暟鎹鍑哄埌sql鏂囦欢锛屽彲鐢ㄤ綔澶囦唤銆
+
+
+
+
+
瀵煎叆
+
娓呯┖褰撳墠鏁版嵁搴撲腑鎵鏈夋暟鎹紝鐒跺悗浠巗ql鏂囦欢涓鍏ユ暟鎹埌鏁版嵁搴撲腑銆
+
娉ㄦ剰锛佸鍏ユ搷浣滃皢瀵艰嚧鐜版湁鏁版嵁琚竻闄や笖鏃犳硶鎭㈠锛岃璋ㄦ厧浣跨敤锛
+
+
+
diff --git a/server/www/teleport/view/log/record-sftp-cmd.mako b/server/www/teleport/view/log/record-sftp-cmd.mako
new file mode 100644
index 0000000..7c8ad54
--- /dev/null
+++ b/server/www/teleport/view/log/record-sftp-cmd.mako
@@ -0,0 +1,125 @@
+<%!
+ page_title_ = 'SFTP鎿嶄綔璁板綍'
+%>
+
+<%inherit file="../page_no_sidebar_base.mako"/>
+<%block name="extend_js">
+%block>
+
+<%block name="breadcrumb">
+
+ - ${self.attr.page_title_}
+
+
+%block>
+
+<%block name="extend_css">
+
+%block>
+
+
+
+ 浠栨倓鎮勫湴鏉ワ紝鍙堟倓鎮勫湴璧帮紝鎸ヤ竴鎸ヨ。琚栵紝娌℃湁鐣欎笅浠讳綍鎿嶄綔~~~~
+
+
+
+
+<%block name="embed_js">
+
+%block>
\ No newline at end of file
diff --git a/server/www/teleport/view/log/record-ssh-cmd.mako b/server/www/teleport/view/log/record-ssh-cmd.mako
index 822974f..794cd24 100644
--- a/server/www/teleport/view/log/record-ssh-cmd.mako
+++ b/server/www/teleport/view/log/record-ssh-cmd.mako
@@ -1,101 +1,105 @@
-<%!
- page_title_ = '鎿嶄綔璁板綍'
-%>
-
-<%inherit file="../page_no_sidebar_base.mako"/>
-<%block name="extend_js">
-%block>
-
-<%block name="breadcrumb">
-
- - ${self.attr.page_title_}
-
-%block>
-
-<%block name="extend_css">
-
-%block>
-
-
-
- 浠栨倓鎮勫湴鏉ワ紝鍙堟倓鎮勫湴璧帮紝鎸ヤ竴鎸ヨ。琚栵紝娌℃湁鐣欎笅浠讳綍鎿嶄綔~~~~
-
-
-
-
-<%block name="embed_js">
-
+<%!
+ page_title_ = 'SSH鎿嶄綔璁板綍'
+%>
+
+<%inherit file="../page_no_sidebar_base.mako"/>
+<%block name="extend_js">
+%block>
+
+<%block name="breadcrumb">
+
+ - ${self.attr.page_title_}
+
+
+%block>
+
+<%block name="extend_css">
+
+%block>
+
+
+
+ 浠栨倓鎮勫湴鏉ワ紝鍙堟倓鎮勫湴璧帮紝鎸ヤ竴鎸ヨ。琚栵紝娌℃湁鐣欎笅浠讳綍鎿嶄綔~~~~
+
+
+
+
+<%block name="embed_js">
+
%block>
\ No newline at end of file
diff --git a/server/www/teleport/view/maintenance/upgrade.mako b/server/www/teleport/view/maintenance/upgrade.mako
index 061a068..41233ba 100644
--- a/server/www/teleport/view/maintenance/upgrade.mako
+++ b/server/www/teleport/view/maintenance/upgrade.mako
@@ -93,7 +93,7 @@
ywl.ajax_post_json('/maintenance/rpc', {cmd: 'upgrade_db'},
function (ret) {
console.log('upgrade-db:', ret);
- if (ret.code == 0) {
+ if (ret.code === 0) {
var cb_stack = CALLBACK_STACK.create();
cb_stack
@@ -112,7 +112,7 @@
ywl.get_task_ret = function (cb_stack, cb_args) {
var task_id = cb_args.task_id || 0;
- if (task_id == 0) {
+ if (task_id === 0) {
console.log('task-id', task_id);
return;
}
@@ -120,7 +120,7 @@
ywl.ajax_post_json('/maintenance/rpc', {cmd: 'get_task_ret', 'tid': task_id},
function (ret) {
console.log('get_task_ret:', ret);
- if (ret.code == 0) {
+ if (ret.code === 0) {
// show step progress.
var steps = ret.data.steps;
@@ -130,14 +130,20 @@
var icon_class = '';
var err_class = '';
for(var i = 0; i < steps.length; ++i) {
- if(steps[i].stat == 0)
+ if(steps[i].code !== 0) {
+ err_class = ' class="error"';
+ icon_class = 'fa-times-circle';
+ }
+ else {
+ err_class = '';
icon_class = 'fa-check';
+ }
+
+ if(steps[i].stat === 0)
+ ;//icon_class = 'fa-check';
else
icon_class = 'fa-cog fa-spin';
- if(steps[i].code != 0)
- err_class = ' class="error"';
- else
- err_class = '';
+
html.push('