Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: chart panel ui enhance (#20743)

Joel723b69cf8d64
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chartView.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chartView.tsx
index 32822e3315b..646c8bd93d6 100644
--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chartView.tsx
+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chartView.tsx
@@ -47,22 +47,24 @@ export default function ChartView({ appId, headerRight }: IChartViewProps) {
return (
<div>
- <div className='mb-4 flex items-center justify-between'>
- <div className='system-xl-semibold flex flex-row items-center text-text-primary'>
- <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 name = item.name || t('appLog.filter.period.allTime')
- onSelect({ value, name })
- }}
- defaultValue={'2'}
- />
+ <div className='mb-4'>
+ <div className='system-xl-semibold mb-2 text-text-primary'>{t('common.appMenus.overview')}</div>
+ <div className='flex items-center justify-between'>
+ <div className='flex flex-row items-center'>
+ <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 name = item.name || t('appLog.filter.period.allTime')
+ onSelect({ value, name })
+ }}
+ defaultValue={'2'}
+ />
+ </div>
+ {headerRight}
</div>
- {headerRight}
</div>
{!isWorkflow && (
<div className='mb-6 grid w-full grid-cols-1 gap-6 xl:grid-cols-2'>
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx
index bc85f3a734b..76e90ecf19e 100644
--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx
+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx
@@ -23,19 +23,6 @@ import Divider from '@/app/components/base/divider'
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 { t } = useTranslation()
const pathname = usePathname()