Skip to content

Commit 6e7ee3c

Browse files
committed
feat: models list add not_stopped for filter data
models.mymodels.status.not_stopped
1 parent f351447 commit 6e7ee3c

7 files changed

Lines changed: 24 additions & 3 deletions

File tree

src/locales/en-US/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ export default {
218218
'models.mymodels.status.inactive': 'Stopped',
219219
'models.mymodels.status.degrade': 'Not Ready',
220220
'models.mymodels.status.active': 'Ready',
221+
'models.mymodels.status.not_stopped': 'Not Stopped',
221222
'models.form.kvCache.tips':
222223
'Extended KV cache and speculative decoding are only available with built-in backends (vLLM / SGLang), Please switch the backend to enable them.',
223224
'models.form.kvCache.tips2':

src/locales/ja-JP/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ export default {
218218
'models.mymodels.status.inactive': 'Stopped',
219219
'models.mymodels.status.degrade': 'Not Ready',
220220
'models.mymodels.status.active': 'Ready',
221+
'models.mymodels.status.not_stopped': '未停止',
221222
'models.form.kvCache.tips':
222223
'Extended KV cache and speculative decoding are only available with built-in backends (vLLM / SGLang), Please switch the backend to enable them.',
223224
'models.form.kvCache.tips2':

src/locales/ru-RU/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ export default {
222222
'models.mymodels.status.inactive': 'Остановлен',
223223
'models.mymodels.status.degrade': 'Не готов',
224224
'models.mymodels.status.active': 'Готов',
225+
'models.mymodels.status.not_stopped': 'Не остановлен',
225226
'models.form.kvCache.tips':
226227
'Расширенный KV-кэш и спекулятивное декодирование доступны только для встроенных бэкендов (vLLM / SGLang). Пожалуйста, переключите бэкенд, чтобы включить их.',
227228
'models.form.kvCache.tips2':

src/locales/zh-CN/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ export default {
207207
'models.mymodels.status.inactive': '已停止',
208208
'models.mymodels.status.degrade': '异常',
209209
'models.mymodels.status.active': '可用',
210+
'models.mymodels.status.not_stopped': '非停止',
210211
'models.form.kvCache.tips':
211212
'扩展 KV 缓存和推测解码仅在内置后端(vLLM / SGLang)可用,请切换后端以启用。',
212213
'models.form.kvCache.tips2': '仅在使用内置推理后端(vLLM 或 SGLang)时支持。',

src/pages/llmodels/config/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,22 @@ export const status: any = {
198198
export const MyModelsStatusValueMap = {
199199
Inactive: 'stopped',
200200
Degrade: 'not_ready',
201-
Active: 'ready'
201+
Active: 'ready',
202+
NotStopped: 'not_stopped'
202203
};
203204

204205
export const MyModelsStatusMap = {
205206
[MyModelsStatusValueMap.Inactive]: StatusMaps.inactive,
206207
[MyModelsStatusValueMap.Degrade]: StatusMaps.error,
207-
[MyModelsStatusValueMap.Active]: StatusMaps.success
208+
[MyModelsStatusValueMap.Active]: StatusMaps.success,
209+
[MyModelsStatusValueMap.NotStopped]: StatusMaps.transitioning
208210
};
209211

210212
export const MyModelsStatusLabelMap = {
211213
[MyModelsStatusValueMap.Inactive]: 'models.mymodels.status.inactive',
212214
[MyModelsStatusValueMap.Degrade]: 'models.mymodels.status.degrade',
213-
[MyModelsStatusValueMap.Active]: 'models.mymodels.status.active'
215+
[MyModelsStatusValueMap.Active]: 'models.mymodels.status.active',
216+
[MyModelsStatusValueMap.NotStopped]: 'models.mymodels.status.not_stopped'
214217
};
215218

216219
export const ScheduleValueMap = {

src/pages/llmodels/hooks/use-filter-status.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ const useFilterStatus = (options: {
4242
label: intl.formatMessage({
4343
id: 'models.mymodels.status.degrade'
4444
})
45+
},
46+
{
47+
value: MyModelsStatusValueMap.NotStopped,
48+
color: 'var(--ant-color-info)',
49+
label: intl.formatMessage({
50+
id: 'models.mymodels.status.not_stopped'
51+
})
4552
}
4653
];
4754

src/pages/llmodels/user-models.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ const UserModels: React.FC = () => {
8585
label: intl.formatMessage({
8686
id: 'models.mymodels.status.degrade'
8787
})
88+
},
89+
{
90+
value: MyModelsStatusValueMap.NotStopped,
91+
color: 'var(--ant-color-info)',
92+
label: intl.formatMessage({
93+
id: 'models.mymodels.status.not_stopped'
94+
})
8895
}
8996
];
9097
}, [intl]);

0 commit comments

Comments
 (0)