server-status主题优化 (#405)

* server-status主题优化
1.前台增加半透明样式切换按钮,同时适配了深色和浅色模式
2.右小角功能区增加收纳,点击展开,滚动页面关闭
3.vps世界分布地图全屏展示
4.修改默认页底版权信息位置,从跟随container box修改为默认置于页面底部,container box到底底部后再跟随
5.修改container box默认宽度和最大宽度,适配高分辨率显示器
6.优化样式文件结构,删除无用的样式文件
7.一些小优化

* 修改默认背景图

* 修改背景图片

* 1.echart图表适配半透明样式切换
2.echart图表移动端设置更细折线
3.修改半透明样式下的默认背景图

* echart Y轴移动端更细刻度线

* fixbug

* 修改半透明样式默认背景图片为本地调用
This commit is contained in:
nap0o
2024-08-09 09:49:45 -04:00
committed by GitHub
parent 6b05a21641
commit d9097540c3
18 changed files with 659 additions and 609 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

48
resource/static/theme-server-status/css/dark.css vendored Normal file → Executable file
View File

@@ -1,6 +1,6 @@
body[theme="dark"] {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
background: rgba(49, 54, 59, 1);
background-color: rgba(49, 54, 59, 1);
color: #f1f1f1;
}
@@ -9,7 +9,6 @@ body[theme="dark"] .navbar .navbar-brand {
}
body[theme="dark"] .navbar .dropdown-menu {
list-style-image: initial;
background-color: rgba(23, 26, 30, 1);
border-color: rgba(49, 54, 59, 1);
box-shadow: rgba(0, 0, 0, 0.18) 0px 6px 12px;
@@ -29,9 +28,9 @@ body[theme="dark"] .navbar .navbar-nav > .open > a:focus,
body[theme="dark"] .navbar .navbar-nav > .open > a:hover,
body[theme="dark"] .navbar .navbar-nav > .active > a,
body[theme="dark"] .navbar .navbar-nav > .open > a{
background-image: none !important;
box-shadow: none !important;
background-color: transparent !important;
background-image: none;
box-shadow: none;
background-color: transparent;
}
body[theme="dark"] .navbar .navbar-nav .open .dropdown-menu > li > a {
@@ -39,7 +38,6 @@ body[theme="dark"] .navbar .navbar-nav .open .dropdown-menu > li > a {
}
body[theme="dark"] .content {
background-image: initial;
background-color: rgba(28, 29, 38, 1);
border: none;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
@@ -48,7 +46,6 @@ body[theme="dark"] .content {
}
body[theme="dark"] .table {
background-image: initial;
background-color: rgba(28, 29, 38, 1);
border-color: #545b5e;
}
@@ -69,7 +66,6 @@ body[theme="dark"] .table-striped tbody > tr.even > th {
body[theme="dark"] .table-striped tbody > tr,
body[theme="dark"] .table-striped tbody > tr.odd > td,
body[theme="dark"] .table-striped tbody > tr.odd > th {
/* background-color: rgba(28, 29, 38, 1); 282B2E*/
background-color: rgba(34, 35, 46, 1);
}
@@ -83,7 +79,6 @@ body[theme="dark"] .table-hover > tbody > tr:not(.expandRow):hover > td {
/* expandRow展开部分样式 */
body[theme="dark"] .table > tbody > tr.expandRow.odd > td:before{
/* background-color: rgba(28, 29, 38, 1); 282B2E*/
background-color: rgba(34, 35, 46, 1);
}
@@ -102,35 +97,35 @@ body[theme="dark"] .progress-bar {
}
body[theme="dark"] .progress-bar-success {
background-image: linear-gradient(#4d853a 0, #367e36 100%);
}
body[theme="dark"] .progress-offline .progress-bar-success {
background-image: linear-gradient(#808080 0, #808080 100%);
background-image: linear-gradient(to right, rgba(77, 133, 58, 1) 0, rgba(54, 126, 54, 1) 100%);
}
body[theme="dark"] .progress-bar-warning {
background-image: linear-gradient(#995f0d 0, #b5710f 100%);
}
body[theme="dark"] .progress-offline .progress-bar-warning {
background-image: linear-gradient(#808080 0, #808080 100%);
background-image: linear-gradient(to right, rgba(153, 95, 13, 1) 0, rgba(181, 113, 15, 1) 100%);
}
body[theme="dark"] .progress-bar-danger {
background-image: linear-gradient(#942320 0, #a12623 100%);
background-image: linear-gradient(to right, rgba(145, 35, 32, 1) 0, rgba(161, 38, 35, 1) 100%);
}
body[theme="dark"] .progress-offline .progress-bar-success {
background-image: linear-gradient(rgba(128, 128, 128, 1) 0, rgba(128, 128, 128, 1) 100%);
}
body[theme="dark"] .progress-offline .progress-bar-warning {
background-image: linear-gradient(rgba(128, 128, 128, 1) 0, rgba(128, 128, 128, 1) 100%);
}
body[theme="dark"] .progress-offline .progress-bar-danger {
background-image: linear-gradient(#808080 0, #808080 100%);
background-image: linear-gradient(rgba(128, 128, 128, 1) 0, rgba(128, 128, 128, 1) 100%);
}
body[theme="dark"] .node-cell.status .status-icon.online {
background-image: linear-gradient(#4d853a 0, #367e36 100%);
background-image: linear-gradient(rgba(77, 133, 58, 1) 0, rgba(54, 126, 54, 1) 100%);
}
body[theme="dark"] .node-cell.status .status-icon.offline {
background-image: linear-gradient(#9b2522 0, #9b2522 100%);
background-image: linear-gradient(rgba(155, 37, 34, 1) 0, rgba(161, 38, 35, 1) 100%);
}
body[theme="dark"] .service-status .danger {
@@ -160,11 +155,16 @@ body[theme="dark"] .modal-content{
color: #f1f1f1;
}
body[theme="dark"] #earthChartBox .modal-content{
background-color: rgba(0, 0, 0, 1);
color: #f1f1f1;
}
body[theme="dark"] .modal-header{
border-bottom-color:#080808;
}
body[theme="dark"] .modal-header i{
body[theme="dark"] .modal-header i.xclose{
color: #f1f1f1;
}

View File

@@ -0,0 +1,123 @@
body[theme="dark"]::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-image: url(/static/theme-server-status/img/bg.jpg);
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: cover;
z-index: -1;
}
body[theme="dark"] {
background-color: rgba(0, 0, 0, 0.8);
color: #f1f1f1;
}
body[theme="dark"] .navbar {
/** 顶部导航条 背景 **/
background-color: rgba(0, 0, 0, 0.8);
box-shadow: none;
border: none;
}
body[theme="dark"] .navbar .navbar-brand {
color: #ffffff;
}
body[theme="dark"] .navbar .dropdown-menu {
/** 二级导航下拉 背景 **/
background-color: rgba(0, 0, 0, 0.85);
border-top: none;
border-color: #31363b;
box-shadow: rgba(0, 0, 0, 0.18) 0px 6px 12px;
}
body[theme="dark"] .navbar .dropdown-menu > li > a {
color: #c8c3bc;
}
body[theme="dark"] .navbar .dropdown-menu > li > a:focus,
body[theme="dark"] .navbar .dropdown-menu > li > a:hover {
/** 二级导航鼠标悬停选中背景 **/
background-color: rgba(0, 0, 0, 0.95);
background-image: linear-gradient(#1c1d26 0, #1c1d26 100%);
}
body[theme="dark"] .navbar .navbar-nav .open .dropdown-menu > li > a {
color: #f1f1f1;
}
body[theme="dark"] .table,
body[theme="dark"] .table-condensed > tbody > tr,
body[theme="dark"] .table-hover > tbody > tr,
body[theme="dark"] .table-hover > tbody > tr:hover,
body[theme="dark"] .table-striped tbody > tr.even,
body[theme="dark"] .table-striped tbody > tr.odd,
body[theme="dark"] .table-striped tbody > tr.even > td,
body[theme="dark"] .table-striped tbody > tr.even > th,
body[theme="dark"] .table-striped tbody > tr.odd > td,
body[theme="dark"] .table-striped tbody > tr.odd > th,
body[theme="dark"] .table-striped tbody > tr.even > td:hover,
body[theme="dark"] .table-striped tbody > tr.even > th:hover,
body[theme="dark"] .table-striped tbody > tr.odd > td:hover,
body[theme="dark"] .table-striped tbody > tr.odd > th:hover,
body[theme="dark"] .table-striped tbody > tr.expandRow:hover {
background-color: transparent !important;
}
body[theme="dark"] .content {
/** 主box 背景 **/
background-color: rgba(28, 29, 38, 0.8);
border: none;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
}
body[theme="dark"] .table > thead > tr.node-group-tag > th,
body[theme="dark"] .table > thead > tr.node-group-tag > th:before {
background: unset;
}
body[theme="dark"] .table > tbody > tr > td:before,
body[theme="dark"] .table > tfoot > tr > td:before,
body[theme="dark"] .table > thead > tr > td:before,
body[theme="dark"] .table > thead > tr.node-group-cell > th:before{
/** border-bottom 颜色 **/
background-color: rgba(155, 155, 155, 0.1);
}
body[theme="dark"] .table-hover > tbody > tr:not(.expandRow):hover > td {
background-color: unset;
}
/* expandRow展开部分样式 */
body[theme="dark"] .table > tbody > tr.expandRow.odd > td:before{
background-color: unset;
}
body[theme="dark"] .table > tbody > tr.expandRow.even > td:before{
background-color: unset;
}
/* expandRow展开部分样式结束 */
body[theme="dark"] .progress {
background-image: none;
background-color: rgba(255, 255, 255, 0.075);
}
body[theme="dark"] .progress-bar-success {
background-image: linear-gradient(to right, rgba(77, 133, 58, 0.9) 0, rgba(54, 126, 54, 0.9) 100%);
}
body[theme="dark"] .progress-bar-warning {
background-image: linear-gradient(to right, rgba(153, 95, 13, 0.9) 0, rgba(181, 113, 15, 0.9) 100%);
}
body[theme="dark"] .progress-bar-danger {
background-image: linear-gradient(to right, rgba(145, 35, 32, 0.8) 0, rgba(161, 38, 35, 0.8) 100%);
}

148
resource/static/theme-server-status/css/light.css vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,134 @@
body[theme="light"]::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-image: url(/static/theme-server-status/img/bg.jpg);
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: cover;
z-index: -1;
}
body[theme="light"] {
background-image: unset;
}
body[theme="light"]::after {
content: "";
position: fixed;
}
body[theme="light"] .navbar {
/** 顶部导航条 背景 **/
background-color: rgba(255, 255, 255, 0.9);
border-bottom: 1px #cecece solid;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}
body[theme="light"] .navbar .dropdown-menu {
/** 二级导航下拉 **/
background-color: rgba(255, 255, 255, 0.8);
border-color: rgba(0, 0, 0, .05);
}
body[theme="light"] .navbar .dropdown-menu > li > a:focus,
body[theme="light"] .navbar .dropdown-menu > li > a:hover{
/** 二级导航鼠标悬停选中背景 **/
background-color: rgba(0, 0, 0, .05);
}
body[theme="light"] .navbar .navbar-collapse{
border-color:rgba(0, 0, 0, 0.085);
}
body[theme="light"] .navbar .navbar-toggle .icon-bar{
background-color: rgba(0, 0, 0, 0.9);
}
body[theme="light"] .navbar .navbar-toggle:focus,
body[theme="light"] .navbar .navbar-toggle:hover {
background-color: unset;
}
body[theme="light"] .table,
body[theme="light"] .table-condensed > tbody > tr,
body[theme="light"] .table-hover > tbody > tr,
body[theme="light"] .table-hover > tbody > tr:hover,
body[theme="light"] .table-striped tbody > tr.even,
body[theme="light"] .table-striped tbody > tr.odd,
body[theme="light"] .table-striped tbody > tr.even > td,
body[theme="light"] .table-striped tbody > tr.even > th,
body[theme="light"] .table-striped tbody > tr.odd > td,
body[theme="light"] .table-striped tbody > tr.odd > th,
body[theme="light"] .table-striped tbody > tr.even > td:hover,
body[theme="light"] .table-striped tbody > tr.even > th:hover,
body[theme="light"] .table-striped tbody > tr.odd > td:hover,
body[theme="light"] .table-striped tbody > tr.odd > th:hover,
body[theme="light"] .table-striped tbody > tr.expandRow:hover {
background-color: transparent !important;
}
body[theme="light"] .content {
/** 主box 背景 **/
background-color: rgba(245, 245, 245, 0.8);
border: none;
box-shadow: rgba(0, 0, 0, 0.5) 0 0.625em 2em;
}
body[theme="light"] .table > thead > tr.node-group-tag > th,
body[theme="light"] .table > thead > tr.node-group-tag > th:before {
background: unset;
}
body[theme="light"] .table > tbody > tr > td:before,
body[theme="light"] .table > tfoot > tr > td:before,
body[theme="light"] .table > thead > tr > td:before,
body[theme="light"] .table > thead > tr.node-group-cell > th:before{
/** border-bottom 颜色 **/
background-color: rgba(0, 0, 0, 0.075);
}
body[theme="light"] .table-hover > tbody > tr:not(.expandRow):hover > td {
background-color: unset;
}
/* expandRow展开部分样式 */
body[theme="light"] .table > tbody > tr.expandRow.odd > td:before{
background-color: unset;
}
body[theme="light"] .table > tbody > tr.expandRow.even > td:before{
background-color: unset;
}
/* expandRow展开部分样式结束 */
body[theme="light"] .progress {
background-image: none;
background-color: rgba(0, 0, 0, 0.015);
}
body[theme="light"] .progress-bar-success {
background-image: linear-gradient(to right, rgba(50, 205, 50, 0.6) 0, rgba(68, 157, 68, 0.6) 100%);
}
body[theme="light"] .progress-bar-warning {
background-image: linear-gradient(to right, rgba(236, 151, 31, 0.6) 0, rgba(255, 125, 80, 0.6) 100%);
}
body[theme="light"] .progress-bar-danger {
background-image: linear-gradient(to right, rgba(255, 70, 0, 0.6) 0, rgba(201, 48, 44,0.6) 100%);
}
body[theme="light"] .toolbox i{
background-color: rgba(255, 255, 255, .55);
}
@media only screen and (max-width: 767px) {
body[theme="light"] .navbar .navbar-nav .open .dropdown-menu {
background-color: rgba(235, 235, 235, 0.75);
}
}

130
resource/static/theme-server-status/css/main.css vendored Normal file → Executable file
View File

@@ -3,16 +3,22 @@ body {
padding-bottom: 30px !important;
}
.container-fluid{
max-width: 1680px;
width: 95vw;
margin: 0 auto;
}
.nezha {
min-height: calc(100vh - 100px);
}
/* 导航部分 开始*/
.navbar {
min-height: 40px !important;
margin:0 auto;
font-size: 14px;
}
.navbar .container{
max-width: 95vw;
margin: 0 auto;
z-index:99999999;
}
.navbar-inverse{
@@ -46,11 +52,6 @@ body {
word-break: break-all;
}
.navbar .node-cell-expand-label {
/*margin-right: 5px;*/
}
.navbar .dropdown:hover,
.navbar .dropdown a{
cursor: pointer;
}
@@ -75,12 +76,10 @@ body {
.navbar .navbar-collapse{
max-height: 500px;
}
/* 导航部分 结束 */
/* toolbox 开始 */
.toolbox {
position: fixed;
bottom:20px;
@@ -121,7 +120,6 @@ body {
.toolbox .showGoTop i.goTop {
font-size: 1.55rem;
}
/* toolbox 结束 */
@@ -138,12 +136,12 @@ body {
border-radius: 3px;
}
.table th, .table td {
text-align: left;
.table-responsive{
border: none;
}
tr.accordion-toggle{
cursor:pointer;
.table th, .table td {
text-align: left;
}
.table > tbody > tr > td,
@@ -171,6 +169,15 @@ tr.accordion-toggle{
height: 0.7px;
}
table.monitor-detail{
margin:5px 0px 10px 0px;
}
tr.accordion-toggle{
cursor:pointer;
}
.table .network-thead-tr th,
.table .node-group-tag th{
font-size: 18px;
padding-bottom:15px;
@@ -243,7 +250,7 @@ tr.accordion-toggle{
cursor: pointer;
}
/*加快Agent详情下拉展示速度*/
/*agent详情下拉速度*/
.collapsing{
-webkit-transition-property:height,visibility;
-o-transition-property:height,visibility;
@@ -255,13 +262,10 @@ tr.accordion-toggle{
-o-transition-timing-function: linear;
transition-timing-function: linear
}
/*正文结束*/
/* 服务页 正文*/
.service-status {
}
.service-status {}
.service-status .service-status-th{
min-width:60px;
@@ -307,44 +311,67 @@ tr.accordion-toggle{
.service-status .tooltip-inner {
max-width: 500px;
}
td.ping-network-quality {
width: 600px;
}
/* 服务页 正文结束 */
/* 服务器分布图 */
/* 地图版服务器分布图 */
#mapChartBox{
z-index: 999999999;
padding-left: 0 !important;
}
.modal-content{
display: flex;
flex-direction: column;
pointer-events: auto;
.modal-open .modal{
overflow-x: hidden;
overflow-y: hidden;
}
.modal-dialog-centered{
margin: 0 auto;
width: 1134px;
max-width: 1134px;
width: 100%;
max-width: 100%;
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
min-height: calc(100%) /* 确保模态框占据整个视口高度 */
}
.modal-content{
display: flex;
flex-direction: column;
pointer-events: auto;
border-radius: unset;
border: none;
}
.modal-header{
position: relative;
}
.modal-header i{
.modal-header h4{
cursor: pointer;
}
.modal-header i.xclose{
cursor: pointer;
position: absolute;
font-size: 2em;
top: 13px;
right: 13px;
font-size: 30px;
top: 12px;
right: 10px;
}
.modal-body{
padding: 0px;
}
a.template-item, a.cdn-item{
display: block;
}
footer{
padding-bottom: 2rem;
padding-bottom: 20px;
}
footer p{
@@ -356,6 +383,10 @@ footer p{
.accordian-body{
margin: 5px 0px 5px 10px;
}
table.monitor-detail{
margin:0px 0px 2px 0px;
}
.table .network-thead-tr th,
.table .node-group-tag th{
font-size:16px;
padding-bottom:6px;
@@ -367,10 +398,19 @@ footer p{
font-size: 10px !important;
padding-top:60px !important;
}
.nezha {
min-height: calc(100vh - 80px);
}
.content {
padding: 0;
margin-bottom: 10px;
}
footer{
padding-bottom: 10px;
}
.cycle-transfer-stats .dataTables_wrapper{
margin-bottom: -10px;
}
.navbar .navbar-nav .open .dropdown-menu>li>a {
color: #f1f1f1;
}
@@ -405,10 +445,17 @@ footer p{
.accordian-body{
margin: 5px 0px 5px 10px;
}
table.monitor-detail{
margin:0px 0px 2px 0px;
}
.table .network-thead-tr th,
.table .node-group-tag th{
font-size:16px;
font-size:14px;
padding-bottom:6px;
}
.table tr.network td{
font-size: 12px;
}
.service-status .service-status-th{
min-width:30px;
}
@@ -432,15 +479,8 @@ footer p{
.toolbox {
right: 18px;
}
.modal-dialog-centered{
width: 95%;
}
.modal-title{
line-height: 0.5;
}
.modal-header i{
top: 8px;
right: 8px;
td.ping-network-quality {
width: 110px;
}
}