style.css 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. box-sizing: border-box;
  5. }
  6. body {
  7. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  8. background: #f5f5f5;
  9. color: #333;
  10. }
  11. .container {
  12. display: flex;
  13. flex-direction: column;
  14. height: 100vh;
  15. }
  16. header {
  17. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  18. color: white;
  19. padding: 20px;
  20. display: flex;
  21. justify-content: space-between;
  22. align-items: center;
  23. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  24. }
  25. header h1 {
  26. font-size: 24px;
  27. }
  28. .controls {
  29. display: flex;
  30. gap: 10px;
  31. align-items: center;
  32. }
  33. .topology-selector {
  34. padding: 10px 15px;
  35. border: none;
  36. border-radius: 5px;
  37. font-size: 14px;
  38. background: rgba(255, 255, 255, 0.9);
  39. color: #333;
  40. min-width: 200px;
  41. cursor: pointer;
  42. transition: all 0.3s;
  43. }
  44. .topology-selector:hover {
  45. background: white;
  46. box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  47. }
  48. .btn {
  49. padding: 10px 20px;
  50. border: none;
  51. border-radius: 5px;
  52. cursor: pointer;
  53. font-size: 14px;
  54. transition: all 0.3s;
  55. }
  56. .btn:hover {
  57. transform: translateY(-2px);
  58. box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  59. }
  60. .btn-primary {
  61. background: #4CAF50;
  62. color: white;
  63. }
  64. .btn-success {
  65. background: #2196F3;
  66. color: white;
  67. }
  68. .btn-info {
  69. background: #FF9800;
  70. color: white;
  71. }
  72. .btn-secondary {
  73. background: #607D8B;
  74. color: white;
  75. }
  76. .btn-danger {
  77. background: #f44336;
  78. color: white;
  79. }
  80. .main-content {
  81. display: flex;
  82. flex: 1;
  83. overflow: hidden;
  84. }
  85. .sidebar {
  86. width: 300px;
  87. min-width: 200px;
  88. max-width: 600px;
  89. background: white;
  90. padding: 20px;
  91. overflow-y: auto;
  92. box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  93. }
  94. .panel {
  95. margin-bottom: 20px;
  96. padding: 15px;
  97. background: #fafafa;
  98. border-radius: 8px;
  99. box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  100. }
  101. .panel h3 {
  102. margin-bottom: 15px;
  103. color: #667eea;
  104. font-size: 16px;
  105. }
  106. .form-group {
  107. margin-bottom: 15px;
  108. }
  109. .form-group label {
  110. display: block;
  111. margin-bottom: 5px;
  112. font-weight: 500;
  113. font-size: 14px;
  114. }
  115. .form-group input,
  116. .form-group select {
  117. width: 100%;
  118. padding: 8px;
  119. border: 1px solid #ddd;
  120. border-radius: 4px;
  121. font-size: 14px;
  122. }
  123. .progress-bar {
  124. width: 100%;
  125. height: 20px;
  126. background: #e0e0e0;
  127. border-radius: 10px;
  128. overflow: hidden;
  129. margin-top: 10px;
  130. }
  131. .progress-fill {
  132. height: 100%;
  133. background: linear-gradient(90deg, #4CAF50, #45a049);
  134. width: 0%;
  135. transition: width 0.3s;
  136. }
  137. .device-list {
  138. max-height: 300px;
  139. overflow-y: auto;
  140. }
  141. .device-item {
  142. padding: 10px;
  143. margin-bottom: 10px;
  144. background: white;
  145. border-radius: 5px;
  146. cursor: pointer;
  147. transition: all 0.2s;
  148. border-left: 3px solid #667eea;
  149. }
  150. .device-item:hover {
  151. background: #f0f0f0;
  152. transform: translateX(5px);
  153. }
  154. .device-item .ip {
  155. font-weight: bold;
  156. color: #667eea;
  157. }
  158. .device-item .type {
  159. font-size: 12px;
  160. color: #666;
  161. margin-top: 5px;
  162. }
  163. .content {
  164. flex: 1;
  165. position: relative;
  166. min-width: 400px;
  167. }
  168. #cy {
  169. width: 100%;
  170. height: 100%;
  171. background: white;
  172. }
  173. .detail-panel {
  174. width: 600px;
  175. min-width: 300px;
  176. max-width: 1000px;
  177. background: white;
  178. padding: 20px;
  179. overflow-y: auto;
  180. box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  181. display: none;
  182. position: relative;
  183. }
  184. .detail-panel.active {
  185. display: block;
  186. }
  187. /* 拖拽手柄样式 */
  188. .resizer {
  189. width: 5px;
  190. cursor: col-resize;
  191. background: #e0e0e0;
  192. position: relative;
  193. z-index: 10;
  194. transition: background 0.2s;
  195. }
  196. .resizer:hover,
  197. .resizer.resizing {
  198. background: #667eea;
  199. }
  200. .resizer::after {
  201. content: '';
  202. position: absolute;
  203. top: 50%;
  204. left: 50%;
  205. transform: translate(-50%, -50%);
  206. width: 3px;
  207. height: 30px;
  208. background: rgba(0, 0, 0, 0.2);
  209. border-radius: 2px;
  210. }
  211. .detail-panel h3 {
  212. margin-bottom: 15px;
  213. color: #667eea;
  214. }
  215. .detail-section {
  216. margin-bottom: 20px;
  217. }
  218. .detail-section h4 {
  219. margin-bottom: 10px;
  220. color: #333;
  221. font-size: 14px;
  222. }
  223. .interface-item {
  224. padding: 10px;
  225. margin-bottom: 10px;
  226. background: #f9f9f9;
  227. border-radius: 5px;
  228. border-left: 3px solid #2196F3;
  229. }
  230. .interface-item .name {
  231. font-weight: bold;
  232. color: #2196F3;
  233. }
  234. .interface-item .info {
  235. font-size: 12px;
  236. color: #666;
  237. margin-top: 5px;
  238. }
  239. .modal {
  240. display: none;
  241. position: fixed;
  242. z-index: 1000;
  243. left: 0;
  244. top: 0;
  245. width: 100%;
  246. height: 100%;
  247. background: rgba(0,0,0,0.5);
  248. }
  249. .modal.active {
  250. display: block;
  251. }
  252. .modal-content {
  253. background: white;
  254. margin: 10% auto;
  255. padding: 30px;
  256. border-radius: 10px;
  257. width: 500px;
  258. position: relative;
  259. }
  260. .close {
  261. position: absolute;
  262. right: 20px;
  263. top: 20px;
  264. font-size: 28px;
  265. font-weight: bold;
  266. cursor: pointer;
  267. color: #999;
  268. }
  269. .close:hover {
  270. color: #333;
  271. }
  272. .status-up {
  273. color: #4CAF50;
  274. font-weight: bold;
  275. }
  276. .status-down {
  277. color: #f44336;
  278. font-weight: bold;
  279. }
  280. .status-admin-down {
  281. color: #FF9800;
  282. font-weight: bold;
  283. }
  284. /* SSH终端样式 */
  285. .terminal-modal-content {
  286. width: 95vw;
  287. max-width: 1200px;
  288. margin: 20px auto;
  289. max-height: 90vh;
  290. display: flex;
  291. flex-direction: column;
  292. cursor: default;
  293. }
  294. .terminal-modal-content .modal-header-drag {
  295. cursor: move;
  296. padding-bottom: 10px;
  297. border-bottom: 1px solid #eee;
  298. margin-bottom: 5px;
  299. user-select: none;
  300. }
  301. .terminal-container {
  302. width: 100%;
  303. height: calc(85vh - 80px);
  304. background: #1e1e1e;
  305. border-radius: 5px;
  306. overflow: hidden;
  307. margin-top: 10px;
  308. }
  309. .terminal-status {
  310. margin-top: 10px;
  311. font-size: 12px;
  312. color: #999;
  313. text-align: right;
  314. }
  315. .terminal-status.connected {
  316. color: #4CAF50;
  317. }
  318. /* 设备选择器样式 */
  319. .select-devices-modal-content {
  320. width: 600px;
  321. max-width: 90vw;
  322. }
  323. .select-devices-toolbar {
  324. display: flex;
  325. align-items: center;
  326. gap: 15px;
  327. margin-bottom: 15px;
  328. padding-bottom: 10px;
  329. border-bottom: 1px solid #eee;
  330. }
  331. .btn-sm {
  332. padding: 6px 14px;
  333. font-size: 13px;
  334. }
  335. .selected-count {
  336. font-size: 13px;
  337. color: #666;
  338. }
  339. .device-pool-list {
  340. max-height: 400px;
  341. overflow-y: auto;
  342. }
  343. .device-pool-item {
  344. display: flex;
  345. align-items: center;
  346. padding: 10px;
  347. margin-bottom: 8px;
  348. background: #f9f9f9;
  349. border-radius: 5px;
  350. cursor: pointer;
  351. transition: all 0.2s;
  352. border-left: 3px solid #ddd;
  353. }
  354. .device-pool-item:hover {
  355. background: #f0f0f0;
  356. border-left-color: #667eea;
  357. }
  358. .device-pool-item.selected {
  359. background: #e8f5e9;
  360. border-left-color: #4CAF50;
  361. }
  362. .device-pool-item input[type="checkbox"] {
  363. margin-right: 12px;
  364. width: 18px;
  365. height: 18px;
  366. cursor: pointer;
  367. }
  368. .device-pool-item .device-info {
  369. flex: 1;
  370. }
  371. .device-pool-item .device-ip {
  372. font-weight: bold;
  373. color: #667eea;
  374. }
  375. .device-pool-item .device-type {
  376. font-size: 12px;
  377. color: #666;
  378. margin-top: 3px;
  379. }