| | |
| | | |
| | | return ( |
| | | <div> |
| | | <div className='system-xl-semibold mb-4 mt-8 flex flex-row items-center text-text-primary'> |
| | | <div className='flex flex-row items-center mt-8 mb-4 text-gray-900 text-base'> |
| | | <span className='mr-3'>{t('appOverview.analysis.title')}</span> |
| | | <SimpleSelect |
| | | items={Object.entries(TIME_PERIOD_MAPPING).map(([k, v]) => ({ value: k, name: t(`appLog.filter.period.${v.name}`) }))} |
| | | className='mt-0 !w-40' |
| | | onSelect={(item) => { |
| | | const id = item.value |
| | | const value = TIME_PERIOD_MAPPING[id]?.value ?? '-1' |
| | | const value = TIME_PERIOD_MAPPING[id]?.value || '-1' |
| | | const name = item.name || t('appLog.filter.period.allTime') |
| | | onSelect({ value, name }) |
| | | }} |
| | |
| | | /> |
| | | </div> |
| | | {!isWorkflow && ( |
| | | <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> |
| | | <div className='grid gap-6 grid-cols-1 xl:grid-cols-2 w-full mb-6'> |
| | | <ConversationsChart period={period} id={appId} /> |
| | | <EndUsersChart period={period} id={appId} /> |
| | | </div> |
| | | )} |
| | | {!isWorkflow && ( |
| | | <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> |
| | | <div className='grid gap-6 grid-cols-1 xl:grid-cols-2 w-full mb-6'> |
| | | {isChatApp |
| | | ? ( |
| | | <AvgSessionInteractions period={period} id={appId} /> |
| | |
| | | </div> |
| | | )} |
| | | {!isWorkflow && ( |
| | | <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> |
| | | <div className='grid gap-6 grid-cols-1 xl:grid-cols-2 w-full mb-6'> |
| | | <UserSatisfactionRate period={period} id={appId} /> |
| | | <CostChart period={period} id={appId} /> |
| | | </div> |
| | | )} |
| | | {!isWorkflow && isChatApp && ( |
| | | <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> |
| | | <div className='grid gap-6 grid-cols-1 xl:grid-cols-2 w-full mb-6'> |
| | | <MessagesChart period={period} id={appId} /> |
| | | </div> |
| | | )} |
| | | {isWorkflow && ( |
| | | <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> |
| | | <div className='grid gap-6 grid-cols-1 xl:grid-cols-2 w-full mb-6'> |
| | | <WorkflowMessagesChart period={period} id={appId} /> |
| | | <WorkflowDailyTerminalsChart period={period} id={appId} /> |
| | | </div> |
| | | )} |
| | | {isWorkflow && ( |
| | | <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> |
| | | <div className='grid gap-6 grid-cols-1 xl:grid-cols-2 w-full mb-6'> |
| | | <WorkflowCostChart period={period} id={appId} /> |
| | | <AvgUserInteractions period={period} id={appId} /> |
| | | </div> |