styles.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. /* 全局样式 */
  2. body {
  3. background-color: #f8f9fa;
  4. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  5. }
  6. /* 导航栏样式 */
  7. .navbar-brand {
  8. font-weight: 600;
  9. }
  10. .navbar-brand i {
  11. margin-right: 8px;
  12. }
  13. /* 页面内容 */
  14. .page-content {
  15. min-height: calc(100vh - 100px);
  16. }
  17. /* 主容器样式 - 添加左右内边距 */
  18. .container-fluid {
  19. max-width: 1400px;
  20. margin: 0 auto;
  21. padding-left: 2rem;
  22. padding-right: 2rem;
  23. }
  24. /* 响应式内边距 */
  25. @media (max-width: 1200px) {
  26. .container-fluid {
  27. padding-left: 1.5rem;
  28. padding-right: 1.5rem;
  29. }
  30. }
  31. @media (max-width: 768px) {
  32. .container-fluid {
  33. padding-left: 1rem;
  34. padding-right: 1rem;
  35. }
  36. }
  37. @media (max-width: 576px) {
  38. .container-fluid {
  39. padding-left: 0.75rem;
  40. padding-right: 0.75rem;
  41. }
  42. }
  43. /* 统计卡片 */
  44. .stat-card {
  45. border: none;
  46. border-radius: 12px;
  47. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  48. transition: transform 0.2s ease;
  49. }
  50. .stat-card:hover {
  51. transform: translateY(-2px);
  52. }
  53. .stat-icon {
  54. font-size: 2rem;
  55. opacity: 0.7;
  56. }
  57. /* 卡片样式 */
  58. .card {
  59. border: none;
  60. border-radius: 12px;
  61. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  62. margin-bottom: 20px;
  63. }
  64. .card-header {
  65. background-color: #fff;
  66. border-bottom: 1px solid #e9ecef;
  67. border-radius: 12px 12px 0 0 !important;
  68. font-weight: 600;
  69. }
  70. /* 节点列表样式 */
  71. .node-item {
  72. border: 1px solid #e9ecef;
  73. border-radius: 8px;
  74. padding: 15px;
  75. margin-bottom: 10px;
  76. background: white;
  77. transition: all 0.2s ease;
  78. }
  79. .node-item:hover {
  80. box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  81. transform: translateY(-1px);
  82. }
  83. .node-header {
  84. display: flex;
  85. justify-content: space-between;
  86. align-items: center;
  87. margin-bottom: 10px;
  88. gap: 12px;
  89. }
  90. .node-name {
  91. font-weight: 600;
  92. color: #333;
  93. flex: 1;
  94. margin-right: 8px;
  95. }
  96. .node-status {
  97. padding: 4px 8px;
  98. border-radius: 12px;
  99. font-size: 0.8rem;
  100. font-weight: 500;
  101. }
  102. .node-status.online {
  103. background-color: #d4edda;
  104. color: #155724;
  105. }
  106. .node-status.offline {
  107. background-color: #f8d7da;
  108. color: #721c24;
  109. }
  110. /* 故障节点特殊样式 */
  111. .node-offline {
  112. border-color: #dc3545;
  113. background-color: #fff5f5;
  114. }
  115. .node-offline .node-name {
  116. color: #dc3545;
  117. }
  118. .node-info {
  119. display: grid;
  120. grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  121. gap: 10px;
  122. font-size: 0.85rem;
  123. color: #666;
  124. }
  125. .node-info-item.last-test {
  126. grid-column: 1 / -1;
  127. padding-top: 0;
  128. }
  129. .latency-info {
  130. font-weight: 500;
  131. }
  132. .latency-value {
  133. margin-left: 4px;
  134. font-weight: 600;
  135. color: #007bff;
  136. }
  137. .latency-separator {
  138. margin: 0 8px;
  139. color: #ccc;
  140. font-weight: normal;
  141. }
  142. .node-info-item {
  143. display: flex;
  144. align-items: center;
  145. word-break: break-all;
  146. overflow-wrap: break-word;
  147. hyphens: auto;
  148. }
  149. .node-info-item.server-info {
  150. grid-column: 1 / -1;
  151. word-break: break-all;
  152. overflow-wrap: break-word;
  153. min-height: auto;
  154. line-height: 1.4;
  155. }
  156. .node-info-item.server-info i {
  157. margin-top: 2px;
  158. align-self: flex-start;
  159. }
  160. .node-info-item i {
  161. margin-right: 4px;
  162. width: 14px;
  163. flex-shrink: 0;
  164. }
  165. /* 测速结果样式 */
  166. .result-item {
  167. border: 1px solid #e9ecef;
  168. border-radius: 8px;
  169. padding: 15px;
  170. margin-bottom: 10px;
  171. background: white;
  172. transition: all 0.2s ease;
  173. }
  174. .result-item:hover {
  175. box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  176. transform: translateY(-1px);
  177. }
  178. .result-success {
  179. border-left: 4px solid #28a745;
  180. }
  181. .result-failure {
  182. border-left: 4px solid #dc3545;
  183. }
  184. .result-content {
  185. display: flex;
  186. justify-content: space-between;
  187. align-items: center;
  188. gap: 20px;
  189. }
  190. .result-left {
  191. display: flex;
  192. align-items: center;
  193. gap: 20px;
  194. flex: 1;
  195. }
  196. .result-node {
  197. font-weight: 600;
  198. color: #333;
  199. min-width: 150px;
  200. font-size: 0.95rem;
  201. }
  202. .result-info {
  203. display: flex;
  204. align-items: center;
  205. gap: 15px;
  206. }
  207. .result-status {
  208. display: flex;
  209. align-items: center;
  210. gap: 4px;
  211. font-size: 0.85rem;
  212. padding: 2px 8px;
  213. border-radius: 12px;
  214. background-color: #f8f9fa;
  215. color: #666;
  216. }
  217. .result-success .result-status {
  218. background-color: #d4edda;
  219. color: #155724;
  220. }
  221. .result-failure .result-status {
  222. background-color: #f8d7da;
  223. color: #721c24;
  224. }
  225. .result-latency {
  226. display: flex;
  227. align-items: center;
  228. gap: 4px;
  229. font-size: 0.85rem;
  230. color: #007bff;
  231. font-weight: 600;
  232. padding: 2px 8px;
  233. border-radius: 12px;
  234. background-color: #e7f3ff;
  235. }
  236. .result-error {
  237. display: flex;
  238. align-items: center;
  239. gap: 4px;
  240. font-size: 0.85rem;
  241. color: #dc3545;
  242. padding: 2px 8px;
  243. border-radius: 12px;
  244. background-color: #f8d7da;
  245. }
  246. .result-time {
  247. color: #666;
  248. font-size: 0.85rem;
  249. white-space: nowrap;
  250. padding: 2px 8px;
  251. border-radius: 12px;
  252. background-color: #f8f9fa;
  253. }
  254. .result-status i,
  255. .result-latency i,
  256. .result-error i {
  257. margin-right: 4px;
  258. width: 14px;
  259. flex-shrink: 0;
  260. }
  261. /* 通知样式 */
  262. .notification-item {
  263. border: 1px solid #e9ecef;
  264. border-radius: 8px;
  265. padding: 15px;
  266. margin-bottom: 10px;
  267. background: white;
  268. }
  269. .notification-sent {
  270. border-left: 4px solid #28a745;
  271. }
  272. .notification-pending {
  273. border-left: 4px solid #ffc107;
  274. }
  275. .notification-failed {
  276. border-left: 4px solid #dc3545;
  277. }
  278. /* 按钮样式 */
  279. .btn {
  280. border-radius: 8px;
  281. font-weight: 500;
  282. transition: all 0.2s ease;
  283. }
  284. .btn:hover {
  285. transform: translateY(-1px);
  286. }
  287. .btn-primary {
  288. background-color: #0d6efd;
  289. border-color: #0d6efd;
  290. }
  291. .btn-success {
  292. background-color: #198754;
  293. border-color: #198754;
  294. }
  295. .btn-info {
  296. background-color: #0dcaf0;
  297. border-color: #0dcaf0;
  298. }
  299. .btn-warning {
  300. background-color: #ffc107;
  301. border-color: #ffc107;
  302. color: #000;
  303. }
  304. .btn-danger {
  305. background-color: #dc3545;
  306. border-color: #dc3545;
  307. }
  308. /* 表单样式 */
  309. .form-control, .form-select {
  310. border-radius: 8px;
  311. border: 1px solid #ced4da;
  312. transition: border-color 0.2s ease;
  313. }
  314. .form-control:focus, .form-select:focus {
  315. border-color: #0d6efd;
  316. box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  317. }
  318. /* 分页样式 */
  319. .pagination {
  320. justify-content: center;
  321. margin-top: 20px;
  322. margin-bottom: 10px;
  323. }
  324. #test-results-pagination {
  325. margin-top: 15px;
  326. }
  327. .page-link {
  328. border-radius: 6px;
  329. margin: 0 2px;
  330. border: 1px solid #dee2e6;
  331. }
  332. .page-link:hover {
  333. background-color: #e9ecef;
  334. }
  335. .page-item.active .page-link {
  336. background-color: #0d6efd;
  337. border-color: #0d6efd;
  338. }
  339. /* 加载覆盖层 */
  340. .loading-overlay {
  341. position: fixed;
  342. top: 0;
  343. left: 0;
  344. width: 100%;
  345. height: 100%;
  346. background-color: rgba(0, 0, 0, 0.5);
  347. display: flex;
  348. justify-content: center;
  349. align-items: center;
  350. z-index: 9999;
  351. }
  352. .loading-spinner {
  353. text-align: center;
  354. color: white;
  355. }
  356. /* 响应式设计 */
  357. @media (max-width: 768px) {
  358. .node-info {
  359. grid-template-columns: 1fr;
  360. gap: 8px;
  361. font-size: 0.8rem;
  362. }
  363. .result-content {
  364. flex-direction: column;
  365. align-items: flex-start;
  366. gap: 10px;
  367. }
  368. .result-left {
  369. flex-direction: column;
  370. align-items: flex-start;
  371. gap: 8px;
  372. width: 100%;
  373. }
  374. .result-info {
  375. flex-direction: column;
  376. align-items: flex-start;
  377. gap: 6px;
  378. }
  379. .result-node {
  380. min-width: auto;
  381. font-size: 0.9rem;
  382. }
  383. .result-status,
  384. .result-latency,
  385. .result-error,
  386. .result-time {
  387. font-size: 0.8rem;
  388. padding: 3px 8px;
  389. }
  390. .stat-card {
  391. margin-bottom: 15px;
  392. }
  393. .node-info-item {
  394. white-space: normal;
  395. word-break: break-all;
  396. }
  397. .node-info-item.server-info {
  398. font-size: 0.75rem;
  399. line-height: 1.3;
  400. }
  401. }
  402. /* 动画效果 */
  403. @keyframes fadeIn {
  404. from {
  405. opacity: 0;
  406. transform: translateY(20px);
  407. }
  408. to {
  409. opacity: 1;
  410. transform: translateY(0);
  411. }
  412. }
  413. .fade-in {
  414. animation: fadeIn 0.3s ease;
  415. }
  416. /* 状态指示器 */
  417. .status-indicator {
  418. display: inline-flex;
  419. align-items: center;
  420. gap: 5px;
  421. }
  422. .status-indicator i {
  423. font-size: 0.8rem;
  424. }
  425. /* 工具提示 */
  426. .tooltip {
  427. font-size: 0.8rem;
  428. }
  429. /* 徽章样式 */
  430. .badge {
  431. border-radius: 12px;
  432. font-weight: 500;
  433. }
  434. /* 进度条样式 */
  435. .progress {
  436. border-radius: 10px;
  437. height: 8px;
  438. }
  439. .progress-bar {
  440. border-radius: 10px;
  441. }
  442. /* 表格样式 */
  443. .table {
  444. border-radius: 8px;
  445. overflow: hidden;
  446. }
  447. .table th {
  448. background-color: #f8f9fa;
  449. border-bottom: 2px solid #dee2e6;
  450. font-weight: 600;
  451. }
  452. .table td {
  453. vertical-align: middle;
  454. }
  455. /* 模态框样式 */
  456. .modal-content {
  457. border-radius: 12px;
  458. border: none;
  459. box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  460. }
  461. .modal-header {
  462. border-bottom: 1px solid #e9ecef;
  463. border-radius: 12px 12px 0 0;
  464. }
  465. .modal-footer {
  466. border-top: 1px solid #e9ecef;
  467. border-radius: 0 0 12px 12px;
  468. }
  469. /* 自定义滚动条 */
  470. ::-webkit-scrollbar {
  471. width: 8px;
  472. }
  473. ::-webkit-scrollbar-track {
  474. background: #f1f1f1;
  475. border-radius: 4px;
  476. }
  477. ::-webkit-scrollbar-thumb {
  478. background: #c1c1c1;
  479. border-radius: 4px;
  480. }
  481. ::-webkit-scrollbar-thumb:hover {
  482. background: #a8a8a8;
  483. }