123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575 |
- /* 全局样式 */
- body {
- background-color: #f8f9fa;
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
- }
- /* 导航栏样式 */
- .navbar-brand {
- font-weight: 600;
- }
- .navbar-brand i {
- margin-right: 8px;
- }
- /* 页面内容 */
- .page-content {
- min-height: calc(100vh - 100px);
- }
- /* 主容器样式 - 添加左右内边距 */
- .container-fluid {
- max-width: 1400px;
- margin: 0 auto;
- padding-left: 2rem;
- padding-right: 2rem;
- }
- /* 响应式内边距 */
- @media (max-width: 1200px) {
- .container-fluid {
- padding-left: 1.5rem;
- padding-right: 1.5rem;
- }
- }
- @media (max-width: 768px) {
- .container-fluid {
- padding-left: 1rem;
- padding-right: 1rem;
- }
- }
- @media (max-width: 576px) {
- .container-fluid {
- padding-left: 0.75rem;
- padding-right: 0.75rem;
- }
- }
- /* 统计卡片 */
- .stat-card {
- border: none;
- border-radius: 12px;
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
- transition: transform 0.2s ease;
- }
- .stat-card:hover {
- transform: translateY(-2px);
- }
- .stat-icon {
- font-size: 2rem;
- opacity: 0.7;
- }
- /* 卡片样式 */
- .card {
- border: none;
- border-radius: 12px;
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
- margin-bottom: 20px;
- }
- .card-header {
- background-color: #fff;
- border-bottom: 1px solid #e9ecef;
- border-radius: 12px 12px 0 0 !important;
- font-weight: 600;
- }
- /* 节点列表样式 */
- .node-item {
- border: 1px solid #e9ecef;
- border-radius: 8px;
- padding: 15px;
- margin-bottom: 10px;
- background: white;
- transition: all 0.2s ease;
- }
- .node-item:hover {
- box-shadow: 0 4px 12px rgba(0,0,0,0.1);
- transform: translateY(-1px);
- }
- .node-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10px;
- gap: 12px;
- }
- .node-name {
- font-weight: 600;
- color: #333;
- flex: 1;
- margin-right: 8px;
- }
- .node-status {
- padding: 4px 8px;
- border-radius: 12px;
- font-size: 0.8rem;
- font-weight: 500;
- }
- .node-status.online {
- background-color: #d4edda;
- color: #155724;
- }
- .node-status.offline {
- background-color: #f8d7da;
- color: #721c24;
- }
- /* 故障节点特殊样式 */
- .node-offline {
- border-color: #dc3545;
- background-color: #fff5f5;
- }
- .node-offline .node-name {
- color: #dc3545;
- }
- .node-info {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
- gap: 10px;
- font-size: 0.85rem;
- color: #666;
- }
- .node-info-item.last-test {
- grid-column: 1 / -1;
- padding-top: 0;
- }
- .latency-info {
- font-weight: 500;
- }
- .latency-value {
- margin-left: 4px;
- font-weight: 600;
- color: #007bff;
- }
- .latency-separator {
- margin: 0 8px;
- color: #ccc;
- font-weight: normal;
- }
- .node-info-item {
- display: flex;
- align-items: center;
- word-break: break-all;
- overflow-wrap: break-word;
- hyphens: auto;
- }
- .node-info-item.server-info {
- grid-column: 1 / -1;
- word-break: break-all;
- overflow-wrap: break-word;
- min-height: auto;
- line-height: 1.4;
- }
- .node-info-item.server-info i {
- margin-top: 2px;
- align-self: flex-start;
- }
- .node-info-item i {
- margin-right: 4px;
- width: 14px;
- flex-shrink: 0;
- }
- /* 测速结果样式 */
- .result-item {
- border: 1px solid #e9ecef;
- border-radius: 8px;
- padding: 15px;
- margin-bottom: 10px;
- background: white;
- transition: all 0.2s ease;
- }
- .result-item:hover {
- box-shadow: 0 4px 12px rgba(0,0,0,0.1);
- transform: translateY(-1px);
- }
- .result-success {
- border-left: 4px solid #28a745;
- }
- .result-failure {
- border-left: 4px solid #dc3545;
- }
- .result-content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 20px;
- }
- .result-left {
- display: flex;
- align-items: center;
- gap: 20px;
- flex: 1;
- }
- .result-node {
- font-weight: 600;
- color: #333;
- min-width: 150px;
- font-size: 0.95rem;
- }
- .result-info {
- display: flex;
- align-items: center;
- gap: 15px;
- }
- .result-status {
- display: flex;
- align-items: center;
- gap: 4px;
- font-size: 0.85rem;
- padding: 2px 8px;
- border-radius: 12px;
- background-color: #f8f9fa;
- color: #666;
- }
- .result-success .result-status {
- background-color: #d4edda;
- color: #155724;
- }
- .result-failure .result-status {
- background-color: #f8d7da;
- color: #721c24;
- }
- .result-latency {
- display: flex;
- align-items: center;
- gap: 4px;
- font-size: 0.85rem;
- color: #007bff;
- font-weight: 600;
- padding: 2px 8px;
- border-radius: 12px;
- background-color: #e7f3ff;
- }
- .result-error {
- display: flex;
- align-items: center;
- gap: 4px;
- font-size: 0.85rem;
- color: #dc3545;
- padding: 2px 8px;
- border-radius: 12px;
- background-color: #f8d7da;
- }
- .result-time {
- color: #666;
- font-size: 0.85rem;
- white-space: nowrap;
- padding: 2px 8px;
- border-radius: 12px;
- background-color: #f8f9fa;
- }
- .result-status i,
- .result-latency i,
- .result-error i {
- margin-right: 4px;
- width: 14px;
- flex-shrink: 0;
- }
- /* 通知样式 */
- .notification-item {
- border: 1px solid #e9ecef;
- border-radius: 8px;
- padding: 15px;
- margin-bottom: 10px;
- background: white;
- }
- .notification-sent {
- border-left: 4px solid #28a745;
- }
- .notification-pending {
- border-left: 4px solid #ffc107;
- }
- .notification-failed {
- border-left: 4px solid #dc3545;
- }
- /* 按钮样式 */
- .btn {
- border-radius: 8px;
- font-weight: 500;
- transition: all 0.2s ease;
- }
- .btn:hover {
- transform: translateY(-1px);
- }
- .btn-primary {
- background-color: #0d6efd;
- border-color: #0d6efd;
- }
- .btn-success {
- background-color: #198754;
- border-color: #198754;
- }
- .btn-info {
- background-color: #0dcaf0;
- border-color: #0dcaf0;
- }
- .btn-warning {
- background-color: #ffc107;
- border-color: #ffc107;
- color: #000;
- }
- .btn-danger {
- background-color: #dc3545;
- border-color: #dc3545;
- }
- /* 表单样式 */
- .form-control, .form-select {
- border-radius: 8px;
- border: 1px solid #ced4da;
- transition: border-color 0.2s ease;
- }
- .form-control:focus, .form-select:focus {
- border-color: #0d6efd;
- box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
- }
- /* 分页样式 */
- .pagination {
- justify-content: center;
- margin-top: 20px;
- margin-bottom: 10px;
- }
- #test-results-pagination {
- margin-top: 15px;
- }
- .page-link {
- border-radius: 6px;
- margin: 0 2px;
- border: 1px solid #dee2e6;
- }
- .page-link:hover {
- background-color: #e9ecef;
- }
- .page-item.active .page-link {
- background-color: #0d6efd;
- border-color: #0d6efd;
- }
- /* 加载覆盖层 */
- .loading-overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 9999;
- }
- .loading-spinner {
- text-align: center;
- color: white;
- }
- /* 响应式设计 */
- @media (max-width: 768px) {
- .node-info {
- grid-template-columns: 1fr;
- gap: 8px;
- font-size: 0.8rem;
- }
-
- .result-content {
- flex-direction: column;
- align-items: flex-start;
- gap: 10px;
- }
-
- .result-left {
- flex-direction: column;
- align-items: flex-start;
- gap: 8px;
- width: 100%;
- }
-
- .result-info {
- flex-direction: column;
- align-items: flex-start;
- gap: 6px;
- }
-
- .result-node {
- min-width: auto;
- font-size: 0.9rem;
- }
-
- .result-status,
- .result-latency,
- .result-error,
- .result-time {
- font-size: 0.8rem;
- padding: 3px 8px;
- }
-
- .stat-card {
- margin-bottom: 15px;
- }
-
- .node-info-item {
- white-space: normal;
- word-break: break-all;
- }
-
- .node-info-item.server-info {
- font-size: 0.75rem;
- line-height: 1.3;
- }
- }
- /* 动画效果 */
- @keyframes fadeIn {
- from {
- opacity: 0;
- transform: translateY(20px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- .fade-in {
- animation: fadeIn 0.3s ease;
- }
- /* 状态指示器 */
- .status-indicator {
- display: inline-flex;
- align-items: center;
- gap: 5px;
- }
- .status-indicator i {
- font-size: 0.8rem;
- }
- /* 工具提示 */
- .tooltip {
- font-size: 0.8rem;
- }
- /* 徽章样式 */
- .badge {
- border-radius: 12px;
- font-weight: 500;
- }
- /* 进度条样式 */
- .progress {
- border-radius: 10px;
- height: 8px;
- }
- .progress-bar {
- border-radius: 10px;
- }
- /* 表格样式 */
- .table {
- border-radius: 8px;
- overflow: hidden;
- }
- .table th {
- background-color: #f8f9fa;
- border-bottom: 2px solid #dee2e6;
- font-weight: 600;
- }
- .table td {
- vertical-align: middle;
- }
- /* 模态框样式 */
- .modal-content {
- border-radius: 12px;
- border: none;
- box-shadow: 0 10px 30px rgba(0,0,0,0.3);
- }
- .modal-header {
- border-bottom: 1px solid #e9ecef;
- border-radius: 12px 12px 0 0;
- }
- .modal-footer {
- border-top: 1px solid #e9ecef;
- border-radius: 0 0 12px 12px;
- }
- /* 自定义滚动条 */
- ::-webkit-scrollbar {
- width: 8px;
- }
- ::-webkit-scrollbar-track {
- background: #f1f1f1;
- border-radius: 4px;
- }
- ::-webkit-scrollbar-thumb {
- background: #c1c1c1;
- border-radius: 4px;
- }
- ::-webkit-scrollbar-thumb:hover {
- background: #a8a8a8;
- }
|