فهرست منبع

1,统一优化修改webui各个页面的css,使其支持全局加载,同时不会相互污染;2,全局加载所有页面的css,原来是点选哪个页面加载对应页面的css,在公网环境下体验卡顿,不够友好,变为全局加载后,整体体验感好很多

niujiuru 3 روز پیش
والد
کامیت
47b65a9ae4

+ 8 - 0
web-ui.service/web/app.html

@@ -7,6 +7,14 @@
 <link rel="stylesheet" href="static/css/app.css">
 <link rel="stylesheet" href="static/css/button.css">
 <link rel="stylesheet" href="static/css/xterm.css">
+<link rel="stylesheet" href="static/css/page1.css">
+<link rel="stylesheet" href="static/css/page2.css">
+<link rel="stylesheet" href="static/css/page3.css">
+<link rel="stylesheet" href="static/css/page4.css">
+<link rel="stylesheet" href="static/css/page5.css">
+<link rel="stylesheet" href="static/css/page6.css">
+<link rel="stylesheet" href="static/css/page7.css">
+<link rel="stylesheet" href="static/css/page8.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page1.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>系统信息</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page1.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page2.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>网络连接</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page2.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page3.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>时间同步</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page3.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page4.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>定位服务</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page4.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page5.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>相机操作</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page5.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page6.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>应用管理</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page6.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page7.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>一键自检</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page7.css">
 </head>
 
 <body>

+ 0 - 3
web-ui.service/web/pages/page8.html

@@ -4,9 +4,6 @@
 <head>
 <meta charset="utf-8">
 <title>命令终端</title>
-<link rel="stylesheet" href="static/css/app.css">
-<link rel="stylesheet" href="static/css/button.css">
-<link rel="stylesheet" href="static/css/page8.css">
 </head>
 
 <body>

+ 12 - 12
web-ui.service/web/static/css/page1.css

@@ -4,14 +4,14 @@
     padding:12px;
 }
 
