index.css 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. @import url("../static/css/bootstrap.min.css");
  2. body {
  3. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  4. font-size: 13px;
  5. color: #2c3e50;
  6. margin: 0 auto;
  7. background-color: #f5f7fa;
  8. }
  9. .panel-body.mod-json {
  10. padding: 15px;
  11. }
  12. /* 页面基本信息样式 */
  13. .info-card {
  14. background: #fff;
  15. border-radius: 8px;
  16. box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  17. padding: 15px;
  18. margin-bottom: 20px;
  19. }
  20. .info-item {
  21. margin-bottom: 8px;
  22. display: flex;
  23. align-items: center;
  24. }
  25. .info-item label {
  26. color: #666;
  27. min-width: 100px;
  28. margin-bottom: 0;
  29. }
  30. .info-item span {
  31. color: #2c3e50;
  32. word-break: break-all;
  33. }
  34. .update-time {
  35. margin-top: 10px;
  36. padding-top: 10px;
  37. border-top: 1px solid #eee;
  38. color: #999;
  39. font-size: 12px;
  40. text-align: right;
  41. }
  42. /* 性能概览区域样式 */
  43. .performance-overview {
  44. margin-bottom: 20px;
  45. }
  46. .performance-card {
  47. background: #fff;
  48. border-radius: 8px;
  49. box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  50. padding: 15px;
  51. margin-bottom: 15px;
  52. }
  53. /* 核心Web指标网格布局 */
  54. .metrics-grid {
  55. display: grid;
  56. grid-template-columns: repeat(3, 1fr);
  57. gap: 15px;
  58. margin-top: 15px;
  59. }
  60. .metric-item {
  61. padding: 15px;
  62. border-radius: 6px;
  63. text-align: center;
  64. background: #f8f9fa;
  65. transition: all 0.3s ease;
  66. }
  67. .metric-item.text-success {
  68. background: #d4edda;
  69. border: 1px solid #c3e6cb;
  70. }
  71. .metric-item.text-warning {
  72. background: #fff3cd;
  73. border: 1px solid #ffeeba;
  74. }
  75. .metric-item.text-danger {
  76. background: #f8d7da;
  77. border: 1px solid #f5c6cb;
  78. }
  79. .metric-value {
  80. font-size: 24px;
  81. font-weight: 600;
  82. margin-bottom: 5px;
  83. }
  84. .metric-label {
  85. font-size: 13px;
  86. color: #666;
  87. margin-bottom: 5px;
  88. }
  89. .metric-status {
  90. font-size: 12px;
  91. font-weight: 500;
  92. }
  93. /* 页面加载时间和内存使用布局 */
  94. .flex-container {
  95. display: flex;
  96. gap: 15px;
  97. margin-top: 15px;
  98. }
  99. .half-width {
  100. flex: 1;
  101. min-width: 0;
  102. }
  103. /* 时间列表样式 */
  104. .timing-list {
  105. display: flex;
  106. flex-direction: column;
  107. gap: 8px;
  108. }
  109. .timing-item {
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. padding: 8px;
  114. background: #f8f9fa;
  115. border-radius: 4px;
  116. }
  117. .timing-label {
  118. color: #666;
  119. }
  120. .timing-value {
  121. font-weight: 500;
  122. color: #2c3e50;
  123. }
  124. /* 内存使用样式 */
  125. .memory-usage {
  126. padding: 10px;
  127. }
  128. .memory-item {
  129. margin-bottom: 10px;
  130. }
  131. .memory-label {
  132. color: #666;
  133. margin-bottom: 5px;
  134. }
  135. .memory-value {
  136. font-weight: 500;
  137. color: #2c3e50;
  138. }
  139. .memory-bar {
  140. height: 20px;
  141. background: #f8f9fa;
  142. border-radius: 10px;
  143. position: relative;
  144. overflow: hidden;
  145. }
  146. .used-bar {
  147. position: absolute;
  148. height: 100%;
  149. background: #4CAF50;
  150. border-radius: 10px;
  151. transition: width 0.3s ease;
  152. }
  153. .total-bar {
  154. position: absolute;
  155. height: 100%;
  156. background: rgba(76, 175, 80, 0.3);
  157. border-radius: 10px;
  158. transition: width 0.3s ease;
  159. }
  160. /* 详细信息区域样式 */
  161. .detail-card {
  162. margin-bottom: 20px;
  163. border: 1px solid #e0e0e0;
  164. border-radius: 8px;
  165. overflow: hidden;
  166. }
  167. .card-header {
  168. padding: 15px;
  169. background: #f8f9fa;
  170. cursor: pointer;
  171. display: flex;
  172. justify-content: space-between;
  173. align-items: center;
  174. border-bottom: 1px solid #eee;
  175. }
  176. .card-header h3 {
  177. margin: 0;
  178. font-size: 15px;
  179. font-weight: 600;
  180. }
  181. .toggle-icon {
  182. font-size: 12px;
  183. transition: transform 0.3s ease;
  184. }
  185. .card-header[aria-expanded="true"] .toggle-icon {
  186. transform: rotate(180deg);
  187. }
  188. .card-content {
  189. padding: 15px;
  190. }
  191. /* 表格样式优化 */
  192. .table {
  193. margin-bottom: 0;
  194. font-size: 13px;
  195. }
  196. .table th {
  197. background: #f8f9fa;
  198. font-weight: 600;
  199. padding: 10px;
  200. }
  201. .table td {
  202. padding: 8px 10px;
  203. vertical-align: middle;
  204. }
  205. /* 响应式布局 */
  206. @media (max-width: 768px) {
  207. .metrics-grid {
  208. grid-template-columns: 1fr;
  209. }
  210. .flex-container {
  211. flex-direction: column;
  212. }
  213. .half-width {
  214. width: 100%;
  215. }
  216. }
  217. /* 滚动条样式 */
  218. ::-webkit-scrollbar {
  219. width: 8px;
  220. height: 8px;
  221. }
  222. ::-webkit-scrollbar-track {
  223. background: #f1f1f1;
  224. border-radius: 4px;
  225. }
  226. ::-webkit-scrollbar-thumb {
  227. background: #c1c1c1;
  228. border-radius: 4px;
  229. }
  230. ::-webkit-scrollbar-thumb:hover {
  231. background: #a8a8a8;
  232. }
  233. /* 响应式布局 */
  234. @media screen and (max-width: 1200px) {
  235. .wrapper {
  236. min-width: 600px;
  237. }
  238. .table {
  239. display: block;
  240. overflow-x: auto;
  241. -webkit-overflow-scrolling: touch;
  242. }
  243. }
  244. /* 工具提示样式 */
  245. [title] {
  246. cursor: help;
  247. }
  248. /* 优化建议样式 */
  249. #optimizationSuggestions {
  250. margin: 20px 0;
  251. }
  252. .performance-section {
  253. margin: 25px 0;
  254. padding: 20px;
  255. background: #fff;
  256. border-radius: 10px;
  257. box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  258. }
  259. .performance-section h3 {
  260. margin: 0 0 20px;
  261. color: #2c3e50;
  262. font-size: 18px;
  263. font-weight: 600;
  264. border-bottom: 2px solid #eee;
  265. padding-bottom: 10px;
  266. }
  267. .suggestion-item {
  268. margin-bottom: 20px;
  269. padding: 20px;
  270. border: 1px solid #e0e0e0;
  271. border-radius: 8px;
  272. background: #fff;
  273. transition: all 0.3s ease;
  274. }
  275. .suggestion-item:hover {
  276. box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  277. }
  278. .suggestion-category {
  279. display: inline-block;
  280. padding: 6px 12px;
  281. margin-bottom: 12px;
  282. border-radius: 4px;
  283. font-size: 12px;
  284. font-weight: 600;
  285. text-transform: uppercase;
  286. }
  287. .category-warning {
  288. background: #fff3e0;
  289. color: #f57c00;
  290. }
  291. .category-critical {
  292. background: #ffe0e0;
  293. color: #d32f2f;
  294. }
  295. .category-info {
  296. background: #e3f2fd;
  297. color: #1976d2;
  298. }
  299. .suggestion-title {
  300. margin: 10px 0;
  301. font-size: 16px;
  302. font-weight: 600;
  303. color: #2c3e50;
  304. }
  305. .suggestion-description {
  306. margin: 12px 0;
  307. color: #5c6b7a;
  308. line-height: 1.6;
  309. }
  310. .suggestion-list {
  311. margin: 15px 0 5px;
  312. padding-left: 20px;
  313. }
  314. .suggestion-list li {
  315. margin: 8px 0;
  316. color: #3c4858;
  317. line-height: 1.5;
  318. position: relative;
  319. padding-left: 5px;
  320. }
  321. .suggestion-list li::before {
  322. content: "•";
  323. color: #666;
  324. position: absolute;
  325. left: -15px;
  326. }
  327. /* 卡片头部样式 */