Compare commits

..

No commits in common. "ffd8a878548b0a755e77551b4e9d90ba5fd7758b" and "92faaed431415e5f6fba0cb6354a95b8b0d0d2fd" have entirely different histories.

6 changed files with 31 additions and 50 deletions

View File

@ -132,7 +132,7 @@ jobs:
- name: Add release notes
run: |
# 获取最近一次提交的变更内容
git log -1 --pretty=format:"%s%n%b" > changes.txt
git diff HEAD^ HEAD --name-only > changes.txt
# 获取现有的发布说明
gh release view v${{ steps.determine_version.outputs.version }} --json body -q .body > body.txt

View File

@ -1,6 +1,6 @@
{
"name": "nazhua",
"version": "0.4.8",
"version": "0.4.6",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -17,7 +17,6 @@ window.$$nazhuaConfig = {
// hideFilter: false, // 隐藏筛选
// hideTag: false, // 隐藏标签
// hideDotBG: true, // 隐藏框框里面的点点背景
// monitorRefreshTime: 10, // 监控刷新时间间隔单位s, 0为不刷新为保证不频繁请求源站最低生效值为10s
// customCodeMap: {}, // 自定义的地图点信息
// nezhaVersion: 'v1', // 哪吒版本
// apiMonitorPath: '/api/v1/monitor/{id}',

View File

@ -5,19 +5,15 @@ import {
TooltipComponent,
LegendComponent,
GridComponent,
DataZoomComponent,
} from 'echarts/components';
import dayjs from 'dayjs';
import config from '@/config';
use([
CanvasRenderer,
LineChart,
TooltipComponent,
LegendComponent,
GridComponent,
DataZoomComponent,
]);
export default (
@ -26,7 +22,6 @@ export default (
valueList,
mode = 'dark',
) => {
const fontFamily = config.nazhua.disableSarasaTermSC === true ? undefined : 'Sarasa Term SC';
const option = {
tooltip: {
trigger: 'axis',
@ -37,7 +32,7 @@ export default (
const time = dayjs(parseInt(params[0].axisValue, 10)).format('YYYY.MM.DD HH:mm');
let res = `${time}<br>`;
params.forEach((i) => {
res += `${i.marker} ${i.seriesName}: ${i.value[1]}ms<br>`;
res += `${i.marker} ${i.seriesName}: ${i.value}ms<br>`;
});
return res;
},
@ -54,22 +49,27 @@ export default (
data: cateList,
textStyle: {
color: mode === 'dark' ? '#ddd' : '#222',
fontFamily,
fontFamily: 'Sarasa Term SC',
fontSize: 14,
},
},
grid: {
left: 0,
right: 5,
bottom: 0,
containLabel: true,
xAxis: {
type: 'category',
data: dateList,
axisLabel: {
hideOverlap: true,
interval: Math.max(
Math.ceil(dateList.length / 12),
1,
),
nameTextStyle: {
fontSize: 12,
},
formatter: (val) => dayjs(parseInt(val, 10)).format('HH:mm'),
fontFamily: 'Sarasa Term SC',
color: mode === 'dark' ? '#eee' : '#222',
},
},
dataZoom: [{
id: 'dataZoomX',
type: 'slider',
xAxisIndex: [0],
filterMode: 'filter',
}],
yAxis: {
type: 'value',
splitLine: {
@ -78,22 +78,16 @@ export default (
},
},
axisLabel: {
fontFamily,
fontFamily: 'Sarasa Term SC',
color: mode === 'dark' ? '#ddd' : '#222',
fontSize: 12,
},
},
xAxis: {
type: 'time',
data: dateList,
axisLabel: {
hideOverlap: true,
nameTextStyle: {
fontSize: 12,
},
fontFamily,
color: mode === 'dark' ? '#eee' : '#222',
},
grid: {
left: 0,
right: 0,
bottom: 0,
containLabel: true,
},
series: valueList.map((i) => ({
type: 'line',

View File

@ -39,7 +39,7 @@ export function findIntersectingGroups(coordinates) {
coordinates.forEach((coordinate, index) => {
const intersects = [];
const n = -2;
const n = 2;
coordinates.forEach((otherCoordinate, otherIndex) => {
if (index !== otherIndex) {
if (

View File

@ -101,10 +101,9 @@ const monitorChartData = computed(() => {
const dateList = [];
Object.keys(dateMap).forEach((i) => {
if (dateMap[i]?.length) {
const time = parseInt(i, 10);
dateList.push(time);
dateList.push(parseInt(i, 10));
dateMap[i].forEach((o) => {
cateMap[o.name].push([time, o.value]);
cateMap[o.name].push(o.value);
});
}
});
@ -152,20 +151,9 @@ async function setTimeLoadMonitor() {
clearTimeout(loadMonitorTimer);
}
await loadMonitor();
let monitorRefreshTime = parseInt(config.nazhua.monitorRefreshTime, 10);
// 0
if (monitorRefreshTime === 0) {
return;
}
// 10
if (Number.isNaN(monitorRefreshTime)) {
monitorRefreshTime = 10;
}
// 10
const sTime = Math.min(monitorRefreshTime, 10);
loadMonitorTimer = setTimeout(() => {
setTimeLoadMonitor();
}, sTime * 1000);
}, 10000);
}
onMounted(() => {
@ -181,7 +169,7 @@ onUnmounted(() => {
<style lang="scss" scoped>
.server-monitor-group {
--line-chart-size: 280px;
--line-chart-size: 270px;
}
.module-head-group {