fix(apps): sanitize app_label to backone prefix and update compose to latest frontend tag

This commit is contained in:
ypratama committed 2026-11-10 14:29:04 +07:00
1 parent d7be4c3031
commit bd16f19345
2 files changed
+11 -4

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ services:
- BACKONE_INFORMATICS_BASE_URL=${NETIFY_INFORMATICS_BASE_URL}
frontend:
image: git.proit.id/ypratama/deep-package-inspection/backone-frontend:v2
image: git.proit.id/ypratama/deep-package-inspection/backone-frontend:latest
container_name: backone_frontend_prod
restart: always
ports:
+10 -3
View File
@@ -1,6 +1,6 @@
"use client";
import { useState, useEffect } from "react";
import { useState, useEffect, useMemo } from "react";
import { TimestampCell } from "@/components/ui/TimestampCell";
import { AppStat } from "@/lib/api";
import { useTopApps } from "@/lib/api-with-context";
@@ -33,7 +33,14 @@ export default function AppsPage() {
if (!mounted) return null;
const all = data || [];
const all = useMemo(() => {
return (data || []).map((r: any) => ({
...r,
app_label: (r.app_label || "")
.replace(/\b(?:netify|siab|nexus)\.unclassified/gi, "backone.unclassified")
.replace(/\b(?:netify|siab|nexus)\.(?!ai)/gi, "backone."),
}));
}, [data]);
const opts = (key: string) => {
const raw = Array.from(new Set(all.map((r: any) => String(r[key] || "")).filter(Boolean)));
@@ -189,7 +196,7 @@ export default function AppsPage() {
<ResponsiveContainer width="100%" height="100%">
<BarChart data={top5} margin={{ top: 20, right: 30, left: 20, bottom: 5 }}>
<CartesianGrid strokeDasharray="3 3" stroke="#30363d" vertical={false} />
<XAxis dataKey="app_label" stroke="#8b949e" tickLine={false} axisLine={false} />
<XAxis dataKey="app_label" stroke="#8b949e" tickLine={false} axisLine={false} tickFormatter={formatAppLabel} />
<YAxis
stroke="#8b949e"
tickLine={false}