chore: chart panel ui enhance (#20743)

pull/20903/head
Joel 12 months ago committed by GitHub
parent 85859b6723
commit 723b69cf8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -47,22 +47,24 @@ export default function ChartView({ appId, headerRight }: IChartViewProps) {
return ( return (
<div> <div>
<div className='mb-4 flex items-center justify-between'> <div className='mb-4'>
<div className='system-xl-semibold flex flex-row items-center text-text-primary'> <div className='system-xl-semibold mb-2 text-text-primary'>{t('common.appMenus.overview')}</div>
<span className='mr-3'>{t('appOverview.analysis.title')}</span> <div className='flex items-center justify-between'>
<SimpleSelect <div className='flex flex-row items-center'>
items={Object.entries(TIME_PERIOD_MAPPING).map(([k, v]) => ({ value: k, name: t(`appLog.filter.period.${v.name}`) }))} <SimpleSelect
className='mt-0 !w-40' items={Object.entries(TIME_PERIOD_MAPPING).map(([k, v]) => ({ value: k, name: t(`appLog.filter.period.${v.name}`) }))}
onSelect={(item) => { className='mt-0 !w-40'
const id = item.value onSelect={(item) => {
const value = TIME_PERIOD_MAPPING[id]?.value ?? '-1' const id = item.value
const name = item.name || t('appLog.filter.period.allTime') const value = TIME_PERIOD_MAPPING[id]?.value ?? '-1'
onSelect({ value, name }) const name = item.name || t('appLog.filter.period.allTime')
}} onSelect({ value, name })
defaultValue={'2'} }}
/> defaultValue={'2'}
/>
</div>
{headerRight}
</div> </div>
{headerRight}
</div> </div>
{!isWorkflow && ( {!isWorkflow && (
<div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'> <div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'>

@ -23,19 +23,6 @@ import Divider from '@/app/components/base/divider'
const I18N_PREFIX = 'app.tracing' const I18N_PREFIX = 'app.tracing'
const Title = ({
className,
}: {
className?: string
}) => {
const { t } = useTranslation()
return (
<div className={cn('system-xl-semibold flex items-center text-text-primary', className)}>
{t('common.appMenus.overview')}
</div>
)
}
const Panel: FC = () => { const Panel: FC = () => {
const { t } = useTranslation() const { t } = useTranslation()
const pathname = usePathname() const pathname = usePathname()

Loading…
Cancel
Save