refactor: resource table columns
This commit is contained in:
@@ -2,7 +2,6 @@ import IconFont from '@/components/icon-font';
|
||||
import LabelSelector from '@/components/label-selector';
|
||||
import ListInput from '@/components/list-input';
|
||||
import CheckboxField from '@/components/seal-form/checkbox-field';
|
||||
import SealCascader from '@/components/seal-form/seal-cascader';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import TooltipList from '@/components/tooltip-list';
|
||||
@@ -28,7 +27,6 @@ import mindieConfig from '../config/mindie-config';
|
||||
import { FormData } from '../config/types';
|
||||
import vllmConfig from '../config/vllm-config';
|
||||
import dataformStyles from '../style/data-form.less';
|
||||
import GPUCard from './gpu-card';
|
||||
import Performance from './performance';
|
||||
|
||||
interface AdvanceConfigProps {
|
||||
@@ -265,7 +263,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
{scheduleType === 'manual' && (
|
||||
{/* {scheduleType === 'manual' && (
|
||||
<>
|
||||
<Form.Item
|
||||
name={['gpu_selector', 'gpu_ids']}
|
||||
@@ -293,7 +291,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
></SealCascader>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
)} */}
|
||||
|
||||
<Form.Item name="backend_version">
|
||||
<SealInput.Input
|
||||
|
||||
@@ -3,7 +3,6 @@ import GSDrawer from '@/components/scroller-modal/gs-drawer';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import { createAxiosToken } from '@/hooks/use-chunk-request';
|
||||
import { ProviderValueMap } from '@/pages/cluster-management/config';
|
||||
import { CloseOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button } from 'antd';
|
||||
import _ from 'lodash';
|
||||
@@ -506,22 +505,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
|
||||
|
||||
return (
|
||||
<GSDrawer
|
||||
title={
|
||||
<div className="flex-between flex-center">
|
||||
<span
|
||||
style={{
|
||||
color: 'var(--ant-color-text)',
|
||||
fontWeight: 'var(--font-weight-medium)',
|
||||
fontSize: 'var(--font-size-middle)'
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
<Button type="text" size="small" onClick={handleCancel}>
|
||||
<CloseOutlined></CloseOutlined>
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
title={title}
|
||||
open={open}
|
||||
onClose={handleCancel}
|
||||
destroyOnClose={true}
|
||||
|
||||
@@ -246,21 +246,18 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
categories: getCategory(item)
|
||||
});
|
||||
|
||||
setWarningStatus(
|
||||
{
|
||||
show: true,
|
||||
title: '',
|
||||
type: 'transition',
|
||||
message: intl.formatMessage({ id: 'models.form.evaluating' })
|
||||
},
|
||||
{
|
||||
override: true
|
||||
}
|
||||
);
|
||||
let warningStatus: MessageStatus = {
|
||||
show: true,
|
||||
title: '',
|
||||
type: 'transition',
|
||||
message: intl.formatMessage({ id: 'models.form.evaluating' })
|
||||
};
|
||||
|
||||
if (item.isGGUF) {
|
||||
fetchModelFiles();
|
||||
warningStatus.type = 'danger';
|
||||
warningStatus.message = 'GGUF model is not supported.';
|
||||
}
|
||||
setWarningStatus(warningStatus, { override: true });
|
||||
};
|
||||
|
||||
const handleOnSelectModelAfterEvaluate = (item: any, manual?: boolean) => {
|
||||
@@ -531,7 +528,11 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
showOkBtn={!showExtraButton}
|
||||
extra={
|
||||
showExtraButton && (
|
||||
<Button type="primary" onClick={handleSubmitAnyway}>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={handleSubmitAnyway}
|
||||
disabled={isGGUF}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: 'models.form.submit.anyway'
|
||||
})}
|
||||
|
||||
@@ -681,4 +681,4 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default React.memo(InstanceItem);
|
||||
export default InstanceItem;
|
||||
|
||||
@@ -174,8 +174,6 @@ const ModelCard: React.FC<{
|
||||
setModelData(null);
|
||||
setReadmeText(null);
|
||||
handleOnCollapse(null);
|
||||
// setIsGGUF(false);
|
||||
// setIsGGUFModel(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -205,8 +203,6 @@ const ModelCard: React.FC<{
|
||||
setModelData(null);
|
||||
setReadmeText(null);
|
||||
handleOnCollapse(null);
|
||||
// setIsGGUF(false);
|
||||
// setIsGGUFModel(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
try {
|
||||
const params = {
|
||||
Name: `${searchInputRef.current}`,
|
||||
tags: ['gptq'],
|
||||
tags: [],
|
||||
tasks: filterTaskRef.current
|
||||
? ([ModelscopeTaskMap[filterTaskRef.current]] as string[])
|
||||
: [],
|
||||
|
||||
@@ -724,7 +724,9 @@ const Models: React.FC<ModelsProps> = ({
|
||||
<Select
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder="Filter by cluster"
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'clusters.filterBy.cluster'
|
||||
})}
|
||||
style={{ width: 160 }}
|
||||
size="large"
|
||||
maxTagCount={1}
|
||||
|
||||
Reference in New Issue
Block a user