feat: support deploying cpu workers for k8s cluster
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CheckOutlined } from '@ant-design/icons';
|
||||
import { IconFont, TemplateCard } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Tooltip } from 'antd';
|
||||
@@ -62,6 +63,29 @@ const Header = styled.div`
|
||||
const CardBox = styled.div`
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
const ActiveBadge = styled.div`
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: var(--ant-color-primary);
|
||||
clip-path: path('M 20 0 L 20 15 Q 20 20 15 20 L 0 20 Z');
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
pointer-events: none;
|
||||
|
||||
.anticon {
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
margin-right: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
`;
|
||||
|
||||
interface ProviderCatalogProps {
|
||||
@@ -160,6 +184,13 @@ const ProviderCatalog: React.FC<ProviderCatalogProps> = ({
|
||||
header={renderTitle(action)}
|
||||
icon={action.icon}
|
||||
></TemplateCard>
|
||||
{(Array.isArray(current)
|
||||
? current.includes(action.key)
|
||||
: current === action.key) && (
|
||||
<ActiveBadge>
|
||||
<CheckOutlined />
|
||||
</ActiveBadge>
|
||||
)}
|
||||
</CardBox>
|
||||
</Tooltip>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user