fix28: полный production-фикс графиков, machine-auth, i18n и peer import/export

This commit is contained in:
2026-05-09 02:14:59 +05:00
parent 3c569061fe
commit 1139c428b6
11 changed files with 230 additions and 28 deletions
+12 -7
View File
@@ -160,11 +160,16 @@ const loadDashboard = async () => {
}
};
const xAxisLabels = computed(() => {
const trafficXAxisLabels = computed(() => {
const allTs = new Set<number>();
for (const item of timeseries.value.traffic || []) {
allTs.add(item.ts);
}
return Array.from(allTs).sort((a, b) => a - b);
});
const systemXAxisLabels = computed(() => {
const allTs = new Set<number>();
for (const item of timeseries.value.system || []) {
allTs.add(item.ts);
}
@@ -199,7 +204,7 @@ const trafficChartOption = computed(() => ({
xAxis: {
type: "category",
boundaryGap: false,
data: xAxisLabels.value.map((ts) => timestampToDateTime(ts)),
data: trafficXAxisLabels.value.map((ts) => timestampToDateTime(ts)),
},
yAxis: {
type: "value",
@@ -213,14 +218,14 @@ const trafficChartOption = computed(() => ({
type: "line",
smooth: true,
showSymbol: false,
data: xAxisLabels.value.map((ts) => trafficMap.value.get(ts)?.download || 0),
data: trafficXAxisLabels.value.map((ts) => trafficMap.value.get(ts)?.download || 0),
},
{
name: t("dashboard.upload"),
type: "line",
smooth: true,
showSymbol: false,
data: xAxisLabels.value.map((ts) => trafficMap.value.get(ts)?.upload || 0),
data: trafficXAxisLabels.value.map((ts) => trafficMap.value.get(ts)?.upload || 0),
},
],
}));
@@ -237,7 +242,7 @@ const systemChartOption = computed(() => ({
xAxis: {
type: "category",
boundaryGap: false,
data: xAxisLabels.value.map((ts) => timestampToDateTime(ts)),
data: systemXAxisLabels.value.map((ts) => timestampToDateTime(ts)),
},
yAxis: {
type: "value",
@@ -251,14 +256,14 @@ const systemChartOption = computed(() => ({
type: "line",
smooth: true,
showSymbol: false,
data: xAxisLabels.value.map((ts) => systemMap.value.get(ts)?.cpu || 0),
data: systemXAxisLabels.value.map((ts) => systemMap.value.get(ts)?.cpu || 0),
},
{
name: t("dashboard.ram"),
type: "line",
smooth: true,
showSymbol: false,
data: xAxisLabels.value.map((ts) => systemMap.value.get(ts)?.mem || 0),
data: systemXAxisLabels.value.map((ts) => systemMap.value.get(ts)?.mem || 0),
},
],
}));