Skip to content

Commit 61544b4

Browse files
perf: Perf home numer
1 parent 0548e2c commit 61544b4

1 file changed

Lines changed: 18 additions & 23 deletions

File tree

ui/src/views/home/component/ResourceAggregation.vue

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="flex-between">
77
<div>
88
<p class="color-secondary lighter mb-4">{{ $t('views.application.title') }}</p>
9-
<h2 class="large-number">{{ numberFormat(applicationAggregation?.total || 0) }}</h2>
9+
<h2 class="large-number">{{ applicationAggregation?.total || 0 }}</h2>
1010
</div>
1111
<el-avatar :size="48" shape="square" style="background: #ebf1ff">
1212
<appIcon
@@ -18,11 +18,11 @@
1818
<el-row class="mt-12">
1919
<el-col :span="12">
2020
<p class="color-secondary lighter mb-4">{{ $t('common.status.published') }}</p>
21-
<h2>{{ numberFormat(applicationAggregation?.publish_count || 0) }}</h2>
21+
<h2>{{ applicationAggregation?.publish_count || 0 }}</h2>
2222
</el-col>
2323
<el-col :span="12">
2424
<p class="color-secondary lighter mb-4">{{ $t('common.status.unpublished') }}</p>
25-
<h2>{{ numberFormat(applicationAggregation?.un_publish_count || 0) }}</h2>
25+
<h2>{{ applicationAggregation?.un_publish_count || 0 }}</h2>
2626
</el-col>
2727
</el-row>
2828
</el-card>
@@ -32,7 +32,7 @@
3232
<div class="flex-between">
3333
<div>
3434
<p class="color-secondary lighter mb-4">{{ $t('views.knowledge.title') }}</p>
35-
<h2 class="large-number">{{ numberFormat(knowledgeAggregation?.total || 0) }}</h2>
35+
<h2 class="large-number">{{ knowledgeAggregation?.total || 0 }}</h2>
3636
</div>
3737
<el-avatar :size="48" shape="square" style="background: #f2ebfe">
3838
<appIcon
@@ -44,11 +44,11 @@
4444
<el-row class="mt-12">
4545
<el-col :span="12">
4646
<p class="color-secondary lighter mb-4">{{ $t('common.fileUpload.document') }}</p>
47-
<h2>{{ numberFormat(knowledgeAggregation?.document_count || 0) }}</h2>
47+
<h2>{{ knowledgeAggregation?.document_count || 0 }}</h2>
4848
</el-col>
4949
<el-col :span="12">
5050
<p class="color-secondary lighter mb-4">{{ $t('common.status.fail') }}</p>
51-
<h2>{{ numberFormat(knowledgeAggregation?.failure_count || 0) }}</h2>
51+
<h2>{{ knowledgeAggregation?.failure_count || 0 }}</h2>
5252
</el-col>
5353
</el-row>
5454
</el-card>
@@ -58,7 +58,7 @@
5858
<div class="flex-between">
5959
<div>
6060
<p class="color-secondary lighter mb-4">{{ $t('views.tool.title') }}</p>
61-
<h2 class="large-number">{{ numberFormat(toolAggregation?.total || 0) }}</h2>
61+
<h2 class="large-number">{{ toolAggregation?.total || 0 }}</h2>
6262
</div>
6363
<el-avatar :size="48" shape="square" style="background: #ebf9e9">
6464
<appIcon iconName="app-tool-active" :style="{ fontSize: '28px', color: '#2CA91F' }" />
@@ -67,21 +67,19 @@
6767
<el-row class="mt-12">
6868
<el-col :span="8">
6969
<p class="color-secondary lighter mb-4">{{ $t('views.tool.title') }}</p>
70-
<h2>{{ numberFormat(toolAggregation?.custom_count || 0) }}</h2>
70+
<h2>{{ toolAggregation?.custom_count || 0 }}</h2>
7171
</el-col>
7272
<el-col :span="8">
7373
<p class="color-secondary lighter mb-4">{{ $t('workflow.workflow') }}</p>
74-
<h2>{{ numberFormat(toolAggregation?.workflow_count || 0) }}</h2>
74+
<h2>{{ toolAggregation?.workflow_count || 0 }}</h2>
7575
</el-col>
7676
<el-col :span="8">
7777
<p class="color-secondary lighter mb-4">{{ $t('common.other') }}</p>
7878
<h2>
7979
{{
80-
numberFormat(
81-
toolAggregation?.total -
82-
toolAggregation?.custom_count -
83-
toolAggregation?.workflow_count || 0,
84-
)
80+
toolAggregation?.total -
81+
toolAggregation?.custom_count -
82+
toolAggregation?.workflow_count || 0
8583
}}
8684
</h2>
8785
</el-col>
@@ -93,7 +91,7 @@
9391
<div class="flex-between">
9492
<div>
9593
<p class="color-secondary lighter mb-4">{{ $t('views.model.title') }}</p>
96-
<h2 class="large-number">{{ numberFormat(modelAggregation?.total || 0) }}</h2>
94+
<h2 class="large-number">{{ modelAggregation?.total || 0 }}</h2>
9795
</div>
9896
<el-avatar :size="48" shape="square" style="background: #fff3e5">
9997
<appIcon
@@ -105,21 +103,19 @@
105103
<el-row class="mt-12">
106104
<el-col :span="8">
107105
<p class="color-secondary lighter mb-4">{{ $t('home.llm') }}</p>
108-
<h2>{{ numberFormat(modelAggregation?.llm_count || 0) }}</h2>
106+
<h2>{{ modelAggregation?.llm_count || 0 }}</h2>
109107
</el-col>
110108
<el-col :span="8">
111109
<p class="color-secondary lighter mb-4">{{ $t('home.embedding') }}</p>
112-
<h2>{{ numberFormat(modelAggregation?.embedding_count || 0) }}</h2>
110+
<h2>{{ modelAggregation?.embedding_count || 0 }}</h2>
113111
</el-col>
114112
<el-col :span="8">
115113
<p class="color-secondary lighter mb-4">{{ $t('common.other') }}</p>
116114
<h2>
117115
{{
118-
numberFormat(
119-
modelAggregation?.total -
120-
modelAggregation?.llm_count -
121-
modelAggregation?.embedding_count || 0,
122-
)
116+
modelAggregation?.total -
117+
modelAggregation?.llm_count -
118+
modelAggregation?.embedding_count || 0
123119
}}
124120
</h2>
125121
</el-col>
@@ -133,7 +129,6 @@
133129
import { ref, computed, onMounted } from 'vue'
134130
import { useRouter } from 'vue-router'
135131
import homeApi from '@/api/home-page/home'
136-
import { numberFormat } from '@/utils/common'
137132
const router = useRouter()
138133
const loading = ref(true)
139134
const applicationAggregation = ref()

0 commit comments

Comments
 (0)