2024-07-26 00:34:08 +03:00
|
|
|
|
import Divider from '@/components/ui/Divider';
|
2024-08-23 12:35:48 +03:00
|
|
|
|
import ValueLabeled from '@/components/ui/ValueLabeled';
|
2024-07-26 00:34:08 +03:00
|
|
|
|
import { IOperationSchemaStats } from '@/models/oss';
|
|
|
|
|
|
|
|
|
|
interface OssStatsProps {
|
|
|
|
|
stats?: IOperationSchemaStats;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function OssStats({ stats }: OssStatsProps) {
|
|
|
|
|
if (!stats) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div className='flex flex-col sm:gap-1 sm:ml-6 sm:mt-8 sm:w-[16rem]'>
|
|
|
|
|
<Divider margins='my-2' className='sm:hidden' />
|
|
|
|
|
|
2024-08-23 12:35:48 +03:00
|
|
|
|
<ValueLabeled id='count_all' label='Всего операций' text={stats.count_operations} />
|
|
|
|
|
<ValueLabeled id='count_inputs' label='Загрузка' text={stats.count_inputs} />
|
|
|
|
|
<ValueLabeled id='count_synthesis' label='Синтез' text={stats.count_synthesis} />
|
2024-07-26 00:34:08 +03:00
|
|
|
|
|
|
|
|
|
<Divider margins='my-2' />
|
|
|
|
|
|
2024-08-23 12:35:48 +03:00
|
|
|
|
<ValueLabeled id='count_schemas' label='Прикрепленные схемы' text={stats.count_schemas} />
|
2024-07-26 00:34:08 +03:00
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default OssStats;
|