mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-19 10:40:43 +08:00
Compare commits
No commits in common. "8e6489ba5c49a27a9b08439f7b4e9d83071e08f9" and "ffd8a878548b0a755e77551b4e9d90ba5fd7758b" have entirely different histories.
8e6489ba5c
...
ffd8a87854
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -142,7 +142,7 @@ jobs:
|
|||||||
cat changes.txt >> body.txt
|
cat changes.txt >> body.txt
|
||||||
|
|
||||||
# 添加其他发布说明
|
# 添加其他发布说明
|
||||||
echo -e "\n哪吒V1请下载dist.zip\n哪吒V0请下载v0-${{ steps.determine_version.outputs.version }}-all.zip\n至于all是全量包,cdn-jsdelivr是jsdelivr引用版,cdn-loli是cdnjs引用版\nv0版本构建物通过修改./config.js指定nezhaVersion版本可以正常在v1中使用" >> body.txt
|
echo -e "\n哪吒V1请下载dist.zip\n哪吒V0请下载v0-${{ steps.determine_version.outputs.version }}-all.zip\n至于all是全量的,cdn-jsdelivr是jsdelivr引用版,cdn-loli是cdnjs引用版\nv0版本构建物通过修改./config.js指定nezhaVersion版本可以正常在v1中使用" >> body.txt
|
||||||
|
|
||||||
# 更新发布说明
|
# 更新发布说明
|
||||||
gh release edit v${{ steps.determine_version.outputs.version }} --notes-file body.txt
|
gh release edit v${{ steps.determine_version.outputs.version }} --notes-file body.txt
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nazhua",
|
"name": "nazhua",
|
||||||
"version": "0.4.9",
|
"version": "0.4.8",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
window.$$nazhuaConfig = {
|
window.$$nazhuaConfig = {
|
||||||
// title: '哪吒监控', // 网站标题
|
// title: '哪吒监控', // 网站标题
|
||||||
// freeAmount: '白嫖', // 免费服务的费用名称
|
// freeAmount: '白嫖', // 免费服务的费用名称
|
||||||
// infinityCycle: '长期有效', // 无限周期名称
|
// infinityCycle: '无限', // 无限周期名称
|
||||||
// buyBtnText: '购买', // 购买按钮文案
|
// buyBtnText: '购买', // 购买按钮文案
|
||||||
// listServerStatusType: 'progress', // 服务器状态类型--列表
|
// listServerStatusType: 'progress', // 服务器状态类型--列表
|
||||||
// detailServerStatusType: 'progress', // 服务器状态类型--详情页
|
// detailServerStatusType: 'progress', // 服务器状态类型--详情页
|
||||||
@ -18,8 +18,6 @@ window.$$nazhuaConfig = {
|
|||||||
// hideTag: false, // 隐藏标签
|
// hideTag: false, // 隐藏标签
|
||||||
// hideDotBG: true, // 隐藏框框里面的点点背景
|
// hideDotBG: true, // 隐藏框框里面的点点背景
|
||||||
// monitorRefreshTime: 10, // 监控刷新时间间隔,单位s(秒), 0为不刷新,为保证不频繁请求源站,最低生效值为10s
|
// monitorRefreshTime: 10, // 监控刷新时间间隔,单位s(秒), 0为不刷新,为保证不频繁请求源站,最低生效值为10s
|
||||||
// filterWeirdGPU: true, // 过滤奇怪的GPU
|
|
||||||
// filterGPUKeywords: ['Virtual Display'], // 如果GPU名称中包含这些关键字,则过滤掉
|
|
||||||
// customCodeMap: {}, // 自定义的地图点信息
|
// customCodeMap: {}, // 自定义的地图点信息
|
||||||
// nezhaVersion: 'v1', // 哪吒版本
|
// nezhaVersion: 'v1', // 哪吒版本
|
||||||
// apiMonitorPath: '/api/v1/monitor/{id}',
|
// apiMonitorPath: '/api/v1/monitor/{id}',
|
||||||
|
|||||||
@ -45,27 +45,11 @@ export function getCPUInfo(text = '') {
|
|||||||
if (modelMatch) {
|
if (modelMatch) {
|
||||||
[cpuInfo.model] = modelMatch;
|
[cpuInfo.model] = modelMatch;
|
||||||
}
|
}
|
||||||
if (text.includes('Ryzen')) {
|
|
||||||
// 5900X 5950X 7900X 7950X 9900X 9950X
|
|
||||||
const modelNumReg = /Ryzen.*(\d{4}X)/;
|
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
|
||||||
if (modelNumMatch) {
|
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (text.includes('EPYC')) {
|
|
||||||
// 7B13 7B13 9654...
|
|
||||||
const modelNumReg = /EPYC (\w{4})/;
|
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
|
||||||
if (modelNumMatch) {
|
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 匹配特定的CPU型号编号
|
// 匹配特定的CPU型号编号
|
||||||
if (text.includes('Xeon')) {
|
if (text.includes('Xeon')) {
|
||||||
if (text.includes(' E')) {
|
if (text.includes('E-')) {
|
||||||
// Xeon型号
|
// Xeon型号
|
||||||
const modelNumReg = /(E\d-\w+)/;
|
const modelNumReg = /(E\d-\S+)/;
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
const modelNumMatch = text.match(modelNumReg);
|
||||||
if (modelNumMatch) {
|
if (modelNumMatch) {
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
[, cpuInfo.modelNum] = modelNumMatch;
|
||||||
@ -80,29 +64,17 @@ export function getCPUInfo(text = '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (text.includes('Core(TM)')) {
|
if (text.includes('Ryzen')) {
|
||||||
const modelNumReg = /Core\(TM\) (\w+-\w+)/;
|
// 5900X 5950X 7900X 7950X 9900X 9950X
|
||||||
|
const modelNumReg = /Ryzen.*(\d{4}X)/;
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
const modelNumMatch = text.match(modelNumReg);
|
||||||
if (modelNumMatch) {
|
if (modelNumMatch) {
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
[, cpuInfo.modelNum] = modelNumMatch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (text.includes('Celeron(R)')) {
|
if (text.includes('EPYC')) {
|
||||||
const modelNumReg = /Celeron\(R\) (\w+)/;
|
// 7B13 7B13 9654...
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
const modelNumReg = /EPYC (\w{4})/;
|
||||||
if (modelNumMatch) {
|
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (text.includes('Pentium(R)')) {
|
|
||||||
const modelNumReg = /Pentium\(R\) (\w+)/;
|
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
|
||||||
if (modelNumMatch) {
|
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (text.includes('Intel(R) N')) {
|
|
||||||
const modelNumReg = /Intel\(R\) (N\d+)/;
|
|
||||||
const modelNumMatch = text.match(modelNumReg);
|
const modelNumMatch = text.match(modelNumReg);
|
||||||
if (modelNumMatch) {
|
if (modelNumMatch) {
|
||||||
[, cpuInfo.modelNum] = modelNumMatch;
|
[, cpuInfo.modelNum] = modelNumMatch;
|
||||||
|
|||||||
@ -5,58 +5,28 @@
|
|||||||
CPU
|
CPU
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-content">
|
<div class="server-info-content">
|
||||||
<template v-if="info?.Host?.CPU?.length === 1">
|
<span
|
||||||
<span
|
class="cpu-info"
|
||||||
class="cpu-info"
|
:title="info?.Host?.CPU?.[0]"
|
||||||
:title="info.Host.CPU[0]"
|
|
||||||
>
|
|
||||||
<span>{{ info.Host.CPU[0] }}</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<div
|
|
||||||
v-else
|
|
||||||
class="server-info-item-group"
|
|
||||||
>
|
>
|
||||||
<span
|
<span>{{ info?.Host?.CPU?.[0] }}</span>
|
||||||
v-for="(cpuItem, cpuIndex) in info.Host.CPU"
|
</span>
|
||||||
:key="`${info.ID}_cpu_${cpuIndex}`"
|
|
||||||
class="server-info-item"
|
|
||||||
>
|
|
||||||
<span class="server-info-item-label">CPU.{{ cpuIndex + 1 }}</span>
|
|
||||||
<span class="server-info-item-value">{{ cpuItem }}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="gpuList.length"
|
v-if="info?.Host?.GPU?.[0]"
|
||||||
class="server-info-group server-info--gpu"
|
class="server-info-group server-info--gpu"
|
||||||
>
|
>
|
||||||
<div class="server-info-label">
|
<div class="server-info-label">
|
||||||
GPU
|
GPU
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-content">
|
<div class="server-info-content">
|
||||||
<template v-if="gpuList.length === 1">
|
<span
|
||||||
<span
|
class="cpu-info"
|
||||||
class="gpu-info"
|
:title="info?.Host?.GPU?.[0]"
|
||||||
:title="gpuList[0]"
|
|
||||||
>
|
|
||||||
<span>{{ gpuList[0] }}</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<div
|
|
||||||
v-else
|
|
||||||
class="server-info-item-group"
|
|
||||||
>
|
>
|
||||||
<span
|
<span>{{ info?.Host?.GPU?.[0] }}</span>
|
||||||
v-for="(gpuItem, gpuIndex) in gpuList"
|
</span>
|
||||||
:key="`${info.ID}_gpu_${gpuIndex}`"
|
|
||||||
class="server-info-item"
|
|
||||||
>
|
|
||||||
<span class="server-info-item-label">GPU.{{ gpuIndex + 1 }}</span>
|
|
||||||
<span class="server-info-item-value">{{ gpuItem }}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-group server-info--system-os">
|
<div class="server-info-group server-info--system-os">
|
||||||
@ -80,7 +50,7 @@
|
|||||||
占用
|
占用
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-content">
|
<div class="server-info-content">
|
||||||
<div class="server-info-item-group">
|
<span class="server-info-item-group">
|
||||||
<span class="server-info-item process-count">
|
<span class="server-info-item process-count">
|
||||||
<span class="server-info-item-label">进程数</span>
|
<span class="server-info-item-label">进程数</span>
|
||||||
<span class="server-info-item-value">{{ processCount }}</span>
|
<span class="server-info-item-value">{{ processCount }}</span>
|
||||||
@ -88,10 +58,10 @@
|
|||||||
<span class="server-info-item load">
|
<span class="server-info-item load">
|
||||||
<span class="server-info-item-label">负载</span>
|
<span class="server-info-item-label">负载</span>
|
||||||
<span class="server-info-item-value">
|
<span class="server-info-item-value">
|
||||||
{{ sysLoadInfo }}
|
{{ info?.State?.Load1 }},{{ info?.State?.Load5 }},{{ info?.State?.Load15 }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-group server-info--transfer">
|
<div class="server-info-group server-info--transfer">
|
||||||
@ -99,7 +69,7 @@
|
|||||||
流量
|
流量
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-content">
|
<div class="server-info-content">
|
||||||
<div class="server-info-item-group">
|
<span class="server-info-item-group">
|
||||||
<span class="server-info-item transfer--in">
|
<span class="server-info-item transfer--in">
|
||||||
<span class="server-info-item-label">入网</span>
|
<span class="server-info-item-label">入网</span>
|
||||||
<span class="server-info-item-value">
|
<span class="server-info-item-value">
|
||||||
@ -114,7 +84,7 @@
|
|||||||
<span class="text-unit">{{ transfer?.out?.unit }}</span>
|
<span class="text-unit">{{ transfer?.out?.unit }}</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-group server-info--conn">
|
<div class="server-info-group server-info--conn">
|
||||||
@ -122,7 +92,7 @@
|
|||||||
连接
|
连接
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-content">
|
<div class="server-info-content">
|
||||||
<div class="server-info-item-group">
|
<span class="server-info-item-group">
|
||||||
<span class="server-info-item conn--tcp">
|
<span class="server-info-item conn--tcp">
|
||||||
<span class="server-info-item-label">TCP</span>
|
<span class="server-info-item-label">TCP</span>
|
||||||
<span class="server-info-item-value">{{ tcpConnCount }}</span>
|
<span class="server-info-item-value">{{ tcpConnCount }}</span>
|
||||||
@ -131,7 +101,7 @@
|
|||||||
<span class="server-info-item-label">UDP</span>
|
<span class="server-info-item-label">UDP</span>
|
||||||
<span class="server-info-item-value">{{ udpConnCount }}</span>
|
<span class="server-info-item-value">{{ udpConnCount }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-group server-info--boottime">
|
<div class="server-info-group server-info--boottime">
|
||||||
@ -162,7 +132,7 @@
|
|||||||
套餐
|
套餐
|
||||||
</div>
|
</div>
|
||||||
<div class="server-info-content">
|
<div class="server-info-content">
|
||||||
<div class="server-info-item-group">
|
<span class="server-info-item-group">
|
||||||
<span
|
<span
|
||||||
v-for="item in billPlanData"
|
v-for="item in billPlanData"
|
||||||
:key="item.label"
|
:key="item.label"
|
||||||
@ -174,7 +144,7 @@
|
|||||||
>{{ item.label }}</span>
|
>{{ item.label }}</span>
|
||||||
<span class="server-info-item-value">{{ item.value }}</span>
|
<span class="server-info-item-value">{{ item.value }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -243,37 +213,6 @@ function toBuy() {
|
|||||||
window.open(decodeUrl, '_blank');
|
window.open(decodeUrl, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* GPU列表
|
|
||||||
*/
|
|
||||||
const gpuList = computed(() => {
|
|
||||||
const gpus = props.info?.Host?.GPU || [];
|
|
||||||
if (config.nazhua?.filterGPUKeywords?.length) {
|
|
||||||
// 过滤奇怪的GPU,可以考虑过滤掉 Virtual Display
|
|
||||||
const keywors = Array.isArray(config.nazhua.filterGPUKeywords)
|
|
||||||
? config.nazhua.filterGPUKeywords
|
|
||||||
: [config.nazhua.filterGPUKeywords];
|
|
||||||
return gpus.filter((i) => {
|
|
||||||
if (keywors.length) {
|
|
||||||
return !keywors.some((k) => i.toLowerCase().includes(k.toLowerCase()));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return gpus;
|
|
||||||
});
|
|
||||||
|
|
||||||
const sysLoadInfo = computed(() => {
|
|
||||||
if (props.info?.State?.Load1) {
|
|
||||||
return [
|
|
||||||
props.info.State?.Load1,
|
|
||||||
props.info.State?.Load5,
|
|
||||||
props.info.State?.Load15,
|
|
||||||
].filter((i) => i !== undefined).map((i) => (i).toFixed(2) * 1).join(',');
|
|
||||||
}
|
|
||||||
return '-';
|
|
||||||
});
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
billAndPlan,
|
billAndPlan,
|
||||||
} = handleServerBillAndPlan({
|
} = handleServerBillAndPlan({
|
||||||
|
|||||||
@ -94,8 +94,8 @@ export default (params) => {
|
|||||||
const endTime = dayjs(endDate).valueOf();
|
const endTime = dayjs(endDate).valueOf();
|
||||||
if (endDate.indexOf('0000-00-00') === 0) {
|
if (endDate.indexOf('0000-00-00') === 0) {
|
||||||
obj.remainingTime = {
|
obj.remainingTime = {
|
||||||
label: '剩余',
|
label: '有效期',
|
||||||
value: config.nazhua.infinityCycle || '长期有效',
|
value: config.nazhua.infinityCycle || '无限',
|
||||||
type: 'infinity',
|
type: 'infinity',
|
||||||
};
|
};
|
||||||
} else if (autoRenewal === '1') {
|
} else if (autoRenewal === '1') {
|
||||||
|
|||||||
@ -12,19 +12,19 @@
|
|||||||
:locations="locations"
|
:locations="locations"
|
||||||
/>
|
/>
|
||||||
<server-name
|
<server-name
|
||||||
:key="`${info.ID}_name`"
|
:key="info.ID"
|
||||||
:info="info"
|
:info="info"
|
||||||
/>
|
/>
|
||||||
<server-status-box
|
<server-status-box
|
||||||
:key="`${info.ID}_status`"
|
:key="info.ID"
|
||||||
:info="info"
|
:info="info"
|
||||||
/>
|
/>
|
||||||
<server-info-box
|
<server-info-box
|
||||||
:key="`${info.ID}_info`"
|
:key="info.ID"
|
||||||
:info="info"
|
:info="info"
|
||||||
/>
|
/>
|
||||||
<server-monitor
|
<server-monitor
|
||||||
:key="`${info.ID}_monitor`"
|
:key="info.ID"
|
||||||
:info="info"
|
:info="info"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user