feat: Enhance ASNsNewManager with input validation, import/export functionality, and improved UI feedback for better user experience
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 7m32s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 7m32s
This commit is contained in:
+10
-33
@@ -16,9 +16,9 @@ import {
|
||||
IconCreditCard
|
||||
} from '@tabler/icons-react';
|
||||
|
||||
function StatCard({ icon: Icon, color, value, title, subtitle }) {
|
||||
function StatCard({ icon: Icon, color, value, title, subtitle, to }) {
|
||||
return (
|
||||
<div className="card h-100">
|
||||
<div className="card h-100 position-relative">
|
||||
<div className="card-body d-flex align-items-center">
|
||||
<span className={`avatar avatar-lg me-3 bg-${color}-lt text-${color} border-0`}>
|
||||
<Icon size={32} />
|
||||
@@ -28,6 +28,9 @@ function StatCard({ icon: Icon, color, value, title, subtitle }) {
|
||||
<div className="text-muted lh-1">{subtitle}</div>
|
||||
</div>
|
||||
</div>
|
||||
{to && (
|
||||
<Link to={to} className="stretched-link" aria-label={title}></Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -173,6 +176,7 @@ function Dashboard() {
|
||||
value={loading ? '...' : stats.domainsCount ?? '—'}
|
||||
title="Доменов"
|
||||
subtitle="Всего доменов в системе"
|
||||
to="/domains"
|
||||
/>
|
||||
</div>
|
||||
<div className="col-md-3">
|
||||
@@ -182,6 +186,7 @@ function Dashboard() {
|
||||
value={loading ? '...' : stats.ipRangesCount ?? '—'}
|
||||
title="IP-диапазонов"
|
||||
subtitle="Всего IP диапазонов"
|
||||
to="/ip-ranges"
|
||||
/>
|
||||
</div>
|
||||
<div className="col-md-3">
|
||||
@@ -191,6 +196,7 @@ function Dashboard() {
|
||||
value={loading ? '...' : stats.asnsCount ?? '—'}
|
||||
title="AS"
|
||||
subtitle="Всего Autonomous Systems"
|
||||
to="/asns"
|
||||
/>
|
||||
</div>
|
||||
<div className="col-md-3">
|
||||
@@ -200,6 +206,7 @@ function Dashboard() {
|
||||
value={loading ? '...' : stats.serversCount ?? '—'}
|
||||
title="Серверов"
|
||||
subtitle="Всего серверов"
|
||||
to="/servers"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -244,37 +251,7 @@ function Dashboard() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Быстрые действия */}
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
<h3 className="card-title">Быстрые действия</h3>
|
||||
</div>
|
||||
<div className="card-body">
|
||||
<div className="btn-list">
|
||||
<Link to="/domains" className="btn btn-outline-primary">
|
||||
<IconWorld className="me-2" /> Домены
|
||||
</Link>
|
||||
<Link to="/ip-ranges" className="btn btn-outline-primary">
|
||||
<IconNetwork className="me-2" /> IP-диапазоны
|
||||
</Link>
|
||||
<Link to="/asns" className="btn btn-outline-primary">
|
||||
<IconNetwork className="me-2" /> AS
|
||||
</Link>
|
||||
<Link to="/servers" className="btn btn-outline-primary">
|
||||
<IconServer className="me-2" /> Серверы
|
||||
</Link>
|
||||
<Link to="/filters" className="btn btn-outline-primary">
|
||||
<IconFilter className="me-2" /> Фильтры
|
||||
</Link>
|
||||
<Link to="/auto-urls" className="btn btn-outline-primary">
|
||||
<IconDownload className="me-2" /> Авто URL
|
||||
</Link>
|
||||
<Link to="/billing" className="btn btn-outline-primary">
|
||||
<IconCreditCard className="me-2" /> Биллинг
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* Убрали быстрые действия, карточки выше кликабельны */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user