446 righe
6.9 KiB
CSS
446 righe
6.9 KiB
CSS
* {
|
|
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;
|
|
}
|