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 { 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 { compareVersions } from 'compare-versions'
|
||||||
import { Layout } from 'isp-ui-kit'
|
import { Layout } from 'isp-ui-kit'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
@@ -154,28 +154,34 @@ const ModulesPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<List.Item>
|
<List.Item>
|
||||||
<div className="module-item">
|
<Tooltip mouseEnterDelay={1} title={item.name}>
|
||||||
<div className="module-item__name">
|
<List.Item.Meta
|
||||||
<span>{item.name}</span>
|
title={
|
||||||
<Tooltip overlayInnerStyle={{ width: '300px' }} title={textTooltip}>
|
<div className="module-item__name">
|
||||||
{renderVersion()}
|
<span>{item.name}</span>
|
||||||
</Tooltip>
|
<Tooltip
|
||||||
</div>
|
overlayInnerStyle={{ width: '300px' }}
|
||||||
<div className="module-item__content">
|
title={textTooltip}
|
||||||
<span className="module-item__content__description">
|
>
|
||||||
активные экземпляры:
|
{renderVersion()}
|
||||||
</span>
|
</Tooltip>
|
||||||
<strong
|
</div>
|
||||||
className={`module-item__content__status ${
|
}
|
||||||
!item.status || !item.status.length
|
description={
|
||||||
? 'module-item__content__status_zero'
|
<div className="module-item__content">
|
||||||
: ''
|
<span className="module-item__content__description">
|
||||||
}`}
|
активные экземпляры:
|
||||||
>
|
</span>
|
||||||
{(item.status && item.status.length) || '0'}
|
<Badge
|
||||||
</strong>
|
size="small"
|
||||||
</div>
|
showZero
|
||||||
</div>
|
count={(item.status && item.status.length) || 0}
|
||||||
|
color={!item.status || !item.status.length ? '' : 'blue'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,23 +36,6 @@
|
|||||||
color: $grey;
|
color: $grey;
|
||||||
display: inline-block;
|
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 {
|
.column__header {
|
||||||
padding: $basic-padding * 2 $basic-padding;
|
padding: $basic-padding * 2 $basic-padding;
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $blue-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-affix-wrapper {
|
.ant-input-affix-wrapper {
|
||||||
@@ -103,22 +82,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-input-outlined {
|
||||||
|
&:hover {
|
||||||
|
svg {
|
||||||
|
fill: #40a9ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ant-list-items {
|
.ant-list-items {
|
||||||
.column__items__item {
|
.column__items__item {
|
||||||
|
&:hover {
|
||||||
|
background: #FAFAFA !important;
|
||||||
|
}
|
||||||
|
|
||||||
.ant-list-item-meta-title {
|
.ant-list-item-meta-title {
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: $text-color-gray;
|
color: $text-color-gray;
|
||||||
margin-left: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background: $blue-light !important;
|
background: $blue-light !important;
|
||||||
|
|
||||||
.ant-list-item-meta-title {
|
svg {
|
||||||
color: $text-color-blue;
|
path {
|
||||||
|
fill: $text-color-blue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user