chore: remove repeat public api and service api panel (#20715)
This commit is contained in:
parent
4271602cfc
commit
4f0c9fdf2b
3 changed files with 23 additions and 21 deletions
|
|
@ -18,9 +18,10 @@ const queryDateFormat = 'YYYY-MM-DD HH:mm'
|
||||||
|
|
||||||
export type IChartViewProps = {
|
export type IChartViewProps = {
|
||||||
appId: string
|
appId: string
|
||||||
|
headerRight: React.ReactNode
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ChartView({ appId }: IChartViewProps) {
|
export default function ChartView({ appId, headerRight }: IChartViewProps) {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const appDetail = useAppStore(state => state.appDetail)
|
const appDetail = useAppStore(state => state.appDetail)
|
||||||
const isChatApp = appDetail?.mode !== 'completion' && appDetail?.mode !== 'workflow'
|
const isChatApp = appDetail?.mode !== 'completion' && appDetail?.mode !== 'workflow'
|
||||||
|
|
@ -46,7 +47,8 @@ export default function ChartView({ appId }: IChartViewProps) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className='system-xl-semibold mb-4 mt-8 flex flex-row items-center text-text-primary'>
|
<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>
|
<span className='mr-3'>{t('appOverview.analysis.title')}</span>
|
||||||
<SimpleSelect
|
<SimpleSelect
|
||||||
items={Object.entries(TIME_PERIOD_MAPPING).map(([k, v]) => ({ value: k, name: t(`appLog.filter.period.${v.name}`) }))}
|
items={Object.entries(TIME_PERIOD_MAPPING).map(([k, v]) => ({ value: k, name: t(`appLog.filter.period.${v.name}`) }))}
|
||||||
|
|
@ -60,6 +62,8 @@ export default function ChartView({ appId }: IChartViewProps) {
|
||||||
defaultValue={'2'}
|
defaultValue={'2'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{headerRight}
|
||||||
|
</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'>
|
||||||
<ConversationsChart period={period} id={appId} />
|
<ConversationsChart period={period} id={appId} />
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ChartView from './chartView'
|
import ChartView from './chartView'
|
||||||
import CardView from './cardView'
|
|
||||||
import TracingPanel from './tracing/panel'
|
import TracingPanel from './tracing/panel'
|
||||||
import ApikeyInfoPanel from '@/app/components/app/overview/apikey-info-panel'
|
import ApikeyInfoPanel from '@/app/components/app/overview/apikey-info-panel'
|
||||||
|
|
||||||
|
|
@ -18,9 +17,10 @@ const Overview = async (props: IDevelopProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="h-full overflow-scroll bg-chatbot-bg px-4 py-6 sm:px-12">
|
<div className="h-full overflow-scroll bg-chatbot-bg px-4 py-6 sm:px-12">
|
||||||
<ApikeyInfoPanel />
|
<ApikeyInfoPanel />
|
||||||
<TracingPanel />
|
<ChartView
|
||||||
<CardView appId={appId} />
|
appId={appId}
|
||||||
<ChartView appId={appId} />
|
headerRight={<TracingPanel />}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,6 @@ const Panel: FC = () => {
|
||||||
if (!isLoaded) {
|
if (!isLoaded) {
|
||||||
return (
|
return (
|
||||||
<div className='mb-3 flex items-center justify-between'>
|
<div className='mb-3 flex items-center justify-between'>
|
||||||
<Title className='h-[41px]' />
|
|
||||||
<div className='w-[200px]'>
|
<div className='w-[200px]'>
|
||||||
<Loading />
|
<Loading />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -163,8 +162,7 @@ const Panel: FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('mb-3 flex items-center justify-between')}>
|
<div className={cn('flex items-center justify-between')}>
|
||||||
<Title className='h-[41px]' />
|
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex cursor-pointer items-center rounded-xl border-l-[0.5px] border-t border-effects-highlight bg-background-default-dodge p-2 shadow-xs hover:border-effects-highlight-lightmode-off hover:bg-background-default-lighter',
|
'flex cursor-pointer items-center rounded-xl border-l-[0.5px] border-t border-effects-highlight bg-background-default-dodge p-2 shadow-xs hover:border-effects-highlight-lightmode-off hover:bg-background-default-lighter',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue