Added new InfoCollapse sections for Online Printers and Queued Jobs in ProductionOverview, including ObjectTable components for data display and updated collapse states for better user interaction.
This commit is contained in:
parent
5f33ed69fb
commit
d8bfc19917
@ -7,6 +7,7 @@ import InfoCollapse from '../common/InfoCollapse'
|
|||||||
import ScrollBox from '../common/ScrollBox'
|
import ScrollBox from '../common/ScrollBox'
|
||||||
|
|
||||||
import { ApiServerContext } from '../context/ApiServerContext'
|
import { ApiServerContext } from '../context/ApiServerContext'
|
||||||
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|
||||||
const ProductionOverview = () => {
|
const ProductionOverview = () => {
|
||||||
const { connected } = useContext(ApiServerContext)
|
const { connected } = useContext(ApiServerContext)
|
||||||
@ -16,6 +17,7 @@ const ProductionOverview = () => {
|
|||||||
{
|
{
|
||||||
printerStats: true,
|
printerStats: true,
|
||||||
printerHistory: true,
|
printerHistory: true,
|
||||||
|
onlinePrinters: true,
|
||||||
jobStats: true,
|
jobStats: true,
|
||||||
productionStats: true,
|
productionStats: true,
|
||||||
jobStatsDetails: true
|
jobStatsDetails: true
|
||||||
@ -40,6 +42,7 @@ const ProductionOverview = () => {
|
|||||||
<InfoCollapse
|
<InfoCollapse
|
||||||
title='Printer Statistics'
|
title='Printer Statistics'
|
||||||
icon={null}
|
icon={null}
|
||||||
|
canCollapse={false}
|
||||||
active={collapseState.printerStats}
|
active={collapseState.printerStats}
|
||||||
onToggle={(isActive) =>
|
onToggle={(isActive) =>
|
||||||
updateCollapseState('printerStats', isActive)
|
updateCollapseState('printerStats', isActive)
|
||||||
@ -60,6 +63,7 @@ const ProductionOverview = () => {
|
|||||||
<InfoCollapse
|
<InfoCollapse
|
||||||
title='Job Statistics'
|
title='Job Statistics'
|
||||||
icon={null}
|
icon={null}
|
||||||
|
canCollapse={false}
|
||||||
active={collapseState.jobStats}
|
active={collapseState.jobStats}
|
||||||
onToggle={(isActive) => updateCollapseState('jobStats', isActive)}
|
onToggle={(isActive) => updateCollapseState('jobStats', isActive)}
|
||||||
className='no-t-padding-collapse'
|
className='no-t-padding-collapse'
|
||||||
@ -76,7 +80,7 @@ const ProductionOverview = () => {
|
|||||||
</InfoCollapse>
|
</InfoCollapse>
|
||||||
|
|
||||||
<Flex gap='large' wrap='wrap'>
|
<Flex gap='large' wrap='wrap'>
|
||||||
<Flex flex={1} vertical style={{ minWidth: '300px' }}>
|
<Flex flex={1} vertical style={{ minWidth: '300px' }} gap='large'>
|
||||||
<InfoCollapse
|
<InfoCollapse
|
||||||
title='Printer History'
|
title='Printer History'
|
||||||
icon={null}
|
icon={null}
|
||||||
@ -89,8 +93,20 @@ const ProductionOverview = () => {
|
|||||||
>
|
>
|
||||||
<HistoryDisplay objectType='printer' />
|
<HistoryDisplay objectType='printer' />
|
||||||
</InfoCollapse>
|
</InfoCollapse>
|
||||||
|
<InfoCollapse
|
||||||
|
title='Online Printers'
|
||||||
|
icon={null}
|
||||||
|
active={collapseState.onlinePrinters}
|
||||||
|
onToggle={(isActive) =>
|
||||||
|
updateCollapseState('onlinePrinters', isActive)
|
||||||
|
}
|
||||||
|
collapseKey='onlinePrinters'
|
||||||
|
canCollapse={false}
|
||||||
|
>
|
||||||
|
<ObjectTable type='printer' masterFilter={{ online: true }} />
|
||||||
|
</InfoCollapse>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex flex={1} vertical style={{ minWidth: '300px' }}>
|
<Flex flex={1} vertical style={{ minWidth: '300px' }} gap='large'>
|
||||||
<InfoCollapse
|
<InfoCollapse
|
||||||
title='Job History'
|
title='Job History'
|
||||||
icon={null}
|
icon={null}
|
||||||
@ -103,6 +119,21 @@ const ProductionOverview = () => {
|
|||||||
>
|
>
|
||||||
<HistoryDisplay objectType='job' />
|
<HistoryDisplay objectType='job' />
|
||||||
</InfoCollapse>
|
</InfoCollapse>
|
||||||
|
<InfoCollapse
|
||||||
|
title='Queued Jobs'
|
||||||
|
icon={null}
|
||||||
|
active={collapseState.queuedJobs}
|
||||||
|
onToggle={(isActive) =>
|
||||||
|
updateCollapseState('queuedJobs', isActive)
|
||||||
|
}
|
||||||
|
canCollapse={false}
|
||||||
|
collapseKey='queuedJobs'
|
||||||
|
>
|
||||||
|
<ObjectTable
|
||||||
|
type='job'
|
||||||
|
masterFilter={{ 'state.type': 'queued' }}
|
||||||
|
/>
|
||||||
|
</InfoCollapse>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user