mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-17 14:17:42 -05:00
feat(nodes): add enable, disable, status to invocation cache
- New routes to clear, enable, disable and get the status of the cache - Status includes hits, misses, size, max size, enabled - Add client cache queries and mutations, abstracted into hooks - Add invocation cache status area (next to queue status) w/ buttons
This commit is contained in:
committed by
Kent Keirsey
parent
aa82f9360c
commit
7ac99d6bc3
@@ -1,38 +1,39 @@
|
||||
import { Stat, StatGroup, StatLabel, StatNumber } from '@chakra-ui/react';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useGetQueueStatusQuery } from 'services/api/endpoints/queue';
|
||||
import StatusStatGroup from './common/StatusStatGroup';
|
||||
import StatusStatItem from './common/StatusStatItem';
|
||||
|
||||
const QueueStatus = () => {
|
||||
const { data: queueStatus } = useGetQueueStatusQuery();
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<StatGroup alignItems="center" justifyContent="center" w="full" h="full">
|
||||
<Stat w={24}>
|
||||
<StatLabel>{t('queue.in_progress')}</StatLabel>
|
||||
<StatNumber>{queueStatus?.queue.in_progress ?? 0}</StatNumber>
|
||||
</Stat>
|
||||
<Stat w={24}>
|
||||
<StatLabel>{t('queue.pending')}</StatLabel>
|
||||
<StatNumber>{queueStatus?.queue.pending ?? 0}</StatNumber>
|
||||
</Stat>
|
||||
<Stat w={24}>
|
||||
<StatLabel>{t('queue.completed')}</StatLabel>
|
||||
<StatNumber>{queueStatus?.queue.completed ?? 0}</StatNumber>
|
||||
</Stat>
|
||||
<Stat w={24}>
|
||||
<StatLabel>{t('queue.failed')}</StatLabel>
|
||||
<StatNumber>{queueStatus?.queue.failed ?? 0}</StatNumber>
|
||||
</Stat>
|
||||
<Stat w={24}>
|
||||
<StatLabel>{t('queue.canceled')}</StatLabel>
|
||||
<StatNumber>{queueStatus?.queue.canceled ?? 0}</StatNumber>
|
||||
</Stat>
|
||||
<Stat w={24}>
|
||||
<StatLabel>{t('queue.total')}</StatLabel>
|
||||
<StatNumber>{queueStatus?.queue.total}</StatNumber>
|
||||
</Stat>
|
||||
</StatGroup>
|
||||
<StatusStatGroup>
|
||||
<StatusStatItem
|
||||
label={t('queue.in_progress')}
|
||||
value={queueStatus?.queue.in_progress ?? 0}
|
||||
/>
|
||||
<StatusStatItem
|
||||
label={t('queue.pending')}
|
||||
value={queueStatus?.queue.pending ?? 0}
|
||||
/>
|
||||
<StatusStatItem
|
||||
label={t('queue.completed')}
|
||||
value={queueStatus?.queue.completed ?? 0}
|
||||
/>
|
||||
<StatusStatItem
|
||||
label={t('queue.failed')}
|
||||
value={queueStatus?.queue.failed ?? 0}
|
||||
/>
|
||||
<StatusStatItem
|
||||
label={t('queue.canceled')}
|
||||
value={queueStatus?.queue.canceled ?? 0}
|
||||
/>
|
||||
<StatusStatItem
|
||||
label={t('queue.total')}
|
||||
value={queueStatus?.queue.total ?? 0}
|
||||
/>
|
||||
</StatusStatGroup>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user