|
|
|
@ -207,13 +207,13 @@ const InstanceStatusTag = (props: { data: ListItem }) => {
|
|
|
|
|
statusValue={{
|
|
|
|
|
status:
|
|
|
|
|
data.state === ModelfileStateMap.Downloading &&
|
|
|
|
|
data.download_progress === 100
|
|
|
|
|
data.download_progress === 100
|
|
|
|
|
? ModelfileState[ModelfileStateMap.Ready]
|
|
|
|
|
: ModelfileState[data.state],
|
|
|
|
|
text: ModelfileStateMapValue[data.state],
|
|
|
|
|
message:
|
|
|
|
|
data.state === ModelfileStateMap.Downloading &&
|
|
|
|
|
data.download_progress === 100
|
|
|
|
|
data.download_progress === 100
|
|
|
|
|
? ''
|
|
|
|
|
: data.state_message
|
|
|
|
|
}}
|
|
|
|
@ -391,9 +391,9 @@ const ModelFiles = () => {
|
|
|
|
|
let name = _.toLower(
|
|
|
|
|
_.split(
|
|
|
|
|
record.huggingface_repo_id ||
|
|
|
|
|
record.ollama_library_model_name ||
|
|
|
|
|
record.model_scope_model_id ||
|
|
|
|
|
record.local_path,
|
|
|
|
|
record.ollama_library_model_name ||
|
|
|
|
|
record.model_scope_model_id ||
|
|
|
|
|
record.local_path,
|
|
|
|
|
/[\\/]/
|
|
|
|
|
).pop()
|
|
|
|
|
);
|
|
|
|
@ -406,8 +406,8 @@ const ModelFiles = () => {
|
|
|
|
|
local_path: record.resolved_paths?.[0],
|
|
|
|
|
worker_selector: targetWorker
|
|
|
|
|
? {
|
|
|
|
|
'worker-name': targetWorker
|
|
|
|
|
}
|
|
|
|
|
'worker-name': targetWorker
|
|
|
|
|
}
|
|
|
|
|
: {},
|
|
|
|
|
name: extractFileName(name),
|
|
|
|
|
backend: checkCurrentbackend({
|
|
|
|
@ -567,19 +567,30 @@ const ModelFiles = () => {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: 'Worker',
|
|
|
|
|
// dataIndex: 'worker_name',
|
|
|
|
|
// ellipsis: {
|
|
|
|
|
// showTitle: false
|
|
|
|
|
// },
|
|
|
|
|
// render: (text: string, record: ListItem) => {
|
|
|
|
|
// return (
|
|
|
|
|
// <AutoTooltip ghost>
|
|
|
|
|
// <span>{getWorkerName(record.worker_id, workersList)}</span>
|
|
|
|
|
// </AutoTooltip>
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: 'Worker',
|
|
|
|
|
dataIndex: 'worker_name',
|
|
|
|
|
title: intl.formatMessage({ id: 'models.table.name' }),
|
|
|
|
|
dataIndex: 'resolved_paths',
|
|
|
|
|
width: '30%',
|
|
|
|
|
ellipsis: {
|
|
|
|
|
showTitle: false
|
|
|
|
|
},
|
|
|
|
|
render: (text: string, record: ListItem) => {
|
|
|
|
|
return (
|
|
|
|
|
<AutoTooltip ghost>
|
|
|
|
|
<span>{getWorkerName(record.worker_id, workersList)}</span>
|
|
|
|
|
</AutoTooltip>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
render: (text: string, record: ListItem) => (
|
|
|
|
|
<ResolvedPathColumn record={record} />
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: intl.formatMessage({ id: 'common.table.status' }),
|
|
|
|
@ -589,17 +600,6 @@ const ModelFiles = () => {
|
|
|
|
|
return <InstanceStatusTag data={record} />;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: intl.formatMessage({ id: 'resources.modelfiles.form.path' }),
|
|
|
|
|
dataIndex: 'resolved_paths',
|
|
|
|
|
width: '30%',
|
|
|
|
|
ellipsis: {
|
|
|
|
|
showTitle: false
|
|
|
|
|
},
|
|
|
|
|
render: (text: string, record: ListItem) => (
|
|
|
|
|
<ResolvedPathColumn record={record} />
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: intl.formatMessage({ id: 'resources.modelfiles.size' }),
|
|
|
|
|
dataIndex: 'size',
|
|
|
|
|