MSP-3288 add Badge in ModulesPage
This commit is contained in:
1 parent
dda9780d45
commit
765abb9e32
2 files changed
+45
-47
No files matched your search
@@ -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'
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,23 +36,6 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,10 +58,6 @@
|
||||
|
||||
.column__header {
|
||||
padding: $basic-padding * 2 $basic-padding;
|
||||
|
||||
svg {
|
||||
fill: $blue-color;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-input-affix-wrapper {
|
||||
@@ -103,22 +82,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
.ant-input-outlined {
|
||||
&:hover {
|
||||
svg {
|
||||
fill: #40a9ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-list-items {
|
||||
.column__items__item {
|
||||
&:hover {
|
||||
background: #FAFAFA !important;
|
||||
}
|
||||
|
||||
.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;
|
||||
svg {
|
||||
path {
|
||||
fill: $text-color-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user