style: downloading progress

This commit is contained in:
jialin
2025-03-26 11:59:49 +08:00
parent 671fce2961
commit f658b9d6d9
5 changed files with 66 additions and 31 deletions
@@ -46,7 +46,8 @@ const downloadList: ColumnProps[] = [
width: 200
},
{
title: 'Status',
title: 'models.table.status',
locale: true,
key: 'download_progress',
render: ({ row }) => {
return (
@@ -141,7 +142,10 @@ const RenderWorkerDownloading = (props: {
instanceData: ModelInstanceListItem;
}) => {
const { rayActors, workerList, instanceData } = props;
if (instanceData.state === InstanceStatusMap.Error || !rayActors.length) {
if (
instanceData.state !== InstanceStatusMap.Downloading ||
!rayActors.length
) {
return null;
}
return (
@@ -163,7 +167,7 @@ const RenderWorkerDownloading = (props: {
<Progress
showInfo={false}
type="circle"
size={20}
size={16}
strokeColor="var(--color-progress-green)"
percent={
_.find(rayActors, (item: any) => item.download_progress < 100)
+4
View File
@@ -121,6 +121,7 @@ export const useGenerateModelFileOptions = () => {
const result = Array.from(workersMap.values()).map((worker) => ({
label: worker.name,
value: worker.name,
labels: worker.labels,
parent: true,
children: list
.filter((item) => item.worker_id === worker.id)
@@ -134,6 +135,8 @@ export const useGenerateModelFileOptions = () => {
return {
label: item.resolved_paths[0] || '',
value: item.resolved_paths[0] || '',
worker_labels: worker.labels,
worker_name: worker.name,
parent: false,
...item
};
@@ -161,6 +164,7 @@ export const useGenerateModelFileOptions = () => {
}
return acc;
}, []);
console.log('childrenList', childrenList);
return childrenList;