-.page1-grid-1 {
+.page1 .page1-grid-1 {
     width:100%;
     display:grid;
     grid-template-columns:repeat(3, minmax(0, 1fr));
     gap:20px;
 }
 
-.page1-grid-2 {
+.page1 .page1-grid-2 {
     width:100%;
     display:grid;
     grid-template-columns:repeat(3, minmax(0, 1fr));
@@ -19,7 +19,7 @@
     margin-top:20px;
 }
 
-.page1-card {
+.page1 .page1-card {
     width:100%;
     background:#0f172a;
     border:1px solid #1f2937;
@@ -28,11 +28,11 @@
     overflow:hidden;
 }
 
-.service-card {
+.page1 .service-card {
     grid-column:span 2;
 }
 
-.page1-header {
+.page1 .page1-header {
     height:24px;
     line-height:24px;
     margin-bottom:12px;
@@ -40,18 +40,18 @@
     font-size:14px;
 }
 
-.page1-chart {
+.page1 .page1-chart {
     width:100%;
     height:260px;
 }
 
-.info-list {
+.page1 .info-list {
     width:100%;
     padding:0 8px;
     overflow-x:auto;
 }
 
-.info-item {
+.page1 .info-item {
     height:42px;
     display:flex;
     align-items:center;
@@ -59,24 +59,24 @@
     min-width:max-content;
 }
 
-.info-info {
+.page1 .info-info {
     width:145px;
     flex-shrink:0;
     display:flex;
     flex-direction:column;
 }
 
-.info-name {
+.page1 .info-name {
     color:#cbd5e1;
     font-size:14px;
 }
 
-.info-desc {
+.page1 .info-desc {
     color:#64748b;
     font-size:12px;
 }
 
-.info-value {
+.page1 .info-value {
     width:145px;
     margin-left:8px;
     text-align:center;

+ 12 - 12
web-ui.service/web/static/css/page2.css

@@ -7,7 +7,7 @@
 }
 
 /* 顶部的状态栏 */
-.status-bar {
+.page-network .status-bar {
     display: flex;
     padding: 8px 12px;
     background: linear-gradient(180deg, #0f172a, #0b1220);
@@ -17,23 +17,23 @@
     flex-shrink: 0;
 }
 
-.status-item {
+.page-network .status-item {
     display: flex;
     flex-direction: column;
     gap: 4px;
 }
 
-.status-item .label {
+.page-network .status-item .label {
     font-size: 14px;
 }
 
-.status-item .value {
+.page-network .status-item .value {
     font-size: 14px;
     font-family: ui-monospace, Consolas, monospace;
 }
 
 /* 左右拆分的栏 */
-.panes {
+.page-network .panes {
     display: flex;
     gap: 12px;
     flex: 1;
@@ -42,7 +42,7 @@
 }
 
 /* 展示网络信息 */
-.left-pane {
+.page-network .left-pane {
     flex: 1;
     display: flex;
     flex-direction: column;
@@ -51,7 +51,7 @@
     min-width: 0;
 }
 
-.left-pane .card {
+.page-network .left-pane .card {
     flex: 1;
     display: flex;
     flex-direction: column;
@@ -59,22 +59,22 @@
     overflow: hidden;
 }
 
-.left-pane .card:nth-child(1) {
+.page-network .left-pane .card:nth-child(1) {
     flex: 2;
 }
 
-.left-pane .card:nth-child(2),
-.left-pane .card:nth-child(3) {
+.page-network .left-pane .card:nth-child(2),
+.page-network .left-pane .card:nth-child(3) {
     flex: 1;
 }
 
-.left-pane .output {
+.page-network .left-pane .output {
     flex: 1;
     min-height: 0;
 }
 
 /* 展示服务日志 */
-.right-pane {
+.page-network .right-pane {
     flex: 1;
     display: flex;
     flex-direction: column;

+ 8 - 8
web-ui.service/web/static/css/page3.css

@@ -7,7 +7,7 @@
 }
 
 /* 顶部的状态栏 */
-.status-bar {
+.page-time .status-bar {
     display: flex;
     flex-direction: column;
     padding: 8px 12px;
@@ -18,38 +18,38 @@
     flex-shrink: 0;
 }
 
-.status-item {
+.page-time .status-item {
     display: flex;
     flex-direction: column;
     gap: 4px;
 }
 
-.status-item .label {
+.page-time .status-item .label {
     font-size: 14px;
 }
 
-.status-item .value {
+.page-time .status-item .value {
     font-size: 14px;
     font-family: ui-monospace, Consolas, monospace;
 }
 
-.status-row {
+.page-time .status-row {
     display: flex;
     align-items: center;
     gap: 14px;
 }
 
-.status-row .label {
+.page-time .status-row .label {
     font-size: 14px;
 }
 
-.status-row .value {
+.page-time .status-row .value {
     font-size: 14px;
     font-family: ui-monospace, Consolas, monospace;
 }
 
 /* 下方全屏区域 */
-.full-pane {
+.page-time .full-pane {
     flex: 1;
     display: flex;
     min-height: 0;

+ 8 - 8
web-ui.service/web/static/css/page4.css

@@ -7,7 +7,7 @@
 }
 
 /* 顶部的状态栏 */
-.status-bar {
+.page-gnss .status-bar {
     display: flex;
     flex-direction: column;
     padding: 8px 12px;
@@ -18,38 +18,38 @@
     flex-shrink: 0;
 }
 
-.status-item {
+.page-gnss .status-item {
     display: flex;
     flex-direction: column;
     gap: 4px;
 }
 
-.status-item .label {
+.page-gnss .status-item .label {
     font-size: 14px;
 }
 
-.status-item .value {
+.page-gnss .status-item .value {
     font-size: 14px;
     font-family: ui-monospace, Consolas, monospace;
 }
 
-.status-row {
+.page-gnss .status-row {
     display: flex;
     align-items: center;
     gap: 14px;
 }
 
-.status-row .label {
+.page-gnss .status-row .label {
     font-size: 14px;
 }
 
-.status-row .value {
+.page-gnss .status-row .value {
     font-size: 14px;
     font-family: ui-monospace, Consolas, monospace;
 }
 
 /* 下方全屏区域 */
-.full-pane {
+.page-gnss .full-pane {
     flex: 1;
     display: flex;
     min-height: 0;

+ 18 - 18
web-ui.service/web/static/css/page5.css

@@ -8,7 +8,7 @@
   min-height:0;
 }
 
-.page5-top {
+.page-camera .page5-top {
   display:flex;
   gap:12px;
   width:100%;
@@ -16,13 +16,13 @@
   flex:none;
 }
 
-.page5-top .status-bar {
+.page-camera .page5-top .status-bar {
   flex:1;
   min-width:0;
   height: 100%;
 }
 
-.status-bar {
+.page-camera .status-bar {
     display:flex;
     align-items:center;
     padding:8px 12px;
@@ -33,22 +33,22 @@
     flex-shrink:0;
 }
 
-.status-item {
+.page-camera .status-item {
     display:flex;
     flex-direction:column;
     gap:4px;
 }
 
-.status-item .label {
+.page-camera .status-item .label {
     font-size:14px;
 }
 
-.status-item .value {
+.page-camera .status-item .value {
     font-size:14px;
     font-family:ui-monospace, Consolas, monospace;
 }
 
-.button-item {
+.page-camera .button-item {
     display: flex;
     align-items: center;
     gap: 4px;
@@ -57,7 +57,7 @@
 }
 
 /* 左右拆分的栏 */
-.panes {
+.page-camera .panes {
     display: flex;
     gap: 12px;
     flex: 1;
@@ -66,7 +66,7 @@
 }
 
 /* 相机拍照预览 */
-.left-pane {
+.page-camera .left-pane {
     flex: 1;
     display: flex;
     flex-direction: column;
@@ -75,7 +75,7 @@
     min-width: 0;
 }
 
-.left-pane .card {
+.page-camera .left-pane .card {
     flex: 1;
     display: flex;
     flex-direction: column;
@@ -83,14 +83,14 @@
     overflow: hidden;
 }
 
-.camera-card {
+.page-camera .camera-card {
     flex:1;
     display:flex;
     flex-direction:column;
     min-height:0;
 }
 
-.camera-image-box {
+.page-camera .camera-image-box {
     flex:1;
     display:flex;
     align-items:center;
@@ -103,13 +103,13 @@
     margin-bottom:14px;
 }
 
-.camera-image-box img {
+.page-camera .camera-image-box img {
     width:100%;
     height:100%;
     object-fit:contain;
 }
 
-.camera-info-table {
+.page-camera .camera-info-table {
     width:100%;
     height:70px;
     border-collapse:collapse;
@@ -118,21 +118,21 @@
     table-layout:fixed;
 }
 
-.camera-info-table td {
+.page-camera .camera-info-table td {
     border:1px solid #374151;
     padding:0 10px;
     white-space:nowrap;
     color:#e2e8f0;
 }
 
-.camera-info-table td:nth-child(1),
-.camera-info-table td:nth-child(3) {
+.page-camera .camera-info-table td:nth-child(1),
+.page-camera .camera-info-table td:nth-child(3) {
     width:110px;
     color:#94a3b8;
 }
 
 /* 展示服务日志 */
-.right-pane {
+.page-camera .right-pane {
     flex: 1;
     display: flex;
     flex-direction: column;

+ 19 - 19
web-ui.service/web/static/css/page6.css

@@ -7,7 +7,7 @@
 }
 
 /* 顶部的状态栏 */
-.status-bar {
+.page-userapp .status-bar {
   display: flex;
   padding: 8px 12px;
   background: linear-gradient(180deg, #0f172a, #0b1220);
@@ -18,18 +18,18 @@
   overflow: hidden;
 }
 
-.status-item {
+.page-userapp .status-item {
   display: flex;
   flex-direction: column;
   gap: 4px;
   min-width: 0;
 }
 
-.status-item .label {
+.page-userapp .status-item .label {
   font-size: 14px;
 }
 
-.status-item .value {
+.page-userapp .status-item .value {
   font-size: 14px;
   font-family: ui-monospace, Consolas, monospace;
 
@@ -38,17 +38,17 @@
   white-space: nowrap;
 }
 
-.status-item:nth-child(2) {
+.page-userapp .status-item:nth-child(2) {
   flex: 0 0 150px;
 }
 
-.status-item:nth-child(3),
-.status-item:nth-child(4) {
+.page-userapp .status-item:nth-child(3),
+.page-userapp .status-item:nth-child(4) {
   flex: 0 0 120px;
 }
 
 /* 左右拆分的栏 */
-.panes {
+.page-userapp .panes {
   display: flex;
   gap: 12px;
   flex: 1;
@@ -57,7 +57,7 @@
 }
 
 /* 左侧应用列表 */
-.left-pane {
+.page-userapp .left-pane {
   flex: 1;
   display: flex;
   flex-direction: column;
@@ -66,7 +66,7 @@
   min-width: 0;
 }
 
-.left-pane .card {
+.page-userapp .left-pane .card {
   flex: 1;
   display: flex;
   flex-direction: column;
@@ -74,12 +74,12 @@
   overflow: hidden;
 }
 
-.left-pane .card:nth-child(1),
-.left-pane .card:nth-child(2) {
+.page-userapp .left-pane .card:nth-child(1),
+.page-userapp .left-pane .card:nth-child(2) {
   flex: 1;
 }
 
-.card-body {
+.page-userapp .card-body {
   flex: 1;
   padding: 6px;
   display: flex;
@@ -89,32 +89,32 @@
   overflow: hidden;
 }
 
-.app-info {
+.page-userapp .app-info {
   display: flex;
   gap: 8px;
   font-size: 14px;
 }
 
-.app-info .label {
+.page-userapp .app-info .label {
   color: #94a3b8;
   width: 60px;
   flex-shrink: 0;
 }
 
-.app-info .value {
+.page-userapp .app-info .value {
   flex: 1;
   min-width: 0;
   font-family: ui-monospace, Consolas, monospace;
 }
 
-.app-desc {
+.page-userapp .app-desc {
   flex: 1;
   min-height: 0;
   display: flex;
   flex-direction: row;
 }
 
-.app-desc .value {
+.page-userapp .app-desc .value {
   white-space: pre-wrap;
   word-break: break-all;
   overflow-y: auto;
@@ -122,7 +122,7 @@
 }
 
 /* 展示服务日志 */
-.right-pane {
+.page-userapp .right-pane {
   flex: 1;
   display: flex;
   flex-direction: column;

+ 2 - 1
web-ui.service/web/static/css/page8.css

@@ -1,9 +1,10 @@
 .page8-card {
     padding: 8px;
     height:calc(100% - 12px);
+    box-sizing:border-box;
 }
 
-#ssh-terminal {
+.page8-card #ssh-terminal {
     width: 100%;
     height: 100%;
     background: #111;