Skip to content

Commit 75ef836

Browse files
committed
fix(nodes-list): update no nodes configured message for improved clarity and localization
1 parent 6290c88 commit 75ef836

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

dashboard/public/statics/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"noNodesDescription": "Master Panel doesn't have any cores configured. You need to add and configure a node from",
6262
"noNodesDescription2": "connect and configure it to the panel.",
6363
"noSearchResults": "No nodes match your search criteria. Try adjusting your search terms.",
64+
"noFilteredResults": "No nodes found",
6465
"logs": {
6566
"title": "Logs",
6667
"description": "View and monitor node logs",
@@ -1355,6 +1356,7 @@
13551356
"noHosts": "No hosts configured",
13561357
"noHostsDescription": "Get started by creating your first host configuration.",
13571358
"noSearchResults": "No hosts match your search criteria. Try adjusting your search terms.",
1359+
"noFilteredResults": "No nodes found",
13581360
"xudp_proxy_443": "XUDP Proxy 443",
13591361
"reject": "Reject",
13601362
"allow": "Allow",

dashboard/public/statics/locales/fa.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,7 @@
14111411
"noNodesDescription": "پنل اصلی هیچ هسته‌ای ندارد. شما باید یک گره از",
14121412
"noNodesDescription2": "پیکربندی کرده و آن را به پنل متصل کنید.",
14131413
"noSearchResults": "هیچ گره‌ای با معیارهای جستجوی شما مطابقت ندارد. لطفاً عبارات جستجوی خود را تغییر دهید.",
1414+
"noFilteredResults": "گره‌ای یافت نشد",
14141415
"logs": {
14151416
"title": "لاگ‌ها",
14161417
"description": "مشاهده و نظارت بر لاگ‌های گره‌ها",

dashboard/public/statics/locales/ru.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"noNodesDescription": "Главная панель не имеет настроенных ядер. Вам нужно добавить и настроить узел из",
8989
"noNodesDescription2": "подключить и настроить его к панели.",
9090
"noSearchResults": "Нет узлов, соответствующих вашим критериям поиска. Попробуйте изменить условия поиска.",
91+
"noFilteredResults": "Узлы не найдены",
9192
"logs": {
9293
"title": "Журналы",
9394
"description": "Просмотр и мониторинг журналов узла",

dashboard/public/statics/locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"noNodesDescription": "主面板没有配置任何核心。您需要从",
5858
"noNodesDescription2": "连接和配置节点,并将其连接到面板。",
5959
"noSearchResults": "没有节点匹配您的搜索条件。请尝试调整搜索词。",
60+
"noFilteredResults": "未找到节点",
6061
"logs": {
6162
"title": "日志",
6263
"description": "查看和监控节点日志",

dashboard/src/components/nodes/nodes-list.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ export default function NodesList() {
224224
return nodesResponse?.nodes || []
225225
}, [shouldUseLocalSearch, localSearchTerm, allNodes, nodesResponse?.nodes])
226226

227+
const hasActiveFilters = !!(
228+
filters.search ||
229+
localSearchTerm ||
230+
(filters.status && filters.status.length > 0) ||
231+
filters.core_id
232+
)
233+
227234
const paginatedNodes = useMemo(() => {
228235
if (shouldUseLocalSearch && localSearchTerm) {
229236
const start = currentPage * NODES_PER_PAGE
@@ -357,7 +364,7 @@ export default function NodesList() {
357364
/>
358365
)}
359366

360-
{!showLoadingSpinner && !showPageLoadingSkeletons && nodesData.length === 0 && !filters.search && !localSearchTerm && totalNodes === 0 && (
367+
{!showLoadingSpinner && !showPageLoadingSkeletons && nodesData.length === 0 && !hasActiveFilters && totalNodes === 0 && (
361368
<Card className="mb-12">
362369
<CardContent className="p-8 text-center">
363370
<div className="space-y-4">
@@ -374,12 +381,14 @@ export default function NodesList() {
374381
</Card>
375382
)}
376383

377-
{!showLoadingSpinner && !showPageLoadingSkeletons && nodesData.length === 0 && (filters.search || localSearchTerm) && (
384+
{!showLoadingSpinner && !showPageLoadingSkeletons && nodesData.length === 0 && hasActiveFilters && (
378385
<Card className="mb-12">
379386
<CardContent className="p-8 text-center">
380387
<div className="space-y-4">
381-
<h3 className="text-lg font-semibold">{t('noResults')}</h3>
382-
<p className="mx-auto max-w-2xl text-muted-foreground">{t('nodes.noSearchResults', { defaultValue: 'No nodes match your search criteria. Try adjusting your search terms.' })}</p>
388+
<h3 className="text-lg font-semibold">{t('nodes.noFilteredResults')}</h3>
389+
<p className="mx-auto max-w-2xl text-muted-foreground">
390+
{t('nodes.noSearchResults')}
391+
</p>
383392
</div>
384393
</CardContent>
385394
</Card>

0 commit comments

Comments
 (0)