mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04: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
@@ -0,0 +1,30 @@
|
||||
import { ButtonGroup, Flex } from '@chakra-ui/react';
|
||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||
import { memo } from 'react';
|
||||
import ClearQueueButton from './ClearQueueButton';
|
||||
import PauseProcessorButton from './PauseProcessorButton';
|
||||
import PruneQueueButton from './PruneQueueButton';
|
||||
import ResumeProcessorButton from './ResumeProcessorButton';
|
||||
|
||||
const QueueTabQueueControls = () => {
|
||||
const isPauseEnabled = useFeatureStatus('pauseQueue').isFeatureEnabled;
|
||||
const isResumeEnabled = useFeatureStatus('resumeQueue').isFeatureEnabled;
|
||||
return (
|
||||
<Flex layerStyle="second" borderRadius="base" p={2} gap={2}>
|
||||
{isPauseEnabled || isResumeEnabled ? (
|
||||
<ButtonGroup w={28} orientation="vertical" isAttached size="sm">
|
||||
{isResumeEnabled ? <ResumeProcessorButton /> : <></>}
|
||||
{isPauseEnabled ? <PauseProcessorButton /> : <></>}
|
||||
</ButtonGroup>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
<ButtonGroup w={28} orientation="vertical" isAttached size="sm">
|
||||
<PruneQueueButton />
|
||||
<ClearQueueButton />
|
||||
</ButtonGroup>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(QueueTabQueueControls);
|
||||
Reference in New Issue
Block a user