Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae26c073e1 | ||
|
|
1a1d2b594c |
No files matched your search
@@ -1,3 +1,11 @@
|
|||||||
|
## 0.15.1
|
||||||
|
- Изменен цвет компонента Tag в ActiveConfigurationsTable
|
||||||
|
- Изменена иконка редакторивания конфига на <FormOutlined />
|
||||||
|
## 0.15.0
|
||||||
|
- Добавлены placeholder для поиска в первом столбце
|
||||||
|
- Добавлен заголовок первого столбца на экране Модули
|
||||||
|
- Изменен интервал поллинга для get_modules на 5 секунд
|
||||||
|
- Изменена логика работы редиректа после окончания сессии
|
||||||
## 0.14.2
|
## 0.14.2
|
||||||
- Исправлено появление экрана после логина
|
- Исправлено появление экрана после логина
|
||||||
- На экране ошибки добавлена кнопка "На главную"
|
- На экране ошибки добавлена кнопка "На главную"
|
||||||
|
|||||||
Generated
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "isp-admin-ui",
|
"name": "isp-admin-ui",
|
||||||
"version": "0.14.1",
|
"version": "0.15.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "isp-admin-ui",
|
"name": "isp-admin-ui",
|
||||||
"version": "0.14.1",
|
"version": "0.15.1",
|
||||||
"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",
|
||||||
@@ -7970,8 +7970,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/isp-ui-kit": {
|
"node_modules/isp-ui-kit": {
|
||||||
"version": "0.7.5",
|
"version": "0.8.1",
|
||||||
"resolved": "git+ssh://git@github.com/txix-open/isp-ui-kit.git#040326c756de20d7a4bfad3411c9fa9feb7c4818",
|
"resolved": "git+ssh://git@github.com/txix-open/isp-ui-kit.git#18178ff6af4ea9ee220a3d5eab318e88af7a6b96",
|
||||||
"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.14.2",
|
"version": "0.15.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ const ActiveConfigurationsTable: FC<ActiveConfigurationsTablePropsType> =
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
render: (value: boolean) => {
|
render: (value: boolean) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
return <Tag color="#4fc14f">Корректная</Tag>
|
return <Tag color="success">Корректная</Tag>
|
||||||
}
|
}
|
||||||
return <Tag color="red">Некорректная</Tag>
|
return <Tag color="error">Некорректная</Tag>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { darkTheme, lightTheme } from '@constants/theme.ts'
|
|||||||
import { Context } from '@stores/index.tsx'
|
import { Context } from '@stores/index.tsx'
|
||||||
|
|
||||||
import Routers from '@routes/Routers'
|
import Routers from '@routes/Routers'
|
||||||
|
import { routePaths } from '@routes/routePaths.ts'
|
||||||
|
|
||||||
import './app.scss'
|
import './app.scss'
|
||||||
|
|
||||||
@@ -23,7 +24,11 @@ const App = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const prevRoute = sessionStorage.getItem('prevRoute')
|
const prevRoute = sessionStorage.getItem('prevRoute')
|
||||||
if (location.pathname !== prevRoute) {
|
if (
|
||||||
|
location.pathname !== routePaths.error &&
|
||||||
|
location.pathname !== routePaths.login &&
|
||||||
|
location.pathname !== prevRoute
|
||||||
|
) {
|
||||||
sessionStorage.setItem('prevRoute', location.pathname)
|
sessionStorage.setItem('prevRoute', location.pathname)
|
||||||
}
|
}
|
||||||
}, [location])
|
}, [location])
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
|||||||
<section className="applications-content">
|
<section className="applications-content">
|
||||||
<Column
|
<Column
|
||||||
title="Приложения"
|
title="Приложения"
|
||||||
|
searchPlaceholder="Введите имя или id"
|
||||||
onUpdateItem={updateApplicationModal}
|
onUpdateItem={updateApplicationModal}
|
||||||
showUpdateBtn={true}
|
showUpdateBtn={true}
|
||||||
onAddItem={addApplicationModal}
|
onAddItem={addApplicationModal}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ const AppAccessPage = () => {
|
|||||||
<section className="app-access-page">
|
<section className="app-access-page">
|
||||||
<Column
|
<Column
|
||||||
title="Приложения"
|
title="Приложения"
|
||||||
|
searchPlaceholder="Введите имя или id"
|
||||||
showUpdateBtn={false}
|
showUpdateBtn={false}
|
||||||
showAddBtn={false}
|
showAddBtn={false}
|
||||||
showRemoveBtn={false}
|
showRemoveBtn={false}
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ const ApplicationsPage = () => {
|
|||||||
<main className="applications-page">
|
<main className="applications-page">
|
||||||
<Column
|
<Column
|
||||||
title="Группы приложений"
|
title="Группы приложений"
|
||||||
|
searchPlaceholder="Введите имя или id"
|
||||||
onUpdateItem={updateApplicationModal}
|
onUpdateItem={updateApplicationModal}
|
||||||
showUpdateBtn={true}
|
showUpdateBtn={true}
|
||||||
onAddItem={addApplicationModal}
|
onAddItem={addApplicationModal}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const LoginPage = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleError = (err: AxiosError<MSPError>): void => {
|
const handleError = (err: AxiosError<MSPError>): void => {
|
||||||
const { response,status } = err
|
const { response, status } = err
|
||||||
if (response && status === 401) {
|
if (response && status === 401) {
|
||||||
setFormError(response.statusText, messages.loginError)
|
setFormError(response.statusText, messages.loginError)
|
||||||
} else {
|
} else {
|
||||||
@@ -57,9 +57,8 @@ const LoginPage = () => {
|
|||||||
LocalStorage.set(localStorageKeys.HEADER_NAME, response.headerName)
|
LocalStorage.set(localStorageKeys.HEADER_NAME, response.headerName)
|
||||||
LocalStorage.set(localStorageKeys.USER_TOKEN, response.token)
|
LocalStorage.set(localStorageKeys.USER_TOKEN, response.token)
|
||||||
const redirectUrl =
|
const redirectUrl =
|
||||||
localStorage.getItem('redirectUrl') || routePaths.home
|
sessionStorage.getItem('prevRoute') || routePaths.home
|
||||||
navigate(redirectUrl, { replace: true })
|
navigate(redirectUrl, { replace: true })
|
||||||
localStorage.removeItem('redirectUrl')
|
|
||||||
})
|
})
|
||||||
.catch((err: AxiosError<MSPError>) => handleError(err))
|
.catch((err: AxiosError<MSPError>) => handleError(err))
|
||||||
}
|
}
|
||||||
@@ -106,15 +105,15 @@ const LoginPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<section className="login-page">
|
<section className="login-page">
|
||||||
<form className="login-page__content">
|
<form className="login-page__content">
|
||||||
<h1 data-cy="login-title" className="login-page__content__title">
|
<h1 data-cy="login-title" className="login-page__content__title">
|
||||||
Вход в систему
|
Вход в систему
|
||||||
</h1>
|
</h1>
|
||||||
<Divider />
|
<Divider />
|
||||||
{renderInternalAuthForm()}
|
{renderInternalAuthForm()}
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const ModulesPage = () => {
|
|||||||
const [searchParams, setSearchParams] = useSearchParams()
|
const [searchParams, setSearchParams] = useSearchParams()
|
||||||
const { data: ModulesList = [], isLoading: isModulesLoading } =
|
const { data: ModulesList = [], isLoading: isModulesLoading } =
|
||||||
modulesServiceApi.useGetModulesQuery('modules', {
|
modulesServiceApi.useGetModulesQuery('modules', {
|
||||||
pollingInterval: 1000,
|
pollingInterval: 5000,
|
||||||
skipPollingIfUnfocused: true
|
skipPollingIfUnfocused: true
|
||||||
})
|
})
|
||||||
const [removeModule] = modulesServiceApi.useRemoveModuleMutation()
|
const [removeModule] = modulesServiceApi.useRemoveModuleMutation()
|
||||||
@@ -190,6 +190,8 @@ const ModulesPage = () => {
|
|||||||
return (
|
return (
|
||||||
<section className="modules-page">
|
<section className="modules-page">
|
||||||
<Column
|
<Column
|
||||||
|
title="Модули"
|
||||||
|
searchPlaceholder="Введите имя или id"
|
||||||
items={filterFirstColumnItems(ModulesList, searchValue)}
|
items={filterFirstColumnItems(ModulesList, searchValue)}
|
||||||
showAddBtn={false}
|
showAddBtn={false}
|
||||||
showUpdateBtn={false}
|
showUpdateBtn={false}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const NotFound = () => {
|
|||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
return (
|
return (
|
||||||
<NotFoundPage>
|
<NotFoundPage>
|
||||||
<Button type="primary" onClick={() => navigate(routePaths.modules)}>
|
<Button type="primary" onClick={() => navigate(routePaths.home)}>
|
||||||
На главную
|
На главную
|
||||||
</Button>
|
</Button>
|
||||||
</NotFoundPage>
|
</NotFoundPage>
|
||||||
|
|||||||
@@ -192,6 +192,8 @@ const RolesPage = () => {
|
|||||||
return (
|
return (
|
||||||
<section className="roles-page">
|
<section className="roles-page">
|
||||||
<Column
|
<Column
|
||||||
|
title="Роли пользователей"
|
||||||
|
searchPlaceholder="Введите имя или id"
|
||||||
showUpdateBtn={false}
|
showUpdateBtn={false}
|
||||||
items={filterFirstColumnItems(data, searchValue)}
|
items={filterFirstColumnItems(data, searchValue)}
|
||||||
showAddBtn={isAddRolePermissions}
|
showAddBtn={isAddRolePermissions}
|
||||||
|
|||||||
@@ -41,8 +41,9 @@ apiService.interceptors.response.use(
|
|||||||
console.error(error)
|
console.error(error)
|
||||||
if (error.response && error.response.status === 401) {
|
if (error.response && error.response.status === 401) {
|
||||||
localClear()
|
localClear()
|
||||||
|
const prevRoute = sessionStorage.getItem('prevRoute') || ''
|
||||||
message.error('Ваша сессия истекла"').then()
|
message.error('Ваша сессия истекла"').then()
|
||||||
LocalStorage.set('redirectUrl', location.pathname)
|
sessionStorage.setItem('prevRoute', prevRoute)
|
||||||
window.location.href = routePaths.login
|
window.location.href = routePaths.login
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
AlertOutlined,
|
AlertOutlined,
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
EditOutlined,
|
FormOutlined,
|
||||||
EyeOutlined,
|
EyeOutlined,
|
||||||
HistoryOutlined,
|
HistoryOutlined,
|
||||||
SwapOutlined,
|
SwapOutlined,
|
||||||
@@ -133,7 +133,7 @@ const ActiveTableActionButtons: FC<ActiveTableActionButtonsPropsType> =
|
|||||||
<Tooltip title="Редактировать">
|
<Tooltip title="Редактировать">
|
||||||
<Button onClick={() => {
|
<Button onClick={() => {
|
||||||
navigate(`/${record.moduleId}/${routePaths.configEditor}/${record.id}`, { state: record })
|
navigate(`/${record.moduleId}/${routePaths.configEditor}/${record.id}`, { state: record })
|
||||||
}} icon={<EditOutlined />} />
|
}} icon={<FormOutlined />} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</CanEdit>
|
</CanEdit>
|
||||||
{renderAdditionalButtons()}
|
{renderAdditionalButtons()}
|
||||||
|
|||||||
Reference in new issue
Block a user