From 31559eae3bdb9d242778cba7f2ffda16fbc329fd Mon Sep 17 00:00:00 2001 From: Denis Shatskiy Date: Tue, 5 Aug 2025 22:01:56 +0700 Subject: [PATCH] feat: Update API endpoints and routing for domains in Dashboard and MainLayout, removing deprecated components --- backend/server.js | 2 +- frontend/src/App.jsx | 11 +---------- frontend/src/Dashboard.jsx | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/backend/server.js b/backend/server.js index b574b0a..3e193e0 100644 --- a/backend/server.js +++ b/backend/server.js @@ -437,7 +437,7 @@ app.post('/api/filters', async (req, res) => { app.get('/api/s3/last-modified', async (req, res) => { try { const results = await Promise.allSettled([ - s3.headObject({ Bucket: BUCKET_NAME, Key: 'bgp_data/domains.txt' }).promise(), + s3.headObject({ Bucket: BUCKET_NAME, Key: 'bgp_data/domains_community.txt' }).promise(), s3.headObject({ Bucket: BUCKET_NAME, Key: 'bgp_data/domains_community.txt' }).promise(), s3.headObject({ Bucket: BUCKET_NAME, Key: 'bgp_data/asns.txt' }).promise(), s3.headObject({ Bucket: BUCKET_NAME, Key: 'servers.json' }).promise(), diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index ee7e18b..66e8490 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -24,7 +24,6 @@ import { IconHeart, IconCode } from '@tabler/icons-react'; -import DataManager from './DataManager'; import ServerManager from './ServerManager'; import FilterManager from './FilterManager'; import DomainsNewManager from './DomainsNewManager'; @@ -117,7 +116,6 @@ function MainLayout() { icon: IconDatabase, items: [ { id: 'domains', title: 'Домены', path: '/domains', icon: IconWorld }, - { id: 'domains-new', title: 'Домены New', path: '/domains-new', icon: IconWorld }, { id: 'ip-ranges', title: 'IP-диапазоны', path: '/ip-ranges', icon: IconNetwork }, { id: 'asns', title: 'AS', path: '/asns', icon: IconNetwork } ] @@ -286,14 +284,7 @@ function MainLayout() {
} /> - - } /> - } /> + } /> } /> } /> } /> diff --git a/frontend/src/Dashboard.jsx b/frontend/src/Dashboard.jsx index 081d29d..c5a5cf4 100644 --- a/frontend/src/Dashboard.jsx +++ b/frontend/src/Dashboard.jsx @@ -80,7 +80,7 @@ function Dashboard() { try { // Загружаем данные с обработкой ошибок для каждого endpoint const results = await Promise.allSettled([ - axios.get('/api/domains'), + axios.get('/api/domains-new'), axios.get('/api/ip-ranges'), axios.get('/api/asns'), axios.get('/api/servers'),