2024-05-20 13:33:14: merge [main:cbc2424bba8b53605d0eef5e6716b20406f9b312];

This commit is contained in:
txix committed 2024-05-20 13:33:14 +03:00
1 parent 98ad434b36
commit a922f7e914
53 files changed
+1811 -3261

No files matched your search

+31 -24
View File
@@ -1,5 +1,5 @@
import { ExclamationCircleOutlined } from '@ant-design/icons'
import { List, message, Spin, Tabs, Tag, Tooltip } from 'antd'
import { Badge, List, message, Spin, Tabs, Tag, Tooltip } from 'antd'
import { compareVersions } from 'compare-versions'
import { Layout } from 'isp-ui-kit'
import { useEffect, useState } from 'react'
@@ -49,7 +49,7 @@ const ModulesPage = () => {
useEffect(() => {
if (!isPageAvailable) {
navigate(routePaths.home)
navigate(routePaths.error)
}
}, [isPageAvailable])
@@ -154,28 +154,34 @@ const ModulesPage = () => {
return (
<List.Item>
<div className="module-item">
<div className="module-item__name">
<span>{item.name}</span>
<Tooltip overlayInnerStyle={{ width: '300px' }} title={textTooltip}>
{renderVersion()}
</Tooltip>
</div>
<div className="module-item__content">
<span className="module-item__content__description">
активные экземпляры:
</span>
<strong
className={`module-item__content__status ${
!item.status || !item.status.length
? 'module-item__content__status_zero'
: ''
}`}
>
{(item.status && item.status.length) || '0'}
</strong>
</div>
</div>
<Tooltip mouseEnterDelay={1} title={item.name}>
<List.Item.Meta
title={
<div className="module-item__name">
<span>{item.name}</span>
<Tooltip
overlayInnerStyle={{ width: '300px' }}
title={textTooltip}
>
{renderVersion()}
</Tooltip>
</div>
}
description={
<div className="module-item__content">
<span className="module-item__content__description">
активные экземпляры:
</span>
<Badge
size="small"
showZero
count={(item.status && item.status.length) || 0}
color={!item.status || !item.status.length ? '' : 'blue'}
/>
</div>
}
/>
</Tooltip>
</List.Item>
)
}
@@ -204,6 +210,7 @@ const ModulesPage = () => {
<Column
items={filterFirstColumnItems(ModulesList, searchValue)}
showAddBtn={false}
showUpdateBtn={false}
showRemoveBtn={isRemoveModule}
onRemoveItem={handleRemoveModule}
onChangeSearchValue={handleOnChangeSearchValue}
+2 -74
View File
@@ -9,10 +9,6 @@
overflow-x: scroll;
}
.ant-list-item {
padding-bottom: 20px;
}
.ant-tag {
height: 22px;
margin: 0;
@@ -31,28 +27,12 @@
&__content {
display: flex;
justify-content: space-between;
align-items: center;
&__description {
color: $grey;
display: inline-block;
}
&__status {
border: 1px solid #15d1e6;
border-radius: 12px;
padding: 0 4px;
font-family: sans-serif;
opacity: .7;
height: 22px;
width: 22px;
justify-content: center;
display: flex;
align-items: center;
}
&__status_zero {
border: 1px solid red;
}
}
}
@@ -62,7 +42,7 @@
}
.column .column__items__item span {
width: fit-content;
width: fit-content !important;
}
}
@@ -70,57 +50,5 @@
display: flex;
background: #fff;
box-shadow: inset -1px 0px 0px $border-color;
height: 100%;
.column__header {
padding: $basic-padding * 2 $basic-padding;
svg {
fill: $blue-color;
}
}
.ant-input-affix-wrapper {
.ant-input-prefix {
margin-left: auto;
position: absolute;
right: 5px;
top: 50%;
transform: translateY(-50%);
z-index: 10;
cursor: pointer;
}
}
.ant-input-affix-wrapper-focused {
.ant-input-prefix {
.anticon-search {
svg {
display: none;
}
}
}
}
.ant-list-items {
.column__items__item {
.ant-list-item-meta-title {
font-family: 'Roboto', sans-serif;
font-size: 14px;
line-height: 22px;
font-weight: 400;
color: $text-color-gray;
margin-left: 5px;
}
&.active {
background: $blue-light !important;
.ant-list-item-meta-title {
color: $text-color-blue;
}
}
}
}
}