2024-05-29 14:30:20: merge [main:6331fc77b72f888c5557a0672ede2191df74f336];
This commit is contained in:
1 parent
36c13e159d
commit
e8dfc2e552
24 files changed
+124
-75
No files matched your search
@@ -41,4 +41,9 @@
|
||||
background: $blue-color-2 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&__buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ const ActiveConfigurationsTable: FC<ActiveConfigurationsTablePropsType> =
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: 'Статус конфигурации',
|
||||
title: 'Статус',
|
||||
dataIndex: 'valid',
|
||||
key: 'version',
|
||||
align: 'center',
|
||||
@@ -191,9 +191,21 @@ const ActiveConfigurationsTable: FC<ActiveConfigurationsTablePropsType> =
|
||||
const className = `active-configurations-table__table ${isActiveTable ? 'active-config' : ''}`
|
||||
return (
|
||||
<div className="active-configurations-table">
|
||||
<h2 className="active-configurations-table__title">
|
||||
{isActiveTable ? 'Активная конфигурация' : 'Другие конфигурации'}
|
||||
</h2>
|
||||
<div className="active-configurations-table__buttons">
|
||||
<h2 className="active-configurations-table__title">
|
||||
{isActiveTable ? 'Активная' : 'Остальные'}
|
||||
</h2>
|
||||
{!isActiveTable && <CanEdit>
|
||||
<Button
|
||||
className="configurations__buttons__new-config-brn"
|
||||
onClick={() => {
|
||||
// TODO создание новой конфигурации
|
||||
}}
|
||||
>
|
||||
Создать
|
||||
</Button>
|
||||
</CanEdit>}
|
||||
</div>
|
||||
<Table
|
||||
className={className}
|
||||
rowKey={(record) => record.id}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.applications-content {
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-columns:300px 1fr;
|
||||
grid-template-columns:min-content 1fr;
|
||||
width: 100%;
|
||||
|
||||
.column-content {
|
||||
|
||||
@@ -120,17 +120,20 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
||||
|
||||
createApplicationService(newApplicationApp)
|
||||
.unwrap()
|
||||
.then(message.success('Элемент сохранен'))
|
||||
.catch((e) => message.error(e))
|
||||
setShowApplicationsModal({
|
||||
.then(() => message.success('Элемент сохранен'))
|
||||
.catch(() => message.error('Ошибка добавления элемента')).finally(()=> setShowApplicationsModal({
|
||||
...showApplicationsModal,
|
||||
addModal: false
|
||||
})
|
||||
}))
|
||||
|
||||
}
|
||||
const handleRemoveApplicationApp = (id: number) =>
|
||||
removeApplicationsService([id])
|
||||
.unwrap()
|
||||
.then(() => message.success('Элемент удален'))
|
||||
.then(() => {
|
||||
message.success('Элемент удален')
|
||||
navigate(`${routePaths.applicationsGroup}/${selectedItemId}/${routePaths.application}`)
|
||||
})
|
||||
.catch(() => message.error('Ошибка удаления элемента'))
|
||||
|
||||
const renderColumnItems = (item: ColumnItem<any>) => {
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
|
||||
&__row {
|
||||
cursor: pointer;
|
||||
&.ant-table-row {
|
||||
&:hover td {
|
||||
background-color: white !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ const CompareVersionModal: FC<CompareVersionModalPropsType> = ({
|
||||
const columns: ColumnsType<VersionType> = [
|
||||
{
|
||||
key: 'configVersion',
|
||||
title: 'Версия конфигурации',
|
||||
title: 'Версия',
|
||||
dataIndex: 'configVersion'
|
||||
},
|
||||
{
|
||||
@@ -71,13 +71,13 @@ const CompareVersionModal: FC<CompareVersionModalPropsType> = ({
|
||||
]
|
||||
return (
|
||||
<div className="compare-version-modal">
|
||||
<Modal title="Сравнение версий" open={open} onClose={onClose}>
|
||||
<Modal title="Выберите версию для сравнения" open={open} onClose={onClose}>
|
||||
{selectedItem ? (
|
||||
<div className="compare-version-modal__content">
|
||||
<Button onClick={() => setSelectedItem(undefined)}>Назад</Button>
|
||||
<div className="compare-version-modal__header">
|
||||
<span> Версия: {selectedItem.configVersion}</span>
|
||||
<span>Текущая версия : {config?.version || config?.configVersion}</span>
|
||||
<span>{config?.version ? `Текущая версия : ${config?.version}` : `Версия: ${config?.configVersion}`}</span>
|
||||
</div>
|
||||
<CodeMirrorMerge orientation="a-b">
|
||||
<Original
|
||||
|
||||
@@ -15,7 +15,7 @@ const ConfigSchemaModal: FC<ConfigSchemaModalPropsType> = ({
|
||||
}) => {
|
||||
return (
|
||||
<div className="config-schema-modal">
|
||||
<Modal title="Текущая схема конфигурации" open={open} onClose={onClose}>
|
||||
<Modal title="Текущая схема" open={open} onClose={onClose}>
|
||||
<JsonSchemaViewer schema={schema} />
|
||||
</Modal>
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,7 @@ const LayoutComponent = () => {
|
||||
icon: <DefaultUser />
|
||||
},
|
||||
{
|
||||
label: 'Группы приложений',
|
||||
label: 'Приложения',
|
||||
key: 'applications_group',
|
||||
className: hideItem([PermissionKeysType.read]),
|
||||
icon: <AppstoreAddOutlined />
|
||||
|
||||
@@ -93,7 +93,7 @@ const RolesContent = ({
|
||||
dataSource={permissions}
|
||||
pagination={{ pageSize: 10 }}
|
||||
scroll={{
|
||||
y: 'calc(100vh - 450px)'
|
||||
y: 'calc(100vh - 270px)'
|
||||
}}
|
||||
rowSelection={{
|
||||
selectedRowKeys: value,
|
||||
@@ -140,20 +140,22 @@ const RolesContent = ({
|
||||
/>
|
||||
</div>
|
||||
<Divider />
|
||||
<FormInput
|
||||
data-cy="roles-content__input__name"
|
||||
rules={{ required: ValidationRules.required }}
|
||||
label="Наименование роли"
|
||||
name="name"
|
||||
control={control}
|
||||
/>
|
||||
<FormInput
|
||||
data-cy="roles-content__input__external-group"
|
||||
disabled={!isExternalGroup}
|
||||
label="Группы ЕСК"
|
||||
name="externalGroup"
|
||||
control={control}
|
||||
/>
|
||||
<div className="roles-content__wrap-input">
|
||||
<FormInput
|
||||
data-cy="roles-content__input__name"
|
||||
rules={{ required: ValidationRules.required }}
|
||||
label="Наименование роли"
|
||||
name="name"
|
||||
control={control}
|
||||
/>
|
||||
<FormInput
|
||||
data-cy="roles-content__input__external-group"
|
||||
disabled={!isExternalGroup}
|
||||
label="Группы ЕСК"
|
||||
name="externalGroup"
|
||||
control={control}
|
||||
/>
|
||||
</div>
|
||||
{renderFormTable()}
|
||||
</form>
|
||||
</>
|
||||
|
||||
@@ -1,11 +1,30 @@
|
||||
@import "../../constants/style/styleConst";
|
||||
|
||||
.roles-content {
|
||||
padding: $basic-padding*2 $basic-padding*3;
|
||||
padding: $basic-padding*2 $basic-padding*3 0;
|
||||
min-width: 400px;
|
||||
height: 100%;
|
||||
|
||||
&__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&__wrap-input {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.ant-pagination {
|
||||
margin: 8px 0 !important;
|
||||
}
|
||||
|
||||
.ant-divider-horizontal {
|
||||
margin: 14px 0;
|
||||
}
|
||||
|
||||
.ant-form-item {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
@@ -163,16 +163,16 @@ const TokenContent = ({ id }: TokenPropTypes) => {
|
||||
title: 'Действия',
|
||||
dataIndex: 'token',
|
||||
key: 'actions',
|
||||
render: (value) => {
|
||||
render: (value, record) => {
|
||||
return (
|
||||
<Button.Group>
|
||||
<Tooltip title="Скопировать">
|
||||
<Button icon={<CopyOutlined />} data-clipboard-text={value} />
|
||||
<Button className="copy-btn" icon={<CopyOutlined />} data-clipboard-text={value} />
|
||||
</Tooltip>
|
||||
<Tooltip title="Удалить">
|
||||
<Popconfirm
|
||||
title="Закончить эту сессию?"
|
||||
onConfirm={() => handleRevokeToken(value)}
|
||||
onConfirm={() => handleRevokeToken(record)}
|
||||
>
|
||||
<Button icon={<DeleteOutlined />} />
|
||||
</Popconfirm>
|
||||
|
||||
Reference in new issue
Block a user