feat: Add WebSocket and background update functionality to ASNs, Domains, and IPRanges managers; integrate WsUpdateModal for real-time updates
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 5m33s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 5m33s
This commit is contained in:
@@ -57,7 +57,7 @@ function MetricCard({ title, value, icon: Icon, color, description }) {
|
||||
}
|
||||
|
||||
function Dashboard() {
|
||||
const [globalQuery, setGlobalQuery] = useState('');
|
||||
// Глобальный поиск удалён по требованию UX
|
||||
const [stats, setStats] = useState({
|
||||
domainsCount: null,
|
||||
ipRangesCount: null,
|
||||
@@ -170,19 +170,7 @@ function Dashboard() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* Глобальный поиск */}
|
||||
<div className="card mb-3">
|
||||
<div className="card-body d-flex align-items-center">
|
||||
<span className="input-icon-addon me-2"><IconSearch size={18} /></span>
|
||||
<input
|
||||
type="text"
|
||||
className="form-control"
|
||||
placeholder="Глобальный поиск по доменам, ASN, IP, серверам..."
|
||||
value={globalQuery}
|
||||
onChange={(e) => setGlobalQuery(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{/* Глобальный поиск удалён */}
|
||||
{/* Заголовок страницы */}
|
||||
<div className="page-header d-print-none mb-4">
|
||||
<div className="row align-items-center">
|
||||
@@ -204,9 +192,7 @@ function Dashboard() {
|
||||
<StatCard
|
||||
icon={IconWorld}
|
||||
color="blue"
|
||||
value={loading ? '...' : (globalQuery
|
||||
? raw.domains.filter(d => `${d.domain} ${d.community || d.type || ''}`.toLowerCase().includes(globalQuery.toLowerCase())).length
|
||||
: (stats.domainsCount ?? '—'))}
|
||||
value={loading ? '...' : (stats.domainsCount ?? '—')}
|
||||
title="Доменов"
|
||||
subtitle="Всего доменов в системе"
|
||||
to="/domains"
|
||||
@@ -216,9 +202,7 @@ function Dashboard() {
|
||||
<StatCard
|
||||
icon={IconNetwork}
|
||||
color="green"
|
||||
value={loading ? '...' : (globalQuery
|
||||
? raw.ipRanges.filter(x => `${x.ipRange} ${x.community || ''}`.toLowerCase().includes(globalQuery.toLowerCase())).length
|
||||
: (stats.ipRangesCount ?? '—'))}
|
||||
value={loading ? '...' : (stats.ipRangesCount ?? '—')}
|
||||
title="IP-диапазонов"
|
||||
subtitle="Всего IP диапазонов"
|
||||
to="/ip-ranges"
|
||||
@@ -228,9 +212,7 @@ function Dashboard() {
|
||||
<StatCard
|
||||
icon={IconNetwork}
|
||||
color="purple"
|
||||
value={loading ? '...' : (globalQuery
|
||||
? raw.asns.filter(a => `${a.domain || a.asn} ${a.type || a.community || ''}`.toLowerCase().includes(globalQuery.toLowerCase())).length
|
||||
: (stats.asnsCount ?? '—'))}
|
||||
value={loading ? '...' : (stats.asnsCount ?? '—')}
|
||||
title="AS"
|
||||
subtitle="Всего Autonomous Systems"
|
||||
to="/asns"
|
||||
@@ -240,9 +222,7 @@ function Dashboard() {
|
||||
<StatCard
|
||||
icon={IconServer}
|
||||
color="orange"
|
||||
value={loading ? '...' : (globalQuery
|
||||
? raw.servers.filter(s => `${s.ip} ${s.dns} ${s.country} ${s.provider}`.toLowerCase().includes(globalQuery.toLowerCase())).length
|
||||
: (stats.serversCount ?? '—'))}
|
||||
value={loading ? '...' : (stats.serversCount ?? '—')}
|
||||
title="Серверов"
|
||||
subtitle="Всего серверов"
|
||||
to="/servers"
|
||||
|
||||
Reference in New Issue
Block a user