chore: chart panel ui enhance (#20743)
This commit is contained in:
parent
85859b6723
commit
723b69cf8d
2 changed files with 17 additions and 28 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue