Compare commits

...

3 Commits

25 changed files with 705 additions and 12 deletions

View File

@ -185,10 +185,11 @@
.futureList.en .futureContent p:nth-child(2) {
width: 96%;
/* font-weight: bold; */
font-size: 1vw;
font-size: 0.9vw;
text-align: left;
line-height: 2.7vh;
font-family: 'Segoe UI', 'Arial', 'Helvetica', sans-serif;
}

View File

@ -75,10 +75,10 @@
<section class="future">
<ul class="futureList">
<li>
<img class="futureImg" src="../imgs/approaching/ai.png" alt="AI加速芯片">
<img class="futureImg" src="../imgs/approaching/ai.png" alt="定制加速芯片">
<div class="futureContent">
<p>持续迭代与优化</p>
<p>聚焦AI加速芯片的高效能、低延迟与低功耗优化支持智能终端、边缘计算和行业应用的多场景落地。持续推进自研IP核、算子优化和软硬件协同设计提升芯片整体性能与能效比。</p>
<p>聚焦定制加速芯片的高效能、低延迟与低功耗优化支持智能终端、边缘计算和行业应用的多场景落地。持续推进自研IP核、算子优化和软硬件协同设计提升芯片整体性能与能效比。</p>
</div>
<div class="futureCircle">
<div class="futureCircleInner">

View File

@ -188,7 +188,7 @@
<div class="info-list">
<!-- <p>客户需求由于客户业务的急剧扩大客户希望在S1PRO基础上出一个性能更强、功耗更低的芯片。</p> -->
<p class="detail_info_textS6PRO1">解决方案在S1PRO芯片的架构基础上进一步优化细节缩减逻辑资源节省面积。</p>
<p class="detail_info_textS6PRO2">技术亮点使用了定制化的12nm工艺集成了多个核心模块并通过自研AI算法加速模块提升了AI运算能力</p>
<p class="detail_info_textS6PRO2">技术亮点使用了定制化的12nm工艺集成了多个核心模块。</p>
</div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 232 KiB

View File

@ -9,9 +9,9 @@ document.addEventListener('DOMContentLoaded', function () {
// 列表
futureList: [
{
imgAlt: "AI加速芯片",
imgAlt: "定制加速芯片",
title: "持续迭代与优化",
desc: "聚焦AI加速芯片的高效能、低延迟与低功耗优化支持智能终端、边缘计算和行业应用的多场景落地。持续推进自研IP核、算子优化和软硬件协同设计提升芯片整体性能与能效比。",
desc: "聚焦定制加速芯片的高效能、低延迟与低功耗优化支持智能终端、边缘计算和行业应用的多场景落地。持续推进自研IP核、算子优化和软硬件协同设计提升芯片整体性能与能效比。",
circle: "应用领域"
},
{
@ -39,9 +39,9 @@ document.addEventListener('DOMContentLoaded', function () {
// 列表
futureList: [
{
imgAlt: "AI Acceleration Chip",
imgAlt: "Customized acceleration chip",
title: "Continuous Iteration & Optimization",
desc: "Focus on high performance, low latency, and low power optimization of AI acceleration chips, supporting multi-scenario applications in smart terminals, edge computing, and industries. Continuously promote self-developed IP cores, operator optimization, and hardware-software co-design to improve overall chip performance and energy efficiency.",
desc: "Focusing on the high efficiency, low latency and low power optimization of customized acceleration chips, it supports the landing of intelligent terminals, edge computing and industrial applications in multiple scenarios. Continuously promote self-developed IP cores, operator optimization, and software hardware collaborative design to improve the overall performance and energy efficiency ratio of chips.",
circle: "Application Field"
},
{

View File

@ -120,9 +120,9 @@ document.addEventListener('DOMContentLoaded', function() {
detail_info_textY1001:"解决方案:我们通过对客户需求的深度研究,设计了一款集成了高速计算、信号处理单元和数据传输功能的芯片。",
detail_info_textY1002:"技术亮点采用了定制化的22nm工艺低功耗设计。",
detail_info_textS6PRO1:"解决方案在S1PRO芯片的架构基础上进一步优化细节缩减逻辑资源节省面积。",
detail_info_textS6PRO2:"技术亮点使用了定制化的12nm工艺集成了多个核心模块并通过自研AI算法加速模块,提升了AI运算能力。",
detail_info_textS6PRO2:"技术亮点使用了定制化的12nm工艺集成了多个核心模块并通过自研算法加速模块,提升了运算能力。",
detail_info_textS1PRO1:"解决方案我们根据客户的需求设计了一个集成soc和特定加速模块的系统级芯片。通过先进的架构和特定的低功耗设计确保芯片在性能和功耗上的平衡。",
detail_info_textS1PRO2:"技术亮点使用了定制化的22nm工艺集成了多个核心模块并通过自研AI算法加速模块,提升了AI运算能力。",
detail_info_textS1PRO2:"技术亮点使用了定制化的22nm工艺集成了多个核心模块并通过自研算法加速模块,提升了运算能力。",
detail_info_textVV101:"解决方案我们根据客户的需求设计了一个由CPU核心处理器连接外部存储并通过私有总线扩展外设接口内部包含两个RAM具备ITCM和DTCM用于指令和数据存储。",
detail_info_textVV102:"技术亮点EAI协处理器接口和AES算法核支持高效加解密运算RSA算法核由控制、模乘和寄存器堆组成实现高效RSA算法运算。",
detail_info_textFX1001:"解决方案我们根据客户的需求设计了一个由两个Master和三个Slave组成其中两个Master分别是CPU内核和DMA控制器三个Slave为内部SRAMNVM和外设。",
@ -153,9 +153,9 @@ document.addEventListener('DOMContentLoaded', function() {
detail_info_textY1001:"Solution: We designed a chip that integrates high-speed computing, signal processing unit and data transmission functions through an in-depth study of customer requirements.",
detail_info_textY1002:"Technical highlight: Adopting customized 22nm process and low-power design.",
detail_info_textS6PRO1:"Solution: Further optimize the details based on the architecture of the S1PRO chip, reduce logic resources and save area.",
detail_info_textS6PRO2:"Technical highlights: it uses a customized 12nm process, integrates multiple core modules, and improves AI computing power with a self-developed AI algorithm acceleration module.",
detail_info_textS6PRO2:"Technical highlights: Customized 12nm process is used, multiple core modules are integrated, and self-developed algorithm acceleration modules are used to enhance computing power.",
detail_info_textS1PRO1:"Solution: We designed a system-on-chip with integrated soc and specific acceleration modules according to the customer's requirements. The advanced architecture and specific low-power design ensure that the chip is balanced in terms of performance and power consumption.",
detail_info_textS1PRO2:"Technical highlights: it uses a customized 22nm process, integrates multiple core modules, and improves AI computing power with a self-developed AI algorithm acceleration module.",
detail_info_textS1PRO2:"Technical highlights: Customized 12nm process is used, multiple core modules are integrated, and self-developed algorithm acceleration modules are used to enhance computing power.",
detail_info_textVV101:"Solution: According to the customer's requirements, we designed a CPU core processor to connect to external storage and extend the peripheral interface through a private bus, which contains two internal RAMs with ITCM and DTCM for instruction and data storage.",
detail_info_textVV102:"Technology highlights: EAI coprocessor interface and AES algorithm core support efficient encryption and decryption operations, RSA algorithm core consists of control, modulo multiplication and register stacks to realize efficient RSA algorithm operations.",
detail_info_textFX1001:"Solution: According to the customer's requirements, we designed a system consisting of two Masters and three Slaves, where the two Masters are the CPU core and the DMA controller, and the three Slaves are the internal SRAM, NVM and peripherals.",

3
miner/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}

70
miner/css/base.css Normal file
View File

@ -0,0 +1,70 @@
/* 所有标签的内外边距清零 */
* {
margin: 0px;
padding: 0px;
/* css3盒子模型 */
box-sizing: border-box;
font-family:DFKai-SB;
}
/* em 和 i 斜体的文字不倾斜 */
em,
i {
font-style: normal
}
/* 去掉li 的小圆点 */
/* li {
list-style: none
} */
/* ul{
list-style: none;
} */
img {
/* border 0 照顾低版本浏览器 如果 图片外面包含了链接会有边框的问题 */
border: 0;
/* 取消图片底侧有空白缝隙的问题 */
vertical-align: middle;
}
button {
/* 当我们鼠标经过button 按钮的时候,鼠标变成小手 */
cursor: pointer
}
a {
color: #666;
text-decoration: none
}
a:hover {
color: #c81623
}
button,
input {
/* "\5B8B\4F53" 就是宋体的意思 这样浏览器兼容性比较好 */
font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
/* 默认有灰色边框我们需要手动去掉 */
}
body {
/* CSS3 抗锯齿形 让文字显示的更加清晰 */
-webkit-font-smoothing: antialiased;
/* background-color: #fff; */
/* font: 12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif; */
/* color: #666 */
}
.hide,
.none {
display: none
}
/* 清除浮动 */
.clearfix::after {
visibility: hidden;
clear: both;
display: block;
content: ".";
height: 0
}

398
miner/css/index.css Normal file
View File

@ -0,0 +1,398 @@
body {
margin: 0;
font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans', Arial, sans-serif;
background: #f3f7f9;
color: #222;
}
.container { display: flex; height: 100vh; }
/* 修改侧边栏相关样式 */
.sidebar {
width: 280px;
background: #2A58AE; /* 更深的蓝色背景 */
color: #fff;
display: flex;
flex-direction: column;
padding: 0;
}
.sidebar-logo {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
height: 180px;
}
.sidebar-logo img {
width: 120px;
height: auto;
}
.sidebar-menu ul {
list-style: none;
padding: 0;
margin: 0;
}
/* 主菜单项样式 */
.sidebar-menu > ul > li {
width: 100%;
padding: 0;
cursor: pointer;
font-size: 16px;
position: relative;
margin-bottom: 0; /* 移除底部间距 */
/* background: palegoldenrod; */
padding: 20px 0px;
padding-left: 50px;
min-height: 50px;
}
.sidebar-menu > ul > li > a {
display: block;
color: #9EA5AD;
text-decoration: none;
font-weight: 600; /* 稍微加粗 */
font-size: 1.3vw;
}
/* 子菜单项活动状态下的链接颜色 */
.sidebar-submenu li.active > a {
color: #ffffff; /* 纯白色 */
}
/* 活动菜单项的竖线 */
/* .sidebar-menu > ul > li.active::before {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 4px;
background: #fff;
} */
.sidebar-menu > ul > li.active{
border-left: 8px solid rgba(255,255,255,0.8);
background: #1D4791;
}
/* 主菜单hover效果 */
.sidebar-menu > ul > li:hover > a {
color: #ffffff;
}
.sidebar-menu > ul > li:hover {
background: rgba(255, 255, 255, 0.1);
}
/* 子菜单样式 */
.sidebar-submenu {
padding-left: 0;
margin-left: 42px; /* 调整左边距 */
position: relative;
margin-bottom: 12px; /* 增加底部间距 */
margin-top: 30px;
background: palegoldenrod;
}
/* 子菜单的垂直连接线 */
.sidebar-submenu::before {
content: '';
position: absolute;
left: -20px; /* 调整位置 */
top: 0;
height: 100%;
width: 1px;
background: rgba(255, 255, 255, 0.4); /* 略微调亮 */
}
.sidebar-submenu li {
padding: 6px 16px ; /* 减少上下padding */
font-size: 14px ;
position: relative;
margin-bottom: 2px; /* 减少项目间距 */
color: rgba(255, 255, 255, 0.6); /* 默认颜色 */
transition: color 0.2s;
min-height: 50px;
}
.sidebar-submenu li a{
color: #9EA5AD;
font-size: 1.3vw;
font-weight: 600;
}
/* 子菜单项的水平连接线 */
.sidebar-submenu li::before {
content: '';
position: absolute;
left: -20px; /* 位置调整 */
top: 50%;
width: 20px; /* 调整水平线长度 */
height: 1px;
background: rgba(255, 255, 255, 0.4); /* 保持一致性 */
}
/* 活动子菜单项样式 */
.sidebar-submenu li.active {
color: #ffffff; /* 全白 */
background: none !important;
border: none !important;
}
/* 主菜单项活动状态下的链接颜色 */
.sidebar-menu > ul > li.active > a {
color: #ffffff; /* 纯白色 */
}
/* 非活动子菜单项样式 */
.sidebar-submenu li:not(.active) {
color: rgba(255, 255, 255, 0.6); /* 更明显的透明度 */
}
/* 禁用的菜单项 */
.sidebar-submenu li[style*="opacity"] {
opacity: 0.4 !important;
color: rgba(255, 255, 255, 0.5);
}
.sidebar-submenu li.active::before {
background: #fff;
}
/* 移除之前的hover效果 */
.sidebar-menu li:hover,
.sidebar-submenu li:hover {
background: none;
border-left: none;
text-decoration: none;
}
/* 子菜单hover效果 */
.sidebar-submenu li:not([style*="opacity"]):hover {
opacity: 1;
}
/* ----------------------------- */
/* 添加重启按钮样式 */
.restart-btn {
background-color: #f56c6c;
color: white;
border: none;
border-radius: 4px;
padding: 7px 15px;
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
transition: background-color 0.3s;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.restart-btn:hover {
background-color: #e64242;
}
.restart-btn:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.3);
}
/* ---------------- */
.main {
flex: 1;
display: flex;
flex-direction: column;
background: #eaf1f5;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 18px 36px;
box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.header-user {
display: flex;
align-items: center;
font-size: 18px;
color: #204080;
font-weight: 600;
}
.header-user .icon {
background: #e3eafc;
border-radius: 50%;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
font-size: 20px;
}
.summary-row {
display: flex;
gap: 24px;
margin: 32px 0 0 0;
}
.summary-card {
background: #fff;
border-radius: 14px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
flex: 1;
padding: 28px 0;
display: flex;
flex-direction: column;
align-items: center;
min-width: 0;
}
.summary-card .label {
color: #888;
font-weight: 600;
margin-bottom: 8px;
}
.summary-card .value {
font-size: 2.1rem;
font-weight: bold;
color: #204080;
}
.summary-card .unit {
font-size: 13px;
color: #bbb;
margin-top: 2px;
}
.fan-row {
display: flex;
gap: 24px;
margin: 24px 0 0 0;
}
.fan-card {
background: #fff;
border-radius: 14px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
flex: 1;
padding: 28px 0;
display: flex;
flex-direction: column;
align-items: center;
min-width: 0;
}
.fan-card .label {
color: #888;
font-weight: 600;
margin-bottom: 8px;
}
.fan-card .circle {
margin-bottom: 8px;
}
.fan-card .value {
font-size: 1.7rem;
font-weight: bold;
color: #204080;
}
.fan-card .unit {
font-size: 13px;
color: #bbb;
margin-top: 2px;
}
.section {
background: #fff;
border-radius: 14px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
margin-top: 32px;
padding: 24px 28px;
}
.section-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 18px;
}
.pools-table {
width: 100%;
border-collapse: collapse;
font-size: 15px;
}
.pools-table th, .pools-table td {
padding: 10px 8px;
text-align: center;
}
.pools-table th {
background: #f3f7fa;
color: #204080;
font-weight: 600;
}
.pools-table tr:not(:last-child) {
border-bottom: 1px solid #e0e6ed;
}
.badge {
display: inline-block;
padding: 2px 14px;
border-radius: 12px;
font-size: 13px;
font-weight: 600;
}
.badge-normal {
background: #e3f2fd;
color: #1976d2;
}
.badge-error {
background: #ffebee;
color: #d32f2f;
}
.diagnostic-log {
font-family: 'Fira Mono', 'Consolas', monospace;
color: #d32f2f;
background: #fff5f5;
border-radius: 8px;
padding: 12px 16px;
font-size: 14px;
max-height: 120px;
overflow-y: auto;
margin-top: 8px;
}
@media (max-width: 1100px) {
.summary-row, .fan-row { flex-direction: column; gap: 12px; }
}
@media (max-width: 800px) {
.container { flex-direction: column; }
.sidebar { width: 100%; flex-direction: row; height: 60px; }
.sidebar-logo { padding: 10px 12px; font-size: 16px; }
.sidebar-menu { display: flex; flex-direction: row; }
.sidebar-menu ul { display: flex; }
.sidebar-menu li { padding: 8px 16px; font-size: 14px; }
.main { padding: 0 4px; }
.header { padding: 10px 12px; }
.section { padding: 12px 6px; }
}

BIN
miner/imgs/extinguish.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
miner/imgs/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
miner/imgs/poweroff.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
miner/imgs/reboot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
miner/imgs/red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
miner/imgs/reset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

1
miner/imgs/restart.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
miner/imgs/save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

1
miner/imgs/switch.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
miner/imgs/色标.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

130
miner/index.html Normal file
View File

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Matches</title>
<link rel="stylesheet" href="./css/index.css">
<link rel="stylesheet" href="./css/base.css">
<link rel="icon" href="./imgs/logo.png">
</head>
<body>
<div class="container">
<!-- 侧边栏 -->
<nav class="sidebar" aria-label="侧边栏">
<div class="sidebar-logo">
<img src="./imgs/logo.png" alt="logo" />
</div>
<div class="sidebar-menu">
<ul>
<li class="active" tabindex="0" aria-label="矿机状态">
<a href="#">Miner Status</a>
<ul class="sidebar-submenu">
<li class="active" tabindex="0" aria-label="总览"> <a href="#">Overview </a></li>
<li tabindex="0" aria-label="模块" style="opacity:0.4;cursor:not-allowed;"> <a href="#">Modules</a></li>
</ul>
</li>
<li tabindex="0" aria-label="矿机配置"> <a href="#">Miner Configuration</a></li>
<li tabindex="0" aria-label="网络"> <a href="#">Network</a></li>
<li tabindex="0" aria-label="系统"> <a href="#">System</a></li>
</ul>
</div>
</nav>
<!-- 主内容 -->
<div class="main">
<!-- 顶部栏 -->
<div class="header">
<div class="header-user">
<span class="icon" aria-label="用户">👥</span>
Cgminer
</div>
<button class="restart-btn"
tabindex="0"
aria-label="重启"
onclick="handleRestart()"
onkeydown="if(event.key==='Enter'){handleRestart();}">
<span role="img" aria-label="重启">🔄</span> Restart
</button>
</div>
<!-- Summary -->
<div class="summary-row">
<div class="summary-card" aria-label="Elapsed">
<div class="label">Elapsed</div>
<div class="value" id="elapsed">96427.17</div>
<div class="unit">GH/S</div>
</div>
<div class="summary-card" aria-label="RT">
<div class="label">RT</div>
<div class="value" id="rt">95706.09</div>
<div class="unit">GH/S</div>
</div>
<div class="summary-card" aria-label="Average">
<div class="label">Average</div>
<div class="value" id="average">95706.09</div>
<div class="unit">GH/S</div>
</div>
</div>
<!-- Fan -->
<div class="fan-row">
<div class="fan-card" aria-label="Fan1">
<div class="label">Fan1</div>
<div class="circle">
<svg width="60" height="60">
<circle cx="30" cy="30" r="26" stroke="#e0e6ed" stroke-width="6" fill="none"/>
<circle cx="30" cy="30" r="26" stroke="#1976d2" stroke-width="6" fill="none"
stroke-dasharray="163.36" stroke-dashoffset="32.67" stroke-linecap="round"
transform="rotate(-90 30 30)"/>
</svg>
</div>
<div class="value" id="fan1">3000</div>
<div class="unit">Speed (r/min)</div>
</div>
<div class="fan-card" aria-label="Fan2">
<div class="label">Fan2</div>
<div class="circle">
<svg width="60" height="60">
<circle cx="30" cy="30" r="26" stroke="#e0e6ed" stroke-width="6" fill="none"/>
<circle cx="30" cy="30" r="26" stroke="#1976d2" stroke-width="6" fill="none"
stroke-dasharray="163.36" stroke-dashoffset="32.67" stroke-linecap="round"
transform="rotate(-90 30 30)"/>
</svg>
</div>
<div class="value" id="fan2">3000</div>
<div class="unit">Speed (r/min)</div>
</div>
</div>
<!-- Pools -->
<div class="section" aria-label="矿池信息">
<div class="section-title">Pools</div>
<div style="overflow-x:auto;">
<table class="pools-table">
<thead>
<tr>
<th>Pool</th>
<th>URL</th>
<th>User</th>
<th>Status</th>
<th>Diff</th>
<th>GetWorks</th>
<th>Accepted</th>
<th>Rejected</th>
</tr>
</thead>
<tbody id="pools-tbody">
<!-- JS渲染 -->
</tbody>
</table>
</div>
</div>
<!-- Diagnostic -->
<div class="section" aria-label="诊断日志">
<div class="section-title">Diagnostic</div>
<div class="diagnostic-log" id="diagnostic-log">
<!-- JS渲染 -->
</div>
</div>
</div>
</div>
<script src="./js/index.js"></script>
</body>
</html>

89
miner/js/index.js Normal file
View File

@ -0,0 +1,89 @@
/**
* 假数据
*/
const pools = [
{
pool: 1,
url: "http://34343424224:433",
user: "AABBBB",
status: "Normal",
diff: "524k",
getWorks: 652,
accepted: 2965,
rejected: 0,
},
{
pool: 1,
url: "http://34343424224:433",
user: "AABBBB",
status: "Normal",
diff: "666k",
getWorks: 1000,
accepted: 2000,
rejected: 0,
},
{
pool: 1,
url: "http://34343424224:433",
user: "AABBBB",
status: "Error",
diff: "-",
getWorks: "-",
accepted: "-",
rejected: 0,
},
];
const logs = [
"Apr 24 17:15:58 miner local0.err cgminer: error_event:=init miner board 1 fail!",
"Apr 24 17:15:58 miner local0.err cgminer: error_event:=init miner board 1 fail!",
"Apr 24 17:15:58 miner local0.err cgminer: error_event:=init miner board 1 fail!",
"Apr 24 17:15:58 miner local0.err cgminer: error_event:=init miner board 1 fail!",
];
/**
* 渲染矿池表格
*/
const renderPools = () => {
const tbody = document.getElementById('pools-tbody');
if (!tbody) return;
tbody.innerHTML = pools.map(pool => `
<tr>
<td>${pool.pool}</td>
<td>${pool.url}</td>
<td>${pool.user}</td>
<td>
<span class="badge ${pool.status === 'Normal' ? 'badge-normal' : 'badge-error'}">
${pool.status}
</span>
</td>
<td>${pool.diff}</td>
<td>${pool.getWorks}</td>
<td>${pool.accepted}</td>
<td>${pool.rejected}</td>
</tr>
`).join('');
};
/**
* 渲染诊断日志
*/
const renderLogs = () => {
const logDiv = document.getElementById('diagnostic-log');
if (!logDiv) return;
logDiv.innerHTML = logs.map(log => `<div>${log}</div>`).join('');
};
/**
* 重启按钮事件
*/
const handleRestart = () => {
alert('重启功能未实现');
};
// 初始化
window.addEventListener('DOMContentLoaded', () => {
renderPools();
renderLogs();
window.handleRestart = handleRestart;
});