Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
096c2d401d | ||
|
|
2d08128cb7 | ||
|
|
a7906026d5 |
No files matched your search
@@ -1,3 +1,6 @@
|
|||||||
|
## 0.12.5
|
||||||
|
- Исправлено неверное поведение показа меню
|
||||||
|
- Добавлена страница NotFoundPage
|
||||||
## 0.12.4
|
## 0.12.4
|
||||||
- Уменьшен размер бандла
|
- Уменьшен размер бандла
|
||||||
## 0.12.3
|
## 0.12.3
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8001;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
root /opt/msp/isp-admin-ui/;
|
root /opt/msp/isp-admin-ui/;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ server {
|
|||||||
location /api {
|
location /api {
|
||||||
client_max_body_size 10M;
|
client_max_body_size 10M;
|
||||||
|
|
||||||
proxy_pass http://10.2.4.241:9003;
|
proxy_pass http://isp-gate-service:9003;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
Generated
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "isp-admin-ui",
|
"name": "isp-admin-ui",
|
||||||
"version": "0.12.3",
|
"version": "0.12.5",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "isp-admin-ui",
|
"name": "isp-admin-ui",
|
||||||
"version": "0.12.3",
|
"version": "0.12.5",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/json-schema-ref-parser": "^9.0.6",
|
"@apidevtools/json-schema-ref-parser": "^9.0.6",
|
||||||
"@codemirror/lang-json": "^6.0.1",
|
"@codemirror/lang-json": "^6.0.1",
|
||||||
@@ -7981,8 +7981,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/isp-ui-kit": {
|
"node_modules/isp-ui-kit": {
|
||||||
"version": "0.6.0",
|
"version": "0.7.1",
|
||||||
"resolved": "git+ssh://git@github.com/txix-open/isp-ui-kit.git#5f48f91bdb9b342bc7b14c3a40ea061c3474ae81",
|
"resolved": "git+ssh://git@github.com/txix-open/isp-ui-kit.git#657a9c1b62fb757938e12091faba6f5f53c7d7e9",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/lang-javascript": "^6.2.1",
|
"@codemirror/lang-javascript": "^6.2.1",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "isp-admin-ui",
|
"name": "isp-admin-ui",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.12.4",
|
"version": "0.12.5",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ import { routePaths } from '@routes/routePaths.ts'
|
|||||||
|
|
||||||
import { PermissionKeysType } from '@type/roles.type.ts'
|
import { PermissionKeysType } from '@type/roles.type.ts'
|
||||||
|
|
||||||
import './layout.scss'
|
|
||||||
|
|
||||||
|
import './layout.scss';
|
||||||
|
|
||||||
|
|
||||||
const { Content, Sider } = Layout
|
const { Content, Sider } = Layout
|
||||||
|
|
||||||
@@ -138,17 +141,16 @@ const LayoutComponent = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const menuKey = location.pathname.split('/')[1] as MenuItemKeysType
|
const menuKey = location.pathname.split('/')[1] as MenuItemKeysType
|
||||||
|
const selectedKey = selectedMenuKeys[0] || ''
|
||||||
const menuItem = menuKeys[menuKey]
|
const menuItem = menuKeys[menuKey]
|
||||||
|
|
||||||
if (menuItem) {
|
if (menuItem && menuKey !== selectedKey) {
|
||||||
setSelectedMenuKeys([menuItem.key])
|
setSelectedMenuKeys([menuItem.key])
|
||||||
setOpenKeys(menuItem.parent)
|
if (selectedKey) {
|
||||||
} else {
|
setOpenKeys(menuItem.parent)
|
||||||
setSelectedMenuKeys([])
|
}
|
||||||
setOpenKeys([])
|
|
||||||
}
|
}
|
||||||
}, [location])
|
}, [location.pathname])
|
||||||
|
|
||||||
const handlerOnClickMenu: MenuProps['onClick'] = ({ key }): void => {
|
const handlerOnClickMenu: MenuProps['onClick'] = ({ key }): void => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { Button } from 'antd'
|
||||||
|
import { Layout } from 'isp-ui-kit'
|
||||||
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
|
||||||
|
import { routePaths } from '@routes/routePaths.ts'
|
||||||
|
|
||||||
|
|
||||||
|
const { NotFoundPage } = Layout
|
||||||
|
|
||||||
|
const NotFound = () => {
|
||||||
|
const navigate = useNavigate()
|
||||||
|
return (
|
||||||
|
<NotFoundPage>
|
||||||
|
<Button type="primary" onClick={() => navigate(routePaths.modules)}>
|
||||||
|
На главную
|
||||||
|
</Button>
|
||||||
|
</NotFoundPage>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default NotFound
|
||||||
@@ -4,6 +4,7 @@ import { lazy, Suspense } from 'react'
|
|||||||
import { Navigate, Route, Routes } from 'react-router-dom'
|
import { Navigate, Route, Routes } from 'react-router-dom'
|
||||||
|
|
||||||
import LayoutComponent from '@components/Layout'
|
import LayoutComponent from '@components/Layout'
|
||||||
|
|
||||||
// Составная часть основной страницы, поэтому без lazy
|
// Составная часть основной страницы, поэтому без lazy
|
||||||
import Configurations from '@pages/ConfigurationsPage'
|
import Configurations from '@pages/ConfigurationsPage'
|
||||||
import Connections from '@pages/ConnectionsPage'
|
import Connections from '@pages/ConnectionsPage'
|
||||||
@@ -26,7 +27,9 @@ const ModulesPage = lazy(() => import('@pages/ModulesPage'))
|
|||||||
const ApplicationsPage = lazy(() => import('@pages/ApplicationsPage'))
|
const ApplicationsPage = lazy(() => import('@pages/ApplicationsPage'))
|
||||||
const AllVersionsPage = lazy(() => import('@pages/AllVersionsPage'))
|
const AllVersionsPage = lazy(() => import('@pages/AllVersionsPage'))
|
||||||
const ConfigurationEditorPage = lazy(
|
const ConfigurationEditorPage = lazy(
|
||||||
() => import('@pages/ConfigurationEditorPage'))
|
() => import('@pages/ConfigurationEditorPage')
|
||||||
|
)
|
||||||
|
const NotFound = lazy(() => import('@pages/NotFound'))
|
||||||
|
|
||||||
const Routers = () => {
|
const Routers = () => {
|
||||||
return (
|
return (
|
||||||
@@ -151,14 +154,14 @@ const Routers = () => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
<Route path={`:moduleId/${routePaths.configEditor}/:id`}
|
<Route
|
||||||
element={
|
path={`:moduleId/${routePaths.configEditor}/:id`}
|
||||||
<Suspense fallback={<Spin />}>
|
element={
|
||||||
<ConfigurationEditorPage />
|
<Suspense fallback={<Spin />}>
|
||||||
</Suspense>
|
<ConfigurationEditorPage />
|
||||||
}>
|
</Suspense>
|
||||||
|
}
|
||||||
</Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
path={routePaths.modules}
|
path={routePaths.modules}
|
||||||
element={
|
element={
|
||||||
@@ -213,6 +216,14 @@ const Routers = () => {
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path={routePaths.notFound}
|
||||||
|
element={
|
||||||
|
<Suspense fallback={<Spin />}>
|
||||||
|
<NotFound />
|
||||||
|
</Suspense>
|
||||||
|
}
|
||||||
|
/>
|
||||||
</Routes>
|
</Routes>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-15
@@ -17,23 +17,10 @@ export default defineConfig(({ mode }) => {
|
|||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
minify: 'esbuild',
|
minify: 'esbuild',
|
||||||
sourcemap: false,
|
sourcemap: true,
|
||||||
outDir: 'build',
|
outDir: 'build',
|
||||||
chunkSizeWarningLimit: 1600,
|
chunkSizeWarningLimit: 1600,
|
||||||
commonjsOptions: { transformMixedEsModules: true },
|
commonjsOptions: { transformMixedEsModules: true },
|
||||||
rollupOptions: {
|
|
||||||
output: {
|
|
||||||
manualChunks(id) {
|
|
||||||
if (id.includes('node_modules')) {
|
|
||||||
return id
|
|
||||||
.toString()
|
|
||||||
.split('node_modules/')[1]
|
|
||||||
.split('/')[0]
|
|
||||||
.toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
watch: {
|
watch: {
|
||||||
@@ -41,7 +28,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
},
|
},
|
||||||
host: true,
|
host: true,
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
port: 8000,
|
port: 8001,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': env.PROXY_URL
|
'/api': env.PROXY_URL
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user