| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
- background: #f5f5f5;
- color: #333;
- }
- .container {
- display: flex;
- flex-direction: column;
- height: 100vh;
- }
- header {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- padding: 20px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
- }
- header h1 {
- font-size: 24px;
- }
- .controls {
- display: flex;
- gap: 10px;
- align-items: center;
- }
- .topology-selector {
- padding: 10px 15px;
- border: none;
- border-radius: 5px;
- font-size: 14px;
- background: rgba(255, 255, 255, 0.9);
- color: #333;
- min-width: 200px;
- cursor: pointer;
- transition: all 0.3s;
- }
- .topology-selector:hover {
- background: white;
- box-shadow: 0 4px 8px rgba(0,0,0,0.2);
- }
- .btn {
- padding: 10px 20px;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- font-size: 14px;
- transition: all 0.3s;
- }
- .btn:hover {
- transform: translateY(-2px);
- box-shadow: 0 4px 8px rgba(0,0,0,0.2);
- }
- .btn-primary {
- background: #4CAF50;
- color: white;
- }
- .btn-success {
- background: #2196F3;
- color: white;
- }
- .btn-info {
- background: #FF9800;
- color: white;
- }
- .btn-secondary {
- background: #607D8B;
- color: white;
- }
- .btn-danger {
- background: #f44336;
- color: white;
- }
- .main-content {
- display: flex;
- flex: 1;
- overflow: hidden;
- }
- .sidebar {
- width: 300px;
- min-width: 200px;
- max-width: 600px;
- background: white;
- padding: 20px;
- overflow-y: auto;
- box-shadow: 2px 0 5px rgba(0,0,0,0.1);
- }
- .panel {
- margin-bottom: 20px;
- padding: 15px;
- background: #fafafa;
- border-radius: 8px;
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
- }
- .panel h3 {
- margin-bottom: 15px;
- color: #667eea;
- font-size: 16px;
- }
- .form-group {
- margin-bottom: 15px;
- }
- .form-group label {
- display: block;
- margin-bottom: 5px;
- font-weight: 500;
- font-size: 14px;
- }
- .form-group input,
- .form-group select {
- width: 100%;
- padding: 8px;
- border: 1px solid #ddd;
- border-radius: 4px;
- font-size: 14px;
- }
- .progress-bar {
- width: 100%;
- height: 20px;
- background: #e0e0e0;
- border-radius: 10px;
- overflow: hidden;
- margin-top: 10px;
- }
- .progress-fill {
- height: 100%;
- background: linear-gradient(90deg, #4CAF50, #45a049);
- width: 0%;
- transition: width 0.3s;
- }
- .device-list {
- max-height: 300px;
- overflow-y: auto;
- }
- .device-item {
- padding: 10px;
- margin-bottom: 10px;
- background: white;
- border-radius: 5px;
- cursor: pointer;
- transition: all 0.2s;
- border-left: 3px solid #667eea;
- }
- .device-item:hover {
- background: #f0f0f0;
- transform: translateX(5px);
- }
- .device-item .ip {
- font-weight: bold;
- color: #667eea;
- }
- .device-item .type {
- font-size: 12px;
- color: #666;
- margin-top: 5px;
- }
- .content {
- flex: 1;
- position: relative;
- min-width: 400px;
- }
- #cy {
- width: 100%;
- height: 100%;
- background: white;
- }
- .detail-panel {
- width: 600px;
- min-width: 300px;
- max-width: 1000px;
- background: white;
- padding: 20px;
- overflow-y: auto;
- box-shadow: -2px 0 5px rgba(0,0,0,0.1);
- display: none;
- position: relative;
- }
- .detail-panel.active {
- display: block;
- }
- /* 拖拽手柄样式 */
- .resizer {
- width: 5px;
- cursor: col-resize;
- background: #e0e0e0;
- position: relative;
- z-index: 10;
- transition: background 0.2s;
- }
- .resizer:hover,
- .resizer.resizing {
- background: #667eea;
- }
- .resizer::after {
- content: '';
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 3px;
- height: 30px;
- background: rgba(0, 0, 0, 0.2);
- border-radius: 2px;
- }
- .detail-panel h3 {
- margin-bottom: 15px;
- color: #667eea;
- }
- .detail-section {
- margin-bottom: 20px;
- }
- .detail-section h4 {
- margin-bottom: 10px;
- color: #333;
- font-size: 14px;
- }
- .interface-item {
- padding: 10px;
- margin-bottom: 10px;
- background: #f9f9f9;
- border-radius: 5px;
- border-left: 3px solid #2196F3;
- }
- .interface-item .name {
- font-weight: bold;
- color: #2196F3;
- }
- .interface-item .info {
- font-size: 12px;
- color: #666;
- margin-top: 5px;
- }
- .modal {
- display: none;
- position: fixed;
- z-index: 1000;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- background: rgba(0,0,0,0.5);
- }
- .modal.active {
- display: block;
- }
- .modal-content {
- background: white;
- margin: 10% auto;
- padding: 30px;
- border-radius: 10px;
- width: 500px;
- position: relative;
- }
- .close {
- position: absolute;
- right: 20px;
- top: 20px;
- font-size: 28px;
- font-weight: bold;
- cursor: pointer;
- color: #999;
- }
- .close:hover {
- color: #333;
- }
- .status-up {
- color: #4CAF50;
- font-weight: bold;
- }
- .status-down {
- color: #f44336;
- font-weight: bold;
- }
- .status-admin-down {
- color: #FF9800;
- font-weight: bold;
- }
- /* SSH终端样式 */
- .terminal-modal-content {
- width: 95vw;
- max-width: 1200px;
- margin: 20px auto;
- max-height: 90vh;
- display: flex;
- flex-direction: column;
- cursor: default;
- }
- .terminal-modal-content .modal-header-drag {
- cursor: move;
- padding-bottom: 10px;
- border-bottom: 1px solid #eee;
- margin-bottom: 5px;
- user-select: none;
- }
- .terminal-container {
- width: 100%;
- height: calc(85vh - 80px);
- background: #1e1e1e;
- border-radius: 5px;
- overflow: hidden;
- margin-top: 10px;
- }
- .terminal-status {
- margin-top: 10px;
- font-size: 12px;
- color: #999;
- text-align: right;
- }
- .terminal-status.connected {
- color: #4CAF50;
- }
- /* 设备选择器样式 */
- .select-devices-modal-content {
- width: 600px;
- max-width: 90vw;
- }
- .select-devices-toolbar {
- display: flex;
- align-items: center;
- gap: 15px;
- margin-bottom: 15px;
- padding-bottom: 10px;
- border-bottom: 1px solid #eee;
- }
- .btn-sm {
- padding: 6px 14px;
- font-size: 13px;
- }
- .selected-count {
- font-size: 13px;
- color: #666;
- }
- .device-pool-list {
- max-height: 400px;
- overflow-y: auto;
- }
- .device-pool-item {
- display: flex;
- align-items: center;
- padding: 10px;
- margin-bottom: 8px;
- background: #f9f9f9;
- border-radius: 5px;
- cursor: pointer;
- transition: all 0.2s;
- border-left: 3px solid #ddd;
- }
- .device-pool-item:hover {
- background: #f0f0f0;
- border-left-color: #667eea;
- }
- .device-pool-item.selected {
- background: #e8f5e9;
- border-left-color: #4CAF50;
- }
- .device-pool-item input[type="checkbox"] {
- margin-right: 12px;
- width: 18px;
- height: 18px;
- cursor: pointer;
- }
- .device-pool-item .device-info {
- flex: 1;
- }
- .device-pool-item .device-ip {
- font-weight: bold;
- color: #667eea;
- }
- .device-pool-item .device-type {
- font-size: 12px;
- color: #666;
- margin-top: 3px;
- }
|