feat: monitor button

This commit is contained in:
jialin
2026-02-04 20:14:25 +08:00
parent 47596fdb1a
commit 4e8b5e26ae
40 changed files with 352 additions and 176 deletions
@@ -1,4 +1,5 @@
// columns.ts
import { systemConfigAtom } from '@/atoms/system';
import AutoTooltip from '@/components/auto-tooltip';
import DropdownButtons from '@/components/drop-down-buttons';
import { SealColumnProps } from '@/components/seal-table/types';
@@ -9,6 +10,7 @@ import { useIntl } from '@umijs/max';
import { useMemoizedFn } from 'ahooks';
import { Tooltip } from 'antd';
import dayjs from 'dayjs';
import { useAtomValue } from 'jotai';
import _ from 'lodash';
import { useMemo } from 'react';
import ModelTag from '../../_components/model-tag';
@@ -31,6 +33,7 @@ const useModelsColumns = ({
targetList
}: ModelsColumnsHookProps & { targetList: any[] }): SealColumnProps[] => {
const intl = useIntl();
const systemConfig = useAtomValue(systemConfigAtom);
const setModelActionList = useMemoizedFn((record: any) => {
return _.filter(ActionList, (action: any) => {
@@ -52,6 +55,9 @@ const useModelsColumns = ({
if (action.key === 'stop') {
return record.replicas > 0;
}
if (action.key === 'metrics') {
return systemConfig.showMonitoring;
}
return true;
});