2024-10-08 09:31:09: merge [main:da639ea1a284be33cf657a0ef49064e738c334d1];

This commit is contained in:
txix committed 2024-10-08 09:31:09 +03:00
1 parent 3e52a14c0a
commit 1a1d2b594c
12 files changed
+38 -21

No files matched your search

+1
View File
@@ -82,6 +82,7 @@ const AppAccessPage = () => {
<section className="app-access-page">
<Column
title="Приложения"
searchPlaceholder="Введите имя или id"
showUpdateBtn={false}
showAddBtn={false}
showRemoveBtn={false}
+1
View File
@@ -163,6 +163,7 @@ const ApplicationsPage = () => {
<main className="applications-page">
<Column
title="Группы приложений"
searchPlaceholder="Введите имя или id"
onUpdateItem={updateApplicationModal}
showUpdateBtn={true}
onAddItem={addApplicationModal}
+11 -12
View File
@@ -38,7 +38,7 @@ const LoginPage = () => {
}
const handleError = (err: AxiosError<MSPError>): void => {
const { response,status } = err
const { response, status } = err
if (response && status === 401) {
setFormError(response.statusText, messages.loginError)
} else {
@@ -57,9 +57,8 @@ const LoginPage = () => {
LocalStorage.set(localStorageKeys.HEADER_NAME, response.headerName)
LocalStorage.set(localStorageKeys.USER_TOKEN, response.token)
const redirectUrl =
localStorage.getItem('redirectUrl') || routePaths.home
sessionStorage.getItem('prevRoute') || routePaths.home
navigate(redirectUrl, { replace: true })
localStorage.removeItem('redirectUrl')
})
.catch((err: AxiosError<MSPError>) => handleError(err))
}
@@ -106,15 +105,15 @@ const LoginPage = () => {
return (
<Layout>
<section className="login-page">
<form className="login-page__content">
<h1 data-cy="login-title" className="login-page__content__title">
Вход в систему
</h1>
<Divider />
{renderInternalAuthForm()}
</form>
</section>
<section className="login-page">
<form className="login-page__content">
<h1 data-cy="login-title" className="login-page__content__title">
Вход в систему
</h1>
<Divider />
{renderInternalAuthForm()}
</form>
</section>
</Layout>
)
}
+3 -1
View File
@@ -38,7 +38,7 @@ const ModulesPage = () => {
const [searchParams, setSearchParams] = useSearchParams()
const { data: ModulesList = [], isLoading: isModulesLoading } =
modulesServiceApi.useGetModulesQuery('modules', {
pollingInterval: 1000,
pollingInterval: 5000,
skipPollingIfUnfocused: true
})
const [removeModule] = modulesServiceApi.useRemoveModuleMutation()
@@ -190,6 +190,8 @@ const ModulesPage = () => {
return (
<section className="modules-page">
<Column
title="Модули"
searchPlaceholder="Введите имя или id"
items={filterFirstColumnItems(ModulesList, searchValue)}
showAddBtn={false}
showUpdateBtn={false}
+1 -1
View File
@@ -11,7 +11,7 @@ const NotFound = () => {
const navigate = useNavigate()
return (
<NotFoundPage>
<Button type="primary" onClick={() => navigate(routePaths.modules)}>
<Button type="primary" onClick={() => navigate(routePaths.home)}>
На главную
</Button>
</NotFoundPage>
+2
View File
@@ -192,6 +192,8 @@ const RolesPage = () => {
return (
<section className="roles-page">
<Column
title="Роли пользователей"
searchPlaceholder="Введите имя или id"
showUpdateBtn={false}
items={filterFirstColumnItems(data, searchValue)}
showAddBtn={isAddRolePermissions}