diff --git a/server/www/teleport/static/css/dashboard.css b/server/www/teleport/static/css/dashboard.css index 1d335e8..472537c 100644 --- a/server/www/teleport/static/css/dashboard.css +++ b/server/www/teleport/static/css/dashboard.css @@ -1 +1 @@ -@charset "utf-8";html{font-size:13px}body{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;background-color:#e9e9e9;color:#333}html,body{height:100%}#page-container{min-width:1260px}a{text-decoration:none}a:link{text-decoration:none}a:hover{text-decoration:none}a:active{text-decoration:none}a:visited{text-decoration:none}select{outline:none}label{font-weight:normal}.clear-float{clear:both}.bigger{font-size:120%}.normal-text{font-size:13px;color:#333}.mono{font-family:Monaco,Lucida Console,Consolas,Courier,'Courier New',monospace}hr.hr-sm{margin-top:5px;margin-bottom:5px}.btn-single-line{white-space:nowrap}.btn-single-line .btn:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.btn-single-line .btn:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.remote-action-group{margin-bottom:3px;height:28px}.remote-action-group ul{display:block;height:28px;margin:0;padding:0}.remote-action-group ul 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}.remote-action-group ul li.remote-action-btn{background:none;padding:0;border:none}.remote-action-group ul li.remote-action-input{background:none;padding:4px 0}.remote-action-group ul li.remote-action-input select{border:none}.remote-action-group ul li.remote-action-chk-protocol{width:86px}.remote-action-group ul li.remote-action-state{text-align:center;white-space:nowrap}.remote-action-group ul li.remote-action-state.state-disabled{background-color:#e5e5e5;color:#aaa;text-shadow:-1px -1px 1px #fff}.remote-action-group ul li.remote-action-state.state-disabled>i.fa{color:#b53a2f}.remote-action-group ul li.remote-action-username,.remote-action-group ul li.remote-action-name,.remote-action-group ul li.remote-action-protocol{width:96px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remote-action-group ul li.remote-action-username{font-size:90%;color:#999}.remote-action-group ul li.remote-action-name,.remote-action-group ul li.remote-action-protocol,.remote-action-group ul li.remote-action-chk-protocol{color:#000}.remote-action-group ul li.remote-action-name,.remote-action-group ul li.remote-action-chk-protocol{font-weight:bold}.remote-action-group ul li.remote-action-password,.remote-action-group ul li.remote-action-sshkey,.remote-action-group ul li.remote-action-noauth{text-align:center;padding:4px 8px;width:45px}.remote-action-group ul li.remote-action-password{background-color:#e3ffe3;color:#999}.remote-action-group ul li.remote-action-sshkey{background-color:#fbe9c8;color:#666}.remote-action-group ul li.remote-action-noauth{background-color:#e0e0e0;color:#666}.remote-action-group ul li .btn{line-height:1.5;margin:0;padding:4px 8px;font-size:12px;border-radius:0}.remote-action-group ul li label{padding:0;display:block;float:left;margin-top:1px;cursor:pointer}.remote-action-group ul li input[type=checkbox]{display:block;float:left;margin:3px 5px 0 0}.remote-action-group ul li select{margin-top:-3px}.remote-action-group ul li:first-child{border-left:1px solid #ccc;border-top-left-radius:4px;border-bottom-left-radius:4px}.remote-action-group ul li.remote-action-btn:first-child{border:none}.remote-action-group ul li.remote-action-btn:first-child .btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.remote-action-group ul li:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.remote-action-group ul li.remote-action-btn:last-child{border:none}.remote-action-group ul li.remote-action-btn:last-child .btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.remote-info-group{margin-bottom:3px;height:28px}.remote-info-group ul{display:inline-block;height:28px;margin:0;padding:0}.remote-info-group ul li{float:left;position:relative;display:block;height:28px;padding:4px 5px;border-top:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc}.remote-info-group ul li.remote-action-btn{background:none;padding:0;border:none}.remote-info-group ul li.remote-action-input{background:none;padding:4px 0}.remote-info-group ul li.remote-action-input select{border:none}.remote-info-group ul li label{padding:0;display:block;float:left;margin-top:1px;cursor:pointer}.remote-info-group ul li select{margin-top:-3px}.remote-info-group ul li:first-child{border-left:1px solid #ccc;border-top-left-radius:4px;border-bottom-left-radius:4px}.remote-info-group ul li:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}hr.small{margin:5px 0}.dlg-protocol-group{margin-bottom:3px}.dlg-protocol-group ul{display:block;height:28px;margin:0;padding:0}.dlg-protocol-group ul 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}.dlg-protocol-group ul li.item-name{width:120px}.dlg-protocol-group ul li.item-btn{background:none;padding:0;border:none}.dlg-protocol-group ul li.item-input{background:none;border:none;padding:0}.dlg-protocol-group ul li .form-control{line-height:1.5;margin:0;padding:4px 5px;font-size:12px;height:28px;border-radius:0;border-left:none;width:100px}.dlg-protocol-group ul li label{padding:0;display:block;float:left;margin-top:1px;cursor:pointer}.dlg-protocol-group ul li input[type=checkbox]{display:block;float:left;margin:3px 5px 0 0}.dlg-protocol-group ul li:first-child{border-left:1px solid #ccc;border-top-left-radius:4px;border-bottom-left-radius:4px}.dlg-protocol-group ul li:first-child .btn,.dlg-protocol-group ul li:first-child .form-control{border-top-left-radius:4px;border-bottom-left-radius:4px}.dlg-protocol-group ul li:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.dlg-protocol-group ul li:last-child .btn,.dlg-protocol-group ul li:last-child .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.os-icon-windows:after{color:#00bcf6;content:"\f17a";font-size:18px;width:24px;height:24px;line-height:24px;display:inline-block;font-family:'FontAwesome'}.os-icon-linux:after{color:#fff;content:"\f17c";font-size:18px;width:24px;height:24px;line-height:24px;background-color:#333;border-radius:50%;display:inline-block;font-family:'FontAwesome'}.os-icon-macos:after{color:#a7a7a7;content:"\f179";font-size:20px;width:24px;height:24px;line-height:24px;display:inline-block;font-family:'FontAwesome'}.os-icon-ubuntu:after,.os-icon-debian:after,.os-icon-centos:after,.os-icon-redhat:after{content:" ";width:24px;height:24px;line-height:24px;display:inline-block}.os-icon-ubuntu:after{background:url(../img/os-icon/ubuntu-24x24.png) no-repeat}.os-icon-debian:after{background:url(../img/os-icon/debian-24x24.png) no-repeat}.os-icon-centos:after{background:url(../img/os-icon/centos-24x24.png) no-repeat}.os-icon-redhat:after{background:url(../img/os-icon/redhat-24x24.png) no-repeat}.disable-bg{position:absolute;background:url(../img/css/disable-bg.png) repeat;opacity:.45;z-index:990}.disable-message{display:inline-block;font-size:160%;position:absolute;padding:20px 40px;border:1px solid #2b0002;background-color:#65181a;color:#fff;opacity:.85;z-index:991}.btn-group-sm>.btn{padding:3px 5px;font-size:12px}.pop-menu-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040}.form-group{margin-bottom:5px}.badge{padding:3px 6px;border-radius:10px;font-size:13px;font-weight:400;background-color:#999}.badge.badge-sm{font-size:12px;padding:3px 5px;margin-top:0;border-radius:8px;text-shadow:none}.badge.badge-sup{margin-left:-8px;margin-top:-16px}.badge.badge-ignore{background-color:#e5e5e5;color:#999}.badge.badge-info{background-color:#33b7d0}.badge.badge-primary{background-color:#348fe2}.badge.badge-success{background-color:#368142}.badge.badge-warning{background-color:#f57523}.badge.badge-danger{background-color:#d34242}.btn-success .badge{color:#fff}.label{display:inline-block;padding:5px 10px;margin:2px;font-size:13px;font-weight:400;background-color:#999}.label.label-sm{font-size:12px;padding:3px 8px 4px 8px;margin-top:0;border-radius:3px}.label.label-ignore{background-color:#e5e5e5;color:#aaa;text-shadow:-1px -1px 1px #fff}.label.label-info{background-color:#33b7d0}.label.label-primary{background-color:#348fe2}.label.label-success{background-color:#368142}.label.label-warning{background-color:#f57523}.label.label-danger{background-color:#d34242}.progress.progress-sm{height:18px;margin-bottom:2px;background-color:#aaa}.progress.progress-sm.button{cursor:pointer}.progress.progress-sm .progress-bar{display:block;font-size:11px;float:none}.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}.input-group :-moz-placeholder{color:#d2d2d2}.input-group ::-moz-placeholder{color:#d2d2d2}.input-group input:-ms-input-placeholder,.input-group textarea:-ms-input-placeholder{color:#d2d2d2}.input-group input::-webkit-input-placeholder,.input-group textarea::-webkit-input-placeholder{color:#d2d2d2}.modal .modal-content{border-radius:0}.modal .modal-header .close{margin-top:-4px;margin-right:-6px}.modal .modal-header .close:hover{color:#9c3023;opacity:1}.modal .modal-header .close:active,.modal .modal-header .close:focus,.modal .modal-header .close:visited{-webkit-appearance:none}.modal .form-horizontal .form-group,.modal .row{margin-left:0;margin-right:0}.alert{border-radius:0;padding:5px;margin-bottom:10px}.dropdown-menu{min-width:0;font-size:13px}.form-control-sm{padding:3px 5px;font-size:13px;height:inherit}.form-group .control-label.require{color:#505050;font-weight:bold}.form-group .control-label.require:before{font-weight:normal;color:#ac4e43;position:absolute;margin-left:-1.2em;margin-top:1px;content:"\f069";font-size:8px;font-family:'FontAwesome'}.form-group .control-desc{padding-top:6px;color:#999}label.form-control-static input{display:inline-block;position:relative;margin-top:4px}.control-desc .popover{max-width:none;font-size:13px}#gritter-notice-wrapper{z-index:9999}.gritter-bottom,.gritter-item,.gritter-top{background:rgba(0,0,0,0.8) !important}.gritter-top{border-top-left-radius:3px;border-top-right-radius:3px}.gritter-bottom{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.gritter-close,.gritter-light .gritter-close{left:auto !important;right:5px !important;top:5px !important;width:16px !important;height:16px !important;line-height:16px !important;display:block !important;border-radius:50%}.gritter-close:before,.gritter-light .gritter-close:before{content:'\f00d' !important;font-family:FontAwesome !important;font-size:9px !important;width:16px !important;height:16px !important;line-height:16px !important;color:#fff !important;text-indent:0 !important;position:absolute !important;text-align:center !important;right:0 !important;top:0 !important}.gritter-title{font-size:13px !important;line-height:16px !important;padding-bottom:5px !important;font-weight:400 !important;color:#fff !important;text-shadow:none !important}.gritter-item{color:#aaa !important;font-size:13px !important;padding:2px 15px 5px !important}.gritter-error .gritter-bottom,.gritter-error .gritter-item,.gritter-error .gritter-top{background:rgba(123,32,32,0.9) !important}.gritter-error .gritter-title{color:#fff !important}.gritter-error .gritter-item{color:#ddd !important}.gritter-error .gritter-close{left:auto !important;right:5px !important;top:5px !important;width:16px !important;height:16px !important;line-height:16px !important;display:block !important;border-radius:50%;background:#e33b3b !important}.gritter-success .gritter-bottom,.gritter-success .gritter-item,.gritter-success .gritter-top{background:rgba(1,65,16,0.9) !important}.gritter-success .gritter-title{color:#ddd !important}.gritter-success .gritter-item{color:#ccc !important}.gritter-success .gritter-close{background:#0eb320 !important}#gritter-notice-wrapper{width:320px;max-width:480px}.page-content-dashboard{padding:20px 25px}.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:10px;padding-left:10px}.stats{overflow:hidden;color:#686868;background-color:#fff;margin-bottom:10px}.stats.stats-id-host{border-top:5px solid #348fe2;background-color:#e7f1fb}.stats.stats-id-user{border-top:5px solid #f57523;background-color:#feefe6}.stats.stats-id-account{border-top:5px solid #d34242;background-color:#fae7e7}.stats.stats-id-connect{border-top:5px solid #368142;background-color:#def1e1}.stats.stats-box{position:relative;height:98px;box-shadow:1px 1px 2px rgba(0,0,0,0.3)}.stats.stats-box .stats-content{padding-left:20px}.stats.stats-box .stats-icon{font-size:130px;line-height:130px;top:5px;right:-20px;position:absolute;color:rgba(0,0,0,0.07)}.stats.stats-box .stats-name{font-size:16px;font-weight:500;padding-top:10px;color:rgba(0,0,0,0.6)}.stats.stats-box .stats-value{color:rgba(0,0,0,0.6);font-size:42px;font-weight:300;white-space:nowrap;padding-left:20px}.stats.stats-bar{position:relative;height:280px;padding:8px;box-shadow:1px 1px 2px rgba(0,0,0,0.3)}.stats.stats-bar .stats-name{font-size:14px;font-weight:500;color:rgba(0,0,0,0.6)}.stats.stats-bar .stats-value{margin-top:5px}.stats.stats-first{border-left:none}.stats a{color:#eee;color:rgba(255,255,255,0.7)}.stats a:hover{color:#fff}/*# sourceMappingURL=dashboard.css.map */ \ No newline at end of file +@charset "utf-8";html{font-size:13px}body{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;background-color:#e9e9e9;color:#333}html,body{height:100%}#page-container{min-width:1260px}a{text-decoration:none}a:link{text-decoration:none}a:hover{text-decoration:none}a:active{text-decoration:none}a:visited{text-decoration:none}select{outline:none}label{font-weight:normal}.clear-float{clear:both}.bigger{font-size:120%}.normal-text{font-size:13px;color:#333}.mono{font-family:Monaco,Lucida Console,Consolas,Courier,'Courier New',monospace}hr.hr-sm{margin-top:5px;margin-bottom:5px}.btn-single-line{white-space:nowrap}.btn-single-line .btn:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.btn-single-line .btn:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.remote-action-group{margin-bottom:3px;height:28px}.remote-action-group ul{display:block;height:28px;margin:0;padding:0}.remote-action-group ul 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}.remote-action-group ul li.remote-action-btn{background:none;padding:0;border:none}.remote-action-group ul li.remote-action-input{background:none;padding:4px 0}.remote-action-group ul li.remote-action-input select{border:none}.remote-action-group ul li.remote-action-chk-protocol{width:86px}.remote-action-group ul li.remote-action-state{text-align:center;white-space:nowrap}.remote-action-group ul li.remote-action-state.state-disabled{background-color:#e5e5e5;color:#aaa;text-shadow:-1px -1px 1px #fff}.remote-action-group ul li.remote-action-state.state-disabled>i.fa{color:#b53a2f}.remote-action-group ul li.remote-action-username,.remote-action-group ul li.remote-action-name,.remote-action-group ul li.remote-action-protocol{width:96px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remote-action-group ul li.remote-action-username{font-size:90%;color:#999}.remote-action-group ul li.remote-action-name,.remote-action-group ul li.remote-action-protocol,.remote-action-group ul li.remote-action-chk-protocol{color:#000}.remote-action-group ul li.remote-action-name,.remote-action-group ul li.remote-action-chk-protocol{font-weight:bold}.remote-action-group ul li.remote-action-password,.remote-action-group ul li.remote-action-sshkey,.remote-action-group ul li.remote-action-noauth{text-align:center;padding:4px 8px;width:45px}.remote-action-group ul li.remote-action-password{background-color:#e3ffe3;color:#999}.remote-action-group ul li.remote-action-sshkey{background-color:#fbe9c8;color:#666}.remote-action-group ul li.remote-action-noauth{background-color:#e0e0e0;color:#666}.remote-action-group ul li .btn{line-height:1.5;margin:0;padding:4px 8px;font-size:12px;border-radius:0}.remote-action-group ul li label{padding:0;display:block;float:left;margin-top:1px;cursor:pointer}.remote-action-group ul li input[type=checkbox]{display:block;float:left;margin:3px 5px 0 0}.remote-action-group ul li select{margin-top:-3px}.remote-action-group ul li:first-child{border-left:1px solid #ccc;border-top-left-radius:4px;border-bottom-left-radius:4px}.remote-action-group ul li.remote-action-btn:first-child{border:none}.remote-action-group ul li.remote-action-btn:first-child .btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.remote-action-group ul li:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.remote-action-group ul li.remote-action-btn:last-child{border:none}.remote-action-group ul li.remote-action-btn:last-child .btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.remote-info-group{margin-bottom:3px;height:28px}.remote-info-group ul{display:inline-block;height:28px;margin:0;padding:0}.remote-info-group ul li{float:left;position:relative;display:block;height:28px;padding:4px 5px;border-top:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc}.remote-info-group ul li.remote-action-btn{background:none;padding:0;border:none}.remote-info-group ul li.remote-action-input{background:none;padding:4px 0}.remote-info-group ul li.remote-action-input select{border:none}.remote-info-group ul li label{padding:0;display:block;float:left;margin-top:1px;cursor:pointer}.remote-info-group ul li select{margin-top:-3px}.remote-info-group ul li:first-child{border-left:1px solid #ccc;border-top-left-radius:4px;border-bottom-left-radius:4px}.remote-info-group ul li:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}hr.small{margin:5px 0}.dlg-protocol-group{margin-bottom:3px}.dlg-protocol-group ul{display:block;height:28px;margin:0;padding:0}.dlg-protocol-group ul 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}.dlg-protocol-group ul li.item-name{width:120px}.dlg-protocol-group ul li.item-btn{background:none;padding:0;border:none}.dlg-protocol-group ul li.item-input{background:none;border:none;padding:0}.dlg-protocol-group ul li .form-control{line-height:1.5;margin:0;padding:4px 5px;font-size:12px;height:28px;border-radius:0;border-left:none;width:100px}.dlg-protocol-group ul li label{padding:0;display:block;float:left;margin-top:1px;cursor:pointer}.dlg-protocol-group ul li input[type=checkbox]{display:block;float:left;margin:3px 5px 0 0}.dlg-protocol-group ul li:first-child{border-left:1px solid #ccc;border-top-left-radius:4px;border-bottom-left-radius:4px}.dlg-protocol-group ul li:first-child .btn,.dlg-protocol-group ul li:first-child .form-control{border-top-left-radius:4px;border-bottom-left-radius:4px}.dlg-protocol-group ul li:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.dlg-protocol-group ul li:last-child .btn,.dlg-protocol-group ul li:last-child .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.os-icon-windows:after{color:#00bcf6;content:"\f17a";font-size:18px;width:24px;height:24px;line-height:24px;display:inline-block;font-family:'FontAwesome'}.os-icon-linux:after{color:#fff;content:"\f17c";font-size:18px;width:24px;height:24px;line-height:24px;background-color:#333;border-radius:50%;display:inline-block;font-family:'FontAwesome'}.os-icon-macos:after{color:#a7a7a7;content:"\f179";font-size:20px;width:24px;height:24px;line-height:24px;display:inline-block;font-family:'FontAwesome'}.os-icon-ubuntu:after,.os-icon-debian:after,.os-icon-centos:after,.os-icon-redhat:after{content:" ";width:24px;height:24px;line-height:24px;display:inline-block}.os-icon-ubuntu:after{background:url(../img/os-icon/ubuntu-24x24.png) no-repeat}.os-icon-debian:after{background:url(../img/os-icon/debian-24x24.png) no-repeat}.os-icon-centos:after{background:url(../img/os-icon/centos-24x24.png) no-repeat}.os-icon-redhat:after{background:url(../img/os-icon/redhat-24x24.png) no-repeat}.disable-bg{position:absolute;background:url(../img/css/disable-bg.png) repeat;opacity:.45;z-index:990}.disable-message{display:inline-block;font-size:160%;position:absolute;padding:20px 40px;border:1px solid #2b0002;background-color:#65181a;color:#fff;opacity:.85;z-index:991}.btn-group-sm>.btn{padding:3px 5px;font-size:12px}.pop-menu-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040}.form-group{margin-bottom:5px}.badge{padding:3px 6px;border-radius:10px;font-size:13px;font-weight:400;background-color:#999}.badge.badge-sm{font-size:12px;padding:3px 5px;margin-top:0;border-radius:8px;text-shadow:none}.badge.badge-sup{margin-left:-8px;margin-top:-16px}.badge.badge-ignore{background-color:#e5e5e5;color:#999}.badge.badge-info{background-color:#33b7d0}.badge.badge-primary{background-color:#348fe2}.badge.badge-success{background-color:#368142}.badge.badge-warning{background-color:#f57523}.badge.badge-danger{background-color:#d34242}.btn-success .badge{color:#fff}.label{display:inline-block;padding:5px 10px;margin:2px;font-size:13px;font-weight:400;background-color:#999}.label.label-sm{font-size:12px;padding:3px 8px 4px 8px;margin-top:0;border-radius:3px}.label.label-ignore{background-color:#e5e5e5;color:#aaa;text-shadow:-1px -1px 1px #fff}.label.label-info{background-color:#33b7d0}.label.label-primary{background-color:#348fe2}.label.label-success{background-color:#368142}.label.label-warning{background-color:#f57523}.label.label-danger{background-color:#d34242}.progress.progress-sm{height:18px;margin-bottom:2px;background-color:#aaa}.progress.progress-sm.button{cursor:pointer}.progress.progress-sm .progress-bar{display:block;font-size:11px;float:none}.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}.input-group :-moz-placeholder{color:#d2d2d2}.input-group ::-moz-placeholder{color:#d2d2d2}.input-group input:-ms-input-placeholder,.input-group textarea:-ms-input-placeholder{color:#d2d2d2}.input-group input::-webkit-input-placeholder,.input-group textarea::-webkit-input-placeholder{color:#d2d2d2}.modal .modal-content{border-radius:0}.modal .modal-header .close{margin-top:-4px;margin-right:-6px}.modal .modal-header .close:hover{color:#9c3023;opacity:1}.modal .modal-header .close:active,.modal .modal-header .close:focus,.modal .modal-header .close:visited{-webkit-appearance:none}.modal .form-horizontal .form-group,.modal .row{margin-left:0;margin-right:0}.alert{border-radius:0;padding:5px;margin-bottom:10px}.dropdown-menu{min-width:0;font-size:13px}.form-control-sm{padding:3px 5px;font-size:13px;height:inherit}.form-group .control-label.require{color:#505050;font-weight:bold}.form-group .control-label.require:before{font-weight:normal;color:#ac4e43;position:absolute;margin-left:-1.2em;margin-top:1px;content:"\f069";font-size:8px;font-family:'FontAwesome'}.form-group .control-desc{padding-top:6px;color:#999}label.form-control-static input{display:inline-block;position:relative;margin-top:4px}.control-desc .popover{max-width:none;font-size:13px}#gritter-notice-wrapper{z-index:9999}.gritter-bottom,.gritter-item,.gritter-top{background:rgba(0,0,0,0.8) !important}.gritter-top{border-top-left-radius:3px;border-top-right-radius:3px}.gritter-bottom{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.gritter-close,.gritter-light .gritter-close{left:auto !important;right:5px !important;top:5px !important;width:16px !important;height:16px !important;line-height:16px !important;display:block !important;border-radius:50%}.gritter-close:before,.gritter-light .gritter-close:before{content:'\f00d' !important;font-family:FontAwesome !important;font-size:9px !important;width:16px !important;height:16px !important;line-height:16px !important;color:#fff !important;text-indent:0 !important;position:absolute !important;text-align:center !important;right:0 !important;top:0 !important}.gritter-title{font-size:13px !important;line-height:16px !important;padding-bottom:5px !important;font-weight:400 !important;color:#fff !important;text-shadow:none !important}.gritter-item{color:#aaa !important;font-size:13px !important;padding:2px 15px 5px !important}.gritter-error .gritter-bottom,.gritter-error .gritter-item,.gritter-error .gritter-top{background:rgba(123,32,32,0.9) !important}.gritter-error .gritter-title{color:#fff !important}.gritter-error .gritter-item{color:#ddd !important}.gritter-error .gritter-close{left:auto !important;right:5px !important;top:5px !important;width:16px !important;height:16px !important;line-height:16px !important;display:block !important;border-radius:50%;background:#e33b3b !important}.gritter-success .gritter-bottom,.gritter-success .gritter-item,.gritter-success .gritter-top{background:rgba(1,65,16,0.9) !important}.gritter-success .gritter-title{color:#ddd !important}.gritter-success .gritter-item{color:#ccc !important}.gritter-success .gritter-close{background:#0eb320 !important}#gritter-notice-wrapper{width:320px;max-width:480px}.page-content-dashboard{padding:20px 25px}.sys-msg{border:1px solid #ff8987;border-radius:5px;background-color:#ffbdb7;padding:10px;margin-bottom:10px;text-align:center;display:none}.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:10px;padding-left:10px}.stats{overflow:hidden;color:#686868;background-color:#fff;margin-bottom:10px}.stats.stats-id-host{border-top:5px solid #348fe2;background-color:#e7f1fb}.stats.stats-id-user{border-top:5px solid #f57523;background-color:#feefe6}.stats.stats-id-account{border-top:5px solid #d34242;background-color:#fae7e7}.stats.stats-id-connect{border-top:5px solid #368142;background-color:#def1e1}.stats.stats-box{position:relative;height:98px;box-shadow:1px 1px 2px rgba(0,0,0,0.3)}.stats.stats-box .stats-content{padding-left:20px}.stats.stats-box .stats-icon{font-size:130px;line-height:130px;top:5px;right:-40px;position:absolute;color:rgba(0,0,0,0.07)}.stats.stats-box .stats-name{font-size:16px;font-weight:500;padding-top:10px;color:rgba(0,0,0,0.6)}.stats.stats-box .stats-value{color:rgba(0,0,0,0.6);font-size:42px;font-weight:300;white-space:nowrap;padding-left:20px}.stats.stats-bar{position:relative;height:280px;padding:8px;box-shadow:1px 1px 2px rgba(0,0,0,0.3)}.stats.stats-bar .stats-name{font-size:14px;font-weight:500;color:rgba(0,0,0,0.6)}.stats.stats-bar .stats-value{margin-top:5px}.stats.stats-first{border-left:none}.stats a{color:#eee;color:rgba(255,255,255,0.7)}.stats a:hover{color:#fff}/*# sourceMappingURL=dashboard.css.map */ \ No newline at end of file diff --git a/server/www/teleport/static/js/asset/host-list.js b/server/www/teleport/static/js/asset/host-list.js index a81e782..4a9ce98 100644 --- a/server/www/teleport/static/js/asset/host-list.js +++ b/server/www/teleport/static/js/asset/host-list.js @@ -965,14 +965,10 @@ $app.create_dlg_accounts = function () { dlg.dom_id = 'dlg-accounts'; dlg.host_row_id = -1; dlg.host = null; - dlg.accounts = []; - // dlg.row_id = -1; dlg.dom = { dialog: $('#' + dlg.dom_id), dlg_title: $('#' + dlg.dom_id + ' [data-field="dlg-title"]'), - // info: $('#' + dlg.dom_id + ' [data-field="user-info"]'), - //btn_add: $('#' + dlg.dom_id + ' [data-btn="btn-add-account"]'), btn_refresh_acc: $('#btn-refresh-acc'), btn_add_acc: $('#btn-add-acc'), @@ -980,9 +976,7 @@ $app.create_dlg_accounts = function () { btn_lock_acc: $('#btn-lock-acc'), btn_unlock_acc: $('#btn-unlock-acc'), - btn_remove_acc: $('#btn-remove-acc'), - - acc_list: $('#' + dlg.dom_id + ' [data-field="account-list"]') + btn_remove_acc: $('#btn-remove-acc') }; dlg.init = function (cb_stack) { @@ -1067,42 +1061,26 @@ $app.create_dlg_accounts = function () { }; $app.table_acc = $tp.create_table(table_acc_options); - cb_stack - //.add($app.table_host.load_data) - .add($app.table_acc.init); - - //------------------------------- - // 账号列表相关过滤器 - //------------------------------- - // $tp.create_table_header_filter_search($app.table_host, { - // name: 'search', - // place_holder: '搜索:主机IP/名称/描述/资产编号/等等...' - // }); - // $app.table_host_role_filter = $tp.create_table_filter_role($app.table_host, $app.role_list); - // 主机没有“临时锁定”状态,因此要排除掉 - // $tp.create_table_header_filter_state($app.table_host, 'state', $app.obj_states, [TP_STATE_LOCKED]); - - // 从cookie中读取用户分页限制的选择 - // $tp.create_table_paging($app.table_acc, 'table-acc-paging', - // { - // per_page: Cookies.get($app.page_id('asset_host') + '_acc_per_page'), - // on_per_page_changed: function (per_page) { - // Cookies.set($app.page_id('asset_host') + '_acc_per_page', per_page, {expires: 365}); - // } - // }); - // $tp.create_table_pagination($app.table_acc, 'table-acc-pagination'); - + cb_stack.add($app.table_acc.init); dlg.dom.btn_add_acc.click(function () { - // dlg.show_edit_account = true; $app.dlg_edit_account.show_add(dlg.host_row_id); }); - dlg.dom.btn_refresh_acc.click(function () { dlg.load_accounts(); }); + dlg.dom.btn_lock_acc.click(function () { + dlg.on_btn_lock_acc_click(); + }); + dlg.dom.btn_unlock_acc.click(function () { + dlg.on_btn_unlock_acc_click(); + }); + dlg.dom.btn_remove_acc.click(function () { + dlg.on_btn_remove_acc_click(); + }); + dlg.dom.chkbox_acc_select_all.click(function () { var _objects = $('#' + $app.table_acc.dom_id + ' tbody').find('[data-check-box]'); if ($(this).is(':checked')) { @@ -1115,26 +1093,16 @@ $app.create_dlg_accounts = function () { }); } }); - dlg.dom.btn_lock_acc.click(function () { - $app.on_btn_lock_acc_click(); - }); - dlg.dom.btn_unlock_acc.click(function () { - $app.on_btn_unlock_acc_click(); - }); - dlg.dom.btn_remove_acc.click(function () { - $app.on_btn_remove_acc_click(); - }); cb_stack.exec(); }; - dlg.get_selected_host = function (tbl) { + dlg.get_selected_acc = function (tbl) { var items = []; - var _objs = $('#' + $app.table_acc.dom_id + ' tbody tr td input[data-check-box]'); + var _objs = $('#' + tbl.dom_id + ' tbody tr td input[data-check-box]'); $.each(_objs, function (i, _obj) { if ($(_obj).is(':checked')) { var _row_data = tbl.get_row(_obj); - // _all_checked = false; items.push(_row_data.id); } }); @@ -1142,65 +1110,80 @@ $app.create_dlg_accounts = function () { }; dlg._lock_acc = function (acc_ids) { - $tp.ajax_post_json('/asset/update-hosts', {action: 'lock', hosts: host_ids}, + $tp.ajax_post_json('/asset/update-accounts', {action: 'lock', host_id: dlg.host.id, accounts: acc_ids}, function (ret) { if (ret.code === TPE_OK) { - $app.table_host.load_data(); - $tp.notify_success('禁用主机操作成功!'); + CALLBACK_STACK.create() + .add(dlg.check_acc_all_selected) + .add(dlg.load_accounts) + .exec(); + $tp.notify_success('禁用账号操作成功!'); } else { - $tp.notify_error('禁用主机操作失败:' + tp_error_msg(ret.code, ret.message)); + $tp.notify_error('禁用账号操作失败:' + tp_error_msg(ret.code, ret.message)); } }, function () { - $tp.notify_error('网络故障,禁用主机操作失败!'); + $tp.notify_error('网络故障,禁用账号操作失败!'); } ); }; - dlg.on_btn_lock_host_click = function () { + dlg.on_btn_lock_acc_click = function () { var items = dlg.get_selected_acc($app.table_acc); if (items.length === 0) { - $tp.notify_error('请选择要禁用的主机!'); + $tp.notify_error('请选择要禁用的账号!'); return; } - $app._lock_hosts(items); + dlg._lock_acc(items); }; - $app._unlock_hosts = function (host_ids) { - $tp.ajax_post_json('/asset/update-hosts', {action: 'unlock', hosts: host_ids}, + dlg._unlock_acc = function (acc_ids) { + $tp.ajax_post_json('/asset/update-accounts', {action: 'unlock', host_id: dlg.host.id, accounts: acc_ids}, function (ret) { if (ret.code === TPE_OK) { - $app.table_host.load_data(); - $tp.notify_success('解禁主机操作成功!'); + CALLBACK_STACK.create() + .add(dlg.check_acc_all_selected) + .add(dlg.load_accounts) + .exec(); + dlg.load_accounts(); + $tp.notify_success('解禁账号操作成功!'); } else { - $tp.notify_error('解禁主机操作失败:' + tp_error_msg(ret.code, ret.message)); + $tp.notify_error('解禁账号操作失败:' + tp_error_msg(ret.code, ret.message)); } }, function () { - $tp.notify_error('网络故障,解禁主机操作失败!'); + $tp.notify_error('网络故障,解禁账号操作失败!'); } ); }; - $app.on_btn_unlock_host_click = function () { - var items = $app.get_selected_host($app.table_host); + dlg.on_btn_unlock_acc_click = function () { + var items = dlg.get_selected_acc($app.table_acc); if (items.length === 0) { - $tp.notify_error('请选择要解禁的主机!'); + $tp.notify_error('请选择要解禁的账号!'); return; } - $app._unlock_hosts(items); + dlg._unlock_acc(items); }; - $app._remove_hosts = function (host_ids) { + dlg._remove_acc = function (acc_ids) { var _fn_sure = function (cb_stack) { - $tp.ajax_post_json('/asset/update-hosts', {action: 'remove', hosts: host_ids}, + $tp.ajax_post_json('/asset/update-accounts', {action: 'remove', host_id: dlg.host.id, accounts: acc_ids}, function (ret) { if (ret.code === TPE_OK) { - cb_stack.add($app.check_host_all_selected); - cb_stack.add($app.table_host.load_data); + cb_stack + .add(dlg.check_acc_all_selected) + .add(dlg.load_accounts) + .exec(); $tp.notify_success('删除主机操作成功!'); + + var update_args = { + acc_count: dlg.host.acc_count - acc_ids.length + }; + $app.table_host.update_row(dlg.host_row_id, update_args); + } else { $tp.notify_error('删除主机操作失败:' + tp_error_msg(ret.code, ret.message)); } @@ -1216,185 +1199,49 @@ $app.create_dlg_accounts = function () { var cb_stack = CALLBACK_STACK.create(); $tp.dlg_confirm(cb_stack, { - msg: '
注意:删除操作不可恢复!!
删除主机将同时删除与之相关的账号,并将主机和账号从所在分组中移除,同时删除所有相关授权!
如果您希望临时禁止登录指定主机,可将其“禁用”!
您确定要移除选定的' + host_ids.length + '个主机吗?
', + msg: '注意:删除操作不可恢复!!
如果您希望临时禁止以指定账号登录远程主机,可将其“禁用”!
您确定要移除选定的' + acc_ids.length + '个账号吗?
', fn_yes: _fn_sure }); }; + dlg.on_btn_remove_acc_click = function () { + var items = dlg.get_selected_acc($app.table_acc); + if (items.length === 0) { + $tp.notify_error('请选择要删除的账号!'); + return; + } + + dlg._remove_acc(items); + }; dlg.show = function (host_row_id) { - dlg.dom.acc_list.empty().html(' 正在加载...'); dlg.host_row_id = host_row_id; dlg.host = $app.table_host.get_row(host_row_id); dlg.dom.dialog.modal(); dlg.load_accounts(); }; - dlg.load_accounts = function () { - $tp.ajax_post_json('/asset/get-accounts', { - host_id: dlg.host.id - }, + dlg.load_accounts = function (cb_stack) { + cb_stack = cb_stack || CALLBACK_STACK.create(); + + $tp.ajax_post_json('/asset/get-accounts', {host_id: dlg.host.id}, function (ret) { if (ret.code === TPE_OK) { console.log('account:', ret.data); - var cb_stack = CALLBACK_STACK.create(); $app.table_acc.set_data(cb_stack, {}, {total: ret.data.length, page_index: 1, data: ret.data}); - //$app.table_acc.set_data(cb_stack, {}, ret.data); - dlg.accounts = ret.data; } else { - // $tp.notify_error('远程账号' + action + '失败:' + tp_error_msg(ret.code, ret.message)); + $app.table_acc.set_data(cb_stack, {}, {total: 0, page_index: 1, data: {}}); console.error('failed.', tp_error_msg(ret.code, ret.message)); - dlg.accounts = []; } - dlg.show_account_list(); + cb_stack.exec(); }, function () { $tp.notify_error('网络故障,获取账号信息失败!'); + cb_stack.exec(); } ); }; - dlg.show_account_list = function () { - var html = []; - if (dlg.accounts.length === 0) { - dlg.dom.acc_list.empty(); - return; - } - - for (var i = 0; i < dlg.accounts.length; ++i) { - var acc = dlg.accounts[i]; - var pro_name = '未知'; - if (acc.protocol_type === TP_PROTOCOL_TYPE_RDP) { - pro_name = 'RDP'; - } else if (acc.protocol_type === TP_PROTOCOL_TYPE_SSH) { - pro_name = 'SSH'; - } else if (acc.protocol_type === TP_PROTOCOL_TYPE_TELNET) { - pro_name = 'TELNET'; - } - var auth_name = "未知"; - if (acc.auth_type === TP_AUTH_TYPE_NONE) { - auth_name = '无'; - } else if (acc.auth_type === TP_AUTH_TYPE_PASSWORD) { - auth_name = '密码'; - } else if (acc.auth_type === TP_AUTH_TYPE_PRIVATE_KEY) { - auth_name = '私钥'; - } - - html.push('注意:删除操作不可恢复!!
如果您只是想临时禁止以此账号登录远程主机,可以禁用此账号。
您确定要删除此远程账号吗?
', - fn_yes: _fn_sure - }); - - }); - - // 禁用账号 - $('#' + dlg.dom_id + ' [data-action="lock-account"]').click(function () { - var acc_id = parseInt($(this).attr('data-id')); - - $tp.ajax_post_json('/asset/update-account', {action: 'lock', host_id: dlg.host.id, acc_id: acc_id}, - function (ret) { - if (ret.code === TPE_OK) { - $tp.notify_success('远程账号已禁用!'); - dlg.load_accounts(); - } else { - $tp.notify_error('禁用远程账号操作失败:' + tp_error_msg(ret.code, ret.message)); - } - }, - function () { - $tp.notify_error('网络故障,禁用远程账号操作失败!'); - } - ); - }); - - // 解禁账号 - $('#' + dlg.dom_id + ' [data-action="unlock-account"]').click(function () { - var acc_id = parseInt($(this).attr('data-id')); - - $tp.ajax_post_json('/asset/update-account', {action: 'unlock', host_id: dlg.host.id, acc_id: acc_id}, - function (ret) { - if (ret.code === TPE_OK) { - $tp.notify_success('远程账号解禁成功!'); - dlg.load_accounts(); - } else { - $tp.notify_error('远程账号解禁失败:' + tp_error_msg(ret.code, ret.message)); - } - }, - function () { - $tp.notify_error('网络故障,远程账号解禁失败!'); - } - ); - }); - }; - //------------------------------- // 账号表格相关 //------------------------------- @@ -1579,9 +1426,9 @@ $app.create_dlg_accounts = function () { } if (_all_checked) { - $app.dlg_accounts.dom.chkbox_acc_select_all.prop('checked', true); + dlg.dom.chkbox_acc_select_all.prop('checked', true); } else { - $app.dlg_accounts.dom.chkbox_acc_select_all.prop('checked', false); + dlg.dom.chkbox_acc_select_all.prop('checked', false); } if (cb_stack) @@ -1839,7 +1686,6 @@ $app.create_dlg_edit_account = function () { // 如果id为-1表示创建,否则表示更新 $tp.ajax_post_json('/asset/update-account', { - action: 'update', host_id: dlg.host.id, acc_id: dlg.field_id, param: { diff --git a/server/www/teleport/static/js/auth/login.js b/server/www/teleport/static/js/auth/login.js index 037fefc..90eeb43 100644 --- a/server/www/teleport/static/js/auth/login.js +++ b/server/www/teleport/static/js/auth/login.js @@ -1,6 +1,15 @@ "use strict"; -var BLUR_BG_COUNT = 8; +var BLUR_BG_IMG = [ + 'login-bg-0.png', + 'login-bg-1.png', + 'login-bg-2.png', + 'login-bg-3.png', + 'login-bg-4.png', + 'login-bg-5.png', + 'login-bg-6.png', + 'login-bg-7.png' +]; var SLOGAN = [ '我感谢那段时光,